gcc/ChangeLog:
[official-gcc.git] / gcc / ChangeLog
blob07db821bf571b65fa55e31c0700a896a33f48de1
1 2018-06-25  Martin Sebor  <msebor@redhat.com>
3         * doc/extend.texi (Zero-length arrays): Update and clarify.
5 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
8         added IEEE/IBM long double multilib support on PowerPC little
9         endian Linux systems.
10         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11         (MULTILIB_DEFAULTS): Likewise.
12         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13         Likewise.
14         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
15         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
18 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
20         PR middle-end/86311
21         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
22         (REORDER_45): Likewise.
24 2018-06-25  Jeff Law  <law@redhat.com>
26         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
27         dividend to 32 bits.  Adjust length.
28         (udivmodhi4): Cleanup output template.  Fix length.
30 2018-06-25  Carl Love  <cel@us.ibm.com>
32         * config/rs6000/vsx.md: Change word selector to prefered location.
34 2018-06-25  Richard Biener  <rguenther@suse.de>
36         PR tree-optimization/86304
37         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
38         epilogue-if-converted loops as well.
40 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
42         * lto-section-out.c (lto_begin_section): Do not print section
43         name for noaddr and unnumbered dumps.
45 2018-06-25  Richard Biener  <rguenther@suse.de>
47         * tree-vectorizer.h (struct vec_info_shared): New structure
48         with parts split out from struct vec_info and loop_nest from
49         struct _loop_vec_info.
50         (struct vec_info): Adjust accordingly.
51         (struct _loop_vec_info): Likewise.
52         (LOOP_VINFO_LOOP_NEST): Adjust.
53         (LOOP_VINFO_DATAREFS): Likewise.
54         (LOOP_VINFO_DDRS): Likewise.
55         (struct _bb_vec_info): Likewise.
56         (BB_VINFO_DATAREFS): Likewise.
57         (BB_VINFO_DDRS): Likewise.
58         (struct _stmt_vec_info): Add dr_aux member.
59         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
60         (DR_MISALIGNMENT_UNINITIALIZED): New.
61         (set_dr_misalignment): Adjust.
62         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
63         (vect_analyze_loop): Adjust prototype.
64         (vect_analyze_loop_form): Likewise.
65         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
66         Compute dependences lazily.
67         (vect_record_base_alignments): Use shared datarefs/ddrs.
68         (vect_verify_datarefs_alignment): Likewise.
69         (vect_analyze_data_refs_alignment): Likewise.
70         (vect_analyze_data_ref_accesses): Likewise.
71         (vect_analyze_data_refs): Likewise.
72         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
73         constructor parameter for shared part.
74         (vect_analyze_loop_form): Pass in shared part and adjust.
75         (vect_analyze_loop_2): Pass in storage for the number of
76         stmts.  Move loop nest finding to the caller.  Compute
77         datarefs lazily.
78         (vect_analyze_loop): Pass in shared part.
79         (vect_transform_loop): Verify shared datarefs are unchanged.
80         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
81         constructor parameter for shared part.
82         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
83         (vect_slp_bb): Verify shared datarefs are unchanged before
84         transform.
85         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
86         change.
87         (new_stmt_vec_info): Initialize DR_AUX misalignment to
88         DR_MISALIGNMENT_UNINITIALIZED.
89         * tree-vectorizer.c (vec_info::vec_info): Add constructor
90         parameter for shared part.
91         (vec_info::~vec_info): Adjust.
92         (vec_info_shared::vec_info_shared): New.
93         (vec_info_shared::~vec_info_shared): Likewise.
94         (vec_info_shared::save_datarefs): Likewise.
95         (vec_info_shared::check_datarefs): Likewise.
96         (try_vectorize_loop_1): Construct shared part live for analyses
97         of a single loop for multiple vector sizes.
98         * tree-parloops.c (gather_scalar_reductions): Adjust.
100 2018-06-25  Richard Biener  <rguenther@suse.de>
102         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
103         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
104         (vect_analyze_data_refs): Remove similar code from here and
105         simplify accordingly.
107 2018-06-25  Richard Biener  <rguenther@suse.de>
109         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
110         for reverse storage order accesses rather than asserting
111         they cannot happen here.
113 2018-06-25  Tom de Vries  <tdevries@suse.de>
115         PR debug/86257
116         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
117         Use data16 instead of .byte for insn prefix.
119 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
121         PR C++/86082
122         * parser.c (make_char_string_pack): Pass this literal chars
123         through cpp_interpret_string.
124         (cp_parser_userdef_numeric_literal): Check the result of
125         make_char_string_pack.
127 2018-06-24  Maya Rashish  <coypu@sdf.org>
129         * ginclude/stddef.h: Simplify conditions around avoiding
130         re-definition of __size_t.
132 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
134         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
135         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
137 2018-06-22  Maya Rashish  <coypu@sdf.org>
139         * doc/invoke.texi (mno-fancy-math-387): Update for changes
140         made to OpenBSD and NetBSD through the years.
142 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
144         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
145         behavior of vec_pack (vector double, vector double) to match
146         behavior of vec_float2 (vector double, vector double).
148 2018-06-22  Olivier Hainque  <hainque@adacore.com>
150         * gimplify.c (gimplify_function_tree): Prevent creation
151         of a trampoline for the address of the current function
152         passed to entry/exit instrumentation hooks.
154 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
156         PR target/86222
157         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
158         correctly.
160 2018-06-22  Martin Liska  <mliska@suse.cz>
162         PR tree-optimization/86263
163         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
164         Bail out if is_enabled is false.
165         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
166         New declaration.
167         (jump_table_cluster::is_enabled): New function.
169 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
171         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
172         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
173         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
174         (lto_input_ts_binfo_tree_pointers): Likewise.
175         * tree-streamer-out.c (streamer_write_tree_bitfields,
176         write_ts_binfo_tree_pointers): Likewise.
177         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
179 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
181         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
183 2018-06-22  Martin Liska  <mliska@suse.cz>
185         * symbol-summary.h (get): Make it pure and inline move
186         functionality from ::get function.
187         (get): Remove and inline into ::get and ::get_create.
188         (get_create): Move code from ::get function.
190 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
192         PR target/85994
193         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
194         -x assembler-with-cpp.
196 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
198         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
199         _FILE_OFFSET_BITS=64 for C++.
201 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
203         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
204         conversion insn that shows up when pr85657-3.c is compiled using
205         IEEE 128-bit long double.
206         (neg<mode>2_internal): Use the correct mode to check whether the
207         mode is IBM extended.
208         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
209         multiply and divide external functions from being created more
210         than once.
212 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
214         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
215         functions.
216         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
217         the edge can be forwarded.
218         (cfg_layout_merge_blocks): Likewise.
220 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
222         * except.c (finish_eh_generation): Commit edge insertions only after
223         the EH edges have been redirected from post-landing to landing pads.
225 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
227         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
228         create_tmp_var_for to create the FRAME decl.
229         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
231 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
233         * tree-inline.c (copy_edges_for_bb): Minor tweak.
234         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
235         debug statement when resetting its value.
236         (expand_call_inline): Copy the locus of the call onto the assignment
237         of the return value, if any.  Use local variable in more cases.
239 2018-06-21  Martin Liska  <mliska@suse.cz>
241         * ipa-pure-const.c (propagate_nothrow): Use
242         funct_state_summaries->get.
243         (dump_malloc_lattice): Likewise.
244         (propagate_malloc): Likewise.
246 2018-06-21  Richard Biener  <rguenther@suse.de>
248         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
249         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
250         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
251         comment.
252         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
253         BLOCK_ABSTRACT_ORIGIN unconditionally.
255 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
257         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
258         deleting it.
259         * ipa-reference.c (ipa_reference_c_finalize): Delete
260         ipa_ref_opt_sum_summaries and set it to NULL.
262 2018-06-21  Tom de Vries  <tdevries@suse.de>
264         PR tree-optimization/85859
265         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
266         test with comment from bb_no_side_effects_p.
268 2018-06-21  Richard Biener  <rguenther@suse.de>
270         PR tree-optimization/86232
271         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
272         max for constant niter.
274 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
276         * config/aarch64/aarch64-simd.md
277         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
279 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
281         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
282         Make opernads of the unspec commutative.
284 2018-06-21  Richard Biener  <rguenther@suse.de>
286         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
287         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
288         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
289         (vect_analyze_data_ref_dependence): Re-order checks to deal with
290         NULL DR_STEP.
291         (vect_record_base_alignments): Do not record base alignment
292         for gathers or scatters.
293         (vect_compute_data_ref_alignment): Drop return value that is always
294         true.  Bail out early for gathers or scatters.
295         (vect_enhance_data_refs_alignment): Bail out early for gathers
296         or scatters.
297         (vect_find_same_alignment_drs): Likewise.
298         (vect_analyze_data_refs_alignment): Remove dead code.
299         (vect_slp_analyze_and_verify_node_alignment): Likewise.
300         (vect_analyze_data_refs): For possible gathers or scatters do
301         not create an alternate DR, just check their possible validity
302         and mark them.  Adjust DECL_NONALIASED handling to not rely
303         on DR_BASE_ADDRESS.
304         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
305         update inits of gathers or scatters.
306         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
307         Also copy gather/scatter flag to pattern vinfo.
309 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
311         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
312         behavior of vec_packsu (vector unsigned long long, vector unsigned
313         long long) to match behavior of vec_packs with same signature.
315 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
316             Thomas Schwinge <thomas@codesourcery.com>
317             Cesar Philippidis  <cesar@codesourcery.com>
319         * gimplify.c (gimplify_scan_omp_clauses): Add support for
320         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
321         (gimplify_adjust_omp_clauses): Likewise.
322         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
323         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
324         (gimplify_omp_target_update): Update handling of acc update and
325         enter/exit data.
326         * omp-low.c (install_var_field): Remove unused parameter
327         base_pointers_restrict.
328         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
329         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
330         FINALIZE}
331         (omp_target_base_pointers_restrict_p): Delete.
332         (scan_omp_target): Update call to scan_sharing_clauses.
333         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
334         FINALIZE}.
335         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
336         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
337         (convert_local_omp_clauses): Likewise.
338         * tree-pretty-print.c (dump_omp_clause): Likewise.
339         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
340         FINALIZE}.
341         (omp_clause_code_name): Likewise.
343 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
345         PR debug/86194
346         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
347         be narrowed.
349         PR tree-optimization/86231
350         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
351         anti-range don't overwrite *vr0min before using it to compute *vr0max.
353 2018-06-20  Tom de Vries  <tdevries@suse.de>
355         PR tree-optimization/86097
356         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
357         iv type if signedness of iv type is not the same as that of *nit.
359 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
361         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
362         EDGE_EH edges, verify they are all EDGE_EH.
364 2018-06-20  Maya Rashish  <coypu@sdf.org>
366         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
368 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
370         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
371         * config/aarch64/aarch64.c (xgene1_tunings): Add
372         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
373         (aarch64_mode_valid_for_sched_fusion_p):
374         Allow 16-byte modes.
375         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
376         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
377         128-bit modes.
378         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
379         New pattern.
380         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
381         * config/aarch64/iterators.md (VQ2): New mode iterator.
383 2018-06-20  Martin Liska  <mliska@suse.cz>
385         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
386         Change default ratio from 10 to 8.
388 2018-06-20  Martin Liska  <mliska@suse.cz>
390         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
391         New.
392         (bit_test_cluster::find_bit_tests): Likewise.
393         (switch_decision_tree::analyze_switch_statement): Find clusters.
394         * tree-switch-conversion.h (struct jump_table_cluster): Document
395         hierarchy.
397 2018-06-20  Martin Liska  <mliska@suse.cz>
399         * tree-switch-conversion.c (switch_conversion::collect):
400         Record m_uniq property.
401         (switch_conversion::expand): Bail out for special conditions.
402         (group_cluster::~group_cluster): New.
403         (group_cluster::group_cluster): Likewise.
404         (group_cluster::dump): Likewise.
405         (jump_table_cluster::emit): New.
406         (switch_decision_tree::fix_phi_operands_for_edges): New.
407         (struct case_node): Remove struct.
408         (jump_table_cluster::can_be_handled): New.
409         (case_values_threshold): Moved to header.
410         (reset_out_edges_aux): Likewise.
411         (jump_table_cluster::is_beneficial): New.
412         (bit_test_cluster::can_be_handled): Likewise.
413         (add_case_node): Remove.
414         (bit_test_cluster::is_beneficial): New.
415         (case_bit_test::cmp): New.
416         (bit_test_cluster::emit): New.
417         (expand_switch_as_decision_tree_p): Remove.
418         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
419         (fix_phi_operands_for_edge): Likewise.
420         (switch_decision_tree::analyze_switch_statement): New.
421         (compute_cases_per_edge): Move ...
422         (switch_decision_tree::compute_cases_per_edge): ... here.
423         (try_switch_expansion): Likewise.
424         (switch_decision_tree::try_switch_expansion): Likewise.
425         (record_phi_operand_mapping): Likewise.
426         (switch_decision_tree::record_phi_operand_mapping): Likewise.
427         (emit_case_decision_tree): Likewise.
428         (switch_decision_tree::emit): Likewise.
429         (balance_case_nodes): Likewise.
430         (switch_decision_tree::balance_case_nodes): Likewise.
431         (dump_case_nodes): Likewise.
432         (switch_decision_tree::dump_case_nodes): Likewise.
433         (emit_jump): Likewise.
434         (switch_decision_tree::emit_jump): Likewise.
435         (emit_cmp_and_jump_insns): Likewise.
436         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
437         (emit_case_nodes): Likewise.
438         (switch_decision_tree::emit_case_nodes): Likewise.
439         (conditional_probability): Remove.
440         * tree-switch-conversion.h (enum cluster_type): New.
441         (PRINT_CASE): New.
442         (struct cluster): Likewise.
443         (cluster::cluster): Likewise.
444         (struct simple_cluster): Likewise.
445         (simple_cluster::simple_cluster): Likewise.
446         (struct group_cluster): Likewise.
447         (struct jump_table_cluster): Likewise.
448         (struct bit_test_cluster): Likewise.
449         (struct min_cluster_item): Likewise.
450         (struct case_tree_node): Likewise.
451         (case_tree_node::case_tree_node): Likewise.
452         (jump_table_cluster::case_values_threshold): Likewise.
453         (struct case_bit_test): Likewise.
454         (struct switch_decision_tree): Likewise.
455         (struct switch_conversion): Likewise.
456         (switch_decision_tree::reset_out_edges_aux): Likewise.
458 2018-06-20  Martin Liska  <mliska@suse.cz>
460         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
461         (hoist_edge_and_branch_if_true): Likewise.
462         (expand_switch_using_bit_tests_p): Likewise.
463         (struct case_bit_test): Likewise.
464         (case_bit_test_cmp): Likewise.
465         (emit_case_bit_tests): Likewise.
466         (switch_conversion::switch_conversion): New class.
467         (struct switch_conv_info): Remove old struct.
468         (collect_switch_conv_info): More to ...
469         (switch_conversion::collect): ... this.
470         (check_range): Likewise.
471         (switch_conversion::check_range): Likewise.
472         (check_all_empty_except_final): Likewise.
473         (switch_conversion::check_all_empty_except_final): Likewise.
474         (check_final_bb): Likewise.
475         (switch_conversion::check_final_bb): Likewise.
476         (create_temp_arrays): Likewise.
477         (switch_conversion::create_temp_arrays): Likewise.
478         (free_temp_arrays): Likewise.
479         (gather_default_values): Likewise.
480         (switch_conversion::gather_default_values): Likewise.
481         (build_constructors): Likewise.
482         (switch_conversion::build_constructors): Likewise.
483         (constructor_contains_same_values_p): Likewise.
484         (switch_conversion::contains_same_values_p): Likewise.
485         (array_value_type): Likewise.
486         (switch_conversion::array_value_type): Likewise.
487         (build_one_array): Likewise.
488         (switch_conversion::build_one_array): Likewise.
489         (build_arrays): Likewise.
490         (switch_conversion::build_arrays): Likewise.
491         (gen_def_assigns): Likewise.
492         (switch_conversion::gen_def_assigns): Likewise.
493         (prune_bbs): Likewise.
494         (switch_conversion::prune_bbs): Likewise.
495         (fix_phi_nodes): Likewise.
496         (switch_conversion::fix_phi_nodes): Likewise.
497         (gen_inbound_check): Likewise.
498         (switch_conversion::gen_inbound_check): Likewise.
499         (process_switch): Use the newly created class.
500         (switch_conversion::expand): New.
501         (switch_conversion::~switch_conversion): New.
502         * tree-switch-conversion.h: New file.
504 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
506         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
507         tree-vect-patterns.c.
508         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
509         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
510         (vect_recog_sad_pattern): Likewise.
511         (vect_recog_widen_sum_pattern): Likewise.
512         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
513         (vect_recog_widen_shift_pattern): Remove the type_in argument.
514         (vect_recog_rotate_pattern): Likewise.
515         (vect_recog_mult_pattern): Likewise.
516         (vect_recog_vector_vector_shift_pattern): Likewise.
517         (vect_recog_divmod_pattern): Likewise.
518         (vect_recog_mixed_size_cond_pattern): Likewise.
519         (vect_recog_bool_pattern): Likewise.
520         (vect_recog_mask_conversion_pattern): Likewise.
521         (vect_try_gather_scatter_pattern): Likewise.
522         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
523         (vect_recog_over_widening_pattern): Likewise.
524         (vect_recog_gather_scatter_pattern): Likewise.
525         (vect_recog_func_ptr): Move from tree-vectorizer.h
526         (vect_vect_recog_func_ptrs): Move further down the file.
527         (vect_recog_func): Likewise.  Remove the third argument.
528         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
529         (vect_pattern_recog_1): Expect the pattern function to do any
530         necessary target tests.  Also expect it to provide a vector type.
531         Remove the type_in handling.
533 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
535         * tree-vect-patterns.c (vect_pattern_detected): New function.
536         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
537         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
538         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
539         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
540         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
541         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
542         (vect_recog_mask_conversion_pattern)
543         (vect_try_gather_scatter_pattern): Likewise.
545 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
547         * tree-vect-patterns.c (vect_get_internal_def): New function.
548         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
549         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
550         (search_type_for_mask_1): Use it.
552 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
554         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
555         redundant WIDEN_SUM_EXPR handling.
556         (vect_recog_sad_pattern): Likewise.
558 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
560         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
561         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
562         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
563         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
564         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
566 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
568         * tree-vect-stmts.c (vectorizable_call): Make sure that we
569         use the stmt_vec_info of the original bb statement for the
570         new zero assignment, even if the call is part of a pattern.
572 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
574         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
575         that the sequence is attached to the original statement rather
576         than the pattern statement.
577         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
578         PATTERN_DEF_SEQ from the original statement rather than
579         the main pattern statement.
580         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
581         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
582         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
584 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
586         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
587         definition statements before the early exit for statements that aren't
588         live or relevant.
589         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
590         split out from...
591         (vect_transform_loop): ...here.  Process pattern definition
592         statements without first checking whether the main pattern
593         statement is live or relevant.
595 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
597         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
598         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
599         
600 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
602         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
603         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
604         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
605         (expand_block_compare): Change select_block_compare_mode call.
606         (expand_strncmp_align_check): Use new functions, fix comment.
607         (emit_final_str_compare_gpr): New function.
608         (expand_strn_compare): Refactor and clean up code.
609         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
611 2018-06-19  Tony Reix  <tony.reix@atos.com>
612             Damien Bergamini  <damien.bergamini@atos.com>
613             David Edelsohn  <dje.gcc@gmail.com>
615         * collect2.c (static_obj): New variable.
616         (static_libs): New variable.
617         (is_in_list): Uncomment declaration.
618         (main): Track AIX libraries linked statically.
619         (is_in_list): Uncomment definition.
620         (scan_prog_file): Don't add AIX shared libraries initializer
621         to constructor list if linking statically.
623 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
625         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
626         constant.
627         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
629 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
631         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
632         blocks.
634 2018-06-19  Martin Liska  <mliska@suse.cz>
636         * config/i386/i386.c (ix86_can_inline_p): Do not use
637         ipa_fn_summaries::get_create.
638         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
639         get.
640         (devirtualization_time_bonus): Likewise.
641         (ipcp_propagate_stage): Likewise.
642         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
643         (edge_set_predicate): Likewise.
644         (evaluate_conditions_for_known_args): Likewise.
645         (evaluate_properties_for_edge): Likewise.
646         (ipa_call_summary::reset): Tranform to ...
647         (ipa_call_summary::~ipa_call_summary): ... this.
648         (ipa_fn_summary::reset): Transform to ...
649         (ipa_fn_summary::~ipa_fn_summary): ... this.
650         (ipa_fn_summary_t::remove): Rename to ...
651         (ipa_fn_summary_t::remove_callees): ... this.
652         (ipa_fn_summary_t::duplicate): Use placement new
653         instead of memory copy.
654         (ipa_call_summary_t::duplicate): Likewise.
655         (ipa_call_summary_t::remove): Remove.
656         (dump_ipa_call_summary): Change get_create to get.
657         (ipa_dump_fn_summary): Dump only when summary exists.
658         (analyze_function_body): Use symbol_summary::get instead
659         of get_create.
660         (compute_fn_summary): Likewise.
661         (estimate_edge_devirt_benefit): Likewise.
662         (estimate_edge_size_and_time): Likewise.
663         (inline_update_callee_summaries): Likewise.
664         (remap_edge_change_prob): Likewise.
665         (remap_edge_summaries): Likewise.
666         (ipa_merge_fn_summary_after_inlining): Likewise.
667         (write_ipa_call_summary): Likewise.
668         (ipa_fn_summary_write): Likewise.
669         (ipa_free_fn_summary): Likewise.
670         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
671         (struct ipa_call_summary): Likewise.
672         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
673         of get_create.
674         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
675         (estimate_size_after_inlining): Likewise.
676         (estimate_growth): Likewise.
677         (growth_likely_positive): Likewise.
678         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
679         (inline_call): Likewise.
680         * ipa-inline.c (caller_growth_limits): Likewise.
681         (can_inline_edge_p): Likewise.
682         (can_inline_edge_by_limits_p): Likewise.
683         (compute_uninlined_call_time): Likewise.
684         (compute_inlined_call_time): Likewise.
685         (want_inline_small_function_p): Likewise.
686         (edge_badness): Likewise.
687         (update_caller_keys): Likewise.
688         (update_callee_keys): Likewise.
689         (inline_small_functions): Likewise.
690         (inline_to_all_callers_1): Likewise.
691         (dump_overall_stats): Likewise.
692         (early_inline_small_functions): Likewise.
693         (early_inliner): Likewise.
694         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
695         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
696         * ipa-pure-const.c (malloc_candidate_p): Likewise.
697         * ipa-split.c (execute_split_functions): Likewise.
698         * symbol-summary.h: Likewise.
699         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
701 2018-06-19  Richard Biener  <rguenther@suse.de>
703         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
704         (vectorize_loops): ... here.  Fix dbgcnt handling.
705         (try_vectorize_loop): Wrap try_vectorize_loop_1.
707 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
709         PR target/86197
710         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
711         ieee128 argument takes up only one (vector) register, not two (floating
712         point) registers.
714 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
716         * gimplify.c (gimplify_init_constructor): Really never clear for an
717         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
719 2018-06-19  Richard Biener  <rguenther@suse.de>
721         PR tree-optimization/86179
722         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
723         after failed recognition.
725 2018-06-18  Martin Sebor  <msebor@redhat.com>
727         PR middle-end/85602
728         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
729         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
730         Handle integer subtraction.
731         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
732         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
734 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
736         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
737         param from rtx to rtx_insn *.
738         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
739         param.
740         (frv_ifcvt_modify_insn): Likwise.
741         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
742         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
743         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
744         as_a <rtx_insn *> cast to local "unprotected_region" once
745         it's been established that it's not NULL or pc_rtx.
746         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
747         param "sethi" from rtx to rtx_insn *.
748         (nds32_group_float_insns): Likewise for param "insn".
749         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
750         param.
751         (vax_output_int_subtract): Likewise.
752         * config/vax/vax.c (vax_output_int_add): Likewise for param
753         "insn".
754         (vax_output_int_subtract): Likewise.
755         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
756         (emit_pattern_after): Likewise for param "after".
757         (emit_insn_after): Likewise.
758         (emit_jump_insn_after): Likewise.
759         (emit_call_insn_after): Likewise.
760         (emit_debug_insn_after): Likewise.
761         (emit_pattern_before): Likewise for param "before".
762         (emit_insn_before): Likewise.
763         (emit_jump_insn_before): Likewise.
764         * final.c (get_insn_template): Likewise for param "insn", removing
765         a cast.
766         * output.h (get_insn_template): Likewise for 2nd param.
767         * rtl.h (emit_insn_before): Likewise.
768         (emit_jump_insn_before): Likewise.
769         (emit_debug_insn_before_noloc): Likewise.
770         (emit_insn_after): Likewise.
771         (emit_jump_insn_after): Likewise.
772         (emit_call_insn_after): Likewise.
773         (emit_debug_insn_after): Likewise.
774         (set_insn_deleted): Likewise for param.
776 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
778         PR target/85358
779         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
780         floating point modes, so that IFmode is numerically greater than
781         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
782         to declare the ordering.  This prevents IFmode from being
783         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
784         machine.  Include rs6000-modes.h to share the fractional values
785         between genmodes* and the rest of the compiler.
786         (IFmode): Likewise.
787         (KFmode): Likewise.
788         (TFmode): Likewise.
789         * config/rs6000/rs6000-modes.h: New file.
790         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
791         meaning of rs6000_long_double_size so that 126..128 selects an
792         appropriate 128-bit floating point type.
793         (rs6000_option_override_internal): Likewise.
794         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
795         (TARGET_LONG_DOUBLE_128): Change the meaning of
796         rs6000_long_double_size so that 126..128 selects an appropriate
797         128-bit floating point type.
798         (LONG_DOUBLE_TYPE_SIZE): Update comment.
799         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
800         source and destination to match the standard usage.
801         (truncifkf2): Likewise.
802         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
803         ISA 2.07 to use an explicit clobber, instead of passing in a
804         temporary.
805         (copysign<mode>3_soft): Likewise.
807 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
809         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
810         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
811         (vect_slp_analyze_instance_dependence): Likewise.
812         (vect_enhance_data_refs_alignment): Likewise.
813         (vect_analyze_data_refs_alignment): Likewise.
814         (vect_slp_analyze_and_verify_instance_alignment
815         (vect_analyze_data_ref_accesses): Likewise.
816         (vect_prune_runtime_alias_test_list): Likewise.
817         (vect_analyze_data_refs): Likewise.
818         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
819         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
820         (vect_analyze_scalar_cycles_1): Likewise.
821         (vect_get_loop_niters): Likewise.
822         (vect_analyze_loop_form_1): Likewise.
823         (vect_update_vf_for_slp): Likewise.
824         (vect_analyze_loop_operations): Likewise.
825         (vect_analyze_loop): Likewise.
826         (vectorizable_induction): Likewise.
827         (vect_transform_loop): Likewise.
828         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
829         * tree-vect-slp.c (vect_analyze_slp): Likewise.
830         (vect_make_slp_decision): Likewise.
831         (vect_detect_hybrid_slp): Likewise.
832         (vect_slp_analyze_operations): Likewise.
833         (vect_slp_bb): Likewise.
834         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
835         (vectorizable_bswap): Likewise.
836         (vectorizable_call): Likewise.
837         (vectorizable_simd_clone_call): Likewise.
838         (vectorizable_conversion): Likewise.
839         (vectorizable_assignment): Likewise.
840         (vectorizable_shift): Likewise.
841         (vectorizable_operation): Likewise.
842         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
844 2018-06-18  Martin Sebor  <msebor@redhat.com>
846         PR tree-optimization/81384
847         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
848         * builtins.c (expand_builtin_strnlen): New function.
849         (expand_builtin): Call it.
850         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
851         * builtins.def (BUILT_IN_STRNLEN): New.
852         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
853         Warn for bounds in excess of maximum object size.
854         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
855         single-value ranges.  Handle strnlen.
856         (handle_builtin_strlen): Handle strnlen.
857         (strlen_check_and_optimize_stmt): Same.
858         * doc/extend.texi (Other Builtins): Document strnlen.
860 2018-06-18  Maya Rashish  <coypu@sdf.org>
862         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
863         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
864         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
866         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
867         here to ...
868         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
870 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
872         * tree.c (escaped_string::escape): Replace cast to char * by
873         const_cast<char *> (unescaped).
875 2018-06-18  Nick Clifton  <nickc@redhat.com>
877         PR 84195
878         * tree.c (escaped_string): New class.  Converts an unescaped
879         string into its escaped equivalent.
880         (warn_deprecated_use): Use the new class to convert the
881         deprecation message, if present.
882         (test_escaped_strings): New self test.
883         (test_c_tests): Add test_escaped_strings.
884         * doc/extend.texi (deprecated): Add a note that the
885         deprecation message is affected by the -fmessage-length
886         option, and that control characters will be escaped.
887         (#pragma GCC error): Document this pragma.
888         (#pragma GCC warning): Likewise.
889         * doc/invoke.texi (-fmessage-length): Document this option's
890         effect on the #warning and #error preprocessor directives and
891         the deprecated attribute.
893 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
895         * tree.c (decl_value_expr_lookup): Revert latest change.
896         (decl_value_expr_insert): Likewise.
898 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
900         * gimplify.c (nonlocal_vlas): Delete.
901         (nonlocal_vla_vars): Likewise.
902         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
903         referenced VLAs.
904         (gimplify_body): Do not create and destroy nonlocal_vlas.
905         * tree-nested.c: Include diagnostic.h.
906         (use_pointer_in_frame): Tweak.
907         (lookup_field_for_decl): Add assertion and declare the transformation.
908         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
909         internal error when the reference is in a wrong context.  Do not
910         create a debug decl by default.
911         (note_nonlocal_block_vlas): Delete.
912         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
913         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
914         create a debug decl by default.
915         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
916         call is in a wrong context.
917         (fixup_vla_decls): New function.
918         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
919         debug variables were created.
920         * tree.c (decl_value_expr_lookup): Add checking assertion.
921         (decl_value_expr_insert): Likewise.
923 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
925         PR middle-end/82479
926         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
927         * tree-scalar-evolution.c (interpret_expr): Likewise.
928         (expression_expensive_p): Likewise.
929         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
930         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
931         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
932         (ssa_defined_by_minus_one_stmt_p): New.
934 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
936         PR middle-end/64946
937         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
938         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
939         * dojump.c (do_jump): Likewise.
940         * expr.c (expand_expr_real_2): Check operand type's sign.
941         * fold-const.c (const_unop): Handle ABSU_EXPR.
942         (fold_abs_const): Likewise.
943         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
944         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
945         (strip_sign_op_1): Likesise.
946         * match.pd: Add new pattern to generate ABSU_EXPR.
947         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
948         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
949         * tree-eh.c (operation_could_trap_helper_p): Likewise.
950         * tree-inline.c (estimate_operator_cost): Likewise.
951         * tree-pretty-print.c (dump_generic_node): Likewise.
952         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
953         * tree.def (ABSU_EXPR): New.
955 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
957         PR middle-end/86095
958         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
959         documented as preserved for backward compatibility only.
960         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
962         PR rtl-optimization/86108
963         * bb-reorder.c (create_forwarder_block): Renamed to ...
964         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
965         jump from new landing pad to the second part.
966         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
967         Adjust callers.
969 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
971         PR middle-end/85878
972         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
973         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
974         Only call store_expr for halves if the mode is the same.
976         PR middle-end/86123
977         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
978         Fix up comment formatting.
980 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
982         * typed-splay-tree.h (typed_splay_tree::remove): New function.
983         (typed_splay_tree::closure,
984         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
985         (typed_splay_tree::typed_splay_tree,
986         typed_splay_tree::operator =): Declared private.
987         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
988         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
989         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
990         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
991         typed_splay_tree::splay_tree_splay,
992         typed_splay_tree::splay_tree_foreach_helper,
993         typed_splay_tree::splay_tree_insert,
994         typed_splay_tree::splay_tree_remove,
995         typed_splay_tree::splay_tree_lookup,
996         typed_splay_tree::splay_tree_predecessor,
997         typed_splay_tree::splay_tree_successor,
998         typed_splay_tree::splay_tree_min,
999         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1000         (typed_splay_tree::root, typed_splay_tree::comp,
1001         typed_splay_tree::delete_key,
1002         typed_splay_tree::delete_value): New data members.
1003         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1004         typed_splay_tree::remove.
1006 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
1008         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1009         -mginv and -mno-ginv to the assembler.
1010         * config/mips/mips.opt (-mcrc): New option.
1011         (-mginv): Likewise.
1012         * doc/invoke.text (-mcrc): Document.
1013         (-mginv): Likewise.
1015 2018-06-15  Nick Clifton  <nickc@redhat.com>
1017         PR 84195
1018         * tree.c (escaped_string): New class.  Converts an unescaped
1019         string into its escaped equivalent.
1020         (warn_deprecated_use): Use the new class to convert the
1021         deprecation message, if present.
1022         (test_escaped_strings): New self test.
1023         (test_c_tests): Add test_escaped_strings.
1024         * doc/extend.texi (deprecated): Add a note that the
1025         deprecation message is affected by the -fmessage-length
1026         option, and that control characters will be escaped.
1027         (#pragma GCC error): Document this pragma.
1028         (#pragma GCC warning): Likewise.
1029         * doc/invoke.texi (-fmessage-length): Document this option's
1030         effect on the #warning and #error preprocessor directives and
1031         the deprecated attribute.
1033 2018-06-15  Richard Biener  <rguenther@suse.de>
1035         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1036         here, also noting vector size used.
1037         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1038         size used in MSG_OPTIMIZED_LOCATIONS dump.
1039         (pass_slp_vectorize::execute): Adjust.
1041 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1043         PR target/85968
1044         * config/arc/arc.c (arc_return_address_register): Fix
1045         if-condition.
1047 2018-06-15  Richard Biener  <rguenther@suse.de>
1049         PR middle-end/86159
1050         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1051         leave useless conversion stripping to force_gimple_operand_gsi.
1052         (gimplify_build2): Likewise.
1053         (gimplify_build1): Likewise.
1055 2018-06-15  Richard Biener  <rguenther@suse.de>
1057         PR middle-end/86076
1058         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1059         before adjusting their block.
1061 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1063         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1064         multilibs for *-*-rtems*.
1065         * config/riscv/t-rtems: New file.
1067 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1069         PR middle-end/86122
1070         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1071         unsigned_type_for returns NULL.
1073         PR target/85945
1074         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1075         subregs of multi-word pseudos unless the float mode has word size.
1077 2018-06-14  Richard Biener  <rguenther@suse.de>
1079         PR middle-end/86139
1080         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1081         duplicate and harmful type_hash_canon.
1082         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1084 2018-06-14  Richard Biener  <rguenther@suse.de>
1086         PR ipa/86124
1087         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1088         NULL cgraph_node.
1090 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1092         * config/rtems.h (STDINT_LONG32): Define.
1094 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1095             Prachi Godbole  <prachi.godbole@imgtec.com>
1097         * config/mips/mips-cpus.def: Define P6600.
1098         * config/mips/mips-tables.opt: Regenerate.
1099         * config/mips/mips.c (mips_ucbranch_type): New enum.
1100         (mips_rtx_cost_data): Add support for P6600.
1101         (mips_issue_rate): Likewise.
1102         (mips_multipass_dfa_lookahead): Likewise.
1103         (mips_avoid_hazard): Likewise.
1104         (mips_reorg_process_insns): Likewise.
1105         (mips_classify_branch_p6600): New function.
1106         * config/mips/mips.h (TUNE_P6600): New define.
1107         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1108         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1109         * config/mips/mips.md: Include p6600.md.
1110         (processor): Add p6600.
1111         * config/mips/p6600.md: New file.
1112         * doc/invoke.texi: Add p6600 to supported architectures.
1114 2018-06-13  Martin Sebor  <msebor@redhat.com>
1116         PR tree-optimization/86114
1117         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1118         of integer types.
1119         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1121 2018-06-13  Richard Biener  <rguenther@suse.de>
1123         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1124         Properly set vector type of the intermediate stmt.
1125         * tree-vect-stmts.c (vectorizable_operation): The destination
1126         var always has vectype_out type.
1128 2018-06-13  Jeff Law  <law@redhat.com>
1130         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1131         integer 0 for argument to print_rtl_with_bb.
1132         (rl78_reorg): Likewise.
1134 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1136         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1137         from rtx to rtx_insn *.
1138         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1139         "label".
1140         (add_sched_insns_for_speculation): Likewise for local "target",
1141         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1142         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1143         from rtx_insn ** to rtx_code_label **.
1144         (reorg_emit_nops): Likewise.
1145         (c6x_reorg): Likewise for local "call_labels".
1146         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1147         rtx to rtx_insn *.
1148         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1149         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1150         the loops over LABEL_REFS.
1151         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1152         braf_label.
1153         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1154         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1155         (split_branches): Strengthen local "olabel" from rtx to
1156         rtx_insn *, adding a safe_as_a cast.
1157         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1158         to "rtx_insn *".
1159         (add_insn_after): Likewise for first two params.
1160         (add_insn_before): Likewise.
1161         (remove_insn): Likewise for param.
1162         (emit_pattern_before_noloc): Likewise for second and third params.
1163         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1164         (emit_call_insn_before_noloc): Likewise.
1165         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1166         to "rtx_insn *".
1167         (emit_barrier_before): Likewise.
1168         (emit_label_before): Strengthen "label" param from "rtx" to
1169         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1170         "rtx_insn *".
1171         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1172         "rtx_insn *".
1173         (emit_pattern_after_noloc): Likewise.
1174         (emit_insn_after_noloc): Likewise.
1175         (emit_jump_insn_after_noloc): Likewise.
1176         (emit_call_insn_after_noloc): Likewise.
1177         (emit_debug_insn_after_noloc): Likewise.
1178         (emit_barrier_after): Likewise.
1179         (emit_label_after): Likewise for both params.
1180         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1181         "loc" param from "int" to "location_t".
1182         (emit_insn_after_setloc): Likewise.
1183         (emit_jump_insn_after_setloc): Likewise.
1184         (emit_call_insn_after_setloc): Likewise.
1185         (emit_debug_insn_after_setloc): Likewise.
1186         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1187         "loc" param from "int" to "location_t".
1188         (emit_pattern_before): Convert NULL_RTX to NULL.
1189         (emit_insn_before_setloc): Convert "loc" param from "int" to
1190         "location_t".
1191         (emit_jump_insn_before_setloc): Likewise.
1192         (emit_call_insn_before_setloc): Likewise.
1193         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1194         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1195         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1196         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1197         Convert 3rd param from "int" to "location_t".
1198         (emit_barrier_before, emit_barrier_after, next_real_insn):
1199         Strengthen param from rtx to rtx_insn *.
1200         (emit_label_before): Strengthen 1st param from "rtx" to
1201         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1202         "rtx_insn *".
1203         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1204         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1205         Strengthen 2nd param from "rtx" to "rtx_insn *".
1206         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1207         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1208         Likewise. Convert 3rd param from "int" to "location_t".
1209         (emit_label_after): Strengthen 1st param from "rtx" to
1210         "rtx_code_label *".
1211         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1212         "rtx_insn *".
1213         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1214         from "rtx" to "rtx_insn *".
1216 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1218         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1219         bodies streamed in with -Q.
1220         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1221         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1222         * gimple-streamer-out.c: Include gimple-pretty-print.h
1223         (output_bb): Dump stmts streamed.
1224         * lto-section-out.c: Include print-tree.h
1225         (lto_begin_section): Dump sections created.
1226         (lto_output_decl_index): Dump decl encoded.
1227         * lto-streamer-out.c: Include print-tree.h
1228         (create_output_block): Dump output block created.
1229         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1230         (output_function): Dump function output.
1231         (output_constructor): Dump constructor streamed.
1232         (write_global_stream): Output indexes encoded.
1233         (produce_asm_for_decls): Dump streams encoded.
1234         * lto-streamer.c (streamer_dump_file): New global var.
1235         * lto-streamer.h (streamer_dump_file): Declare.
1236         * passes.c (ipa_write_summaries): Initialize streamer dump.
1237         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1238         in.
1240 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1242         PR target/86048
1243         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1244         offsets for register save directives.  Emit a second batch of save
1245         directives, if need be, when the function accesses prior frames.
1247 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1249         * config/arc/fpu.md (fmasf4): Force operand to register.
1250         (fnmasf4): Likewise.
1252 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1254         * config/arc/arc-protos.h (arc_pad_return): Remove.
1255         * config/arc/arc.c (machine_function): Remove force_short_suffix
1256         and size_reason.
1257         (arc_print_operand): Adjust printing of '&'.
1258         (arc_verify_short): Remove conditional printing of short suffix.
1259         (arc_final_prescan_insn): Remove reference to size_reason.
1260         (pad_return): New function.
1261         (arc_reorg): Call pad_return.
1262         (arc_pad_return): Remove.
1263         (arc_init_machine_status): Remove reference to force_short_suffix.
1264         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1265         (attr length): When attribute iscompact is true force to 2
1266         regardless; in the case of maybe check if we want to force the
1267         instruction to have 4 bytes length.
1268         (nopv): Change it to generate 4 byte long nop as well.
1269         (blockage): New pattern.
1270         (simple_return): Remove call to arc_pad_return.
1271         (p_return_i): Likewise.
1273 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1275         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1277 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1279         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1280         ARC cores.
1282 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1284         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1285         for ARC700 and ARCv2.
1287 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1289         PR target/86076
1290         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1291         operands[2] instead of operands[1].
1294 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1296         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1297         case, check whether the outer register overlaps an unallocatable
1298         register, not just whether it fits the required class.
1300 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1302         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1303         are poly_ints.
1304         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1305         (memrefs_conflict_p): Likewise.
1306         (init_alias_analysis): Likewise.
1307         * cfgexpand.c (expand_debug_expr): Likewise.
1308         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1309         * cse.c (fold_rtx): Likewise.
1310         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1311         * expr.c (emit_block_move_hints): Likewise.
1312         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1313         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1314         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1315         (emit_group_store): Likewise.
1316         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1317         to read the PRE/POST_MODIFY increment.
1318         * calls.c (store_one_arg): Use strip_offset.
1319         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1320         poly_int_rtx_p.
1321         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1322         by a VEC_SELECT.
1323         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1324         (simplify_binary_operation_1): Extend CONST_INT handling to
1325         poly_int_rtx_p.
1326         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1327         than a HOST_WIDE_INT.
1328         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1329         poly_int64.
1330         (adjust_mems, add_stores): Update accodingly.
1331         (vt_canonicalize_addr): Track polynomial offsets.
1332         (emit_note_insn_var_location): Likewise.
1333         (vt_add_function_parameter): Likewise.
1334         (vt_initialize): Likewise.
1336 2018-06-12  Jeff Law  <law@redhat.com>
1338         * config.gcc (alpha*-*-freebsd*): Remove.
1339         * config/alpha/freebsd.h: Remove.
1341 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1343         PR other/69968
1344         * spellcheck-tree.c (levenshtein_distance): Rename to...
1345         (get_edit_distance): ...this, and update for underlying renaming.
1346         * spellcheck-tree.h (levenshtein_distance): Rename to...
1347         (get_edit_distance): ...this.
1348         * spellcheck.c (levenshtein_distance): Rename to...
1349         (get_edit_distance): ...this.  Convert from Levenshtein distance
1350         to Damerau-Levenshtein distance by supporting transpositions of
1351         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1352         "v_one_ago".
1353         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1354         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1355         update for underlying renaming.
1356         (selftest::levenshtein_distance_unit_test): Rename to...
1357         (selftest::test_get_edit_distance_unit): ...this, and update for
1358         underlying renaming.
1359         (selftest::test_find_closest_string): Add example from PR 69968
1360         where transposition helps
1361         (selftest::test_metric_conditions): Update for renaming.
1362         (selftest::test_metric_conditions): Likewise.
1363         (selftest::spellcheck_c_tests): Likewise.
1364         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1365         (get_edit_distance): ...this.
1366         (best_match::consider): Update for renaming.
1368 2018-06-12  Martin Sebor  <msebor@redhat.com>
1370         PR tree-optimization/85259
1371         * builtins.c (compute_objsize): Handle constant offsets.
1372         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1373         true iff a warning has been issued.
1374         * gimple.h (gimple_nonartificial_location): New function.
1375         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1376         gimple_nonartificial_location and handle -Wno-system-headers.
1377         (handle_builtin_stxncpy): Same.
1379 2018-06-12  Martin Sebor  <msebor@redhat.com>
1381         PR c/85931
1382         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1384 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1386         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1387         BUILTIN_VEC_XST entries for pointer to double and long long.
1389 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1391         PR target/85990
1392         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1393         Update comments.
1394         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1395         Likewise.
1397 2018-06-12  Martin Liska  <mliska@suse.cz>
1399         * doc/options.texi: Document IntegerRange.
1401 2018-06-12  Martin Liska  <mliska@suse.cz>
1403         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1404         * opt-functions.awk: Handle Deprecated flag.
1405         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1406         and report error.
1407         (read_cmdline_option): Report warning for a deprecated option.
1408         * opts.h (struct cl_option): Add new field cl_deprecated.
1409         (CL_ERR_DEPRECATED): New.
1411 2018-06-12  Martin Liska  <mliska@suse.cz>
1413         * doc/options.texi: Document Deprecated option flag.
1415 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1417         * config/arc/arc-arch.h (arc_extras): New enum.
1418         (arc_cpu_t):Add field extra.
1419         (arc_cpu_types): Consider the extras.
1420         * config/arc/arc-cpus.def: Add extras info.
1421         * config/arc/arc-opts.h (processor_type): Consider extra field.
1422         * config/arc/arc.c (arc_override_options): Handle extra field.
1424 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1426         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1427         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1428         field.
1429         * config/arc/arc.c (arc_init): Update pic warning.
1430         (irq_range): Update irq range parsing warnings.
1431         (arc_override_options): Update various warning messages.
1432         (arc_handle_aux_attribute): Likewise.
1434 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1436         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1438 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1440         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1441         compiler messages directives.
1443 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1445         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1446         * config/mips/mips-tables.opt: Regenerate.
1447         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1448         mips64r6.
1449         * doc/invoke.texi: Document -march=i6500.
1451 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1453         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1454         (i6400_gpmul): Add cpu_unit.
1455         (i6400_gpdiv): Likewise.
1456         (i6400_msa_add_d): Update reservations.
1457         (i6400_msa_int_add) Likewise.
1458         (i6400_msa_short_logic3) Likewise.
1459         (i6400_msa_short_logic2) Likewise.
1460         (i6400_msa_short_logic) Likewise.
1461         (i6400_msa_move) Likewise.
1462         (i6400_msa_cmp) Likewise.
1463         (i6400_msa_short_float2) Likewise.
1464         (i6400_msa_div_d) Likewise.
1465         (i6400_msa_long_logic1) Likewise.
1466         (i6400_msa_long_logic2) Likewise.
1467         (i6400_msa_mult) Likewise.
1468         (i6400_msa_long_float2) Likewise.
1469         (i6400_msa_long_float4) Likewise.
1470         (i6400_msa_long_float5) Likewise.
1471         (i6400_msa_long_float8) Likewise.
1472         (i6400_fpu_fadd): Include frint type.
1473         (i6400_fpu_store): New define_insn_reservation.
1474         (i6400_fpu_load): Likewise.
1475         (i6400_fpu_move): Likewise.
1476         (i6400_fpu_fcmp): Likewise.
1477         (i6400_fpu_fmadd): Likewise.
1478         (i6400_int_mult): Include imul3nc type and update reservation.
1479         (i6400_int_div): Include idiv3 type and update reservation.
1480         (i6400_int_load): Update to check type not move_type.
1481         (i6400_int_store): Likewise.
1482         (i6400_int_prefetch): Set zero latency.
1484 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1486         * gcc.c: Document new %@{...} sequence.
1487         (LINK_COMMAND_SPEC): Use it for the -L switches.
1488         (cpp_unique_options): Use it for the -I switches.
1489         (at_file_argbuf): New global variable.
1490         (in_at_file): Likewise.
1491         (alloc_args): Create at_file_argbuf.
1492         (clear_args): Truncate at_file_argbuf.
1493         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1494         (open_at_file): New function.
1495         (close_at_file): Likewise.
1496         (create_at_file): Delete.
1497         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1498         <'o'>: Likewise.
1499         <'@'>: New case.
1500         (validate_switches_from_spec): Deal with %@{...} sequence.
1501         (validate_switches): Likewise.
1502         (driver::finalize): Call clear_args.
1504 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1506         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1508 2018-06-11  Martin Sebor  <msebor@redhat.com>
1510         * doc/invoke.texi (-Wall): List -Wc++17-compat.
1511         (Wno-class-memaccess): Add @opindex.
1512         (Wno-templates, Wno-multiple-inheritance): Same.
1513         (Wno-virtual-inheritance, Wno-namespaces): Same.
1514         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1515         (Wno-format-overflow, Wno-format-truncation): Same.
1516         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1517         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1518         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1519         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1520         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1521         (Wno-misspelled-isr): Same.
1523 2018-06-11  Martin Sebor  <msebor@redhat.com>
1525         * PR tree-optimization/86083
1526         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1528 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1530         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1532 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
1534         PR target/85755
1535         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1536         on the correct operand.
1537         (*movdi_internal64): Ditto.
1539 2018-06-11  Martin Liska  <mliska@suse.cz>
1541         PR tree-optimization/86089
1542         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1544 2018-06-11  Julia Koval  <julia.koval@intel.com>
1546         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1547         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1548         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
1550 2018-06-11  Olivier Hainque  <hainque@adacore.com>
1552         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
1553         for Ada with strict dwarf2.
1555 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
1557         PR target/85755
1558         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
1559         addresses.
1561 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
1563         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
1565 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
1567         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
1568         TARGET_ELF.
1570 2018-06-08  Martin Liska  <mliska@suse.cz>
1572         * tree-cfg.h (debug_function): Fix argument type to match
1573         implementation.
1575 2018-06-08  Martin Liska  <mliska@suse.cz>
1577         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
1578         Remove usage of MPX-related (and removed) fields.
1579         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
1581 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
1583         * cfg.c (debug): Use TDF_NONE rather than 0.
1584         * cfghooks.c (debug): Likewise.
1585         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
1586         (struct dump_option_value_info): Convert to...
1587         (struct kv_pair): ...this template type.
1588         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
1589         rather than 0.
1590         (optinfo_verbosity_options): Likewise.
1591         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
1592         OPTGROUP_NONE.
1593         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
1594         than int for "optgroup_flags" param.
1595         (dump_generic_expr_loc): Use dump_flags_t rather than int for
1596         "dump_kind" param.
1597         (dump_dec): Likewise.
1598         (dump_finish): Use TDF_NONE rather than 0.
1599         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
1600         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
1601         than 0.  Update for change to option_ptr.
1602         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
1603         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
1604         0.  Update for changes to optinfo_verbosity_options and
1605         optgroup_options.
1606         (opt_info_switch_p): Convert optgroup_flags from int to
1607         optgroup_flags_t.
1608         (dump_basic_block): Use dump_flags_t rather than int
1609         for "dump_kind" param.
1610         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
1611         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
1612         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
1613         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
1614         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
1615         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
1616         TDF_NONE): Convert from macros to...
1617         (enum dump_flag): ...this new enum.
1618         (dump_flags_t): Update to use enum.
1619         (operator|, operator&, operator~, operator|=, operator&=):
1620         Implement for dump_flags_t.
1621         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
1622         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
1623         Convert from macros to...
1624         (enum optgroup_flag): ...this new enum.
1625         (optgroup_flags_t): New typedef.
1626         (operator|, operator|=): Implement for optgroup_flags_t.
1627         (struct dump_file_info): Convert field "alt_flags" to
1628         dump_flags_t.  Convert field "optgroup_flags" to
1629         optgroup_flags_t.
1630         (dump_basic_block): Use dump_flags_t rather than int for param.
1631         (dump_generic_expr_loc): Likewise.
1632         (dump_dec): Likewise.
1633         (dump_register): Convert param "optgroup_flags" to
1634         optgroup_flags_t.
1635         (opt_info_enable_passes): Likewise.
1636         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
1637         than 0.
1638         * gimple-pretty-print.c (debug): Likewise.
1639         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
1640         (merged_store_group::apply_stores): Likewise.
1641         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
1642         * gimple.c (verify_gimple_pp): Likewise.
1643         * graphite-poly.c (print_pbb_body): Likewise.
1644         * passes.c (pass_manager::register_one_dump_file): Convert
1645         local "optgroup_flags" to optgroup_flags_t.
1646         * print-tree.c (print_node): Use TDF_NONE rather than 0.
1647         (debug): Likewise.
1648         (debug_body): Likewise.
1649         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
1650         to optgroup_flags_t.
1651         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
1652         than 0.
1653         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
1654         (convert_mult_to_fma): Likewise.
1655         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
1656         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
1657         * tree-vect-data-refs.c (dump_lower_bound): Convert param
1658         "dump_kind" to dump_flags_t.
1660 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1662         * config/rs6000/rs6000.c (min, max): Delete.
1664 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
1666         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
1667         -mabi=spe and -mabi=no-spe.
1669 2018-06-08  Martin Liska  <mliska@suse.cz>
1671         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
1672         where we expect an existing summary.
1674 2018-06-08  Martin Liska  <mliska@suse.cz>
1676         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
1677         * ipa-inline.h (estimate_edge_growth): Likewise.
1679 2018-06-08  Martin Liska  <mliska@suse.cz>
1681         * cgraph.c (function_version_hasher::hash): Use
1682         cgraph_node::get_uid ().
1683         (function_version_hasher::equal):
1684         * cgraph.h (cgraph_node::get_uid): New method.
1685         * ipa-inline.c (update_caller_keys): Use
1686         cgraph_node::get_uid ().
1687         (update_callee_keys): Likewise.
1688         * ipa-utils.c (searchc): Likewise.
1689         (ipa_reduced_postorder): Likewise.
1690         * lto-cgraph.c (input_node): Likewise.
1691         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
1692         * symbol-summary.h (symtab_insertion): Likewise.
1693         (symtab_removal): Likewise.
1694         (symtab_duplication): Likewise.
1695         * tree-pretty-print.c (dump_function_header): Likewise.
1696         * tree-sra.c (convert_callers_for_node): Likewise.
1698 2018-06-08  Martin Liska  <mliska@suse.cz>
1700         * cgraph.c (symbol_table::create_edge): Always assign a new
1701         unique number.
1702         (symbol_table::free_edge): Do not recycle numbers.
1703         * cgraph.h (cgraph_edge::get): New method.
1704         * symbol-summary.h (symtab_removal): Use it.
1705         (symtab_duplication): Likewise.
1706         (call_summary::hashable_uid): Remove.
1708 2018-06-08  Martin Liska  <mliska@suse.cz>
1710         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
1711         (initialize_growth_caches): Remove.
1712         (free_growth_caches): Likewise.
1713         (do_estimate_edge_time): Use edge_growth_cache.
1714         (do_estimate_edge_size): Likewise.
1715         (do_estimate_edge_hints): Likewise.
1716         * ipa-inline.c (reset_edge_caches): Likewise.
1717         (recursive_inlining): Likewise.
1718         (inline_small_functions): Likewise.
1719         * ipa-inline.h (initialize_growth_caches): Remove.
1720         (estimate_edge_size): Likewise.
1721         (estimate_edge_time): Likewise.
1722         (estimate_edge_hints): Likewise.
1723         (reset_edge_growth_cache): Likewise.
1724         * symbol-summary.h (call_summary::remove): New method.
1726 2018-06-08  Martin Liska  <mliska@suse.cz>
1728         * ipa-cp.c (class edge_clone_summary): New summary.
1729         (grow_edge_clone_vectors): Remove.
1730         (ipcp_edge_duplication_hook): Remove.
1731         (class edge_clone_summary_t): New call_summary class.
1732         (ipcp_edge_removal_hook): Remove.
1733         (edge_clone_summary_t::duplicate): New function.
1734         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
1735         (create_specialized_node): Likewise.
1736         (ipcp_driver): Initialize edge_clone_summaries and do not
1737         register hooks.
1739 2018-06-08  Martin Liska  <mliska@suse.cz>
1741         * symbol-summary.h (get): New function.
1742         (call_summary::m_initialize_when_cloning): New class member.
1744 2018-06-08  Martin Liska  <mliska@suse.cz>
1746         * cgraph.c (cgraph_node::remove): Do not recycle uid.
1747         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
1748         (symbol_table::allocate_cgraph_symbol): Do not set uid.
1749         * passes.c (uid_hash_t): Record removed_nodes by their uids.
1750         (remove_cgraph_node_from_order): Use the removed_nodes set.
1751         (do_per_function_toporder): Likwise.
1752         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
1753         instead of summary_uid.
1754         (symtab_removal): Likewise.
1755         (symtab_duplication): Likewise.
1757 2018-06-08  Martin Liska  <mliska@suse.cz>
1759         * ipa-cp.c (ipcp_store_bits_results): Use
1760         ipcp_transformation_sum.
1761         (ipcp_store_vr_results): Likewise.
1762         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
1763         to ...
1764         (ipcp_transformation_initialize): ... this.
1765         (ipa_set_node_agg_value_chain):
1766         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
1767         (write_ipcp_transformation_info): Likewise.
1768         (read_ipcp_transformation_info): Likewise.
1769         (ipcp_update_bits): Likewise.
1770         (ipcp_update_vr): Likewise.
1771         (ipcp_transform_function): Likewise.
1772         * ipa-prop.h: Rename ipcp_transformation_summary to
1773         ipcp_transformation.
1774         (class ipcp_transformation_t): New function summary.
1775         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
1776         (ipa_get_agg_replacements_for_node): Likewise.
1778 2018-06-08  Martin Liska  <mliska@suse.cz>
1780         * ipa-pure-const.c (struct funct_state_d): Do it class instead
1781         of struct.
1782         (class funct_state_summary_t): New function_summary class.
1783         (has_function_state): Remove.
1784         (get_function_state): Likewise.
1785         (set_function_state): Likewise.
1786         (add_new_function): Likewise.
1787         (funct_state_summary_t::insert): New function.
1788         (duplicate_node_data): Remove.
1789         (remove_node_data): Remove.
1790         (funct_state_summary_t::duplicate): New function.
1791         (register_hooks): Create new funct_state_summaries.
1792         (pure_const_generate_summary): Use it.
1793         (pure_const_write_summary): Likewise.
1794         (pure_const_read_summary): Likewise.
1795         (propagate_pure_const): Likewise.
1796         (propagate_nothrow): Likewise.
1797         (dump_malloc_lattice): Likewise.
1798         (propagate_malloc): Likewise.
1799         (execute): Do not register hooks, just remove summary
1800         instead.
1801         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
1802         constructor.
1804 2018-06-08  Martin Liska  <mliska@suse.cz>
1806         * ipa-reference.c (remove_node_data): Remove.
1807         (duplicate_node_data): Likewise.
1808         (class ipa_ref_var_info_summary_t): New class.
1809         (class ipa_ref_opt_summary_t): Likewise.
1810         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
1811         (get_reference_optimization_summary): Use
1812         ipa_ref_opt_sum_summaries.
1813         (set_reference_vars_info): Remove.
1814         (set_reference_optimization_summary): Likewise.
1815         (ipa_init): Create summaries.
1816         (init_function_info): Use function summary.
1817         (ipa_ref_opt_summary_t::duplicate): New function.
1818         (ipa_ref_opt_summary_t::remove): New function.
1819         (get_read_write_all_from_node): Fix GNU coding style.
1820         (propagate): Use function summary.
1821         (write_node_summary_p): Fix GNU coding style.
1822         (stream_out_bitmap): Likewise.
1823         (ipa_reference_read_optimization_summary): Use function summary.
1824         (ipa_reference_c_finalize): Do not release hooks.
1826 2018-06-08  Martin Liska  <mliska@suse.cz>
1828         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
1829         (analyze_function_body): Extract multiple calls of get_create.
1830         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1831         * ipa-inline.c (recursive_inlining): Use ::get method.
1832         * ipa-inline.h (estimate_edge_growth): Likewise.
1834 2018-06-08  Martin Liska  <mliska@suse.cz>
1836         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
1837         HSA_INVALID.
1838         (hsa_function_summary::hsa_function_summary): Use the new enum
1839         value.
1840         (hsa_gpu_implementation_p): Use hsa_summaries::get.
1841         * hsa-gen.c (hsa_get_host_function): Likewise.
1842         (get_brig_function_name): Likewise.
1843         * ipa-hsa.c (process_hsa_functions): Likewise.
1844         (ipa_hsa_write_summary): Likewise.
1845         * symbol-summary.h (symtab_duplication): Use ::get function/
1846         (get): New function.
1848 2018-06-08  Martin Liska  <mliska@suse.cz>
1850         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
1851         of get.
1852         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
1853         (hsa_register_kernel): Likewise.
1854         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
1855         * hsa-gen.c (hsa_get_host_function): Likewise.
1856         (get_brig_function_name): Likewise.
1857         (generate_hsa): Likewise.
1858         (pass_gen_hsail::execute): Likewise.
1859         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1860         (devirtualization_time_bonus): Likewise.
1861         (ipcp_propagate_stage): Likewise.
1862         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1863         (edge_set_predicate): Likewise.
1864         (evaluate_conditions_for_known_args): Likewise.
1865         (evaluate_properties_for_edge): Likewise.
1866         (ipa_fn_summary::reset): Likewise.
1867         (ipa_fn_summary_t::duplicate): Likewise.
1868         (dump_ipa_call_summary): Likewise.
1869         (ipa_dump_fn_summary): Likewise.
1870         (analyze_function_body): Likewise.
1871         (compute_fn_summary): Likewise.
1872         (estimate_edge_devirt_benefit): Likewise.
1873         (estimate_edge_size_and_time): Likewise.
1874         (estimate_calls_size_and_time): Likewise.
1875         (estimate_node_size_and_time): Likewise.
1876         (inline_update_callee_summaries): Likewise.
1877         (remap_edge_change_prob): Likewise.
1878         (remap_edge_summaries): Likewise.
1879         (ipa_merge_fn_summary_after_inlining): Likewise.
1880         (ipa_update_overall_fn_summary): Likewise.
1881         (read_ipa_call_summary): Likewise.
1882         (inline_read_section): Likewise.
1883         (write_ipa_call_summary): Likewise.
1884         (ipa_fn_summary_write): Likewise.
1885         (ipa_free_fn_summary): Likewise.
1886         * ipa-hsa.c (process_hsa_functions): Likewise.
1887         (ipa_hsa_write_summary): Likewise.
1888         (ipa_hsa_read_section): Likewise.
1889         * ipa-icf.c (sem_function::merge): Likewise.
1890         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
1891         (do_estimate_edge_time): Likewise.
1892         (estimate_size_after_inlining): Likewise.
1893         (estimate_growth): Likewise.
1894         (growth_likely_positive): Likewise.
1895         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1896         (inline_call): Likewise.
1897         * ipa-inline.c (caller_growth_limits): Likewise.
1898         (can_inline_edge_p): Likewise.
1899         (can_inline_edge_by_limits_p): Likewise.
1900         (compute_uninlined_call_time): Likewise.
1901         (compute_inlined_call_time): Likewise.
1902         (want_inline_small_function_p): Likewise.
1903         (edge_badness): Likewise.
1904         (update_caller_keys): Likewise.
1905         (update_callee_keys): Likewise.
1906         (recursive_inlining): Likewise.
1907         (inline_small_functions): Likewise.
1908         (inline_to_all_callers_1): Likewise.
1909         (dump_overall_stats): Likewise.
1910         (early_inline_small_functions): Likewise.
1911         (early_inliner): Likewise.
1912         * ipa-inline.h (estimate_edge_growth): Likewise.
1913         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1914         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1915         * ipa-prop.h (IPA_NODE_REF): Likewise.
1916         (IPA_EDGE_REF): Likewise.
1917         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1918         (propagate_malloc): Likewise.
1919         * ipa-split.c (execute_split_functions): Likewise.
1920         * symbol-summary.h: Rename get to get_create.
1921         (get): Likewise.
1922         (get_create): Likewise.
1923         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1925 2018-06-08  Martin Liska  <mliska@suse.cz>
1927         * symbol-summary.h (release): Move definition out of class
1928         declaration.
1929         (symtab_removal): Likewise.
1930         (symtab_duplication): Likewise.
1932 2018-06-08  Martin Liska  <mliska@suse.cz>
1934         * symbol-summary.h (function_summary): Move constructor
1935         implementation out of class declaration.
1936         (release): Likewise.
1937         (symtab_insertion): Likewise.
1938         (symtab_removal): Likewise.
1939         (symtab_duplication): Likewise.
1940         (get): Likewise.
1942 2018-06-08  Martin Liska  <mliska@suse.cz>
1944         * Makefile.in: Remove support for MPX (macros, related functions,
1945         fields in cgraph_node, ...).
1946         * builtin-types.def (BT_BND): Likewise.
1947         (BT_FN_BND_CONST_PTR): Likewise.
1948         (BT_FN_CONST_PTR_BND): Likewise.
1949         (BT_FN_VOID_PTR_BND): Likewise.
1950         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
1951         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
1952         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
1953         (expand_builtin_mempcpy_with_bounds): Likewise.
1954         (expand_builtin_memset_with_bounds): Likewise.
1955         (expand_builtin_memset_args): Likewise.
1956         (std_expand_builtin_va_start): Likewise.
1957         (expand_builtin): Likewise.
1958         (expand_builtin_with_bounds): Likewise.
1959         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
1960         (DEF_LIB_BUILTIN_CHKP): Likewise.
1961         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
1962         (DEF_CHKP_BUILTIN): Likewise.
1963         (BUILT_IN_MEMCPY): Likewise.
1964         (BUILT_IN_MEMMOVE): Likewise.
1965         (BUILT_IN_MEMPCPY): Likewise.
1966         (BUILT_IN_MEMSET): Likewise.
1967         (BUILT_IN_STPCPY): Likewise.
1968         (BUILT_IN_STRCAT): Likewise.
1969         (BUILT_IN_STRCHR): Likewise.
1970         (BUILT_IN_STRCPY): Likewise.
1971         (BUILT_IN_STRLEN): Likewise.
1972         (BUILT_IN_MEMCPY_CHK): Likewise.
1973         (BUILT_IN_MEMMOVE_CHK): Likewise.
1974         (BUILT_IN_MEMPCPY_CHK): Likewise.
1975         (BUILT_IN_MEMSET_CHK): Likewise.
1976         (BUILT_IN_STPCPY_CHK): Likewise.
1977         (BUILT_IN_STRCAT_CHK): Likewise.
1978         (BUILT_IN_STRCPY_CHK): Likewise.
1979         * calls.c (store_bounds): Likewise.
1980         (emit_call_1): Likewise.
1981         (special_function_p): Likewise.
1982         (maybe_warn_nonstring_arg): Likewise.
1983         (initialize_argument_information): Likewise.
1984         (finalize_must_preallocate): Likewise.
1985         (compute_argument_addresses): Likewise.
1986         (expand_call): Likewise.
1987         * cfgexpand.c (expand_call_stmt): Likewise.
1988         (expand_return): Likewise.
1989         (expand_gimple_stmt_1): Likewise.
1990         (pass_expand::execute): Likewise.
1991         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
1992         (cgraph_node::remove): Likewise.
1993         (cgraph_node::dump): Likewise.
1994         (cgraph_node::verify_node): Likewise.
1995         * cgraph.h (chkp_function_instrumented_p): Likewise.
1996         (symtab_node::get_alias_target): Likewise.
1997         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
1998         (cgraph_local_p): Likewise.
1999         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2000         (cgraph_edge::rebuild_references): Likewise.
2001         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2002         (walk_polymorphic_call_targets): Likewise.
2003         (cgraph_node::expand_thunk): Likewise.
2004         (symbol_table::output_weakrefs): Likewise.
2005         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2006         (ix86_handle_option): Likewise.
2007         * config/i386/constraints.md: Likewise.
2008         * config/i386/i386-builtin-types.def (BND): Likewise.
2009         (VOID): Likewise.
2010         (PVOID): Likewise.
2011         (ULONG): Likewise.
2012         * config/i386/i386-builtin.def (BDESC_END): Likewise.
2013         (BDESC_FIRST): Likewise.
2014         (BDESC): Likewise.
2015         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2016         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2017         * config/i386/i386.c (enum reg_class): Likewise.
2018         (ix86_target_string): Likewise.
2019         (ix86_option_override_internal): Likewise.
2020         (ix86_conditional_register_usage): Likewise.
2021         (ix86_valid_target_attribute_inner_p): Likewise.
2022         (ix86_set_indirect_branch_type): Likewise.
2023         (ix86_set_current_function): Likewise.
2024         (ix86_function_arg_regno_p): Likewise.
2025         (init_cumulative_args): Likewise.
2026         (ix86_function_arg_advance): Likewise.
2027         (ix86_function_arg): Likewise.
2028         (ix86_pass_by_reference): Likewise.
2029         (ix86_function_value_regno_p): Likewise.
2030         (ix86_function_value_1): Likewise.
2031         (ix86_function_value_bounds): Likewise.
2032         (ix86_return_in_memory): Likewise.
2033         (ix86_setup_incoming_vararg_bounds): Likewise.
2034         (ix86_va_start): Likewise.
2035         (indirect_thunk_need_prefix): Likewise.
2036         (print_reg): Likewise.
2037         (ix86_print_operand): Likewise.
2038         (ix86_expand_call): Likewise.
2039         (ix86_output_function_return): Likewise.
2040         (reg_encoded_number): Likewise.
2041         (BDESC_VERIFYS): Likewise.
2042         (ix86_init_mpx_builtins): Likewise.
2043         (ix86_init_builtins): Likewise.
2044         (ix86_emit_cmove): Likewise.
2045         (ix86_emit_move_max): Likewise.
2046         (ix86_expand_builtin): Likewise.
2047         (ix86_builtin_mpx_function): Likewise.
2048         (ix86_get_arg_address_for_bt): Likewise.
2049         (ix86_load_bounds): Likewise.
2050         (ix86_store_bounds): Likewise.
2051         (ix86_load_returned_bounds): Likewise.
2052         (ix86_store_returned_bounds): Likewise.
2053         (ix86_class_likely_spilled_p): Likewise.
2054         (ix86_hard_regno_mode_ok): Likewise.
2055         (x86_order_regs_for_local_alloc): Likewise.
2056         (ix86_mitigate_rop): Likewise.
2057         (ix86_bnd_prefixed_insn_p): Likewise.
2058         (ix86_mpx_bound_mode): Likewise.
2059         (ix86_make_bounds_constant): Likewise.
2060         (ix86_initialize_bounds): Likewise.
2061         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2062         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2063         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2064         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2065         (TARGET_CHKP_BOUND_MODE): Likewise.
2066         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2067         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2068         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2069         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2070         * config/i386/i386.h (TARGET_MPX): Likewise.
2071         (TARGET_MPX_P): Likewise.
2072         (VALID_BND_REG_MODE): Likewise.
2073         (FIRST_BND_REG): Likewise.
2074         (LAST_BND_REG): Likewise.
2075         (enum reg_class): Likewise.
2076         (BND_REG_P): Likewise.
2077         (BND_REGNO_P): Likewise.
2078         (BNDmode): Likewise.
2079         (ADJUST_INSN_LENGTH): Likewise.
2080         * config/i386/i386.md: Likewise.
2081         * config/i386/i386.opt: Likewise.
2082         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2083         (defined): Likewise.
2084         (LINK_MPX): Likewise.
2085         (MPX_SPEC): Likewise.
2086         (LIBMPX_SPEC): Likewise.
2087         (LIBMPXWRAPPERS_SPEC): Likewise.
2088         (CHKP_SPEC): Likewise.
2089         * config/i386/predicates.md: Likewise.
2090         * dbxout.c (dbxout_type): Likewise.
2091         * doc/extend.texi: Likewise.
2092         * doc/invoke.texi: Likewise.
2093         * doc/md.texi: Likewise.
2094         * doc/tm.texi: Likewise.
2095         * doc/tm.texi.in: Likewise.
2096         * dwarf2out.c (is_base_type): Likewise.
2097         (gen_formal_types_die): Likewise.
2098         (gen_subprogram_die): Likewise.
2099         (gen_type_die_with_usage): Likewise.
2100         (gen_decl_die): Likewise.
2101         (dwarf2out_late_global_decl): Likewise.
2102         * expr.c (expand_assignment): Likewise.
2103         (emit_storent_insn): Likewise.
2104         (store_expr_with_bounds): Likewise.
2105         (store_expr): Likewise.
2106         (expand_expr_real_1): Likewise.
2107         * expr.h (store_expr_with_bounds): Likewise.
2108         * function.c (use_register_for_decl): Likewise.
2109         (struct bounds_parm_data): Likewise.
2110         (assign_parms_augmented_arg_list): Likewise.
2111         (assign_parm_find_entry_rtl): Likewise.
2112         (assign_parm_is_stack_parm): Likewise.
2113         (assign_parm_load_bounds): Likewise.
2114         (assign_bounds): Likewise.
2115         (assign_parms): Likewise.
2116         (expand_function_start): Likewise.
2117         * gcc.c (CHKP_SPEC): Likewise.
2118         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2119         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2120         (wrestrict_dom_walker::check_call): Likewise.
2121         * gimple.c (gimple_build_call_from_tree): Likewise.
2122         * gimple.h (enum gf_mask): Likewise.
2123         (gimple_call_with_bounds_p): Likewise.
2124         (gimple_call_set_with_bounds): Likewise.
2125         * gimplify.c (gimplify_init_constructor): Likewise.
2126         * ipa-cp.c (initialize_node_lattices): Likewise.
2127         (propagate_constants_across_call): Likewise.
2128         (find_more_scalar_values_for_callers_subset): Likewise.
2129         * ipa-hsa.c (process_hsa_functions): Likewise.
2130         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2131         * ipa-icf.c (sem_function::merge): Likewise.
2132         * ipa-inline.c (early_inliner): Likewise.
2133         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2134         (warn_function_cold): Likewise.
2135         (propagate_pure_const): Likewise.
2136         * ipa-ref.h (enum GTY): Likewise.
2137         * ipa-split.c (find_retbnd): Likewise.
2138         (consider_split): Likewise.
2139         (split_function): Likewise.
2140         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2141         * ipa.c (walk_polymorphic_call_targets): Likewise.
2142         (symbol_table::remove_unreachable_nodes): Likewise.
2143         (process_references): Likewise.
2144         (cgraph_build_static_cdtor_1): Likewise.
2145         * lto-cgraph.c (lto_output_node): Likewise.
2146         (output_refs): Likewise.
2147         (compute_ltrans_boundary): Likewise.
2148         (input_overwrite_node): Likewise.
2149         (input_node): Likewise.
2150         (input_cgraph_1): Likewise.
2151         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2152         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2153         (class pass_chkp_instrumentation_passes): Likewise.
2154         (make_pass_chkp_instrumentation_passes): Likewise.
2155         * passes.def: Likewise.
2156         * rtl.h (struct GTY): Likewise.
2157         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2158         * stor-layout.c (layout_type): Likewise.
2159         * symtab.c: Likewise.
2160         * target.def: Likewise.
2161         * targhooks.c (default_chkp_bound_type): Likewise.
2162         (default_chkp_bound_mode): Likewise.
2163         (default_builtin_chkp_function): Likewise.
2164         (default_chkp_function_value_bounds): Likewise.
2165         (default_chkp_make_bounds_constant): Likewise.
2166         (default_chkp_initialize_bounds): Likewise.
2167         * targhooks.h (default_chkp_bound_type): Likewise.
2168         (default_chkp_bound_mode): Likewise.
2169         (default_builtin_chkp_function): Likewise.
2170         (default_chkp_function_value_bounds): Likewise.
2171         (default_chkp_make_bounds_constant): Likewise.
2172         (default_chkp_initialize_bounds): Likewise.
2173         * toplev.c (compile_file): Likewise.
2174         (process_options): Likewise.
2175         * tree-core.h (DEF_BUILTIN): Likewise.
2176         (DEF_BUILTIN_CHKP): Likewise.
2177         * tree-inline.c (declare_return_variable): Likewise.
2178         (remap_gimple_stmt): Likewise.
2179         (copy_bb): Likewise.
2180         (initialize_inlined_parameters): Likewise.
2181         (expand_call_inline): Likewise.
2182         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2183         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2184         (make_pass_ipa_chkp_produce_thunks): Likewise.
2185         (make_pass_chkp): Likewise.
2186         (make_pass_chkp_opt): Likewise.
2187         (make_pass_chkp_instrumentation_passes): Likewise.
2188         * tree-pretty-print.c (dump_generic_node): Likewise.
2189         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2190         * tree-ssa-dce.c (propagate_necessity): Likewise.
2191         (eliminate_unnecessary_stmts): Likewise.
2192         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2193         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2194         * tree-ssa-sccvn.h: Likewise.
2195         * tree-ssa-strlen.c (get_string_length): Likewise.
2196         (valid_builtin_call): Likewise.
2197         (adjust_last_stmt): Likewise.
2198         (handle_builtin_strchr): Likewise.
2199         (handle_builtin_strcpy): Likewise.
2200         (handle_builtin_stxncpy): Likewise.
2201         (handle_builtin_memcpy): Likewise.
2202         (handle_builtin_strcat): Likewise.
2203         (strlen_check_and_optimize_stmt): Likewise.
2204         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2205         * tree-streamer-in.c: Likewise.
2206         * tree-streamer.c (record_common_node): Likewise.
2207         * tree.c (tree_code_size): Likewise.
2208         (wide_int_to_tree_1): Likewise.
2209         (type_contains_placeholder_1): Likewise.
2210         (build_common_tree_nodes): Likewise.
2211         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2212         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2213         (POINTER_BOUNDS_P): Likewise.
2214         (BOUNDED_TYPE_P): Likewise.
2215         (BOUNDED_P): Likewise.
2216         (CALL_WITH_BOUNDS_P): Likewise.
2217         (pointer_bounds_type_node): Likewise.
2218         * value-prof.c (gimple_ic): Likewise.
2219         * var-tracking.c (vt_add_function_parameters): Likewise.
2220         * varasm.c (make_decl_rtl): Likewise.
2221         (assemble_start_function): Likewise.
2222         (output_constant): Likewise.
2223         (maybe_assemble_visibility): Likewise.
2224         * varpool.c (ctor_for_folding): Likewise.
2225         * chkp-builtins.def: Remove.
2226         * ipa-chkp.c: Remove.
2227         * ipa-chkp.h: Remove.
2228         * rtl-chkp.c: Remove.
2229         * rtl-chkp.h: Remove.
2230         * tree-chkp-opt.c: Remove.
2231         * tree-chkp.c: Remove.
2232         * tree-chkp.h: Remove.
2234 2018-06-07  Carl Love  <cel@us.ibm.com>
2236         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2237         vextract_fp_from_shortl): Add BE support.
2239 2018-06-07  Paul Koning  <ni1d@arrl.net>
2241         * compare-elim.c (try_merge_compare): Don't merge compare if
2242         address contains a side effect.
2243         (try_eliminate_compare): Likewise.
2245 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2247         * config.gcc: Support "tremont".
2248         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2249         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2250         PROCESSOR_TREMONT.
2251         * config/i386/i386.c (m_TREMONT): Define.
2252         (processor_target_table): Add "tremont".
2253         (PTA_TREMONT): Define.
2254         (ix86_lea_outperforms): Add TARGET_TREMONT.
2255         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2256         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2257         and M_INTEL_GOLDMONT_PLUS.
2258         (fold_builtin_cpu): Add "tremont".
2259         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2260         (ix86_option_override_internal): Add "tremont".
2261         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2262         (processor_type): Add PROCESSOR_TREMONT.
2263         * config/i386/x86-tune.def: Add m_TREMONT.
2264         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2266 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2268         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2269         symbol defined for msp430i* devices to be lower case.
2271         gcc/testsuite/gcc.target/msp430/
2272         * msp430i-device-symbol.c: New test.
2273         * msp430f-device-symbol.c: New test.
2274         * msp430.h: New test header file.
2276 2018-06-07  Richard Biener  <rguenther@suse.de>
2278         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2279         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2280         Properly wrap signed arithmetic if overflow wraps.
2282 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2284         PR tree-optimization/69615
2285         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2286         of a cast from a same precision integral SSA_NAME in a bb dominated
2287         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2288         cast to utype if rhs2 has already a compatible type.
2290 2018-06-07  Richard Biener  <rguenther@suse.de>
2292         PR tree-optimization/85935
2293         * graphite-scop-detection.c (find_params_in_bb): Analyze
2294         condition operands with respect to the correct loop.  Assert
2295         the analysis doesn't fail.
2297 2018-06-04  Carl Love  <cel@us.ibm.com>
2299         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2300         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2301         as it is slightly cheaper.
2302         (first_match_or_eos_index_<mode>):
2303         Calculate index using natural element order.
2304         (first_match_index_<mode>):
2305         Calculate index using natural element order.
2306         (first_match_or_eos_index_<mode>):
2307         Calculate index using natural order.
2308         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2309         for BE and LE modes.
2310         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2311         P9V_BUILTIN_VCLZLSBB_V16QI.
2312         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2313         specific.
2315 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2317         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2318         indentation and line wrap for many prototypes.  Add missing
2319         @smallexample directives around block of prototypes for vec_xl and
2320         vec_xst.
2322 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2324         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2325         track if we pass or return IEEE 128-bit floating point.
2326         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2327         C++ mangling that is compatible with GCC 8.1.
2328         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2329         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2330         floating point types.
2331         (rs6000_function_arg_advance_1): Likewise.
2332         (rs6000_mangle_type): Optionally generate mangled names that match
2333         what GCC 8.1 generated for IEEE 128-bit floating point types.
2334         (rs6000_globalize_decl_name): If we have an external function that
2335         passes or returns IEEE 128-bit types, generate a weak reference
2336         from the mangled name used in GCC 8.1 to the current mangled
2337         name.
2338         (rs6000_init_builtins): Make __ibm128 use the long double type if
2339         long double is IBM extended double.  Make __float128 use the long
2340         double type if long double is IEEE 128-bit.
2342         PR target/85657
2343         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2344         macro for __ibm128 built-in functions.
2345         (PACK_IF): Add __ibm128 pack/unpack functions.
2346         (UNPACK_IF): Likewise.
2347         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2348         enable long double built-in functions if long double is IEEE
2349         128-bit floating point.
2350         (rs6000_invalid_builtin): Update long double built-in function
2351         error message.
2352         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2353         functions, adjust the built-in function to use the long double
2354         built-in function if __ibm128 and long double are the same type.
2355         * doc/extend.texi (PowerPC builtins): Update documention for
2356         __builtin_{,un}pack_longdouble.  Add documentation for
2357         __builtin_{,un}pack_ibm128.
2359 2018-06-06  Jim Wilson  <jimw@sifive.com>
2361         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2362         (struct machine_function): New field interrupt_mode.
2363         (riscv_handle_type_attribute): New function.  Add forward declaration.
2364         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2365         (riscv_expand_epilogue): Check interrupt_mode field.
2366         (riscv_set_current_function): Check interrupt attribute args and
2367         set interrupt_mode field.
2368         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2369         (riscv_sret, riscv_uret): New.
2370         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2371         new arguments to interrupt attribute.
2373 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2375         PR target/63177
2376         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2377         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2379 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2381         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2382         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2383         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2384         several redundant entries.
2386 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2388         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2389         type from "rtx" to "rtx_insn *".
2390         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2391         for local "call_insn", removing cast.
2392         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2394 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2396         PR tree-optimization/86066
2397         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2398         for BIT_INSERT_EXPR stores.
2400 2018-06-06  Richard Biener  <rguenther@suse.de>
2402         PR tree-optimization/86062
2403         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2404         component refs ontop
2405         of to be offsetted base.
2407 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2409         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2410         to be static and remove check on interrupt attribute name.
2412         gcc/testsuite/gcc.target/msp430/
2413         * function-attributes-4.c: New test.
2414         * static-interrupts.c: New test.
2416 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2418         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2419         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2421 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2423         PR target/79924
2424         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2425         second argument.
2426         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2427         Remove second argument, change how error is called.
2428         (aarch64_layout_arg): Remove second argument from
2429         aarch64_err_no_fpadvsimd call.
2430         (aarch64_init_cumulative_args): Ditto.
2431         (aarch64_gimplify_va_arg_expr): Ditto.
2432         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2434 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2436         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2437         (*simple_return_indirect_internal<mode>): Rename from
2438         simple_return_indirect_internal.  Use W mode iterator.
2439         (rstorssp): New expander.
2440         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2441         (clrssbsy): New expander.
2442         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2444 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2446         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2447         __typeof__.
2448         (cmse_check_pointed_object): Likewise.
2450 2018-06-05  Martin Liska  <mliska@suse.cz>
2452         PR gcov-profile/47618
2453         * doc/invoke.texi: Document how -fprofile-dir format
2454         is extended.
2456 2018-06-05  Richard Biener  <rguenther@suse.de>
2458         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2459         removal pretend DOM info isn't available so we do not update
2460         it and only remove edges, not dominated blocks.  Actually free
2461         DOM info in case we removed something.  Remove unreachable blocks.
2462         (mfb_keep_latches): Work with either DOM info or marked backedges.
2463         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2464         first.  Mark backedges if DOM info isn't available.
2465         (Re-)compute DOM info after cleanup_control_flow_pre.
2467 2018-06-05  Richard Biener  <rguenther@suse.de>
2469         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2470         (locus_discrim_hasher::hash): Adjust.
2471         (locus_discrim_hasher::equal): Likewise.
2472         (next_discriminator_for_locus): Work on line directly.
2473         (same_line_p): Pass in expanded locus1 as well.
2474         (assign_discriminators): Avoid redundant location expansions.
2476 2018-06-05  Richard Biener  <rguenther@suse.de>
2478         PR tree-optimization/86046
2479         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2480         if required after clearing TREE_ADDRESSABLE.
2482 2018-06-05  Richard Biener  <rguenther@suse.de>
2484         PR tree-optimization/86047
2485         * tree-ssa-loop.c (for_each_index): Glob handling of all
2486         decls and constants and really handle all of them.
2488 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2490         PR target/81497
2491         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2492         qualifier_void_pointer and qualifier_const_void_pointer.
2493         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2494         (arm_init_builtins): Handle the above.
2495         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2496         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2497         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2498         void intrinsics.
2500 2018-06-05  Martin Liska  <mliska@suse.cz>
2502         * auto-profile.c (read_autofdo_file): Do not use
2503         gcov_ctr_summary struct.
2504         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2505         * coverage.c (struct counts_entry): Likewise.
2506         (read_counts_file): Read just single summary entry.
2507         (get_coverage_counts): Use gcov_summary struct.
2508         * coverage.h (get_coverage_counts): Likewise.
2509         * gcov-dump.c (dump_working_sets): Likewise.
2510         (tag_summary): Dump just single summary.
2511         * gcov-io.c (gcov_write_summary): Write just histogram
2512         summary.
2513         (gcov_read_summary): Read just single summary.
2514         (compute_working_sets): Use gcov_summary struct.
2515         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2516         of GCOV_COUNTERS_SUMMABLE.
2517         (GCOV_COUNTERS_SUMMABLE): Remove.
2518         (GCOV_FIRST_VALUE_COUNTER): Replace with
2519         GCOV_COUNTER_V_INTERVAL.
2520         (struct gcov_ctr_summary): Remove.
2521         (struct gcov_summary): Directly use fields of former
2522         gcov_ctr_summary.
2523         (compute_working_sets): Use gcov_summary struct.
2524         * gcov.c (read_count_file): Do not use ctrs fields.
2525         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2526         struct.
2527         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2528         struct.
2529         * profile.c: Likewise.
2530         * profile.h: Likewise.
2532 2018-06-05  Martin Liska  <mliska@suse.cz>
2534         PR gcov-profile/84846
2535         * gcov.c (output_lines): Print working directory only
2536         in intermediate format.
2538 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
2540         * config/s390/s390-builtin-types.def: Add void function type.
2541         * config/s390/s390-builtins.def: Use the function type for the
2542         tbeginc builtin.
2544 2018-06-04  Jim Wilson  <jimw@sifive.com>
2546         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2547         to int.
2548         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
2549         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
2550         handle EH_RETURN_DATA_REGNO registers properly.
2551         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
2552         (riscv_expand_epilogue): Update comment.  Change argument name and
2553         type.  Update code to use new name and type.  Pass new args to
2554         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
2555         EXCEPTION_RETURN.
2556         * config/riscv/riscv.md (NORMAL_RETURN): New.
2557         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
2558         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
2559         (eh_return): Call gen_eh_return_internal and emit barrier.
2560         (eh_return_internal): Call riscv_expand_epilogue.
2562 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
2564         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
2565         bit_insertion field and declare can_be_merged_into method.
2566         (merged_store_group::can_be_merged_into): New method.
2567         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
2568         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
2569         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2571 2018-06-04  Richard Biener  <rguenther@suse.de>
2573         PR tree-optimization/85955
2574         * builtins.c (fold_builtin_sincos): Convert pointers to
2575         destination to appropriate type before dereferencing.
2577 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
2579         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2581 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
2583         * expr.c (expand_expr_real_1): Force the operand into memory if
2584         its TYPE_MODE is BLKmode and if there is no integer mode for
2585         the number of bits being extracted.
2587 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2589         PR target/85832
2590         PR target/86036
2591         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
2592         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2594 2018-06-04  Richard Biener  <rguenther@suse.de>
2596         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
2597         (cleanup_tree_cfg_noloop): ... single caller.  Do
2598         start_recording_case_labels later.
2600 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
2602         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
2603         to _IMMINTRIN_H_INCLUDED.
2604         * config/i386/pconfigintrin.h: Ditto.
2605         * config/i386/waitpkgintrin.h: Ditto.
2606         * config/i386/immintrin.h: Add includes for sgxintrin.h,
2607         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
2608         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
2609         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
2610         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
2611         waitpkgintrin.h and cldemoteintrin.h.
2613 2018-06-04  Richard Biener  <rguenther@suse.de>
2615         PR tree-optimization/86038
2616         * tracer.c (find_best_successor): Check probability for
2617         being initialized, bail out if not.
2619 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
2621         PR target/86003
2622         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
2623         of bits to ignore when comparing architectures.
2625 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
2627         PR tree-optimization/69615
2628         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
2629         maximum or minimum of the type, try to merge it also as if
2630         range1 is + [-, x - 1] or + [x + 1, -].
2632         PR c++/86025
2633         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2635 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
2637         PR tree-optimization/86034
2638         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
2639         the unsigned bitfield type in a bit insertion sequence if it does not
2640         have a larger precision than the bitfield size.
2641         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2643 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
2645         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
2647 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2649         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
2650         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
2651         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
2652         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2654 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
2656         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
2657         Disable -fdelete-null-pointer-checks for ELF toolchain.
2659 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2660             Kito Cheng  <kito.cheng@gmail.com>
2662         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
2663         (nds32le-*-*, nds32be-*-*): Integrate checking process.
2664         (nds32*-*-*): Add glibc and uclibc conditions.
2665         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
2666         (TARGET_EXCEPT_UNWIND_INFO): Define.
2667         * config/nds32/elf.h: New file.
2668         * config/nds32/linux.h: New file.
2669         * config/nds32/nds32-elf.opt: New file.
2670         * config/nds32/nds32-linux.opt: New file.
2671         * config/nds32/nds32-fp-as-gp.c
2672         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
2673         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
2674         TARGET_LINUX_ABI.
2675         (nds32_asm_file_end): Ditto.
2676         (nds32_print_operand): Ditto.
2677         (nds32_insert_attributes): Ditto.
2678         (nds32_init_libfuncs): New function.
2679         (TARGET_HAVE_TLS): Define.
2680         (TARGET_INIT_LIBFUNCS): Define.
2681         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
2682         spec content.
2683         (TARGET_ELF): Apply different mcmodel setting.
2684         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
2685         been migrated into elf.h and linux.h files.
2686         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
2687         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
2688         (mcmodel): The content has been migrated into nds32-elf.opt and
2689         nds32-linux.opt files.
2690         * config/nds32/t-elf: New file.
2691         * config/nds32/t-linux: New file.
2693 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2694             Shiva Chen  <shiva0217@gmail.com>
2696         * config/nds32/constants.md (unspec_volatile_element): Add
2697         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
2698         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
2699         optimization.
2700         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
2701         (make_pass_nds32_fp_as_gp): Declare.
2702         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
2703         optmization pass.
2704         (nds32_asm_function_end_prologue): Remove unused asm output.
2705         (nds32_asm_function_begin_epilogue): Remove unused asm output.
2706         (nds32_asm_file_start): Output necessary fp_as_gp information.
2707         (nds32_option_override): Adjust register usage.
2708         (nds32_expand_prologue): Consider fp_as_gp situation.
2709         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
2710         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
2711         (epilogue): Ditto.
2712         (return): Ditto.
2713         (simple_return): Ditto.
2714         (omit_fp_begin): Output special directive for fp_as_gp.
2715         (omit_fp_end): Output special directive for fp_as_gp.
2716         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
2717         mforbid-fp-as-gp): New options.
2719 2018-06-01  Mark Wielaard  <mark@klomp.org>
2721         * dwarf2out.c (dwarf2out_finish): Remove generation of
2722         DW_AT_loclists_base.
2724 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
2726         * gimple-ssa-store-merging.c: Include gimple-fold.h.
2727         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
2728         (struct merged_store_group): Add bit_insertion field.
2729         (dump_char_array): Use standard hexadecimal format.
2730         (merged_store_group::merged_store_group): Set bit_insertion to false.
2731         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
2732         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
2733         also print the mask in the dump file.
2734         (pass_store_merging::gate): Minor tweak.
2735         (imm_store_chain_info::coalesce_immediate): Fix wrong association
2736         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
2737         stores with INTEGER_CST stores.
2738         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
2739         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
2740         and use it throughout.  Generate bit insertion sequences if need be.
2741         (pass_store_merging::process_store): Remove redundant condition.
2742         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2744 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
2746         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
2747         the 128-bit floating point types.  Fix function comment.
2749 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2751         * config/aarch64/aarch64-simd.md
2752         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
2753         mnemonics.
2754         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
2755         mnemonics.
2757 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2759         PR tree-optimization/85989
2760         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
2761         variable.
2762         (backprop::intersect_uses): Check it when deciding whether this
2763         is a backedge reference.
2764         (backprop::process_block): Add each phi to m_visited_phis
2765         after visiting it, then clear it at the end.
2767 2018-06-01  Richard Biener  <rguenther@suse.de>
2769         * tree-vectorizer.h (vect_dr_stmt): New function.
2770         (vect_get_load_cost): Adjust.
2771         (vect_get_store_cost): Likewise.
2772         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
2773         Use vect_dr_stmt instead of DR_SMTT.
2774         (vect_record_base_alignments): Likewise.
2775         (vect_calculate_target_alignment): Likewise.
2776         (vect_compute_data_ref_alignment): Likewise and make static.
2777         (vect_update_misalignment_for_peel): Likewise.
2778         (vect_verify_datarefs_alignment): Likewise.
2779         (vector_alignment_reachable_p): Likewise.
2780         (vect_get_data_access_cost): Likewise.  Pass down
2781         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
2782         (vect_get_peeling_costs_all_drs): Likewise.
2783         (vect_peeling_hash_get_lowest_cost): Likewise.
2784         (vect_enhance_data_refs_alignment): Likewise.
2785         (vect_find_same_alignment_drs): Likewise.
2786         (vect_analyze_data_refs_alignment): Likewise.
2787         (vect_analyze_group_access_1): Likewise.
2788         (vect_analyze_group_access): Likewise.
2789         (vect_analyze_data_ref_access): Likewise.
2790         (vect_analyze_data_ref_accesses): Likewise.
2791         (vect_vfa_segment_size): Likewise.
2792         (vect_small_gap_p): Likewise.
2793         (vectorizable_with_step_bound_p): Likewise.
2794         (vect_prune_runtime_alias_test_list): Likewise.
2795         (vect_analyze_data_refs): Likewise.
2796         (vect_supportable_dr_alignment): Likewise.
2797         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2798         (vect_gen_prolog_loop_niters): Likewise.
2799         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2800         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
2801         modify DR_STMT.
2802         (vect_recog_mask_conversion_pattern): Likewise.
2803         (vect_try_gather_scatter_pattern): Likewise.
2804         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
2805         to vect_get_store_cost.
2806         (vect_get_store_cost): Get stmt_info instead of DR.
2807         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
2808         (vect_get_load_cost): Get stmt_info instead of DR.
2810 2018-06-01  Richard Biener  <rguenther@suse.de>
2812         PR middle-end/86017
2813         * gimple-fold.c (var_decl_component_p): Also allow offsetted
2814         vars wrapped in MEM_REFs.
2816 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
2818         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
2819         Fix subreg tests so that we only return a choice between
2820         GENERAL_REGS and FP_REGS if the original classes included both.
2822 2018-06-01  Richard Biener  <rguenther@suse.de>
2824         PR ipa/85960
2825         * tree-ssa-structalias.c (get_function_part_constraint):
2826         Handle NULL fi->decl.
2827         (find_func_aliases_for_call): Properly handle indirect
2828         fi from direct call.
2829         (find_func_clobbers): Likewise.
2830         (ipa_pta_execute): Likewise.
2831         (create_variable_info_for): For functions that are ifunc_resolver
2832         resolve to a varinfo that contains the result of the resolver call.
2833         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
2834         aliases.
2836 2018-05-31  Michael Collison  <michael.collison@arm.com>
2838         * config/aarch64/aarch64.md:
2839         (*fix_to_zero_extenddfdi2): New pattern.
2840         * gcc.target/aarch64/fix_extend1.c: New testcase.
2842 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
2844         PR middle-end/78809
2845         PR middle-end/83026
2846         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
2847         and BUILT_IN_STRNCMP_EQ.
2848         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
2849         BUILT_IN_STRNCMP_EQ.
2850         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
2851         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2852         (gimple_fold_builtin): Likewise.
2853         * tree-ssa-strlen.c (compute_string_length): New function.
2854         (determine_min_obsize): New function.
2855         (handle_builtin_string_cmp): New function to handle calls to
2856         string compare functions.
2857         (strlen_optimize_stmt): Add handling to builtin string compare
2858         calls.
2859         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
2860         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
2861         * tree.c (build_common_builtin_nodes): Add new defines of
2862         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2864 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
2866         PR target/85984
2867         * bb-reorder.c (pass_partition_blocks::gate): Return false for
2868         functions with naked attribute.
2870 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
2872         * config/i386/sse.md (avx_vec_concat<mode>):
2873         Substitute concat_tg_mode mode attribute with xtg_mode.
2874         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
2875         (concat_tg_mode): Remove mode attribute.
2877 2018-05-31  Martin Sebor  <msebor@redhat.com>
2879         PR c/82063
2880         * calls.c (alloc_max_size): Correct a logic error/typo.
2881         Treat excessive arguments as infinite.  Warn for invalid arguments.
2882         * doc/invoke.texi (-Walloc-size-larger-than): Update.
2884 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
2886         PR target/85829
2887         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
2888         and movx for Haswell.
2890 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
2891             Cesar Philippidis  <cesar@codesourcery.com>
2893         PR middle-end/85879
2894         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
2895         when emitting error on private/firstprivate reductions.
2896         * omp-low.c (lower_omp_target): Avoid reference-type processing
2897         on pointers for firstprivate clause.
2899 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2901         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
2902         (st1x2): Likewise.
2903         (st1x3): Likewise.
2904         * config/aarch64/aarch64-simd.md
2905         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
2906         (aarch64_ld1_x3_<mode>): Likewise
2907         (aarch64_st1x2<VALLDIF:mode>): Likewise
2908         (aarch64_st1_x2_<mode>): Likewise
2909         (aarch64_st1x3<VALLDIF:mode>): Likewise
2910         (aarch64_st1_x3_<mode>): Likewise
2911         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
2912         (vld1_s8_x3): Likewise.
2913         (vld1_u16_x3): Likewise.
2914         (vld1_s16_x3): Likewise.
2915         (vld1_u32_x3): Likewise.
2916         (vld1_s32_x3): Likewise.
2917         (vld1_u64_x3): Likewise.
2918         (vld1_s64_x3): Likewise.
2919         (vld1_f16_x3): Likewise.
2920         (vld1_f32_x3): Likewise.
2921         (vld1_f64_x3): Likewise.
2922         (vld1_p8_x3): Likewise.
2923         (vld1_p16_x3): Likewise.
2924         (vld1_p64_x3): Likewise.
2925         (vld1q_u8_x3): Likewise.
2926         (vld1q_s8_x3): Likewise.
2927         (vld1q_u16_x3): Likewise.
2928         (vld1q_s16_x3): Likewise.
2929         (vld1q_u32_x3): Likewise.
2930         (vld1q_s32_x3): Likewise.
2931         (vld1q_u64_x3): Likewise.
2932         (vld1q_s64_x3): Likewise.
2933         (vld1q_f16_x3): Likewise.
2934         (vld1q_f32_x3): Likewise.
2935         (vld1q_f64_x3): Likewise.
2936         (vld1q_p8_x3): Likewise.
2937         (vld1q_p16_x3): Likewise.
2938         (vld1q_p64_x3): Likewise.
2939         (vst1_s64_x2): Likewise.
2940         (vst1_u64_x2): Likewise.
2941         (vst1_f64_x2): Likewise.
2942         (vst1_s8_x2): Likewise.
2943         (vst1_p8_x2): Likewise.
2944         (vst1_s16_x2): Likewise.
2945         (vst1_p16_x2): Likewise.
2946         (vst1_s32_x2): Likewise.
2947         (vst1_u8_x2): Likewise.
2948         (vst1_u16_x2): Likewise.
2949         (vst1_u32_x2): Likewise.
2950         (vst1_f16_x2): Likewise.
2951         (vst1_f32_x2): Likewise.
2952         (vst1_p64_x2): Likewise.
2953         (vst1q_s8_x2): Likewise.
2954         (vst1q_p8_x2): Likewise.
2955         (vst1q_s16_x2): Likewise.
2956         (vst1q_p16_x2): Likewise.
2957         (vst1q_s32_x2): Likewise.
2958         (vst1q_s64_x2): Likewise.
2959         (vst1q_u8_x2): Likewise.
2960         (vst1q_u16_x2): Likewise.
2961         (vst1q_u32_x2): Likewise.
2962         (vst1q_u64_x2): Likewise.
2963         (vst1q_f16_x2): Likewise.
2964         (vst1q_f32_x2): Likewise.
2965         (vst1q_f64_x2): Likewise.
2966         (vst1q_p64_x2): Likewise.
2967         (vst1_s64_x3): Likewise.
2968         (vst1_u64_x3): Likewise.
2969         (vst1_f64_x3): Likewise.
2970         (vst1_s8_x3): Likewise.
2971         (vst1_p8_x3): Likewise.
2972         (vst1_s16_x3): Likewise.
2973         (vst1_p16_x3): Likewise.
2974         (vst1_s32_x3): Likewise.
2975         (vst1_u8_x3): Likewise.
2976         (vst1_u16_x3): Likewise.
2977         (vst1_u32_x3): Likewise.
2978         (vst1_f16_x3): Likewise.
2979         (vst1_f32_x3): Likewise.
2980         (vst1_p64_x3): Likewise.
2981         (vst1q_s8_x3): Likewise.
2982         (vst1q_p8_x3): Likewise.
2983         (vst1q_s16_x3): Likewise.
2984         (vst1q_p16_x3): Likewise.
2985         (vst1q_s32_x3): Likewise.
2986         (vst1q_s64_x3): Likewise.
2987         (vst1q_u8_x3): Likewise.
2988         (vst1q_u16_x3): Likewise.
2989         (vst1q_u32_x3): Likewise.
2990         (vst1q_u64_x3): Likewise.
2991         (vst1q_f16_x3): Likewise.
2992         (vst1q_f32_x3): Likewise.
2993         (vst1q_f64_x3): Likewise.
2994         (vst1q_p64_x3): Likewise.
2996 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2998         * config/msp430/msp430.c (msp430_output_labelref): Prepend
2999         user_label_prefix to name.
3001         * tree-core.h: Update comment about the format of NAME string
3002         passed to handler in attribute_spec.
3004         * config/msp430/msp430.md: Remove erroneous subreg expression from
3005         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3006         zero_extend{q,h}isi2.
3008 2018-05-30  Borislav Petkov  <bp@suse.de>
3010         * doc/extend.texi: Document some architecture specific
3011         constraints and sort entries.
3013 2018-05-30  Martin Sebor  <msebor@redhat.com>
3015         PR middle-end/85369
3016         * builtins.c (expand_builtin_stpcpy_1): New function.
3017         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3018         only if the former succeeds.
3020 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3022         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3023         in saphira.
3025 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3027         * doc/invoke.texi (-flinker-output): Document
3029 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3031         * passes.c (ipa_write_summaries): Only modify statements if body
3032         is in memory.
3033         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3034         incrementally linking.
3035         (ipa_passes): Likewise.
3036         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3037         pass down resolution info.
3038         * common.opt (flag_incremental_link): Update info.
3039         * gcc.c (plugin specs): Turn flinker-output=* to
3040         -plugin-opt=-linker-output-known
3041         * toplev.c (compile_file): Also cut compilation when doing incremental
3042         link.
3043         * flag-types. (enum lto_partition_model): Add
3044         LTO_LINKER_OUTPUT_NOLTOREL.
3045         (invoke.texi): Add -flinker-output docs.
3046         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3047         link same way as WPA; do not stream in dead initializers.
3049         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3050         darf2out_register_external_decl): Support incremental link.
3052 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3054         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3056 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3058         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3059         it down to simple_object_copy_lto_debug_sections.
3060         (run_gcc): Determine incremental LTO link time and configure
3061         lto1 into non-wpa mode, disable renaming of debug sections.
3063 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3065         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3066         descriptions of various incorrectly documented functions.
3068 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3070         Revert:
3071         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3072         address check not strict.
3074 2018-05-30  Richard Biener  <rguenther@suse.de>
3076         PR tree-optimization/85964
3077         * tracer.c (better_p): Drop initialized count check, we only
3078         call the function with initialized counts now.
3079         (find_best_successor): Do find a best edge if one
3080         has uninitialized count.
3081         (find_best_predecessor): Likewise.  Do BB frequency check only
3082         if count is initialized.
3084 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3086         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3087         (aarch64_ldrstr_offset_compare): New.
3088         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3089         load/store orderings.
3090         (aarch64_gen_adjusted_ldpstp): Likewise.
3092 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3094         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3095         Check for subset of GENERAL_REGS and FP_REGS.
3096         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3097         r=w alternative.
3099 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3101         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3102         and wi::to_poly_offset.  Add the current offset and then check
3103         whether the sum fits, rather than using an unchecked addition of
3104         a checked term.  Check for a shwi rather than a uhwi.
3105         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3106         (store_constructor): Use poly_int_tree_p.
3107         (expand_expr_real_1): Likewise.
3108         * function.c (assign_temp): Likewise.
3109         * fold-const.c (const_binop): Use poly_int_tree_p and
3110         wi::to_poly_offset.
3111         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3112         division.
3113         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3114         to_poly_offset for MEM offsets.
3115         * ipa-icf.c (sem_variable::equals): Likewise.
3116         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3117         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3118         wi::to_poly_offset for BIT_FIELD_REF offsets.
3119         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3120         wi::to_poly_offset.
3121         * var-tracking.c (emit_note_insn_var_location): Use
3122         tree_to_poly_uint64.
3124 2018-05-29  Jim Wilson  <jimw@sifive.com>
3126         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3128 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3130         PR target/85950
3131         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3132         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3133         sequence.
3134         (sse4_1_round<mode>2): Use nonimmediate_operand
3135         for operand 1 predicate.
3137 2018-05-29  Martin Sebor  <msebor@redhat.com>
3138             Richard Biener  <rguenther@suse.de>
3140         PR testsuite/85888
3141         * calls.c (get_size_range): Call determine_value_range instead
3142         of get_value_range..
3143         * tree-vrp.h (determine_value_range): Declared new function.
3144         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3146 2018-05-29  Richard Biener  <rguenther@suse.de>
3148         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3149         sure to use non-pattern stmts for get_earlier_stmt arguments.
3150         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3151         called on pattern stmts.
3152         (get_later_stmt): Likewise.
3154 2018-05-29  Martin Liska  <mliska@suse.cz>
3156         PR gcov-profile/85759
3157         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3158         env variables.
3160 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3162         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3163         VEC_UNPACK_*_EXPR.
3164         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3165         VEC_PACK_*_EXPR.
3167         PR target/85918
3168         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3169         VEC_PACK_FLOAT_EXPR): New tree codes.
3170         * tree-pretty-print.c (op_code_prio): Handle
3171         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3172         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3173         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3174         * tree-inline.c (estimate_operator_cost): Likewise.
3175         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3176         * fold-const.c (const_binop): Likewise.
3177         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3178         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3179         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3180         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3181         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3182         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3183         * expr.c (expand_expr_real_2): Likewise.
3184         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3185         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3186         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3187         optabs.
3188         * optabs.c (expand_widen_pattern_expr): For
3189         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3190         sign from result type rather than operand's type.
3191         (expand_binop_directly): For vec_packu_float_optab and
3192         vec_packs_float_optab allow result type to be different from operand's
3193         type.
3194         * optabs-tree.c (optab_for_tree_code): Handle
3195         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3196         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3197         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3198         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3199         VEC_PACK_FLOAT_EXPR.
3200         * tree-vect-stmts.c (supportable_widening_operation): Handle
3201         FIX_TRUNC_EXPR.
3202         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3203         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3204         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3205         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3206         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3207         mode attributes.
3208         (vec_pack<floatprefix>_float_<mode>): New expander.
3209         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3210         attributes.
3211         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3212         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3213         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3214         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3215         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3216         Document.
3217         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3218         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3219         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3220         VEC_PACK_FLOAT_EXPR): Document.
3222 2018-05-29  Richard Biener  <rguenther@suse.de>
3224         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3225         member.
3226         (stmt_vec_info_vec): Make pointer.
3227         (init_stmt_vec_info_vec): Remove.
3228         (free_stmt_vec_info_vec): Likewise.
3229         (set_stmt_vec_info_vec): New function.
3230         (free_stmt_vec_infos): Likewise.
3231         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3232         (set_vinfo_for_stmt): Likewise.
3233         (get_earlier_stmt): Likewise.
3234         (get_later_stmt): Likewise.
3235         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3236         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3237         (vec_info::~vec_info): Free stmt_vec_infos.
3238         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3239         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3240         (pass_slp_vectorize::execute): Likewise.
3241         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3242         (free_stmt_vec_info_vec): Likewise.
3243         (set_stmt_vec_info_vec): New function.
3244         (free_stmt_vec_infos): Likewise.
3245         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3246         the global stmt_vec_info_vec.
3247         * tree-parloops.c (gather_scalar_reductions): Use
3248         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3249         vector.
3251 2018-05-29  Richard Biener  <rguenther@suse.de>
3253         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3255 2018-05-29  Martin Liska  <mliska@suse.cz>
3256             David Malcolm  <dmalcolm@redhat.com>
3258         * vec.c (test_reverse): New.
3259         (vec_c_tests): Add new test.
3260         * vec.h (vl_ptr>::reverse): New function.
3262 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3264         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3266         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3267         and later.
3269 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3271         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3273 2018-05-28  Richard Biener  <rguenther@suse.de>
3275         PR tree-optimization/85933
3276         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3277         look at stmts marked as vectorizable.
3279 2018-05-28  Richard Biener  <rguenther@suse.de>
3281         PR tree-optimization/85934
3282         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3283         vector boolean check before scalar optimization.
3285 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3287         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3288         for armv5te.
3290 2018-05-28  Mark Wielaard  <mark@klomp.org>
3292         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3293         if it is an expression containing a minus sign.
3295 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3297         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3299 2018-05-27  Paul Koning  <ni1d@arrl.net>
3301         * config/pdp11/pdp11.md (truncsihi2): Remove.
3303 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3304             Chung-Ju Wu  <jasonwucj@gmail.com>
3306         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3307         implementation.
3308         (unaligned_store_dw): Ditto.
3309         * config/nds32/nds32-memory-manipulation.c
3310         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3311         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3312         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3313         (emit_setmem_word_loop): Rename to ...
3314         (emit_setmem_doubleword_loop): ... this.
3315         (nds32_gen_dup_4_byte_to_word_value): New function.
3316         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3317         (nds32_expand_setmem_loop): Refine implementation.
3318         (nds32_expand_setmem_loop_v3m): Ditto.
3319         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3320         pattern.
3322 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3324         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3326 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3328         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3329         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3330         machine->attr_no_prologue_p.
3331         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3332         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3333         (nds32_expand_epilogue): Consider attr_naked_p.
3334         (nds32_expand_epilogue_v3pop): Likewise.
3335         (nds32_can_use_return_insn): Likewise.
3336         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3337         attr_no_prologue_p fields.
3338         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3340 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3342         PR target/85918
3343         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3344         attributes.
3345         * config/i386/sse.md
3346         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3347         Rename to ...
3348         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3349         ... this.
3350         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3351         Rename to ...
3352         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3353         ... this.
3354         (*<floatsuffix>floatv2div2sf2): Rename to ...
3355         (*float<floatunssuffix>v2div2sf2): ... this.
3356         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3357         (float<floatunssuffix>v2div2sf2_mask): ... this.
3358         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3359         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3360         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3361         to ...
3362         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3363         ... this.
3364         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3365         Rename to ...
3366         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3367         ... this.
3368         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3369         Rename to ...
3370         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3371         ... this.
3372         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3373         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3374         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3375         gen_ufix_truncv8dfv8si2.
3376         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3377         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3378         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3379         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3380         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3381         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3382         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3383         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3385 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3387         PR target/85900
3388         PR target/85345
3389         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3391 2018-05-25  Jim Wilson  <jimw@sifive.com>
3393         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3394         * config/riscv/riscv.c (struct machine_function): Add
3395         interrupt_handler_p and attribute_checked_p fields.
3396         (riscv_attribute_table): Add interrupt.
3397         (riscv_interrupt_type_p): New.
3398         (riscv_save_reg_p): Save extra regs for interrupt handler.
3399         (riscv_use_save_libcall): Return false  for interrupt handler.
3400         (riscv_first_stack_step): Add forward declaration.
3401         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3402         for interrupt handler with large frame.  Use it for saved reg list.
3403         (riscv_expand_prologue): Move flag_stack_usage_info support to
3404         eliminate duplication.
3405         (riscv_expand_epilogue): Generate mret for interrupt handler.
3406         (riscv_epilogue_uses): New.
3407         (riscv_can_use_return_insn): Return false for interrupt handler.
3408         (riscv_function_ok_for_sibcall): Likewise.
3409         (riscv_set_current_function): Add interrupt handler support.
3410         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3411         * config/riscv/riscv.md (UNSPECV_MRET): New.
3412         (GP_REGNUM): New.
3413         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3414         (riscv_mret): New.
3415         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3417 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3419         PR tree-optimization/85712
3420         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3421         this candidate has already been replaced in-situ by a copy.
3423 2018-05-25  Jason Merrill  <jason@redhat.com>
3425         PR c++/80485 - inline function non-zero address.
3426         * symtab.c (nonzero_address): Check DECL_COMDAT.
3428 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3430         PR target/83628
3431         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3432         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3433         extension of SImode operation.  Use const123_operand predicate.
3434         (*saddsi_1): Remove.
3435         (*saddl_se_1): Ditto.
3436         (*ssubsi_1): Ditto.
3437         (*ssubl_se_1): Ditto.
3438         * config/alpha/predicates.md (const123_operand): New predicate.
3439         * config/alpha/constraints.md (P): Use IN_RANGE.
3441 2018-05-25  Richard Biener  <rguenther@suse.de>
3443         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3444         defaulted to true.
3445         (ref_maybe_used_by_stmt_p): Likewise.
3446         (stmt_may_clobber_ref_p): Likewise.
3447         (stmt_may_clobber_ref_p_1): Likewise.
3448         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3449         and pass it along.
3450         (ref_maybe_used_by_stmt_p): Likewise.
3451         (stmt_may_clobber_ref_p): Likewise.
3452         (stmt_may_clobber_ref_p_1): Likewise.
3453         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3454         the alias oracle to disambiguate DRs with stmts DR analysis
3455         couldn't handle.
3456         (vect_analyze_data_refs): Do not give up on not analyzable
3457         DRs for BB vectorization.  Remove code truncating the dataref
3458         vector.
3460 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3462         PR target/85832
3463         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3464         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3465         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3467 2018-05-25  Richard Biener  <rguenther@suse.de>
3469         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3470         function, combining stmt data ref gathering and fatal analysis
3471         parts.
3472         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3473         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3474         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3475         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3476         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3478 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3480         PR tree-optimization/85720
3481         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3482         SCC if all partitions are builtins.
3483         (version_loop_by_alias_check): New parameter.  Generate cancelable
3484         runtime alias check if all partitions are builtins.
3485         (distribute_loop): Update call to above function.
3487 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3489         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3490         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3491         (parm_default_def_partition_arg): Ditto.
3492         (set_parm_default_def_partition): Ditto.
3493         (get_parm_default_def_partitions): Ditto and make it static.
3494         (get_undefined_value_partitions): Ditto and make it static.
3495         (remove_ssa_form): Refactor call to init_var_map here.
3496         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3497         computation for loop region.
3498         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3499         (register_default_def): Delete.
3500         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3501         (parm_default_def_partition_arg): Ditto.
3502         (set_parm_default_def_partition): Ditto.
3503         (get_parm_default_def_partitions): Ditto and make it static.
3504         (get_undefined_value_partitions): Ditto and make it static.
3505         (coalesce_with_default, coalesce_with_default): Update comment.
3506         (create_coalesce_list_for_region): New func factored out from
3507         create_outofssa_var_map.
3508         (populate_coalesce_list_for_outofssa): New func factored out from
3509         create_outofssa_var_map and coalesce_ssa_name.
3510         (create_outofssa_var_map): Delete.
3511         (coalesce_ssa_name): Refactor to support live range computation.
3512         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3513         (get_parm_default_def_partitions): Delete.
3514         (get_undefined_value_partitions): Ditto.
3515         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3516         computation for loop region.
3517         (new_tree_live_info, loe_visit_block): Ditto.
3518         (live_worklist, set_var_live_on_entry): Ditto.
3519         (calculate_live_on_exit, verify_live_on_entry): Ditto.
3520         * tree-ssa-live.h (struct _var_map): New fields.
3521         (init_var_map): Change decl.
3522         (region_contains_p): New.
3524 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3526         * tree-ssa-live.h (live_merge_and_clear): Delete.
3528 2018-05-25  Richard Biener  <rguenther@suse.de>
3530         PR c++/85912
3531         * tree-dump.c (dequeue_and_dump): Remove access to removed
3532         operand 2 of a SWITCH_EXPR.
3534 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3536         * doc/sourcebuild.texi (vect_double_cond_arith): Include
3537         multiplication and division.
3538         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3539         (cond_udiv@var{m}, cond_umod@var{m}): Document.
3540         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3541         (cond_udiv_optab, cond_umod_optab): New optabs.
3542         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3543         (IFN_COND_RDIV): New internal functions.
3544         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3545         TRUNC_MOD_EXPR and RDIV_EXPR.
3546         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3547         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3548         New unspecs.
3549         (SVE_INT_BINARY): Include mult.
3550         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
3551         (optab, sve_int_op): Handle mult.
3552         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
3553         UNSPEC_COND_DIV.
3554         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
3555         for SVE_INT_BINARY_SD.
3557 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3559         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
3560         (optab, sve_int_op): Handle div and udiv.
3561         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
3562         for SVE_INT_BINARY_SD.
3563         (*<optab><mode>3): New insn for the same.
3565 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3567         * tree-vect-patterns.c: Include predict.h.
3568         (vect_recog_divmod_pattern): Restrict check for division support
3569         to when optimizing for size.
3571 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3573         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
3574         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
3575         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
3576         (gimple_match_op::set_op): Likewise.
3577         (gimple_resimplify4): Declare.
3578         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
3579         (expr::gen_transform): Likewise.
3580         (decision_tree::gen): Generate a simplification routine for 4 operands.
3581         * gimple-match-head.c (gimple_simplify): Add an overload for
3582         4 operands.  In the top-level function, handle up to 4 call
3583         arguments and call gimple_resimplify4.
3584         (gimple_resimplify4): New function.
3585         (build_call_internal): Pass a fourth operand.
3586         (maybe_push_to_seq): Likewise.
3587         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
3588         Fold VEC_COND_EXPRs of an operation and a default value into
3589         an IFN_COND_* function if possible.
3590         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
3591         New unspecs.
3592         (SVE_COND_FP_BINARY): Include them.
3593         (optab, sve_fp_op): Handle them.
3594         (SVE_INT_BINARY_REV): New code iterator.
3595         (SVE_COND_FP_BINARY_REV): New int iterator.
3596         (commutative): New int attribute.
3597         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
3598         Declare.
3599         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
3600         function.
3601         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
3602         (*cond_<optab><mode>): New patterns for reversed operands.
3604 2018-05-25  Richard Biener  <rguenther@suse.de>
3606         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
3607         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
3608         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
3609         (STMT_VINFO_GROUPED_ACCESS): Adjust.
3610         * tree-vect-data-refs.c (everywhere): Adjust users.
3611         * tree-vect-loop.c (everywhere): Likewise.
3612         * tree-vect-slp.c (everywhere): Likewise.
3613         * tree-vect-stmts.c (everywhere): Likewise.
3614         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
3616 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3618         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
3619         Rename to...
3620         (gcc_cv_as_section_exclude): ... this.
3621         Try Solaris as #exclude syntax.
3622         * configure: Regenerate.
3623         * config.in: Regenerate.
3624         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
3625         SECTION_EXCLUDE.
3626         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
3627         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
3629         * varasm.c (default_elf_asm_named_section): Don't check if
3630         HAVE_GAS_SECTION_EXCLUDE is defined.
3632 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3634         * doc/md.texi: Update the documentation of the cond_* optabs
3635         to mention the new final operand.  Fix GET_MODE_NUNITS call.
3636         Describe the scalar case too.
3637         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
3638         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
3639         instead of 2.
3640         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
3641         (get_conditional_internal_fn): Update comment.
3642         * tree-vect-loop.c (vectorizable_reduction): Pass the original
3643         accumulator value as a final argument to conditional functions.
3644         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
3645         a define_expand and add an "else" operand.  Assert for now that
3646         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
3647         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
3648         (*cond_<optab><mode>): New patterns.
3649         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
3650         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
3651         (UNSPEC_COND_EOR): Delete.
3652         (optab): Remove associated mappings.
3653         (SVE_INT_BINARY): New code iterator.
3654         (sve_int_op): Remove int attribute and add "minus" to the code
3655         attribute.
3656         (SVE_COND_INT_OP): Delete.
3657         (SVE_COND_FP_OP): Rename to...
3658         (SVE_COND_FP_BINARY): ...this.
3660 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3662         * optabs.c (can_reuse_operands_p): New function.
3663         (maybe_legitimize_operands): Try to reuse the results for
3664         earlier operands.
3666 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3668         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
3669         Add {q} suffix to insn mnemonic.
3671 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3673         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
3674         (msp430_warn_func_return): New.
3676 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
3678         * fold-const.c (tree_nonzero_bits): New function.
3679         * fold-const.h (tree_nonzero_bits): Likewise.
3680         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
3681         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
3683 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3685         PR target/85900
3686         PR target/85345
3687         * varasm.c (assemble_alias): Check ifunc_resolver only on
3688         FUNCTION_DECL.
3690 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
3692         PR target/85903
3693         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
3694         when memory input operand is handled.
3696 2018-05-24  Luis Machado  <luis.machado@linaro.org>
3698         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3699         global.
3700         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3702 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3704         * match.pd: Delay FMA folds until after vectorization.
3706 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3708         PR target/83009
3709         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3710         address check not strict.
3712 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
3714         * gimple-match.h (gimple_match_op): New class.
3715         (mprts_hook): Replace parameters with a gimple_match_op *.
3716         (maybe_build_generic_op): Likewise.
3717         (gimple_simplified_result_is_gimple_val): Replace parameters with
3718         a const gimple_match_op *.
3719         (gimple_simplify): Replace code_helper * and tree * parameters with
3720         a gimple_match_op * parameter.
3721         (gimple_resimplify1): Replace code_helper *, tree and tree *
3722         parameters with a gimple_match_op * parameter.
3723         (gimple_resimplify2): Likewise.
3724         (gimple_resimplify3): Likewise.
3725         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
3726         parameters with a gimple_match_op * parameter.
3727         * gimple-match-head.c (gimple_simplify): Change prototypes of
3728         auto-generated functions to take a gimple_match_op * instead of
3729         separate code_helper * and tree * parameters.  Make the same
3730         change in the top-level overload and update calls to the
3731         gimple_resimplify routines.  Update calls to the auto-generated
3732         functions and to maybe_push_res_to_seq in the publicly-facing
3733         operation-specific gimple_simplify overloads.
3734         (gimple_match_op::MAX_NUM_OPS): Define.
3735         (gimple_resimplify1): Replace rcode and ops with a single res_op
3736         parameter.  Update call to gimple_simplify.
3737         (gimple_resimplify2): Likewise.
3738         (gimple_resimplify3): Likewise.
3739         (mprts_hook): Replace parameters with a gimple_match_op *.
3740         (maybe_build_generic_op): Likewise.
3741         (build_call_internal): Replace type, nargs and ops with
3742         a gimple_match_op *.
3743         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
3744         with a single gimple_match_op *.  Update calls to mprts_hook,
3745         build_call_internal and gimple_simplified_result_is_gimple_val.
3746         Factor out code that is common to the tree_code and combined_fn cases.
3747         * genmatch.c (expr::gen_transform): Replace tem_code and
3748         tem_ops with a gimple_match_op called tem_op.  Update calls
3749         to the gimple_resimplify functions and maybe_push_res_to_seq.
3750         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
3751         res_ops.  Update call to the gimple_resimplify functions.
3752         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
3753         (decision_tree::gen): Make the functions take a gimple_match_op *
3754         called res_op instead of separate res_code and res_ops parameters.
3755         Update call accordingly.
3756         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
3757         and ops with a single res_op parameter.  Update calls to
3758         maybe_build_generic_op and maybe_push_res_to_seq.
3759         (fold_stmt_1): Update calls to gimple_simplify and
3760         replace_stmt_with_simplification.
3761         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
3762         and gimple_simplified_result_is_gimple_val.
3763         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
3764         gimple_simplify.
3765         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
3766         with a gimple_match_op *.
3767         (vn_nary_build_or_lookup): Likewise.  Update call to
3768         vn_nary_build_or_lookup_1.
3769         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
3770         gimple_match_op *.  Update calls to the gimple_resimplify routines
3771         and to gimple_simplified_result_is_gimple_val.
3772         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
3773         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
3774         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
3775         (visit_nary_op): Likewise.
3776         (visit_reference_op_load): Likewise.
3778 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3780         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
3781         modifier for printing the step amount.
3783 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
3785         PR target/78849
3786         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
3787         types.
3789 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
3791         * doc/sourcebuild.texi (Endianness): New subsubsection.
3793 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3795         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3796         <prefetch_dynamic_strides>: New const bool field.
3797         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3798         prefetch_dynamic_strides.
3799         (exynosm1_prefetch_tune): Likewise.
3800         (thunderxt88_prefetch_tune): Likewise.
3801         (thunderx_prefetch_tune): Likewise.
3802         (thunderx2t99_prefetch_tune): Likewise.
3803         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
3804         false.
3805         (aarch64_override_options_internal): Update to set
3806         PARAM_PREFETCH_DYNAMIC_STRIDES.
3807         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
3808         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
3809         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
3810         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
3811         prefetch-dynamic-strides setting.
3813 2018-05-23  Luis Machado  <luis.machado@linaro.org>
3815         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
3816         <minimum_stride>: New const int field.
3817         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
3818         minimum_stride field defaulting to -1.
3819         (exynosm1_prefetch_tune): Likewise.
3820         (thunderxt88_prefetch_tune): Likewise.
3821         (thunderx_prefetch_tune): Likewise.
3822         (thunderx2t99_prefetch_tune): Likewise.
3823         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
3824         <default_opt_level>: Set to 3.
3825         (aarch64_override_options_internal): Update to set
3826         PARAM_PREFETCH_MINIMUM_STRIDE.
3827         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
3828         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
3829         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
3830         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
3831         stride is constant and is below the minimum stride threshold.
3833 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3835         * config/arm/arm-cpus.in (mode26): Delete.
3836         (armv4): Delete mode26 reference.
3837         * config/arm/arm.c (arm_configure_build_target): Delete use of
3838         isa_bit_mode26.
3840 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3842         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
3843         New insn pattern.
3844         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
3845         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
3846         for non-SSE modes.
3847         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
3848         (floatunsdidf2): Ditto.
3850 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
3852         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
3853         (fixuns_trunc<mode>si2_avx512f): Ditto.
3854         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
3855         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
3856         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
3858 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3860         PR rtl-optimization/79985
3861         * df-scan.c (df_insn_refs_collect): Remove special case for
3862         global registers and asm statements.
3864 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
3866         * extend.texi (Global Register Variables): Rewrite the bullet list.
3867         Note that the register is available for allocation. Note that access
3868         via inline asm must use constraints. Add note about async-signal
3869         handlers. Remove paragraph about automagic register selection.
3871 2018-05-23  Richard Biener  <rguenther@suse.de>
3873         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
3874         of fixed offset from memset VN.
3876 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
3878         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
3879         first_interp field.
3880         (alloc_cand_and_find_basis): Initialize first_interp field.
3881         (slsr_process_mul): Modify first_interp field.
3882         (slsr_process_add): Likewise.
3883         (slsr_process_cast): Modify first_interp field for each new
3884         interpretation.
3885         (slsr_process_copy): Likewise.
3886         (dump_candidate): Dump first_interp field.
3887         (replace_mult_candidate): Process all interpretations, not just
3888         subsequent ones.
3889         (replace_rhs_if_not_dup): Likewise.
3890         (replace_one_candidate): Likewise.
3892 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
3894         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
3895         Add new boolean.
3896         (aarch64_needs_frame_chain): New function.
3897         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
3899 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
3901         PR target/84882
3902         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
3903         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
3904         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
3905         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
3906         as true for strict-align.
3907         (aarch64_can_inline_p): Perform checks even when callee has no
3908         attributes to check for strict alignment.
3909         * doc/extend.texi (AArch64 Function Attributes): Document
3910         no-strict-align.
3911         * doc/invoke.texi: (AArch64 Options): Likewise.
3913 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
3915         PR tree-optimization/85853
3916         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
3917         the handling of the root of the node to...
3918         (vect_slp_analyze_node_operations_1): ...this new function,
3919         and run the whole thing with the child nodes' def types
3920         set according to their SLP node's def type.
3922 2018-05-23  Richard Biener  <rguenther@suse.de>
3924         PR middle-end/85874
3925         * tree-data-ref.c (create_runtime_alias_checks): Defer
3926         and ignore overflow warnings.
3928 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
3930         PR tree-optimization/85822
3931         * tree-vrp.c (is_masked_range_test): Fix handling of negative
3932         constants.
3934 2018-05-23  Richard Biener  <rguenther@suse.de>
3936         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3937         memset constants via native_interpret_expr.
3939 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
3941         PR target/85345
3942         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
3943         attribute.
3944         (cgraph_node::create_alias): Likewise.
3945         (cgraph_node::get_availability): Check ifunc_resolver instead
3946         of looking up ifunc attribute.
3947         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
3948         * varasm.c (do_assemble_alias): Likewise.
3949         (assemble_alias): Likewise.
3950         (default_binds_local_p_3): Likewise.
3951         * cgraph.h (cgraph_node): Add ifunc_resolver.
3952         (cgraph_node::only_called_directly_or_aliased_p): Return false
3953         for IFUNC resolver.
3954         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
3955         attribute.
3956         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
3957         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
3958         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
3959         instead of looking up ifunc attribute.
3961 2018-05-22  Luis Machado  <luis.machado@linaro.org>
3963         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
3965 2018-05-22  Martin Sebor  <msebor@redhat.com>
3967         PR middle-end/85359
3968         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
3969         only when expasion succeeds.
3970         (expand_builtin_strcmp): Same.
3971         (expand_builtin_strncmp): Same.
3973 2018-05-22  Martin Sebor  <msebor@redhat.com>
3975         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
3977 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3978             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3980         * config/aarch64/aarch64-ldpstp.md: Replace uses of
3981         aarch64_mem_pair_operand with memory_operand and delete operand swapping
3982         code.
3983         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
3984         Add check for legitimate_address.
3985         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
3986         (aarch64_swap_ldrstr_operands): New.
3987         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
3988         Define prototype.
3990 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
3991             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3993         * config/aarch64/aarch64.md: New patterns to generate stp
3994         and ldp.
3995         (store_pair_sw, store_pair_dw): New patterns to generate stp for
3996         single words and double words.
3997         (load_pair_sw, load_pair_dw): Likewise.
3998         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
3999         Delete.
4000         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4001         Delete.
4002         * config/aarch64/aarch64-ldpstp.md: Modify peephole
4003         for different mode ldpstp and add peephole for merged zero stores.
4004         Likewise for loads.
4005         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4006         Add size check.
4007         (aarch64_gen_store_pair): Rename calls to match new patterns.
4008         (aarch64_gen_load_pair): Rename calls to match new patterns.
4009         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4010         (load_pair<DREG:mode><DREG2:mode>): ... This.
4011         (store_pair<mode>): Rename to...
4012         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4013         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4014         New mode iterators.
4015         (V_INT_EQUIV): Handle SImode.
4016         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4017         New predicate.
4019 2018-05-22  Martin Sebor  <msebor@redhat.com>
4021         PR c/85623
4022         * calls.c (maybe_warn_nonstring_arg): Use string length to set
4023         or ajust the presumed bound on an operation to avoid unnecessary
4024         warnings.
4026 2018-05-22  Martin Sebor  <msebor@redhat.com>
4028         PR tree-optimization/85826
4029         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4030         assuming that a DECL necesarily has a constant size.
4032 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4034         PR middle-end/85862
4035         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4037 2018-05-22  Richard Biener  <rguenther@suse.de>
4039         PR tree-optimization/85834
4040         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4041         non-constant and non-zero memset arguments.
4043 2018-05-22  Martin Liska  <mliska@suse.cz>
4045         PR ipa/85607
4046         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4048 2018-05-22  Richard Biener  <rguenther@suse.de>
4050         PR tree-optimization/85863
4051         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4052         comparisons when vectype is specified.
4053         (vectorizable_condition): Do not specify vectype for
4054         vect_is_simple_cond when SLP vectorizing.
4056 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4058         PR target/85657
4059         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4060         define __ibm128 as long double.
4061         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4062         as a distinct type when IEEE 128-bit support is enabled.
4063         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4064         128-bit types to use the correct functions.
4065         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4066         convert between 128-bit floating point types that have different
4067         modes but the same representation, instead of using gen_lowpart to
4068         makean alias.
4069         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4070         KFmode.
4071         (IFKF_reg): New attributes to give the register constraints for
4072         IFmode and KFmode.
4073         (extend<mode>tf2_internal): New insns to mark an explicit
4074         conversion between 128-bit floating point types that have a
4075         different mode but share the same representation.
4077 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4079         PR tree-optimization/85814
4080         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4081         a null return from get_strinfo when unsharing the next
4082         strinfo in the chain.
4084 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4086         PR gcc/84923
4087         * varasm.c (weak_finish): Clean up weak_decls.
4089 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4091         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4092         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4093         UNSPEC_UADALP values.
4094         * config/aarch64/iterators.md (ABAL): New int iterator.
4095         (ABDL2): Likewise.
4096         (ADALP): Likewise.
4097         (sur): Add mappings for the above.
4098         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4099         New define_insn.
4100         (aarch64_<sur>abal<mode>_4): Likewise.
4101         (aarch64_<sur>adalp<mode>_3): Likewise.
4102         (<sur>sadv16qi): New define_expand.
4104 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4106         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4107         (*movdf_internal): Ditto.
4108         (*rcpsf2_sse): Ditto.
4109         (*rsqrtsf2_sse): Ditto.
4110         (*sqrt<mode>2_sse): Ditto.
4112 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4114         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4115         eor3q<mode>4.
4116         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4117         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4118         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4119         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4120         vbcaxq_s64): New.
4121         * config/aarch64/arm_neon.h: Likewise.
4122         * config/aarch64/iterators.md (VQ_I): New.
4124 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4126         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4127         arc*-*-linux*.
4128         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4129         MULTILIB_DIRNAMES
4131 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4133         * config/nds32/constraints.md (S): New constraint.
4134         * config/nds32/nds32.md (call_internal): Use constraint S.
4135         (call_value_internal): Likewise.
4136         (sibcall_internal): Likewise.
4137         (sibcall_value_internal): Likewise.
4139 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4140             Chung-Ju Wu  <jasonwucj@gmail.com>
4142         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4143         into consideration.
4145 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4146             Chung-Ju Wu  <jasonwucj@gmail.com>
4148         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4149         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4150         (nds32_rtx_costs_impl): Simplify.
4151         (nds32_address_cost_impl): Simplify.
4152         (nds32_init_rtx_costs): New function.
4153         (nds32_rtx_costs_speed_prefer): Likewise.
4154         (nds32_rtx_costs_size_prefer): Likewise.
4155         (nds32_address_cost_speed_prefer): Likewise.
4156         (nds32_address_cost_speed_fwprop): Likewise.
4157         (nds32_address_cost_size_prefer): Likewise.
4158         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4159         * config/nds32/nds32.c (nds32_option_override): Use
4160         nds32_init_rtx_costs function.
4162 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4164         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4165         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4166         (TARGET_PIPELINE_N8): Likewise.
4167         (TARGET_PIPELINE_N10): Likewise.
4168         (TARGET_PIPELINE_N13): Likewise.
4169         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4171 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4173         * config/nds32/nds32-fpu.md: Update copyright year.
4175 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4177         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4179 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4181         * config/nds32/nds32.c
4182         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4183         * config/nds32/nds32.opt (minline-asm-r15): New option.
4185 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4187         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4188         MASK_HW_ABS.
4189         * config/nds32/nds32.md (abssi2): New pattern.
4191 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4193         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4194         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4195         Merge insn pattern from sse_cvtsi2ss<round_name> and
4196         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4197         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4198         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4199         using SWI48 mode iterator.
4200         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4201         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4202         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4203         pattern from sse_cvttss2si<round_saeonly_name>
4204         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4205         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4206         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4207         using SWI48 mode iterator.
4208         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4209         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4210         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4211         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4212         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4213         using SWI48 mode iterator.
4214         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4215         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4216         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4217         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4218         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4219         SWI48 mode iterator.
4220         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4221         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4222         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4223         pattern from sse_cvttsd2si<round_saeonly_name>
4224         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4226 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4228         * config/nds32/nds32-md-auxiliary.c
4229         (nds32_valid_smw_lwm_base_p): Refine.
4230         (nds32_output_smw_single_word): Refine.
4231         (nds32_output_smw_double_word): New.
4232         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4234 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4236         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4237         (nds32_output_stack_pop): Refine.
4238         (nds32_expand_unaligned_load): Refine.
4239         (nds32_expand_unaligned_store): Refine.
4241 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4242             Chung-Ju Wu  <jasonwucj@gmail.com>
4244         * config/nds32/constants.md: Add TP_REGNUM constant.
4245         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4246         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4247         UNSPEC_ADD32.
4248         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4249         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4250         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4251         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4252         and PIC code generation.
4253         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4254         code generation.
4255         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4256         optimization.
4257         * config/nds32/nds32.md: Support TLS and PIC.
4258         * config/nds32/nds32.c: Support TLS and PIC.
4259         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4260         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4261         predicate.
4263 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4265         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4266         mode with E_ prefix.
4268 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4269             Chung-Ju Wu  <jasonwucj@gmail.com>
4271         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4272         * config/nds32/nds32-md-auxiliary.c
4273         (symbolic_reference_mentioned_p): New.
4274         (nds32_legitimize_ict_address): New.
4275         (nds32_expand_ict_move): New.
4276         (nds32_indirect_call_referenced_p): New.
4277         (nds32_symbol_binds_local_p): Delete.
4278         (nds32_long_call_p): Modify.
4279         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4280         * config/nds32/nds32-protos.h
4281         (symbolic_reference_mentioned_p): Declare.
4282         (nds32_legitimize_ict_address): Declare.
4283         (nds32_expand_ict_move): Declare.
4284         (nds32_indirect_call_referenced_p): Declare.
4285         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4286         (nds32_relax_group): Use nds32_ict_const_p as condition.
4287         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4288         (nds32_asm_file_start): Output ict_model directive in asm code.
4289         (nds32_legitimate_address_p): Consider indirect call.
4290         (nds32_print_operand): Consider indirect call.
4291         (nds32_print_operand_address): Consider indirect call.
4292         (nds32_insert_attributes): Handle "indirect_call" attribute.
4293         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4294         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4295         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4296         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4297         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4298         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4299         (TARGET_ICT_MODEL_SMALL): Define.
4300         (TARGET_ICT_MODEL_LARGE): Define.
4301         * config/nds32/nds32.md (movsi): Consider ict model.
4302         (call, call_value): Consider ict model.
4303         (sibcall, sibcall_value): Consider ict model.
4304         * config/nds32/nds32.opt (mict-model): New option.
4305         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4306         model.
4308 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4309             Monk Chiang  <sh.chiang04@gmail.com>
4310             Jim Wilson <jimw@sifive.com>
4312         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4313         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4314         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4315         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4316         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4317         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4318         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4319         compute save_libcall_adjustment properly.
4320         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4321         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4322         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4323         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4324         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4325         (ABI_SPEC): Handle mabi=ilp32e.
4326         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4327         (RVE): Add RVE mask.
4328         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4329         <-march>: Add rv32e as an example.
4331 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4333         PR c++/82899
4334         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4335         (intra_create_variable_infos): Handle C++ constructors.
4337 2018-05-18  Martin Liska  <mliska@suse.cz>
4339         * passes.def: Remove a redundant pass.
4341 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4343         PR bootstrap/85838
4344         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4346 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4348         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4349         (ARMv4): Update.
4350         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4351         (ARMv6m): Update.
4352         (armv2, armv2a, armv3, armv3m): Delete architectures.
4353         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4354         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4355         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4356         Delete cpus.
4357         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4358         (*mulsidi3adddi): Likewise.
4359         (mulsidi3): Likewise.
4360         (*mulsidi3_nov6): Likewise.
4361         (umulsidi3): Likewise.
4362         (umulsidi3_nov6): Likewise.
4363         (umaddsidi4): Likewise.
4364         (*umulsidi3adddi): Likewise.
4365         (smulsi3_highpart): Likewise.
4366         (*smulsi3_highpart_nov6): Likewise.
4367         (umulsi3_highpart): Likewise.
4368         (*umulsi3_highpart_nov6): Likewise.
4369         * config/arm/arm.h (arm_arch3m): Delete.
4370         * config/arm/arm.c (arm_arch3m): Delete.
4371         (arm_option_override_internal): Update armv3-related comment.
4372         (arm_configure_build_target): Delete use of isa_bit_mode32.
4373         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4374         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4375         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4376         (mulsa3): Likewise.
4377         (mulusa3): Likewise.
4378         * config/arm/arm-protos.h (arm_arch3m): Delete.
4379         * config/arm/arm-tables.opt: Regenerate.
4380         * config/arm/arm-tune.md: Likewise.
4381         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4382         deleted architectures.
4384 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4386         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4387         (armv5t, armv5te): New features.
4388         (ARMv5, ARMv5e): Delete fgroups.
4389         (ARMv5t, ARMv5te): Adjust for above changes.
4390         (ARMv6m): Likewise.
4391         (armv5, armv5e): Delete arches.
4392         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4393         arm_arch5.
4394         (*call_reg_arm): Likewise.
4395         (*call_value_reg_armv5): Likewise.
4396         (*call_value_reg_arm): Likewise.
4397         (*call_symbol): Likewise.
4398         (*call_value_symbol): Likewise.
4399         (*sibcall_insn): Likewise.
4400         (*sibcall_value_insn): Likewise.
4401         (clzsi2): Likewise.
4402         (prefetch): Likewise.
4403         (define_split and define_peephole2 dependent on arm_arch5):
4404         Likewise.
4405         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4406         arm_arch5e.
4407         (TARGET_ARM_QBIT): Likewise.
4408         (TARGET_DSP_MULTIPLY): Likewise.
4409         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4410         (arm_arch5, arm_arch5e): Delete.
4411         (arm_arch5t, arm_arch5te): Declare.
4412         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4413         (arm_arch5t): Declare.
4414         (arm_option_reconfigure_globals): Update for the above.
4415         (arm_options_perform_arch_sanity_checks): Update comment, replace
4416         use of arm_arch5 with arm_arch5t.
4417         (use_return_insn): Likewise.
4418         (arm_emit_call_insn): Likewise.
4419         (output_return_instruction): Likewise.
4420         (arm_final_prescan_insn): Likewise.
4421         (arm_coproc_builtin_available): Likewise.
4422         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4423         arm_arch5e with arm_arch5t and arm_arch5te.
4424         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4425         (arm_arch5t, arm_arch5te): Declare.
4426         * config/arm/arm-tables.opt: Regenerate.
4427         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4428         * config/arm/t-multilib: Likewise.
4429         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4430         instead of arm_arch5.
4431         (*call_reg_thumb1): Likewise.
4432         (*call_value_reg_thumb1_v5): Likewise.
4433         (*call_value_reg_thumb1): Likewise.
4434         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4435         unreachable path.
4436         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4438 2018-05-18  Martin Liska  <mliska@suse.cz>
4440         PR gcov-profile/84846
4441         * doc/gcov.texi: Document -t option of gcov tool.
4443 2018-05-18  Martin Liska  <mliska@suse.cz>
4445         PR gcov-profile/84846
4446         * gcov.c (print_usage): Add new -t option.
4447         (process_args): Handle the option.
4448         (generate_results): Use stdout as output when requested by
4449         the option.
4451 2018-05-18  Martin Liska  <mliska@suse.cz>
4453         PR gcov-profile/84846
4454         * coverage.c (coverage_init): Write PWD to .gcno file.
4455         * doc/gcov.texi: Document how working directory is printed.
4456         * gcov-dump.c (dump_gcov_file): Print PWD.
4457         * gcov.c (output_intermediate_file): Likewise.
4458         (read_graph_file): Read PWD string.
4459         (output_lines): Print PWD.
4461 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4463         PR middle-end/85817
4464         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4465         for retval and return false if all args to phi are zero.
4467 2018-05-18  Richard Biener  <rguenther@suse.de>
4469         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4470         method.
4471         (evrp_dom_walker::before_dom_children): Call it.
4473 2018-05-18  Richard Biener  <rguenther@suse.de>
4475         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4476         results when processing array refs with variable index.
4478 2018-05-18  Toon Moene  <toon@moene.org>
4480         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4481         directly after that of -floop-interchange. Indicate that both
4482         options are enabled by default when specifying -O3.
4484 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4486         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4487         iterator.  Delete separate integer-mode vec_set<mode> expander.
4488         (aarch64_simd_vec_setv2di): Delete.
4489         (vec_setv2di): Delete.
4490         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4491         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4492         the "w, r" alternative.
4494 2018-05-18  Martin Liska  <mliska@suse.cz>
4496         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4497         * tree-pass.h (make_pass_lower_switch_O0): New function.
4498         * tree-switch-conversion.c (node_has_low_bound): Remove.
4499         (node_has_high_bound): Likewise.
4500         (node_is_bounded): Likewise.
4501         (class pass_lower_switch): Make it a template type and create
4502         two instances.
4503         (pass_lower_switch::execute): Add template argument.
4504         (make_pass_lower_switch): New function.
4505         (make_pass_lower_switch_O0): New function.
4506         (do_jump_if_equal): Remove.
4507         (emit_case_nodes): Simplify to just handle all 3 cases and leave
4508         all the hard work to tree optimization passes.
4510 2018-05-18  Martin Liska  <mliska@suse.cz>
4512         * dbgcnt.c (limit_low): Renamed from limit.
4513         (limit_high): New variable.
4514         (dbg_cnt_is_enabled): Check for upper limit.
4515         (dbg_cnt): Adjust dumping.
4516         (dbg_cnt_set_limit_by_index): Add new argument for high
4517         value.
4518         (dbg_cnt_set_limit_by_name): Likewise.
4519         (dbg_cnt_process_single_pair): Parse new format.
4520         (dbg_cnt_process_opt): Use strtok.
4521         (dbg_cnt_list_all_counters): Remove 'value' and add
4522         'limit_high'.
4523         * doc/invoke.texi: Document changes.
4525 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4527         * doc/sourcebuild.texi (scalar_all_fma): Document.
4528         * tree.def (FMA_EXPR): Delete.
4529         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4530         * internal-fn.c (ternary_direct): New macro.
4531         (expand_ternary_optab_fn): Likewise.
4532         (direct_ternary_optab_supported_p): Likewise.
4533         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4534         * builtins.c (fold_builtin_fma): Delete.
4535         (fold_builtin_3): Don't call it.
4536         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4537         * expr.c (expand_expr_real_2): Likewise.
4538         * fold-const.c (operand_equal_p): Likewise.
4539         (fold_ternary_loc): Likewise.
4540         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4541         * gimple.c (DEFTREECODE): Likewise.
4542         * gimplify.c (gimplify_expr): Likewise.
4543         * optabs-tree.c (optab_for_tree_code): Likewise.
4544         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4545         * tree-eh.c (operation_could_trap_p): Likewise.
4546         (stmt_could_throw_1_p): Likewise.
4547         * tree-inline.c (estimate_operator_cost): Likewise.
4548         * tree-pretty-print.c (dump_generic_node): Likewise.
4549         (op_code_prio): Likewise.
4550         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4551         * tree-ssa-operands.c (get_expr_operands): Likewise.
4552         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
4553         * fold-const-call.h (fold_fma): Delete.
4554         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
4555         CFN_FNMA and CFN_FNMS.
4556         (fold_fma): Delete.
4557         * genmatch.c (combined_fn): New enum.
4558         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
4559         (commutative_op): New function.
4560         (commutate): Use it.  Handle more than 2 operands.
4561         (dt_operand::gen_gimple_expr): Use commutative_op.
4562         (parser::parse_expr): Allow :c to be used with non-binary
4563         operators if the commutative operand is known.
4564         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
4565         CFN_FMS, CFN_FNMA and CFN_FNMS.
4566         (backprop::process_assign_use): Remove FMA_EXPR handling.
4567         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
4568         (gen_hsa_fma): New function.
4569         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
4570         IFN_FNMA and IFN_FNMS.
4571         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
4572         * gimple-fold.h (follow_all_ssa_edges): Declare.
4573         * gimple-fold.c (follow_all_ssa_edges): New function.
4574         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
4575         gimple_build interface and use follow_all_ssa_edges to fold the result.
4576         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
4577         instead of checking for optabs directly.
4578         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
4579         rather than FMA_EXPRs.
4580         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
4581         call to IFN_FMA instead of an FMA_EXPR.
4583 2018-05-17  Jim Wilson  <jimw@sifive.com>
4585         * expr.c (do_tablejump): When converting index to Pmode, if we have a
4586         sign extended promoted subreg, and the range does not have the sign bit
4587         set, then do a sign extend.
4589         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
4590         test, check for sign extended subreg and/or constant operands, and
4591         do a sign extend in that case.
4593 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
4595         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
4596         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
4597         Add untyped.
4598         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
4599         Change logics_shift_reg to logics_shift_imm.
4600         (thunderx2t99_fp_loadpair_basic): Delete.
4601         (thunderx2t99_fp_storepair_basic): Delete.
4602         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
4603         (thunderx2t99_asimd_polynomial): Delete.
4604         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
4605         and neon_fp_mul_d_scalar_q.
4606         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
4607         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
4608         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
4609         (thunderx2t99_asimd_lut): Add missing tbl types.
4610         (thunderx2t99_asimd_ext): Delete.
4611         (thunderx2t99_asimd_load1_1_mult): Delete.
4612         (thunderx2t99_asimd_load1_2_mult): Delete.
4613         (thunderx2t99_asimd_load1_ldp): New.
4614         (thunderx2t99_asimd_load1): New.
4615         (thunderx2t99_asimd_load2): Add missing *load2* types.
4616         (thunderx2t99_asimd_load3): New.
4617         (thunderx2t99_asimd_load4): New.
4618         (thunderx2t99_asimd_store1_1_mult): Delete.
4619         (thunderx2t99_asimd_store1_2_mult): Delete.
4620         (thunderx2t99_asimd_store2_mult): Delete.
4621         (thunderx2t99_asimd_store2_onelane): Delete.
4622         (thunderx2t99_asimd_store_stp): New.
4623         (thunderx2t99_asimd_store1): New.
4624         (thunderx2t99_asimd_store2): New.
4625         (thunderx2t99_asimd_store3): New.
4626         (thunderx2t99_asimd_store4): New.
4628 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
4630         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
4631         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
4633 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
4634             Segher Boessenkool  <segher@kernel.crashing.org>
4636         PR target/85698
4637         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
4638         operand.
4640 2018-05-17  Richard Biener  <rguenther@suse.de>
4642         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
4643         for pruning loop and prune defs feeding only already visited PHIs.
4645 2018-05-17  Richard Biener  <rguenther@suse.de>
4647         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
4649 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
4650             Richard Biener  <rguenther@suse.de>
4652         PR tree-optimization/85793
4653         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4654         for VMAT_ELEMENTWISE.
4656 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4658         * internal-fn.h (lookup_internal_fn): Declare
4659         * internal-fn.c (lookup_internal_fn): New function.
4660         * gimple.c (gimple_build_call_from_tree): Handle calls to
4661         internal functions.
4662         * gimple-pretty-print.c (dump_gimple_call): Print "." before
4663         internal function names.
4664         * tree-pretty-print.c (dump_generic_node): Likewise.
4665         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
4667 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
4669         * gimple-fold.h (gimple_build): Make the function forms take
4670         combined_fn rather than built_in_function.
4671         (gimple_simplify): Likewise.
4672         * gimple-match-head.c (gimple_simplify): Likewise.
4673         * gimple-fold.c (gimple_build): Likewise.
4674         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
4675         rather than gimple_build_call_internal.
4676         (get_initial_defs_for_reduction): Likewise.
4677         (vect_create_epilog_for_reduction): Likewise.
4678         (vectorizable_live_operation): Likewise.
4680 2018-05-17  Martin Liska  <mliska@suse.cz>
4682         * gimple-ssa-sprintf.c (format_directive): Do not use
4683         space in between 'G_' and '('.
4685 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
4687         PR target/85323
4688         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
4689         even if the mask is not all ones.
4691         PR target/85323
4692         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
4693         vector.
4694         (ix86_gimple_fold_builtin): Likewise.
4696         PR target/85323
4697         * config/i386/i386.c: Include tree-vector-builder.h.
4698         (ix86_vector_shift_count): New function.
4699         (ix86_fold_builtin): Fold shift builtins by scalar count.
4700         (ix86_gimple_fold_builtin): Likewise.
4702         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
4703         _mm512_setzero): New intrinsics.
4705 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
4706             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4708         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
4709         code generation for cases where splatting a value is not useful.
4710         * simplify-rtx.c (simplify_ternary_operation): Simplify
4711         vec_merge across a vec_duplicate and a paradoxical subreg forming
4712         a vector mode to a vec_concat.
4714 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
4716         * config.gcc: Support "goldmont-plus".
4717         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4718         "goldmont-plus".
4719         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4720         PROCESSOR_GOLDMONT_PLUS.
4721         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
4722         (processor_target_table): Add "goldmont-plus".
4723         (PTA_GOLDMONT_PLUS): Define.
4724         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
4725         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
4726         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
4727         (fold_builtin_cpu): Add "goldmont-plus".
4728         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
4729         (ix86_option_override_internal): Add "goldmont-plus".
4730         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
4731         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
4732         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
4733         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
4735 2018-05-17  Richard Biener  <rguenther@suse.de>
4737         PR tree-optimization/85757
4738         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
4739         remove defs that only feed that PHI from further processing.
4741 2018-05-16  Jim Wilson  <jimw@sifive.com>
4743         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
4744         asterisk to name.
4745         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
4747 2018-05-16  Mark Wielaard  <mark@klomp.org>
4749         * dwarf2out.c (count_index_strings): New function.
4750         (output_indirect_strings): Call count_index_strings and generate
4751         header for dwarf_version >= 5.
4753 2018-05-16  Mark Wielaard  <mark@klomp.org>
4755         * dwarf2out.c (dwarf_FORM): New function.
4756         (set_indirect_string): Use dwarf_FORM.
4757         (reset_indirect_string): Likewise.
4758         (size_of_die): Likewise.
4759         (value_format): Likewise.
4760         (output_die): Likewise.
4761         (add_skeleton_AT_string): Likewise.
4762         (output_macinfo_op): Likewise.
4763         (index_string): Likewise.
4764         (output_index_string_offset): Likewise.
4765         (output_index_string): Likewise.
4766         (count_index_strings): Likewise.
4768 2018-05-16  Carl Love  <cel@us.ibm.com>
4770         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
4771         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
4773 2018-05-16  Martin Jambor  <mjambor@suse.cz>
4775         * ipa-prop.c (ipa_free_all_edge_args): Remove.
4776         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
4778 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
4780         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
4781         (fnma<mode>4): Likewise.
4782         (fms<mode>4): Likewise.
4783         (fnms<mode>4): Likewise.
4784         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
4785         (aarch64_fnma<mode>4): Likewise.
4786         (aarch64_fms<mode>4): Likewise.
4787         (aarch64_fnms<mode>4): Likewise.
4788         (aarch64_fnmadd<mode>4): Likewise.
4790 2018-05-16  Jason Merrill  <jason@redhat.com>
4792         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
4794 2018-05-16  Richard Biener  <rguenther@suse.de>
4796         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4797         (dump_stmt_cost): Declare.
4798         (add_stmt_cost): Dump cost we add.
4799         (add_stmt_costs): New function.
4800         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
4801         No longer exported.
4802         (vect_analyze_stmt): Adjust prototype.
4803         (vectorizable_condition): Likewise.
4804         (vectorizable_live_operation): Likewise.
4805         (vectorizable_reduction): Likewise.
4806         (vectorizable_induction): Likewise.
4807         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
4808         cost vector to pass to vectorizable_ and record afterwards.
4809         (vect_model_reduction_cost): Take cost vector argument and adjust.
4810         (vect_model_induction_cost): Likewise.
4811         (vectorizable_reduction): Likewise.
4812         (vectorizable_induction): Likewise.
4813         (vectorizable_live_operation): Likewise.
4814         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
4815         SLP_TREE_NUMBER_OF_VEC_STMTS.
4816         (vect_analyze_slp_cost_1): Remove.
4817         (vect_analyze_slp_cost): Likewise.
4818         (vect_slp_analyze_node_operations): Take visited args and
4819         a target cost vector.  Avoid processing already visited stmt sets.
4820         (vect_slp_analyze_operations): Use a local cost vector to gather
4821         costs and register those of non-discarded instances.
4822         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
4823         (vect_schedule_slp_instance): Remove copying of
4824         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
4825         zero.
4826         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
4827         adding cost.  Record cost entry location.
4828         (vect_prologue_cost_for_slp_op): Function to compute cost of
4829         a constant or invariant generated for SLP vect in the prologue,
4830         split out from vect_analyze_slp_cost_1.
4831         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
4832         (vect_model_promotion_demotion_cost): Likewise.
4833         (vect_model_store_cost): Likewise, make static.
4834         (vect_model_load_cost): Likewise.
4835         (vectorizable_bswap): Add cost vector arg and adjust.
4836         (vectorizable_call): Likewise.
4837         (vectorizable_simd_clone_call): Likewise.
4838         (vectorizable_conversion): Likewise.
4839         (vectorizable_assignment): Likewise.
4840         (vectorizable_shift): Likewise.
4841         (vectorizable_operation): Likewise.
4842         (vectorizable_store): Likewise.
4843         (vectorizable_load): Likewise.
4844         (vectorizable_condition): Likewise.
4845         (vectorizable_comparison): Likewise.
4846         (can_vectorize_live_stmts): Likewise.
4847         (vect_analyze_stmt): Likewise.
4848         (vect_transform_stmt): Adjust calls to vectorizable_*.
4849         * tree-vectorizer.c: Include gimple-pretty-print.h.
4850         (dump_stmt_cost): New function.
4852 2018-05-16  Richard Biener  <rguenther@suse.de>
4854         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
4855         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
4856         * tree-ssa-dse.c: Include tree-ssa-loop.h.
4857         (check_name): New callback.
4858         (dse_classify_store): Track cycles via a visited bitmap of PHI
4859         defs and simplify handling of in-loop and across loop dead stores
4860         and properly fail for loop-variant refs.  Handle byte-tracking with
4861         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
4862         limiting the walk.
4864 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
4866         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
4867         (vect_get_mask_type_for_stmt): Likewise.
4868         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
4869         split out from...
4870         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
4871         to determine the statement's vector type and the vector type that
4872         should be used for calculating nunits.  Deal with cases in which
4873         the type has to be deferred.
4874         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
4875         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
4876         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
4877         (vect_determine_vf_for_stmt): New functions, split out from...
4878         (vect_determine_vectorization_factor): ...here.
4879         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
4880         (vect_get_mask_type_for_stmt): New functions, split out from
4881         vect_determine_vectorization_factor.
4883 2018-05-16  Richard Biener  <rguenther@suse.de>
4885         * tree-cfg.c (verify_gimple_assign_ternary): Properly
4886         verify the [VEC_]COND_EXPR embedded comparison.
4888 2018-05-15  Martin Sebor  <msebor@redhat.com>
4890         PR tree-optimization/85753
4891         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
4892         RECORD_TYPE in addition to ARRAY_TYPE.
4894 2018-05-15  Martin Sebor  <msebor@redhat.com>
4896         PR middle-end/85643
4897         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4899 2018-05-15  Richard Biener  <rguenther@suse.de>
4901         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
4902         add by_clobber_p one.  Change algorithm to collect all defs
4903         representing uses we need to walk and try reducing them to
4904         a single one before failing.
4905         (dse_dom_walker::dse_optimize_stmt): Adjust.
4907 2018-05-13  Mark Wielaard  <mark@klomp.org>
4909         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
4910         (size_of_loc_descr): Likewise.
4911         (output_loc_operands): Likewise.
4912         (output_loc_operands_raw): Likewise.
4913         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
4914         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
4915         (hash_loc_operands): Likewise.
4916         (compare_loc_operands): Likewise.
4918 2018-05-14  Mark Wielaard  <mark@klomp.org>
4920         * dwarf2out.c (count_index_addrs): New function.
4921         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
4923 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4925         PR tree-optimization/83648
4926         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
4927         return value as malloc candidate.
4929 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4931         PR ipa/85734
4932         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
4933         param as true in call to suggest_attribute.
4935 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
4937         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
4938         -mreadonly-in-sdata.
4940 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4942         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
4943         New pattern.
4944         (aarch64_crypto_aesd_fused): Likewise.
4946 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
4948         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
4949         (movsi_aarch64): Likewise.
4950         (load_pairsi): Likewise.
4951         (load_pairdi): Likewise.
4952         (store_pairsi): Likewise.
4953         (store_pairdi): Likewise.
4954         (load_pairsf): Likewise.
4955         (load_pairdf): Likewise.
4956         (store_pairsf): Likewise.
4957         (store_pairdf): Likewise.
4958         (zero_extend): Likewise.
4959         (trunc): Swap alternatives.
4960         (fcvt_target): Add '?' to prefer w over r.
4962 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
4964         PR target/85756
4965         * config/i386/i386.md: Disallow non-commutative arithmetics in
4966         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4967         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
4968         in the peephole2 before it.
4970 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
4972         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
4973         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
4974         (ix86_handle_option): Handle -mcldemote.
4975         * config.gcc: New header.
4976         * config/i386/cldemoteintrin.h: New file.
4977         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
4978         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
4979         -mcldemote.
4980         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4981         OPTION_MASK_ISA_CLDEMOTE.
4982         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
4983         (ix86_valid_target_attribute_inner_p): Ditto.
4984         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
4985         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
4986         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
4987         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
4988         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
4989         (cldemote): New.
4990         * config/i386/i386.opt: Add -mcldemote.
4991         * config/i386/x86intrin.h: New header.
4992         * doc/invoke.texi: Add -mcldemote.
4994 2018-05-14  Richard Biener  <rguenther@suse.de>
4996         * doc/match-and-simplify.texi: Adjust :s documentation.
4998 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
5000         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5001         intended memcpy size.
5002         (REORDER_45): Likewise.
5004 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
5006         * sort.cc: New file.
5007         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5008         * vec.c (qsort_chk): Use gcc_qsort.
5009         * Makefile.in (OBJS-libcommon): Add sort.o.
5010         (build/sort.o): New target.  Use it...
5011         (BUILD_RTL): ... here, and...
5012         (build/gencfn-macros): ... here, and...
5013         (build/genmatch): ... here.
5015 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5016             Chung-Ju Wu  <jasonwucj@gmail.com>
5018         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5019         * config/nds32/nds32-graywolf.md: New file.
5020         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5021         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5022         pipeline.
5023         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5024         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5025         * config/nds32/nds32.md (pipeline_model): Add graywolf.
5026         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5027         * config/nds32/pipelines.md: Include n15 settings.
5029 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5030             Chung-Ju Wu  <jasonwucj@gmail.com>
5032         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5033         * config/nds32/nds32-n13.md: New file.
5034         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5035         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5036         pipeline.
5037         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5038         * config/nds32/nds32.md (pipeline_model): Add n13.
5039         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5040         * config/nds32/pipelines.md: Include n13 settings.
5042 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5043             Chung-Ju Wu  <jasonwucj@gmail.com>
5045         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5046         * config/nds32/nds32-n10.md: New file.
5047         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5048         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5049         pipeline.
5050         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5051         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5052         * config/nds32/nds32.md (pipeline_model): Add n10.
5053         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5054         * config/nds32/pipelines.md: Include n10 settings.
5056 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5057             Kito Cheng  <kito.cheng@gmail.com>
5058             Chung-Ju Wu  <jasonwucj@gmail.com>
5060         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5061         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5062         Add enum values for DSP extension instructions.
5063         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5064         New constraints.
5065         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5066         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5067         New code iterators.
5068         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5069         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5070         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5071         * config/nds32/nds32-intrinsic.md: Likewise.
5072         * config/nds32/nds32_intrinsic.h: Likewise.
5073         * config/nds32/nds32-md-auxiliary.c: Likewise.
5074         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5075         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5076         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5077         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5078         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5079         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5080         TYPE_DMAC in switch statement.
5081         * config/nds32/nds32.c: New checking and implementation for DSP
5082         extension instructions.
5083         * config/nds32/nds32.h: Likewise.
5084         * config/nds32/nds32.md: Likewise.
5085         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5086         * config/nds32/predicates.md: Implement new predicates for DSP
5087         extension.
5089 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5091         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5092         Reformat alternatives and attributes so it is easier to identify
5093         which constraints/attributes go with which instruction.
5094         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5095         (mov<mode>_softfloat32, FMOVE64): Likewise.
5096         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5097         (mov<mode>_softfloat64, FMOVE64): Likewise.
5099 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5101         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5102         subsection.
5103         (Basic PowerPC Built-in Functions): The new name of the
5104         subsection previously known as "PowerPC Built-in Functions".
5105         (Basic PowerPC Built-in Functions Available on all Configurations):
5106         New subsubsection.
5107         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5108         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5109         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5110         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5112 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5114         PR ipa/85655
5115         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5116         single const.
5118 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5120         PR target/85733
5121         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5123 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5125         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5126         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5127         (ix86_handle_option): Handle -mwaitpkg.
5128         * config.gcc: New header.
5129         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5130         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5131         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5132         function type.
5133         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5134         OPTION_MASK_ISA_WAITPKG.
5135         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5136         (ix86_option_override_internal): Add PTA_WAITPKG.
5137         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5138         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5139         IX86_BUILTIN_TPAUSE.
5140         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5141         __builtin_ia32_umwait and __builtin_ia32_tpause.
5142         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5143         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5144         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5145         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5146         UNSPECV_TPAUSE): New.
5147         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5148         * config/i386/i386.opt: Add -mwaitpkg.
5149         * config/i386/waitpkgintrin.h: New file.
5150         * config/i386/x86intrin.h: New header.
5151         * doc/invoke.texi: Add -mwaitpkg.
5153 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5155         PR target/85606
5156         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5157         equivalent.
5158         (cortex-m0): Use armv6s-m isa.
5159         (cortex-m0plus): Likewise.
5160         (cortex-m1): Likewise.
5161         (cortex-m0.small-multiply): Likewise.
5162         (cortex-m0plus.small-multiply): Likewise.
5163         (cortex-m1.small-multiply): Likewise.
5165 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5166             Jakub Jelinek  <jakub@redhat.com>
5168         PR tree-optimization/85692
5169         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5170         source permute as well.
5172 2018-05-11  Martin Liska  <mliska@suse.cz>
5174         PR sanitizer/85556
5175         * doc/extend.texi: Document LLVM style format for no_sanitize
5176         attribute.
5178 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5180         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5181         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5182         (mode_supports_vsx_dform_quad): Likewise.
5183         (mode_supports_vmx_dform): Move these functions to be next to the
5184         other mode_supports functions.
5185         (mode_supports_dq_form): Likewise.
5186         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5187         mode_supports_dq_form.
5188         (reg_offset_addressing_ok_p): Likewise.
5189         (offsettable_ok_by_alignment): Likewise.
5190         (rs6000_legitimate_offset_address_p): Likewise.
5191         (legitimate_lo_sum_address_p): Likewise.
5192         (rs6000_legitimize_address): Likewise.
5193         (rs6000_legitimize_reload_address): Likewise.
5194         (rs6000_secondary_reload_inner): Likewise.
5195         (rs6000_preferred_reload_class): Likewise.
5196         (rs6000_output_move_128bit): Likewise.
5198 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5200         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5201         Generate SImode target register for null target.
5202         <case IX86_BUILTIN_XGETBV>: Ditto.
5203         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5204         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5206 2018-05-10  Carl Love  <cel@us.ibm.com>
5208         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5209         dcbtt and dcbtstt if operands[2] is 0.
5211 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5213         PR target/85693
5214         * config/i386/sse.md (usadv64qi): New expander.
5216 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5218         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5219         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5220         -maltivec=be support.
5221         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5222         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5223         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5224         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5225         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5226         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5227         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5228         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5229         altivec_vsumsws): Adjust.
5230         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5231         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5232         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5233         support.
5234         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5235         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5236         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5237         (altivec_lve<VI_char>x): Delete expand.
5238         (*altivec_lve<VI_char>x_internal): Rename to...
5239         (altivec_lve<VI_char>x): ... this.
5240         (altivec_lvxl_<mode>): Delete expand.
5241         (*altivec_lvxl_<mode>_internal): Rename to ...
5242         (altivec_lvxl_<mode>): ... this.
5243         (altivec_stvxl_<mode>): Delete expand.
5244         (*altivec_stvxl_<mode>_internal): Rename to ...
5245         (altivec_stvxl_<mode>): ... this.
5246         (altivec_stve<VI_char>x): Delete expand.
5247         (*altivec_stve<VI_char>x_internal): Rename to ...
5248         (altivec_stve<VI_char>x): ... this.
5249         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5250         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5251         reduc_plus_scal_<mode>): Adjust.
5252         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5253         comment.
5254         (rs6000_cpu_cpp_builtins): Adjust.
5255         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5256         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5257         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5258         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5259         -maltivec=be support.
5260         (rs6000_split_vec_extract_var): Adjust.
5261         (rs6000_split_v4si_init): Adjust.
5262         (swap_selector_for_mode): Delete.
5263         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5264         altivec_expand_stvex_be): Delete.
5265         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5266         -maltivec=be support.
5267         (rs6000_gimple_fold_builtin): Ditto.
5268         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5269         Adjust.
5270         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5271         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5272         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5273         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5274         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5275         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5276         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5277         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5278         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5279         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5280         anonymous split): Adjust.
5281         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5282         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5284 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5286         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5287         when --with-gxx-include-dir is also specified.
5288         * configure: Regenerate.
5290 2018-05-09  Jim Wilson  <jimw@sifive.com>
5292         PR target/84797
5293         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5294         * config/riscv/t-withmultilib: New.
5295         * config/riscv/withmultilib.h: New.
5296         * doc/install.texi: Document RISC-V --with-multilib-list support.
5298 2018-05-09  Richard Biener  <rguenther@suse.de>
5300         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5301         vector.
5302         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5303         actual scalar cost using the cost vector and the add_stmt_cost
5304         machinery.
5306 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5308         PR rtl-optimization/85645
5309         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5310         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5312 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5314         PR rtl-optimization/85645
5315         * shrink-wrap.c (spread_components): Return a boolean saying if
5316         anything was changed.
5317         (try_shrink_wrapping_separate): Iterate spread_components until
5318         nothing changes anymore.
5320 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5322         PR rtl-optimization/85645
5323         * regrename.c (build_def_use): Also kill the chains that include the
5324         destination of a REG_CFA_REGISTER note.
5326 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5328         PR rtl-optimization/85645
5329         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5330         insn that has a REG_CFA_REGISTER note.
5332 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5334         * cfgexpand.c (expand_clobber): New function.
5335         (expand_gimple_stmt_1): Use it.
5336         * tree-vect-stmts.c (vect_clobber_variable): New function,
5337         split out from...
5338         (vectorizable_simd_clone_call): ...here.
5339         (vectorizable_store): Emit a clobber either side of an
5340         IFN_STORE_LANES sequence.
5341         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5343 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5345         PR target/85626
5346         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5347         (define_insn "trap_if_false"): Add exit after trap.
5349 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5351         PR rtl-optimization/85638
5352         * bb-reorder.c: Include common/common-target.h.
5353         (create_forwarder_block): New function extracted from...
5354         (fix_up_crossing_landing_pad): ...here.  Rename into...
5355         (dw2_fix_up_crossing_landing_pad): ...this.
5356         (sjlj_fix_up_crossing_landing_pad): New function.
5357         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5358         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5359         from both partitions and exit the loop after one iteration.
5361 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5363         Revert:
5364         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5365         subsection.
5366         (Basic PowerPC Built-in Functions): The new name of the
5367         subsection previously known as "PowerPC Built-in Functions".
5368         (Basic PowerPC Built-in Functions Available on all Configurations):
5369         New subsubsection.
5370         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5371         subsubsection.
5372         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5373         subsubsection.
5374         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5375         subsubsection.
5376         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5377         subsubsection.
5379 2018-05-08  Jim Wilson  <jimw@sifive.com>
5381         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5382         (LD_EMUL_SUFFIX): New.
5383         (LINK_SPEC): Use it.
5385 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5387         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5388         subsection.
5389         (Basic PowerPC Built-in Functions): The new name of the
5390         subsection previously known as "PowerPC Built-in Functions".
5391         (Basic PowerPC Built-in Functions Available on all Configurations):
5392         New subsubsection.
5393         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5394         subsubsection.
5395         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5396         subsubsection.
5397         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5398         subsubsection.
5399         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5400         subsubsection.
5402 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5404         PR target/85683
5405         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5406         after cmpelim optimization.
5408 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5410         * config.gcc: Support "goldmont".
5411         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5412         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5413         PROCESSOR_GOLDMONT.
5414         * config/i386/i386.c (m_GOLDMONT): Define.
5415         (processor_target_table): Add "goldmont".
5416         (PTA_GOLDMONT): Define.
5417         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5418         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5419         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5420         (fold_builtin_cpu): Add "goldmont".
5421         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5422         (ix86_option_override_internal): Add "goldmont".
5423         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5424         (processor_type): Add PROCESSOR_GOLDMONT.
5425         * config/i386/i386.md: Add CPU "glm".
5426         * config/i386/glm.md: New file.
5427         * config/i386/x86-tune.def: Add m_GOLDMONT.
5428         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5430 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5432         PR target/85572
5433         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5434         E_V4DImode.
5435         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5436         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5437         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5439         PR target/85317
5440         * config/i386/i386.c (ix86_fold_builtin): Handle
5441         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5443         PR target/85480
5444         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5445         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5447 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5449         PR target/85658
5450         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5451         (check_arch): Likewise.
5452         (check_fpu): Return the result rather than printing it.
5453         (end arch): Fix operator precedence.
5454         (end cpu): Likewise.
5455         (END): Print the result from check_fpu.
5457 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5458             Alan Hayward  <alan.hayward@arm.com>
5459             David Sherwood  <david.sherwood@arm.com>
5461         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5462         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5463         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5464         (*fcmuo<mode>_and): New patterns.
5466 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5468         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5469         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5470         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5471         (cmp_op, sve_imm_con): New code attributes.
5472         (SVE_COND_INT_CMP, imm_con): Delete.
5473         (cmp_op): Remove above unspecs from int attribute.
5474         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5475         to...
5476         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5477         comparison-specific unspecs.
5478         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5479         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5480         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5481         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5482         (*vec_fcm<cmp_op><mode>): Rename to...
5483         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5484         (*vec_fcmuo<mode>): Rename to...
5485         (*fcmuo<mode>): ...this and adjust likewise.
5486         (*pred_fcm<cmp_op><mode>): New pattern.
5487         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5488         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5489         functions.
5490         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5491         and UNORDERED.
5492         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5493         (aarch64_emit_sve_predicated_cond): New function.
5494         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5495         (aarch64_emit_unspec_cond_or): Replace with...
5496         (aarch64_emit_sve_or_conds): ...this new function.  Use
5497         aarch64_emit_sve_ptrue_op for the individual comparisons and
5498         aarch64_emit_binop to OR them together.
5499         (aarch64_emit_inverted_unspec_cond): Replace with...
5500         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5501         aarch64_emit_sve_ptrue_op for the comparison and
5502         aarch64_emit_unop to invert the result.
5503         (aarch64_expand_sve_vec_cmp_float): Update after the above
5504         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5506 2018-05-07  Nathan Sidwell  <nathan@acm.org>
5508         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5509         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5510         (Backwards Compatibility): Likewise.
5512 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5514         PR bootstrap/85681
5515         Revert:
5516         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5518         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5519         <prefetch_dynamic_strides>: New const bool field.
5520         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5521         prefetch_dynamic_strides.
5522         (exynosm1_prefetch_tune): Likewise.
5523         (thunderxt88_prefetch_tune): Likewise.
5524         (thunderx_prefetch_tune): Likewise.
5525         (thunderx2t99_prefetch_tune): Likewise.
5526         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5527         to false.
5528         (aarch64_override_options_internal): Update to set
5529         PARAM_PREFETCH_DYNAMIC_STRIDES.
5530         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5531         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5532         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5533         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5534         prefetch-dynamic-strides setting.
5536         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5538         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5539         <minimum_stride>: New const int field.
5540         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5541         minimum_stride field.
5542         (exynosm1_prefetch_tune): Likewise.
5543         (thunderxt88_prefetch_tune): Likewise.
5544         (thunderx_prefetch_tune): Likewise.
5545         (thunderx2t99_prefetch_tune): Likewise.
5546         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5547         (aarch64_override_options_internal): Update to set
5548         PARAM_PREFETCH_MINIMUM_STRIDE.
5549         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5550         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5551         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5552         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5553         stride is constant and is below the minimum stride threshold.
5555 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5557         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
5558         to 512.
5560 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5562         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5563         <prefetch_dynamic_strides>: New const bool field.
5564         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5565         prefetch_dynamic_strides.
5566         (exynosm1_prefetch_tune): Likewise.
5567         (thunderxt88_prefetch_tune): Likewise.
5568         (thunderx_prefetch_tune): Likewise.
5569         (thunderx2t99_prefetch_tune): Likewise.
5570         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5571         to false.
5572         (aarch64_override_options_internal): Update to set
5573         PARAM_PREFETCH_DYNAMIC_STRIDES.
5574         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5575         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5576         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5577         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5578         prefetch-dynamic-strides setting.
5580 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5582         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5583         <minimum_stride>: New const int field.
5584         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5585         minimum_stride field.
5586         (exynosm1_prefetch_tune): Likewise.
5587         (thunderxt88_prefetch_tune): Likewise.
5588         (thunderx_prefetch_tune): Likewise.
5589         (thunderx2t99_prefetch_tune): Likewise.
5590         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5591         (aarch64_override_options_internal): Update to set
5592         PARAM_PREFETCH_MINIMUM_STRIDE.
5593         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5594         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5595         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5596         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5597         stride is constant and is below the minimum stride threshold.
5599 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
5601         PR c++/85659
5602         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
5603         the type is addressable.  Don't force op into register if it has
5604         BLKmode.
5606 2018-05-05  Roland McGrath  <mcgrathr@google.com>
5608         PR other/77609
5609         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
5610         any section for which we don't know a specific type it should have,
5611         regardless of name.  Previously this was done only for the exact
5612         names ".init_array", ".fini_array", and ".preinit_array".
5613         (default_elf_asm_named_section): Add comment about
5614         relationship with default_section_type_flags and SECTION_NOTYPE.
5615         (get_section): Don't consider it a type conflict if one side has
5616         SECTION_NOTYPE and the other doesn't, as long as neither has the
5617         SECTION_BSS et al used in the default_section_type_flags logic.
5619 2018-05-05  Tom de Vries  <tom@codesourcery.com>
5621         PR target/85653
5622         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
5623         (workaround_barsyncs): New function.
5624         (nvptx_reorg): Use workaround_barsyncs.
5625         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5626         (define_expand "nvptx_membar_cta"): New define_expand.
5627         (define_insn "*nvptx_membar_cta"): New insn.
5629 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
5631         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
5632         To improve optimization opportunities.
5633         * builtin-types.def: The new needed builtin types for the above.
5635 2018-05-04  Richard Biener  <rguenther@suse.de>
5637         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
5638         * gimple-ssa-store-merging.c
5639         (imm_store_chain_info::output_merged_store): Remove redundant create,
5640         release split_store vector contents on failure.
5641         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
5642         scalar stmt vector on cache hit.
5644 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
5646         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
5647         Xilinx FP support.
5648         * config.gcc (powerpc-xilinx-eabi*): Remove.
5649         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
5650         support.
5651         (fusion_addis_mem_combo_load): Ditto.
5652         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
5653         FP support.
5654         (rs6000_cpu_cpp_builtins): Ditto.
5655         * config/rs6000/rs6000-linux.c
5656         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
5657         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
5658         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
5659         support.
5660         (rs6000_setup_reg_addr_masks): Ditto.
5661         (rs6000_init_hard_regno_mode_ok): Ditto.
5662         (rs6000_option_override_internal): Ditto.
5663         (legitimate_lo_sum_address_p): Ditto.
5664         (rs6000_legitimize_address): Ditto.
5665         (rs6000_legitimize_reload_address): Ditto.
5666         (rs6000_legitimate_address_p): Ditto.
5667         (abi_v4_pass_in_fpr): Ditto.
5668         (setup_incoming_varargs): Ditto.
5669         (rs6000_gimplify_va_arg): Ditto.
5670         (rs6000_split_multireg_move): Ditto.
5671         (rs6000_savres_strategy): Ditto.
5672         (rs6000_emit_prologue_components): Ditto.
5673         (rs6000_emit_epilogue_components): Ditto.
5674         (rs6000_emit_prologue): Ditto.
5675         (rs6000_emit_epilogue): Ditto.
5676         (rs6000_elf_file_end): Ditto.
5677         (rs6000_function_value): Ditto.
5678         (rs6000_libcall_value): Ditto.
5679         * config/rs6000/rs6000.h: Ditto.
5680         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
5681         (TARGET_MINMAX): ... this.  New.
5682         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
5683         * config/rs6000/rs6000.md: Remove Xilinx FP support.
5684         (*movsi_internal1_single): Delete.
5685         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
5686         mfpu=, mxilinx-fpu): Delete.
5687         * config/rs6000/singlefp.h: Delete.
5688         * config/rs6000/sysv4.h: Remove Xilinx FP support.
5689         * config/rs6000/t-rs6000: Ditto.
5690         * config/rs6000/t-xilinx: Delete.
5691         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
5692         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
5693         (VStype_simple): Delete.
5694         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
5695         * config/rs6000/xfpu.h: Delete.
5696         * config/rs6000/xfpu.md: Delete.
5697         * config/rs6000/xilinx.h: Delete.
5698         * config/rs6000/xilinx.opt: Delete.
5699         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
5700         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
5702 2018-05-04  Tom de Vries  <tom@codesourcery.com>
5704         PR libgomp/85639
5705         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
5706         if ignore == 0.
5708 2018-05-04  Richard Biener  <rguenther@suse.de>
5710         PR middle-end/85627
5711         * tree-complex.c (update_complex_assignment): We are always in SSA form.
5712         (expand_complex_div_wide): Likewise.
5713         (expand_complex_operations_1): Likewise.
5714         (expand_complex_libcall): Preserve EH info of the original stmt.
5715         (tree_lower_complex): Handle removed blocks.
5716         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
5717         on complex multiplication and division libcall builtins.
5719 2018-05-04  Richard Biener  <rguenther@suse.de>
5721         PR middle-end/85574
5722         * fold-const.c (negate_expr_p): Restrict negation of operand
5723         zero of a division to when we know that can happen without
5724         overflow.
5725         (fold_negate_expr_1): Likewise.
5727 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
5729         PR libstdc++/85466
5730         * real.h (real_nextafter): Declare.
5731         * real.c (real_nextafter): New function.
5732         * fold-const-call.c (fold_const_nextafter): New function.
5733         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
5734         CASE_CFN_NEXTTOWARD.
5735         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
5736         even when arg1_mode is different from arg0_mode.
5738 2018-05-03  Nathan Sidwell  <nathan@acm.org>
5740         * doc/extend.texi (Deprecated Features): Remove
5741         -ffriend-injection.
5742         (Backwards Compatibility): Likewise.
5743         * doc/invoke.texi (C++ Language Options): Likewise.
5744         (C++ Dialect Options): Likewise.
5746 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
5748         PR target/85530
5749         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
5750         _mm512_mask_mullox_epi64): New intrinsics.
5752 2018-05-03  Tom de Vries  <tom@codesourcery.com>
5754         PR testsuite/85106
5755         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5756         dump files): Add offload-tree.
5758 2018-05-03  Richard Biener  <rguenther@suse.de>
5760         PR tree-optimization/85615
5761         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
5762         to loops not nested in BBs loop father to avoid creating multi-entry
5763         loops.
5765 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5767         PR tree-optimization/70291
5768         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
5769         arguments.  Change return type to tree.  Emit libcall as a new
5770         statement rather than replacing existing one when inplace_p is true.
5771         (expand_complex_multiplication_components): New function.
5772         (expand_complex_multiplication): Expand floating-point complex
5773         multiplication using the above.
5774         (expand_complex_division): Rename inner_type parameter to type.
5775         Update expand_complex_libcall call-site.
5776         (expand_complex_operations_1): Update expand_complex_multiplication
5777         and expand_complex_division call-sites.
5779 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5781         PR target/85582
5782         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5783         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5784         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
5785         the highest significant bit of the shift count mask is clear.  In
5786         check whether and[sq]i3 is needed verify that all significant bits
5787         of the shift count other than the highest are set.
5789 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5791         PR libgomp/82428
5792         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
5793         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
5794         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
5795         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
5796         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
5797         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
5798         __builtin_goacc_parlevel_size.
5800 2018-05-02  Richard Biener  <rguenther@suse.de>
5802         PR tree-optimization/85597
5803         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
5804         do not use split vect_get_vec_defs call but call vect_get_slp_defs
5805         directly.
5807 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5809         PR testsuite/85106
5810         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5811         dump files): Add ltrans-tree.
5813 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5815         PR testsuite/85106
5816         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
5817         dump files): Add wpa-ipa.
5819 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
5821         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
5822         powerpc*-*-linux*paired* target.
5823         * config/rs6000/750cl.h: Delete.
5824         * config/rs6000/paired.h: Delete.
5825         * config/rs6000/paired.md: Delete.
5826         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
5827         float support.
5828         * config/rs6000/rs6000-builtin.def: Remove paired float support.
5829         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
5830         comment.  Remove paired float support.
5831         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
5832         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5833         VECTOR_PAIRED.
5834         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
5835         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
5836         declarations.
5837         * config/rs6000/rs6000.c: Remove paired float support.
5838         (paired_expand_vector_init, paired_expand_vector_move,
5839         paired_emit_vector_compare, paired_emit_vector_cond_expr,
5840         (paired_expand_lv_builtin, paired_expand_stv_builtin,
5841         paired_expand_builtin, paired_expand_predicate_builtin,
5842         paired_init_builtins): Delete.
5843         * config/rs6000/rs6000.h: Remove paired float support.
5844         * config/rs6000/rs6000.md: Remove paired float support.
5845         (move_from_CR_ov_bit): Delete.
5846         * config/rs6000/rs6000.opt (mpaired): Delete.
5847         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
5848         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
5850 2018-05-02  Richard Biener  <rguenther@suse.de>
5852         PR middle-end/85567
5853         * gimplify.c (gimplify_save_expr): When in SSA form allow
5854         SAVE_EXPRs to compute to SSA vars.
5856 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
5858         PR target/85582
5859         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
5860         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
5861         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
5862         clobber operands[2], instead use a new pseudo.  Formatting fixes.
5864 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
5866         PR tree-optimization/85586
5867         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
5868         exit early for statements in the same group if the accesses are
5869         not strided.
5871 2018-05-02  Tom de Vries  <tom@codesourcery.com>
5873         PR lto/85451
5874         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
5875         error message.
5877 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
5879         PR tree-optimization/85143
5880         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
5882 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5884         PR lto/85451
5885         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
5886         not found" error message.
5888 2018-05-01  Tom de Vries  <tom@codesourcery.com>
5890         PR other/83786
5891         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
5892         * vec.c (test_ordered_remove_if): New function.
5893         (vec_c_tests): Call test_ordered_remove_if.
5894         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
5895         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
5896         * tree-vect-patterns.c (vect_pattern_recog_1): Use
5897         VEC_ORDERED_REMOVE_IF.
5899 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5901         PR tree-optimization/82665
5902         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
5903         pointer subtraction where arguments come from a memchr call.
5905 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
5907         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
5908         --push-state --as-needed and --pop-state instead of --as-needed and
5909         --no-as-needed if ld supports it.
5910         * configure: Regenerated.
5912         PR web/85578
5913         * doc/install.texi2html: Replace _002d with - and _002a with * in
5914         generated html files using sed.
5916 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5918         PR c++/85523
5919         * gcc-rich-location.c (blank_line_before_p): New function.
5920         (use_new_line): New function.
5921         (gcc_rich_location::add_fixit_insert_formatted): New function.
5922         * gcc-rich-location.h
5923         (gcc_rich_location::add_fixit_insert_formatted): New function.
5925 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5927         * selftest.c (assert_streq): Rename "expected" and "actual" to
5928         "val1" and "val2".  Extend NULL-handling to cover both inputs
5929         symmetrically, while still requiring both to be non-NULL for a pass.
5930         * selftest.h (assert_streq): Rename "expected" and "actual" to
5931         "val1" and "val2".
5932         (ASSERT_EQ): Likewise.
5933         (ASSERT_EQ_AT): Likewise.
5934         (ASSERT_KNOWN_EQ): Likewise.
5935         (ASSERT_KNOWN_EQ_AT): Likewise.
5936         (ASSERT_NE): Likewise.
5937         (ASSERT_MAYBE_NE): Likewise.
5938         (ASSERT_MAYBE_NE_AT): Likewise.
5939         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
5940         the assertion to pass.
5941         (ASSERT_STREQ_AT): Likewise.
5943 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
5945         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
5946         interaction with -pie.
5948 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5950         * selftest.h: Fix alphabetization of per-source-file selftest
5951         declarations.
5953 2018-04-30  Jason Merrill  <jason@redhat.com>
5955         PR c++/61982 - dead stores to destroyed objects.
5956         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
5957         of clobber.
5959 2018-04-30  Jason Merrill  <jason@redhat.com>
5961         * tree.c (build_clobber): New.
5962         * tree.h: Declare it.
5963         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
5965 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
5967         * diagnostic-show-locus.c (layout::layout): Update for
5968         location_get_source_line returning a char_span.
5969         (struct char_span): Move to input.h.
5970         (struct correction): Update for fields in char_span becoming
5971         private.
5972         (struct source_line): Update for location_get_source_line
5973         returning a char_span.
5974         (layout::print_line): Likewise.
5975         * edit-context.c (edited_file::print_content): Likewise.
5976         (edited_file::print_diff_hunk): Likewise.
5977         (edited_file::print_run_of_changed_lines): Likewise.
5978         (edited_file::get_num_lines): Likewise.
5979         (edited_line::edited_line): Likewise.
5980         * final.c (asm_show_source): Likewise.
5981         * input.c (location_get_source_line): Convert return type
5982         from const char * to char_span, losing the final "line_len"
5983         param.
5984         (dump_location_info): Update for the above.
5985         (get_substring_ranges_for_loc): Likewise.  Use a char_span
5986         when handling the literal within the line.
5987         (test_reading_source_line): Update for location_get_source_line
5988         returning a char_span.
5989         * input.h (class char_span): Move here from
5990         diagnostic-show-locus.c, converting from a struct to a class.
5991         Make data members private.
5992         (char_span::operator bool): New.
5993         (char_span::length): New.
5994         (char_span::get_buffer): New.
5995         (char_span::operator[]): New.
5996         (char_span::subspan): Make const.
5997         (char_span::xstrdup): New.
5998         (location_get_source_line): Convert return type from const char *
5999         to char_span, losing the final "line_size" param.
6001 2018-04-30  Jan Hubicka  <jh@suse.cz>
6003         * lto-wrapper.c (ltrans_priorities): New static var.
6004         (cmp_priority): New.
6005         (run_gcc): Read priorities and if doing parallel build order
6006         the Makefile by them.
6008 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6010         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6012 2018-04-30  Richard Biener  <rguenther@suse.de>
6014         * tree-cfg.c (verify_address): Remove base argument, add
6015         flag whether to check TREE_ADDRESSABLE and do that.
6016         (verify_expr): Remove.
6017         (verify_types_in_gimple_reference): Add pieces from verify_expr.
6018         (verify_gimple_assign_single): Likewise.
6019         (verify_gimple_switch): Likewise.
6020         (verify_expr_location_1): Dereference tp once.  Add (disabled)
6021         piece from verify_expr.
6022         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6024 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6026         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6028 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6030         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6031         (small_data_pattern): Likewise.
6032         (arc_rewrite_small_data): Likewise.
6033         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6034         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6035         (get_symbol_alignment): New function.
6036         (legitimate_small_data_address_p): Likewise.
6037         (legitimate_scaled_address): Update, call
6038         legitimate_small_data_address_p.
6039         (output_sdata): New static variable.
6040         (arc_print_operand): Update how we handle small data operands.
6041         (arc_print_operand_address): Likewise.
6042         (arc_legitimate_address_p): Update, use
6043         legitimate_small_data_address_p.
6044         (arc_rewrite_small_data_p): Remove.
6045         (arc_rewrite_small_data_1): Likewise.
6046         (arc_rewrite_small_data): Likewise.
6047         (small_data_pattern): Likewise.
6048         (compact_sda_memory_operand): Update to use
6049         legitimate_small_data_address_p and get_symbol_alignment.
6050         (prepare_move_operands): Don't rewite sdata pattern.
6051         (prepare_extend_operands): Remove.
6052         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6053         pattern.
6054         (zero_extendqisi2): Likewise.
6055         (zero_extendhisi2): Likewise.
6056         (extendqihi2): Likewise.
6057         (extendqisi2): Likewise.
6058         (extendhisi2): Likewise.
6059         (addsi3): Likewise.
6060         (subsi3): Likewise.
6061         (andsi3): Likewise.
6062         * config/arc/constraints.md (Usd): Change it to memory constraint.
6064 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6066         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6067         as source of std instructions.
6068         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6069         allow 6-bit constants as source for store instructions.
6070         (movdi_insn): Update instruction pattern to allow 6-bit constants
6071         as source for store instructions.
6073 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6075         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6077 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6078             Sandra Loosemore <sandra@codesourcery.com>
6080         * dumpfile.c (dump_open): Allow '-' for stdout.
6081         * doc/invoke.texi (Developer Options): Document dump filename
6082         determination early.  Document stdin/stdout selection.
6084 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6086         Microblaze Target: PIC data text relative
6088         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6089         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6090         Add declaration.
6091         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6092         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6093         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6094         New addressing mode for data-text relative position indepenedent code.
6095         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6096         'ADDRESS_SYMBOLIC_TXT_REL'.
6097         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6098         (microblaze_legitimate_pic_operand): Exclude function calls from
6099         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6100         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6101         addresses cases.
6102         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6103         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6104         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6105         for 'address + offset'.
6106         (microblaze_expand_prologue): Add new function prologue call for
6107         'r20' assignation.
6108         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6109         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6110         table in case of TARGET_PIC_DATA_TEXT_REL.
6111         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6112         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6113         Add new macros 'UNSPEC_TEXT',
6114         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6115         + exclude function calls from 'UNSPEC_PLT' in case of data text
6116         relative mode.
6117         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6118         new target hook for generating address diff vector tables in case of
6119         flag_pic.
6120         * doc/tm.texi : Regenerate.
6121         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6122         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6123         of addr diff vector generation.
6124         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6125         target hook definition.
6126         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6127         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6128         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6129         option for data text relative.
6131 2018-04-30  Richard Biener  <rguenther@suse.de>
6133         * tree-chrec.h (evolution_function_is_constant_p): Remove
6134         redundant check.
6135         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6137 2018-04-30  Richard Biener  <rguenther@suse.de>
6139         PR bootstrap/85571
6140         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6142 2018-04-30  Richard Biener  <rguenther@suse.de>
6144         PR tree-optimization/28364
6145         PR tree-optimization/85275
6146         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6147         copying first exit test.
6149 2018-04-28  Mark Wielaard  <mark@klomp.org>
6151         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6152         dwarf_version >= 5.
6153         (dwarf_AT): Handle DW_AT_addr_base.
6154         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6156 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6158         PR target/84431
6159         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6160         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6161         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6162         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6164 2018-04-28  Richard Biener  <rguenther@suse.de>
6166         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6167         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6168         to reflect use.  Only add interesting stmts.
6170 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6172         PR ipa/85549
6173         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6174         the jump function allows for passing through aggregate values.
6176 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6178         * input.h (in_system_header_at): Convert from macro to inline
6179         function.
6180         (from_macro_expansion_at): Likewise.
6181         (from_macro_definition_at): Likewise.
6183 2018-04-27  Jeff Law  <law@redhat.com>
6185         * config.gcc: Mark tile* targets as deprecated/obsolete.
6187 2018-04-27  Richard Biener  <rguenther@suse.de>
6189         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6190         fix for ILP32.
6192 2018-04-27  Richard Biener  <rguenther@suse.de>
6194         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6196 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6198         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6199         with Yd constraint. Set "preferred_for_speed" attribute from
6200         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6201         with Yd constraint.
6202         (*movdi_internal): Ditto.
6203         (movti_interunit splitters): Remove
6204         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6205         (movdi_interunit splitters): Ditto.
6206         * config/i386/constraints.md (Ye): Remove.
6207         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6209 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6211         PR target/85512
6212         * config/aarch64/constraints.md (Usg): Limit to 31.
6213         (Usj): Limit to 63.
6215 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6217         PR tree-optimization/85529
6218         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6219         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6220         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6221         zero extension or masking of the MSB bit.
6222         (optimize_range_tests): Add FIRST_BB argument, pass it through
6223         to optimize_range_tests_var_bound.
6224         (maybe_optimize_range_tests, reassociate_bb): Adjust
6225         optimize_range_tests callers.
6227 2018-04-26  Richard Biener  <rguenther@suse.de>
6228             Jakub Jelinek  <jakub@redhat.com>
6230         * cgraph.h (symbol_table): Just declare debug method here.
6231         * symtab.c (symbol_table::debug): Define.
6233 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6235         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6237 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6239         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6240         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6241         (*movdi_internal): Substitute Yi and Yj constraint with x
6242         and Ym and Yn constraint with y constraint.  Update "isa"
6243         attribute and set "preferred_for_speed" attribute from
6244         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6245         (*movsi_internal): Ditto.
6246         (*movdf_internal): Ditto.
6247         (*movsf_internal): Ditto.
6248         (*zero_extendsidi2): Ditto.
6249         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6250         (sse2_loadld): Ditto.
6251         (*vec_extract<ssevecmodelower>_0): Ditto.
6252         (*vec_extractv4si_0_zext_sse4): Ditto.
6253         (vec_concatv2di): Ditto.
6254         (*vec_dup<mode>): Ditto.
6255         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6256         * config/i386/constraints.md (Yi): Remove.
6257         (Yj): Remove.
6258         (Ym): Remove.
6259         (Yn): Remove.
6261 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6263         * dumpfile.c (dump_open): New.
6264         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6265         (dump_finish): Detect stdio/stderr by value not name.
6267 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6269         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6271 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6273         PR target/84952
6274         * config/nvptx/nvptx.c (verify_neutering_jumps)
6275         (verify_neutering_labels): New function
6276         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6278 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6280         PR target/84025
6281         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6282         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6283         need neutering.
6285 2018-04-26  Richard Biener <rguenther@suse.de>
6286             Tom de Vries  <tom@codesourcery.com>
6288         PR lto/85422
6289         * lto-streamer-out.c (output_function): Fixup loops if required to match
6290         discovery done in the reader.
6292 2018-04-26  Richard Biener  <rguenther@suse.de>
6294         PR tree-optimization/85116
6295         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6296         have a loop exit from the single latch predecessor.  Remove
6297         case of header with just condition.
6298         (ch_base::copy_headers): Exclude infinite loops from any
6299         processing.
6300         (pass_ch::execute): Record exits.
6302 2018-04-26  Richard Biener  <rguenther@suse.de>
6304         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6305         prologue cost vector and pass it to vect_get_load_cost.
6306         (vect_get_peeling_costs_all_drs): Likewise.
6307         (vect_peeling_hash_get_lowest_cost): Likewise.
6308         (vect_enhance_data_refs_alignment): Likewise.
6310 2018-04-26  Richard Biener  <rguenther@suse.de>
6312         PR middle-end/85450
6313         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6314         checking of integer<->pointer conversions.
6315         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6316         sign-/zero-extending pointer types.
6317         (expand_omp_for_static_chunk): Likewise.
6319 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6320             Jean Lee  <xiaoyur347@gmail.com>
6322         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6323         (TARGET_ASAN_SHADOW_OFFSET): Define.
6324         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6325         true for -fsanitize=address.
6327 2018-04-25  Mark Wielaard  <mark@klomp.org>
6329         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6330         shorter ones.
6332 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6334         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6335         than "alu", remove explicit "memory" and "imm_disp" attributes.
6336         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6338         PR middle-end/85414
6339         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6340         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6341         gen_lowpart_no_emit.
6343 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6345         PR target/85473
6346         * config/i386/i386.c (ix86_expand_builtin): Change memory
6347         operand to XI, extend p0 to Pmode.
6348         * config/i386/i386.md: Change unspec volatile and operand
6349         1 mode to XI, change operand 0 mode to P.
6351 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6353         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6354         GET_MODE_MASK before any checking.
6355         (nds32_can_use_bset_p): Likewise.
6356         (nds32_can_use_btgl_p): Likewise.
6358 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6360         * config/nds32/nds32-doubleword.md: New define_split pattern for
6361         illegal register number.
6363 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6365         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6367 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6369         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6371 2018-04-25  Richard Biener  <rguenther@suse.de>
6373         * lto-streamer.h (LTO_major_version): Bump to 8.
6375 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6377         * BASE-VER: Set to 9.0.0.
6379 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6381         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6382         in __abskf2 and __powikf2.
6384 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6386         PR target/85512
6387         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6388         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6389         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6390         Use the above on operand 2.  Reindent.
6391         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6393 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6395         PR target/85485
6396         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6397         handle OPT_mcet.
6398         * config/i386/i386.opt (mcet): Removed.
6399         * doc/install.texi: Remove -mcet documentation.
6400         * doc/invoke.texi: Likewise.
6402 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6404         PR target/85485
6405         * doc/install.texi: Remove -mcet from bootstrap-cet.
6407 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6409         PR target/85511
6410         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6411         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6412         if TARGET_64BIT.
6414         PR target/85503
6415         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6416         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6417         containing a CONST_VECTOR.
6419 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6421         * doc/install.texi: Update newlib dependency for nvptx.
6423 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6425         PR target/85508
6426         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6427         instead of INTVAL when shifting x left.
6429 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6431         PR tree-optimization/85478
6432         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6433         vect_grouped_store_supported for single element vectors.
6435 2018-04-24  Richard Biener  <rguenther@suse.de>
6437         PR target/85491
6438         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6439         load cost increase to the case of non-constant step.
6441 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6443         PR target/84828
6444         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6445         destination if any_malformed_asm.
6447 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6449         PR middle-end/85496
6450         * expr.c (store_field): In the bitfield case, if the value comes from
6451         a function call and is returned in registers by means of a PARALLEL,
6452         do not change the mode of the temporary unless BLKmode and VOIDmode.
6454 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6456         PR rtl-optimization/85423
6457         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6458         dependencies to debug insns when the previous insn is non-debug.
6460 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6462         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6463         enums into a single definition.
6464         (fls): Fix predicates and printing.
6465         (seti): Likewise.
6467 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6469         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6470         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6471         and short u6 immediate.
6472         (check_if_valid_sleep_operand): Remove.
6473         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6475 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6477         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6478         flag_always_save_lp condition.
6479         * config/nds32/nds32.opt (malways-save-lp): New option.
6481 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6483         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6484         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6485         * config/nds32/nds32.h
6486         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6487         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6489 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6491         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6492         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6494 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6495             Chung-Ju Wu  <jasonwucj@gmail.com>
6497         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6498         Declare.
6499         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6500         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6502 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6504         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6506 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6508         * config/nds32/nds32-protos.h (nds32_data_alignment,
6509         nds32_local_alignment): Declare.
6510         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6511         nds32_local_alignment): New functions.
6512         (TARGET_CONSTANT_ALIGNMENT): Define.
6513         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6515 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6517         * config/nds32/nds32.c
6518         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6519         (TARGET_MODES_TIEABLE_P): Likewise.
6521 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6523         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6524         level Ofast and Og.
6526 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
6527             Chung-Ju Wu  <jasonwucj@gmail.com>
6529         * config/nds32/constants.md (unspec_volatile_element): Add enum values
6530         for unaligned access.
6531         * config/nds32/nds32-intrinsic.c: Implementation of expanding
6532         unaligned access.
6533         * config/nds32/nds32-intrinsic.md: Likewise.
6534         * config/nds32/nds32_intrinsic.h: Likewise.
6535         * config/nds32/nds32.h (nds32_builtins): Likewise.
6536         * config/nds32/nds32.opt (munaligned-access): New option.
6537         * config/nds32/nds32.c (nds32_asm_file_start): Display
6538         flag_unaligned_access status.
6540 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6542         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6543         -mno-relax is present.
6544         * config/riscv/linux.h (LINK_SPEC): Ditto.
6546 2018-04-20  Martin Sebor  <msebor@redhat.com>
6548         PR c/85365
6549         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
6550         for null pointers.
6551         (gimple_fold_builtin_stxcpy_chk): Same.
6552         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
6554 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
6556         PR target/85456
6557         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
6558         __powikf2 when long double is IEEE 128-bit.
6560 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6562         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
6563         step to make sure stack always aligned.
6565 2018-04-20  Carl Love  <cel@us.ibm.com>
6567         PR target/83402
6568         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
6569         size check for arg0.
6571 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
6572             Tom de Vries  <tom@codesourcery.com>
6574         PR target/85445
6575         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
6576         Emit insns for calls too.
6577         (nvptx_find_par): Always look for worker-level predecessor insn.
6578         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
6579         calls.
6580         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
6581         (nvptx_process_pars): Propagate frames for calls.
6583 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
6585         PR target/85469
6586         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
6587         Removed.
6588         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
6589         (ix86_handle_option): Don't handle OPT_mibt.
6590         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
6591         __SHSTK__.
6592         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
6593         has_ibt and ibt.
6594         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
6595         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
6596         (ix86_target_macros): Define __CET__ with flag_cf_protection
6597         for -fcf-protection.
6598         * config/i386/i386.c (isa2_opts): Remove -mibt.
6599         * config/i386/i386.h (TARGET_IBT): Removed.
6600         (TARGET_IBT_P): Likewise.
6601         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
6602         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
6603         * config/i386/i386.opt (mcet): Update help message.
6604         (mshstk): Likewise.
6605         (mibt): Removed.
6606         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
6607         -mcet as an alias for -mshstk.
6609 2018-04-20  Richard Biener <rguenther@suse.de>
6611         PR middle-end/85475
6612         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
6613         complexity by forcing a single use of the multiply operand.
6615 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6617         ipa/85449
6618         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
6619         recursion dependency to only apply to non-clones.
6621 2018-04-20  Martin Jambor  <mjambor@suse.cz>
6623         ipa/85447
6624         * ipa-cp.c (create_specialized_node): Check that clones of
6625         self-recursive edges exist during IPA-CP.
6627 2018-04-19  Toon Moene  <toon@moene.org>
6629         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
6630         by -O3.
6632 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6634         PR tree-optimization/85467
6635         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
6636         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
6637         VECTOR_CST element to type.
6639 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6641         PR target/85397
6642         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
6643         * config/i386/i386.md (builtin_setjmp_setup): Removed.
6644         (builtin_longjmp): Likewise.
6645         (save_stack_nonlocal): New pattern.
6646         (restore_stack_nonlocal): Likewise.
6648 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6650         PR target/85404
6651         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6652         Replace ASM_OUTPUT_LABEL with fprintf.
6654 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
6656         PR target/85417
6657         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
6658         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
6659         * config/i386/i386-c.c (ix86_target_macros_internal): Also
6660         define __IBT__ and __SHSTK__ for -fcf-protection.
6661         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
6662         TARGET_IBT.
6663         (ix86_trampoline_init): Likewise.
6664         (x86_output_mi_thunk): Likewise.
6665         (ix86_notrack_prefixed_insn_p): Likewise.
6666         (ix86_option_override_internal): Don't disallow -fcf-protection.
6667         * config/i386/i386.md (rdssp<mode>): Also enable for
6668         -fcf-protection.
6669         (incssp<mode>): Likewise.
6670         (nop_endbr): Likewise.
6671         * config/i386/i386.opt (mcet): Change help message to built-in
6672         functions only.
6673         (mibt): Likewise.
6674         (mshstk): Likewise.
6675         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
6676         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
6677         enable CET built-in functions.
6679 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
6681         * common/config/i386/i386-common.c
6682         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
6683         OPTION_MASK_ISA_MOVDIRI_UNSET,
6684         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
6685         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
6686         * config.gcc (movdirintrin.h): New header.
6687         * config/i386/cpuid.h (bit_MOVDIRI,
6688         bit_MOVDIR64B): New bits.
6689         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
6690         and -mmvodir64b.
6691         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
6692         (VOID, PVOID, PCVOID)): New function types.
6693         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
6694         __builtin_ia32_directstoreu_u64,
6695         __builtin_ia32_movdir64b): New builtins.
6696         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
6697         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
6698         and -mmovdiri.
6699         (ix86_valid_target_attribute_inner_p): Ditto.
6700         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
6701         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
6702         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
6703         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
6704         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
6705         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
6706         (movdiri<mode>, movdir64b_<mode>): New.
6707         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
6708         * config/i386/immintrin.h: Include movdirintrin.h.
6709         * config/i386/movdirintrin.h: New file.
6710         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
6712 2018-04-19  Richard Biener  <rguenther@suse.de>
6714         PR middle-end/85455
6715         * cfg.c (clear_bb_flags): When loop state says we have
6716         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
6718 2018-04-19  Richard Biener  <rguenther@suse.de>
6720         PR tree-optimization/84737
6721         * tree-vect-data-refs.c (vect_copy_ref_info): New function
6722         copying restrict info.
6723         (vect_setup_realignment): Use it.
6724         * tree-vectorizer.h (vect_copy_ref_info): Declare.
6725         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
6726         the first DR to all generated stores.
6727         (vectorizable_load): Likewise for loads.
6729 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
6731         PR tree-optimization/85446
6732         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
6733         the integral and pointer types to have the same precision.
6735         * doc/install.texi: Document --disable-cet being the default and
6736         --enable-cet=auto.
6738 2018-04-18  Martin Liska  <mliska@suse.cz>
6740         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
6741         style.
6743 2018-04-18  Martin Liska  <mliska@suse.cz>
6745         Revert
6746         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
6748         PR ipa/83983
6749         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6750         arguments if they are comparable.
6752 2018-04-18  Martin Liska  <mliska@suse.cz>
6754         Revert
6755         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
6757         PR lto/84805
6758         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6759         incomplete types.
6761 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
6763         PR target/85388
6764         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
6765         ENDBR after calling __morestack.
6767 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
6769         PR jit/85384
6770         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
6771         by using gcc_base_ver to generate a gcc_driver_version, and use
6772         it when generating GCC_DRIVER_NAME.
6773         * configure: Regenerate.
6775 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
6777         PR target/81084
6778         * config.gcc: Obsolete powerpc*-*-*spe*.
6780 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6782         PR debug/84637
6783         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
6784         (stabstr_D): Change type of unum from unsigned int to
6785         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
6786         type.
6788 2018-04-17  Jim Wilson  <jimw@sifive.com>
6790         PR 84856
6791         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
6792         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
6793         Set arg_pointer_offset after using pretend_args_size.
6795 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6797         PR rtl-optimization/85431
6798         * dse.c (record_store): Ignore zero width stores.
6800         PR sanitizer/85230
6801         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
6802         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
6803         __builtin_stack_restore rather than after it.
6804         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
6805         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
6806         argument instead of virtual_dynamic_stack_rtx.
6808 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6810         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
6811         New prototype.
6812         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
6813         Add note to error message to explain internal mapping of overloaded
6814         built-in function name to non-overloaded built-in function name.
6815         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
6816         function.
6818 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
6820         PR target/85424
6821         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
6822         where the inputs overlap with the output.
6824 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6826         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
6827         (=v, v) alternative and explicit "memory" attribute.
6828         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
6829         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6830         attributes.
6831         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
6832         "sselog1" type instead of "sselog".
6833         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
6834         "sselog".  Remove explicit "memory" attribute.
6835         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
6836         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6837         attributes.
6838         (vec_extract_hi_v32hi): Merge all alternatives into one, use
6839         "sselog1" type instead of "sselog".  Remove explicit "memory"
6840         attribute.
6841         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
6842         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6843         attribute.
6844         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
6845         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
6846         attributes.
6847         (vec_extract_hi_v64qi): Merge all alternatives into one, use
6848         "sselog1" type instead of "sselog".  Remove explicit "memory"
6849         attribute.
6850         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
6851         use "sselog1" type instead of "sselog".  Remove explicit "memory"
6852         attribute.
6854         PR target/85430
6855         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
6857         PR middle-end/85414
6858         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
6859         on a SUBREG.
6861 2018-04-17  Martin Jambor  <mjambor@suse.cz>
6863         PR ipa/85421
6864         * ipa-cp.c (create_specialized_node): Call
6865         expand_all_artificial_thunks if necessary.
6867 2018-04-17  Martin Liska  <mliska@suse.cz>
6869         PR lto/85405
6870         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
6871         in message, remote space in between '_G' and '('.
6873 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
6875         PR target/85281
6876         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
6877         avx512f_vmcmp<mode>3<round_saeonly_name>,
6878         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
6879         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
6880         avx512f_rndscale<mode><round_saeonly_name>,
6881         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
6882         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
6883         Use %<iptr>2 instead of %2 for -masm=intel.
6884         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
6885         avx512f_vcvttss2usi<round_saeonly_name>,
6886         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
6887         -masm=intel.
6888         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
6889         avx512f_vcvttsd2usi<round_saeonly_name>,
6890         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
6891         Use %q1 instead of %1 for -masm=intel.
6892         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
6893         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
6894         of %3 for -masm=intel.
6895         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
6896         -masm=intel.
6897         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
6898         -masm=intel.
6899         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
6900         -masm=intel.
6901         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
6902         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
6903         %g1.
6904         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
6905         -masm=intel.
6906         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
6907         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
6908         %g1 and one with %0 and %1.
6909         (avx512er_vmrcp28<mode><round_saeonly_name>,
6910         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
6911         %1 for -masm=intel.
6912         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
6913         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
6914         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
6915         of %0 and %{%4%} for -masm=intel.
6916         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
6917         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
6918         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
6919         order of %0 and %{%5%}%{z%} for -masm=intel.
6921 2018-04-17  Jan Hubicka  <jh@suse.cz>
6923         PR lto/85405
6924         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
6926 2018-04-17  Martin Liska  <mliska@suse.cz>
6928         PR ipa/85329
6929         * multiple_target.c (create_dispatcher_calls): Set apostrophes
6930         for target_clone error message.  Make default implementation
6931         clone to be a local declaration.
6932         (separate_attrs): Add new argument and check for an empty
6933         string.
6934         (expand_target_clones): Handle it.
6935         (ipa_target_clone): Make redirection just for target_clones
6936         functions.
6938 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
6939             Tom de Vries  <tom@codesourcery.com>
6941         PR middle-end/84955
6942         * omp-expand.c (expand_oacc_for): Add dummy false branch for
6943         tiled basic blocks without omp continue statements.
6945 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
6947         PR target/83660
6948         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
6949         vec_extract expression as having side effects to make sure it gets
6950         a cleanup point.
6952 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
6954         PR target/85403
6955         * config/i386/i386.c (get_builtin_code_for_version): Check
6956         error_mark_node.
6958 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
6960         PR target/84331
6961         * gcc/config.gcc: Support "skylake".
6962         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
6963         PROCESSOR_SKYLAKE.
6964         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
6965         (processor_target_table): Add "skylake".
6966         (ix86_option_override_internal): Add "skylake".
6967         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
6968         PROCESSOR_CANNONLAKE.
6969         (get_builtin_code_for_version): Fix priority for
6970         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
6971         PROCESSOR_SKYLAKE-AVX512.
6972         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
6973         (processor_type): Add PROCESSOR_SKYLAKE.
6975 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
6976             Jason Merrill  <jason@redhat.com>
6978         PR c++/85112
6979         * convert.c (convert_to_integer_1): Use direct recursion for
6980         enumeral types and types with a precision less than the number
6981         of bits in their mode.
6983 2018-04-16  Julia Koval  <julia.koval@intel.com>
6985         PR target/84413
6986         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
6987         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
6989 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
6991         PR target/85293
6992         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
6993         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
6994         and -mno-direct-move.
6996 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
6998         PR target/83402
6999         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7000         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7001         Ensure negative shifts result in {0}.
7003 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
7005         PR rtl-optimization/79916
7006         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7007         regs (if any) to define how to gnerate SD moves when LRA is in
7008         progress.
7010 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
7012         PR rtl-optimization/85393
7013         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7014         * except.c (expand_dw2_landing_pad_for_region): Make static.
7015         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7016         a label and unconditional jump to old_bb, rather than
7017         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7018         basic block.
7020         PR rtl-optimization/85376
7021         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7022         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7023         instead of a specific value.
7025 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7026             Bin Cheng  <bin.cheng@arm.com>
7028         PR tree-optimization/82965
7029         PR tree-optimization/83991
7030         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7031         by_profile_only parameter.
7032         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7033         information if the loop was predicted to iterate too many times.
7034         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7036 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7038         PR lto/71991
7039         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7040         always inline.
7042 2018-04-13  Martin Liska  <mliska@suse.cz>
7043             Jakub Jelinek  <jakub@redhat.com>
7045         PR middle-end/81657
7046         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7047         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7048         * builtins.c (expand_builtin_memory_copy_args): Use
7049         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7050         handle dest_addr == pc_rtx.
7052 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7054         PR target/85291
7055         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7056         asked to not generate direct moves.
7057         (fix_trunc<mode>si2_stfiwx): Similar.
7058         (fix_trunc<mode>si2_internal): Similar.
7060 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7062         PR debug/83157
7063         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7064         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7065         lookup if dest in some wider mode is known to be const0_rtx and
7066         if so, record permanent equivalence for it to be ZERO_EXTEND of
7067         the narrower mode destination.
7069 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7071         * lto-streamer-out.c (output_function): Revert 259346.
7072         * omp-expand.c (expand_oacc_for): Likewise.
7074 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7076         PR rtl-optimization/85354
7077         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7078         * sel-sched.c (sel_global_init): ... here.
7080 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7082         PR target/85238
7083         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7084         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7085         mode for PE-COFF targets.
7086         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7087         (i386_pe_asm_lto_end): Likewise.
7088         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7089         (TARGET_ASM_LTO_END): Likewise.
7090         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7091         (i386_pe_asm_lto_start): New function.
7092         (i386_pe_asm_lto_end): Likewise.
7094 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7095             Richard Biener  <rguenther@suse.de>
7097         PR middle-end/84955
7098         * lto-streamer-out.c (output_function): Fix CFG loop state before
7099         streaming out.
7100         * omp-expand.c (expand_oacc_for): Handle calls to internal
7101         functions like regular functions.
7103 2018-04-12  Richard Biener  <rguenther@suse.de>
7105         PR lto/85371
7106         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7107         for the early LTO debug to properly generate references to it
7108         during DIE emission.  Do not re-use that for the skeleton for
7109         split-dwarf.
7110         (dwarf2out_early_finish): Likewise.
7112 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7114         PR target/85328
7115         * config/i386/sse.md
7116         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7117         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7118         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7119         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7120         and output is a reg, avoid creating invalid lowpart subreg, but
7121         instead split into a 512-bit move.  Don't split if not AVX512VL,
7122         input is xmm16+ reg and output is a mem.
7123         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7124         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7125         xmm16+ reg and output is a mem.
7127 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7129         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7130         also for flag_dwarf2_cfi_asm.
7132 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7134         PR rtl-optimization/85342
7135         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7136         a bool scalar var inside of the loop instead.  Don't try to update
7137         recog_data.operand after failed apply_change_group.
7139 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7141         PR target/85296
7142         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7143         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7144         array with flexible array member as array without given dimension.
7145         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7146         argument for undefined param to true.
7148 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7150         PR target/85321
7151         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7152         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7153         from PowerPC section.
7154         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7155         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7156         help text that is too long.
7157         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7158         help text that is too long.
7159         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7160         help text that is too long.
7162 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7164         * config/alpha/alpha.md (stack_probe_internal): Rename
7165         from "probe_stack".  Update all callers.
7167 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7169         PR rtl-optimization/84566
7170         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7171         sched_macro_fuse_insns.
7173 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7175         PR target/84301
7176         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7177         (compute_block_dependences): ... from here.
7179 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7181         PR tree-optimization/85331
7182         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7183         from int to HOST_WIDE_INT.
7185 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7187         PR ipa/84149
7188         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7189         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7190         not the same as the source val.
7191         (cgraph_edge_brings_value_p): New parameter.
7192         (gather_edges_for_value): Pass destination value to
7193         cgraph_edge_brings_value_p.
7194         (perhaps_add_new_callers): Likewise.
7195         (get_info_about_necessary_edges): Likewise and exclude values brought
7196         only by self-recursive edges.
7197         (create_specialized_node): Redirect only clones of self-calling edges.
7198         (+self_recursive_pass_through_p): New function.
7199         (find_more_scalar_values_for_callers_subset): Use it.
7200         (find_aggregate_values_for_callers_subset): Likewise.
7201         (known_aggs_to_agg_replacement_list): Removed.
7202         (decide_whether_version_node): Re-calculate known constants for all
7203         remaining context clones.
7205 2018-04-11  Richard Biener  <rguenther@suse.de>
7207         PR lto/85339
7208         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7209         from early DWARF output.
7210         (dwarf2out_early_finish): Output line info unconditionally into
7211         early DWARF and add reference to it.
7213 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7215         PR target/85281
7216         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7217         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7218         other than V2DFmode using iptr mode attribute.
7219         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7221 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7223         PR rtl-optimization/84659
7224         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7226 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7228         PR debug/85302
7229         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7230         SIZEP is NULL.
7231         (output_loc_list): Pass address of a dummy size variable even in the
7232         locview handling loop.
7233         (index_location_lists): Add comment on why skip_loc_list_entry can't
7234         call size_of_locs.
7236 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7238         PR target/85261
7239         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7240         into register.
7242 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7244         PR target/85321
7245         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7246         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7247         and -mstring-compare-inline-limit.
7249 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7251         PR target/85287
7252         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7253         for stack clash protection in a register whenever we need it to be in
7254         a register.
7256 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7258         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7259         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7261 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7263         PR target/85321
7264         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7265         the help text.
7266         (mlong-double-): Ditto.
7267         * config/rs6000/sysv4.opt (msdata=): Ditto.
7268         (mtls-size=): Ditto.
7270 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7272         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7273         erroneous entries for
7274         "vector int vec_ldl (int, long int *)", and
7275         "vector unsigned int vec_ldl (int, unsigned long int *)".
7276         Add comments and entries for
7277         "vector bool char vec_ldl (int, bool char *)",
7278         "vector bool short vec_ldl (int, bool short *)",
7279         "vector bool int vec_ldl (int, bool int *)",
7280         "vector bool long long vec_ldl (int, bool long long *)",
7281         "vector pixel vec_ldl (int, pixel *)",
7282         "vector long long vec_ldl (int, long long *)",
7283         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7284         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7285         type tree bool_long_long_type_node and correct definition of
7286         bool_V2DI_type_node to make reference to this new type tree.
7287         (rs6000_mangle_type): Replace erroneous reference to
7288         bool_long_type_node with bool_long_long_type_node.
7289         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7290         comments to emphasize sign distinctions for char and int types and
7291         replace RS6000_BTI_bool_long constant with
7292         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7293         use of RS6000_BTI_pixel.
7294         (bool_long_type_node): Remove this macro definition.
7295         (bool_long_long_type_node): New macro definition
7297 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7299         PR rtl-optimization/85300
7300         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7301         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7302         simplify_unary_operation fails.
7304 2018-04-10  Martin Liska  <mliska@suse.cz>
7306         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7307         cgraph_edge and ipa_ref.
7309 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7311         PR target/85177
7312         PR target/85255
7313         * config/i386/sse.md
7314         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7315         computation of the VEC_MERGE selector from mask.
7316         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7317         Fix decoding of the VEC_MERGE selector into mask.
7319 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7321         PR tree-optimization/85286
7322         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7324 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7326         * final.c (final_1): Set insn_last_address as well as
7327         insn_current_address.
7329 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7331         PR target/85173
7332         * explow.c (emit_stack_probe): Call validize_mem on memory location
7333         before passing it to gen_probe_stack.  Create address operand and
7334         legitimize it for the probe_stack_address case.
7336 2018-04-09  Jan Hubicka  <jh@suse.cz>
7338         PR lto/85078
7339         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7340         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7341         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7342         walk basetypes.
7343         (free_lang_data): Rebuild type inheritance graph.
7345 2018-04-09  Martin Sebor  <msebor@redhat.com>
7347         * invoke.texi (-finline-small-functions): Mention other optimization
7348         options.
7349         (-findirect-inlining, -fpartial-inlining): Same.
7350         (-finline-functions-called-once): Same.
7351         (-freorder-blocks-and-partition): Same.
7353 2018-04-09  Jan Hubicka  <jh@suse.cz>
7355         PR rtl/84058
7356         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7357         jumps; choose last target that matches the criteria (i.e.
7358         no partition changes for non-crossing jumps).
7359         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7360         support for redirecting crossing jumps to non-crossing.
7362 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7364         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7365         also for naked functions.
7367 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7369         * config/arc/arc.md (add_shift): New pattern.
7370         (add_shift2): Likewise.
7371         (sub_shift): Likewise.
7372         (sub_shift_cmp0_noout): Likewise.
7373         (compare_si_ashiftsi): Likewise.
7374         (xbfu_cmp0_noout): New combine pattern.
7375         (xbfu_cmp0"): Likewise.
7376         (movsi_set_cc_insn): Place the predicable variant first.
7377         (commutative_binary_cmp0_noout): Remove clobber.
7378         (commutative_binary_cmp0): New pattern.
7379         (noncommutative_binary_cmp0): Likewise.
7380         (noncommutative_binary_cmp0_noout): Likewise.
7381         (noncommutative_binary_comparison_result_used): Removed.
7382         (rsub_cmp0): New pattern.
7383         (rsub_cmp0_noout): Likewise.
7384         (extzvsi): Changed, keep only meaningful variants.
7385         (SQH, SEZ): New iterators.
7386         (SQH_postfix): New mode attribute.
7387         (SEZ_prefix): New code attribute.
7388         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7389         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7390         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7391         of numerical value.
7392         (noncommutative_operator): Check the availability of barrel
7393         shifter option.
7395 2018-04-09  Richard Biener  <rguenther@suse.de>
7397         PR tree-optimization/85284
7398         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7399         Only use the niter constraining form of simple_iv when the exit
7400         is always executed.
7402 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7404         PR target/84041
7405         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7406         (define_expand "*memory_barrier"): New define_expand.
7407         (define_insn "memory_barrier"): New insn.
7409 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7411         PR rtl-optimization/80463
7412         PR rtl-optimization/83972
7413         PR rtl-optimization/83480
7415         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7416         correct producer for the insn.
7417         (tidy_control_flow): Fixup seqnos in case of debug insns.
7419 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7421         PR rtl-optimization/83913
7423         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7424         different sched-times when merging exprs.
7426 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7428         PR rtl-optimization/83962
7430         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7431         tidy_fallthru_edge and tidy_control_flow.
7433 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7435         PR rtl-optimization/83530
7437         * sel-sched.c (force_next_insn): New global variable.
7438         (remove_insn_for_debug): When force_next_insn is true, also leave only
7439         next insn in the ready list.
7440         (sel_sched_region): When the region wasn't scheduled, make another pass
7441         over it with force_next_insn set to 1.
7443 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7445         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7446         into tm_file.
7447         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7448         for interrupt control.
7449         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7450         functions for interrupt control.
7451         * config/nds32/nds32-intrinsic.md: Likewise.
7452         * config/nds32/nds32_intrinsic.h: Likewise.
7453         * config/nds32/nds32.h (nds32_builtins): Likewise.
7455 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7457         * config/nds32/nds32.c (nds32_init_machine_status,
7458         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7459         strict_aligned_p field.
7460         (nds32_expand_to_rtl_hook): New function.
7461         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7462         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7464 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7465             Chung-Ju Wu  <jasonwucj@gmail.com>
7467         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7468         * config/nds32/nds32-n7.md: New file.
7469         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7470         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7471         pipeline.
7472         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7473         * config/nds32/nds32.md (pipeline_model): Add n7.
7474         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7475         * config/nds32/pipelines.md: Include n7 settings.
7477 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7478             Chung-Ju Wu  <jasonwucj@gmail.com>
7480         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7481         * config/nds32/nds32-e8.md: New file.
7482         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7483         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7484         pipeline.
7485         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7486         * config/nds32/nds32.md (pipeline_model): Add e8.
7487         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7488         * config/nds32/pipelines.md: Include e8 settings.
7490 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7491             Chung-Ju Wu  <jasonwucj@gmail.com>
7493         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7494         * config/nds32/nds32-n8.md: New file.
7495         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7496         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7497         pipeline.
7498         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7499         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7500         * config/nds32/nds32.md (pipeline_model): Add n8.
7501         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7502         * config/nds32/pipelines.md: Include n8 settings.
7504 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7505             Chung-Ju Wu  <jasonwucj@gmail.com>
7507         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7508         * config/nds32/nds32-n9-2r1w.md: New file.
7509         * config/nds32/nds32-n9-3r2w.md: New file.
7510         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7511         nds32_register_ports): New or modify for cpu n9.
7512         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7513         pipeline.
7514         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7515         * config/nds32/nds32-utils.c: New file.
7516         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7517         TARGET_MUL_SLOW): Define.
7518         * config/nds32/nds32.md (pipeline_model): New attribute.
7519         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7520         New options that support cpu n9.
7521         * config/nds32/pipelines.md: Include n9 settings.
7522         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7524 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7526         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7527         information if necessary.
7528         (output_cond_branch_compare_zero): Likewise.
7529         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7530         (nds32_target_alignment): Refine for alignment.
7531         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7532         (FUNCTION_BOUNDARY): Modify.
7533         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7534         align case.
7535         * config/nds32/nds32.opt (malways-align, malign-functions): New.
7537 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7539         * config/nds32/constants.md (unspec_volatile_element): Add values for
7540         TLB operation and data prefetch.
7541         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7542         functions for TLB operation and data prefetch.
7543         * config/nds32/nds32-intrinsic.md: Likewise.
7544         * config/nds32/nds32_intrinsic.h: Likewise.
7545         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7546         (nds32_print_operand): Likewise.
7547         * config/nds32/nds32.h (nds32_builtins): Likewise.
7549 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
7550         Andrew Pinski <pinsika@gcc.gnu.org>
7552         PR middle-end/82976
7553         * match.pd: Use constant_boolean_node of correct type instead of
7554         boolean_true_node or boolean_false_node for simplifying
7555         pointer comparisons to zero.
7557 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7559         PR tree-optimization/80021
7560         * tree.c (verify_type_variant): Make error call in verify_variant_match
7561         translatable and remove final full stop.
7563 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7565         * config/nds32/constants.md (unspec_volatile_element): Add
7566         UNSPEC_VOLATILE_EH_RETURN.
7567         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
7568         nds32_output_stack_pop): Support dwarf exception handling process.
7569         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
7570         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
7571         exception handling process.
7572         (nds32_compute_stack_frame): Likewise.
7573         (nds32_return_addr_rtx): Likewise.
7574         (nds32_initial_elimination_offset): Likewise.
7575         (nds32_expand_prologue): Likewise.
7576         (nds32_expand_epilogue): Likewise.
7577         (nds32_dynamic_chain_address): New function.
7578         * config/nds32/nds32.h (machine_function): Add fields for dwarf
7579         exception handling.
7580         (DYNAMIC_CHAIN_ADDRESS): Define.
7581         (EH_RETURN_DATA_REGNO): Define.
7582         (EH_RETURN_STACKADJ_RTX): Define.
7583         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
7584         patterns for dwarf exception handling.
7586 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7588         * config/nds32/nds32.h: Clean up obsolete macros.
7590 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7592         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7593         Add enum values for particular instructions.
7594         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7595         particular intrinsic functions.
7596         * config/nds32/nds32-intrinsic.md: Likewise.
7597         * config/nds32/nds32_intrinsic.h: Likewise.
7598         * config/nds32/nds32.h (nds32_builtins): Likewise.
7599         * config/nds32/nds32.md (type): Add pbsad and pbsada.
7600         (btst, ave): New patterns for particular instructions.
7602 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7604         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
7605         Add enum values for atomic load/store and memory sync.
7606         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
7607         and memory sync.
7608         * config/nds32/nds32-intrinsic.md: Likewise.
7609         * config/nds32/nds32_intrinsic.h: Likewise.
7610         * config/nds32/nds32.h (nds32_builtins): Likewise.
7612 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
7614         PR tree-optimization/85257
7615         * fold-const.c (native_encode_vector): If not all elts could fit
7616         and off is -1, return 0 rather than offset.
7617         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
7618         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
7619         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
7620         adjust buffer in native_interpret_expr call.
7622 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7624         * config/nds32/constants.md (unspec_volatile_element): Add cache
7625         control enum values.
7626         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
7627         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
7628         * config/nds32/nds32.c (nds32_cctl_names): New.
7629         (nds32_print_operand): Handle cache control register names.
7630         * config/nds32/nds32.h (nds32_builtins): New enum values.
7631         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
7632         macros.
7633         * config/nds32/nds32.md (type): Add mmu.
7634         * config/nds32/pipelines.md (simple_insn): Add mmu.
7636 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7638         * config/nds32/nds32.md (type): Remove call.
7639         * config/nds32/pipelines.md (simple_insn): Likewise.
7641 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7643         * config/nds32/constants.md (unspec_volatile_element): Add
7644         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
7645         UNSPEC_VOLATILE_FMFCFG.
7646         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
7647         description for fmfcfg and fmfcsr.
7648         (bdesc_1arg): Add fmtcsr.
7649         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
7650         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
7651         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
7652         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
7653         unspec_fmfcfg): New patterns.
7654         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
7655         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
7656         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
7657         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
7658         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
7659         __nds32__fmfcfg): Define.
7661 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
7663         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
7664         intrinsic register names.
7665         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
7666         intrinsic register enum values and macros.
7668 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
7670         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
7671         for load/store addressing form.
7672         (nds32_print_operand_address): Likewise.
7674 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
7676         PR target/85196
7677         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
7678         based on LABEL_REF.  Remove useless assertion.
7679         (pic_address_needs_scratch): Fix formatting.
7680         (sparc_legitimize_pic_address): Minor tweaks.
7681         (sparc_delegitimize_address): Adjust assertion accordingly.
7682         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
7683         into symbolic_operand.
7684         (movsi_high_pic_label_ref): Likewise.
7685         (movsi_lo_sum_pic_label_ref): Likewise.
7686         (movdi_pic_label_ref): Likewise.
7687         (movdi_high_pic_label_ref): Likewise.
7688         (movdi_lo_sum_pic_label_ref): Likewise.
7690 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
7692         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
7693         custom LIB_SPEC setup.
7695 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
7696             Kito Cheng  <kito.cheng@gmail.com>
7698         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
7699         * config/riscv/freebsd.h: New.
7701 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7703         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
7704         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
7705         file.
7707 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7708             Kito Cheng  <kito.cheng@gmail.com>
7710         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
7711         nds32_output_call, nds32_symbol_binds_local_p): New functions.
7712         * config/nds32/nds32-protos.h (nds32_output_call,
7713         nds32_output_return): Declare.
7714         * config/nds32/nds32.md: Refine all the call and return patterns.
7716 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7718         PR debug/85252
7719         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
7720         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
7722         PR rtl-optimization/84872
7723         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
7724         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
7725         EDGE_CROSSING edge.
7727 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
7729         * expr.c (copy_blkmode_to_reg): Revert 254862.
7730         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
7732 2018-04-06  Richard Biener  <rguenther@suse.de>
7734         PR middle-end/85244
7735         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
7736         after seeing a component reference with an adjacent field.  Treat
7737         refs to arrays at struct end of external decls similar to
7738         refs to unconstrained commons.
7740 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
7742         PR sanitizer/85213
7743         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
7744         look through SAVE_EXPRs with non-side-effects argument.  Adjust
7745         recursive calls.
7746         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
7747         save_p here.
7749 2018-04-06  Richard Biener  <rguenther@suse.de>
7751         PR middle-end/85180
7752         * alias.c (find_base_term): New wrapper around find_base_term
7753         unwinding CSELIB_VAL_PTR changes.
7754         (find_base_term): Do not restore CSELIB_VAL_PTR during the
7755         recursion.
7757 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7759         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
7760         instructions.
7761         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
7762         constant definitions.
7763         ("nop"): lr 0,0 -> nopr r0
7764         ("nop_lr0", "nop_lr1"): New insn definitions.
7766 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
7768         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
7769         NDS32_V3PUSH_AVAILABLE_P macro.
7771 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
7772             Chung-Ju Wu  <jasonwucj@gmail.com>
7774         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
7775         (nds32*-*-*): Add float and fpu_config into supported_defaults.
7776         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
7777         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
7778         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
7779         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
7780         * config/nds32/constraints.md: New constraints and checking for hard
7781         float configuration.
7782         * config/nds32/iterators.md: New mode iterator and attribute for hard
7783         float configuration.
7784         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
7785         patterns.
7786         * config/nds32/nds32-fpu.md: New file.
7787         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
7788         deal with hard float code generation.
7789         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
7790         ARCH_V3S.
7791         (abi_type, float_reg_number): New enum type.
7792         * config/nds32/nds32-predicates.c: New predicates for hard float.
7793         * config/nds32/nds32-protos.h: Declare functions for hard float.
7794         * config/nds32/nds32.c: Implementation for hard float configuration.
7795         * config/nds32/nds32.h: Definitions for hard float configuration.
7796         * config/nds32/nds32.md: Include hard float machine description and
7797         modify patterns for hard float configuration.
7798         * config/nds32/nds32.opt: New options for hard float configuration.
7799         * config/nds32/predicates.md: New predicates for hard float
7800         configuration.
7802 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
7804         * common/config/nds32/nds32-common.c
7805         (nds32_option_optimization_table): Enable -mreleax-hint by default.
7807 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
7809         PR middle-end/85195
7810         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
7811         CONSTRUCTOR_ELT (ctor, ...)->value.
7813 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
7815         PR target/85193
7816         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
7818 2018-04-05  Tom de Vries  <tom@codesourcery.com>
7820         PR target/85204
7821         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
7822         cond jump.
7824 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7825             Kito Cheng  <kito.cheng@gmail.com>
7827         * config/nds32/constraints.md (U33): Fine-tune checking condition.
7828         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
7829         * config/nds32/nds32.h (nds32_16bit_address_type): Add
7830         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
7832 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
7833             Kito Cheng  <kito.cheng@gmail.com>
7835         * config/nds32/constraints.md (Ufe): New memory constraint.
7836         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
7837         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
7838         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
7839         operands.
7840         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
7841         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
7843 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7845         * config/nds32/nds32.md: Use optimize_size in the condition for
7846         alu-shift instructions.
7848 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7850         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
7852 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7854         * config/nds32/nds32.md (negsi2): Refine pattern.
7856 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7857             Chung-Ju Wu  <jasonwucj@gmail.com>
7859         * config/nds32/iterators.md (shift_rotate): New code iterator.
7860         (shift): New code attribute.
7861         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
7862         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
7863         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
7864         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
7865         bit-wise operations.
7866         (andsi3, *andsi3): Ditto.
7867         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
7868         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
7869         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
7870         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
7871         nds32_ior_operand, nds32_xor_operand): New predicates.
7873 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7875         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
7876         (addsi3, subsi3): ... this.
7878 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7880         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
7882 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7884         * config/nds32/nds32.md: Adjust indention.
7886 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
7888         * config/nds32/nds32.md (feature): New attribute.
7890 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
7892         * config/nds32/nds32.md (subtype): New attribute.
7894 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7896         PR target/85203
7897         * config/arm/arm-builtins.c (arm_expand_builtin): Change
7898         expansion to perform a bitwise AND of the argument followed by a
7899         boolean negation of the result.
7901 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
7903         PR rtl-optimization/84878
7904         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
7905         the basic block.  Assert the use reference is not artificial and that
7906         it has an associated insn.
7908 2018-04-04  Michael Matz  <matz@suse.de>
7910         * builtins.c (compute_objsize): Pass correct operand
7911         to array_at_struct_end_p.
7913 2018-04-04  Richard Biener  <rguenther@suse.de>
7915         PR lto/85176
7916         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
7917         from contexts for DINFO_LEVEL_TERSE and below.
7919 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7921         * config/nds32/nds32-doubleword.md (move_<mode>): Require
7922         resiter_operand condition.
7923         * config/nds32/nds32.md (*move<mode>): Ditto.
7925 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7926             Monk Chiang  <sh.chiang04@gmail.com>
7928         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
7930 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7932         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
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_inverse_cond_code,
7938         nds32_cond_code_str, output_cond_branch,
7939         output_cond_branch_compare_zero, nds32_expand_cbranch,
7940         nds32_expand_cstore, nds32_expand_movcc,
7941         nds32_output_cbranchsi4_equality_zero,
7942         nds32_output_cbranchsi4_equality_reg,
7943         nds32_output_cbranchsi4_equality_reg_or_const_int,
7944         nds32_output_cbranchsi4_greater_less_zero: New functions.
7945         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
7946         nds32_expand_cstore, nds32_expand_movcc,
7947         nds32_output_cbranchsi4_equality_zero,
7948         nds32_output_cbranchsi4_equality_reg,
7949         nds32_output_cbranchsi4_equality_reg_or_const_int,
7950         nds32_output_cbranchsi4_greater_less_zero): Declare.
7951         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
7952         nds32_rimm11s_operand): New predicates.
7953         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
7954         * config/nds32/nds32.md: Rewrite all the branch and conditional move
7955         patterns.
7957 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
7959         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
7960         * config/nds32/nds32.md: Ditto.
7961         * config/nds32/pipelines.md: Ditto.
7963 2018-04-04  Richard Biener  <rguenther@suse.de>
7965         PR tree-optimization/85168
7966         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
7967         propagating abnormals.
7969 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7971         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
7973 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
7974             Kito Cheng  <kito.cheng@gmail.com>
7976         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
7977         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
7978         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
7979         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
7980         * config/nds32/nds32.md (sibcall_internal): New.
7981         (sibcall_register): Remove.
7982         (sibcall_immediate): Remove.
7983         (sibcall_value_internal): New.
7984         (sibcall_value_register): Remove.
7985         (sibcall_value_immediate): Remove.
7986         * config/nds32/predicates.md (nds32_general_register_operand): New.
7987         (nds32_call_address_operand): New.
7989 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
7991         PR rtl-optimization/85167
7992         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
7993         bb_defs if *split_p, instead preinitialize it to NULL.
7995         PR tree-optimization/85156
7996         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
7997         evaluating the argument multiple times.
7999 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
8001         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8002         than vector.
8003         (_mm_cvtpd_ps): Likewise.
8004         (_mm_cvttpd_epi32): Likewise.
8005         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8006         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8007         vector, pixel, and bool following altivec.h include.
8009 2018-04-03  Martin Sebor  <msebor@redhat.com>
8011         * doc/extend.texi (Common Function Attributes): Clarify.
8012         (const attribute): Likewise.
8013         (pure attribute): Likewise.
8015 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8017         PR target/85169
8018         * config/i386/i386.c (ix86_expand_vector_set): Use
8019         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
8021 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
8023         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8024         instructions when changing rounding bits to preserve precision bits
8025         in the x87 control word.
8027 2018-04-03  Martin Liska  <mliska@suse.cz>
8029         PR tree-optimization/82491
8030         * rtl.h (strip_offset_and_add): Replace += suboffset with
8031         poly_uint64 () + suboffset.
8033 2018-03-29  Martin Liska  <mliska@suse.cz>
8034             Martin Jambor  <mjambor@suse.cz>
8036         PR ipa/84947
8037         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8038         param_type is not an integral or pointer type.
8040 2018-04-03  Richard Biener  <rguenther@suse.de>
8042         * sese.h (recompute_all_dominators): Remove.
8044 2018-04-02  Martin Sebor  <msebor@redhat.com>
8046         * doc/invoke.texi (-Wrestrict): Fix typos.
8048 2018-04-02  Jim Wilson  <jimw@sifive.com>
8050         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8051         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8052         (<optab>di3, <optab>si3_extend): Likewise.
8053         (<optab>si3_mask, <optab>si3_mask_1): New.
8054         (<optab>di3_mask, <optab>di3_mask_1): New.
8055         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8056         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8057         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8059 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8061         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8062         example.
8064 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8066         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8067         (nds32_canonicalize_comparison): New function.
8069 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8070             Kito Cheng  <kito.cheng@gmail.com>
8071             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8073         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8074         * config/nds32/constants.md (unspec_volatile_element): Add
8075         UNSPEC_VOLATILE_RELAX_GROUP.
8076         * config/nds32/nds32-relax-opt.c: New file.
8077         * config/nds32/nds32-predicates.c
8078         (nds32_symbol_load_store_p): New function.
8079         * config/nds32/nds32-protos.h
8080         (nds32_symbol_load_store_p): Declare function.
8081         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8082         * config/nds32/nds32.c
8083         (nds32_register_pass): New function to register pass.
8084         (nds32_register_passes): New function to register passes.
8085         * config/nds32/nds32.md (relax_group): New pattern.
8086         * config/nds32/nds32.opt (mrelax-hint): New option.
8087         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8089 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8091         * config/nds32/t-nds32: Modify files dependency.
8093 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8095         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8096         (PROFILE_HOOK): Define its implementation.
8098 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8100         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8101         type and 32-bit size.
8103 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8105         PR middle-end/85090
8106         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8107         (V_128_256): New mode iterator.
8108         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8109         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8110         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8111         of V.
8112         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8113         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8115 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8117         PR target/83315
8118         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8119         NaN inputs correctly.
8121 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8123         PR target/80546
8124         * config/rs6000/vsx.md (??r): New mode attribute.
8125         (*vsx_mov<mode>_64bit): Use it.
8126         (*vsx_mov<mode>_32bit): Likewise.
8128 2018-03-30  Martin Sebor  <msebor@redhat.com>
8130         PR tree-optimization/84818
8131         * builtins.c (check_access): Use warning_n.
8133 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8135         PR target/83822
8136         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8137         condition.
8138         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8139         condition.
8141 2018-03-30  Julia Koval  <julia.koval@intel.com>
8143         PR target/84413
8144         * x86-tune.def (movx, partial_reg_dependency): Enable for
8145         m_SKYLAKE_AVX512.
8147 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8149         PR inline-asm/84985
8150         * lra-constraints.c (process_alt_operands): Move setting
8151         this_alternative_matches below.
8153 2018-03-29  Martin Liska  <mliska@suse.cz>
8155         PR lto/84995.
8156         * doc/invoke.texi: Document how LTO works with debug info.
8157         Describe auto-load support of binutils.  Mention 'x86-64'
8158         as valid option value of -march option.
8160 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8162         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8164         PR c/85094
8165         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8166         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8167         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8168         checking.
8170 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8172         PR target/84912
8173         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8174         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8175         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8176         for RS6000_BTM_POWERPC64.
8177         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8178         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8179         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8180         definition.
8181         (DIVDE): Use it.
8182         (DIVDEU): Likewise.
8184 2018-03-28 Carl Love  <cel@us.ibm.com>
8186         Revert
8187         2017-09-27  Carl Love  <cel@us.ibm.com>
8189         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8190         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8191         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8192         fctiw instruction.
8194 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8196         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8197         instead of __vector bool.
8198         (_mm_max_pu8): Likewise.
8199         (_mm_min_pi16): Likewise.
8201 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8203         PR target/84912
8204         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8205         (DIVWEUO): Likewise.
8206         (DIVDEO): Likewise.
8207         (DIVDEUO): Likewise.
8208         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8209         DIVWEUO and DIVDEUO.
8210         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8211         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8212         (div_extend): Likewise.
8213         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8214         builtin function.
8215         (__builtin_divweuo): Likewise.
8216         (__builtin_divdeo): Likewise.
8217         (__builtin_divdeuo): Likewise.
8219 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8221         PR target/85095
8222         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8223         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8225         PR tree-optimization/82004
8226         * gimple-match-head.c (optimize_pow_to_exp): New function.
8227         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8228         Don't fold to exp if optimize_pow_to_exp is false.
8230 2018-03-28  Martin Liska  <mliska@suse.cz>
8232         PR other/84819
8233         * calls.c (initialize_argument_information): Fix trailing space.
8234         * common.opt: Fix typo and provide better explanation for
8235         -fsanitize-coverage option.
8236         * config/i386/i386.opt: Fix typo.
8238 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8239             Martin Liska  <mliska@suse.cz>
8241         PR sanitizer/85081
8242         * gimplify.c (asan_poison_variable): Don't do the check for
8243         gimplify_omp_ctxp here.
8244         (gimplify_decl_expr): Do it here.
8245         (gimplify_target_expr): Likewise.
8247 2018-03-28  Martin Liska  <mliska@suse.cz>
8249         PR target/84988
8250         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8251         chkp_type_bounds_count if MPX is not enabled.
8253 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8255         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8257 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8259         PR target/84914
8260         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8261         function to create the function decl for complex long double
8262         multiply and divide for -mabi=ieeelongdouble.
8263         (init_float128_ieee): Call it.
8265 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8267         PR target/85044
8268         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8269         -fcf-protection=branch -mibt.
8270         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8272 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8274         PR target/81863
8275         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8276         arm_word_relocations.
8278 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8280         PR target/85056
8281         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8282         extern array declarations.
8284 2018-03-27  Richard Biener  <rguenther@suse.de>
8286         PR middle-end/84067
8287         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8288         explicit single_use checks.
8290 2018-03-27  Richard Biener  <rguenther@suse.de>
8292         PR tree-optimization/85082
8293         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8294         Valueize the VUSE.
8296 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8298         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8299         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8300         Turn on fasynchronous-unwind-tables and funwind-tables.
8302 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8304         PR target/85073
8305         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8306         (*bmi_blsr_<mode>_ccz): Ditto.
8308 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8310         PR tree-optimization/85063
8311         * omp-general.c (offloading_function_p): New function.  Factor out
8312         of ...
8313         * omp-offload.c (pass_omp_target_link::gate): ... here.
8314         * omp-general.h (offloading_function_p): Declare.
8315         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8316         with attribute omp declare target for offloading functions.
8318 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8320         PR tree-optimization/84005
8321         * tree-data-ref.h (get_base_for_alignment): Declare.
8322         * tree-data-ref.c (get_base_for_alignment_1): New function.
8323         (get_base_for_alignment): Likewise.
8324         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8325         get_base_for_alignment to find a suitable base object, instead
8326         of always using drb->base_address.
8328 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8330         PR inline-asm/85022
8331         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8332         known size by default.
8334 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8336         PR inline-asm/85030
8337         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8338         and non BLKmode operands.
8340 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8342         PR target/85026
8343         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8344         Clean up attributes.
8346 2018-03-23  Richard Biener  <rguenther@suse.de>
8348         PR debug/85020
8349         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8350         we are going to emit early debug for LTO.
8352 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8354         PR inline-asm/85034
8355         * function.c (match_asm_constraints_1): Don't optimize if input
8356         doesn't satisfy general_operand predicate for output's mode.
8358         PR inline-asm/85022
8359         * alias.c (write_dependence_p): Don't require for x_canonicalized
8360         non-VOIDmode if x has VOIDmode.
8362         PR sanitizer/85029
8363         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8364         just don't try to optimize it rather than assert it never happens.
8366 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8368         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8369         macro expansions for definition of ST_INTERNAL_<mode> and
8370         LD_INTERNAL_<mode> builtins.
8371         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8372         Remove prototype.
8373         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8374         function.
8375         (altivec_expand_st_builtin): Likewise.
8376         (altivec_expand_builtin): Remove calls to deleted functions.
8377         (rs6000_address_for_altivec): Delete this function.
8378         * config/rs6000/vector.md: Remove expands for
8379         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8381 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8383         PR target/84826
8384         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8385         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8386         re-computing once computed.
8387         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8388         (arm_init_machine_status): Initialize
8389         machine->static_chain_stack_bytes.
8391 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8393         PR target/84760
8394         * doc/extend.texi: Add four new prototypes for vec_ld.
8395         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8396         definitions for more logical presentation.
8397         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8398         entries for V1TI variants of __builtin_altivec_ld builtin.
8399         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8400         handling of V1TI variant of LVX icode pattern.
8401         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8402         (rs6000_gimple_fold_builtin): Likewise.
8403         (altivec_init_builtins): Add code to define
8404         __builtin_altivec_lvx_v1ti function.
8406 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8408         PR inline-asm/84941
8409         * function.c (match_asm_constraints_1): Don't do the optimization
8410         if input isn't a REG, SUBREG, MEM or constant.
8412 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8414         PR tree-optimization/84956
8415         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8416         bb_has_abnormal_pred.
8418 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8420         PR sanitizer/85018
8421         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8422         DECL_INITIAL (decl) to decl at the end.
8423         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8424         adjust the comment.
8426 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8428         * doc/extend.texi (__builtin_tgmath): Document when complex
8429         integer types are treated as _Complex _Float64.
8431 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8433         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8435 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8437         PR tree-optimization/84960
8438         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8439         if it is ENTRY block, move them into single succ of ENTRY in that case.
8441 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8443         PR tree-optimization/84811
8444         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8445         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8446         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8447         (known_subrange_p): Update accordingly.  Cast each value involved
8448         in the size comparison, rather than casting the result of the
8449         subtraction.
8451 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8453         PR tree-optimization/84982
8454         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8455         by flipping the least significant bit rather than all bits from
8456         bitpos to bitpos + bitsize - 1.
8458 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8460         * doc/extend.texi (Deprecated Features): Remove mention of
8461         long-deleted deprecations.
8463 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8465         PR jit/84288
8466         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8467         * configure: Regenerate.
8469 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8471         PR tree-optimization/83126
8472         * tree-parloops.c (num_phis): New function.
8473         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8475 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8477         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8478         mention anon-struct/union members and trailing attributes.
8480 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8482         PR tree-optimization/84969
8483         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8484         builtin memset partitions if they set different rhs values.
8486 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8488         PR rtl-optimization/84989
8489         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8490         VEC_DUPLICATE with scalar result mode.
8492 2018-03-21  Martin Liska  <mliska@suse.cz>
8494         PR ipa/84963
8495         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8496         not intended return statement.
8498 2018-03-21  Martin Liska  <mliska@suse.cz>
8500         PR target/84988
8501         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8502         (chkp_find_bound_slots_1): Limit number of iterations.
8504 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8506         PR target/84838
8507         * Minor grammar fixes for x86 options.
8509 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8511         PR debug/84875
8512         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8513         holding REG_CFA_RESTORE notes, instead turn them into a USE.
8515 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
8517         PR target/83789
8518         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8519         (altivec_lvx_<mode>_1op): Likewise.
8520         (altivec_stvx_<mode>_2op): Likewise.
8521         (altivec_stvx_<mode>_1op): Likewise.
8522         (altivec_lvx_<VM2:mode>): New define_expand.
8523         (altivec_stvx_<VM2:mode>): Likewise.
8524         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8525         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8526         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8527         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8528         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8529         (rs6000_gen_lvx): Likewise.
8530         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8531         (altivec_expand_stv_builtin): Likewise.
8532         (altivec_expand_builtin): Likewise.
8533         * config/rs6000/vector.md: Likewise.
8535 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8537         PR target/82518
8538         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8539         BYTES_BIG_ENDIAN.
8541 2018-03-20  Richard Biener  <rguenther@suse.de>
8543         PR target/84986
8544         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8545         sign-conversions as zero, fall back to standard scalar_stmt
8546         cost for the rest.
8548 2018-03-20  Martin Liska  <mliska@suse.cz>
8550         PR ipa/84825
8551         * predict.c (rebuild_frequencies): Handle case when we have
8552         PROFILE_ABSENT, but flag_guess_branch_prob is false.
8554 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8556         PR target/84990
8557         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
8558         flag_section_anchors.
8559         * varasm.c (use_blocks_for_decl_p): Remove hack for
8560         dw2_force_const_mem.
8562         PR target/84845
8563         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
8564         to ...
8565         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
8566         be created, use lowpart_subreg of operands[0] rather than operands[0]
8567         itself.
8568         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
8569         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
8570         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
8571         and n constraint instead of aarch64_shift_imm_di and Usd.
8572         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
8573         (*aarch64_<optab>_reg_minus<mode>3): ... this.
8575 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
8577         PR target/82989
8578         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
8579         to favor GPR over NEON registers.
8580         (<shift>di3_neon): Likewise.
8582 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8584         PR target/84952
8585         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
8586         (nvptx_process_pars): Emit bar.sync asap and alap.
8588 2018-03-20  Tom de Vries  <tom@codesourcery.com>
8590         PR target/84954
8591         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
8592         seen_label if seen_label is already set.
8594 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8596         PR target/84945
8597         * config/i386/i386.c (fold_builtin_cpu): For features above 31
8598         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
8599         Use 1U instead of 1.  Formatting fixes.
8601         PR c/84953
8602         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
8603         instead of TREE_TYPE (s1) for the return value.
8605 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
8607         PR tree-optimization/84946
8608         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
8609         bitsize + bitsize in poly_uint64 rather than poly_int64.
8611         PR sanitizer/78651
8612         * dwarf2asm.c: Include fold-const.c.
8613         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
8614         of decl rather than decl itself.
8616         PR rtl-optimization/84643
8617         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
8619 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
8621         PR sanitizer/78651
8622         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
8623         calling assemble_variable.
8625 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
8627         PR target/81647
8628         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
8629         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
8631 2018-03-19  Jim Wilson  <jimw@sifive.com>
8633         PR bootstrap/84856
8634         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
8635         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
8636         (riscv_first_stack_step): Likewise.
8637         (riscv_option_override): Use STACK_BOUNDARY instead of
8638         MIN_STACK_BOUNDARY.
8639         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
8640         MIN_STACK_BOUNDARY.
8641         (BIGGEST_ALIGNMENT): Set to 128.
8642         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
8643         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
8644         STACK_BOUNDARY.
8646 2018-03-19  Richard Biener  <rguenther@suse.de>
8648         PR tree-optimization/84933
8649         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
8650         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
8652 2018-03-19  Richard Biener  <rguenther@suse.de>
8654         PR tree-optimization/84859
8655         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
8656         (cond_if_else_store_replacement): Perform sinking operation on
8657         single-store BBs regardless of MAX_STORES_TO_SINK setting.
8658         Generalize what a BB with a single eligible store is.
8660 2018-03-19  Richard Biener  <rguenther@suse.de>
8662         PR tree-optimization/84929
8663         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
8664         chrec_is_positive against non-chrec arg.
8666 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
8668         PR target/84711
8669         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
8671 2018-03-18  Martin Liska  <mliska@suse.cz>
8673         PR rtl-optimization/84635
8674         * regrename.c (build_def_use): Use matches_mode only when
8675         matches >= 0.
8677 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
8679         PR tree-optimization/84913
8680         * tree-vect-loop.c (vectorizable_reduction): Don't try to
8681         vectorize chains of COND_EXPRs.
8683 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8685         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
8687 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8689         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
8691 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
8693         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
8695 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8696             Kito Cheng  <kito.cheng@gmail.com>
8698         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
8699         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
8700         (nds32_adjust_reg_alloc_order): New function.
8701         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
8703 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
8705         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
8706         nds32_print_operand, nds32_print_operand_address): Use
8707         HOST_WIDE_INT_PRINT_DEC instead.
8709 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
8711         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
8713 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
8715         PR target/84902
8716         * config/i386/i386.c (initial_ix86_tune_features,
8717         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
8718         unsigned long long.
8719         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
8720         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
8721         rather than 1u << ix86_tune.  Formatting fix.
8722         (ix86_option_override_internal): Change ix86_arch_mask from
8723         unsigned int to unsigned HOST_WIDE_INT, initialize to
8724         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
8725         (ix86_function_specific_restore): Likewise.
8727 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8729         PR target/84899
8730         * postreload.c (reload_combine_recognize_pattern): Perform
8731         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
8732         truncate_int_for_mode the result for the destination's mode.
8734         PR c/84909
8735         * hsa-gen.c (mem_type_for_type): Fix comment typo.
8736         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
8737         Likewise.
8738         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
8739         Likewise.
8741 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
8743         PR target/84876
8744         * lra-assigns.c (lra_split_hard_reg_for): Don't use
8745         regno_allocno_class_array and sorted_pseudos.
8746         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
8747         insns where regno is used.
8749 2018-03-16  Martin Liska  <mliska@suse.cz>
8751         PR ipa/84833
8752         * multiple_target.c (create_dispatcher_calls): Redirect
8753         reference in the symbol table.
8755 2018-03-16  Martin Liska  <mliska@suse.cz>
8757         PR ipa/84722
8758         * multiple_target.c (create_dispatcher_calls): Redirect also
8759         an alias.
8761 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8763         PR c++/79937
8764         PR c++/82410
8765         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
8766         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
8767         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
8769 2018-03-16  Julia Koval  <julia.koval@intel.com>
8771         * doc/invoke.texi (Skylake Server): Add CLWB.
8772         Cannonlake): Remove CLWB.
8774 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
8776         PR tree-optimization/84841
8777         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
8778         1 << 3.
8779         (FLOAT_ONE_CONST_TYPE): Define.
8780         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
8781         (sort_by_operand_rank): Put entries with higher constant_type last
8782         rather than first to match comments.
8784 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
8786         * config/nios2/nios2.md (movsi_internal): Fix thinko in
8787         split predicate.
8789 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8791         PR c++/79085
8792         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
8793         check and use address of target always.
8795 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
8797         PR target/84574
8798         * config/i386/i386.c (indirect_thunk_needed): Update comments.
8799         (indirect_thunk_bnd_needed): Likewise.
8800         (indirect_thunks_used): Likewise.
8801         (indirect_thunks_bnd_used): Likewise.
8802         (indirect_return_needed): New.
8803         (indirect_return_bnd_needed): Likewise.
8804         (output_indirect_thunk_function): Add a bool argument for
8805         function return.
8806         (output_indirect_thunk_function): Don't generate alias for
8807         function return thunk.
8808         (ix86_code_end): Call output_indirect_thunk_function to generate
8809         function return thunks.
8810         (ix86_output_function_return): Set indirect_return_bnd_needed
8811         and indirect_return_needed instead of indirect_thunk_bnd_needed
8812         and indirect_thunk_needed.
8814 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
8816         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
8817         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
8818         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
8820 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
8821             Paul Hua <paul.hua.gm@gmail.com>
8823         PR c/84852
8824         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
8826 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
8828         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
8829         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
8830         resp. SFmode cases.
8832 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
8834         PR target/84711
8835         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8836         instead of GET_MODE_SIZE when comparing Units.
8838 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
8840         PR target/68256
8841         * varasm.c (hash_section): Return an unchangeble hash value
8842         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
8843         Return !aarch64_can_use_per_function_literal_pools_p ().
8845 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
8847         PR target/84860
8848         * optabs.c (emit_conditional_move): Pass address of cmode's copy
8849         rather than address of cmode as last argument to prepare_cmp_insn.
8851 2018-03-15  Julia Koval  <julia.koval@intel.com>
8853         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
8854         F_AVX512VNNI, F_AVX512BITALG): New.
8856 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
8858         PR target/83451
8859         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
8860         insn for floating-point loads and stores.
8862 2018-03-14  Carl Love  <cel@us.ibm.com>
8864         * config/rs6000/rs6000-c.c: Add macro definitions for
8865         ALTIVEC_BUILTIN_VEC_PERMXOR.
8866         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
8867         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
8868         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
8869         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
8870         UNSPEC_VPERMXOR.
8871         * config/doc/extend.texi: Add prototypes for vec_permxor.
8873 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
8875         PR c/84852
8876         * diagnostic-show-locus.c (class layout_point): Convert m_line
8877         from int to linenum_type.
8878         (line_span::comparator): Use linenum "compare" function when
8879         comparing line numbers.
8880         (test_line_span): New function.
8881         (layout_range::contains_point): Convert param "row" from int to
8882         linenum_type.
8883         (layout_range::intersects_line_p): Likewise.
8884         (layout::will_show_line_p): Likewise.
8885         (layout::print_source_line): Likewise.
8886         (layout::should_print_annotation_line_p): Likewise.
8887         (layout::print_annotation_line): Likewise.
8888         (layout::print_leading_fixits): Likewise.
8889         (layout::annotation_line_showed_range_p): Likewise.
8890         (struct line_corrections): Likewise for field m_row.
8891         (line_corrections::line_corrections): Likewise for param "row".
8892         (layout::print_trailing_fixits): Likewise.
8893         (layout::get_state_at_point): Likewise.
8894         (layout::get_x_bound_for_row): Likewise.
8895         (layout::print_line): Likewise.
8896         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
8897         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
8898         * input.c (selftest::test_linenum_comparisons): New function.
8899         (selftest::input_c_tests): Call it.
8900         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
8901         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
8902         * selftest.h (ASSERT_GT): New macro.
8903         (ASSERT_GT_AT): New macro.
8904         (ASSERT_LT): New macro.
8905         (ASSERT_LT_AT): New macro.
8907 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
8909         PR rtl-optimization/84780
8910         * combine.c (distribute_links): Don't make a link based on pc_rtx.
8912 2018-03-14  Martin Liska  <mliska@suse.cz>
8914         * tree.c (record_node_allocation_statistics): Use
8915         get_stats_node_kind.
8916         (get_stats_node_kind): New function extracted from
8917         record_node_allocation_statistics.
8918         (free_node): Use get_stats_node_kind.
8920 2018-03-14  Richard Biener  <rguenther@suse.de>
8922         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
8923         that the value-set of ANTIC_IN doesn't grow.
8925         Revert
8926         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
8927         member.
8928         (BB_VISITED_WITH_VISITED_SUCCS): New define.
8929         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
8931 2018-03-14  Julia Koval  <julia.koval@intel.com>
8933         * config.gcc (icelake-client, icelake-server): New.
8934         (icelake): Remove.
8935         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
8936         (initial_ix86_arch_features): Ditto.
8937         (PTA_SKYLAKE): Add SGX.
8938         (PTA_ICELAKE): Remove.
8939         (PTA_ICELAKE_CLIENT): New.
8940         (PTA_ICELAKE_SERVER): New.
8941         (ix86_option_override_internal): Split up icelake on icelake client and
8942         icelake server.
8943         (get_builtin_code_for_version): Ditto.
8944         (fold_builtin_cpu): Ditto.
8945         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
8946         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
8947         * config/i386/i386.h (processor_type): Ditto.
8948         * doc/invoke.texi: Ditto.
8950 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
8952         PR sanitizer/83392
8953         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
8954         INTEGER_CST offset, add it together with bitpos / 8 and
8955         sign extend based on POINTER_SIZE.
8957         PR target/84844
8958         Revert
8959         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
8961         PR target/78090
8962         * config/i386/constraints.md (Yc): New register constraint.
8963         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
8964         Use Yc constraint for alternative 2 of operand 0.  Remove
8965         preferred_for_speed attribute.
8967 2018-03-14  Richard Biener  <rguenther@suse.de>
8969         PR tree-optimization/84830
8970         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
8971         with the old one to avoid oscillations.
8973 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
8975         PR target/83712
8976         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
8977         pseudos.
8978         (assign_by_spills): Return a flag of reload assignment failure.
8979         Do not process the reload assignment failures.  Do not spill other
8980         reload pseudos if they has the same reg class.  Update n if
8981         necessary.
8982         (lra_assign): Add a return arg.  Set up from the result of
8983         assign_by_spills call.
8984         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
8985         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
8986         usage_insns if it is not NULL.
8987         (spill_hard_reg_in_range): New function.
8988         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
8989         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
8990         function prototypes.
8991         (lra_assign): Change prototype.
8992         * lra.c (lra): Add code to deal with fails by splitting hard reg
8993         live ranges.
8995 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
8997         * config/riscv/riscv.opt (mrelax): New option.
8998         * config/riscv/riscv.c (riscv_file_start): Emit ".option
8999         "norelax" when riscv_mrelax is disabled.
9000         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9002 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9004         PR target/84743
9005         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9006         reassociation for int modes.
9008 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9010         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9011         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9012         for big-endian.
9013         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9014         * config/aarch64/aarch64-sve.md
9015         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9016         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9017         (*extend<mode><Vwide>2): Rename to...
9018         (aarch64_sve_extend<mode><Vwide>2): ...this.
9019         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9020         renaming the old pattern to...
9021         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
9022         unsigned packs.
9023         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9024         define_expand, renaming the old pattern to...
9025         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9026         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9027         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9028         account when deciding which SVE instruction the optab should use.
9029         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9031 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9033         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9034         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9035         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9036         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9037         (tlsdesc_small_<mode>): Turn a define_expand and use
9038         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9039         (tlsdesc_small_advsimd_<mode>): ...this.
9040         (tlsdesc_small_sve_<mode>): New pattern.
9042 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9044         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9045         (UNSPEC_UMUL_HIGHPART): New constants.
9046         (MUL_HIGHPART): New int iteraor.
9047         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9048         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9049         define_expand.
9050         (*<su>mul<mode>3_highpart): New define_insn.
9052 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9054         PR lto/84805
9055         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9056         incomplete types.
9058 2018-03-13  Martin Liska  <mliska@suse.cz>
9060         PR ipa/84658.
9061         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9062         vector.
9063         (sem_item_optimizer::~sem_item_optimizer): Release it.
9064         (sem_item_optimizer::merge_classes): Register variable aliases.
9065         (sem_item_optimizer::fixup_pt_set): New function.
9066         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9067         * ipa-icf.h: Declare new variables and functions.
9069 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9071         PR middle-end/84834
9072         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9073         integer_pow2p@2 and test integer_pow2p in condition.
9074         (A < 0 ? C : 0): Similarly for @1.
9076         PR middle-end/84831
9077         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9078         characters starting at p contain '\0' character, don't look beyond
9079         that.
9081         PR target/84827
9082         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9083         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9085         PR target/84828
9086         * reg-stack.c (change_stack): Change update_end var from int to
9087         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9088         also call set_block_for_insn on the newly added insns and rescan.
9090         PR target/84786
9091         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9092         on the last operand.
9094         PR c++/84704
9095         * tree.c (stabilize_reference_1): Return save_expr (e) for
9096         STATEMENT_LIST even if it doesn't have side-effects.
9098 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9100         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9102 2018-03-12  Renlin Li  <renlin.li@arm.com>
9104         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9105         aarch64_output_scalar_simd_mov_immediate.
9107 2018-03-12  Martin Sebor  <msebor@redhat.com>
9109         PR tree-optimization/83456
9110         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9111         for perfectly overlapping calls to memcpy.
9112         (gimple_fold_builtin_memory_chk): Same.
9113         (gimple_fold_builtin_strcpy): Handle no-warning.
9114         (gimple_fold_builtin_stxcpy_chk): Same.
9115         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9117 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9119         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9120         parameter.  Use it for SFmode.
9121         (rs6000_function_arg_advance_1): Adjust.
9122         (rs6000_function_arg): Adjust.
9123         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9125 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9127         PR rtl-optimization/84169
9128         PR rtl-optimization/84780
9129         * combine.c (can_combine_p): Check for a 2-insn combination whether
9130         the destination register is used between the two insns, too.
9132 2018-03-12  Richard Biener  <rguenther@suse.de>
9134         PR tree-optimization/84803
9135         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9136         for refs DR analysis didn't process.
9138 2018-03-12  Richard Biener  <rguenther@suse.de>
9140         PR tree-optimization/84777
9141         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9142         force-vectorize loops ignore whether we are optimizing for size.
9144 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9146         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9147         (TARGET_MD_ASM_ADJUST): Define.
9149 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9150             Kito Cheng  <kito.cheng@gmail.com>
9151             Chung-Ju Wu  <jasonwucj@gmail.com>
9153         * config/nds32/nds32.c (nds32_compute_stack_frame,
9154         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9155         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9156         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9157         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9158         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9159         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9160         * config/nds32/nds32.md (prologue, epilogue): Use macro
9161         NDS32_V3PUSH_AVAILABLE_P to do checking.
9163 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9165         PR debug/58150
9166         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9167         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9168         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9169         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9170         addition of most attributes on !orig_type_die or the attribute not
9171         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9173 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9174             Chung-Ju Wu  <jasonwucj@gmail.com>
9176         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9177         __NDS32_VH__ macro.
9178         * config/nds32/nds32.opt (mvh): New option.
9180 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9181             Chung-Ju Wu  <jasonwucj@gmail.com>
9183         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9184         function.
9185         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9186         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9187         definition.
9189 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9190             Chung-Ju Wu  <jasonwucj@gmail.com>
9192         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9193         function.
9194         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9195         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9197 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9198             Kito Cheng  <kito.cheng@gmail.com>
9199             Chung-Ju Wu  <jasonwucj@gmail.com>
9201         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9202         UNSPEC_FFMISM and UNSPEC_FLMISM.
9203         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9204         for ffb, ffmism and flmism.
9205         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9206         (unspec_ffmism): Ditto.
9207         (unspec_flmism): Ditto.
9208         (nds32_expand_builtin_impl): Check if string extension is available.
9209         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9210         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9212 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9214         Reverting patch:
9215         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9217         PR target/83712
9218         * lra-assigns.c (assign_by_spills): Return a flag of reload
9219         assignment failure.  Do not process the reload assignment
9220         failures.  Do not spill other reload pseudos if they has the same
9221         reg class.
9222         (lra_assign): Add a return arg.  Set up from the result of
9223         assign_by_spills call.
9224         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9225         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9226         usage_insns if it is not NULL.
9227         (spill_hard_reg_in_range): New function.
9228         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9229         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9230         function prototypes.
9231         (lra_assign): Change prototype.
9232         * lra.c (lra): Add code to deal with fails by splitting hard reg
9233         live ranges.
9235 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9237         PR target/84807
9238         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9240 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9242         PR debug/84620
9243         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9244         (dw_val_node): Add val_symbolic_view.
9245         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9246         (symview_upper_bound): New.
9247         (new_line_info_table): Initialize symviews_since_reset.
9248         (dwarf2out_source_line): Count symviews_since_reset and set
9249         symview_upper_bound.
9250         (dw_val_equal_p): Handle symview.
9251         (add_AT_symview): New.
9252         (print_dw_val): Handle symview.
9253         (attr_checksum, attr_checksum_ordered): Likewise.
9254         (same_dw_val_p, size_of_die): Likewise.
9255         (value_format, output_die): Likewise.
9256         (add_high_low_attributes): Use add_AT_symview for entry_view.
9257         (dwarf2out_finish): Reset symview_upper_bound, clear
9258         zero_view_p.
9260 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9262         PR target/83969
9263         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9264         Add strict argument and use it.
9265         (rs6000_split_multireg_move): Update for new strict argument.
9266         (mem_operand_gpr): Disallow all non-offsettable addresses.
9267         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9269 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9271         PR target/84772
9272         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9273         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9274         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9276         PR c++/84767
9277         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9278         decl, use remap_type if we want to use the type.
9280 2018-03-09  Martin Sebor  <msebor@redhat.com>
9282         PR tree-optimization/84526
9283         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9284         Remove dead code.
9285         (builtin_access::generic_overlap): Be prepared to handle non-array
9286         base objects.
9288 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9290         PR rtl-optimization/84682
9291         * lra-constraints.c (process_address_1): Check is_address flag
9292         for address constraints.
9293         (process_alt_operands): Likewise.
9294         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9295         preprocess_constraints.
9296         * recog.h (preprocess_constraints): Add oploc parameter.
9297         Adjust callers.
9298         * recog.c (preprocess_constraints): Test address_operand for
9299         CT_ADDRESS constraints.
9301 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9303         PR target/83712
9304         * lra-assigns.c (assign_by_spills): Return a flag of reload
9305         assignment failure.  Do not process the reload assignment
9306         failures.  Do not spill other reload pseudos if they has the same
9307         reg class.
9308         (lra_assign): Add a return arg.  Set up from the result of
9309         assign_by_spills call.
9310         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9311         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9312         usage_insns if it is not NULL.
9313         (spill_hard_reg_in_range): New function.
9314         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9315         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9316         function prototypes.
9317         (lra_assign): Change prototype.
9318         * lra.c (lra): Add code to deal with fails by splitting hard reg
9319         live ranges.
9321 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9323         PR target/83193
9324         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9325         Accept complain bool parameter.  Only emit errors if it is true.
9326         (arm_parse_cpu_option_name): Likewise.
9327         (arm_target_thumb_only): Adjust callers of the above.
9328         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9329         prototype to take a default true bool parameter.
9330         (arm_parse_arch_option_name): Likewise.
9332 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9333             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9335         PR jit/64089
9336         PR jit/84288
9337         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9338         * configure: Regenerate.
9339         * configure.ac ("linker --version-script option"): New.
9340         ("linker soname option"): New.
9342 2018-03-09  Richard Biener  <rguenther@suse.de>
9344         PR tree-optimization/84775
9345         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9346         immediate uses of predicate stmts and mark them modified.
9348         Revert
9349         PR tree-optimization/84178
9350         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9351         to caller.
9352         (version_loop_for_if_conversion): Delay update_ssa call.
9353         (tree_if_conversion): Delay update_ssa until after predicate
9354         insertion.
9356 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9358         PR target/84763
9359         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9360         when the function accesses prior frames.
9362 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9364         PR debug/84456
9365         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9366         gen_llsym, otherwise call maybe_gen_llsym.
9368         PR inline-asm/84742
9369         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9370         has ',' character inside of it.
9372 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9374         PR target/84748
9375         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9376         as clobbering CC_REGNUM.
9378 2018-03-08  Richard Biener  <rguenther@suse.de>
9380         PR middle-end/84552
9381         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9382         (follow_copies_to_constant): Do not follow SSA names registered
9383         for update.
9385 2018-03-08  Richard Biener  <rguenther@suse.de>
9387         PR tree-optimization/84178
9388         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9389         to caller.
9390         (version_loop_for_if_conversion): Delay update_ssa call.
9391         (tree_if_conversion): Delay update_ssa until after predicate
9392         insertion.
9394 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9396         PR tree-optimization/84178
9397         * tree-if-conv.c (release_bb_predicate): Remove the
9398         the assertion that the stmts have NULL use_ops.
9399         Discard the statements, asserting that they haven't
9400         yet been added to a BB.
9402 2018-03-08  Richard Biener  <rguenther@suse.de>
9404         PR tree-optimization/84746
9405         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9406         (phi_translate): Pass in destination ANTIC_OUT set.
9407         (phi_translate_1): Likewise.  For a simplified result lookup
9408         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9409         (phi_translate_set): Adjust.
9410         (do_pre_regular_insertion): Likewise.
9411         (do_pre_partial_partial_insertion): Likewise.
9413 2018-03-08  Martin Liska  <mliska@suse.cz>
9415         PR gcov-profile/84735
9416         * doc/gcov.texi: Document usage of profile files.
9417         * gcov-io.h: Document changes in the format.
9419 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9421         PR debug/84404
9422         PR debug/84408
9423         * dwarf2out.c (struct dw_line_info_table): Update comments for
9424         view == -1.
9425         (FORCE_RESET_NEXT_VIEW): New.
9426         (FORCE_RESETTING_VIEW_P): New.
9427         (RESETTING_VIEW_P): Check for -1 too.
9428         (ZERO_VIEW_P): Likewise.
9429         (new_line_info_table): Force-reset next view.
9430         (dwarf2out_begin_function): Likewise.
9431         (dwarf2out_source_line): Simplify zero_view_p initialization.
9432         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9433         view directly.  Omit view when omitting .loc at line 0.
9435 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9437         PR tree-optimization/84740
9438         * tree-switch-conversion.c (process_switch): Call build_constructors
9439         only if info.phi_count is non-zero.
9441         PR tree-optimization/84739
9442         * tree-tailcall.c (find_tail_calls): Check call arguments against
9443         DECL_ARGUMENTS (current_function_decl) rather than
9444         DECL_ARGUMENTS (func) when checking for tail recursion.
9446 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9448         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9449         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9450         Volker Reichelt's entry and add entries for people that perform
9451         GCC fuzzy testing and report numerous bugs.
9453 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9455         PR target/82411
9456         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9457         readonly data in sdata, if that is disabled.
9458         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9459         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9460         -mreadonly-in-sdata option.
9462 2018-03-07  Martin Sebor  <msebor@redhat.com>
9464         PR tree-optimization/84468
9465         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9466         basic block when looking for nul assignment.
9468 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9470         PR target/84277
9471         * except.h (output_function_exception_table): Adjust prototype.
9472         * except.c (output_function_exception_table): Remove FNNAME parameter
9473         and add SECTION parameter.  Ouput one part of the table at a time.
9474         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9475         the first part of the exception table and emit unwind directives.
9476         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9477         (i386_pe_seh_cold_init): Likewise.
9478         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9479         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9480         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9481         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9482         * config/i386/winnt.c: Include except.h.
9483         (struct seh_frame_state): Add reg_offset, after_prologue and
9484         in_cold_section fields.
9485         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9486         (i386_pe_seh_cold_init): New function.
9487         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9488         to seh->in_cold_section.
9489         (seh_emit_push): Record the offset of the push.
9490         (seh_emit_save): Record the offet of the save.
9491         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9492         Test seh->after_prologue to disregard the epilogue.
9493         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9494         (i386_pe_end_cold_function): New function.
9496 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9498         PR fortran/84565
9499         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9500         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9502         PR c++/84704
9503         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9504         on tmp_var.
9505         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9506         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9508         PR middle-end/84723
9509         * multiple_target.c: Include tree-inline.h and intl.h.
9510         (expand_target_clones): Diagnose and fail if node->definition and
9511         !tree_versionable_function_p (node->decl).
9513 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
9515         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9516         sprint_ul.
9517         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9518         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9519         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9521 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9523         PR target/84710
9524         * combine.c (try_combine): Use reg_or_subregno instead of handling
9525         just paradoxical SUBREGs and REGs.
9527 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
9529         * config/arc/arc.c (arc_finalize_pic): Remove function.
9530         (arc_must_save_register): We use single base PIC register, remove
9531         checks to save/restore the PIC register.
9532         (arc_expand_prologue): Likewise.
9533         * config/arc/arc-protos.h (arc_set_default_type_attributes):
9534         Remove.
9535         (arc_verify_short): Likewise.
9536         (arc_attr_type): Likewise.
9537         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9538         (walk_stores): Likewise.
9539         (arc_address_cost): Make it static.
9540         (arc_verify_short): Likewise.
9541         (branch_dest): Likewise.
9542         (arc_attr_type): Likewise.
9543         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9544         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9545         (arc_final_prescan_insn): Remove inserting the nops due to
9546         hardware hazards.  It is done in reorg step.
9547         (insn_length_variant_t): Remove.
9548         (insn_length_parameters_t): Likewise.
9549         (arc_insn_length_parameters): Likewise.
9550         (arc_get_insn_variants): Likewise.
9551         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
9553 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9555         PR inline-asm/84683
9556         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
9557         assertion failure.
9559         PR tree-optimization/84687
9560         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
9561         on new_node->decl.
9562         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
9564 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9566         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
9567         Rename to ppc_speculation_barrier.
9568         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
9569         __builtin_ppc_speculation_barrier.
9571 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9573         PR target/84700
9574         * combine.c (combine_simplify_rtx): Don't try to simplify if
9575         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
9576         are equal to x.
9578 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
9580         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
9581         to 32 bytes when compiling for POWER9.
9583 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
9585         PR target/84564
9586         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
9587         regparm >= 3 with no arg reg available also for calls with
9588         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
9590         PR target/84524
9591         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
9592         orig,vex.
9593         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
9595 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
9597         PR target/84264
9598         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
9600 2018-03-05  Richard Biener  <rguenther@suse.de>
9602         PR tree-optimization/84486
9603         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
9604         When inserting a __builtin_assume_aligned call set the LHS
9605         SSA name alignment info accordingly.
9607 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
9609         PR tree-optimization/84114
9610         * config/aarch64/aarch64.c (aarch64_reassociation_width)
9611         Avoid reassociation of FLOAT_MODE addition.
9613 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
9615         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
9616         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
9617         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
9618         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
9619         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
9620         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
9621         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
9622         and -mwbnoinvd.
9623         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
9624         __builtin_ia32_wbinvd): New builtins.
9625         (SPECIAL_ARGS2): New.
9626         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
9627         (SPECIAL_ARGS2): New.
9628         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
9629         (ix86_valid_target_attribute_inner_p): Ditto.
9630         (ix86_init_mmx_sse_builtins): Add special_args2.
9631         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
9632         TARGET_WBNOINVD_P): New.
9633         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
9634         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
9635         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
9636         * config/i386/immintrin.h (_wbinvd): New intrinsic.
9637         * config/i386/pconfigintrin.h: New file.
9638         * config/i386/wbnoinvdintrin.h: Ditto.
9639         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
9640         wbnoinvdintrin.h.
9641         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
9643 2018-03-05  Richard Biener  <rguenther@suse.de>
9645         PR tree-optimization/84670
9646         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9647         member.
9648         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9649         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9650         (compute_antic_aux): Only assert the number of values in ANTIC_IN
9651         doesn't grow if all successors (recursively) were visited at least
9652         once.
9654 2018-03-05  Richard Biener  <rguenther@suse.de>
9656         PR tree-optimization/84650
9657         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
9658         if executed in the loop pipeline.
9660 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
9662         * doc/configfiles.texi (Configuration Files): Move info about
9663         conditionalizing $target-protos.h to...
9664         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
9665         differs from $target-protos.h.
9667 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
9668             Chung-Ju Wu  <jasonwucj@gmail.com>
9670         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
9671         * config/nds32/nds32-multiple.md (setmemsi): Define.
9672         * config/nds32/nds32-memory-manipulation.c
9673         (nds32_gen_dup_4_byte_to_word_value): New.
9674         (emit_setmem_word_loop): New.
9675         (emit_setmem_byte_loop): New.
9676         (nds32_expand_setmem_loop): New.
9677         (nds32_expand_setmem_loop_v3m): New.
9678         (nds32_expand_setmem_unroll): New.
9679         (nds32_expand_setmem): New.
9681 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9682             Chung-Ju Wu  <jasonwucj@gmail.com>
9684         * config/nds32/nds32-memory-manipulation.c
9685         (nds32_emit_load_store): New.
9686         (nds32_emit_post_inc_load_store): New.
9687         (nds32_emit_mem_move): New.
9688         (nds32_emit_mem_move_block): New.
9689         (nds32_expand_movmemsi_loop_unknown_size): New.
9690         (nds32_expand_movmemsi_loop_known_size): New.
9691         (nds32_expand_movmemsi_loop): New.
9692         (nds32_expand_movmemsi_unroll): New.
9693         (nds32_expand_movmemqi): Rename ...
9694         (nds32_expand_movmemsi): ... to this.
9695         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
9696         (movmemsi): ... to this.
9697         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
9698         (nds32_expand_movmemsi): ... to this.
9700 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9701             Monk Chiang  <sh.chiang04@gmail.com>
9702             Chung-Ju Wu  <jasonwucj@gmail.com>
9704         * config/nds32/nds32-protos.h
9705         (nds32_expand_load_multiple): New arguments.
9706         (nds32_expand_store_multiple): Ditto.
9707         (nds32_valid_multiple_load_store): Rename ...
9708         (nds32_valid_multiple_load_store_p): ... to this.
9709         * config/nds32/nds32-memory-manipulation.c
9710         (nds32_expand_load_multiple): Refine implementation.
9711         (nds32_expand_store_multiple): Ditto.
9712         * config/nds32/nds32-multiple.md
9713         (load_multiple): Update nds32_expand_load_multiple interface.
9714         (store_multiple): Update nds32_expand_store_multiple interface.
9715         * config/nds32/nds32-predicates.c
9716         (nds32_valid_multiple_load_store): Rename ...
9717         (nds32_valid_multiple_load_store_p): ... to this and refine
9718         implementation.
9719         * config/nds32/predicates.md
9720         (nds32_load_multiple_and_update_address_operation): New predicate.
9721         (nds32_store_multiple_and_update_address_operation): New predicate.
9723 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
9724             Chung-Ju Wu  <jasonwucj@gmail.com>
9726         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
9727         (combo): New attribute.
9728         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
9730 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
9732         * config/nds32/nds32.opt: Change -mcmodel= default value.
9734 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
9735             Monk Chiang  <sh.chiang04@gmail.com>
9736             Chung-Ju Wu  <jasonwucj@gmail.com>
9738         * config/nds32/constants.md (unspec_element): New enum.
9739         * config/nds32/constraints.md (Umw): New constraint.
9740         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
9741         * config/nds32/nds32-intrinsic.md: Likewise.
9742         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
9743         (nds32_valid_smw_lwm_base_p): New.
9744         (nds32_output_smw_single_word): New.
9745         (nds32_output_lmw_single_word): New.
9746         (nds32_expand_unaligned_load): New.
9747         (nds32_expand_unaligned_store): New.
9748         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
9749         (nds32_output_smw_single_word): Declare.
9750         (nds32_output_lmw_single_word): Declare.
9751         (nds32_expand_unaligned_load): Declare.
9752         (nds32_expand_unaligned_store): Declare.
9753         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
9754         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
9755         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
9756         NDS32_BUILTIN_UASTORE_DW.
9757         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
9758         predicate.
9760 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
9761             Kito Cheng  <kito.cheng@gmail.com>
9762             Chung-Ju Wu  <jasonwucj@gmail.com>
9764         * config/nds32/nds32-intrinsic.c
9765         (nds32_expand_builtin_null_ftype_reg): Delete.
9766         (nds32_expand_builtin_reg_ftype_imm): Ditto.
9767         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
9768         (nds32_read_argument): New.
9769         (nds32_legitimize_target): Ditto.
9770         (nds32_legitimize_argument): Ditto.
9771         (nds32_check_constant_argument): Ditto.
9772         (nds32_expand_unop_builtin): Ditto.
9773         (nds32_expand_unopimm_builtin): Ditto.
9774         (nds32_expand_binop_builtin): Ditto.
9775         (nds32_builtin_decl_impl): Ditto.
9776         (builtin_description): Ditto.
9777         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
9778         (nds32_init_builtins_impl): Ditto.
9779         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
9780         (nds32_builtin_decl): New.
9781         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
9782         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
9784 2018-03-02  Jeff Law  <law@redhat.com>
9786         * reorg.c (stop_search_p): Handle DEBUG_INSN.
9787         (redundant_insn, fill_simple_delay_slots): Likewise.
9788         (fill_slots_from_thread): Likewise.
9789         * resource.c (mark_referenced_resources): Likewise.
9790         (mark_set_resources, find_dead_or_set_registers): Likewise.
9792 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9794         * substring-locations.h (format_warning_va): Formatting fix for
9795         ATTRIBUTE_GCC_DIAG.
9796         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
9797         argument.
9798         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
9799         * substring-locations.c: Include intl.h.
9800         (format_warning_va): Turned into small wrapper around
9801         format_warning_n_va, renamed to ...
9802         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
9803         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
9804         use ngettext.
9805         (format_warning_at_substring_n): New function.
9806         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
9807         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
9808         format_warning_at_substring with just a shorter name instead of
9809         const function pointer.
9810         (fmtwarn_n): New function.
9811         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
9812         appropriate, get rid of all the fmtstr temporaries, move conditionals
9813         with G_() wrapped string literals directly into fmtwarn arguments,
9814         cast dir.len to (int), formatting fixes.
9816 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
9818         * doc/invoke.texi: Remove "Cilk Plus" references.
9820 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9821             Richard Biener  <rguenther@suse.de>
9823         PR ipa/84628
9824         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
9825         for error or warning attributes if CALL_FROM_THUNK_P is set.
9826         Formatting fixes.
9828 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9830         PR target/56540
9831         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
9832         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
9834         PR target/56540
9835         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
9836         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
9838         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
9839         instead of -1U in last predictors element's probability member.
9841 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
9843         PR ipa/83983
9844         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
9845         arguments if they are comparable.
9847 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9849         PR tree-optimization/84634
9850         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
9851         masks and masked_loop_p with a single loop_masks, making sure it's
9852         null for bb vectorization.
9854 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
9856         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9857         (vect_analyze_data_ref_access): Use loop->safe_len rather than
9858         loop->force_vectorize to check whether there is no alias.
9860 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
9862         PR target/84614
9863         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
9864         prototypes.
9865         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
9866         comments.
9867         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
9868         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
9869         instead of a loop around prev_real_insn.
9870         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
9871         prev_real_insn.
9873         PR inline-asm/84625
9874         * config/i386/i386.c (ix86_print_operand): Use conditional
9875         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
9876         zero vector.
9878 2018-03-02  Richard Biener  <rguenther@suse.de>
9880         PR tree-optimization/84427
9881         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
9882         (bitmap_set_subtract_values): Rewrite to handle multiple
9883         exprs per value.
9884         (clean): Likewise.
9885         (prune_clobbered_mems): Likewise.
9886         (phi_translate): Take edge instead of pred/phiblock.
9887         (phi_translate_1): Likewise.
9888         (phi_translate_set): Likewise.  Insert all translated
9889         exprs for a value into the set, keeping possibly multiple
9890         expressions per value.
9891         (compute_antic_aux): Adjust for phi_translate changes.
9892         When intersecting union the expressions and prune those
9893         not in the final value set, keeping possibly multiple
9894         expressions per value.  Do not use value-insertion
9895         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
9896         all expressions.  Add verification that the value-sets
9897         only shrink during iteration.
9898         (compute_partial_antic_aux): Adjust for the phi_translate changes.
9899         (do_pre_regular_insertion): Likewise.
9900         (do_pre_partial_partial_insertion): Likewise.
9902 2018-03-02  Richard Biener  <rguenther@suse.de>
9904         PR target/82005
9905         * config/darwin.c (saved_debug_info_level): New static global.
9906         (darwin_asm_lto_start): Disable debug info generation for LTO out.
9907         (darwin_asm_lto_end): Restore debug info generation settings.
9909 2018-03-01  Martin Liska  <mliska@suse.cz>
9911         PR sanitizer/82484
9912         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9913         volatile arguments.
9915 2018-03-01  Richard Biener  <rguenther@suse.de>
9917         PR debug/84645
9918         * dwarf2out.c (gen_variable_die): Properly handle late VLA
9919         type annotation with LTO when debug was disabled at compile-time.
9921 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
9923         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
9924         XINT with INTVAL.
9925         (mips_final_postscan_insn): Likewise.
9927 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
9929         PR rtl-optimization/84528
9930         * alias.c (init_alias_target): Add commentary.
9931         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
9932         a unique base value if the frame pointer is not eliminated
9933         to the stack pointer.
9935 2018-03-01  Tom de Vries  <tom@codesourcery.com>
9937         PR rtl-optimization/83327
9938         * lra-int.h (hard_regs_spilled_into): Declare.
9939         * lra.c (hard_regs_spilled_into): Define.
9940         (init_reg_info): Init hard_regs_spilled_into.
9941         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
9942         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
9943         (process_bb_lives): Handle hard_regs_spilled_into.
9944         (lra_create_live_ranges_1): Before doing liveness propagation, clear
9945         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
9947 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
9949         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
9950         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
9951         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
9952         * config/rs6000/aix72.h: New file.
9954 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
9956         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
9957         instead of warning_at with conditional singular and plural messages
9958         where possible.
9960         PR target/52991
9961         * stor-layout.c (update_alignment_for_field): For
9962         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
9963         && !DECL_PACKED (field), do the alignment update, just use
9964         only desired_align instead of MAX (type_align, desired_align)
9965         as the alignment.
9966         (place_field): Don't do known_align < desired_align handling
9967         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
9968         is non-NULL, instead do it after rli->prev_field handling and
9969         only if not within a bitfield word.  For DECL_PACKED (field)
9970         use type_align of BITS_PER_UNIT.
9972 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
9974         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
9975         superfluous parentheses and trailing spaces.
9977 2018-02-28  Richard Biener  <rguenther@suse.de>
9979         PR tree-optimization/84584
9980         * graphite-scop-detection.c (scop_detection::add_scop): Discard
9981         SCoPs with fake exit edge.
9983 2018-02-28  Martin Liska  <mliska@suse.cz>
9985         PR testsuite/84597
9986         * timevar.c (timer::print): Fix format to properly print 100%
9987         values.
9989 2018-02-28  Richard Biener  <rguenther@suse.de>
9991         PR middle-end/84607
9992         * genmatch.c (capture_info::walk_match): Do not mark
9993         captured expressions without operands as expr_p given
9994         they act more like predicates and should be subject to
9995         "lost tail" side-effect preserving.
9997 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
9999         PR rtl-optimization/81611
10000         * auto-inc-dec.c (attempt_change): Move dead note from
10001         mem_insn if it's the next use of regno
10002         (find_address): Take address use of reg holding
10003         non-incremented value.  Add parm to limit search to the named
10004         reg only.
10005         (merge_in_block): Attempt to use a mem insn that is the next
10006         use of the original regno.
10008 2018-02-27  Martin Sebor  <msebor@redhat.com>
10010         PR c++/83871
10011         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10012         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10014 2018-02-27  Martin Sebor  <msebor@redhat.com>
10016         PR translation/84207
10017         * diagnostic-core.h (warning_n, error_n, inform_n): Change
10018         n argument to unsigned HOST_WIDE_INT.
10019         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10020         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
10021         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10022         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10024 2018-02-27  Richard Biener  <rguenther@suse.de>
10026         PR tree-optimization/84512
10027         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10028         Do not use the estimate returned from record_stmt_cost for
10029         the scalar iteration cost but sum properly using add_stmt_cost.
10031 2018-02-27  Richard Biener  <rguenther@suse.de>
10033         PR tree-optimization/84466
10034         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10035         Adjust last change to less strictly validate use operands.
10037 2018-02-27  Martin Liska  <mliska@suse.cz>
10039         PR gcov-profile/84548
10040         * gcov.c (process_file): Allow partial overlap and consider it
10041         also as group functions.
10042         (output_lines): Properly calculate range of lines for a group.
10044 2018-02-27  Martin Liska  <mliska@suse.cz>
10046         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10047         'ggc' suffixes.  Change first column width.
10048         (timer::print): Fix formatting of the column.
10050 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10052         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10053         preserve inline entry blocks for the sake of debug inline
10054         entry point markers alone.
10055         (remove_unused_locals): Suggest in comments a better place to
10056         force the preservation of inline entry blocks that are
10057         otherwise unused, but do not preserve them.
10059 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10061         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10063 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10065         PR target/84039
10066         * config/i386/constraints.md (Bs): Replace
10067         ix86_indirect_branch_register with
10068         TARGET_INDIRECT_BRANCH_REGISTER.
10069         (Bw): Likewise.
10070         * config/i386/i386.md (indirect_jump): Likewise.
10071         (tablejump): Likewise.
10072         (*sibcall_memory): Likewise.
10073         (*sibcall_value_memory): Likewise.
10074         Peepholes of indirect call and jump via memory: Likewise.
10075         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10076         (*sibcall_value_GOT_32): Likewise.
10077         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10078         (GOT_memory_operand): Likewise.
10079         (call_insn_operand): Likewise.
10080         (sibcall_insn_operand): Likewise.
10081         (GOT32_symbol_operand): Likewise.
10082         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10084 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10086         PR rtl-optimization/83496
10087         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10088         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10089         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10090         redundant insn, if any.
10091         (relax_delay_slots): Likewise.
10092         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10094 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10096         PR tree-optimization/83965
10097         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10098         that grouped statements are part of a reduction chain.  Return
10099         true if the statement is not marked as a reduction itself but
10100         is part of a group.
10101         (vect_recog_dot_prod_pattern): Don't check whether the statement
10102         is part of a group here.
10103         (vect_recog_sad_pattern): Likewise.
10104         (vect_recog_widen_sum_pattern): Likewise.
10106 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10108         PR debug/84545
10109         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10111 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10113         PR target/84530
10114         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10115         the bool argument.
10116         (ix86_output_indirect_function_return): New prototype.
10117         (ix86_split_simple_return_pop_internal): Likewise.
10118         * config/i386/i386.c (indirect_return_via_cx): New.
10119         (indirect_return_via_cx_bnd): Likewise.
10120         (indirect_thunk_name): Handle return va CX_REG.
10121         (output_indirect_thunk_function): Create alias for
10122         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10123         (ix86_output_indirect_jmp): Remove the bool argument.
10124         (ix86_output_indirect_function_return): New function.
10125         (ix86_split_simple_return_pop_internal): Likewise.
10126         * config/i386/i386.md (*indirect_jump): Don't pass false
10127         to ix86_output_indirect_jmp.
10128         (*tablejump_1): Likewise.
10129         (simple_return_pop_internal): Change it to define_insn_and_split.
10130         Call ix86_split_simple_return_pop_internal to split it for
10131         -mfunction-return=.
10132         (simple_return_indirect_internal): Call
10133         ix86_output_indirect_function_return instead of
10134         ix86_output_indirect_jmp.
10136 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10138         PR bootstrap/84405
10139         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10140         memset and value initialization afterwards.
10142 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10144         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10146 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10148         PR target/84521
10149         * common/config/aarch64/aarch64-common.c
10150         (aarch_option_optimization_table[]): Switch
10151         off fomit-frame-pointer
10153 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10154             Chung-Ju Wu  <jasonwucj@gmail.com>
10156         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10157         volatile memory.
10158         (store_multiple): Ditto.
10160 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10162         * config.gcc: Add --with-cpu support for nds32 target.
10163         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10164         * config/nds32/nds32.opt: Add -mcpu= option.
10166 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10168         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10169         isel=yes): Warn for these deprecated options.
10171 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10173         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10174         ISA_2_5_MASKS_EMBEDDED.
10176 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10178         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10179         p->max as pointers rather than using iterative_hash_expr.
10181 2018-02-23  Carl Love  <cel@us.ibm.com>
10183         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10184         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10185         BU_P8V_OVERLOAD_2.
10186         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10187         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10188         P8V_BUILTIN_VEC_VUNSIGNED2.
10190 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10192         PR target/81572
10193         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10194         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10195         LRA_UNKNOWN_ALT.
10196         * lra-constraints.c (curr_insn_transform): Set up
10197         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10198         LRA_UNKNOWN_ALT.
10199         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10200         * lra-eliminations.c (spill_pseudos): Ditto.
10201         (process_insn_for_elimination): Ditto.
10202         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10203         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10204         LRA_NON_CLOBBERED_ALT.
10206 2018-02-22  Martin Sebor  <msebor@redhat.com>
10208         PR tree-optimization/84480
10209         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10210         to maybe_diag_stxncpy_trunc.  Call it.
10211         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10212         from gimple_fold_builtin_strcpy.  Print inlining stack.
10213         (handle_builtin_stxncpy): Print inlining stack.
10214         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10216 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10218         PR target/84176
10219         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10220         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10221         and -fcheck-pointer-bounds are used together.
10222         (indirect_thunk_prefix): New enum.
10223         (indirect_thunk_need_prefix): New function.
10224         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10225         "_nt" instead of "_bnd" for NOTRACK prefix.
10226         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10227         (output_indirect_thunk_function): Likewise.
10228         (): Likewise.
10229         (ix86_code_end): Update output_indirect_thunk_function calls.
10230         (ix86_output_indirect_branch_via_reg): Replace
10231         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10232         (ix86_output_indirect_branch_via_push): Likewise.
10233         (ix86_output_function_return): Likewise.
10234         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10235         incompatible with -fcf-protection=branch and
10236         -fcheck-pointer-bounds.
10238 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10240         PR target/83335
10241         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10242         Change gcc_assert call to output_operand_lossage.
10244 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10246         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10248 2018-02-22  DJ Delorie  <dj@redhat.com>
10249             Sebastian Perta  <sebastian.perta@renesas.com>
10250             Oleg Endo  <olegendo@gcc.gnu.org>
10252         * config/rx/rx.c (rx_rtx_costs): New function.
10253         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10255 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10257         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10259 2018-02-22  Martin Liska  <mliska@suse.cz>
10261         PR driver/83193
10262         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10263         Add "native" as a possible value.
10265 2018-02-22  Martin Liska  <mliska@suse.cz>
10267         PR driver/83193
10268         * config/i386/i386.c (ix86_option_override_internal):
10269         Add "native" as a possible value for -march and -mtune.
10271 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10273         PR target/84502
10274         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10275         to all type variants.
10277         PR tree-optimization/84503
10278         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10279         width as info->bitpos + info->bitsize - start.
10280         (merged_store_group::merge_overlapping): Simplify width computation.
10281         (check_no_overlap): New function.
10282         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10283         start + width and last_order of the group, fail if check_no_overlap
10284         fails.
10285         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10286         to group if check_no_overlap fails.
10288 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10290         * config/rs6000/altivec.md: Delete contraint arguments to
10291         define_expand, define_split, and define_peephole2, and in
10292         define_insn_and_split if always unused.
10293         * config/rs6000/darwin.md: Ditto.
10294         * config/rs6000/dfp.md: Ditto.
10295         * config/rs6000/rs6000.md: Ditto.
10296         * config/rs6000/sync.md: Ditto.
10297         * config/rs6000/vector.md: Ditto.
10298         * config/rs6000/vsx.md: Ditto.
10300 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10302         * config/rs6000/altivec.md: Write output control strings as braced
10303         blocks instead of double-quoted strings.
10304         * config/rs6000/darwin.md: Ditto.
10305         * config/rs6000/rs6000.md: Ditto.
10306         * config/rs6000/vector.md: Ditto.
10307         * config/rs6000/vsx.md: Ditto.
10309 2018-02-21  Jason Merrill  <jason@redhat.com>
10311         PR c++/84314 - ICE with templates and fastcall attribute.
10312         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10314 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10316         * ipa-cp.c (determine_versionability): Fix comment typos.
10318 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10320         PR c/84229
10321         * ipa-cp.c (determine_versionability): Do not version functions caling
10322         va_arg_pack.
10324 2018-02-21  Martin Liska  <mliska@suse.cz>
10326         PR driver/83193
10327         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10328         Add "native" as a possible value.
10329         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10330         the macro when native cpu detection is available.
10332 2018-02-21  Martin Liska  <mliska@suse.cz>
10334         PR driver/83193
10335         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10336         Add "native" as a possible value.
10337         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10338         when native cpu detection is available.
10340 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10341             Martin Sebor  <msebor@redhat.com>
10343         PR tree-optimization/84478
10344         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10345         false.
10346         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10347         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10348         support which is conservatively correct, for 2 only stay conservative
10349         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10350         argument to the 2 argument get_range_strlen, adjust 6 arg
10351         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10352         false.
10353         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10354         (gimple_fold_builtin_strlen): Pass true as last argument to
10355         get_range_strlen.
10357 2018-02-20  Martin Sebor  <msebor@redhat.com>
10359         PR middle-end/84095
10360         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10361         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10362         (builtin_memref::builtin_memref): Factor out parts into
10363         set_base_and_offset and call it.
10365 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10367         PR middle-end/84406
10368         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10369         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10370         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10371         search at the associated MODE_INT.
10373 2018-02-20  Jeff Law  <law@redhat.com>
10375         PR middle-end/82123
10376         PR tree-optimization/81592
10377         PR middle-end/79257
10378         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10379         for range data rather than using global data.
10380         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10381         range data rather than using global data.
10382         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10383         pass it to children as needed.
10384         (struct directive::fmtresult): Similarly.
10385         (struct directive::set_width): Similarly.
10386         (struct directive::set_precision): Similarly.
10387         (format_integer, format_directive, parse_directive): Similarly.
10388         (format_none): Accept unnamed vr_values parameter.
10389         (format_percent, format_floating, format_character): Similarly.
10390         (format_string, format_plain): Similarly.
10391         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10392         the EVRP range analyzer for range data rather than using global data.
10393         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10394         gimple-ssa-evrp-analyze.h
10395         (class sprintf_dom_walker): Add after_dom_children member function.
10396         Add evrp_range_analyzer member.
10397         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10398         range analyzer as needed.
10399         (sprintf_dom_walker::after_dom_children): New member function.
10400         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10401         if not optimizing.
10402         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10403         (evrp_range_analyzer::pop_to_marker): Likewise.
10405 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10407         PR tree-optimization/84419
10408         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10409         with the required type if its current type is compatible but
10410         different.
10412 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10414         PR middle-end/82004
10415         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10416         after vectorization.
10418 2018-02-20  Martin Liska  <mliska@suse.cz>
10420         PR driver/83193
10421         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10422         possible values if we don't have a hint.
10424 2018-02-20  Martin Liska  <mliska@suse.cz>
10426         PR c/84310
10427         PR target/79747
10428         * final.c (shorten_branches): Build align_tab array with one
10429         more element.
10430         * opts.c (finish_options): Add alignment option limit check.
10431         (MAX_CODE_ALIGN): Likewise.
10432         (MAX_CODE_ALIGN_VALUE): Likewise.
10433         * doc/invoke.texi: Document maximum allowed option value for
10434         all -falign-* options.
10436 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10438         PR target/84146
10439         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10440         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10441         * var-tracking.c (emit_note_insn_var_location): Remove all references
10442         to NOTE_INSN_CALL_ARG_LOCATION.
10443         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10444         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10445         Use copy_rtx_if_shared.
10446         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10447         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10448         (dwarf2out_var_location): Remove handling of
10449         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10450         on call_insn.
10451         * final.c (final_scan_insn): Remove all references to
10452         NOTE_INSN_CALL_ARG_LOCATION.
10453         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10454         before dumping final insns.
10455         * except.c (emit_note_eh_region_end): Remove all references to
10456         NOTE_INSN_CALL_ARG_LOCATION.
10457         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10458         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10459         * config/arc/arc.c (hwloop_optimize): Likewise.
10460         * config/arm/arm.c (create_fix_barrier): Likewise.
10461         * config/s390/s390.c (s390_chunkify_start): Likewise.
10462         * config/sh/sh.c (find_barrier): Likewise.
10463         * config/i386/i386.c (rest_of_insert_endbranch,
10464         ix86_seh_fixup_eh_fallthru): Likewise.
10465         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10466         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10467         * config/frv/frv.c (frv_function_prologue): Likewise.
10468         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10469         reg note.
10470         (note_outside_basic_block_p): Remove all references to
10471         NOTE_INSN_CALL_ARG_LOCATION.
10472         * gengtype.c (adjust_field_rtx_def): Likewise.
10473         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10474         Likewise.
10475         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10476         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10478         PR c++/84444
10479         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10480         is ADDR_EXPR.
10482         PR tree-optimization/84452
10483         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10484         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10485         is NULL.
10487 2018-02-19  Martin Liska  <mliska@suse.cz>
10489         PR sanitizer/82183
10490         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10492 2018-02-19  Martin Liska  <mliska@suse.cz>
10493             Richard Sandiford  <richard.sandiford@linaro.org>
10495         PR tree-optimization/82491
10496         * gimple-fold.c (get_base_constructor): Make earlier bail out
10497         to prevent ubsan.
10499 2018-02-19  Carl Love  <cel@us.ibm.com>
10501         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10502         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10503         BU_P8V_OVERLOAD_1.
10504         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10505         P8V_BUILTIN_VEC_NEG.
10507 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
10509         * config/rl78/rl78.md (movdf): New define expand.
10511 2018-02-19  Martin Liska  <mliska@suse.cz>
10513         PR other/80589
10514         * doc/invoke.texi: Fix typo.
10515         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10517 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
10519         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10520         handle rs6000_single_float and rs6000_double_float specially for
10521         e500 family CPUs.
10523 2018-02-16  Jeff Law  <law@redhat.com>
10525         * config/rx/rx.c (add_pop_cfi_notes): New function.;
10526         (pop_regs): Use it.
10528 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10530         PR ipa/84425
10531         * ipa-inline.c (inline_small_functions): Fix a typo.
10533 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10535         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10537 2018-02-16  Carl Love  <cel@us.ibm.com>
10539         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10540         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10541         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10542         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10543         expansion to P8V_BUILTIN_VEC_FLOAT2.
10545 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
10547         PR rtl-optimization/70023
10548         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
10549         src_regno into account.
10551 2018-02-16  Carl Love  <cel@us.ibm.com>
10553         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
10554         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
10555         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
10556         * config/rs6000/rs6000.c: Remove case statements for
10557         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
10558         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
10559         and P9V_BUILTIN_VEC_VINSERT4B.
10560         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
10561         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
10562         * config/rs6000/vsx.md:
10563         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
10564         vec_insert4b.
10566 2018-02-16  Carl Love  <cel@us.ibm.com>
10568         * config/rs6000/altivec.h: Add builtin names vec_extract4b
10569         vec_insert4b.
10570         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
10571         definitions.
10572         * config/rs6000/rs6000-c.c: Add the definitions for
10573         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
10574         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
10575         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
10576         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
10577         definition for insert4b and define insn *insert3b_internal.
10578         * doc/extend.texi: Add documentation for vec_extract4b.
10580 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10582         * doc/extend.texi (Backwards Compatibility): Mention friend
10583         injection.  Note for-scope is deprecated.
10584         * doc/invoke.texi (-ffriend-injection): Deprecate.
10586 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
10588         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
10589         that moved to I2, also allow destinations that are a paradoxical
10590         subreg (instead of a normal reg).
10592 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
10594         PR target/83831
10595         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
10596         to QImode.
10598 2018-02-16  Richard Biener  <rguenther@suse.de>
10600         PR tree-optimization/84037
10601         PR tree-optimization/84016
10602         PR target/82862
10603         * config/i386/i386.c (ix86_builtin_vectorization_cost):
10604         Adjust vec_construct for the fact we need additional higher latency
10605         128bit inserts for AVX256 and AVX512 vector builds.
10606         (ix86_add_stmt_cost): Scale vector construction cost for
10607         elementwise loads.
10609 2018-02-16  Richard Biener  <rguenther@suse.de>
10611         PR tree-optimization/84417
10612         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
10613         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
10614         (non_rewritable_lvalue_p): Likewise, use poly-ints.
10616 2018-02-16  Martin Liska  <mliska@suse.cz>
10618         PR sanitizer/84307
10619         * internal-fn.def (ASAN_CHECK): Set proper flags.
10620         (ASAN_MARK): Likewise.
10622 2018-02-16  Julia Koval  <julia.koval@intel.com>
10624         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
10625         from PTA_CANNONLAKE.
10627 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10629         PR target/84272
10630         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
10631         Use ++iter rather than iter++ for std::list iterators.
10632         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
10633         defer deleting them until all nodes in the forest are processed.  Do
10634         free even leaf nodes.  Change to_process into auto_vec.
10636         PR bootstrap/84405
10637         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
10638         * vec.h (vec_default_construct): Use memset instead of placement new
10639         if BROKEN_VALUE_INITIALIZATION is defined.
10640         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
10641         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
10642         is defined.
10644         PR rtl-optimization/83723
10645         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
10646         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
10647         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
10648         recursive calls.
10649         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
10650         callers.
10651         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
10653 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
10655         PR rtl-optimization/81443
10656         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
10657         from inner REGs to paradoxical SUBREGs.
10659 2018-02-16  Richard Biener  <rguenther@suse.de>
10661         PR tree-optimization/84399
10662         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10663         For operands we can analyze at their definition make sure we can
10664         analyze them at each use as well.
10666 2018-02-16  Richard Biener  <rguenther@suse.de>
10668         PR tree-optimization/84190
10669         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
10670         volatile accesses if the decl isn't volatile.
10672 2018-02-15  Jason Merrill  <jason@redhat.com>
10674         PR c++/84314 - ICE with templates and fastcall attribute.
10675         * attribs.c (build_type_attribute_qual_variant): Don't clobber
10676         TYPE_CANONICAL on an existing type.
10678 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
10680         PR tree-optimization/84383
10681         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
10682         dstoff nor call operand_equal_p if dstbase is NULL.
10684         PR tree-optimization/84334
10685         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
10686         also a CONSTANT_CLASS_P, punt.
10688 2018-02-14  Jim Wilson  <jimw@sifive.com>
10690         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
10691         first SMALL_OPERAND check.  New local min_second_step.  Move assert
10692         to where locals are set.  Add TARGET_RVC support.
10693         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
10695 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
10697         * doc/invoke.texi: Correct -Wformat-overflow code sample.
10699 2018-02-14  Martin Sebor  <msebor@redhat.com>
10701         PR tree-optimization/83698
10702         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
10703         arrays constrain the offset range to their bounds.
10704         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
10705         (builtin_access::overlap): Avoid setting the size of overlap if it's
10706         already been set.
10707         (maybe_diag_overlap): Also consider arrays when deciding what values
10708         of offsets to include in diagnostics.
10710 2018-02-14  Martin Sebor  <msebor@redhat.com>
10712         PR c/84108
10713         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
10714         that correspond to the kind of a declaration.
10716 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
10718         PR target/83984
10719         * config/pa/pa.md: Load address of PIC label using the linkage table
10720         if the label is nonlocal.
10722 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10724         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
10725         warning message if user requests -maltivec=be.
10726         * doc/invoke.texi: Document deprecation of -maltivec=be.
10728 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
10730         PR target/84220
10731         * config/rs6000/rs6000-c.c: Update definitions for
10732         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
10733         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
10735 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10737         PR target/84239
10738         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
10739         add _get_ssp intrinsics. Remove argument from
10740         __builtin_ia32_rdssp[d|q].
10741         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
10742         * config/i386/i386-builtin.def: Remove argument from
10743         __builtin_ia32_rdssp[d|q].
10744         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
10745         ix86_expand_special_args_builtin for _rdssp[d|q].
10746         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
10747         Clear register before usage.
10748         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
10749         Add documentation for new _get_ssp and _inc_ssp intrinsics.
10751 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
10753         PR tree-optimization/84357
10754         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
10755         operand 1 of an ARRAY_REF too.
10757 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
10759         PR target/83831
10760         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
10761         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10762         declarations.
10763         (set_of_reg): New struct.
10764         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
10765         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
10766         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
10767         functions.
10768         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
10769         Split into bitclr, bitset, bitinvert patterns if appropriate.
10770         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
10771         use rx_fuse_in_memory_bitop.
10772         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
10773         to named insn, correct maximum insn length.
10775 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
10777         PR target/79242
10778         * machmode.def: Define a complex mode for PARTIAL_INT.
10779         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
10780         MODE_PARTIAL_INT.
10781         * doc/rtl.texi: Document CSPImode.
10782         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
10783         handling.
10784         (msp430_hard_regno_nregs_with_padding): Likewise.
10786 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
10788         PR target/84279
10789         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
10791 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
10793         PR rtl-optimization/84169
10794         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
10795         we generated a parallel as new i3 and we split that to new i2 and i3
10796         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
10797         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
10798         those to i2, not i1.  Partially rewrite this scan code.
10800 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10802         PR c/82210
10803         * stor-layout.c (place_field): For variable length fields, adjust
10804         offset_align afterwards not just based on the field's alignment,
10805         but also on the size.
10807         PR middle-end/84309
10808         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
10809         of exps and logs in the use_exp2 case.
10811 2018-02-13  Jeff Law  <law@redhat.com>
10813         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
10814         entry for "vector".
10816         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
10817         ARGS as unused.
10819 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
10821         PR debug/84342
10822         PR debug/84319
10823         * common.opt (gas-loc-support, gas-locview-support): New.
10824         (ginline-points, ginternal-reset-location-views): New.
10825         * doc/invoke.texi: Document them.  Use @itemx where intended.
10826         (gvariable-location-views): Adjust.
10827         * target.def (reset_location_view): New.
10828         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
10829         (TARGET_RESET_LOCATION_VIEW): New.
10830         * doc/tm.texi: Rebuilt.
10831         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
10832         (dwarf2out_default_as_locview_support): New.
10833         (output_asm_line_debug_info): Use option variables.
10834         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
10835         (output_loc_list): Likewise.
10836         (add_high_low_attributes): Check option variables.
10837         Don't output entry view attribute in strict mode.
10838         (gen_inlined_subroutine_die): Check option variables.
10839         (dwarf2out_inline_entry): Likewise.
10840         (init_sections_and_labels): Likewise.
10841         (dwarf2out_early_finish): Likewise.
10842         (maybe_reset_location_view): New, from...
10843         (dwarf2out_var_location): ... here.  Call it.
10844         * debug.h (dwarf2out_default_as_loc_support): Declare.
10845         (dwarf2out_default_as_locview_support): Declare.
10846         * hooks.c (hook_int_rtx_insn_0): New.
10847         * hooks.h (hook_int_rtx_insn_0): Declare.
10848         * toplev.c (process_options): Take -gas-loc-support and
10849         -gas-locview-support from dwarf2out.  Enable
10850         -gvariable-location-views by default only with locview
10851         assembler support.  Enable -ginternal-reset-location-views by
10852         default only if the target defines the corresponding hook.
10853         Enable -ginline-points by default if location views are
10854         enabled; force it disabled if statement frontiers are
10855         disabled.
10856         * tree-inline.c (expand_call_inline): Check option variables.
10857         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
10859 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
10861         PR tree-optimization/84321
10862         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
10863         handling.  Also check whether the anti-range contains any values
10864         that satisfy the mask; switch to a VR_RANGE if not.
10866 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
10868         PR sanitizer/84340
10869         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
10871 2018-02-13  Martin Jambor  <mjambor@suse.cz>
10873         PR c++/83990
10874         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
10875         of call statements, also set location of a load to a temporary.
10877 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
10879         * config/rl78/rl78.c (add_vector_labels): New function.
10880         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
10881         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
10882         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
10883         which checks that no arguments are passed.
10884         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
10885         * doc/extend.texi: Documentation for the new attribute.
10887 2018-02-13  Andreas Schwab  <schwab@suse.de>
10889         * config/riscv/linux.h (CPP_SPEC): Define.
10891 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
10893         PR target/84335
10894         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
10895         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
10896         OPTION_MASK_ISA_AES as first argument to def_builtin_const
10897         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
10898         instead of OPTION_MASK_ISA_PCLMUL as first argument to
10899         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
10900         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
10901         temporarily for AES and PCLMUL builtins.
10903         PR tree-optimization/84339
10904         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
10905         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
10906         Formatting fixes.
10908         PR middle-end/84309
10909         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
10910         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
10911         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
10912         inline function.
10913         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
10914         inline function.
10915         * omp-simd-clone.h: New file.
10916         * omp-simd-clone.c: Include omp-simd-clone.h.
10917         (expand_simd_clones): No longer static.
10918         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
10919         cgraph.h and omp-simd-clone.h.
10920         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
10921         (vect_recog_widen_shift_pattern): Formatting fix.
10922         (vect_pattern_recog_1): Don't check optab for calls.
10924         PR target/84336
10925         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
10926         operands[2] into a REG before using gen_lowpart on it.
10928 2018-02-12  Jeff Law  <law@redhat.com>
10930         PR target/83760
10931         * config/sh/sh.c (find_barrier): Consider a sibling call
10932         a barrier as well.
10934         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
10935         successfully back substituting a reg.
10937 2018-02-12  Richard Biener  <rguenther@suse.de>
10939         PR tree-optimization/84037
10940         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
10941         parameter, move visited init to caller.
10942         (vect_slp_analyze_operations): Separate cost from validity
10943         check, initialize visited once for all instances.
10944         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
10945         for all instances.
10946         * tree-vect-stmts.c (vect_model_simple_cost): Make early
10947         out an assert.
10948         (vect_model_promotion_demotion_cost): Likewise.
10949         (vectorizable_bswap): Guard cost modeling with !slp_node
10950         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
10951         SLP stmts.
10952         (vectorizable_call): Likewise.
10953         (vectorizable_conversion): Likewise.
10954         (vectorizable_assignment): Likewise.
10955         (vectorizable_shift): Likewise.
10956         (vectorizable_operation): Likewise.
10957         (vectorizable_store): Likewise.
10958         (vectorizable_load): Likewise.
10959         (vectorizable_condition): Likewise.
10960         (vectorizable_comparison): Likewise.
10962 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
10964         PR sanitizer/84307
10965         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
10966         (ASAN_MARK): Fix fnspec to account for return value, change pointer
10967         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
10969 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
10971         PR middle-end/83665
10972         * params.def (inline-min-speedup): Increase from 8 to 15.
10973         (max-inline-insns-auto): Decrease from 40 to 30.
10974         * ipa-split.c (consider_split): Add some buffer for function to
10975         be considered inlining candidate.
10976         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
10977         default values.
10979 2018-02-12  Richard Biener  <rguenther@suse.de>
10981         PR tree-optimization/84037
10982         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
10983         matched stmts if we cannot swap the non-matched ones.
10985 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
10987         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
10988         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
10989         _mm_maskz_scalef_round_ss): New intrinsics.
10990         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
10991         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
10992         __builtin_ia32_scalefss_round): Remove.
10993         (__builtin_ia32_scalefsd_mask_round,
10994         __builtin_ia32_scalefss_mask_round): New intrinsics.
10995         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
10996         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
10997         ((match_operand:VF_128 2 "<round_nimm_predicate>"
10998         "<round_constraint>")): Changed to ...
10999         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11000         "<round_scalar_constraint>")): ... this.
11001         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11002         %0, %1, %2<round_op3>}"): Changed to ...
11003         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11004         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11005         %2<round_scalar_mask_op3>}"): ... this.
11006         * config/i386/subst.md (round_scalar_nimm_predicate): New.
11008 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11010         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11011         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11012         (_mm_maskz_sqrt_round_ss): New intrinsics.
11013         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11014         (__builtin_ia32_sqrtsd_mask_round)
11015         (__builtin_ia32_sqrtss_mask_round): New builtins.
11016         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11017         (__builtin_ia32_sqrtss_round): Remove.
11018         (__builtin_ia32_sqrtsd_mask_round)
11019         (__builtin_ia32_sqrtss_mask_round): New builtins.
11020         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11021         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11022         ((match_operand:VF_128 1 "vector_operand"
11023         "xBm,<round_constraint>")): Changed to ...
11024         ((match_operand:VF_128 1 "vector_operand"
11025         "xBm,<round_scalar_constraint>")): ... this.
11026         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11027         %0, %2, %<iptr>1<round_op3>}): Changed to ...
11028         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11029         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11030         %<iptr>1<round_scalar_mask_op3>}): ... this.
11031         ((set_attr "prefix" "<round_prefix>")): Changed to ...
11032         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11034 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11036         PR target/84266
11037         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11038         Cast vec_cmpeq result to correct type.
11039         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11040         Cast vec_cmpgt result to correct type.
11042 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11044         * final.c (final_scan_insn_1): Renamed from...
11045         (final_scan_insn): ... this.  New wrapper, to recover
11046         seen from the outermost call in recursive ones.
11047         * config/sparc/sparc.c (output_return): Drop seen from call.
11048         (output_sibcall): Likewise.
11049         * config/visium/visium.c (output_branch): Likewise.
11051 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11053         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11054         function label.
11056 2018-02-10  Alan Modra  <amodra@gmail.com>
11058         PR target/84300
11059         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11060         Specify LR as an input.
11062 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11064         PR sanitizer/83987
11065         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11066         remove_member_access_dummy_vars): New functions.
11067         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11068         lower_omp_1, execute_lower_omp): Use them.
11070         PR rtl-optimization/84308
11071         * shrink-wrap.c (spread_components): Release todo vector.
11073 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11075         PR rtl-optimization/57193
11076         * ira-color.c (struct allocno_color_data): Add member
11077         conflict_allocno_hard_prefs.
11078         (update_conflict_allocno_hard_prefs): New.
11079         (bucket_allocno_compare_func): Add a preference based on
11080         conflict_allocno_hard_prefs.
11081         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11082         (color_allocnos): Remove a dead code.  Initiate
11083         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11085 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11087         PR target/84226
11088         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11089         constraint from =wa to wa.  Avoid a subreg on the output operand,
11090         instead use a pseudo and subreg it in a move.
11091         (p9_xxbrd_<mode>): Changed to ...
11092         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11093         (p9_xxbrd_v2df): New expander.
11094         (p9_xxbrw_<mode>): Changed to ...
11095         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11096         (p9_xxbrw_v4sf): New expander.
11098 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11100         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11102 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11104         PR target/83926
11105         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11106         multiply in 32-bit mode.
11107         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11108         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11109         mode.
11111 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11113         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11114         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11115         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11116         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11118 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11120         PR lto/84213
11121         * dwarf2out.c (is_trivial_indirect_ref): New function.
11122         (dwarf2out_late_global_decl): Do not generate a location
11123         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11124         and that are not defined in the current unit.
11126 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11128         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11129         instead of a libcall for UNORDERED.
11131 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11133         PR target/82641
11134         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11135         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11137 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11139         PR target/PR84295
11140         * config/s390/s390.c (s390_set_current_function): Invoke
11141         s390_indirect_branch_settings also if fndecl didn't change.
11143 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11145         * config/rs6000/rs6000.md (blockage): Set length to zero.
11147 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11149         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11151 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11153         PR sanitizer/84285
11154         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11155         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11156         -static-lib*san.
11158         PR debug/84252
11159         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11160         PARALLEL incoming that failed vt_get_decl_and_offset check.
11162         PR middle-end/84237
11163         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11164         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11165         TREE_READONLY bit.
11166         (get_variable_section): For decls in named .bss* sections pass true as
11167         second argument to bss_initializer_p.
11169 2018-02-09  Marek Polacek  <polacek@redhat.com>
11170             Jakub Jelinek  <jakub@redhat.com>
11172         PR c++/83659
11173         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11174         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11175         Sync some changes from cxx_fold_indirect_ref.
11177 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11179         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11180         markers.
11181         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11182         (BLOCK_INLINE_ENTRY_LABEL): New.
11183         (dwarf2out_var_location): Disregard inline entry markers.
11184         (inline_entry_data): New struct.
11185         (inline_entry_data_hasher): New hashtable type.
11186         (inline_entry_data_hasher::hash): New.
11187         (inline_entry_data_hasher::equal): New.
11188         (inline_entry_data_table): New variable.
11189         (add_high_low_attributes): Add DW_AT_entry_pc and
11190         DW_AT_GNU_entry_view attributes if a pending entry is found
11191         in inline_entry_data_table.  Add old entry_pc attribute only
11192         if debug nonbinding markers are disabled.
11193         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11194         markers are enabled.
11195         (block_within_block_p, dwarf2out_inline_entry): New.
11196         (dwarf2out_finish): Check that no entries remained in
11197         inline_entry_data_table.
11198         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11199         (final_scan_insn, notice_source_line): Likewise.
11200         (rest_of_clean_state): Skip inline entry markers.
11201         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11202         markers.
11203         * gimple.c (gimple_build_debug_inline_entry): New.
11204         * gimple.h (enum gimple_debug_subcode): Add
11205         GIMPLE_DEBUG_INLINE_ENTRY.
11206         (gimple_build_debug_inline_entry): Declare.
11207         (gimple_debug_inline_entry_p): New.
11208         (gimple_debug_nonbind_marker_p): Adjust.
11209         * insn-notes.def (INLINE_ENTRY): New.
11210         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11211         inline entry marker notes.
11212         (print_insn): Likewise.
11213         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11214         (INSN_DEBUG_MARKER_KIND): Likewise.
11215         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11216         * tree-inline.c (expand_call_inline): Build and insert
11217         debug_inline_entry stmt.
11218         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11219         inline entry blocks early, if nonbind markers are enabled.
11220         (dump_scope_block): Dump fragment info.
11221         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11222         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11223         (gimple_build_debug_inline_entry): New.
11224         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11225         Enable/disable inline entry points too.
11226         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11227         (DEBUG_INSN): Describe inline entry markers.
11229         * common.opt (gvariable-location-views): New.
11230         (gvariable-location-views=incompat5): New.
11231         * config.in: Rebuilt.
11232         * configure: Rebuilt.
11233         * configure.ac: Test assembler for view support.
11234         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11235         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11236         * dwarf2out.c (var_loc_view): New typedef.
11237         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11238         (dwarf2out_locviews_in_attribute): New.
11239         (dwarf2out_locviews_in_loclist): New.
11240         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11241         (enum dw_line_info_opcode): Add LI_adv_address.
11242         (struct dw_line_info_table): Add view.
11243         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11244         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11245         (zero_view_p): New variable.
11246         (ZERO_VIEW_P): New macro.
11247         (output_asm_line_debug_info): New.
11248         (struct var_loc_node): Add view.
11249         (add_AT_view_list, AT_loc_list): New.
11250         (add_var_loc_to_decl): Add view param.  Test it against last.
11251         (new_loc_list): Add view params.  Record them.
11252         (AT_loc_list_ptr): Handle loc and view lists.
11253         (view_list_to_loc_list_val_node): New.
11254         (print_dw_val): Handle dw_val_class_view_list.
11255         (size_of_die): Likewise.
11256         (value_format): Likewise.
11257         (loc_list_has_views): New.
11258         (gen_llsym): Set vl_symbol too.
11259         (maybe_gen_llsym, skip_loc_list_entry): New.
11260         (dwarf2out_maybe_output_loclist_view_pair): New.
11261         (output_loc_list): Output view list or entries too.
11262         (output_view_list_offset): New.
11263         (output_die): Handle dw_val_class_view_list.
11264         (output_dwarf_version): New.
11265         (output_compilation_unit_header): Use it.
11266         (output_skeleton_debug_sections): Likewise.
11267         (output_rnglists, output_line_info): Likewise.
11268         (output_pubnames, output_aranges): Update version comments.
11269         (output_one_line_info_table): Output view numbers in asm comments.
11270         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11271         Call maybe_gen_llsym.
11272         (loc_list_from_tree_1): Adjust.
11273         (add_AT_location_description): Create view list attribute if
11274         needed, check it's absent otherwise.
11275         (convert_cfa_to_fb_loc_list): Adjust.
11276         (maybe_emit_file): Call output_asm_line_debug_info for test.
11277         (dwarf2out_var_location): Reset views as needed.  Precompute
11278         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11279         attribute.  Set view.
11280         (new_line_info_table): Reset next view.
11281         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11282         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11283         the assembler, or select appropriate line info opcodes.
11284         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11285         (optimize_string_length): Catch it.  Adjust.
11286         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11287         dw_val_class_view_list, and remove it if no longer needed.
11288         (hash_loc_list): Hash view numbers.
11289         (loc_list_hasher::equal): Compare them.
11290         (optimize_location_lists): Check whether a view list symbol is
11291         needed, and whether the locview attribute is present, and
11292         whether they match.  Remove the locview attribute if no longer
11293         needed.
11294         (index_location_lists): Call skip_loc_list_entry for test.
11295         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11296         Use output_dwarf_version.
11297         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11298         (struct dw_val_node): Add val_view_list.
11299         * final.c (SEEN_NEXT_VIEW): New.
11300         (set_next_view_needed): New.
11301         (clear_next_view_needed): New.
11302         (maybe_output_next_view): New.
11303         (final_start_function): Rename to...
11304         (final_start_function_1): ... this.  Take pointer to FIRST,
11305         add SEEN parameter.  Emit param bindings in the initial view.
11306         (final_start_function): Reintroduce SEEN-less interface.
11307         (final): Rename to...
11308         (final_1): ... this.  Take SEEN parameter.  Output final pending
11309         next view at the end.
11310         (final): Reintroduce seen-less interface.
11311         (final_scan_insn): Output pending next view before switching
11312         sections or ending a block.  Mark the next view as needed when
11313         outputting variable locations.  Notify debug backend of section
11314         changes, and of location view changes.
11315         (rest_of_handle_final): Adjust.
11316         * toplev.c (process_options): Autodetect value for debug variable
11317         location views option.  Warn on incompat5 without -gdwarf-5.
11318         * doc/invoke.texi (gvariable-location-views): New.
11319         (gvariable-location-views=incompat5): New.
11320         (gno-variable-location-views): New.
11322 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11324         PR tree-optimization/84136
11325         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11326         that the result of find_edge is non-NULL.
11328 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11330         PR target/83008
11331         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11332         storing integer register in SImode.  Fix cost of 256 and 512
11333         byte aligned SSE register store.
11335 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11337         * config/i386/i386.c (ix86_multiplication_cost): Fix
11338         multiplication cost for TARGET_AVX512DQ.
11340 2018-02-08  Marek Polacek  <polacek@redhat.com>
11342         PR tree-optimization/84238
11343         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11344         get_range_strlen.
11346 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11348         PR tree-optimization/84265
11349         * tree-vect-stmts.c (vectorizable_store): Don't treat
11350         VMAT_CONTIGUOUS accesses as grouped.
11351         (vectorizable_load): Likewise.
11353 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11355         PR tree-optimization/81635
11356         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11357         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11358         (test_round_for_mask): New functions.
11359         (wide_int_cc_tests): Call test_round_for_mask.
11360         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11361         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11362         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11363         range returned by get_range_info.
11365 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11367         PR ipa/81360
11368         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11369         * symtab.c: Include builtins.h
11370         (symtab_node::output_to_lto_symbol_table_p): Move here
11371         from lto-streamer-out.c:output_symbol_p.
11372         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11373         (output_symbol_p): Move all logic to symtab.c
11374         (produce_symtab): Update.
11376 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11378         * config/s390/s390-opts.h (enum indirect_branch): Define.
11379         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11380         (s390_indirect_branch_via_thunk)
11381         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11382         (enum s390_indirect_branch_type): Define.
11383         * config/s390/s390.c (struct s390_frame_layout, struct
11384         machine_function): Remove.
11385         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11386         (indirect_branch_table_label_no, indirect_branch_table_name):
11387         Define variables.
11388         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11389         (enum s390_indirect_branch_option): Define.
11390         (s390_return_addr_from_memory): New function.
11391         (s390_handle_string_attribute): New function.
11392         (s390_attribute_table): Add new attribute handler.
11393         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11394         (s390_indirect_branch_via_thunk): New function.
11395         (s390_indirect_branch_via_inline_thunk): New function.
11396         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11397         sibling call optimization for non z10 compiles.
11398         (s390_emit_call): Force indirect branch target to be a single
11399         register.  Add r1 clobber for non-z10 compiles.
11400         (s390_emit_epilogue): Emit return jump via return_use expander.
11401         (s390_reorg): Handle JUMP_INSNs as execute targets.
11402         (s390_option_override_internal): Perform validity checks for the
11403         new command line options.
11404         (s390_indirect_branch_attrvalue): New function.
11405         (s390_indirect_branch_settings): New function.
11406         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11407         (s390_output_indirect_thunk_function):  New function.
11408         (s390_code_end): Implement target hook.
11409         (s390_case_values_threshold): Implement target hook.
11410         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11411         macros.
11412         * config/s390/s390.h (struct s390_frame_layout)
11413         (struct machine_function): Move here from s390.c.
11414         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11415         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11416         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11417         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11418         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11419         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11420         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11421         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11422         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11423         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11424         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11425         (mnemonic attribute): Add values which aren't recognized
11426         automatically.
11427         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11428         pattern for branch conversion.  Fix mnemonic attribute.
11429         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11430         indirect branch via thunk if requested.
11431         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11432         ("*indirect_jump"): Disable for branch conversion using out of
11433         line thunks.
11434         ("indirect_jump_via_thunk<mode>_z10")
11435         ("indirect_jump_via_thunk<mode>")
11436         ("indirect_jump_via_inlinethunk<mode>_z10")
11437         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11438         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11439         ("casesi_jump_via_inlinethunk<mode>_z10")
11440         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11441         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11442         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11443         ("*indirect2_jump"): Disable for branch conversion.
11444         ("casesi_jump"): Turn into expander and expand patterns for branch
11445         conversion.
11446         ("return_use"): New expander.
11447         ("*return"): Emit return via thunk and rename it to ...
11448         ("*return<mode>"): ... this one.
11449         * config/s390/s390.opt: Add new options and and enum for the
11450         option values.
11452 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11454         * lra-constraints.c (match_reload): Unconditionally use
11455         gen_lowpart_SUBREG, rather than selecting between that
11456         and equivalent gen_rtx_SUBREG code.
11458 2018-02-08  Richard Biener  <rguenther@suse.de>
11460         PR tree-optimization/84233
11461         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11462         changed flag instead of boguously re-using phi_inserted.
11464 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11466         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11467         static local variables.
11469 2018-02-08  Richard Biener  <rguenther@suse.de>
11471         PR tree-optimization/84278
11472         * tree-vect-stmts.c (vectorizable_store): When looking for
11473         smaller vector types to perform grouped strided loads/stores
11474         make sure the mode is supported by the target.
11475         (vectorizable_load): Likewise.
11477 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11479         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11480         Increase LDP/STP opportunities by adding adjacent callee-saves.
11482 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11484         PR rtl-optimization/84068
11485         PR rtl-optimization/83459
11486         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11488 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11490         PR tree-optimization/84224
11491         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11492         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11493         non-zero arguments.
11495 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11497         PR target/84113
11498         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11499         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11500         count, remove one USE.
11502 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11504         * doc/install.texi (Configuration): Document the
11505         --with-long-double-format={ibm,ieee} PowerPC configuration
11506         options.
11508         PR target/84154
11509         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11510         Convert from define_expand to be define_insn_and_split.  Rework
11511         float/double/_Float128 conversions to QI/HI/SImode to work with
11512         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
11513         conversions to QI/HImode types did a store and then a load to
11514         truncate the value.  For conversions to VSX registers, don't split
11515         the insn, instead emit the code directly.  Use the code iterator
11516         any_fix to combine signed and unsigned conversions.
11517         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11518         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11519         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11520         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11521         (fix_<mode>di2_hw): Likewise.
11522         (fixuns_<mode>di2_hw): Likewise.
11523         (fix_<mode>si2_hw): Likewise.
11524         (fixuns_<mode>si2_hw): Likewise.
11525         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11526         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11527         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11528         fix<uns>_trunc<SFDF:mode>si2_p8.
11529         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11530         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11531         (fix<uns>_<mode>_mem): Likewise.
11532         (fctiw<u>z_<mode>_mem): Likewise.
11533         (fix<uns>_<mode>_mem): Likewise.
11534         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11535         the register allocator from doing a direct move to the GPRs to do
11536         a store, and instead use the ISA 3.0 store byte/half-word from
11537         vector register instruction.  For IEEE 128-bit floating point,
11538         also optimize stores of 32-bit ints.
11539         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11541 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
11543         * genextract.c (push_pathstr_operand): New function to support
11544         [a-zA-Z].
11545         (walk_rtx): Call push_pathstr_operand.
11546         (print_path): Support [a-zA-Z].
11548 2018-02-07  Richard Biener  <rguenther@suse.de>
11550         PR tree-optimization/84037
11551         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
11552         (cse_and_gimplify_to_preheader): Declare.
11553         (vect_get_place_in_interleaving_chain): Likewise.
11554         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11555         ivexpr_map.
11556         (_loop_vec_info::~_loop_vec_info): Delete it.
11557         (cse_and_gimplify_to_preheader): New function.
11558         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
11559         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
11560         (vectorizable_load): Likewise.  For grouped stores always base
11561         the IV on the first element.
11562         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
11563         condition before gimplifying.
11565 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11567         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
11568         *DIV_EXPR and *MOD_EXPR.
11570 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
11572         PR target/84248
11573         * config/i386/i386.c (ix86_option_override_internal): Mask out
11574         the CF_SET bit when checking -fcf-protection.
11576 2018-02-07  Tom de Vries  <tom@codesourcery.com>
11578         PR libgomp/84217
11579         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
11580         enough.
11582 2018-02-07  Richard Biener  <rguenther@suse.de>
11584         PR tree-optimization/84204
11585         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
11586         this place.
11588         PR tree-optimization/84205
11589         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
11590         special-case isl_ast_op_zdiv_r.
11592         PR tree-optimization/84223
11593         * graphite-scop-detection.c (gather_bbs::before_dom_children):
11594         Only add conditions from within the region.
11595         (gather_bbs::after_dom_children): Adjust.
11597 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
11599         PR target/84209
11600         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
11601         * config/avr/avr.md: Only post-reload split REG-REG moves if
11602         either register is GENERAL_REG_P.
11604 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
11606         PR tree-optimization/84235
11607         * tree-ssa-scopedtables.c
11608         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
11609         if the subtraction is performed in floating point type where NaNs are
11610         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
11611         build 1.  Formatting fix.
11613 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
11615         PR target/84146
11616         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
11617         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
11618         and skip it regardless of bb boundaries.  Use CALL_P macro,
11619         don't test INSN_P (insn) together with CALL_P or JUMP_P check
11620         unnecessarily, formatting fix.
11622 2018-02-06  Michael Collison  <michael.collison@arm.com>
11624         * config/arm/thumb2.md:
11625         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
11626         (*thumb_mov_notscc): Ditto.
11628 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
11630         PR target/84154
11631         * config/rs6000/rs6000.md (su code attribute): Use "u" for
11632         unsigned_fix, not "s".
11634 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11636         * configure.ac (gcc_fn_eh_frame_ro): New function.
11637         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
11638         correct .eh_frame permissions.
11639         * configure: Regenerate.
11641 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
11643         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
11644         irrelevant options.
11646 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11648         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11649         Display warning message for -mno-speculate-indirect-jumps.
11651 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
11653         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
11654         Undocumented.
11655         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
11657 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
11659         PR tree-optimization/84225
11660         * tree-eh.c (find_trapping_overflow): Only call
11661         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
11663 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11665         PR target/84145
11666         * config/i386/i386.c: Reimplement the check of possible options
11667         -mibt/-mshstk conbination. Change error messages.
11668         * doc/invoke.texi: Fix a typo: remove extra '='.
11670 2018-02-06  Marek Polacek  <polacek@redhat.com>
11672         PR tree-optimization/84228
11673         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
11675 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
11677         PR target/82641
11678         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
11679         emitted arch directives.
11680         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
11681         __ARM_FEATURE_COPROC before changing architectures.
11683 2018-02-06  Richard Biener  <rguenther@suse.de>
11685         * config/i386/i386.c (print_reg): Fix typo.
11686         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
11688 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11690         * configure: Regenerate.
11692 2018-02-05  Martin Sebor  <msebor@redhat.com>
11694         PR tree-optimization/83369
11695         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
11696         inlining context.
11698 2018-02-05  Martin Liska  <mliska@suse.cz>
11700         * doc/invoke.texi: Cherry-pick upstream r323995.
11702 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
11704         * ira.c (ira_init_register_move_cost): Adjust comment.
11706 2018-02-05  Martin Liska  <mliska@suse.cz>
11708         PR gcov-profile/84137
11709         * doc/gcov.texi: Fix typo in documentation.
11711 2018-02-05  Martin Liska  <mliska@suse.cz>
11713         PR gcov-profile/83879
11714         * doc/gcov.texi: Document necessity of --dynamic-list-data when
11715         using dlopen functionality.
11717 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
11719         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
11720         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
11721         _mm_maskz_range_ss, _mm_mask_range_round_ss,
11722         _mm_maskz_range_round_ss): New intrinsics.
11723         (__builtin_ia32_rangesd128_round)
11724         (__builtin_ia32_rangess128_round): Remove.
11725         (__builtin_ia32_rangesd128_mask_round,
11726         __builtin_ia32_rangess128_mask_round): New builtins.
11727         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
11728         __builtin_ia32_rangess128_round): Remove.
11729         (__builtin_ia32_rangesd128_mask_round,
11730         __builtin_ia32_rangess128_mask_round): New builtins.
11731         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
11732         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
11733         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
11734         "<round_saeonly_constraint>")): Changed to ...
11735         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
11736         "<round_saeonly_scalar_constraint>")): ... this.
11737         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
11738         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
11739         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
11740         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
11741         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
11743 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
11745         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
11746         options.
11747         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
11748         Remove all values except native, 8540 and 8548.
11750 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
11752         * config/i386/i386.c (ix86_output_function_return): Pass
11753         INVALID_REGNUM, instead of -1, as invalid register number to
11754         indirect_thunk_name and output_indirect_thunk.
11756 2018-02-02  Julia Koval  <julia.koval@intel.com>
11758         * config.gcc: Add -march=icelake.
11759         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
11760         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
11761         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
11762         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
11763         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
11764         (processor_target_table): Add icelake.
11765         (ix86_option_override_internal): Handle new PTAs.
11766         (get_builtin_code_for_version): Handle icelake.
11767         (M_INTEL_COREI7_ICELAKE): New.
11768         (fold_builtin_cpu): Handle icelake.
11769         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
11770         * doc/invoke.texi: Add -march=icelake.
11772 2018-02-02  Julia Koval  <julia.koval@intel.com>
11774         * config/i386/i386.c (ix86_option_override_internal): Change flags type
11775         to wide_int_bitmask.
11776         * wide-int-bitmask.h: New.
11778 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11780         PR target/84066
11781         * config/i386/i386.md: Replace Pmode with word_mode in
11782         builtin_setjmp_setup and builtin_longjmp to support x32.
11784 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
11786         PR target/56010
11787         PR target/83743
11788         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
11789         #include "opts.h".
11790         (rs6000_supported_cpu_names): New static variable.
11791         (linux_cpu_translation_table): Likewise.
11792         (elf_platform) <cpu>: Define new static variable and use it.
11793         Translate kernel AT_PLATFORM name to canonical name if needed.
11794         Error if platform name is unknown.
11796 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
11798         PR target/84089
11799         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
11801 2018-02-01  Jeff Law  <law@redhat.com>
11803         PR target/84128
11804         * config/i386/i386.c (release_scratch_register_on_entry): Add new
11805         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
11806         the scratch if RELEASE_VIA_POP is false.
11807         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
11808         If we have to save a temporary register, decrement SIZE appropriately.
11809         Pass new arguments to release_scratch_register_on_entry.
11810         (ix86_adjust_stack_and_probe): Likewise.
11811         (ix86_emit_probe_stack_range): Pass new arguments to
11812         release_scratch_register_on_entry.
11814 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
11816         PR rtl-optimization/84157
11817         * combine.c (change_zero_ext): Use REG_P predicate in
11818         front of HARD_REGISTER_P predicate.
11820 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
11822         * config/avr/avr.c (avr_option_override): Move disabling of
11823         -fdelete-null-pointer-checks to...
11824         * common/config/avr/avr-common.c (avr_option_optimization_table):
11825         ...here.
11827 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11829         PR tree-optimization/81635
11830         * tree-data-ref.c (split_constant_offset_1): For types that
11831         wrap on overflow, try to use range info to prove that wrapping
11832         cannot occur.
11834 2018-02-01  Renlin Li  <renlin.li@arm.com>
11836         PR target/83370
11837         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
11838         TAILCALL_ADDR_REGS.
11839         (aarch64_register_move_cost): Likewise.
11840         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
11841         TAILCALL_ADDR_REGS.
11842         (REG_CLASS_NAMES): Likewise.
11843         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
11844         TAILCALL_ADDR_REGS. Remove IP registers.
11845         * config/aarch64/aarch64.md (Ucs): Update register constraint.
11847 2018-02-01  Richard Biener  <rguenther@suse.de>
11849         * domwalk.h (dom_walker::dom_walker): Add additional constructor
11850         for specifying RPO order and allow NULL for that.
11851         * domwalk.c (dom_walker::dom_walker): Likewise.
11852         (dom_walker::walk): Handle NULL RPO order.
11853         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
11854         in RPO order.
11855         (rewrite_update_dom_walker): Likewise.
11856         (mark_def_dom_walker): Likewise.
11858 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11860         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
11861         (aarch64_maybe_expand_sve_subreg_move): Declare.
11862         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
11863         * config/aarch64/predicates.md (aarch64_any_register_operand): New
11864         predicate.
11865         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
11866         that are semantically a reverse operation.
11867         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
11868         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
11869         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
11870         functions.
11871         (aarch64_can_change_mode_class): For big-endian, forbid changes
11872         between two SVE modes if they have different element sizes.
11874 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11876         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
11877         the TImode handling for big-endian targets.
11879 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11881         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
11882         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
11883         not just bytes.
11884         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
11885         Remove BSWAP handing for big-endian targets and use the form of
11886         LD1RQ appropariate for the mode.
11888 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11890         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
11891         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
11892         duplicated element.
11894 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
11896         PR tearget/83845
11897         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
11898         check for operands that need to go through aarch64_sve_reload_be.
11900 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
11902         PR tree-optimization/81661
11903         PR tree-optimization/84117
11904         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
11905         * tree-eh.c: Include gimplify.h.
11906         (find_trapping_overflow, replace_trapping_overflow,
11907         rewrite_to_non_trapping_overflow): New functions.
11908         * tree-vect-loop.c: Include tree-eh.h.
11909         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
11910         * tree-data-ref.c: Include tree-eh.h.
11911         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
11913 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
11915         PR rtl-optimization/84123
11916         * combine.c (change_zero_ext): Check if hard register satisfies
11917         can_change_dest_mode before calling gen_lowpart_SUBREG.
11919 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
11921         PR target/82444
11922         * ira.c (ira_init_register_move_cost): Remove assert.
11924 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11926         PR rtl-optimization/84071
11927         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
11928         * doc/tm.texi: Regenerate.
11930 2018-01-31  Richard Biener  <rguenther@suse.de>
11932         PR tree-optimization/84132
11933         * tree-data-ref.c (analyze_miv_subscript): Properly
11934         check whether evolution_function_is_affine_multivariate_p
11935         before calling gcd_of_steps_may_divide_p.
11937 2018-01-31  Julia Koval  <julia.koval@intel.com>
11939         PR target/83618
11940         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
11941         * config/i386/i386.md (rdpid_rex64) New.
11942         (rdpid): Make 32bit only.
11944 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
11946         PR lto/84105
11947         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
11948         an IDENTIFIER_NODE for FUNCTION_TYPE's.
11950 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11952         Revert
11953         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
11955         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11957 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
11959         PR rtl-optimization/84071
11960         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
11961         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
11963 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11965         * config/arc/arc.c (arc_handle_aux_attribute): New function.
11966         (arc_attribute_table): Add 'aux' attribute.
11967         (arc_in_small_data_p): Consider aux like variables.
11968         (arc_is_aux_reg_p): New function.
11969         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
11970         (arc_get_aux_arg): New function.
11971         (prepare_move_operands): Handle aux-register access.
11972         (arc_handle_aux_attribute): New function.
11973         * doc/extend.texi (ARC Variable attributes): Add subsection.
11975 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
11977         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
11978         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
11979         (arc_attribute_table): Add 'uncached' attribute.
11980         (arc_print_operand): Print '.di' flag for uncached memory
11981         accesses.
11982         (arc_in_small_data_p): Do not consider for small data the uncached
11983         types.
11984         (arc_is_uncached_mem_p): New function.
11985         * config/arc/predicates.md (compact_store_memory_operand): Check
11986         for uncached memory accesses.
11987         (nonvol_nonimm_operand): Likewise.
11988         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
11990 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
11992         PR c/84100
11993         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
11994         falign-loops=): Add Optimization flag.
11996 2018-01-30  Jeff Law  <law@redhat.com>
11998         PR target/84064
11999         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12000         INT_REGISTERS_SAVED.  Check it prior to calling
12001         get_scratch_register_on_entry.
12002         (ix86_adjust_stack_and_probe): Similarly.
12003         (ix86_emit_probe_stack_range): Similarly.
12004         (ix86_expand_prologue): Corresponding changes.
12006 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12008         PR target/40411
12009         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12010         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12012 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
12014         PR target/84112
12015         * lra-constraints.c (curr_insn_transform): Process AND in the
12016         address.
12018 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
12020         PR rtl-optimization/83986
12021         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12022         dependence against last_pending_memory_flush in addition to
12023         pending_jump_insns.
12025 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
12027         PR tree-optimization/81611
12028         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12029         copies.
12031 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12033         PR target/83758
12034         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12035         a reg rtx.
12037 2018-01-30  Richard Biener  <rguenther@suse.de>
12038             Jakub Jelinek  <jakub@redhat.com>
12040         PR tree-optimization/84111
12041         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12042         inner loops added during recursion, as they don't have up-to-date
12043         SSA form.
12045 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12047         PR ipa/81360
12048         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12049         (can_inline_edge_by_limits_p): ... here.
12050         (can_early_inline_edge_p, check_callers,
12051         update_caller_keys, update_callee_keys, recursive_inlining,
12052         add_new_edges_to_heap, speculation_useful_p,
12053         inline_small_functions,
12054         inline_small_functions, flatten_function,
12055         inline_to_all_callers_1): Update.
12057 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12059         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12060         zeros correctly.
12062 2018-01-30  Richard Biener  <rguenther@suse.de>
12064         PR tree-optimization/83008
12065         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12066         invariant and constant vector uses in stmts when they need
12067         more than one stmt.
12069 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12071         PR bootstrap/84017
12072         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12073         * configure: Regenerate.
12075 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12077         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12078         pattern.
12079         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12080         Use gen_rtx_REG rather than gen_lowpart.
12082 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12084         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12085         rather than 0 when creating partial subregs.
12087 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12089         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12090         of usage.
12092 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12094         PR target/81550
12095         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12096         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12097         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12098         flags.  This restores the settings used before the 2017-07-24.
12099         Turning off pre increment/decrement/modify allows IVOPTS to
12100         optimize DF/SF loops where the index is an int.
12102 2018-01-29  Richard Biener  <rguenther@suse.de>
12103             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12105         PR bootstrap/80867
12106         * tree-vect-stmts.c (vectorizable_call): Don't call
12107         targetm.vectorize_builtin_md_vectorized_function if callee is
12108         NULL.
12110 2018-01-22  Carl Love  <cel@us.ibm.com>
12112         * doc/extend.tex: Fix typo in second arg in
12113         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12115 2018-01-29  Richard Biener  <rguenther@suse.de>
12117         PR tree-optimization/84086
12118         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12119         (flush_ssaname_freelist): When SSA names were released reset
12120         the SCEV hash table.
12122 2018-01-29  Richard Biener  <rguenther@suse.de>
12124         PR tree-optimization/84057
12125         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12126         removed paths when removing edges.
12128 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12130         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12131         -mfunction-return=@var{choice}.
12133 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12135         PR diagnostic/84034
12136         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12137         Handle CR like TAB.
12138         (layout::print_source_line): Likewise.
12139         (test_get_line_width_without_trailing_whitespace): Add test cases.
12141 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12143         PR middle-end/84040
12144         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12145         debug insns.
12147 2018-01-26  Jim Wilson  <jimw@sifive.com>
12149         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12151         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12152         specified.
12154 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12156         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12157         and CMP + SUB-immediate -> SUBS.
12159 2018-01-26  Martin Sebor  <msebor@redhat.com>
12161         PR tree-optimization/83896
12162         * tree-ssa-strlen.c (get_string_len): Rename...
12163         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12164         Avoid assuming length is constant.
12165         (handle_char_store): Use HOST_WIDE_INT for string length.
12167 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12169         PR target/81763
12170         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12171         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12173 2018-01-26  Richard Biener  <rguenther@suse.de>
12175         PR rtl-optimization/84003
12176         * dse.c (record_store): Only record redundant stores when
12177         the earlier store aliases at least all accesses the later one does.
12179 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12181         PR rtl-optimization/83985
12182         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12183         REG_CFA_RESTORE insns.
12184         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12185         REG_CFA_RESTORE insns here.
12187         PR c/83989
12188         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12189         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12191 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12193         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12194         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12195         (arc_init): Likewise.
12196         (arc_override_options): Likewise.
12197         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12198         value.
12199         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12200         support.
12201         * config/arc/arc.h (TARGET_DBNZ): Define.
12202         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12203         properly set the tune attribute.
12204         (dbnz): Use TARGET_DBNZ guard.
12205         * config/arc/arc.opt (mtune): Add core3 option.
12207 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12209         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12210         recognize new pic like addresses.
12211         (arc_delegitimize_address): Clean up.
12213 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12215         * config/arc/arc-arches.def: Option mrf16 valid for all
12216         architectures.
12217         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12218         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12219         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12220         * config/arc/arc-tables.opt: Regenerate.
12221         * config/arc/arc.c (arc_conditional_register_usage): Handle
12222         reduced register file case.
12223         (arc_file_start): Set must have build attributes.
12224         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12225         mrf16 option value.
12226         * config/arc/arc.opt (mrf16): Add new option.
12227         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12228         * config/arc/genmultilib.awk: Handle new mrf16 option.
12229         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12230         * config/arc/t-multilib: Regenerate.
12231         * doc/invoke.texi (ARC Options): Document mrf16 option.
12233 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12235         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12236         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12237         (arc_attribute_table): Add 'secure_call' attribute.
12238         (arc_print_operand): Print secure call operand.
12239         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12240         secure.
12241         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12242         (call_i): Add support for sjli instruction.
12243         (call_value_i): Likewise.
12244         * config/arc/constraints.md (Csc): New constraint.
12246 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12247             John Eric Martin  <John.Martin@emmicro-us.com>
12249         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12250         * config/arc/arc.c (_arc_jli_section): New struct.
12251         (arc_jli_section): New type.
12252         (rc_jli_sections): New static variable.
12253         (arc_handle_jli_attribute): New function.
12254         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12255         (arc_file_end): New function.
12256         (TARGET_ASM_FILE_END): Define.
12257         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12258         (arc_add_jli_section): New function.
12259         (jli_call_scan): Likewise.
12260         (arc_reorg): Call jli_call_scan.
12261         (arc_output_addsi): Remove 'S' from printing asm operand.
12262         (arc_is_jli_call_p): New function.
12263         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12264         operand.
12265         (movhi_insn): Likewise.
12266         (movsi_insn): Likewise.
12267         (movsi_set_cc_insn): Likewise.
12268         (loadqi_update): Likewise.
12269         (load_zeroextendqisi_update): Likewise.
12270         (load_signextendqisi_update): Likewise.
12271         (loadhi_update): Likewise.
12272         (load_zeroextendhisi_update): Likewise.
12273         (load_signextendhisi_update): Likewise.
12274         (loadsi_update): Likewise.
12275         (loadsf_update): Likewise.
12276         (movsicc_insn): Likewise.
12277         (bset_insn): Likewise.
12278         (bxor_insn): Likewise.
12279         (bclr_insn): Likewise.
12280         (bmsk_insn): Likewise.
12281         (bicsi3_insn): Likewise.
12282         (cmpsi_cc_c_insn): Likewise.
12283         (movsi_ne): Likewise.
12284         (movsi_cond_exec): Likewise.
12285         (clrsbsi2): Likewise.
12286         (norm_f): Likewise.
12287         (normw): Likewise.
12288         (swap): Likewise.
12289         (divaw): Likewise.
12290         (flag): Likewise.
12291         (sr): Likewise.
12292         (kflag): Likewise.
12293         (ffs): Likewise.
12294         (ffs_f): Likewise.
12295         (fls): Likewise.
12296         (call_i): Remove 'S' asm letter, add jli instruction.
12297         (call_value_i): Likewise.
12298         * config/arc/arc.op (mjli-always): New option.
12299         * config/arc/constraints.md (Cji): New constraint.
12300         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12301         operand.
12302         (subsf3_fpx): Likewise.
12303         (mulsf3_fpx): Likewise.
12304         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12305         asm operand.
12306         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12307         function attrbutes.
12308         * doc/invoke.texi (ARC): Document mjli-always option.
12310 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12312         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12313         avoid addition with 0 and use incw and decw where possible.
12315 2018-01-26  Richard Biener  <rguenther@suse.de>
12317         PR tree-optimization/81082
12318         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12319         association if it requires casting to unsigned.
12320         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12321         from fold_plusminus_mult_expr to catch important cases late when
12322         range info is available.
12324 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12326         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12327         * configure.ac (hidden_linkonce): New test.
12328         * configure: Regenerate.
12329         * config.in: Regenerate.
12331 2018-01-26  Julia Koval  <julia.koval@intel.com>
12333         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12334         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12335         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12336         _mm_mask_bitshuffle_epi64_mask): Fix type.
12337         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12338         USI_FTYPE_V4DI_V4DI_USI): Remove.
12339         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12340         __builtin_ia32_vpshufbitqmb256_mask,
12341         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12342         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12343         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12345 2018-01-26  Alan Modra  <amodra@gmail.com>
12347         PR target/84033
12348         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12349         UNSPEC_VBPERMQ.  Sort other unspecs.
12351 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12353         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12355 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12357         PR middle-end/83055
12358         * predict.c (drop_profile): Do not push/pop cfun; update also
12359         node->count.
12360         (handle_missing_profiles): Fix logic looking for zero profiles.
12362 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12364         PR middle-end/83977
12365         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12366         on functions with #pragma omp declare simd or functions with simd
12367         attribute.
12368         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12369         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12370         Remove trailing \n from warning_at calls.
12372 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12374         PR target/84028
12375         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12376         for neutered workers.
12378 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12380         PR target/68467
12381         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12382         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12384 2018-01-24  Jeff Law  <law@redhat.com>
12386         PR target/83994
12387         * i386.c (get_probe_interval): Move to earlier point.
12388         (ix86_compute_frame_layout): If -fstack-clash-protection and
12389         the frame is larger than the probe interval, then use pushes
12390         to save registers rather than reg->mem moves.
12391         (ix86_expand_prologue): Remove conditional for int_registers_saved
12392         assertion.
12394 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12396         PR target/84014
12397         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12398         min/max for never referenced object.
12400 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12402         PR middle-end/83977
12403         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12404         here.
12405         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12406         attributes from DECL_ATTRIBUTES (decl) without affecting
12407         DECL_ATTRIBUTES (current_function_decl).
12408         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12409         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12411 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12413         PR tree-optimization/83979
12414         * fold-const.c (fold_comparison): Use constant_boolean_node
12415         instead of boolean_{true,false}_node.
12417 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12419         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12420         with zero counts.
12422 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12424         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12425         Simplify the clause that sets the length attribute.
12426         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12427         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12428         clause that sets the length attribute.
12429         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12431 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12433         PR target/83589
12434         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12435         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12436         Add strict parameter.
12437         (prevent_branch_around_nothing): Insert dummy insn between branch to
12438         label and label with no ptx insn inbetween.
12439         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12441 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12443         PR target/81352
12444         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12445         for neutered threads in warp.
12446         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12448 2018-01-24  Richard Biener  <rguenther@suse.de>
12450         PR tree-optimization/83176
12451         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12452         operands.
12454 2018-01-24  Richard Biener  <rguenther@suse.de>
12456         PR tree-optimization/82819
12457         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12458         code generating pluses that are no-ops in the target precision.
12460 2018-01-24  Richard Biener  <rguenther@suse.de>
12462         PR middle-end/84000
12463         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12465 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12467         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12468         to merge probabilities.
12469         * predict.c (probably_never_executed): Also mark as cold functions
12470         with global 0 profile and guessed local profile.
12471         * profile-count.c (profile_probability::combine_with_count): New
12472         member function.
12473         * profile-count.h (profile_probability::operator*,
12474         profile_probability::operator*=, profile_probability::operator/,
12475         profile_probability::operator/=): Reduce precision to adjusted
12476         and set value to guessed on contradictory divisions.
12477         (profile_probability::combine_with_freq): Remove.
12478         (profile_probability::combine_wiht_count): Declare.
12479         (profile_count::force_nonzero):: Set to adjusted.
12480         (profile_count::probability_in):: Set quality to adjusted.
12481         * tree-ssa-tail-merge.c (replace_block_by): Use
12482         combine_with_count.
12484 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12485             Jim Wilson  <jimw@sifive.com>
12487         * config/riscv/riscv.c (riscv_stack_boundary): New.
12488         (riscv_option_override): Set riscv_stack_boundary.  Handle
12489         riscv_preferred_stack_boundary_arg.
12490         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12491         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12492         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12493         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12494         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12495         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12497 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12499         PR target/83905
12500         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12501         of struct ix86_frame.
12502         (ix86_expand_epilogue): Likewise.  Add a local variable for
12503         the reg_save_offset field in struct ix86_frame.
12505 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
12507         PR tree-optimization/82604
12508         * tree-loop-distribution.c (enum partition_kind): New enum item
12509         PKIND_PARTIAL_MEMSET.
12510         (partition_builtin_p): Support above new enum item.
12511         (generate_code_for_partition): Ditto.
12512         (compute_access_range): Differentiate cases that equality can be
12513         proven at all loops, the innermost loops or no loops.
12514         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12515         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
12516         (finalize_partitions, distribute_loop): Don't fuse partition of
12517         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12518         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12519         parloop is enabled.
12521 2018-01-23  Martin Liska  <mliska@suse.cz>
12523         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12524         order to ignore the predictor.
12525         (PRED_POLYMORPHIC_CALL): Likewise.
12526         (PRED_RECURSIVE_CALL): Likewise.
12528 2018-01-23  Martin Liska  <mliska@suse.cz>
12530         * tree-profile.c (tree_profiling): Print function header to
12531         aware reader which function we are working on.
12532         * value-prof.c (gimple_find_values_to_profile): Do not print
12533         not interesting value histograms.
12535 2018-01-23  Martin Liska  <mliska@suse.cz>
12537         * profile-count.h (enum profile_quality): Add
12538         profile_uninitialized as the first value. Do not number values
12539         as they are zero based.
12540         (profile_count::verify): Update sanity check.
12541         (profile_probability::verify): Likewise.
12543 2018-01-23  Nathan Sidwell  <nathan@acm.org>
12545         * doc/invoke.texi (ffor-scope): Deprecate.
12547 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12549         PR tree-optimization/83510
12550         * domwalk.c (set_all_edges_as_executable): New function.
12551         (dom_walker::dom_walker): Convert bool param
12552         "skip_unreachable_blocks" to enum reachability.  Move setup of
12553         edge flags to set_all_edges_as_executable and only do it when
12554         reachability is REACHABLE_BLOCKS.
12555         * domwalk.h (enum dom_walker::reachability): New enum.
12556         (dom_walker::dom_walker): Convert bool param
12557         "skip_unreachable_blocks" to enum reachability.
12558         (set_all_edges_as_executable): New decl.
12559         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
12560         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
12561         "reachability".
12562         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
12563         but converting true to REACHABLE_BLOCKS.
12564         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
12565         * tree-vrp.c
12566         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
12567         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
12568         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
12569         REACHABLE_BLOCKS.
12570         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
12571         if check_all_array_refs will be called.
12573 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12575         * tree.c (selftest::test_location_wrappers): Add more test
12576         coverage.
12578 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
12580         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
12581         (selftest::test_bit_in_range): Likewise.
12583 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12585         PR testsuite/83888
12586         * doc/sourcebuild.texi (vect_float): Say that the selector
12587         only describes the situation when -funsafe-math-optimizations is on.
12588         (vect_float_strict): Document.
12590 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
12592         PR tree-optimization/83965
12593         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12594         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
12595         instead of checking only for a reduction.
12596         (vect_recog_widen_sum_pattern): Likewise.
12598 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12600         * predict.c (probably_never_executed): Only use precise profile info.
12601         (compute_function_frequency): Skip after inlining hack since we now
12602         have quality checking.
12604 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12606         * profile-count.h (profile_probability::very_unlikely,
12607         profile_probability::unlikely, profile_probability::even): Set
12608         precision to guessed.
12610 2018-01-23  Richard Biener  <rguenther@suse.de>
12612         PR tree-optimization/83963
12613         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
12614         Properly terminate dominator walk when crossing the exit edge not
12615         when visiting its source block.
12617 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
12619         PR c++/83918
12620         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
12621         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
12623 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
12625         PR tree-optimization/83957
12626         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
12627         semicolon after for body surrounded by braces.
12629         PR tree-optimization/83081
12630         * profile-count.h (profile_probability::split): New method.
12631         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
12632         Use profile_probability::split.
12633         (do_compare_rtx_and_jump): Fix adjustment of probabilities
12634         when splitting a single conditional jump into 2.
12636 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
12638         PR tree-optimization/69452
12639         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
12640         decl.
12642 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12644         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
12645         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
12646         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
12648 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12650         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
12651         declaration.
12652         * config/rl78/rl78.md (movdi): New define_expand.
12653         * config/rl78/rl78.c (rl78_split_movdi): New function.
12655 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
12657         PR target/83862
12658         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
12659         no longer used.
12660         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
12661         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
12662         128-bit to produce an UNSPEC move to get the double word with the
12663         signbit and then a shift directly to do signbit.
12664         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
12665         implementation with a new version that just does either a direct
12666         move or a regular move.  Move memory interface to separate insns.
12667         Move insns so they are next to the expander.
12668         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
12669         with signbit move.  Split big and little endian case.
12670         (signbit<mode>2_dm_mem_le): Likewise.
12671         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
12672         (signbit<mode>2_dm2): Likewise.
12674 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12676         * config/rl78/rl78.md (anddi3): New define_expand.
12678 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12680         * config/rl78/rl78.md (umindi3): New define_expand.
12682 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12684         * config/rl78/rl78.md (smindi3): New define_expand.
12686 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12688         * config/rl78/rl78.md (smaxdi3): New define_expand.
12690 2018-01-22  Carl Love  <cel@us.ibm.com>
12692         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
12693         LVX_V1TI): Add macro expansion.
12694         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
12695         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
12696         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
12697         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
12698         Change check to determine if the instruction is a byte reversing
12699         entry.  Fix typo in comment.
12700         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
12701         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
12702         Add def_builtin calls for new builtins.
12703         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
12704         Add define_insn expansion.
12706 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12708         * config/rl78/rl78.md (umaxdi3): New define_expand.
12710 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
12712         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
12713         for non-QImode registers.
12715 2018-01-22  Richard Biener  <rguenther@suse.de>
12717         PR tree-optimization/83963
12718         * graphite-scop-detection.c (scop_detection::get_sese): Delay
12719         including the loop exit block.
12720         (scop_detection::merge_sese): Likewise.
12721         (scop_detection::add_scop): Do it here instead.
12723 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12725         * doc/sourcebuild.texi (arm_softfloat): Document.
12727 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
12729         PR gcc/77734
12730         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
12731         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
12732         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
12734 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12735             David Edelsohn  <dje.gcc@gmail.com>
12737         PR target/83946
12738         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12739         Change "crset eq" to "crset 2".
12740         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12741         (*call_indirect_aix<mode>_nospec): Likewise.
12742         (*call_value_indirect_aix<mode>_nospec): Likewise.
12743         (*call_indirect_elfv2<mode>_nospec): Likewise.
12744         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
12745         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
12746         change assembly output from . to $.
12747         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12748         (indirect_jump<mode>_nospec): Change assembly output from . to $.
12749         (*tablejump<mode>_internal1_nospec): Likewise.
12751 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
12753         PR target/80870
12754         * config/sh/sh_optimize_sett_clrt.cc:
12755         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
12757 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
12759         PR tree-optimization/83940
12760         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
12761         offset_dt to vect_constant_def rather than vect_unknown_def_type.
12762         (vect_check_load_store_mask): Add a mask_dt_out parameter and
12763         use it to pass back the definition type.
12764         (vect_check_store_rhs): Likewise rhs_dt_out.
12765         (vect_build_gather_load_calls): Add a mask_dt argument and use
12766         it instead of a call to vect_is_simple_use.
12767         (vectorizable_store): Update calls to vect_check_load_store_mask
12768         and vect_check_store_rhs.  Use the dt returned by the latter instead
12769         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
12770         instead of calls to vect_is_simple_use.  Pass the scalar rather
12771         than the vector operand to vect_is_simple_use when handling
12772         second and subsequent copies of an rhs value.
12773         (vectorizable_load): Update calls to vect_check_load_store_mask
12774         and vect_build_gather_load_calls.  Use the cached mask_dt and
12775         gs_info.offset_dt instead of calls to vect_is_simple_use.
12777 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
12779         PR middle-end/83945
12780         * tree-emutls.c: Include gimplify.h.
12781         (lower_emutls_2): New function.
12782         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
12783         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
12784         it before further processing.
12786         PR target/83930
12787         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
12788         UINTVAL (trueop1) instead of INTVAL (op1).
12790 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
12792         PR debug/81570
12793         PR debug/83728
12794         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
12795         INCOMING_FRAME_SP_OFFSET if not defined.
12796         (scan_trace): Add ENTRY argument.  If true and
12797         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
12798         emit a note to adjust the CFA offset.
12799         (create_cfi_notes): Adjust scan_trace callers.
12800         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
12801         INCOMING_FRAME_SP_OFFSET in the CIE.
12802         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
12803         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
12804         Likewise.
12805         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
12806         * doc/tm.texi: Regenerated.
12808 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12810         PR rtl-optimization/83147
12811         * lra-constraints.c (remove_inheritance_pseudos): Use
12812         lra_substitute_pseudo_within_insn.
12814 2018-01-19  Tom de Vries  <tom@codesourcery.com>
12815             Cesar Philippidis  <cesar@codesourcery.com>
12817         PR target/83920
12818         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
12820 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
12822         PR target/83790
12823         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
12824         spaces for function labels.
12826 2018-01-19  Martin Liska  <mliska@suse.cz>
12828         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
12829         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
12830         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
12831         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
12832         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
12833         (PRED_CONST_RETURN): Change from 69 to 65.
12834         (PRED_NULL_RETURN): Change from 91 to 71.
12835         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
12836         (PRED_LOOP_GUARD): Change from 66 to 73.
12838 2018-01-19  Martin Liska  <mliska@suse.cz>
12840         * predict.c (predict_insn_def): Add new assert.
12841         (struct branch_predictor): Change type to signed integer.
12842         (test_prediction_value_range): Amend test to cover
12843         PROB_UNINITIALIZED.
12844         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
12845         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
12846         (PRED_LOOP_ITERATIONS_MAX): Likewise.
12847         (PRED_LOOP_IV_COMPARE): Likewise.
12848         * predict.h (PROB_UNINITIALIZED): Define new constant.
12850 2018-01-19  Martin Liska  <mliska@suse.cz>
12852         * predict.c (dump_prediction): Add new format for
12853         analyze_brprob.py script which is enabled with -details
12854         suboption.
12855         * profile-count.h (precise_p): New function.
12857 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12859         PR tree-optimization/83922
12860         * tree-vect-loop.c (vect_verify_full_masking): Return false if
12861         there are no statements that need masking.
12862         (vect_active_double_reduction_p): New function.
12863         (vect_analyze_loop_operations): Use it when handling phis that
12864         are not in the loop header.
12866 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
12868         PR tree-optimization/83914
12869         * tree-vect-loop.c (vectorizable_induction): Don't convert
12870         init_expr or apply the peeling adjustment for inductions
12871         that are nested within the vectorized loop.
12873 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12875         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
12876         instead of NEG.
12878 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12880         PR sanitizer/81715
12881         PR testsuite/83882
12882         * function.h (gimplify_parameters): Add gimple_seq * argument.
12883         * function.c: Include gimple.h and options.h.
12884         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
12885         for the added local temporaries if needed.
12886         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
12887         if there are any parameter cleanups, wrap whole body into a
12888         try/finally with the cleanups.
12890 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
12892         PR target/82964
12893         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
12894         Use GET_MODE_CLASS for scalar floating point.
12896 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12898         PR ipa/82256
12899         patch by PaX Team
12900         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
12901         Fix call of call_cgraph_insertion_hooks.
12903 2018-01-18  Martin Sebor  <msebor@redhat.com>
12905         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
12907 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
12909         PR ipa/83619
12910         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
12911         frequencies.
12913 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
12915         PR other/70268
12916         * common.opt: (-ffile-prefix-map): New option.
12917         * opts.c (common_handle_option): Defer it.
12918         * opts-global.c (handle_common_deferred_options): Handle it.
12919         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
12920         * file-prefix-map.h: New file.
12921         (remap_debug_filename, add_debug_prefix_map): ...here.
12922         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
12923         * final.c (debug_prefix_map, add_debug_prefix_map
12924         remap_debug_filename): Move to...
12925         * file-prefix-map.c: New file.
12926         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
12927         generalize, get rid of alloca(), use strrchr() instead of strchr().
12928         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
12929         Implement in terms of add_prefix_map().
12930         (remap_macro_filename, remap_debug_filename): Implement in term of
12931         remap_filename().
12932         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
12933         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
12934         * dbxout.c: Include file-prefix-map.h.
12935         * varasm.c: Likewise.
12936         * vmsdbgout.c: Likewise.
12937         * xcoffout.c: Likewise.
12938         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
12939         * doc/cppopts.texi (-fmacro-prefix-map): Document.
12940         * doc/invoke.texi (-ffile-prefix-map): Document.
12941         (-fdebug-prefix-map): Update description.
12943 2018-01-18  Martin Liska  <mliska@suse.cz>
12945         * config/i386/i386.c (indirect_thunk_name): Document that also
12946         lfence is emitted.
12947         (output_indirect_thunk): Document why both instructions
12948         (pause and lfence) are generated.
12950 2018-01-18  Richard Biener  <rguenther@suse.de>
12952         PR tree-optimization/83887
12953         * graphite-scop-detection.c
12954         (scop_detection::get_nearest_dom_with_single_entry): Remove.
12955         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
12956         (scop_detection::merge_sese): Re-implement with a flood-fill
12957         algorithm that properly finds a SESE region if it exists.
12959 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
12961         PR c/61240
12962         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
12963         pointer_diff optimizations use view_convert instead of convert.
12965 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12967         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12968         Generate different code for -mno-speculate-indirect-jumps.
12969         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12970         (*call_indirect_aix<mode>): Disable for
12971         -mno-speculate-indirect-jumps.
12972         (*call_indirect_aix<mode>_nospec): New define_insn.
12973         (*call_value_indirect_aix<mode>): Disable for
12974         -mno-speculate-indirect-jumps.
12975         (*call_value_indirect_aix<mode>_nospec): New define_insn.
12976         (*sibcall_nonlocal_sysv<mode>): Generate different code for
12977         -mno-speculate-indirect-jumps.
12978         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12980 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12982         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
12983         long double type, set the flags for noting the default long double
12984         type, even if we don't pass or return a long double type.
12986 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
12988         PR ipa/83051
12989         * ipa-inline.c (flatten_function): Do not overwrite final inlining
12990         failure.
12992 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
12994         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
12995         support for merge[hl].
12996         (fold_mergehl_helper): New helper function.
12997         (tree-vector-builder.h): New #include for tree_vector_builder usage.
12998         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
12999         (altivec_vmrglw_direct): Add xxmrglw insn.
13001 2018-01-17  Andrew Waterman  <andrew@sifive.com>
13003         * config/riscv/riscv.c (riscv_conditional_register_usage): If
13004         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13006 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
13008         PR lto/83121
13009         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13010         call the lto_location_cache before reading the
13011         DECL_SOURCE_LOCATION of the types.
13013 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
13014             Richard Sandiford  <richard.sandiford@linaro.org>
13016         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13017         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13018         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13019         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13020         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13021         Add declaration.
13022         * config/aarch64/constraints.md (aarch64_movti_operand):
13023         Limit immediates.
13024         * config/aarch64/predicates.md (Uti): Add new constraint.
13026 2018-01-17 Carl Love  <cel@us.ibm.com>
13028         * config/rs6000/vsx.md (define_expand xl_len_r,
13029         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13030         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13031         lxvll.
13032         (define_expand, define_insn): Move the shift left from  the
13033         define_insn to the define_expand for lxvl and stxvl instructions.
13034         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13035         and XL_LEN_R definitions to PURE.
13037 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13039         * config/i386/i386.c (indirect_thunk_name): Declare regno
13040         as unsigned int.  Compare regno with INVALID_REGNUM.
13041         (output_indirect_thunk): Ditto.
13042         (output_indirect_thunk_function): Ditto.
13043         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13044         in the call to output_indirect_thunk_function.
13046 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13048         PR middle-end/83884
13049         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13050         rather than the size of inner_type to determine the stack slot size
13051         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13053 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13055         PR target/83546
13056         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13057         to PTA_SILVERMONT.
13059 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13061         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13062         endian Linux systems to optionally enable multilibs for selecting
13063         the long double type if the user configured an explicit type.
13064         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13065         have no long double multilibs if not defined.
13066         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13067         warn if the user used -mabi={ieee,ibm}longdouble and we built
13068         multilibs for long double.
13069         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13070         appropriate multilib option.
13071         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13072         multilib options.
13073         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13074         for building long double multilibs.
13075         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13077 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13079         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13080         copies.
13082         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13083         64 bits.
13084         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13085         128 bits.
13087         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13088         variables.
13090         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13091         return value.
13093 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13095         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13096         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13098 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13100         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13101         different rtl trees depending on TARGET_64BIT.
13102         (rs6000_gen_lvx): Likewise.
13104 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13106         * config/visium/visium.md (nop): Tweak comment.
13107         (hazard_nop): Likewise.
13109 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13111         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13112         -mspeculate-indirect-jumps.
13113         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13114         for -mno-speculate-indirect-jumps.
13115         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13116         (*call_value_indirect_elfv2<mode>): Disable for
13117         -mno-speculate-indirect-jumps.
13118         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13119         (indirect_jump): Emit different RTL for
13120         -mno-speculate-indirect-jumps.
13121         (*indirect_jump<mode>): Disable for
13122         -mno-speculate-indirect-jumps.
13123         (*indirect_jump<mode>_nospec): New define_insn.
13124         (tablejump): Emit different RTL for
13125         -mno-speculate-indirect-jumps.
13126         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13127         (tablejumpsi_nospec): New define_expand.
13128         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13129         (tablejumpdi_nospec): New define_expand.
13130         (*tablejump<mode>_internal1): Disable for
13131         -mno-speculate-indirect-jumps.
13132         (*tablejump<mode>_internal1_nospec): New define_insn.
13133         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13134         option.
13136 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13138         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13139         callers updated.
13141 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13142             Richard Biener  <rguenth@suse.de>
13144         PR libgomp/83590
13145         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13146         return early, inline manually is_gimple_sizepos.  Make sure if we
13147         call gimplify_expr we don't end up with a gimple constant.
13148         * tree.c (variably_modified_type_p): Don't return true for
13149         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13150         * gimplify.h (is_gimple_sizepos): Remove.
13152 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13154         PR tree-optimization/83857
13155         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13156         vectorizable_live_operation for pure SLP statements.
13157         (vectorizable_live_operation): Handle PHIs.
13159 2018-01-16  Richard Biener  <rguenther@suse.de>
13161         PR tree-optimization/83867
13162         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13163         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13165 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13167         PR c/83844
13168         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13169         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13170         If off is not INTEGER_CST, issue a may not be aligned warning
13171         rather than isn't aligned.  Use isn%'t rather than isn't.
13172         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13173         into MULT_EXPR.
13174         <case MULT_EXPR>: Improve the case when bottom and one of the
13175         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13176         operand, in that case check if the other operand is multiple of
13177         bottom divided by the INTEGER_CST operand.
13179 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13181         PR target/83858
13182         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13183         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13184         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13185         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13186         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13187         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13188         (pa_function_arg_size): New function.
13190 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13192         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13193         in a separate statement.
13195 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13197         PR tree-optimization/83847
13198         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13199         group gathers and scatters.
13201 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13203         PR rtl-optimization/86620
13204         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13206         PR rtl-optimization/83213
13207         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13208         to last if both are JUMP_INSNs.
13210         PR tree-optimization/83843
13211         * gimple-ssa-store-merging.c
13212         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13213         store_immediate_info for bswap/nop orig_stores.
13215 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13217         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13218         !TARGET_MUL.
13219         <UDIV>: Increase cost if !TARGET_DIV.
13221 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13223         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13224         (define_attr "cr_logical_3op"): New.
13225         (cceq_ior_compare): Adjust.
13226         (cceq_ior_compare_complement): Adjust.
13227         (*cceq_rev_compare): Adjust.
13228         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13229         (is_cracked_insn): Adjust.
13230         (insn_must_be_first_in_group): Adjust.
13231         * config/rs6000/40x.md: Adjust.
13232         * config/rs6000/440.md: Adjust.
13233         * config/rs6000/476.md: Adjust.
13234         * config/rs6000/601.md: Adjust.
13235         * config/rs6000/603.md: Adjust.
13236         * config/rs6000/6xx.md: Adjust.
13237         * config/rs6000/7450.md: Adjust.
13238         * config/rs6000/7xx.md: Adjust.
13239         * config/rs6000/8540.md: Adjust.
13240         * config/rs6000/cell.md: Adjust.
13241         * config/rs6000/e300c2c3.md: Adjust.
13242         * config/rs6000/e500mc.md: Adjust.
13243         * config/rs6000/e500mc64.md: Adjust.
13244         * config/rs6000/e5500.md: Adjust.
13245         * config/rs6000/e6500.md: Adjust.
13246         * config/rs6000/mpc.md: Adjust.
13247         * config/rs6000/power4.md: Adjust.
13248         * config/rs6000/power5.md: Adjust.
13249         * config/rs6000/power6.md: Adjust.
13250         * config/rs6000/power7.md: Adjust.
13251         * config/rs6000/power8.md: Adjust.
13252         * config/rs6000/power9.md: Adjust.
13253         * config/rs6000/rs64.md: Adjust.
13254         * config/rs6000/titan.md: Adjust.
13256 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13258         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13259         ix86_indirect_branch_register logic.
13261 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13263         * config/i386/constraints.md (Bs): Update
13264         ix86_indirect_branch_register check.  Don't check
13265         ix86_indirect_branch_register with GOT_memory_operand.
13266         (Bw): Likewise.
13267         * config/i386/predicates.md (GOT_memory_operand): Don't check
13268         ix86_indirect_branch_register here.
13269         (GOT32_symbol_operand): Likewise.
13271 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13273         * config/i386/predicates.md (constant_call_address_operand):
13274         Rewrite ix86_indirect_branch_register logic.
13275         (sibcall_insn_operand): Likewise.
13277 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13279         * config/i386/constraints.md (Bs): Replace
13280         ix86_indirect_branch_thunk_register with
13281         ix86_indirect_branch_register.
13282         (Bw): Likewise.
13283         * config/i386/i386.md (indirect_jump): Likewise.
13284         (tablejump): Likewise.
13285         (*sibcall_memory): Likewise.
13286         (*sibcall_value_memory): Likewise.
13287         Peepholes of indirect call and jump via memory: Likewise.
13288         * config/i386/i386.opt: Likewise.
13289         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13290         (GOT_memory_operand): Likewise.
13291         (call_insn_operand): Likewise.
13292         (sibcall_insn_operand): Likewise.
13293         (GOT32_symbol_operand): Likewise.
13295 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13297         PR middle-end/83837
13298         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13299         type rather than type addr's type points to.
13300         (expand_omp_atomic_mutex): Likewise.
13301         (expand_omp_atomic): Likewise.
13303 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13305         PR target/83839
13306         * config/i386/i386.c (output_indirect_thunk_function): Use
13307         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13308         for  __x86_return_thunk.
13310 2018-01-15  Richard Biener  <rguenther@suse.de>
13312         PR middle-end/83850
13313         * expmed.c (extract_bit_field_1): Fix typo.
13315 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13317         PR target/83687
13318         * config/arm/iterators.md (VF): New mode iterator.
13319         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13320         Remove integer-related logic from pattern.
13321         (neon_vabd<mode>_3): Likewise.
13323 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13325         PR middle-end/82694
13326         * common.opt (fstrict-overflow): No longer an alias.
13327         (fwrapv-pointer): New option.
13328         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13329         also for pointer types based on flag_wrapv_pointer.
13330         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13331         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13332         opts->x_flag_wrapv got set.
13333         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13334         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13335         POINTER_TYPE_OVERFLOW_UNDEFINED.
13336         * match.pd: Likewise in address comparison pattern.
13337         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13339 2018-01-15  Richard Biener  <rguenther@suse.de>
13341         PR lto/83804
13342         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13343         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13344         Reset type names to their identifier if their TYPE_DECL doesn't
13345         have linkage (and thus is used for ODR and devirt).
13346         (save_debug_info_for_decl): Remove.
13347         (save_debug_info_for_type): Likewise.
13348         (add_tree_to_fld_list): Adjust.
13349         * tree-pretty-print.c (dump_generic_node): Make dumping of
13350         type names more robust.
13352 2018-01-15  Richard Biener  <rguenther@suse.de>
13354         * BASE-VER: Bump to 8.0.1.
13356 2018-01-14  Martin Sebor  <msebor@redhat.com>
13358         PR other/83508
13359         * builtins.c (check_access): Avoid warning when the no-warning bit
13360         is set.
13362 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13364         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13365         * ira-color (allocno_hard_regs_compare): Likewise.
13367 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13369         PR target/83013
13370         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13371         Use .pushsection/.popsection.
13373 2018-01-14  Martin Sebor  <msebor@redhat.com>
13375         PR c++/81327
13376         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13378 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13380         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13381         entry from extra_headers.
13382         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13383         extra_headers, make the list bitwise identical to the i?86-*-* one.
13385 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13387         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13388         -mcmodel=large with -mindirect-branch=thunk,
13389         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13390         -mfunction-return=thunk-extern.
13391         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13392         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13393         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13395 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13397         * config/i386/i386.c (print_reg): Print the name of the full
13398         integer register without '%'.
13399         (ix86_print_operand): Handle 'V'.
13400         * doc/extend.texi: Document 'V' modifier.
13402 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13404         * config/i386/constraints.md (Bs): Disallow memory operand for
13405         -mindirect-branch-register.
13406         (Bw): Likewise.
13407         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13408         (GOT_memory_operand): Likewise.
13409         (call_insn_operand): Likewise.
13410         (sibcall_insn_operand): Likewise.
13411         (GOT32_symbol_operand): Likewise.
13412         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13413         for -mindirect-branch-register.
13414         (tablejump): Likewise.
13415         (*sibcall_memory): Likewise.
13416         (*sibcall_value_memory): Likewise.
13417         Disallow peepholes of indirect call and jump via memory for
13418         -mindirect-branch-register.
13419         (*call_pop): Replace m with Bw.
13420         (*call_value_pop): Likewise.
13421         (*sibcall_pop_memory): Replace m with Bs.
13422         * config/i386/i386.opt (mindirect-branch-register): New option.
13423         * doc/invoke.texi: Document -mindirect-branch-register option.
13425 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13427         * config/i386/i386-protos.h (ix86_output_function_return): New.
13428         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13429         set function_return_type.
13430         (indirect_thunk_name): Add ret_p to indicate thunk for function
13431         return.
13432         (output_indirect_thunk_function): Pass false to
13433         indirect_thunk_name.
13434         (ix86_output_indirect_branch_via_reg): Likewise.
13435         (ix86_output_indirect_branch_via_push): Likewise.
13436         (output_indirect_thunk_function): Create alias for function
13437         return thunk if regno < 0.
13438         (ix86_output_function_return): New function.
13439         (ix86_handle_fndecl_attribute): Handle function_return.
13440         (ix86_attribute_table): Add function_return.
13441         * config/i386/i386.h (machine_function): Add
13442         function_return_type.
13443         * config/i386/i386.md (simple_return_internal): Use
13444         ix86_output_function_return.
13445         (simple_return_internal_long): Likewise.
13446         * config/i386/i386.opt (mfunction-return=): New option.
13447         (indirect_branch): Mention -mfunction-return=.
13448         * doc/extend.texi: Document function_return function attribute.
13449         * doc/invoke.texi: Document -mfunction-return= option.
13451 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13453         * config/i386/i386-opts.h (indirect_branch): New.
13454         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13455         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13456         with local indirect jump when converting indirect call and jump.
13457         (ix86_set_indirect_branch_type): New.
13458         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13459         (indirectlabelno): New.
13460         (indirect_thunk_needed): Likewise.
13461         (indirect_thunk_bnd_needed): Likewise.
13462         (indirect_thunks_used): Likewise.
13463         (indirect_thunks_bnd_used): Likewise.
13464         (INDIRECT_LABEL): Likewise.
13465         (indirect_thunk_name): Likewise.
13466         (output_indirect_thunk): Likewise.
13467         (output_indirect_thunk_function): Likewise.
13468         (ix86_output_indirect_branch_via_reg): Likewise.
13469         (ix86_output_indirect_branch_via_push): Likewise.
13470         (ix86_output_indirect_branch): Likewise.
13471         (ix86_output_indirect_jmp): Likewise.
13472         (ix86_code_end): Call output_indirect_thunk_function if needed.
13473         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13474         needed.
13475         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13476         (ix86_attribute_table): Add indirect_branch.
13477         * config/i386/i386.h (machine_function): Add indirect_branch_type
13478         and has_local_indirect_jump.
13479         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13480         to true.
13481         (tablejump): Likewise.
13482         (*indirect_jump): Use ix86_output_indirect_jmp.
13483         (*tablejump_1): Likewise.
13484         (simple_return_indirect_internal): Likewise.
13485         * config/i386/i386.opt (mindirect-branch=): New option.
13486         (indirect_branch): New.
13487         (keep): Likewise.
13488         (thunk): Likewise.
13489         (thunk-inline): Likewise.
13490         (thunk-extern): Likewise.
13491         * doc/extend.texi: Document indirect_branch function attribute.
13492         * doc/invoke.texi: Document -mindirect-branch= option.
13494 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13496         PR ipa/83051
13497         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13499 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13501         * ipa-inline.c (want_inline_small_function_p): Return false if
13502         inlining has already failed with CIF_FINAL_ERROR.
13503         (update_caller_keys): Call want_inline_small_function_p before
13504         can_inline_edge_p.
13505         (update_callee_keys): Likewise.
13507 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13509         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13510         New function.
13511         (rs6000_quadword_masked_address_p): Likewise.
13512         (quad_aligned_load_p): Likewise.
13513         (quad_aligned_store_p): Likewise.
13514         (const_load_sequence_p): Add comment to describe the outer-most loop.
13515         (mimic_memory_attributes_and_flags): New function.
13516         (rs6000_gen_stvx): Likewise.
13517         (replace_swapped_aligned_store): Likewise.
13518         (rs6000_gen_lvx): Likewise.
13519         (replace_swapped_aligned_load): Likewise.
13520         (replace_swapped_load_constant): Capitalize argument name in
13521         comment describing this function.
13522         (rs6000_analyze_swaps): Add a third pass to search for vector loads
13523         and stores that access quad-word aligned addresses and replace
13524         with stvx or lvx instructions when appropriate.
13525         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13526         New function prototype.
13527         (rs6000_quadword_masked_address_p): Likewise.
13528         (rs6000_gen_lvx): Likewise.
13529         (rs6000_gen_stvx): Likewise.
13530         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13531         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13532         when memory address is aligned.
13533         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13534         this split to select lvx instruction when memory address is aligned.
13535         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13536         instruction when memory address is aligned.
13537         (*vsx_le_perm_load_v16qi): Likewise.
13538         (four unnamed splitters): Modify to select the stvx instruction
13539         when memory is aligned.
13541 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
13543         * predict.c (determine_unlikely_bbs): Handle correctly BBs
13544         which appears in the queue multiple times.
13546 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13547             Alan Hayward  <alan.hayward@arm.com>
13548             David Sherwood  <david.sherwood@arm.com>
13550         * tree-vectorizer.h (vec_lower_bound): New structure.
13551         (_loop_vec_info): Add check_nonzero and lower_bounds.
13552         (LOOP_VINFO_CHECK_NONZERO): New macro.
13553         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
13554         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
13555         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
13556         fields.  Make seg_len the distance travelled, not including the
13557         access size.
13558         (dr_direction_indicator): Declare.
13559         (dr_zero_step_indicator): Likewise.
13560         (dr_known_forward_stride_p): Likewise.
13561         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
13562         tree-ssanames.h.
13563         (runtime_alias_check_p): Allow runtime alias checks with
13564         variable strides.
13565         (operator ==): Compare access_size and align.
13566         (prune_runtime_alias_test_list): Rework for new distinction between
13567         the access_size and seg_len.
13568         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
13569         segment lengths.
13570         (get_segment_min_max): New function.
13571         (create_intersect_range_checks): Use it.
13572         (dr_step_indicator): New function.
13573         (dr_direction_indicator): Likewise.
13574         (dr_zero_step_indicator): Likewise.
13575         (dr_known_forward_stride_p): Likewise.
13576         * tree-loop-distribution.c (data_ref_segment_size): Return
13577         DR_STEP * (niters - 1).
13578         (compute_alias_check_pairs): Update call to the dr_with_seg_len
13579         constructor.
13580         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
13581         (vect_preserves_scalar_order_p): New function, split out from...
13582         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
13583         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
13584         (vect_vfa_access_size): New function.
13585         (vect_vfa_align): Likewise.
13586         (vect_compile_time_alias): Take access_size_a and access_b arguments.
13587         (dump_lower_bound): New function.
13588         (vect_check_lower_bound): Likewise.
13589         (vect_small_gap_p): Likewise.
13590         (vectorizable_with_step_bound_p): Likewise.
13591         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
13592         depencies if the vectorization factor is 1.  Convert the checks
13593         for nonzero steps into checks on the bounds of DR_STEP.  Try using
13594         a bunds check for variable steps if the minimum required step is
13595         relatively small. Update calls to the dr_with_seg_len
13596         constructor and to vect_compile_time_alias.
13597         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
13598         function.
13599         (vect_loop_versioning): Call it.
13600         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
13601         when retrying.
13602         (vect_estimate_min_profitable_iters): Account for any bounds checks.
13604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13605             Alan Hayward  <alan.hayward@arm.com>
13606             David Sherwood  <david.sherwood@arm.com>
13608         * doc/sourcebuild.texi (vect_scatter_store): Document.
13609         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
13610         optabs.
13611         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
13612         Document.
13613         * genopinit.c (main): Add supports_vec_scatter_store and
13614         supports_vec_scatter_store_cached to target_optabs.
13615         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
13616         IFN_MASK_SCATTER_STORE.
13617         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
13618         functions.
13619         * internal-fn.h (internal_store_fn_p): Declare.
13620         (internal_fn_stored_value_index): Likewise.
13621         * internal-fn.c (scatter_store_direct): New macro.
13622         (expand_scatter_store_optab_fn): New function.
13623         (direct_scatter_store_optab_supported_p): New macro.
13624         (internal_store_fn_p): New function.
13625         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
13626         IFN_MASK_SCATTER_STORE.
13627         (internal_fn_mask_index): Likewise.
13628         (internal_fn_stored_value_index): New function.
13629         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
13630         for scatter stores.
13631         * optabs-query.h (supports_vec_scatter_store_p): Declare.
13632         * optabs-query.c (supports_vec_scatter_store_p): New function.
13633         * tree-vectorizer.h (vect_get_store_rhs): Declare.
13634         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
13635         true for scatter stores.
13636         (vect_gather_scatter_fn_p): Handle scatter stores too.
13637         (vect_check_gather_scatter): Consider using scatter stores if
13638         supports_vec_scatter_store_p.
13639         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
13640         scatter stores too.
13641         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13642         internal_fn_stored_value_index.
13643         (check_load_store_masking): Handle scatter stores too.
13644         (vect_get_store_rhs): Make public.
13645         (vectorizable_call): Use internal_store_fn_p.
13646         (vectorizable_store): Handle scatter store internal functions.
13647         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
13648         when deciding whether the end of the group has been reached.
13649         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
13650         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
13651         (mask_scatter_store<mode>): New insns.
13653 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13654             Alan Hayward  <alan.hayward@arm.com>
13655             David Sherwood  <david.sherwood@arm.com>
13657         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
13658         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
13659         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
13660         function.
13661         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
13662         Use vect_truncate_gather_scatter_offset if we can't treat the
13663         operation as a normal gather load or scatter store.
13664         (get_group_load_store_type): Take the gather_scatter_info
13665         as argument.  Try using a gather load or scatter store for
13666         single-element groups.
13667         (get_load_store_type): Update calls to get_group_load_store_type
13668         and vect_use_strided_gather_scatters_p.
13670 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13671             Alan Hayward  <alan.hayward@arm.com>
13672             David Sherwood  <david.sherwood@arm.com>
13674         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
13675         optional tree argument.
13676         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
13677         null target hooks.
13678         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
13679         but continue to use the current value as a fallback.
13680         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
13681         to compare the updates.
13682         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
13683         (get_load_store_type): Use it when handling a strided access.
13684         (vect_get_strided_load_store_ops): New function.
13685         (vect_get_data_ptr_increment): Likewise.
13686         (vectorizable_load): Handle strided gather loads.  Always pass
13687         a step to vect_create_data_ref_ptr and bump_vector_ptr.
13689 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13690             Alan Hayward  <alan.hayward@arm.com>
13691             David Sherwood  <david.sherwood@arm.com>
13693         * doc/md.texi (gather_load@var{m}): Document.
13694         (mask_gather_load@var{m}): Likewise.
13695         * genopinit.c (main): Add supports_vec_gather_load and
13696         supports_vec_gather_load_cached to target_optabs.
13697         * optabs-tree.c (init_tree_optimization_optabs): Use
13698         ggc_cleared_alloc to allocate target_optabs.
13699         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
13700         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
13701         functions.
13702         * internal-fn.h (internal_load_fn_p): Declare.
13703         (internal_gather_scatter_fn_p): Likewise.
13704         (internal_fn_mask_index): Likewise.
13705         (internal_gather_scatter_fn_supported_p): Likewise.
13706         * internal-fn.c (gather_load_direct): New macro.
13707         (expand_gather_load_optab_fn): New function.
13708         (direct_gather_load_optab_supported_p): New macro.
13709         (direct_internal_fn_optab): New function.
13710         (internal_load_fn_p): Likewise.
13711         (internal_gather_scatter_fn_p): Likewise.
13712         (internal_fn_mask_index): Likewise.
13713         (internal_gather_scatter_fn_supported_p): Likewise.
13714         * optabs-query.c (supports_at_least_one_mode_p): New function.
13715         (supports_vec_gather_load_p): Likewise.
13716         * optabs-query.h (supports_vec_gather_load_p): Declare.
13717         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
13718         and memory_type field.
13719         (NUM_PATTERNS): Bump to 15.
13720         * tree-vect-data-refs.c: Include internal-fn.h.
13721         (vect_gather_scatter_fn_p): New function.
13722         (vect_describe_gather_scatter_call): Likewise.
13723         (vect_check_gather_scatter): Try using internal functions for
13724         gather loads.  Recognize existing calls to a gather load function.
13725         (vect_analyze_data_refs): Consider using gather loads if
13726         supports_vec_gather_load_p.
13727         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
13728         (vect_get_gather_scatter_offset_type): Likewise.
13729         (vect_convert_mask_for_vectype): Likewise.
13730         (vect_add_conversion_to_patterm): Likewise.
13731         (vect_try_gather_scatter_pattern): Likewise.
13732         (vect_recog_gather_scatter_pattern): New pattern recognizer.
13733         (vect_vect_recog_func_ptrs): Add it.
13734         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
13735         internal_fn_mask_index and internal_gather_scatter_fn_p.
13736         (check_load_store_masking): Take the gather_scatter_info as an
13737         argument and handle gather loads.
13738         (vect_get_gather_scatter_ops): New function.
13739         (vectorizable_call): Check internal_load_fn_p.
13740         (vectorizable_load): Likewise.  Handle gather load internal
13741         functions.
13742         (vectorizable_store): Update call to check_load_store_masking.
13743         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
13744         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
13745         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
13746         (aarch64_gather_scale_operand_d): New predicates.
13747         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
13748         (mask_gather_load<mode>): New insns.
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         * optabs.def (fold_left_plus_optab): New optab.
13755         * doc/md.texi (fold_left_plus_@var{m}): Document.
13756         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
13757         * internal-fn.c (fold_left_direct): Define.
13758         (expand_fold_left_optab_fn): Likewise.
13759         (direct_fold_left_optab_supported_p): Likewise.
13760         * fold-const-call.c (fold_const_fold_left): New function.
13761         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
13762         * tree-parloops.c (valid_reduction_p): New function.
13763         (gather_scalar_reductions): Use it.
13764         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
13765         (vect_finish_replace_stmt): Declare.
13766         * tree-vect-loop.c (fold_left_reduction_fn): New function.
13767         (needs_fold_left_reduction_p): New function, split out from...
13768         (vect_is_simple_reduction): ...here.  Accept reductions that
13769         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
13770         (vect_force_simple_reduction): Also store the reduction type in
13771         the assignment's STMT_VINFO_REDUC_TYPE.
13772         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
13773         (merge_with_identity): New function.
13774         (vect_expand_fold_left): Likewise.
13775         (vectorize_fold_left_reduction): Likewise.
13776         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
13777         scalar phi in place for it.  Check for target support and reject
13778         cases that would reassociate the operation.  Defer the transform
13779         phase to vectorize_fold_left_reduction.
13780         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
13781         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
13782         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
13784 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13786         * tree-if-conv.c (predicate_mem_writes): Remove redundant
13787         call to ifc_temp_var.
13789 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13790             Alan Hayward  <alan.hayward@arm.com>
13791             David Sherwood  <david.sherwood@arm.com>
13793         * target.def (legitimize_address_displacement): Take the original
13794         offset as a poly_int.
13795         * targhooks.h (default_legitimize_address_displacement): Update
13796         accordingly.
13797         * targhooks.c (default_legitimize_address_displacement): Likewise.
13798         * doc/tm.texi: Regenerate.
13799         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
13800         as an argument, moving assert of ad->disp == ad->disp_term to...
13801         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
13802         Try calling targetm.legitimize_address_displacement before expanding
13803         the address rather than afterwards, and adjust for the new interface.
13804         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
13805         Match the new hook interface.  Handle SVE addresses.
13806         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
13807         new hook interface.
13809 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13811         * Makefile.in (OBJS): Add early-remat.o.
13812         * target.def (select_early_remat_modes): New hook.
13813         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
13814         * doc/tm.texi: Regenerate.
13815         * targhooks.h (default_select_early_remat_modes): Declare.
13816         * targhooks.c (default_select_early_remat_modes): New function.
13817         * timevar.def (TV_EARLY_REMAT): New timevar.
13818         * passes.def (pass_early_remat): New pass.
13819         * tree-pass.h (make_pass_early_remat): Declare.
13820         * early-remat.c: New file.
13821         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
13822         function.
13823         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
13825 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13826             Alan Hayward  <alan.hayward@arm.com>
13827             David Sherwood  <david.sherwood@arm.com>
13829         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
13830         vfm1 with a bound_epilog parameter.
13831         (vect_do_peeling): Update calls accordingly, and move the prologue
13832         call earlier in the function.  Treat the base bound_epilog as 0 for
13833         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
13834         this base when peeling for gaps.
13835         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
13836         with fully-masked loops.
13837         (vect_estimate_min_profitable_iters): Handle the single peeled
13838         iteration in that case.
13840 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13841             Alan Hayward  <alan.hayward@arm.com>
13842             David Sherwood  <david.sherwood@arm.com>
13844         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
13845         single-element interleaving even if the size is not a power of 2.
13846         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
13847         accesses for single-element interleaving if the group size is
13848         not a power of 2.
13850 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13851             Alan Hayward  <alan.hayward@arm.com>
13852             David Sherwood  <david.sherwood@arm.com>
13854         * doc/md.texi (fold_extract_last_@var{m}): Document.
13855         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
13856         * optabs.def (fold_extract_last_optab): New optab.
13857         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
13858         * internal-fn.c (fold_extract_direct): New macro.
13859         (expand_fold_extract_optab_fn): Likewise.
13860         (direct_fold_extract_optab_supported_p): Likewise.
13861         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
13862         * tree-vect-loop.c (vect_model_reduction_cost): Handle
13863         EXTRACT_LAST_REDUCTION.
13864         (get_initial_def_for_reduction): Do not create an initial vector
13865         for EXTRACT_LAST_REDUCTION reductions.
13866         (vectorizable_reduction): Leave the scalar phi in place for
13867         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
13868         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
13869         epilogue code for EXTRACT_LAST_REDUCTION and defer the
13870         transform phase to vectorizable_condition.
13871         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
13872         split out from...
13873         (vect_finish_stmt_generation): ...here.
13874         (vect_finish_replace_stmt): New function.
13875         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
13876         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
13877         pattern.
13878         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
13880 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13881             Alan Hayward  <alan.hayward@arm.com>
13882             David Sherwood  <david.sherwood@arm.com>
13884         * doc/md.texi (extract_last_@var{m}): Document.
13885         * optabs.def (extract_last_optab): New optab.
13886         * internal-fn.def (EXTRACT_LAST): New internal function.
13887         * internal-fn.c (cond_unary_direct): New macro.
13888         (expand_cond_unary_optab_fn): Likewise.
13889         (direct_cond_unary_optab_supported_p): Likewise.
13890         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
13891         loops using EXTRACT_LAST.
13892         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
13893         (extract_last_<mode>): ...this optab.
13894         (vec_extract<mode><Vel>): Update accordingly.
13896 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13897             Alan Hayward  <alan.hayward@arm.com>
13898             David Sherwood  <david.sherwood@arm.com>
13900         * target.def (empty_mask_is_expensive): New hook.
13901         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
13902         * doc/tm.texi: Regenerate.
13903         * targhooks.h (default_empty_mask_is_expensive): Declare.
13904         * targhooks.c (default_empty_mask_is_expensive): New function.
13905         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
13906         if the target says that empty masks are expensive.
13907         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
13908         New function.
13909         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
13911 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13912             Alan Hayward  <alan.hayward@arm.com>
13913             David Sherwood  <david.sherwood@arm.com>
13915         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
13916         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
13917         (vect_use_loop_mask_for_alignment_p): New function.
13918         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
13919         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
13920         niters_skip argument.  Make sure that the first niters_skip elements
13921         of the first iteration are inactive.
13922         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
13923         Update call to vect_set_loop_masks_directly.
13924         (get_misalign_in_elems): New function, split out from...
13925         (vect_gen_prolog_loop_niters): ...here.
13926         (vect_update_init_of_dr): Take a code argument that specifies whether
13927         the adjustment should be added or subtracted.
13928         (vect_update_init_of_drs): Likewise.
13929         (vect_prepare_for_masked_peels): New function.
13930         (vect_do_peeling): Skip prologue peeling if we're using a mask
13931         instead.  Update call to vect_update_inits_of_drs.
13932         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13933         mask_skip_niters.
13934         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
13935         alignment.  Do not include the number of peeled iterations in
13936         the minimum threshold in that case.
13937         (vectorizable_induction): Adjust the start value down by
13938         LOOP_VINFO_MASK_SKIP_NITERS iterations.
13939         (vect_transform_loop): Call vect_prepare_for_masked_peels.
13940         Take the number of skipped iterations into account when calculating
13941         the loop bounds.
13942         * tree-vect-stmts.c (vect_gen_while_not): New function.
13944 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13945             Alan Hayward  <alan.hayward@arm.com>
13946             David Sherwood  <david.sherwood@arm.com>
13948         * doc/sourcebuild.texi (vect_fully_masked): Document.
13949         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
13950         default value to 0.
13951         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
13952         split out from...
13953         (vect_analyze_loop_2): ...here. Don't check the vectorization
13954         factor against the number of loop iterations if the loop is
13955         fully-masked.
13957 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13958             Alan Hayward  <alan.hayward@arm.com>
13959             David Sherwood  <david.sherwood@arm.com>
13961         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
13962         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
13963         (dump_groups): Update accordingly.
13964         (iv_use::mem_type): New member variable.
13965         (address_p): New function.
13966         (record_use): Add a mem_type argument and initialize the new
13967         mem_type field.
13968         (record_group_use): Add a mem_type argument.  Use address_p.
13969         Remove obsolete null checks of base_object.  Update call to record_use.
13970         (find_interesting_uses_op): Update call to record_group_use.
13971         (find_interesting_uses_cond): Likewise.
13972         (find_interesting_uses_address): Likewise.
13973         (get_mem_type_for_internal_fn): New function.
13974         (find_address_like_use): Likewise.
13975         (find_interesting_uses_stmt): Try find_address_like_use before
13976         calling find_interesting_uses_op.
13977         (addr_offset_valid_p): Use the iv mem_type field as the type
13978         of the addressed memory.
13979         (add_autoinc_candidates): Likewise.
13980         (get_address_cost): Likewise.
13981         (split_small_address_groups_p): Use address_p.
13982         (split_address_groups): Likewise.
13983         (add_iv_candidate_for_use): Likewise.
13984         (autoinc_possible_for_pair): Likewise.
13985         (rewrite_groups): Likewise.
13986         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
13987         (determine_group_iv_cost): Update after split of USE_ADDRESS.
13988         (get_alias_ptr_type_for_ptr_address): New function.
13989         (rewrite_use_address): Rewrite address uses in calls that were
13990         identified by find_address_like_use.
13992 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13993             Alan Hayward  <alan.hayward@arm.com>
13994             David Sherwood  <david.sherwood@arm.com>
13996         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
13997         TARGET_MEM_REFs.
13998         * gimple-expr.h (is_gimple_addressable: Likewise.
13999         * gimple-expr.c (is_gimple_address): Likewise.
14000         * internal-fn.c (expand_call_mem_ref): New function.
14001         (expand_mask_load_optab_fn): Use it.
14002         (expand_mask_store_optab_fn): Likewise.
14004 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14005             Alan Hayward  <alan.hayward@arm.com>
14006             David Sherwood  <david.sherwood@arm.com>
14008         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14009         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14010         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14011         (cond_umax@var{mode}): Document.
14012         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14013         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14014         (cond_umin_optab, cond_umax_optab): New optabs.
14015         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14016         (COND_IOR, COND_XOR): New internal functions.
14017         * internal-fn.h (get_conditional_internal_fn): Declare.
14018         * internal-fn.c (cond_binary_direct): New macro.
14019         (expand_cond_binary_optab_fn): Likewise.
14020         (direct_cond_binary_optab_supported_p): Likewise.
14021         (get_conditional_internal_fn): New function.
14022         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14023         Cope with reduction statements that are vectorized as calls rather
14024         than assignments.
14025         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14026         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14027         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14028         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14029         (UNSPEC_COND_EOR): New unspecs.
14030         (optab): Add mappings for them.
14031         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14032         (sve_int_op, sve_fp_op): New int attributes.
14034 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14035             Alan Hayward  <alan.hayward@arm.com>
14036             David Sherwood  <david.sherwood@arm.com>
14038         * optabs.def (while_ult_optab): New optab.
14039         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14040         * internal-fn.def (WHILE_ULT): New internal function.
14041         * internal-fn.h (direct_internal_fn_supported_p): New override
14042         that takes two types as argument.
14043         * internal-fn.c (while_direct): New macro.
14044         (expand_while_optab_fn): New function.
14045         (convert_optab_supported_p): Likewise.
14046         (direct_while_optab_supported_p): New macro.
14047         * wide-int.h (wi::udiv_ceil): New function.
14048         * tree-vectorizer.h (rgroup_masks): New structure.
14049         (vec_loop_masks): New typedef.
14050         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14051         and fully_masked_p.
14052         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14053         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14054         (vect_max_vf): New function.
14055         (slpeel_make_loop_iterate_ntimes): Delete.
14056         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14057         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14058         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14059         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14060         internal-fn.h, stor-layout.h and optabs-query.h.
14061         (vect_set_loop_mask): New function.
14062         (add_preheader_seq): Likewise.
14063         (add_header_seq): Likewise.
14064         (interleave_supported_p): Likewise.
14065         (vect_maybe_permute_loop_masks): Likewise.
14066         (vect_set_loop_masks_directly): Likewise.
14067         (vect_set_loop_condition_masked): Likewise.
14068         (vect_set_loop_condition_unmasked): New function, split out from
14069         slpeel_make_loop_iterate_ntimes.
14070         (slpeel_make_loop_iterate_ntimes): Rename to..
14071         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14072         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14073         (vect_do_peeling): Update call accordingly.
14074         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14075         loops.
14076         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14077         mask_compare_type, can_fully_mask_p and fully_masked_p.
14078         (release_vec_loop_masks): New function.
14079         (_loop_vec_info): Use it to free the loop masks.
14080         (can_produce_all_loop_masks_p): New function.
14081         (vect_get_max_nscalars_per_iter): Likewise.
14082         (vect_verify_full_masking): Likewise.
14083         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14084         retries, and free the mask rgroups before retrying.  Check loop-wide
14085         reasons for disallowing fully-masked loops.  Make the final decision
14086         about whether use a fully-masked loop or not.
14087         (vect_estimate_min_profitable_iters): Do not assume that peeling
14088         for the number of iterations will be needed for fully-masked loops.
14089         (vectorizable_reduction): Disable fully-masked loops.
14090         (vectorizable_live_operation): Likewise.
14091         (vect_halve_mask_nunits): New function.
14092         (vect_double_mask_nunits): Likewise.
14093         (vect_record_loop_mask): Likewise.
14094         (vect_get_loop_mask): Likewise.
14095         (vect_transform_loop): Handle the case in which the final loop
14096         iteration might handle a partial vector.  Call vect_set_loop_condition
14097         instead of slpeel_make_loop_iterate_ntimes.
14098         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14099         (check_load_store_masking): New function.
14100         (prepare_load_store_mask): Likewise.
14101         (vectorizable_store): Handle fully-masked loops.
14102         (vectorizable_load): Likewise.
14103         (supportable_widening_operation): Use vect_halve_mask_nunits for
14104         booleans.
14105         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14106         (vect_gen_while): New function.
14107         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14108         (aarch64_uqdec<mode>): New insn.
14110 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14111             Alan Hayward  <alan.hayward@arm.com>
14112             David Sherwood  <david.sherwood@arm.com>
14114         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14115         (reduc_xor_scal_optab): New optabs.
14116         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14117         (reduc_xor_scal_@var{m}): Document.
14118         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14119         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14120         internal functions.
14121         * fold-const-call.c (fold_const_call): Handle them.
14122         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14123         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14124         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14125         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14126         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14127         (UNSPEC_XORV): New unspecs.
14128         (optab): Add entries for them.
14129         (BITWISEV): New int iterator.
14130         (bit_reduc_op): New int attributes.
14132 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14133             Alan Hayward  <alan.hayward@arm.com>
14134             David Sherwood  <david.sherwood@arm.com>
14136         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14137         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14138         * optabs.def (vec_shl_insert_optab): New optab.
14139         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14140         (duplicate_and_interleave): Likewise.
14141         * tree-vect-loop.c: Include internal-fn.h.
14142         (neutral_op_for_slp_reduction): New function, split out from
14143         get_initial_defs_for_reduction.
14144         (get_initial_def_for_reduction): Handle option 2 for variable-length
14145         vectors by loading the neutral value into a vector and then shifting
14146         the initial value into element 0.
14147         (get_initial_defs_for_reduction): Replace the code argument with
14148         the neutral value calculated by neutral_op_for_slp_reduction.
14149         Use gimple_build_vector for constant-length vectors.
14150         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14151         but the first group_size elements have a neutral value.
14152         Use duplicate_and_interleave otherwise.
14153         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14154         Update call to get_initial_defs_for_reduction.  Handle SLP
14155         reductions for variable-length vectors by creating one vector
14156         result for each scalar result, with the elements associated
14157         with other scalar results stubbed out with the neutral value.
14158         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14159         Require IFN_VEC_SHL_INSERT for double reductions on
14160         variable-length vectors, or SLP reductions that have
14161         a neutral value.  Require can_duplicate_and_interleave_p
14162         support for variable-length unchained SLP reductions if there
14163         is no neutral value, such as for MIN/MAX reductions.  Also require
14164         the number of vector elements to be a multiple of the number of
14165         SLP statements when doing variable-length unchained SLP reductions.
14166         Update call to vect_create_epilog_for_reduction.
14167         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14168         and remove initial values.
14169         (duplicate_and_interleave): Make public.
14170         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14171         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14173 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14174             Alan Hayward  <alan.hayward@arm.com>
14175             David Sherwood  <david.sherwood@arm.com>
14177         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14178         (can_duplicate_and_interleave_p): New function.
14179         (vect_get_and_check_slp_defs): Take the vector of statements
14180         rather than just the current one.  Remove excess parentheses.
14181         Restriction rejectinon of vect_constant_def and vect_external_def
14182         for variable-length vectors to boolean types, or types for which
14183         can_duplicate_and_interleave_p is false.
14184         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14185         (duplicate_and_interleave): New function.
14186         (vect_get_constant_vectors): Use gimple_build_vector for
14187         constant-length vectors and suitable variable-length constant
14188         vectors.  Use duplicate_and_interleave for other variable-length
14189         vectors.  Don't defer the update when inserting new statements.
14191 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14192             Alan Hayward  <alan.hayward@arm.com>
14193             David Sherwood  <david.sherwood@arm.com>
14195         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14196         min_profitable_iters doesn't go negative.
14198 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14199             Alan Hayward  <alan.hayward@arm.com>
14200             David Sherwood  <david.sherwood@arm.com>
14202         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14203         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14204         * optabs.def (vec_mask_load_lanes_optab): New optab.
14205         (vec_mask_store_lanes_optab): Likewise.
14206         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14207         (MASK_STORE_LANES): Likewise.
14208         * internal-fn.c (mask_load_lanes_direct): New macro.
14209         (mask_store_lanes_direct): Likewise.
14210         (expand_mask_load_optab_fn): Handle masked operations.
14211         (expand_mask_load_lanes_optab_fn): New macro.
14212         (expand_mask_store_optab_fn): Handle masked operations.
14213         (expand_mask_store_lanes_optab_fn): New macro.
14214         (direct_mask_load_lanes_optab_supported_p): Likewise.
14215         (direct_mask_store_lanes_optab_supported_p): Likewise.
14216         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14217         parameter.
14218         (vect_load_lanes_supported): Likewise.
14219         * tree-vect-data-refs.c (strip_conversion): New function.
14220         (can_group_stmts_p): Likewise.
14221         (vect_analyze_data_ref_accesses): Use it instead of checking
14222         for a pair of assignments.
14223         (vect_store_lanes_supported): Take a masked_p parameter.
14224         (vect_load_lanes_supported): Likewise.
14225         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14226         vect_store_lanes_supported and vect_load_lanes_supported.
14227         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14228         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14229         parameter.  Don't allow gaps for masked accesses.
14230         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14231         and vect_load_lanes_supported.
14232         (get_load_store_type): Take a masked_p parameter and update
14233         call to get_group_load_store_type.
14234         (vectorizable_store): Update call to get_load_store_type.
14235         Handle IFN_MASK_STORE_LANES.
14236         (vectorizable_load): Update call to get_load_store_type.
14237         Handle IFN_MASK_LOAD_LANES.
14239 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14240             Alan Hayward  <alan.hayward@arm.com>
14241             David Sherwood  <david.sherwood@arm.com>
14243         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14244         modes for SVE.
14245         * config/aarch64/aarch64-protos.h
14246         (aarch64_sve_struct_memory_operand_p): Declare.
14247         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14248         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14249         (VPRED, vpred): Handle SVE structure modes.
14250         * config/aarch64/constraints.md (Utx): New constraint.
14251         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14252         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14253         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14254         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14255         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14256         structure modes.  Split into pieces after RA.
14257         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14258         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14259         New patterns.
14260         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14261         SVE structure modes.
14262         (aarch64_classify_address): Likewise.
14263         (sizetochar): Move earlier in file.
14264         (aarch64_print_operand): Handle SVE register lists.
14265         (aarch64_array_mode): New function.
14266         (aarch64_sve_struct_memory_operand_p): Likewise.
14267         (TARGET_ARRAY_MODE): Redefine.
14269 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14270             Alan Hayward  <alan.hayward@arm.com>
14271             David Sherwood  <david.sherwood@arm.com>
14273         * target.def (array_mode): New target hook.
14274         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14275         * doc/tm.texi: Regenerate.
14276         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14277         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14278         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14279         targetm.array_mode.
14280         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14281         type sizes.
14283 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14284             Alan Hayward  <alan.hayward@arm.com>
14285             David Sherwood  <david.sherwood@arm.com>
14287         * fold-const.c (fold_binary_loc): Check the argument types
14288         rather than the result type when testing for a vector operation.
14290 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14292         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14293         * doc/tm.texi: Regenerate.
14295 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14296             Alan Hayward  <alan.hayward@arm.com>
14297             David Sherwood  <david.sherwood@arm.com>
14299         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14300         (sve): Document new AArch64 extension.
14301         * doc/md.texi (w): Extend the description of the AArch64
14302         constraint to include SVE vectors.
14303         (Upl, Upa): Document new AArch64 predicate constraints.
14304         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14305         enum.
14306         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14307         (msve-vector-bits=): New option.
14308         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14309         SVE when these are disabled.
14310         (sve): New extension.
14311         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14312         modes.  Adjust their number of units based on aarch64_sve_vg.
14313         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14314         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14315         aarch64_addr_query_type.
14316         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14317         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14318         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14319         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14320         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14321         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14322         (aarch64_simd_imm_zero_p): Delete.
14323         (aarch64_check_zero_based_sve_index_immediate): Declare.
14324         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14325         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14326         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14327         (aarch64_sve_float_mul_immediate_p): Likewise.
14328         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14329         rather than an rtx.
14330         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14331         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14332         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14333         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14334         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14335         (aarch64_regmode_natural_size): Likewise.
14336         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14337         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14338         left one place.
14339         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14340         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14341         for VG and the SVE predicate registers.
14342         (V_ALIASES): Add a "z"-prefixed alias.
14343         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14344         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14345         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14346         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14347         (REG_CLASS_NAMES): Add entries for them.
14348         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14349         and the predicate registers.
14350         (aarch64_sve_vg): Declare.
14351         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14352         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14353         (REGMODE_NATURAL_SIZE): Define.
14354         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14355         SVE macros.
14356         * config/aarch64/aarch64.c: Include cfgrtl.h.
14357         (simd_immediate_info): Add a constructor for series vectors,
14358         and an associated step field.
14359         (aarch64_sve_vg): New variable.
14360         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14361         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14362         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14363         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14364         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14365         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14366         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14367         (aarch64_get_mask_mode): New functions.
14368         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14369         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14370         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14371         predicate modes and predicate registers.  Explicitly restrict
14372         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14373         to store a vector mode if it is recognized by
14374         aarch64_classify_vector_mode.
14375         (aarch64_regmode_natural_size): New function.
14376         (aarch64_hard_regno_caller_save_mode): Return the original mode
14377         for predicates.
14378         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14379         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14380         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14381         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14382         functions.
14383         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14384         does not overlap dest if the function is frame-related.  Handle
14385         SVE constants.
14386         (aarch64_split_add_offset): New function.
14387         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14388         them aarch64_add_offset.
14389         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14390         and update call to aarch64_sub_sp.
14391         (aarch64_add_cfa_expression): New function.
14392         (aarch64_expand_prologue): Pass extra temporary registers to the
14393         functions above.  Handle the case in which we need to emit new
14394         DW_CFA_expressions for registers that were originally saved
14395         relative to the stack pointer, but now have to be expressed
14396         relative to the frame pointer.
14397         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14398         functions above.
14399         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14400         IP0 and IP1 values for SVE frames.
14401         (aarch64_expand_vec_series): New function.
14402         (aarch64_expand_sve_widened_duplicate): Likewise.
14403         (aarch64_expand_sve_const_vector): Likewise.
14404         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14405         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14406         into the register, rather than emitting a SET directly.
14407         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14408         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14409         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14410         (offset_9bit_signed_scaled_p): New functions.
14411         (aarch64_replicate_bitmask_imm): New function.
14412         (aarch64_bitmask_imm): Use it.
14413         (aarch64_cannot_force_const_mem): Reject expressions involving
14414         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14415         (aarch64_classify_index): Handle SVE indices, by requiring
14416         a plain register index with a scale that matches the element size.
14417         (aarch64_classify_address): Handle SVE addresses.  Assert that
14418         the mode of the address is VOIDmode or an integer mode.
14419         Update call to aarch64_classify_symbol.
14420         (aarch64_classify_symbolic_expression): Update call to
14421         aarch64_classify_symbol.
14422         (aarch64_const_vec_all_in_range_p): New function.
14423         (aarch64_print_vector_float_operand): Likewise.
14424         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14425         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14426         and the FP immediates 1.0 and 0.5.
14427         (aarch64_print_address_internal): Handle SVE addresses.
14428         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14429         (aarch64_regno_regclass): Handle predicate registers.
14430         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14431         data modes.
14432         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14433         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14434         (aarch64_convert_sve_vector_bits): New function.
14435         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14436         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14437         rather than an rtx.
14438         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14439         Handle SVE vector and predicate modes.  Accept VL-based constants
14440         that need only one temporary register, and VL offsets that require
14441         no temporary registers.
14442         (aarch64_conditional_register_usage): Mark the predicate registers
14443         as fixed if SVE isn't available.
14444         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14445         Return true for SVE vector and predicate modes.
14446         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14447         rather than an unsigned int.  Handle SVE modes.
14448         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14449         SVE modes.
14450         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14451         if SVE is enabled.
14452         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14453         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14454         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14455         (aarch64_sve_float_mul_immediate_p): New functions.
14456         (aarch64_sve_valid_immediate): New function.
14457         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14458         Explicitly reject structure modes.  Check for INDEX constants.
14459         Handle PTRUE and PFALSE constants.
14460         (aarch64_check_zero_based_sve_index_immediate): New function.
14461         (aarch64_simd_imm_zero_p): Delete.
14462         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14463         vector modes.  Accept constants in the range of CNT[BHWD].
14464         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14465         ask for an Advanced SIMD mode.
14466         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14467         (aarch64_simd_vector_alignment): Handle SVE predicates.
14468         (aarch64_vectorize_preferred_vector_alignment): New function.
14469         (aarch64_simd_vector_alignment_reachable): Use it instead of
14470         the vector size.
14471         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14472         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14473         functions.
14474         (MAX_VECT_LEN): Delete.
14475         (expand_vec_perm_d): Add a vec_flags field.
14476         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14477         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14478         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14479         for SVE modes.
14480         (aarch64_evpc_rev): Rename to...
14481         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14482         (aarch64_evpc_rev_global): New function.
14483         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14484         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14485         MAX_VECT_LEN.
14486         (aarch64_evpc_sve_tbl): New function.
14487         (aarch64_expand_vec_perm_const_1): Update after rename of
14488         aarch64_evpc_rev.  Handle SVE permutes too, trying
14489         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14490         than aarch64_evpc_tbl.
14491         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14492         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14493         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14494         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14495         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14496         (aarch64_expand_sve_vcond): New functions.
14497         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14498         of aarch64_vector_mode_p.
14499         (aarch64_dwarf_poly_indeterminate_value): New function.
14500         (aarch64_compute_pressure_classes): Likewise.
14501         (aarch64_can_change_mode_class): Likewise.
14502         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14503         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14504         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14505         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14506         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14507         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14508         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14509         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14510         constraints.
14511         (Dn, Dl, Dr): Accept const as well as const_vector.
14512         (Dz): Likewise.  Compare against CONST0_RTX.
14513         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14514         of "vector" where appropriate.
14515         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14516         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14517         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14518         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14519         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14520         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14521         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14522         (v_int_equiv): Extend to SVE modes.
14523         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14524         mode attributes.
14525         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14526         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14527         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14528         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14529         (SVE_COND_FP_CMP): New int iterators.
14530         (perm_hilo): Handle the new unpack unspecs.
14531         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14532         attributes.
14533         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14534         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14535         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14536         (aarch64_equality_operator, aarch64_constant_vector_operand)
14537         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14538         (aarch64_sve_nonimmediate_operand): Likewise.
14539         (aarch64_sve_general_operand): Likewise.
14540         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14541         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14542         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14543         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14544         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14545         (aarch64_sve_float_arith_immediate): Likewise.
14546         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14547         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14548         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
14549         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
14550         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
14551         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
14552         (aarch64_sve_float_arith_operand): Likewise.
14553         (aarch64_sve_float_arith_with_sub_operand): Likewise.
14554         (aarch64_sve_float_mul_operand): Likewise.
14555         (aarch64_sve_vec_perm_operand): Likewise.
14556         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
14557         (aarch64_mov_operand): Accept const_poly_int and const_vector.
14558         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
14559         as well as const_vector.
14560         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
14561         in file.  Use CONST0_RTX and CONSTM1_RTX.
14562         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
14563         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
14564         Use aarch64_simd_imm_zero.
14565         * config/aarch64/aarch64-sve.md: New file.
14566         * config/aarch64/aarch64.md: Include it.
14567         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
14568         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
14569         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
14570         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
14571         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
14572         (sve): New attribute.
14573         (enabled): Disable instructions with the sve attribute unless
14574         TARGET_SVE.
14575         (movqi, movhi): Pass CONST_POLY_INT operaneds through
14576         aarch64_expand_mov_immediate.
14577         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
14578         CNT[BHSD] immediates.
14579         (movti): Split CONST_POLY_INT moves into two halves.
14580         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
14581         Split additions that need a temporary here if the destination
14582         is the stack pointer.
14583         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
14584         (*add<mode>3_poly_1): New instruction.
14585         (set_clobber_cc): New expander.
14587 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14589         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
14590         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
14591         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
14592         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
14593         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
14594         Change innermode from fixed_mode_size to machine_mode.
14595         (simplify_subreg): Update call accordingly.  Handle a constant-sized
14596         subreg of a variable-length CONST_VECTOR.
14598 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14599             Alan Hayward  <alan.hayward@arm.com>
14600             David Sherwood  <david.sherwood@arm.com>
14602         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
14603         (add_offset_to_base): New function, split out from...
14604         (create_mem_ref): ...here.  When handling a scale other than 1,
14605         check first whether the address is valid without the offset.
14606         Add it into the base if so, leaving the index and scale as-is.
14608 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14610         PR c++/83778
14611         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
14612         fold_for_warn before checking if arg2 is INTEGER_CST.
14614 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
14616         * config/rs6000/predicates.md (load_multiple_operation): Delete.
14617         (store_multiple_operation): Delete.
14618         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
14619         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
14620         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
14621         guarded by TARGET_STRING.
14622         (rs6000_output_load_multiple): Delete.
14623         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
14624         OPTION_MASK_STRING / TARGET_STRING handling.
14625         (print_operand) <'N', 'O'>: Add comment that these are unused now.
14626         (const rs6000_opt_masks) <"string">: Change mask to 0.
14627         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
14628         (MASK_STRING): Delete.
14629         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
14630         parts.  Simplify.
14631         (load_multiple): Delete.
14632         (*ldmsi8): Delete.
14633         (*ldmsi7): Delete.
14634         (*ldmsi6): Delete.
14635         (*ldmsi5): Delete.
14636         (*ldmsi4): Delete.
14637         (*ldmsi3): Delete.
14638         (store_multiple): Delete.
14639         (*stmsi8): Delete.
14640         (*stmsi7): Delete.
14641         (*stmsi6): Delete.
14642         (*stmsi5): Delete.
14643         (*stmsi4): Delete.
14644         (*stmsi3): Delete.
14645         (movmemsi_8reg): Delete.
14646         (corresponding unnamed define_insn): Delete.
14647         (movmemsi_6reg): Delete.
14648         (corresponding unnamed define_insn): Delete.
14649         (movmemsi_4reg): Delete.
14650         (corresponding unnamed define_insn): Delete.
14651         (movmemsi_2reg): Delete.
14652         (corresponding unnamed define_insn): Delete.
14653         (movmemsi_1reg): Delete.
14654         (corresponding unnamed define_insn): Delete.
14655         * config/rs6000/rs6000.opt (mno-string): New.
14656         (mstring): Replace by deprecation warning stub.
14657         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
14659 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
14661         * regrename.c (regrename_do_replace): If replacing the same
14662         reg multiple times, try to reuse last created gen_raw_REG.
14664         PR debug/81155
14665         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
14666         main to workaround a bug in GDB.
14668 2018-01-12  Tom de Vries  <tom@codesourcery.com>
14670         PR target/83737
14671         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
14673 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
14675         PR rtl-optimization/80481
14676         * ira-color.c (get_cap_member): New function.
14677         (allocnos_conflict_by_live_ranges_p): Use it.
14678         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
14679         (setup_slot_coalesced_allocno_live_ranges): Ditto.
14681 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
14683         PR target/83628
14684         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
14685         (*saddl_se_1): Ditto.
14686         (*ssubsi_1): Ditto.
14687         (*ssubl_se_1): Ditto.
14689 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14691         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
14692         rather than wi::to_widest for DR_INITs.
14693         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
14694         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
14695         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
14696         INTEGER_CSTs.
14697         (vect_analyze_group_access_1): Note that here.
14699 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14701         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
14702         polynomial type sizes.
14704 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
14706         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
14707         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
14708         (gimple_add_tmp_var): Likewise.
14710 2018-01-12  Martin Liska  <mliska@suse.cz>
14712         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
14713         (gimple_alloc_sizes): Likewise.
14714         (dump_gimple_statistics): Use PRIu64 in printf format.
14715         * gimple.h: Change uint64_t to int.
14717 2018-01-12  Martin Liska  <mliska@suse.cz>
14719         * tree-core.h: Use uint64_t instead of int.
14720         * tree.c (tree_node_counts): Likewise.
14721         (tree_node_sizes): Likewise.
14722         (dump_tree_statistics): Use PRIu64 in printf format.
14724 2018-01-12  Martin Liska  <mliska@suse.cz>
14726         * Makefile.in: As qsort_chk is implemented in vec.c, add
14727         vec.o to linkage of gencfn-macros.
14728         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
14729         passing the info to record_node_allocation_statistics.
14730         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
14731         and pass the info.
14732         * ggc-common.c (struct ggc_usage): Add operator== and use
14733         it in operator< and compare function.
14734         * mem-stats.h (struct mem_usage): Likewise.
14735         * vec.c (struct vec_usage): Remove operator< and compare
14736         function. Can be simply inherited.
14738 2018-01-12  Martin Jambor  <mjambor@suse.cz>
14740         PR target/81616
14741         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
14742         * tree-ssa-math-opts.c: Include domwalk.h.
14743         (convert_mult_to_fma_1): New function.
14744         (fma_transformation_info): New type.
14745         (fma_deferring_state): Likewise.
14746         (cancel_fma_deferring): New function.
14747         (result_of_phi): Likewise.
14748         (last_fma_candidate_feeds_initial_phi): Likewise.
14749         (convert_mult_to_fma): Added deferring logic, split actual
14750         transformation to convert_mult_to_fma_1.
14751         (math_opts_dom_walker): New type.
14752         (math_opts_dom_walker::after_dom_children): New method, body moved
14753         here from pass_optimize_widening_mul::execute, added deferring logic
14754         bits.
14755         (pass_optimize_widening_mul::execute): Moved most of code to
14756         math_opts_dom_walker::after_dom_children.
14757         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
14758         * config/i386/i386.c (ix86_option_override_internal): Added
14759         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
14761 2018-01-12  Richard Biener  <rguenther@suse.de>
14763         PR debug/83157
14764         * dwarf2out.c (gen_variable_die): Do not reset old_die for
14765         inline instance vars.
14767 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
14769         PR target/81819
14770         * config/rx/rx.c (rx_is_restricted_memory_address):
14771         Handle SUBREG case.
14773 2018-01-12  Richard Biener  <rguenther@suse.de>
14775         PR tree-optimization/80846
14776         * target.def (split_reduction): New target hook.
14777         * targhooks.c (default_split_reduction): New function.
14778         * targhooks.h (default_split_reduction): Declare.
14779         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
14780         target requests first reduce vectors by combining low and high
14781         parts.
14782         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
14783         (get_vectype_for_scalar_type_and_size): Export.
14784         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
14785         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
14786         * doc/tm.texi: Regenerate.
14787         * config/i386/i386.c (ix86_split_reduction): Implement
14788         TARGET_VECTORIZE_SPLIT_REDUCTION.
14790 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14792         PR target/83368
14793         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
14794         in PIC mode except for TARGET_VXWORKS_RTP.
14795         * config/sparc/sparc.c: Include cfgrtl.h.
14796         (TARGET_INIT_PIC_REG): Define.
14797         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
14798         (sparc_pic_register_p): New predicate.
14799         (sparc_legitimate_address_p): Use it.
14800         (sparc_legitimize_pic_address): Likewise.
14801         (sparc_delegitimize_address): Likewise.
14802         (sparc_mode_dependent_address_p): Likewise.
14803         (gen_load_pcrel_sym): Remove 4th parameter.
14804         (load_got_register): Adjust call to above.  Remove obsolete stuff.
14805         (sparc_expand_prologue): Do not call load_got_register here.
14806         (sparc_flat_expand_prologue): Likewise.
14807         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
14808         (sparc_use_pseudo_pic_reg): New function.
14809         (sparc_init_pic_reg): Likewise.
14810         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
14811         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
14813 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
14815         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
14816         Add item for branch_cost.
14818 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14820         PR rtl-optimization/83565
14821         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
14822         not extend the result to a larger mode for rotate operations.
14823         (num_sign_bit_copies1): Likewise.
14825 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14827         PR target/40411
14828         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
14829         -symbolic.
14830         Use values-Xc.o for -pedantic.
14831         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
14833 2018-01-12  Martin Liska  <mliska@suse.cz>
14835         PR ipa/83054
14836         * ipa-devirt.c (final_warning_record::grow_type_warnings):
14837         New function.
14838         (possible_polymorphic_call_targets): Use it.
14839         (ipa_devirt): Likewise.
14841 2018-01-12  Martin Liska  <mliska@suse.cz>
14843         * profile-count.h (enum profile_quality): Use 0 as invalid
14844         enum value of profile_quality.
14846 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14848         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
14849         -mext-string options.
14851 2018-01-12  Richard Biener  <rguenther@suse.de>
14853         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
14854         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
14855         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
14856         Likewise.
14857         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
14859 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
14861         * configure.ac (--with-long-double-format): Add support for the
14862         configuration option to change the default long double format on
14863         PowerPC systems.
14864         * config.gcc (powerpc*-linux*-*): Likewise.
14865         * configure: Regenerate.
14866         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
14867         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
14868         used without modification.
14870 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14872         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
14873         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
14874         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
14875         MISC_BUILTIN_SPEC_BARRIER.
14876         (rs6000_init_builtins): Likewise.
14877         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
14878         enum value.
14879         (speculation_barrier): New define_insn.
14880         * doc/extend.texi: Document __builtin_speculation_barrier.
14882 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14884         PR target/83203
14885         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
14886         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
14887         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
14888         iterators.
14889         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
14890         integral modes instead of "ss" and "sd".
14891         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
14892         vectors with 32-bit and 64-bit elements.
14893         (vecdupssescalarmodesuffix): New mode attribute.
14894         (vec_dup<mode>): Use it.
14896 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
14898         PR target/83330
14899         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
14900         frame if argument is passed on stack.
14902 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
14904         PR target/82682
14905         * ree.c (combine_reaching_defs): Optimize also
14906         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
14907         reg2=any_extend(exp); reg1=reg2;, formatting fix.
14909 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14911         PR middle-end/83189
14912         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
14914 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
14916         PR middle-end/83718
14917         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
14918         after they are computed.
14920 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
14922         PR tree-optimization/83695
14923         * gimple-loop-linterchange.cc
14924         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
14925         reset cached scev information after interchange.
14926         (pass_linterchange::execute): Remove call to scev_reset_htab.
14928 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14930         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
14931         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
14932         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
14933         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
14934         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
14935         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
14936         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
14937         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
14938         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
14939         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
14940         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
14941         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
14942         (V_lane_reg): Likewise.
14943         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
14944         New define_expand.
14945         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
14946         (vfmal_lane_low<mode>_intrinsic,
14947         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
14948         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
14949         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
14950         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
14951         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
14952         vfmsl_lane_high<mode>_intrinsic): New define_insns.
14954 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14956         * config/arm/arm-cpus.in (fp16fml): New feature.
14957         (ALL_SIMD): Add fp16fml.
14958         (armv8.2-a): Add fp16fml as an option.
14959         (armv8.3-a): Likewise.
14960         (armv8.4-a): Add fp16fml as part of fp16.
14961         * config/arm/arm.h (TARGET_FP16FML): Define.
14962         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
14963         when appropriate.
14964         * config/arm/arm-modes.def (V2HF): Define.
14965         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
14966         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
14967         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
14968         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
14969         vfmsl_low, vfmsl_high): New set of builtins.
14970         * config/arm/iterators.md (PLUSMINUS): New code iterator.
14971         (vfml_op): New code attribute.
14972         (VFMLHALVES): New int iterator.
14973         (VFML, VFMLSEL): New mode attributes.
14974         (V_reg): Define mapping for V2HF.
14975         (V_hi, V_lo): New mode attributes.
14976         (VF_constraint): Likewise.
14977         (vfml_half, vfml_half_selector): New int attributes.
14978         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
14979         define_expand.
14980         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
14981         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
14982         New define_insn.
14983         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
14984         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
14985         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
14986         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
14987         documentation.
14988         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
14989         Document new effective target and option set.
14991 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14993         * config/arm/arm-cpus.in (armv8_4): New feature.
14994         (ARMv8_4a): New fgroup.
14995         (armv8.4-a): New arch.
14996         * config/arm/arm-tables.opt: Regenerate.
14997         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
14998         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
14999         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15000         Add matching rules for -march=armv8.4-a and extensions.
15001         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15003 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
15005         PR target/81821
15006         * config/rx/rx.md (BW): New mode attribute.
15007         (sync_lock_test_and_setsi): Add mode suffix to insn output.
15009 2018-01-11  Richard Biener  <rguenther@suse.de>
15011         PR tree-optimization/83435
15012         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15013         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15014         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15016 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15017             Alan Hayward  <alan.hayward@arm.com>
15018             David Sherwood  <david.sherwood@arm.com>
15020         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15021         field.
15022         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
15023         (aarch64_print_address_internal): Use it to check for a zero offset.
15025 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15026             Alan Hayward  <alan.hayward@arm.com>
15027             David Sherwood  <david.sherwood@arm.com>
15029         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15030         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15031         Return a poly_int64 rather than a HOST_WIDE_INT.
15032         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15033         rather than a HOST_WIDE_INT.
15034         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15035         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15036         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15037         final_offset from HOST_WIDE_INT to poly_int64.
15038         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15039         to_constant when getting the number of units in an Advanced SIMD
15040         mode.
15041         (aarch64_builtin_vectorized_function): Check for a constant number
15042         of units.
15043         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15044         GET_MODE_SIZE.
15045         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15046         attribute instead of GET_MODE_NUNITS.
15047         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15048         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15049         GET_MODE_SIZE for fixed-size registers.
15050         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15051         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15052         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15053         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15054         (aarch64_print_operand, aarch64_print_address_internal)
15055         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15056         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15057         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15058         Handle polynomial GET_MODE_SIZE.
15059         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15060         wider than SImode without modification.
15061         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15062         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15063         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15064         passing and returning SVE modes.
15065         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15066         rather than GEN_INT.
15067         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15068         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15069         (aarch64_allocate_and_probe_stack_space): Likewise.
15070         (aarch64_layout_frame): Cope with polynomial offsets.
15071         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15072         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15073         polynomial offsets.
15074         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15075         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15076         poly_int64 rather than a HOST_WIDE_INT.
15077         (aarch64_get_separate_components, aarch64_process_components)
15078         (aarch64_expand_prologue, aarch64_expand_epilogue)
15079         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15080         (aarch64_anchor_offset): New function, split out from...
15081         (aarch64_legitimize_address): ...here.
15082         (aarch64_builtin_vectorization_cost): Handle polynomial
15083         TYPE_VECTOR_SUBPARTS.
15084         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15085         GET_MODE_NUNITS.
15086         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15087         number of elements from the PARALLEL rather than the mode.
15088         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15089         rather than GET_MODE_BITSIZE.
15090         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15091         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15092         (aarch64_expand_vec_perm_const_1): Handle polynomial
15093         d->perm.length () and d->perm elements.
15094         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15095         Apply to_constant to d->perm elements.
15096         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15097         polynomial CONST_VECTOR_NUNITS.
15098         (aarch64_move_pointer): Take amount as a poly_int64 rather
15099         than an int.
15100         (aarch64_progress_pointer): Avoid temporary variable.
15101         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15102         the mode attribute instead of GET_MODE.
15104 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15105             Alan Hayward  <alan.hayward@arm.com>
15106             David Sherwood  <david.sherwood@arm.com>
15108         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15109         x exists before using it.
15110         (aarch64_add_constant_internal): Rename to...
15111         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15112         src and dest rtxes.  Handle the case in which they're different,
15113         including when the offset is zero.  Replace scratchreg with an rtx.
15114         Use 2 additions if there is no spare register into which we can
15115         move a 16-bit constant.
15116         (aarch64_add_constant): Delete.
15117         (aarch64_add_offset): Replace reg with separate src and dest
15118         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15119         Use aarch64_add_offset_1.
15120         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15121         an rtx rather than an int.  Take the delta as a poly_int64
15122         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15123         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15124         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15125         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15126         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15127         and aarch64_add_sp.
15128         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15129         aarch64_add_constant.
15131 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15133         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15134         Use scalar_float_mode.
15136 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15138         * config/aarch64/aarch64-simd.md
15139         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15140         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15141         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15142         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15143         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15144         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15145         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15146         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15147         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15148         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15150 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15152         PR target/83514
15153         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15154         targ_options->x_arm_arch_string is non NULL.
15156 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15158         * config/aarch64/aarch64.h
15159         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15161 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15163         PR target/82096
15164         * expmed.c (emit_store_flag_force): Swap if const op0
15165         and change VOIDmode to mode of op0.
15167 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15169         PR rtl-optimization/83761
15170         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15171         than bytes to mode_for_size.
15173 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15175         PR middle-end/83189
15176         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15177         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15178         profile.
15180 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15182         PR middle-end/83575
15183         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15184         when in layout mode.
15185         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15186         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15187         partition fixup.
15189 2018-01-10  Michael Collison  <michael.collison@arm.com>
15191         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15192         * config/aarch64/aarch64-option-extension.def: Add
15193         AARCH64_OPT_EXTENSION of 'fp16fml'.
15194         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15195         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15196         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15197         * config/aarch64/constraints.md (Ui7): New constraint.
15198         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15199         (VFMLA_SEL_W): Ditto.
15200         (f16quad): Ditto.
15201         (f16mac1): Ditto.
15202         (VFMLA16_LOW): New int iterator.
15203         (VFMLA16_HIGH): Ditto.
15204         (UNSPEC_FMLAL): New unspec.
15205         (UNSPEC_FMLSL): Ditto.
15206         (UNSPEC_FMLAL2): Ditto.
15207         (UNSPEC_FMLSL2): Ditto.
15208         (f16mac): New code attribute.
15209         * config/aarch64/aarch64-simd-builtins.def
15210         (aarch64_fmlal_lowv2sf): Ditto.
15211         (aarch64_fmlsl_lowv2sf): Ditto.
15212         (aarch64_fmlalq_lowv4sf): Ditto.
15213         (aarch64_fmlslq_lowv4sf): Ditto.
15214         (aarch64_fmlal_highv2sf): Ditto.
15215         (aarch64_fmlsl_highv2sf): Ditto.
15216         (aarch64_fmlalq_highv4sf): Ditto.
15217         (aarch64_fmlslq_highv4sf): Ditto.
15218         (aarch64_fmlal_lane_lowv2sf): Ditto.
15219         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15220         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15221         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15222         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15223         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15224         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15225         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15226         (aarch64_fmlal_lane_highv2sf): Ditto.
15227         (aarch64_fmlsl_lane_highv2sf): Ditto.
15228         (aarch64_fmlal_laneq_highv2sf): Ditto.
15229         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15230         (aarch64_fmlalq_lane_highv4sf): Ditto.
15231         (aarch64_fmlsl_lane_highv4sf): Ditto.
15232         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15233         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15234         * config/aarch64/aarch64-simd.md:
15235         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15236         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15237         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15238         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15239         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15240         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15241         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15242         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15243         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15244         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15245         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15246         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15247         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15248         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15249         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15250         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15251         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15252         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15253         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15254         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15255         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15256         (vfmlsl_low_u32): Ditto.
15257         (vfmlalq_low_u32): Ditto.
15258         (vfmlslq_low_u32): Ditto.
15259         (vfmlal_high_u32): Ditto.
15260         (vfmlsl_high_u32): Ditto.
15261         (vfmlalq_high_u32): Ditto.
15262         (vfmlslq_high_u32): Ditto.
15263         (vfmlal_lane_low_u32): Ditto.
15264         (vfmlsl_lane_low_u32): Ditto.
15265         (vfmlal_laneq_low_u32): Ditto.
15266         (vfmlsl_laneq_low_u32): Ditto.
15267         (vfmlalq_lane_low_u32): Ditto.
15268         (vfmlslq_lane_low_u32): Ditto.
15269         (vfmlalq_laneq_low_u32): Ditto.
15270         (vfmlslq_laneq_low_u32): Ditto.
15271         (vfmlal_lane_high_u32): Ditto.
15272         (vfmlsl_lane_high_u32): Ditto.
15273         (vfmlal_laneq_high_u32): Ditto.
15274         (vfmlsl_laneq_high_u32): Ditto.
15275         (vfmlalq_lane_high_u32): Ditto.
15276         (vfmlslq_lane_high_u32): Ditto.
15277         (vfmlalq_laneq_high_u32): Ditto.
15278         (vfmlslq_laneq_high_u32): Ditto.
15279         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15280         (AARCH64_FL_FOR_ARCH8_4): New.
15281         (AARCH64_ISA_F16FML): New ISA flag.
15282         (TARGET_F16FML): New feature flag for fp16fml.
15283         (doc/invoke.texi): Document new fp16fml option.
15285 2018-01-10  Michael Collison  <michael.collison@arm.com>
15287         * config/aarch64/aarch64-builtins.c:
15288         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15289         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15290         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15291         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15292         (AARCH64_ISA_SHA3): New ISA flag.
15293         (TARGET_SHA3): New feature flag for sha3.
15294         * config/aarch64/iterators.md (sha512_op): New int attribute.
15295         (CRYPTO_SHA512): New int iterator.
15296         (UNSPEC_SHA512H): New unspec.
15297         (UNSPEC_SHA512H2): Ditto.
15298         (UNSPEC_SHA512SU0): Ditto.
15299         (UNSPEC_SHA512SU1): Ditto.
15300         * config/aarch64/aarch64-simd-builtins.def
15301         (aarch64_crypto_sha512hqv2di): New builtin.
15302         (aarch64_crypto_sha512h2qv2di): Ditto.
15303         (aarch64_crypto_sha512su0qv2di): Ditto.
15304         (aarch64_crypto_sha512su1qv2di): Ditto.
15305         (aarch64_eor3qv8hi): Ditto.
15306         (aarch64_rax1qv2di): Ditto.
15307         (aarch64_xarqv2di): Ditto.
15308         (aarch64_bcaxqv8hi): Ditto.
15309         * config/aarch64/aarch64-simd.md:
15310         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15311         (aarch64_crypto_sha512su0qv2di): Ditto.
15312         (aarch64_crypto_sha512su1qv2di): Ditto.
15313         (aarch64_eor3qv8hi): Ditto.
15314         (aarch64_rax1qv2di): Ditto.
15315         (aarch64_xarqv2di): Ditto.
15316         (aarch64_bcaxqv8hi): Ditto.
15317         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15318         (vsha512h2q_u64): Ditto.
15319         (vsha512su0q_u64): Ditto.
15320         (vsha512su1q_u64): Ditto.
15321         (veor3q_u16): Ditto.
15322         (vrax1q_u64): Ditto.
15323         (vxarq_u64): Ditto.
15324         (vbcaxq_u16): Ditto.
15325         * config/arm/types.md (crypto_sha512): New type attribute.
15326         (crypto_sha3): Ditto.
15327         (doc/invoke.texi): Document new sha3 option.
15329 2018-01-10  Michael Collison  <michael.collison@arm.com>
15331         * config/aarch64/aarch64-builtins.c:
15332         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15333         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15334         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15335         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15336         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15337         (AARCH64_ISA_SM4): New ISA flag.
15338         (TARGET_SM4): New feature flag for sm4.
15339         * config/aarch64/aarch64-simd-builtins.def
15340         (aarch64_sm3ss1qv4si): Ditto.
15341         (aarch64_sm3tt1aq4si): Ditto.
15342         (aarch64_sm3tt1bq4si): Ditto.
15343         (aarch64_sm3tt2aq4si): Ditto.
15344         (aarch64_sm3tt2bq4si): Ditto.
15345         (aarch64_sm3partw1qv4si): Ditto.
15346         (aarch64_sm3partw2qv4si): Ditto.
15347         (aarch64_sm4eqv4si): Ditto.
15348         (aarch64_sm4ekeyqv4si): Ditto.
15349         * config/aarch64/aarch64-simd.md:
15350         (aarch64_sm3ss1qv4si): Ditto.
15351         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15352         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15353         (aarch64_sm4eqv4si): Ditto.
15354         (aarch64_sm4ekeyqv4si): Ditto.
15355         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15356         (sm3part_op): Ditto.
15357         (CRYPTO_SM3TT): Ditto.
15358         (CRYPTO_SM3PART): Ditto.
15359         (UNSPEC_SM3SS1): New unspec.
15360         (UNSPEC_SM3TT1A): Ditto.
15361         (UNSPEC_SM3TT1B): Ditto.
15362         (UNSPEC_SM3TT2A): Ditto.
15363         (UNSPEC_SM3TT2B): Ditto.
15364         (UNSPEC_SM3PARTW1): Ditto.
15365         (UNSPEC_SM3PARTW2): Ditto.
15366         (UNSPEC_SM4E): Ditto.
15367         (UNSPEC_SM4EKEY): Ditto.
15368         * config/aarch64/constraints.md (Ui2): New constraint.
15369         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15370         * config/arm/types.md (crypto_sm3): New type attribute.
15371         (crypto_sm4): Ditto.
15372         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15373         (vsm3tt1aq_u32): Ditto.
15374         (vsm3tt1bq_u32): Ditto.
15375         (vsm3tt2aq_u32): Ditto.
15376         (vsm3tt2bq_u32): Ditto.
15377         (vsm3partw1q_u32): Ditto.
15378         (vsm3partw2q_u32): Ditto.
15379         (vsm4eq_u32): Ditto.
15380         (vsm4ekeyq_u32): Ditto.
15381         (doc/invoke.texi): Document new sm4 option.
15383 2018-01-10  Michael Collison  <michael.collison@arm.com>
15385         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15386         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15387         (AARCH64_FL_FOR_ARCH8_4): New.
15388         (AARCH64_FL_V8_4): New flag.
15389         (doc/invoke.texi): Document new armv8.4-a option.
15391 2018-01-10  Michael Collison  <michael.collison@arm.com>
15393         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15394         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15395         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15396         * config/aarch64/aarch64-option-extension.def: Add
15397         AARCH64_OPT_EXTENSION of 'sha2'.
15398         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15399         (crypto): Disable sha2 and aes if crypto disabled.
15400         (crypto): Enable aes and sha2 if enabled.
15401         (simd): Disable sha2 and aes if simd disabled.
15402         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15403         New flags.
15404         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15405         (TARGET_SHA2): New feature flag for sha2.
15406         (TARGET_AES): New feature flag for aes.
15407         * config/aarch64/aarch64-simd.md:
15408         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15409         conditional on TARGET_AES.
15410         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15411         (aarch64_crypto_sha1hsi): Make pattern conditional
15412         on TARGET_SHA2.
15413         (aarch64_crypto_sha1hv4si): Ditto.
15414         (aarch64_be_crypto_sha1hv4si): Ditto.
15415         (aarch64_crypto_sha1su1v4si): Ditto.
15416         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15417         (aarch64_crypto_sha1su0v4si): Ditto.
15418         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15419         (aarch64_crypto_sha256su0v4si): Ditto.
15420         (aarch64_crypto_sha256su1v4si): Ditto.
15421         (doc/invoke.texi): Document new aes and sha2 options.
15423 2018-01-10  Martin Sebor  <msebor@redhat.com>
15425         PR tree-optimization/83781
15426         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15427         as string arrays.
15429 2018-01-11  Martin Sebor  <msebor@gmail.com>
15430             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15432         PR tree-optimization/83501
15433         PR tree-optimization/81703
15435         * tree-ssa-strlen.c (get_string_cst): Rename...
15436         (get_string_len): ...to this.  Handle global constants.
15437         (handle_char_store): Adjust.
15439 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15440             Jim Wilson  <jimw@sifive.com>
15442         * config/riscv/riscv-protos.h (riscv_output_return): New.
15443         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15444         (riscv_attribute_table, riscv_output_return),
15445         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15446         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15447         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15448         function.
15449         (riscv_expand_prologue): Add early return for naked function.
15450         (riscv_expand_epilogue): Likewise.
15451         (riscv_function_ok_for_sibcall): Return false for naked function.
15452         (riscv_set_current_function): New.
15453         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15454         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15455         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15456         * doc/extend.texi (RISC-V Function Attributes): New.
15458 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15460         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15461         check for 128-bit long double before checking TCmode.
15462         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15463         128-bit long doubles before checking TFmode or TCmode.
15464         (FLOAT128_IBM_P): Likewise.
15466 2018-01-10  Martin Sebor  <msebor@redhat.com>
15468         PR tree-optimization/83671
15469         * builtins.c (c_strlen): Unconditionally return zero for the empty
15470         string.
15471         Use -Warray-bounds for warnings.
15472         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15473         for non-constant array indices with COMPONENT_REF, arrays of
15474         arrays, and pointers to arrays.
15475         (gimple_fold_builtin_strlen): Determine and set length range for
15476         non-constant character arrays.
15478 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15480         PR middle-end/81897
15481         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15482         empty blocks.
15484 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15486         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15488 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15490         PR target/83399
15491         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15492         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15493         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15494         indexed_or_indirect_operand predicate.
15495         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15496         (*vsx_le_perm_load_v8hi): Likewise.
15497         (*vsx_le_perm_load_v16qi): Likewise.
15498         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15499         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15500         (*vsx_le_perm_store_v8hi): Likewise.
15501         (*vsx_le_perm_store_v16qi): Likewise.
15502         (eight unnamed splitters): Likewise.
15504 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15506         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15507         * config/rs6000/emmintrin.h: Likewise.
15508         * config/rs6000/mmintrin.h: Likewise.
15509         * config/rs6000/xmmintrin.h: Likewise.
15511 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
15513         PR c++/43486
15514         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15515         "public_flag".
15516         * tree.c (tree_nop_conversion): Return true for location wrapper
15517         nodes.
15518         (maybe_wrap_with_location): New function.
15519         (selftest::check_strip_nops): New function.
15520         (selftest::test_location_wrappers): New function.
15521         (selftest::tree_c_tests): Call it.
15522         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15523         (maybe_wrap_with_location): New decl.
15524         (EXPR_LOCATION_WRAPPER_P): New macro.
15525         (location_wrapper_p): New inline function.
15526         (tree_strip_any_location_wrapper): New inline function.
15528 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
15530         PR target/83735
15531         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15532         stack_realign_offset for the largest alignment of stack slot
15533         actually used.
15534         (ix86_find_max_used_stack_alignment): New function.
15535         (ix86_finalize_stack_frame_flags): Use it.  Set
15536         max_used_stack_alignment if we don't realign stack.
15537         * config/i386/i386.h (machine_function): Add
15538         max_used_stack_alignment.
15540 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
15542         * config/arm/arm.opt (-mbranch-cost): New option.
15543         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15544         account.
15546 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
15548         PR target/83629
15549         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
15550         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
15552 2018-01-10  Richard Biener  <rguenther@suse.de>
15554         PR debug/83765
15555         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
15556         early out so it also covers the case where we have a non-NULL
15557         origin.
15559 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15561         PR tree-optimization/83753
15562         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
15563         for non-strided grouped accesses if the number of elements is 1.
15565 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15567         PR target/81616
15568         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
15569         * i386.h (TARGET_USE_GATHER): Define.
15570         * x86-tune.def (X86_TUNE_USE_GATHER): New.
15572 2018-01-10  Martin Liska  <mliska@suse.cz>
15574         PR bootstrap/82831
15575         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
15576         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
15577         partitioning.
15578         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
15579         CLEANUP_NO_PARTITIONING is not set.
15581 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
15583         * doc/rtl.texi: Remove documentation of (const ...) wrappers
15584         for vectors, as a partial revert of r254296.
15585         * rtl.h (const_vec_p): Delete.
15586         (const_vec_duplicate_p): Don't test for vector CONSTs.
15587         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
15588         * expmed.c (make_tree): Likewise.
15590         Revert:
15591         * common.md (E, F): Use CONSTANT_P instead of checking for
15592         CONST_VECTOR.
15593         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
15594         checking for CONST_VECTOR.
15596 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15598         PR middle-end/83575
15599         * predict.c (force_edge_cold): Handle in more sane way edges
15600         with no prediction.
15602 2018-01-09  Carl Love  <cel@us.ibm.com>
15604         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
15605         V4SI, V4SF types.
15606         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
15607         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
15608         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
15609         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
15610         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
15611         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
15612         * config/rs6000/rs6000-protos.h: Add extern defition for
15613         rs6000_generate_float2_double_code.
15614         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
15615         function.
15616         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
15617         (float2_v2df): Add define_expand.
15619 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
15621         PR target/83628
15622         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
15623         op_mode in the force_to_mode call.
15625 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15627         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
15628         instead of checking each element individually.
15629         (aarch64_evpc_uzp): Likewise.
15630         (aarch64_evpc_zip): Likewise.
15631         (aarch64_evpc_ext): Likewise.
15632         (aarch64_evpc_rev): Likewise.
15633         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
15634         instead of checking each element individually.  Return true without
15635         generating rtl if
15636         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
15637         whether all selected elements come from the same input, instead of
15638         checking each element individually.  Remove calls to gen_rtx_REG,
15639         start_sequence and end_sequence and instead assert that no rtl is
15640         generated.
15642 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15644         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
15645         order of HIGH and CONST checks.
15647 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
15649         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
15650         if the destination isn't an SSA_NAME.
15652 2018-01-09  Richard Biener  <rguenther@suse.de>
15654         PR tree-optimization/83668
15655         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
15656         move prologue...
15657         (canonicalize_loop_form): ... here, renamed from ...
15658         (canonicalize_loop_closed_ssa_form): ... this and amended to
15659         swap successor edges for loop exit blocks to make us use
15660         the RPO order we need for initial schedule generation.
15662 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
15664         PR tree-optimization/64811
15665         * match.pd: When optimizing comparisons with Inf, avoid
15666         introducing or losing exceptions from comparisons with NaN.
15668 2018-01-09  Martin Liska  <mliska@suse.cz>
15670         PR sanitizer/82517
15671         * asan.c (shadow_mem_size): Add gcc_assert.
15673 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
15675         Don't save registers in main().
15677         PR target/83738
15678         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
15679         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
15680         * config/avr/avr.c (avr_set_current_function): Don't error if
15681         naked, OS_task or OS_main are specified at the same time.
15682         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
15683         OS_main.
15684         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
15685         attribute.
15686         * common/config/avr/avr-common.c (avr_option_optimization_table):
15687         Switch on -mmain-is-OS_task for optimizing compilations.
15689 2018-01-09  Richard Biener  <rguenther@suse.de>
15691         PR tree-optimization/83572
15692         * graphite.c: Include cfganal.h.
15693         (graphite_transform_loops): Connect infinite loops to exit
15694         and remove fake edges at the end.
15696 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15698         * ipa-inline.c (edge_badness): Revert accidental checkin.
15700 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
15702         PR ipa/80763
15703         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
15704         symbols; not inline clones.
15706 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
15708         PR target/83507
15709         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
15710         hard registers.  Formatting fixes.
15712         PR preprocessor/83722
15713         * gcc.c (try_generate_repro): Pass
15714         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
15715         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
15716         do_report_bug.
15718 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
15719             Kito Cheng  <kito.cheng@gmail.com>
15721         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
15722         (riscv_leaf_function_p): Delete.
15723         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
15725 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15727         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
15728         function.
15729         (do_ifelse): New function.
15730         (do_isel): New function.
15731         (do_sub3): New function.
15732         (do_add3): New function.
15733         (do_load_mask_compare): New function.
15734         (do_overlap_load_compare): New function.
15735         (expand_compare_loop): New function.
15736         (expand_block_compare): Call expand_compare_loop() when appropriate.
15737         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
15738         option description.
15739         (-mblock-compare-inline-loop-limit): New option.
15741 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15743         PR target/83677
15744         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
15745         Reverse order of second and third operands in first alternative.
15746         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
15747         of first and second elements in UNSPEC_VPERMR vector.
15748         (altivec_expand_vec_perm_le): Likewise.
15750 2018-01-08  Jeff Law  <law@redhat.com>
15752         PR rtl-optimizatin/81308
15753         * tree-switch-conversion.c (cfg_altered): New file scoped static.
15754         (process_switch): If group_case_labels makes a change, then set
15755         cfg_altered.
15756         (pass_convert_switch::execute): If a switch is converted, then
15757         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
15759         PR rtl-optimization/81308
15760         * recog.c (split_all_insns): Conditionally cleanup the CFG after
15761         splitting insns.
15763 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
15765         PR target/83663 - Revert r255946
15766         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
15767         generation for cases where splatting a value is not useful.
15768         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
15769         across a vec_duplicate and a paradoxical subreg forming a vector
15770         mode to a vec_concat.
15772 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15774         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
15775         -march=armv8.3-a variants.
15776         * config/arm/t-multilib: Likewise.
15777         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
15779 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15781         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
15782         to generate rtl.
15783         (cceq_ior_compare_complement): Give it a name so I can use it, and
15784         change boolean_or_operator predicate to boolean_operator so it can
15785         be used to generate a crand.
15786         (eqne): New code iterator.
15787         (bd/bd_neg): New code_attrs.
15788         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
15789         a single define_insn.
15790         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
15791         decrement (bdnzt/bdnzf/bdzt/bdzf).
15792         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
15793         with the new names of the branch decrement patterns, and added the
15794         names of the branch decrement conditional patterns.
15796 2018-01-08  Richard Biener  <rguenther@suse.de>
15798         PR tree-optimization/83563
15799         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
15800         cache.
15802 2018-01-08  Richard Biener  <rguenther@suse.de>
15804         PR middle-end/83713
15805         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
15807 2018-01-08  Richard Biener  <rguenther@suse.de>
15809         PR tree-optimization/83685
15810         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
15811         references to abnormals.
15813 2018-01-08  Richard Biener  <rguenther@suse.de>
15815         PR lto/83719
15816         * dwarf2out.c (output_indirect_strings): Handle empty
15817         skeleton_debug_str_hash.
15818         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
15820 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15822         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
15823         (emit_store_direct): Likewise.
15824         (arc_trampoline_adjust_address): Likewise.
15825         (arc_asm_trampoline_template): New function.
15826         (arc_initialize_trampoline): Use asm_trampoline_template.
15827         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
15828         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
15829         * config/arc/arc.md (flush_icache): Delete pattern.
15831 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
15833         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
15834         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
15835         munaligned-access.
15837 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15839         PR target/83681
15840         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
15841         by not USED_FOR_TARGET.
15842         (make_pass_resolve_sw_modes): Likewise.
15844 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15846         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
15847         USED_FOR_TARGET.
15849 2018-01-08  Richard Biener  <rguenther@suse.de>
15851         PR middle-end/83580
15852         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
15854 2018-01-08  Richard Biener  <rguenther@suse.de>
15856         PR middle-end/83517
15857         * match.pd ((t * 2) / 2) -> t): Add missing :c.
15859 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
15861         PR middle-end/81897
15862         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
15863         basic blocks with a small number of successors.
15864         (convert_control_dep_chain_into_preds): Improve handling of
15865         forwarder blocks.
15866         (dump_predicates): Split apart into...
15867         (dump_pred_chain): ...here...
15868         (dump_pred_info): ...and here.
15869         (can_one_predicate_be_invalidated_p): Add debugging printfs.
15870         (can_chain_union_be_invalidated_p): Improve check for invalidation
15871         of paths.
15872         (uninit_uses_cannot_happen): Avoid unnecessary if
15873         convert_control_dep_chain_into_preds yielded nothing.
15875 2018-01-06  Martin Sebor  <msebor@redhat.com>
15877         PR tree-optimization/83640
15878         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
15879         subtracting negative offset from size.
15880         (builtin_access::overlap): Adjust offset bounds of the access to fall
15881         within the size of the object if possible.
15883 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
15885         PR rtl-optimization/83699
15886         * expmed.c (extract_bit_field_1): Restrict the vector usage of
15887         extract_bit_field_as_subreg to cases in which the extracted
15888         value is also a vector.
15890         * lra-constraints.c (process_alt_operands): Test for the equivalence
15891         substitutions when detecting a possible reload cycle.
15893 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
15895         PR debug/83480
15896         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
15897         by default if flag_selective_schedling{,2}.  Formatting fixes.
15899         PR rtl-optimization/83682
15900         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
15901         if it has non-VECTOR_MODE element mode.
15902         (vec_duplicate_p): Likewise.
15904         PR middle-end/83694
15905         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
15906         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
15908 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15910         PR target/83604
15911         * config/i386/i386-builtin.def
15912         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
15913         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
15914         Require also OPTION_MASK_ISA_AVX512F in addition to
15915         OPTION_MASK_ISA_GFNI.
15916         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
15917         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
15918         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
15919         to OPTION_MASK_ISA_GFNI.
15920         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
15921         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
15922         OPTION_MASK_ISA_AVX512BW.
15923         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
15924         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
15925         addition to OPTION_MASK_ISA_GFNI.
15926         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
15927         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
15928         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
15929         to OPTION_MASK_ISA_GFNI.
15930         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
15931         a requirement for all ISAs rather than any of them with a few
15932         exceptions.
15933         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
15934         processing.
15935         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
15936         bitmasks to be enabled with 3 exceptions, instead of requiring any
15937         enabled ISA with lots of exceptions.
15938         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
15939         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
15940         Change avx512bw in isa attribute to avx512f.
15941         * config/i386/sgxintrin.h: Add license boilerplate.
15942         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
15943         to __AVX512F__ and __AVX512VL to __AVX512VL__.
15944         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
15945         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
15946         defined.
15947         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
15948         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
15949         temporarily sse2 rather than sse if not enabled already.
15951         PR target/83604
15952         * config/i386/sse.md (VI248_VLBW): Rename to ...
15953         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
15954         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
15955         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
15956         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
15957         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
15958         mode iterator instead of VI248_VLBW.
15960 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
15962         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
15963         (record_modified): Skip clobbers; add debug output.
15964         (param_change_prob): Use sreal frequencies.
15966 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15968         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
15969         punt for user-aligned variables.
15971 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
15973         * tree-chrec.c (chrec_contains_symbols): Return true for
15974         POLY_INT_CST.
15976 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
15978         PR target/82439
15979         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
15980         of (x|y) == x for BICS pattern.
15982 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
15984         PR tree-optimization/83605
15985         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
15986         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
15987         can throw.
15989 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15991         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
15992         * config/epiphany/rtems.h: New file.
15994 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
15995             Uros Bizjak  <ubizjak@gmail.com>
15997         PR target/83554
15998         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
15999         QIreg_operand instead of register_operand predicate.
16000         * config/i386/i386.c (ix86_rop_should_change_byte_p,
16001         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16002         comments instead of -fmitigate[-_]rop.
16004 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16006         PR bootstrap/81926
16007         * cgraphunit.c (symbol_table::compile): Switch to text_section
16008         before calling assembly_start debug hook.
16009         * run-rtl-passes.c (run_rtl_passes): Likewise.
16010         Include output.h.
16012 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16014         * tree-vrp.c (extract_range_from_binary_expr_1): Check
16015         range_int_cst_p rather than !symbolic_range_p before calling
16016         extract_range_from_multiplicative_op_1.
16018 2018-01-04  Jeff Law  <law@redhat.com>
16020         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16021         redundant test in assertion.
16023 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16025         * doc/rtl.texi: Document machine_mode wrapper classes.
16027 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16029         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16030         using tree_to_uhwi.
16032 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16034         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16035         the VEC_PERM_EXPR fold to fail.
16037 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16039         PR debug/83585
16040         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16041         to switched_sections.
16043 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16045         PR target/83680
16046         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16047         test for d.testing.
16049 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16051         PR target/83387
16052         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16053         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16055 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16057         PR debug/83666
16058         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16059         is BLKmode and bitpos not zero or mode change is needed.
16061 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16063         PR target/83675
16064         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16065         TARGET_VIS2.
16067 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16069         PR target/83628
16070         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16071         instead of MULT rtx.  Update all corresponding splitters.
16072         (*saddl_se): Ditto.
16073         (*ssub<modesuffix>): Ditto.
16074         (*ssubl_se): Ditto.
16075         (*cmp_sadd_di): Update split patterns.
16076         (*cmp_sadd_si): Ditto.
16077         (*cmp_sadd_sidi): Ditto.
16078         (*cmp_ssub_di): Ditto.
16079         (*cmp_ssub_si): Ditto.
16080         (*cmp_ssub_sidi): Ditto.
16081         * config/alpha/predicates.md (const23_operand): New predicate.
16082         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16083         Look for ASHIFT, not MULT inner operand.
16084         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16086 2018-01-04  Martin Liska  <mliska@suse.cz>
16088         PR gcov-profile/83669
16089         * gcov.c (output_intermediate_file): Add version to intermediate
16090         gcov file.
16091         * doc/gcov.texi: Document new field 'version' in intermediate
16092         file format. Fix location of '-k' option of gcov command.
16094 2018-01-04  Martin Liska  <mliska@suse.cz>
16096         PR ipa/82352
16097         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16099 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16101         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16103 2018-01-03  Martin Sebor  <msebor@redhat.com>
16105         PR tree-optimization/83655
16106         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16107         checking calls with invalid arguments.
16109 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16111         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16112         (vectorizable_mask_load_store): Delete.
16113         (vectorizable_call): Return false for masked loads and stores.
16114         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16115         instead of gimple_assign_rhs1.
16116         (vectorizable_load): Handle IFN_MASK_LOAD.
16117         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16119 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16121         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16122         split out from..,
16123         (vectorizable_mask_load_store): ...here.
16124         (vectorizable_load): ...and here.
16126 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16128         * tree-vect-stmts.c (vect_build_all_ones_mask)
16129         (vect_build_zero_merge_argument): New functions, split out from...
16130         (vectorizable_load): ...here.
16132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16134         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16135         split out from...
16136         (vectorizable_mask_load_store): ...here.
16137         (vectorizable_store): ...and here.
16139 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16141         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16142         split out from...
16143         (vectorizable_mask_load_store): ...here.
16145 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16147         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16148         (vect_model_store_cost): Take a vec_load_store_type instead of a
16149         vect_def_type.
16150         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16151         (vect_model_store_cost): Take a vec_load_store_type instead of a
16152         vect_def_type.
16153         (vectorizable_mask_load_store): Update accordingly.
16154         (vectorizable_store): Likewise.
16155         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16159         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16160         IFN_MASK_LOAD calls here rather than...
16161         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16164             Alan Hayward  <alan.hayward@arm.com>
16165             David Sherwood  <david.sherwood@arm.com>
16167         * expmed.c (extract_bit_field_1): For vector extracts,
16168         fall back to extract_bit_field_as_subreg if vec_extract
16169         isn't available.
16171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16172             Alan Hayward  <alan.hayward@arm.com>
16173             David Sherwood  <david.sherwood@arm.com>
16175         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16176         they are variable or constant sized.
16177         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16178         slots for constant-sized data.
16180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16181             Alan Hayward  <alan.hayward@arm.com>
16182             David Sherwood  <david.sherwood@arm.com>
16184         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16185         handling COND_EXPRs with boolean comparisons, try to find a better
16186         basis for the mask type than the boolean itself.
16188 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16190         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16191         is calculated and how it can be overridden.
16192         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16193         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16194         if defined.
16195         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16196         if nonzero.
16198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16199             Alan Hayward  <alan.hayward@arm.com>
16200             David Sherwood  <david.sherwood@arm.com>
16202         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16203         Remove the mode argument.
16204         (aarch64_simd_valid_immediate): Remove the mode and inverse
16205         arguments.
16206         * config/aarch64/iterators.md (bitsize): New iterator.
16207         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16208         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16209         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16210         aarch64_simd_valid_immediate.
16211         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16212         (aarch64_reg_or_bic_imm): Likewise.
16213         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16214         with an insn_type enum and msl with a modifier_type enum.
16215         Replace element_width with a scalar_mode.  Change the shift
16216         to unsigned int.  Add constructors for scalar_float_mode and
16217         scalar_int_mode elements.
16218         (aarch64_vect_float_const_representable_p): Delete.
16219         (aarch64_can_const_movi_rtx_p)
16220         (aarch64_simd_scalar_immediate_valid_for_move)
16221         (aarch64_simd_make_constant): Update call to
16222         aarch64_simd_valid_immediate.
16223         (aarch64_advsimd_valid_immediate_hs): New function.
16224         (aarch64_advsimd_valid_immediate): Likewise.
16225         (aarch64_simd_valid_immediate): Remove mode and inverse
16226         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16227         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16228         and aarch64_float_const_representable_p on the result.
16229         (aarch64_output_simd_mov_immediate): Remove mode argument.
16230         Update call to aarch64_simd_valid_immediate and use of
16231         simd_immediate_info.
16232         (aarch64_output_scalar_simd_mov_immediate): Update call
16233         accordingly.
16235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16236             Alan Hayward  <alan.hayward@arm.com>
16237             David Sherwood  <david.sherwood@arm.com>
16239         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16240         (mode_nunits): Likewise CONST_MODE_NUNITS.
16241         * machmode.def (ADJUST_NUNITS): Document.
16242         * genmodes.c (mode_data::need_nunits_adj): New field.
16243         (blank_mode): Update accordingly.
16244         (adj_nunits): New variable.
16245         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16246         parameter.
16247         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16248         listed in adj_nunits.
16249         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16250         listed in adj_nunits.  Don't emit case statements for such modes.
16251         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16252         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16253         nothing if adj_nunits is nonnull.
16254         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16255         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16256         (emit_mode_fbit): Update use of print_maybe_const_decl.
16257         (emit_move_size): Likewise.  Treat the array as non-const
16258         if adj_nunits.
16259         (emit_mode_adjustments): Handle adj_nunits.
16261 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16263         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16264         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16265         (VECTOR_MODES): Use it.
16266         (make_vector_modes): Take the prefix as an argument.
16268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16269             Alan Hayward  <alan.hayward@arm.com>
16270             David Sherwood  <david.sherwood@arm.com>
16272         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16273         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16274         for MODE_VECTOR_BOOL.
16275         * machmode.def (VECTOR_BOOL_MODE): Document.
16276         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16277         (make_vector_bool_mode): New function.
16278         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16279         MODE_VECTOR_BOOL.
16280         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16281         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16282         Likewise.
16283         * stor-layout.c (int_mode_for_mode): Likewise.
16284         * tree.c (build_vector_type_for_mode): Likewise.
16285         * varasm.c (output_constant_pool_2): Likewise.
16286         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16287         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16288         for MODE_VECTOR_BOOL.
16289         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16290         of mode class checks.
16291         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16292         instead of a list of mode class checks.
16293         (expand_vector_scalar_condition): Likewise.
16294         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16297             Alan Hayward  <alan.hayward@arm.com>
16298             David Sherwood  <david.sherwood@arm.com>
16300         * machmode.h (mode_size): Change from unsigned short to
16301         poly_uint16_pod.
16302         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16303         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16304         or if measurement_type is not polynomial.
16305         (fixed_size_mode::includes_p): Check for constant-sized modes.
16306         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16307         return a poly_uint16 rather than an unsigned short.
16308         (emit_mode_size): Change the type of mode_size from unsigned short
16309         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16310         (emit_mode_adjustments): Cope with polynomial vector sizes.
16311         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16312         for GET_MODE_SIZE.
16313         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16314         for GET_MODE_SIZE.
16315         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16316         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16317         * caller-save.c (setup_save_areas): Likewise.
16318         (replace_reg_with_saved_mem): Likewise.
16319         * calls.c (emit_library_call_value_1): Likewise.
16320         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16321         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16322         (gen_lowpart_for_combine): Likewise.
16323         * convert.c (convert_to_integer_1): Likewise.
16324         * cse.c (equiv_constant, cse_insn): Likewise.
16325         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16326         (cselib_subst_to_values): Likewise.
16327         * dce.c (word_dce_process_block): Likewise.
16328         * df-problems.c (df_word_lr_mark_ref): Likewise.
16329         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16330         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16331         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16332         (rtl_for_decl_location): Likewise.
16333         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16334         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16335         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16336         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16337         (expand_expr_real_1): Likewise.
16338         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16339         (pad_below): Likewise.
16340         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16341         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16342         * ira.c (get_subreg_tracking_sizes): Likewise.
16343         * ira-build.c (ira_create_allocno_objects): Likewise.
16344         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16345         (ira_sort_regnos_for_alter_reg): Likewise.
16346         * ira-costs.c (record_operand_costs): Likewise.
16347         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16348         (resolve_simple_move): Likewise.
16349         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16350         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16351         (lra_constraints): Likewise.
16352         (CONST_POOL_OK_P): Reject variable-sized modes.
16353         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16354         (add_pseudo_to_slot, lra_spill): Likewise.
16355         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16356         * optabs-query.c (get_best_extraction_insn): Likewise.
16357         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16358         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16359         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16360         * recog.c (offsettable_address_addr_space_p): Likewise.
16361         * regcprop.c (maybe_mode_change): Likewise.
16362         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16363         * regrename.c (build_def_use): Likewise.
16364         * regstat.c (dump_reg_info): Likewise.
16365         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16366         (find_reloads, find_reloads_subreg_address): Likewise.
16367         * reload1.c (eliminate_regs_1): Likewise.
16368         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16369         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16370         (simplify_binary_operation_1, simplify_subreg): Likewise.
16371         * targhooks.c (default_function_arg_padding): Likewise.
16372         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16373         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16374         (verify_gimple_assign_ternary): Likewise.
16375         * tree-inline.c (estimate_move_cost): Likewise.
16376         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16377         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16378         (get_address_cost_ainc): Likewise.
16379         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16380         (vect_supportable_dr_alignment): Likewise.
16381         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16382         (vectorizable_reduction): Likewise.
16383         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16384         (vectorizable_operation, vectorizable_load): Likewise.
16385         * tree.c (build_same_sized_truth_vector_type): Likewise.
16386         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16387         * var-tracking.c (emit_note_insn_var_location): Likewise.
16388         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16389         (ADDR_VEC_ALIGN): Likewise.
16391 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16392             Alan Hayward  <alan.hayward@arm.com>
16393             David Sherwood  <david.sherwood@arm.com>
16395         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16396         unsigned short.
16397         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16398         or if measurement_type is polynomial.
16399         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16400         * combine.c (make_extraction): Likewise.
16401         * dse.c (find_shift_sequence): Likewise.
16402         * dwarf2out.c (mem_loc_descriptor): Likewise.
16403         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16404         (extract_bit_field, extract_low_bits): Likewise.
16405         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16406         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16407         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16408         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16409         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16410         * reload.c (find_reloads): Likewise.
16411         * reload1.c (alter_reg): Likewise.
16412         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16413         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16414         * tree-if-conv.c (predicate_mem_writes): Likewise.
16415         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16416         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16417         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16418         * valtrack.c (dead_debug_insert_temp): Likewise.
16419         * varasm.c (mergeable_constant_section): Likewise.
16420         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16423             Alan Hayward  <alan.hayward@arm.com>
16424             David Sherwood  <david.sherwood@arm.com>
16426         * expr.c (expand_assignment): Cope with polynomial mode sizes
16427         when assigning to a CONCAT.
16429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16430             Alan Hayward  <alan.hayward@arm.com>
16431             David Sherwood  <david.sherwood@arm.com>
16433         * machmode.h (mode_precision): Change from unsigned short to
16434         poly_uint16_pod.
16435         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16436         short.
16437         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16438         or if measurement_type is not polynomial.
16439         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16440         in which the mode is already known to be a scalar_int_mode.
16441         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16442         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16443         initializer.
16444         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16445         for GET_MODE_PRECISION.
16446         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16447         for GET_MODE_PRECISION.
16448         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16449         as polynomial.
16450         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16451         (expand_field_assignment, make_extraction): Likewise.
16452         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16453         (get_last_value): Likewise.
16454         * convert.c (convert_to_integer_1): Likewise.
16455         * cse.c (cse_insn): Likewise.
16456         * expr.c (expand_expr_real_1): Likewise.
16457         * lra-constraints.c (simplify_operand_subreg): Likewise.
16458         * optabs-query.c (can_atomic_load_p): Likewise.
16459         * optabs.c (expand_atomic_load): Likewise.
16460         (expand_atomic_store): Likewise.
16461         * ree.c (combine_reaching_defs): Likewise.
16462         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16463         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16464         * tree.h (type_has_mode_precision_p): Likewise.
16465         * ubsan.c (instrument_si_overflow): Likewise.
16467 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16468             Alan Hayward  <alan.hayward@arm.com>
16469             David Sherwood  <david.sherwood@arm.com>
16471         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16472         polynomial numbers of units.
16473         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16474         (valid_vector_subparts_p): New function.
16475         (build_vector_type): Remove temporary shim and take the number
16476         of units as a poly_uint64 rather than an int.
16477         (build_opaque_vector_type): Take the number of units as a
16478         poly_uint64 rather than an int.
16479         * tree.c (build_vector_from_ctor): Handle polynomial
16480         TYPE_VECTOR_SUBPARTS.
16481         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16482         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16483         (build_vector_from_val): If the number of units is variable,
16484         use build_vec_duplicate_cst for constant operands and
16485         VEC_DUPLICATE_EXPR otherwise.
16486         (make_vector_type): Remove temporary is_constant ().
16487         (build_vector_type, build_opaque_vector_type): Take the number of
16488         units as a poly_uint64 rather than an int.
16489         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16490         VECTOR_CST_NELTS.
16491         * cfgexpand.c (expand_debug_expr): Likewise.
16492         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16493         (store_constructor, expand_expr_real_1): Likewise.
16494         (const_scalar_mask_from_tree): Likewise.
16495         * fold-const-call.c (fold_const_reduction): Likewise.
16496         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16497         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16498         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16499         (fold_relational_const): Likewise.
16500         (native_interpret_vector): Likewise.  Change the size from an
16501         int to an unsigned int.
16502         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16503         TYPE_VECTOR_SUBPARTS.
16504         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16505         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16506         duplicating a non-constant operand into a variable-length vector.
16507         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16508         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16509         * ipa-icf.c (sem_variable::equals): Likewise.
16510         * match.pd: Likewise.
16511         * omp-simd-clone.c (simd_clone_subparts): Likewise.
16512         * print-tree.c (print_node): Likewise.
16513         * stor-layout.c (layout_type): Likewise.
16514         * targhooks.c (default_builtin_vectorization_cost): Likewise.
16515         * tree-cfg.c (verify_gimple_comparison): Likewise.
16516         (verify_gimple_assign_binary): Likewise.
16517         (verify_gimple_assign_ternary): Likewise.
16518         (verify_gimple_assign_single): Likewise.
16519         * tree-pretty-print.c (dump_generic_node): Likewise.
16520         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16521         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16522         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16523         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16524         (vect_shift_permute_load_chain): Likewise.
16525         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16526         (expand_vector_condition, optimize_vector_constructor): Likewise.
16527         (lower_vec_perm, get_compute_type): Likewise.
16528         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16529         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16530         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16531         (vect_recog_mask_conversion_pattern): Likewise.
16532         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16533         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16534         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16535         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16536         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16537         (vectorizable_shift, vectorizable_operation, vectorizable_store)
16538         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16539         (supportable_widening_operation): Likewise.
16540         (supportable_narrowing_operation): Likewise.
16541         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16542         Likewise.
16543         * varasm.c (output_constant): Likewise.
16545 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16546             Alan Hayward  <alan.hayward@arm.com>
16547             David Sherwood  <david.sherwood@arm.com>
16549         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
16550         so that both the length == 3 and length != 3 cases set up their
16551         own permute vectors.  Add comments explaining why we know the
16552         number of elements is constant.
16553         (vect_permute_load_chain): Likewise.
16555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16556             Alan Hayward  <alan.hayward@arm.com>
16557             David Sherwood  <david.sherwood@arm.com>
16559         * machmode.h (mode_nunits): Change from unsigned char to
16560         poly_uint16_pod.
16561         (ONLY_FIXED_SIZE_MODES): New macro.
16562         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
16563         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
16564         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
16565         New typedefs.
16566         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
16567         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
16568         or if measurement_type is not polynomial.
16569         * genmodes.c (ZERO_COEFFS): New macro.
16570         (emit_mode_nunits_inline): Make mode_nunits_inline return a
16571         poly_uint16.
16572         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
16573         Use ZERO_COEFFS when emitting initializers.
16574         * data-streamer.h (bp_pack_poly_value): New function.
16575         (bp_unpack_poly_value): Likewise.
16576         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16577         for GET_MODE_NUNITS.
16578         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16579         for GET_MODE_NUNITS.
16580         * tree.c (make_vector_type): Remove temporary shim and make
16581         the real function take the number of units as a poly_uint64
16582         rather than an int.
16583         (build_vector_type_for_mode): Handle polynomial nunits.
16584         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
16585         * emit-rtl.c (const_vec_series_p_1): Likewise.
16586         (gen_rtx_CONST_VECTOR): Likewise.
16587         * fold-const.c (test_vec_duplicate_folding): Likewise.
16588         * genrecog.c (validate_pattern): Likewise.
16589         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
16590         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16591         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
16592         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
16593         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
16594         * rtlanal.c (subreg_get_info): Likewise.
16595         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
16596         (vect_grouped_load_supported): Likewise.
16597         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16598         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
16599         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16600         (simplify_const_unary_operation, simplify_binary_operation_1)
16601         (simplify_const_binary_operation, simplify_ternary_operation)
16602         (test_vector_ops_duplicate, test_vector_ops): Likewise.
16603         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
16604         instead of CONST_VECTOR_NUNITS.
16605         * varasm.c (output_constant_pool_2): Likewise.
16606         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
16607         explicit-encoded elements in the XVEC for variable-length vectors.
16609 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16611         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
16613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16614             Alan Hayward  <alan.hayward@arm.com>
16615             David Sherwood  <david.sherwood@arm.com>
16617         * coretypes.h (fixed_size_mode): Declare.
16618         (fixed_size_mode_pod): New typedef.
16619         * builtins.h (target_builtins::x_apply_args_mode)
16620         (target_builtins::x_apply_result_mode): Change type to
16621         fixed_size_mode_pod.
16622         * builtins.c (apply_args_size, apply_result_size, result_vector)
16623         (expand_builtin_apply_args_1, expand_builtin_apply)
16624         (expand_builtin_return): Update accordingly.
16626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16628         * cse.c (hash_rtx_cb): Hash only the encoded elements.
16629         * cselib.c (cselib_hash_rtx): Likewise.
16630         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
16631         CONST_VECTOR encoding.
16633 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16634             Jeff Law  <law@redhat.com>
16636         PR target/83641
16637         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
16638         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
16639         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
16640         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
16642         PR target/83641
16643         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
16644         explicitly probe *sp in a noreturn function if there were any callee
16645         register saves or frame pointer is needed.
16647 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16649         PR debug/83621
16650         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
16651         BLKmode for ternary, binary or unary expressions.
16653         PR debug/83645
16654         * var-tracking.c (delete_vta_debug_insn): New inline function.
16655         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
16656         insns from get_insns () to NULL instead of each bb separately.
16657         Use delete_vta_debug_insn.  No longer static.
16658         (vt_debug_insns_local, variable_tracking_main_1): Adjust
16659         delete_vta_debug_insns callers.
16660         * rtl.h (delete_vta_debug_insns): Declare.
16661         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
16662         instead of variable_tracking_main.
16664 2018-01-03  Martin Sebor  <msebor@redhat.com>
16666         PR tree-optimization/83603
16667         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
16668         arguments past the endof the argument list in functions declared
16669         without a prototype.
16670         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
16671         Avoid checking when arguments are null.
16673 2018-01-03  Martin Sebor  <msebor@redhat.com>
16675         PR c/83559
16676         * doc/extend.texi (attribute const): Fix a typo.
16677         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
16678         issuing -Wsuggest-attribute for void functions.
16680 2018-01-03  Martin Sebor  <msebor@redhat.com>
16682         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
16683         offset_int::from instead of wide_int::to_shwi.
16684         (maybe_diag_overlap): Remove assertion.
16685         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
16686         * gimple-ssa-sprintf.c (format_directive): Same.
16687         (parse_directive): Same.
16688         (sprintf_dom_walker::compute_format_length): Same.
16689         (try_substitute_return_value): Same.
16691 2018-01-03  Jeff Law  <law@redhat.com>
16693         PR middle-end/83654
16694         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
16695         non-constant residual for zero at runtime and avoid probing in
16696         that case.  Reorganize code for trailing problem to mirror handling
16697         of the residual.
16699 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16701         PR tree-optimization/83501
16702         * tree-ssa-strlen.c (get_string_cst): New.
16703         (handle_char_store): Call get_string_cst.
16705 2018-01-03  Martin Liska  <mliska@suse.cz>
16707         PR tree-optimization/83593
16708         * tree-ssa-strlen.c: Include tree-cfg.h.
16709         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
16710         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
16711         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
16712         to false.
16713         (strlen_dom_walker::before_dom_children): Call
16714         gimple_purge_dead_eh_edges. Dump tranformation with details
16715         dump flags.
16716         (strlen_dom_walker::before_dom_children): Update call by adding
16717         new argument cleanup_eh.
16718         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
16720 2018-01-03  Martin Liska  <mliska@suse.cz>
16722         PR ipa/83549
16723         * cif-code.def (VARIADIC_THUNK): New enum value.
16724         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
16725         thunks.
16727 2018-01-03  Jan Beulich  <jbeulich@suse.com>
16729         * sse.md (mov<mode>_internal): Tighten condition for when to use
16730         vmovdqu<ssescalarsize> for TI and OI modes.
16732 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16734         Update copyright years.
16736 2018-01-03  Martin Liska  <mliska@suse.cz>
16738         PR ipa/83594
16739         * ipa-visibility.c (function_and_variable_visibility): Skip
16740         functions with noipa attribure.
16742 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
16744         * gcc.c (process_command): Update copyright notice dates.
16745         * gcov-dump.c (print_version): Ditto.
16746         * gcov.c (print_version): Ditto.
16747         * gcov-tool.c (print_version): Ditto.
16748         * gengtype.c (create_file): Ditto.
16749         * doc/cpp.texi: Bump @copying's copyright year.
16750         * doc/cppinternals.texi: Ditto.
16751         * doc/gcc.texi: Ditto.
16752         * doc/gccint.texi: Ditto.
16753         * doc/gcov.texi: Ditto.
16754         * doc/install.texi: Ditto.
16755         * doc/invoke.texi: Ditto.
16757 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16759         * vector-builder.h (vector_builder::m_full_nelts): Change from
16760         unsigned int to poly_uint64.
16761         (vector_builder::full_nelts): Update prototype accordingly.
16762         (vector_builder::new_vector): Likewise.
16763         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
16764         (vector_builder::operator ==): Likewise.
16765         (vector_builder::finalize): Likewise.
16766         * int-vector-builder.h (int_vector_builder::int_vector_builder):
16767         Take the number of elements as a poly_uint64 rather than an
16768         unsigned int.
16769         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
16770         from unsigned int to poly_uint64.
16771         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
16772         (vec_perm_indices::new_vector): Likewise.
16773         (vec_perm_indices::length): Likewise.
16774         (vec_perm_indices::nelts_per_input): Likewise.
16775         (vec_perm_indices::input_nelts): Likewise.
16776         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
16777         number of elements per input as a poly_uint64 rather than an
16778         unsigned int.  Use the original encoding for variable-length
16779         vectors, rather than clamping each individual element.
16780         For the second and subsequent elements in each pattern,
16781         clamp the step and base before clamping their sum.
16782         (vec_perm_indices::series_p): Handle polynomial element counts.
16783         (vec_perm_indices::all_in_range_p): Likewise.
16784         (vec_perm_indices_to_tree): Likewise.
16785         (vec_perm_indices_to_rtx): Likewise.
16786         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16787         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
16788         (tree_vector_builder::new_binary_operation): Handle polynomial
16789         element counts.  Return false if we need to know the number
16790         of elements at compile time.
16791         * fold-const.c (fold_vec_perm): Punt if the number of elements
16792         isn't known at compile time.
16794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16796         * vec-perm-indices.h (vec_perm_builder): Change element type
16797         from HOST_WIDE_INT to poly_int64.
16798         (vec_perm_indices::element_type): Update accordingly.
16799         (vec_perm_indices::clamp): Handle polynomial element_types.
16800         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
16801         (vec_perm_indices::all_in_range_p): Likewise.
16802         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
16803         than shwi trees.
16804         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
16805         polynomial vec_perm_indices element types.
16806         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
16807         * fold-const.c (fold_vec_perm): Likewise.
16808         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
16809         * tree-vect-generic.c (lower_vec_perm): Likewise.
16810         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16811         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
16812         element type to HOST_WIDE_INT.
16814 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16815             Alan Hayward  <alan.hayward@arm.com>
16816             David Sherwood  <david.sherwood@arm.com>
16818         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
16819         rather than an int.  Use plus_constant.
16820         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
16821         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
16823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16824             Alan Hayward  <alan.hayward@arm.com>
16825             David Sherwood  <david.sherwood@arm.com>
16827         * calls.c (emit_call_1, expand_call): Change struct_value_size from
16828         a HOST_WIDE_INT to a poly_int64.
16830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16831             Alan Hayward  <alan.hayward@arm.com>
16832             David Sherwood  <david.sherwood@arm.com>
16834         * calls.c (load_register_parameters): Cope with polynomial
16835         mode sizes.  Require a constant size for BLKmode parameters
16836         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
16837         forces a parameter to be padded at the lsb end in order to
16838         fill a complete number of words, require the parameter size
16839         to be ordered wrt UNITS_PER_WORD.
16841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16842             Alan Hayward  <alan.hayward@arm.com>
16843             David Sherwood  <david.sherwood@arm.com>
16845         * reload1.c (spill_stack_slot_width): Change element type
16846         from unsigned int to poly_uint64_pod.
16847         (alter_reg): Treat mode sizes as polynomial.
16849 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16850             Alan Hayward  <alan.hayward@arm.com>
16851             David Sherwood  <david.sherwood@arm.com>
16853         * reload.c (complex_word_subreg_p): New function.
16854         (reload_inner_reg_of_subreg, push_reload): Use it.
16856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16857             Alan Hayward  <alan.hayward@arm.com>
16858             David Sherwood  <david.sherwood@arm.com>
16860         * lra-constraints.c (process_alt_operands): Reject matched
16861         operands whose sizes aren't ordered.
16862         (match_reload): Refer to this check here.
16864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16865             Alan Hayward  <alan.hayward@arm.com>
16866             David Sherwood  <david.sherwood@arm.com>
16868         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
16869         that the mode size is in the set {1, 2, 4, 8, 16}.
16871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16872             Alan Hayward  <alan.hayward@arm.com>
16873             David Sherwood  <david.sherwood@arm.com>
16875         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
16876         Use plus_constant instead of gen_rtx_PLUS.
16878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16879             Alan Hayward  <alan.hayward@arm.com>
16880             David Sherwood  <david.sherwood@arm.com>
16882         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
16883         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
16884         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
16885         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
16886         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
16887         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
16888         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
16889         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
16890         * config/i386/i386.c (ix86_push_rounding): ...this new function.
16891         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
16892         a poly_int64.
16893         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
16894         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
16895         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
16896         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
16897         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
16898         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
16899         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
16900         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
16901         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
16902         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
16903         function.
16904         * expr.c (emit_move_resolve_push): Treat the input and result
16905         of PUSH_ROUNDING as a poly_int64.
16906         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
16907         (emit_push_insn): Likewise.
16908         * lra-eliminations.c (mark_not_eliminable): Likewise.
16909         * recog.c (push_operand): Likewise.
16910         * reload1.c (elimination_effects): Likewise.
16911         * rtlanal.c (nonzero_bits1): Likewise.
16912         * calls.c (store_one_arg): Likewise.  Require the padding to be
16913         known at compile time.
16915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16916             Alan Hayward  <alan.hayward@arm.com>
16917             David Sherwood  <david.sherwood@arm.com>
16919         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
16920         Use plus_constant instead of gen_rtx_PLUS.
16922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16923             Alan Hayward  <alan.hayward@arm.com>
16924             David Sherwood  <david.sherwood@arm.com>
16926         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
16927         rather than an int.
16929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16930             Alan Hayward  <alan.hayward@arm.com>
16931             David Sherwood  <david.sherwood@arm.com>
16933         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
16934         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
16935         via stack temporaries.  Treat the mode size as polynomial too.
16937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16938             Alan Hayward  <alan.hayward@arm.com>
16939             David Sherwood  <david.sherwood@arm.com>
16941         * expr.c (expand_expr_real_2): When handling conversions involving
16942         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
16943         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
16944         as a poly_uint64 too.
16946 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16947             Alan Hayward  <alan.hayward@arm.com>
16948             David Sherwood  <david.sherwood@arm.com>
16950         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
16952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16953             Alan Hayward  <alan.hayward@arm.com>
16954             David Sherwood  <david.sherwood@arm.com>
16956         * combine.c (can_change_dest_mode): Handle polynomial
16957         REGMODE_NATURAL_SIZE.
16958         * expmed.c (store_bit_field_1): Likewise.
16959         * expr.c (store_constructor): Likewise.
16960         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
16961         and polynomial REGMODE_NATURAL_SIZE.
16962         (gen_lowpart_common): Likewise.
16963         * reginfo.c (record_subregs_of_mode): Likewise.
16964         * rtlanal.c (read_modify_subreg_p): Likewise.
16966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16967             Alan Hayward  <alan.hayward@arm.com>
16968             David Sherwood  <david.sherwood@arm.com>
16970         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
16971         numbers of elements.
16973 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16974             Alan Hayward  <alan.hayward@arm.com>
16975             David Sherwood  <david.sherwood@arm.com>
16977         * match.pd: Cope with polynomial numbers of vector elements.
16979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16980             Alan Hayward  <alan.hayward@arm.com>
16981             David Sherwood  <david.sherwood@arm.com>
16983         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
16984         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
16991         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
16992         (ipa_simd_modify_function_body): Likewise.
16994 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16995             Alan Hayward  <alan.hayward@arm.com>
16996             David Sherwood  <david.sherwood@arm.com>
16998         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
16999         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17000         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17001         (expand_vector_condition, vector_element): Likewise.
17002         (subparts_gt): New function.
17003         (get_compute_type): Use subparts_gt.
17004         (count_type_subparts): Delete.
17005         (expand_vector_operations_1): Use subparts_gt instead of
17006         count_type_subparts.
17008 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17009             Alan Hayward  <alan.hayward@arm.com>
17010             David Sherwood  <david.sherwood@arm.com>
17012         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17013         (vect_compile_time_alias): ...this new function.  Do the calculation
17014         on poly_ints rather than trees.
17015         (vect_prune_runtime_alias_test_list): Update call accordingly.
17017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17018             Alan Hayward  <alan.hayward@arm.com>
17019             David Sherwood  <david.sherwood@arm.com>
17021         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17022         numbers of units.
17023         (vect_schedule_slp_instance): Likewise.
17025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17026             Alan Hayward  <alan.hayward@arm.com>
17027             David Sherwood  <david.sherwood@arm.com>
17029         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17030         constant and extern definitions for variable-length vectors.
17031         (vect_get_constant_vectors): Note that the number of units
17032         is known to be constant.
17034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17035             Alan Hayward  <alan.hayward@arm.com>
17036             David Sherwood  <david.sherwood@arm.com>
17038         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17039         of units as polynomial.  Choose between WIDE and NARROW based
17040         on multiple_p.
17042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17043             Alan Hayward  <alan.hayward@arm.com>
17044             David Sherwood  <david.sherwood@arm.com>
17046         * tree-vect-stmts.c (simd_clone_subparts): New function.
17047         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17049 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17050             Alan Hayward  <alan.hayward@arm.com>
17051             David Sherwood  <david.sherwood@arm.com>
17053         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17054         vectors as polynomial.  Use build_index_vector for
17055         IFN_GOMP_SIMD_LANE.
17057 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17058             Alan Hayward  <alan.hayward@arm.com>
17059             David Sherwood  <david.sherwood@arm.com>
17061         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17062         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17063         for variable-length vectors.
17064         (vectorizable_mask_load_store): Treat the number of units as
17065         polynomial, asserting that it is constant if the condition has
17066         already been enforced.
17067         (vectorizable_store, vectorizable_load): Likewise.
17069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17070             Alan Hayward  <alan.hayward@arm.com>
17071             David Sherwood  <david.sherwood@arm.com>
17073         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17074         of units as polynomial.  Punt if we can't tell at compile time
17075         which vector contains the final result.
17077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17078             Alan Hayward  <alan.hayward@arm.com>
17079             David Sherwood  <david.sherwood@arm.com>
17081         * tree-vect-loop.c (vectorizable_induction): Treat the number
17082         of units as polynomial.  Punt on SLP inductions.  Use an integer
17083         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17084         cast of such a series for variable-length floating-point
17085         reductions.
17087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17088             Alan Hayward  <alan.hayward@arm.com>
17089             David Sherwood  <david.sherwood@arm.com>
17091         * tree.h (build_index_vector): Declare.
17092         * tree.c (build_index_vector): New function.
17093         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17094         of units as polynomial, forcibly converting it to a constant if
17095         vectorizable_reduction has already enforced the condition.
17096         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17097         to create a {1,2,3,...} vector.
17098         (vectorizable_reduction): Treat the number of units as polynomial.
17099         Choose vectype_in based on the largest scalar element size rather
17100         than the smallest number of units.  Enforce the restrictions
17101         relied on above.
17103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17104             Alan Hayward  <alan.hayward@arm.com>
17105             David Sherwood  <david.sherwood@arm.com>
17107         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17108         number of units as polynomial.
17110 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17111             Alan Hayward  <alan.hayward@arm.com>
17112             David Sherwood  <david.sherwood@arm.com>
17114         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17115         * target.def (autovectorize_vector_sizes): Return the vector sizes
17116         by pointer, using vector_sizes rather than a bitmask.
17117         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17118         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17119         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17120         Likewise.
17121         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17122         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17123         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17124         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17125         * omp-general.c (omp_max_vf): Likewise.
17126         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17127         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17128         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17129         * tree-vect-slp.c (vect_slp_bb): Likewise.
17130         * doc/tm.texi: Regenerate.
17131         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17132         to a poly_uint64.
17133         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17134         the vector size as a poly_uint64 rather than an unsigned int.
17135         (current_vector_size): Change from an unsigned int to a poly_uint64.
17136         (get_vectype_for_scalar_type): Update accordingly.
17137         * tree.h (build_truth_vector_type): Take the size and number of
17138         units as a poly_uint64 rather than an unsigned int.
17139         (build_vector_type): Add a temporary overload that takes
17140         the number of units as a poly_uint64 rather than an unsigned int.
17141         * tree.c (make_vector_type): Likewise.
17142         (build_truth_vector_type): Take the number of units as a poly_uint64
17143         rather than an unsigned int.
17145 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17146             Alan Hayward  <alan.hayward@arm.com>
17147             David Sherwood  <david.sherwood@arm.com>
17149         * target.def (get_mask_mode): Take the number of units and length
17150         as poly_uint64s rather than unsigned ints.
17151         * targhooks.h (default_get_mask_mode): Update accordingly.
17152         * targhooks.c (default_get_mask_mode): Likewise.
17153         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17154         * doc/tm.texi: Regenerate.
17156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17157             Alan Hayward  <alan.hayward@arm.com>
17158             David Sherwood  <david.sherwood@arm.com>
17160         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17161         * omp-general.c (omp_max_vf): Likewise.
17162         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17163         (expand_omp_simd): Handle polynomial safelen.
17164         * omp-low.c (omplow_simd_context): Add a default constructor.
17165         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17166         (lower_rec_simd_input_clauses): Update accordingly.
17167         (lower_rec_input_clauses): Likewise.
17169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17170             Alan Hayward  <alan.hayward@arm.com>
17171             David Sherwood  <david.sherwood@arm.com>
17173         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17174         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17175         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17176         (vect_analyze_slp_cost): Likewise.
17177         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17178         (vect_model_load_cost): Likewise.
17180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17181             Alan Hayward  <alan.hayward@arm.com>
17182             David Sherwood  <david.sherwood@arm.com>
17184         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17185         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17186         from an unsigned int * to a poly_uint64_pod *.
17187         (calculate_unrolling_factor): New function.
17188         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17190 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17191             Alan Hayward  <alan.hayward@arm.com>
17192             David Sherwood  <david.sherwood@arm.com>
17194         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17195         from an unsigned int to a poly_uint64.
17196         (_loop_vec_info::slp_unrolling_factor): Likewise.
17197         (_loop_vec_info::vectorization_factor): Change from an int
17198         to a poly_uint64.
17199         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17200         (vect_get_num_vectors): New function.
17201         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17202         (vect_get_num_copies): Use vect_get_num_vectors.
17203         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17204         to an unsigned int *.
17205         (vect_analyze_data_refs): Change min_vf from an int * to a
17206         poly_uint64 *.
17207         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17208         than an unsigned HOST_WIDE_INT.
17209         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17210         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17211         to an unsigned int *.
17212         (vect_analyze_data_ref_dependences): Likewise.
17213         (vect_compute_data_ref_alignment): Handle polynomial vf.
17214         (vect_enhance_data_refs_alignment): Likewise.
17215         (vect_prune_runtime_alias_test_list): Likewise.
17216         (vect_shift_permute_load_chain): Likewise.
17217         (vect_supportable_dr_alignment): Likewise.
17218         (dependence_distance_ge_vf): Take the vectorization factor as a
17219         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17220         (vect_analyze_data_refs): Change min_vf from an int * to a
17221         poly_uint64 *.
17222         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17223         vfm1 as a poly_uint64 rather than an int.  Make the same change
17224         for the returned bound_scalar.
17225         (vect_gen_vector_loop_niters): Handle polynomial vf.
17226         (vect_do_peeling): Likewise.  Update call to
17227         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17228         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17229         be constant.
17230         * tree-vect-loop.c (vect_determine_vectorization_factor)
17231         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17232         (vect_get_known_peeling_cost): Likewise.
17233         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17234         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17235         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17236         updating the upper bounds of the loop.
17237         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17238         rather than an int.
17239         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17240         polynomial unroll factors.
17241         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17242         (vect_make_slp_decision): Likewise.
17243         (vect_supported_load_permutation_p): Likewise, and polynomial
17244         vf too.
17245         (vect_analyze_slp_cost): Handle polynomial vf.
17246         (vect_slp_analyze_node_operations): Likewise.
17247         (vect_slp_analyze_bb_1): Likewise.
17248         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17249         than an unsigned HOST_WIDE_INT.
17250         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17251         (vectorizable_load): Handle polynomial vf.
17252         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17253         a poly_uint64.
17254         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17256 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17257             Alan Hayward  <alan.hayward@arm.com>
17258             David Sherwood  <david.sherwood@arm.com>
17260         * match.pd: Handle bit operations involving three constants
17261         and try to fold one pair.
17263 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17265         * tree-vect-loop-manip.c: Include gimple-fold.h.
17266         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17267         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17268         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17269         Add a path that uses a step of VF instead of 1, but disable it
17270         for now.
17271         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17272         and niters_no_overflow parameters.  Update calls to
17273         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17274         Create a new SSA name if the latter choses to use a ste other
17275         than zero, and return it via niters_vector_mult_vf_var.
17276         * tree-vect-loop.c (vect_transform_loop): Update calls to
17277         vect_do_peeling, vect_gen_vector_loop_niters and
17278         slpeel_make_loop_iterate_ntimes.
17279         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17280         (vect_gen_vector_loop_niters): Update declarations after above changes.
17282 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17284         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17285         128-bit round to integer instructions.
17286         (ceil<mode>2): Likewise.
17287         (btrunc<mode>2): Likewise.
17288         (round<mode>2): Likewise.
17290 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17292         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17293         unaligned VSX load/store on P8/P9.
17294         (expand_block_clear): Allow the use of unaligned VSX
17295         load/store on P8/P9.
17297 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17299         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17300         New function.
17301         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17302         swap associated with both a load and a store.
17304 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17306         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17307         * config/riscv/riscv.md (clear_cache): Use it.
17309 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17311         * web.c: Remove out-of-date comment.
17313 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17315         * expr.c (fixup_args_size_notes): Check that any existing
17316         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17317         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17318         (emit_single_push_insn): ...here.
17320 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17322         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17323         (const_vector_encoded_nelts): New function.
17324         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17325         (const_vector_int_elt, const_vector_elt): Declare.
17326         * emit-rtl.c (const_vector_int_elt_1): New function.
17327         (const_vector_elt): Likewise.
17328         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17329         of CONST_VECTOR_ELT.
17331 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17333         * expr.c: Include rtx-vector-builder.h.
17334         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17335         directly on the tree encoding.
17336         (const_vector_from_tree): Likewise.
17337         * optabs.c: Include rtx-vector-builder.h.
17338         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17339         sequence of "u" values.
17340         * vec-perm-indices.c: Include rtx-vector-builder.h.
17341         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17342         directly on the vec_perm_indices encoding.
17344 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17346         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17347         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17348         * rtx-vector-builder.h: New file.
17349         * rtx-vector-builder.c: Likewise.
17350         * rtl.h (rtx_def::u2): Add a const_vector field.
17351         (CONST_VECTOR_NPATTERNS): New macro.
17352         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17353         (CONST_VECTOR_DUPLICATE_P): Likewise.
17354         (CONST_VECTOR_STEPPED_P): Likewise.
17355         (CONST_VECTOR_ENCODED_ELT): Likewise.
17356         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17357         (unwrap_const_vec_duplicate): Likewise.
17358         (const_vec_series_p): Check for a non-duplicated vector encoding.
17359         Say that the function only returns true for integer vectors.
17360         * emit-rtl.c: Include rtx-vector-builder.h.
17361         (gen_const_vec_duplicate_1): Delete.
17362         (gen_const_vector): Call gen_const_vec_duplicate instead of
17363         gen_const_vec_duplicate_1.
17364         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17365         (gen_const_vec_duplicate): Use rtx_vector_builder.
17366         (gen_const_vec_series): Likewise.
17367         (gen_rtx_CONST_VECTOR): Likewise.
17368         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17369         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17370         Build a new vector rather than modifying a CONST_VECTOR in-place.
17371         (handle_special_swappables): Update call accordingly.
17372         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17373         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17374         Build a new vector rather than modifying a CONST_VECTOR in-place.
17375         (handle_special_swappables): Update call accordingly.
17377 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17379         * simplify-rtx.c (simplify_const_binary_operation): Use
17380         CONST_VECTOR_ELT instead of XVECEXP.
17382 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17384         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17385         the selector elements to be different from the data elements
17386         if the selector is a VECTOR_CST.
17387         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17388         ssizetype for the selector.
17390 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17392         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17393         before testing each element individually.
17394         * tree-vect-generic.c (lower_vec_perm): Likewise.
17396 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17398         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17399         * selftest-run-tests.c (selftest::run_tests): Call it.
17400         * vector-builder.h (vector_builder::operator ==): New function.
17401         (vector_builder::operator !=): Likewise.
17402         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17403         (vec_perm_indices::all_from_input_p): New function.
17404         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17405         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17406         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17407         instead of reading the VECTOR_CST directly.  Detect whether both
17408         vector inputs are the same before constructing the vec_perm_indices,
17409         and update the number of inputs argument accordingly.  Use the
17410         utility functions added above.  Only construct sel2 if we need to.
17412 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17414         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17415         the broadcast of the low byte.
17416         (expand_mult_highpart): Use an explicit encoding for the permutes.
17417         * optabs-query.c (can_mult_highpart_p): Likewise.
17418         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17419         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17420         (vectorizable_bswap): Likewise.
17421         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17422         explicit encoding for the power-of-2 permutes.
17423         (vect_permute_store_chain): Likewise.
17424         (vect_grouped_load_supported): Likewise.
17425         (vect_permute_load_chain): Likewise.
17427 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17429         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17430         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17431         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17432         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17433         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17434         (vect_gen_perm_mask_any): Likewise.
17436 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17438         * int-vector-builder.h: New file.
17439         * vec-perm-indices.h: Include int-vector-builder.h.
17440         (vec_perm_indices): Redefine as an int_vector_builder.
17441         (auto_vec_perm_indices): Delete.
17442         (vec_perm_builder): Redefine as a stand-alone class.
17443         (vec_perm_indices::vec_perm_indices): New function.
17444         (vec_perm_indices::clamp): Likewise.
17445         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17446         (vec_perm_indices::new_vector): New function.
17447         (vec_perm_indices::new_expanded_vector): Update for new
17448         vec_perm_indices class.
17449         (vec_perm_indices::rotate_inputs): New function.
17450         (vec_perm_indices::all_in_range_p): Operate directly on the
17451         encoded form, without computing elided elements.
17452         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17453         encoding.  Update for new vec_perm_indices class.
17454         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17455         the given vec_perm_builder.
17456         (expand_vec_perm_var): Update vec_perm_builder constructor.
17457         (expand_mult_highpart): Use vec_perm_builder instead of
17458         auto_vec_perm_indices.
17459         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17460         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17461         or double series encoding as appropriate.
17462         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17463         vec_perm_indices instead of auto_vec_perm_indices.
17464         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17465         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17466         (vect_permute_store_chain): Likewise.
17467         (vect_grouped_load_supported): Likewise.
17468         (vect_permute_load_chain): Likewise.
17469         (vect_shift_permute_load_chain): Likewise.
17470         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17471         (vect_transform_slp_perm_load): Likewise.
17472         (vect_schedule_slp_instance): Likewise.
17473         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17474         (vectorizable_mask_load_store): Likewise.
17475         (vectorizable_bswap): Likewise.
17476         (vectorizable_store): Likewise.
17477         (vectorizable_load): Likewise.
17478         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17479         vec_perm_indices instead of auto_vec_perm_indices.  Use
17480         tree_to_vec_perm_builder to read the vector from a tree.
17481         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17482         vec_perm_builder instead of a vec_perm_indices.
17483         (have_whole_vector_shift): Use vec_perm_builder and
17484         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17485         truncation to calc_vec_perm_mask_for_shift.
17486         (vect_create_epilog_for_reduction): Likewise.
17487         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17488         from auto_vec_perm_indices to vec_perm_indices.
17489         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17490         instead of changing individual elements.
17491         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17492         the vector in d.perm.
17493         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17494         from auto_vec_perm_indices to vec_perm_indices.
17495         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17496         instead of changing individual elements.
17497         (arm_vectorize_vec_perm_const): Use new_vector to install
17498         the vector in d.perm.
17499         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17500         Update vec_perm_builder constructor.
17501         (rs6000_expand_interleave): Likewise.
17502         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17503         (rs6000_expand_interleave): Likewise.
17505 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17507         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17508         to qimode could truncate the indices.
17509         * optabs.c (expand_vec_perm_var): Likewise.
17511 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17513         * Makefile.in (OBJS): Add vec-perm-indices.o.
17514         * vec-perm-indices.h: New file.
17515         * vec-perm-indices.c: Likewise.
17516         * target.h (vec_perm_indices): Replace with a forward class
17517         declaration.
17518         (auto_vec_perm_indices): Move to vec-perm-indices.h.
17519         * optabs.h: Include vec-perm-indices.h.
17520         (expand_vec_perm): Delete.
17521         (selector_fits_mode_p, expand_vec_perm_var): Declare.
17522         (expand_vec_perm_const): Declare.
17523         * target.def (vec_perm_const_ok): Replace with...
17524         (vec_perm_const): ...this new hook.
17525         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17526         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17527         * doc/tm.texi: Regenerate.
17528         * optabs.def (vec_perm_const): Delete.
17529         * doc/md.texi (vec_perm_const): Likewise.
17530         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17531         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17532         expand_vec_perm for constant permutation vectors.  Assert that
17533         the mode of variable permutation vectors is the integer equivalent
17534         of the mode that is being permuted.
17535         * optabs-query.h (selector_fits_mode_p): Declare.
17536         * optabs-query.c: Include vec-perm-indices.h.
17537         (selector_fits_mode_p): New function.
17538         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17539         is defined, instead of checking whether the vec_perm_const_optab
17540         exists.  Use targetm.vectorize.vec_perm_const instead of
17541         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
17542         fit in the vector mode before using a variable permute.
17543         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17544         vec_perm_indices instead of an rtx.
17545         (expand_vec_perm): Replace with...
17546         (expand_vec_perm_const): ...this new function.  Take the selector
17547         as a vec_perm_indices rather than an rtx.  Also take the mode of
17548         the selector.  Update call to shift_amt_for_vec_perm_mask.
17549         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
17550         Use vec_perm_indices::new_expanded_vector to expand the original
17551         selector into bytes.  Check whether the indices fit in the vector
17552         mode before using a variable permute.
17553         (expand_vec_perm_var): Make global.
17554         (expand_mult_highpart): Use expand_vec_perm_const.
17555         * fold-const.c: Includes vec-perm-indices.h.
17556         * tree-ssa-forwprop.c: Likewise.
17557         * tree-vect-data-refs.c: Likewise.
17558         * tree-vect-generic.c: Likewise.
17559         * tree-vect-loop.c: Likewise.
17560         * tree-vect-slp.c: Likewise.
17561         * tree-vect-stmts.c: Likewise.
17562         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
17563         Delete.
17564         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
17565         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
17566         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
17567         (aarch64_vectorize_vec_perm_const): ...this new function.
17568         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17569         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17570         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
17571         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
17572         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17573         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17574         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
17575         into...
17576         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
17577         check for NEON modes.
17578         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
17579         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
17580         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
17581         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
17582         into...
17583         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
17584         the old VEC_PERM_CONST conditions.
17585         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
17586         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
17587         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
17588         (ia64_vectorize_vec_perm_const_ok): Merge into...
17589         (ia64_vectorize_vec_perm_const): ...this new function.
17590         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
17591         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
17592         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
17593         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
17594         * config/mips/mips.c (mips_expand_vec_perm_const)
17595         (mips_vectorize_vec_perm_const_ok): Merge into...
17596         (mips_vectorize_vec_perm_const): ...this new function.
17597         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
17598         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
17599         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
17600         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
17601         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
17602         (rs6000_expand_vec_perm_const): Delete.
17603         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
17604         Delete.
17605         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17606         (altivec_expand_vec_perm_const_le): Take each operand individually.
17607         Operate on constant selectors rather than rtxes.
17608         (altivec_expand_vec_perm_const): Likewise.  Update call to
17609         altivec_expand_vec_perm_const_le.
17610         (rs6000_expand_vec_perm_const): Delete.
17611         (rs6000_vectorize_vec_perm_const_ok): Delete.
17612         (rs6000_vectorize_vec_perm_const): New function.
17613         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17614         an element count and rtx array.
17615         (rs6000_expand_extract_even): Update call accordingly.
17616         (rs6000_expand_interleave): Likewise.
17617         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
17618         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
17619         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
17620         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
17621         (rs6000_expand_vec_perm_const): Delete.
17622         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
17623         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17624         (altivec_expand_vec_perm_const_le): Take each operand individually.
17625         Operate on constant selectors rather than rtxes.
17626         (altivec_expand_vec_perm_const): Likewise.  Update call to
17627         altivec_expand_vec_perm_const_le.
17628         (rs6000_expand_vec_perm_const): Delete.
17629         (rs6000_vectorize_vec_perm_const_ok): Delete.
17630         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
17631         reference to the SPE evmerge intructions.
17632         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
17633         an element count and rtx array.
17634         (rs6000_expand_extract_even): Update call accordingly.
17635         (rs6000_expand_interleave): Likewise.
17636         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
17637         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
17638         new function.
17639         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
17641 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17643         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
17644         vector mode and that that mode matches the mode of the data
17645         being permuted.
17646         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
17647         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
17648         directly using expand_vec_perm_1 when forcing selectors into
17649         registers.
17650         (expand_vec_perm_var): New function, split out from expand_vec_perm.
17652 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17654         * optabs-query.h (can_vec_perm_p): Delete.
17655         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
17656         * optabs-query.c (can_vec_perm_p): Split into...
17657         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
17658         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
17659         particular selector is valid.
17660         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17661         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17662         (vect_grouped_load_supported): Likewise.
17663         (vect_shift_permute_load_chain): Likewise.
17664         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17665         (vect_transform_slp_perm_load): Likewise.
17666         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17667         (vectorizable_bswap): Likewise.
17668         (vect_gen_perm_mask_checked): Likewise.
17669         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
17670         implementations of variable permutation vectors into account
17671         when deciding which selector to use.
17672         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
17673         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
17674         with a false third argument.
17675         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
17676         to test whether the constant selector is valid and can_vec_perm_var_p
17677         to test whether a variable selector is valid.
17679 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17681         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
17682         * optabs-query.c (can_vec_perm_p): Likewise.
17683         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
17684         instead of vec_perm_indices.
17685         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
17686         (vect_gen_perm_mask_checked): Likewise,
17687         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
17688         (vect_gen_perm_mask_checked): Likewise,
17690 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17692         * optabs-query.h (qimode_for_vec_perm): Declare.
17693         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
17694         (qimode_for_vec_perm): ...this new function.
17695         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
17697 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17699         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
17700         does not have a conditional at the top.
17702 2018-01-02  Richard Biener  <rguenther@suse.de>
17704         * ipa-inline.c (big_speedup_p): Fix expression.
17706 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17708         PR target/81616
17709         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
17710         for generic 4->6.
17712 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
17714         PR target/81616
17715         Generic tuning.
17716         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
17717         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
17718         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
17719         cond_taken_branch_cost 3->4.
17721 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
17723         PR tree-optimization/83581
17724         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
17725         TODO_cleanup_cfg if any changes have been made.
17727         PR middle-end/83608
17728         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
17729         convert_modes if target mode has the right side, but different mode
17730         class.
17732         PR middle-end/83609
17733         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
17734         last argument when extracting from CONCAT.  If either from_real or
17735         from_imag is NULL, use expansion through memory.  If result is not
17736         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17737         the parts directly to inner mode, if even that fails, use expansion
17738         through memory.
17740         PR middle-end/83623
17741         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
17742         check for bswap in mode rather than HImode and use that in expand_unop
17743         too.
17745 Copyright (C) 2018 Free Software Foundation, Inc.
17747 Copying and distribution of this file, with or without modification,
17748 are permitted in any medium without royalty provided the copyright
17749 notice and this notice are preserved.