[25/46] Make get_earlier/later_stmt take and return stmt_vec_infos
[official-gcc.git] / gcc / ChangeLog
blob5bb4f022aea4532c8eb1580c3182d2b0a76fbb6a
1 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4         return stmt_vec_infos rather than gimple stmts.  Do not accept
5         null arguments.
6         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7         of a gimple stmt.
8         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9         Update use of get_later_stmt.
10         (vect_get_constant_vectors): Update call accordingly.
11         (vect_schedule_slp_instance): Likewise
12         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13         (vect_slp_analyze_instance_dependence): Likewise.
14         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
16 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
18         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
19         (stmt_info_for_cost::stmt_info): ...this new field.
20         (add_stmt_costs): Update accordingly.
21         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
22         (vect_get_known_peeling_cost): Likewise.
23         (vect_estimate_min_profitable_iters): Likewise.
24         * tree-vect-stmts.c (record_stmt_cost): Likewise.
26 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
28         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
29         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
30         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
31         accordingly.
32         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
34 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
36         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
37         a gimple stmt to a stmt_vec_info.
38         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
40 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
42         * tree-vectorizer.h (vec_info::grouped_stores): Change from
43         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
44         (_loop_vec_info::reduction_chains): Likewise.
45         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
46         accordingly.
47         * tree-vect-slp.c (vect_analyze_slp): Likewise.
49 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
51         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
52         a gimple stmt to a stmt_vec_info.
53         (_stmt_vec_info::next_element): Likewise.
54         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
55         (vect_slp_analyze_and_verify_node_alignment)
56         (vect_analyze_group_access_1, vect_analyze_group_access)
57         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
58         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
59         (vect_supportable_dr_alignment): Update accordingly.
60         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
61         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
62         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
63         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
64         * tree-vect-slp.c (vect_build_slp_tree_1)
65         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
66         (vect_split_slp_store_group, vect_analyze_slp_instance)
67         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
68         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
69         (get_group_load_store_type, get_load_store_type)
70         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
71         (vect_transform_stmt, vect_remove_stores): Likewise.
73 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
75         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
76         than a gimple stmt.
77         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
78         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
79         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
80         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
81         (vector_alignment_reachable_p, vect_get_data_access_cost)
82         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
83         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
84         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
85         (vect_analyze_group_access_1, vect_analyze_group_access)
86         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
87         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
88         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
89         result of vect_dr_stmt and use the stmt_vec_info instead of
90         the associated gimple stmt.
91         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
92         (vect_gen_prolog_loop_niters): Likewise.
93         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
95 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
97         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
98         to a vec<stmt_vec_info>.
99         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
100         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
101         vec<stmt_vec_info>.
102         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
103         to a vec<stmt_vec_info>.
104         (bst_traits::value_type, bst_traits::value_type): Likewise.
105         (bst_traits::hash): Update accordingly.
106         (vect_get_and_check_slp_defs): Change the stmts parameter from
107         a vec<gimple *> to a vec<stmt_vec_info>.
108         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
109         (vect_build_slp_tree): Likewise.
110         (vect_build_slp_tree_2): Likewise.  Update uses of
111         SLP_TREE_SCALAR_STMTS.
112         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
113         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
114         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
115         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
116         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
117         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
118         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
119         (vect_get_constant_vectors, vect_get_slp_defs)
120         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
121         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
122         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
123         instead of gimple stmts.
124         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
125         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
126         (vect_slp_analyze_instance_dependence): Update uses of
127         SLP_TREE_SCALAR_STMTS.
128         (vect_slp_analyze_and_verify_node_alignment): Likewise.
129         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
130         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
131         (get_initial_defs_for_reduction): Likewise.
132         (vect_create_epilog_for_reduction): Likewise.
133         (vectorize_fold_left_reduction): Likewise.
134         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
135         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
136         (can_vectorize_live_stmts): Likewise.
138 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
140         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
141         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
142         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
143         than gimple stmts.
144         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
145         of a gimple stmt.
146         (gather_scalar_reductions): Update after above interface changes.
147         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
148         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
149         than gimple stmts.
150         (vect_force_simple_reduction): Likewise.
151         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
152         LOOP_VINFO_REDUCTIONS.
153         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
155 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
157         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
158         a gimple stmt to a stmt_vec_info.
159         * tree-vect-loop.c (vect_active_double_reduction_p)
160         (vect_force_simple_reduction, vectorizable_reduction): Update
161         accordingly.
163 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
165         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
166         vec<gimple *> to a vec<stmt_vec_info>.
167         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
168         the reduction_phis argument from a vec<gimple *> to a
169         vec<stmt_vec_info>.
170         (vectorizable_reduction): Likewise the phis local variable that
171         is passed to vect_create_epilog_for_reduction.  Update for new type
172         of SLP_TREE_VEC_STMTS.
173         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
174         (vectorizable_live_operation): Likewise.
175         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
176         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
178 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
180         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
181         a gimple stmt to a stmt_vec_info.
182         (vectorizable_condition, vectorizable_live_operation)
183         (vectorizable_reduction, vectorizable_induction): Pass back the
184         vectorized statement as a stmt_vec_info.
185         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
186         use of STMT_VINFO_VEC_STMT.
187         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
188         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
189         as stmt_vec_infos rather than gimple stmts.
190         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
191         to a stmt_vec_info.
192         (vectorizable_live_operation): Likewise.
193         (vectorizable_reduction, vectorizable_induction): Likewise,
194         updating use of STMT_VINFO_VEC_STMT.
195         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
196         of STMT_VINFO_VEC_STMT.
197         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
198         (vectorizable_simd_clone_call, vectorizable_conversion)
199         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
200         (vectorizable_store, vectorizable_load, vectorizable_condition)
201         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
202         from a gimple stmt to a stmt_vec_info.
203         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
204         pointer to a stmt_vec_info to the vectorizable_* routines.
206 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
208         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
209         a gimple stmt to a stmt_vec_info.
210         (is_pattern_stmt_p): Update accordingly.
211         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
212         (vect_record_grouped_load_vectors): Likewise.
213         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
214         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
215         (vect_model_reduction_cost): Likewise.
216         (vect_create_epilog_for_reduction): Likewise.
217         (vectorizable_reduction, vectorizable_induction): Likewise.
218         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
219         Return the stmt_vec_info for the pattern statement.
220         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
221         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
222         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
223         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
224         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
225         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
226         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
227         (free_stmt_vec_info, vect_is_simple_use): Likewise.
229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
231         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
232         (vect_finish_stmt_generation): Likewise.
233         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
234         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
235         (vect_build_gather_load_calls): Use the return value of the above
236         functions instead of a separate call to vinfo_for_stmt.  Use narrow
237         scopes for the input gimple stmt and wider scopes for the associated
238         stmt_vec_info.  Use vec_info::lookup_def when setting these
239         stmt_vec_infos from an SSA_NAME definition.
240         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
241         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
242         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
243         (vectorizable_store, vectorizable_load, vectorizable_condition)
244         (vectorizable_comparison): Likewise.
245         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
246         (vectorizable_reduction): Likewise.
248 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
250         * tree-vectorizer.h (vect_is_simple_use): Add an optional
251         stmt_vec_info * parameter before the optional gimple **.
252         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
253         (process_use, vect_get_vec_def_for_operand_1): Update callers.
254         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
255         * tree-vect-loop.c (vectorizable_reduction): Likewise.
256         (vectorizable_live_operation): Likewise.
257         * tree-vect-patterns.c (type_conversion_p): Likewise.
258         (vect_look_through_possible_promotion): Likewise.
259         (vect_recog_rotate_pattern): Likewise.
260         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
264         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
265         a typedef to a wrapper class.
266         (NULL_STMT_VEC_INFO): New macro.
267         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
268         (stmt_vec_info::operator*): New function.
269         (stmt_vec_info::operator gimple *): Likewise.
270         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
271         (add_stmt_costs): Likewise.
272         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
273         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
274         (vect_get_known_peeling_cost): Likewise.
275         (vect_estimate_min_profitable_iters): Likewise.
276         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
277         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
278         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
279         (vectorizable_store, free_stmt_vec_infos): Likewise.
280         (new_stmt_vec_info): Change return type of xcalloc to
281         _stmt_vec_info *.
283 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
285         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
286         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
287         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
288         a single_imm_use-based sequence.
289         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
291 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
293         * tree-vectorizer.h (vec_info::lookup_def): Declare.
294         * tree-vectorizer.c (vec_info::lookup_def): New function.
295         * tree-vect-patterns.c (vect_get_internal_def): Use it.
296         (vect_widened_op_tree): Likewise.
297         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
298         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
299         (vectorizable_reduction): Likewise.
300         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
301         of a gimple *.
302         (vect_is_slp_reduction): Update calls accordingly.  Use
303         vec_info::lookup_def.
304         (vect_is_simple_reduction): Likewise
305         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
307 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
309         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
310         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
311         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
312         of vinfo_for_stmt.
313         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
314         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
315         (vect_update_vf_for_slp, vect_analyze_loop_operations)
316         (vect_is_slp_reduction, vectorizable_induction)
317         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
318         * tree-vect-patterns.c (vect_init_pattern_stmt):
319         (vect_determine_min_output_precision_1, vect_determine_precisions)
320         (vect_pattern_recog): Likewise.
321         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
322         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
323         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
324         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
325         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
326         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
327         info field from a loop to a loop_vec_info.
329 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
331         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
332         (vec_info::add_stmt): Declare.
333         * tree-vectorizer.c (vec_info::add_stmt): New function.
334         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
335         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
336         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
337         (vectorizable_induction): Likewise.
338         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
339         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
340         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
341         (vectorizable_load): Likewise.
342         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
343         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
344         (vect_recog_gather_scatter_pattern): Likewise.
345         (append_pattern_def_seq): Likewise.  Remove a check that is
346         performed by add_stmt itself.
348 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
350         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
351         which make_ssa_name was called with new_stmt before new_stmt
352         had been created.
354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
356         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
357         split out from...
358         (vect_is_slp_reduction): ...here...
359         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
360         that are already known to be false.
362 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
364         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
365         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
366         STMT_VINFO_NUM_SLP_USES when it's true.
367         (vect_free_slp_instance): Add a final_p parameter and pass it to
368         vect_free_slp_tree.
369         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
370         (vect_analyze_slp_instance): Likewise.
371         (vect_slp_analyze_operations): Likewise.
372         (vect_slp_analyze_bb_1): Likewise.
373         * tree-vectorizer.c (vec_info): Likewise.
374         * tree-vect-loop.c (vect_transform_loop): Likewise.
376 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
378         * tree-vect-loop.c (vectorizable_reduction): Assert that the
379         function is not called for second and subsequent members of
380         a reduction group.
382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
384         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
385         cases for nested loops from here to ...
386         (vect_create_epilog_for_reduction): ...here.  Only call
387         vect_is_simple_use for inner-loop reductions.
389 2018-07-31  Martin Liska  <mliska@suse.cz>
391         PR gcov-profile/85338
392         PR gcov-profile/85350
393         PR gcov-profile/85372
394         * profile.c (struct location_triplet): New.
395         (struct location_triplet_hash): Likewise.
396         (output_location): Do not output a BB that
397         is already recorded for a line.
398         (branch_prob): Use streamed_locations.
400 2018-07-31  Martin Liska  <mliska@suse.cz>
402         PR gcov-profile/85370
403         * coverage.c (coverage_begin_function): Do not mark target
404         clones as artificial functions.
406 2018-07-31  Martin Liska  <mliska@suse.cz>
408         PR gcov-profile/83813
409         PR gcov-profile/84758
410         PR gcov-profile/85217
411         PR gcov-profile/85332
412         * profile.c (branch_prob): Do not record GOTO expressions
413         for GIMPLE statements which locations are already streamed.
415 2018-07-31  Olivier Hainque  <hainque@adacore.com>
417         * gcc.c (handle_spec_function): Accept a soft_matched_part
418         argument, as do_spec_1.  Pass it down to ...
419         (eval_spec_function): Accept a soft_matched_part argument,
420         and pass it down to ...
421         (do_spec_2): Accept a soft_matched_part argument, and pass
422         it down to do_spec_1.
423         (do_spec_1): Pass soft_matched_part to handle_spec_function.
424         (handle_braces): Update call to handle_spec_function.
425         (driver::set_up_specs): Update calls to do_spec_2.
426         (compare_debug_dump_opt_spec_function): Likewise.
427         (compare_debug_self_opt_spec_function): Likewise.
429 2018-07-31  Olivier Hainque  <hainque@adacore.com>
431         * common.opt (nolibc): New option.
432         * doc/invoke.texi (Link Options): Document it.
433         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
434         * config/alpha/linux.h: Likewise.
435         * config/arc/elf.h: Likewise.
436         * config/arm/uclinux-elf.h: Likewise.
437         * config/arm/unknown-elf.h: Likewise.
438         * config/avr/avrlibc.h: Likewise.
439         * config/bfin/bfin.h: Likewise.
440         * config/bfin/linux.h: Likewise.
441         * config/bfin/uclinux.h: Likewise.
442         * config/darwin.h: Likewise.
443         * config/darwin10.h: Likewise.
444         * config/darwin12.h: Likewise.
445         * config/gnu-user.h: Likewise.
446         * config/lm32/uclinux-elf.h: Likewise.
447         * config/pa/pa-hpux11.h: Likewise.
448         * config/pa/pa64-hpux.h: Likewise.
449         * config/sparc/sparc.h: Likewise.
451 2018-07-31  Olivier Hainque  <hainque@adacore.com>
453         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
454         undefined variables.
456 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
458         PR target/86640
459         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
460         instead of GEN_INT.
462 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
464         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
465         terminated string literal.
467 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
469         PR rtl-optimization/85160
470         * combine.c (is_just_move): New function.
471         (try_combine): Allow combining two instructions into two if neither of
472         the original instructions was a move.
474 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
476         PR target/86673
477         * doc/extend.texi (Global Register Variables): Discourage use of type
478         qualifiers.
479         (Local Register Variables): Likewise.
481 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
483         PR tree-optimization/86506
484         * hwint.h (ceil_log2): Resync with hwint.c implementation.
486 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
488         PR target/86547
489         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
490         hard_regno, make sure no insn between `from` and `to` clobbers it.
492 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
493             Tom de Vries  <tdevries@suse.de>
495         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
496         (PTX_DEFAULT_RUNTIME_DIM): ... this.
497         (nvptx_goacc_validate_dims): Set default worker and gang dims to
498         PTX_DEFAULT_RUNTIME_DIM.
499         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
501 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
503         * config/pa/pa.c (pa_output_addr_vec): Align address table.
504         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
505         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
507 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
509         * config/rs6000/constraints.md (wG constraint): Delete, no longer
510         used.
511         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
512         predicate to reflect toc fusion has been deleted.
513         (toc_fusion_mem_raw): Delete, no longer used.
514         (toc_fusion_mem_wrapped): Likewise.
515         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
516         fusion mask bit.
517         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
518         Delete, no longer used.
519         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
520         meant to be used for toc fusion.
521         (rs6000_debug_print_mode): Delete toc fusion debugging.
522         (rs6000_debug_reg_global): Likewise.
523         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
524         fusion and secondary reload support that were never used.
525         (rs6000_option_override_internal): Delete TOC fusion, that was only
526         partially defined, and it did not work unless you also used the
527         -mcmodel= switch.
528         (rs6000_legitimate_address_p): Delete TOC fusion support.
529         (rs6000_opt_masks): Likewise.
530         (fusion_wrap_memory_address): Delete function, no longer used.
531         (fusion_split_address); Delete TOC fusion support.
532         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
533         longer used with toc fusion being deleted.
534         (TARGET_TOC_FUSION_FP): Likewise.
535         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
536         UNSPEC.
537         (toc fusion spliter): Delete TOC fusion support.
538         (toc_fusionload_<mode>): Likewise.
539         (toc_fusionload_di): Likewise.
540         (fusion_gpr_load_<mode>): Delete generator function, this insn no
541         longer needs to be named.  Rename predicate to delete TOC fusion.
542         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
543         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
544         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
545         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
546         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
548 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
550         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
551         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
552         __int128 in built-in function prototypes.
553         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
554         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
556 2018-07-27  Martin Sebor  <msebor@redhat.com>
558         PR tree-optimization/86696
559         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
560         types, including enums.
561         (handle_char_store): Be prepared for the above function to fail.
563 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
565         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
566         when optimization level is lower than 2 or optimize for size.
568 2018-07-26  Martin Sebor  <msebor@redhat.com>
570         PR tree-optimization/86043
571         PR tree-optimization/86042
572         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
573         (get_string_cst_length): Rename...
574         (get_min_string_length): ...to this.  Add argument.
575         (handle_char_store): Extend to handle multi-character stores by
576         MEM_REF.
577         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
578         * tree.h (initializer_zerop): Add argument.
580 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
582         PR middle-end/86660
583         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
584         declare target to variables if they have always,{to,from,tofrom} map
585         kinds.
587 2018-07-26  Martin Liska  <mliska@suse.cz>
589         PR lto/86548
590         * lto-wrapper.c: Add linker_output as prefix
591         for ltrans_output_file.
593 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
595         PR rtl-optimization/85805
596         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
597         value for hard registers if that was written in the same mode.
599 2018-07-26  Martin Liska  <mliska@suse.cz>
601         PR gcov-profile/86536
602         * gcov.c (format_gcov): Use printf format %.*f directly
603         and do not handle special values.
605 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
607         * common/config/arc/arc-common.c (arc_option_optimization_table):
608         Update default optimizations for size.
610 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
612         * config/arc/arc.md (movsf_insn): Add short instruction selection.
613         * config/arc/constraints.md (CfZ): New constraint.
614         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
615         (subsf3_fpu): Likewise.
616         (cmpsf_fpu): Likewise.
617         (cmpsf_fpu_uneq): Likewise.
619 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
621         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
622         accesses as well.
623         (arc_is_uncached_mem_p): uncached applies to both the variable and
624         the pointer.
626 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
628         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
629         register names.
631 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
633         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
634         field "m_scopes" from vec to auto_vec.
636 2018-07-25  Martin Liska  <mliska@suse.cz>
638         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
639         return type.
641 2018-07-25  Richard Biener  <rguenther@suse.de>
643         PR debug/86654
644         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
645         special wrt context_die late.
646         (gen_subprogram_die): Re-use DIEs in local scope.
648 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
650         PR tree-optimization/86644
651         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
653 2018-07-25  Martin Liska  <mliska@suse.cz>
655         PR middle-end/86645
656         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
657         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
659 2018-07-25  Martin Liska  <mliska@suse.cz>
661         PR sanitizer/79635
662         * params.def: Explain ASan abbreviation and provide
663         a documentation link.
665 2018-07-24  Martin Sebor  <msebor@redhat.com>
667         PR tree-optimization/86622
668         PR tree-optimization/86532
669         * builtins.h (string_length): Declare.
670         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
671         (check_access): Be prepared for non-constant length ranges.
672         (string_length): Make extern.
673         * expr.c (string_constant): Only handle the minor non-constant
674         array index.  Use string_constant to compute the length of
675         a generic string constant.
677 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
679         PR tree-optimization/86618
680         * tree-vect-stmts.c (vectorizable_call): Don't take the address
681         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
683 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
685         PR tree-optimization/86636
686         * json.cc (json::object::set): Fix comment.  Add assertions.
687         (json::array::append): Move here from json.h.  Add comment and an
688         assertion.
689         (json::string::string): Likewise.
690         * json.h (json::array::append): Move to json.cc.
691         (json::string::string): Likewise.
692         * optinfo-emit-json.cc
693         (optrecord_json_writer::impl_location_to_json): Assert that we
694         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
695         wrapper around it.  Expand the location once, rather than three
696         times.
697         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
698         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
699         wrappers.
700         (optrecord_json_writer::optinfo_to_json): Likewise, in four
701         places.  Fix some overlong lines.
703 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
705         * config/aarch64/aarch64-simd.md
706         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
707         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
708         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
709         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
710         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
711         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
712         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
713         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
714         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
716 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
718         PR middle-end/86627
719         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
720         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
721         and abs_d == d, do the power of two handling if profitable.
723 2018-07-24  Richard Biener  <rguenther@suse.de>
725         * match.pd: Add BIT_FIELD_REF canonicalizations.
727 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
729         PR c/86617
730         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
732 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
734         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
735         terminated STRING_CST object.
737 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
739         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
741 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
743         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
744         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
745         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
746         the elements into a register.
747         (rs6000_split_v4si_init_di_reg): Delete.
748         (rs6000_split_v4si_init): Delete.
749         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
750         (vsx_init_v4si): Rewrite as a define_expand.
752 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
754         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
755         zero_extend argument from memory): New.
757 2018-07-22  Martin Sebor  <msebor@redhat.com>
759         PR bootstrap/86621
760         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
761         diagnosing calls with unknown arguments unless -Walloca-larger-than
762         is restricted to less than PTRDIFF_MAX bytes.
764 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
766         * doc/gcov.texi (Invoking Gcov): Editorial changes.
768 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
770         * pretty-print.c (text_info::set_location): Remove redundant
771         "line_table" parameter from call to rich_location::set_range.
773 2018-07-20  Martin Sebor  <msebor@redhat.com>
775         PR middle-end/82063
776         * builtins.c (expand_builtin_alloca): Adjust.
777         * calls.c (alloc_max_size): Simplify.
778         * cgraphunit.c (cgraph_node::expand): Adjust.
779         * common.opt (larger_than_size, warn_frame_larger_than): Remove
780         variables.
781         (frame_larger_than_size): Same.
782         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
783         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
784         Initialize.
785         * doc/invoke.texi (GCC Command Options): Document option arguments.
786         Explain byte-size arguments and suffixes.
787         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
788         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
789         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
790         * doc/options.texi (UInteger): Expand.
791         (Host_Wide_Int, ByteSize): Document new properties.
792         * final.c (final_start_function_1): Include sizes in an error message.
793         * function.c (frame_offset_overflow): Same.
794         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
795         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
796         Diagnose unbounded alloca calls only for limits of less than
797         PTRDIFF_MAX.
798         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
799         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
800         for alloca(0).
801         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
802         only for limits of less than PTRDIFF_MAX.
803         * langhooks-def.h (lhd_handle_option): Change function argument
804         to HOST_WIDE_INT.
805         * langhooks.c (lhd_handle_option): Same.
806         * langhooks.h (handle_option): Same.
807         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
808         ByteSize flags.
809         (var_type, var_type_struct): Same.
810         (var_set): Handle ByteSize flag.
811         * optc-gen.awk: Add comments to output to ease debugging.  Make
812         use of HOST_WIDE_INT where appropriate.
813         * opts-gen-save.awk:  Use %lx to format unsigned long.
814         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
815         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
816         arguments.  Parse bytes-size suffixes.
817         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
818         (enum_value_to_arg): Same.
819         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
820         (handle_option): Adjust.
821         (generate_option): Change function argument to HOST_WIDE_INT.
822         (cmdline_handle_error): Adjust.
823         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
824         (set_option): Change function argument to HOST_WIDE_INT.
825         (option_enabled): Handle cl_host_wide_int.
826         (get_option_state): Handle CLVC_SIZE.
827         (control_warning_option): Same.
828         * opts.c (common_handle_option): Change function argument to
829         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
830         OPT_Wvla_larger_than_.
831         * opts.h (enum cl_var_type): Add an enumerator.
832         * stor-layout.c (layout_decl): Print a more meaningful warning.
833         * toplev.c (output_stack_usage): Adjust.
835 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
837         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
838         call to inline_expand_builtin_string_cmp.
839         (expand_builtin_strcmp): Likewise.
840         (expand_builtin_strncmp): Likewise.
841         (inline_string_cmp): Delete the last parameter, change char_type_node
842         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
843         two operands.
844         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
845         the inlining expansion on target where the type of the call has same or 
846         narrower precision than unsigned char.
848 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
850         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
851         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
852         * common.opt (fsave-optimization-record): New option.
853         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
854         * doc/invoke.texi (-fsave-optimization-record): New option.
855         * dumpfile.c: Include "optinfo-emit-json.h".
856         (struct kv_pair): Move to coretypes.h.
857         (optgroup_options): Make non-static.
858         (dump_context::end_scope): Call
859         optimization_records_maybe_pop_dump_scope.
860         * dumpfile.h (optgroup_options): New decl.
861         * json.cc: New file.
862         * json.h: New file.
863         * optinfo-emit-json.cc: New file.
864         * optinfo-emit-json.h: New file.
865         * optinfo.cc: Include "optinfo-emit-json.h".
866         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
867         (optinfo_enabled_p): Check optimization_records_enabled_p.
868         (optinfo_wants_inlining_info_p): Likewise.
869         * optinfo.h: Update comment.
870         * profile-count.c (profile_quality_as_string): New function.
871         * profile-count.h (profile_quality_as_string): New decl.
872         (profile_count::quality): New accessor.
873         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
874         and optinfo_emit_json_cc_tests.
875         * selftest.h (selftest::json_cc_tests): New decl.
876         (selftest::optinfo_emit_json_cc_tests): New decl.
877         * toplev.c: Include "optinfo-emit-json.h".
878         (compile_file): Call optimization_records_finish.
879         (do_compile): Call optimization_records_start.
880         * tree-ssa-live.c: Include optinfo.h.
881         (remove_unused_scope_block_p): Retain inlining information if
882         optinfo_wants_inlining_info_p returns true.
884 2018-07-20  Richard Biener  <rguenther@suse.de>
886         PR debug/86585
887         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
888         to cover -flto-partition=none.
890 2018-07-20  Martin Liska  <mliska@suse.cz>
892         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
893         (get_decl_source_range): Remove unused function.
895 2018-07-20  Richard Biener  <rguenther@suse.de>
897         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
898         (struct vn_phi_s): Likewise.
899         (struct vn_reference_s): Likewise.
900         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
901         for searching the slot of an entry known to be in the hash itself.
902         (vn_phi_hasher::equal): Likewise.
903         (vn_reference_hasher::equal): Likewise.
904         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
905         globals.
906         (optimistic_info, current_info): Remove, keeping only valid_info.
907         (vn_reference_lookup_1): Remove fallback lookup.
908         (vn_reference_lookup_2): Likewise.
909         (vn_nary_op_lookup_1): Likewise.
910         (vn_phi_lookup): Likewise.
911         (vn_nary_build_or_lookup_1): Make sure to not chain the built
912         hash element.
913         (vn_reference_insert): Adjust, chain the inserted hash element
914         at last_inserted_ref.
915         (vn_reference_insert_pieces): Likewise.
916         (visit_reference_op_call): Likewise.
917         (vn_nary_op_insert_into): Chain the inserted hash element at
918         last_inserted_nary.
919         (vn_nary_op_insert_pieces): Adjust.
920         (vn_nary_op_insert): Likewise.
921         (vn_nary_op_insert_stmt): Likewise.
922         (vn_phi_insert): Adjust, chain the inserted hash element at
923         last_inserted_phi.
924         (process_scc): Remove clearing and copying the optimistic
925         table.  Instead remove elements inserted during an optimistic
926         iteration from the single table we maintain.
927         (init_scc_vn): Adjust.
928         (free_scc_vn): Likewise.
929         (sccvn_dom_walker::record_cond): Likewise.
930         (sccvn_dom_walker::after_dom_children): Likewise.
932 2018-07-19  Martin Sebor  <msebor@redhat.com>
934         PR tree-optimization/84047
935         PR tree-optimization/83776
936         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
937         (check_array_bounds): Call it.
939 2018-07-19  Martin Sebor  <msebor@redhat.com>
941         * align.h (align_flags): Use member initialization.
943 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
945         * Makefile.in (OBJS): Add optinfo.o.
946         * coretypes.h (class symtab_node): New forward decl.
947         (struct cgraph_node): New forward decl.
948         (class varpool_node): New forward decl.
949         * dump-context.h: New file.
950         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
951         "tree-pass.h".
952         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
953         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
954         (set_alt_dump_file): Likewise.
955         (dump_context::~dump_context): New dtor.
956         (dump_gimple_stmt): Move implementation to...
957         (dump_context::dump_gimple_stmt): ...this new member function.
958         Add the stmt to any pending optinfo, creating one if need be.
959         (dump_gimple_stmt_loc): Move implementation to...
960         (dump_context::dump_gimple_stmt_loc): ...this new member function.
961         Start a new optinfo and add the stmt to it.
962         (dump_gimple_expr): Move implementation to...
963         (dump_context::dump_gimple_expr): ...this new member function.
964         Add the stmt to any pending optinfo, creating one if need be.
965         (dump_gimple_expr_loc): Move implementation to...
966         (dump_context::dump_gimple_expr_loc): ...this new member function.
967         Start a new optinfo and add the stmt to it.
968         (dump_generic_expr): Move implementation to...
969         (dump_context::dump_generic_expr): ...this new member function.
970         Add the tree to any pending optinfo, creating one if need be.
971         (dump_generic_expr_loc): Move implementation to...
972         (dump_context::dump_generic_expr_loc): ...this new member
973         function.  Add the tree to any pending optinfo, creating one if
974         need be.
975         (dump_printf): Move implementation to...
976         (dump_context::dump_printf_va): ...this new member function.  Add
977         the text to any pending optinfo, creating one if need be.
978         (dump_printf_loc): Move implementation to...
979         (dump_context::dump_printf_loc_va): ...this new member function.
980         Start a new optinfo and add the stmt to it.
981         (dump_dec): Move implementation to...
982         (dump_context::dump_dec): ...this new member function.  Add the
983         value to any pending optinfo, creating one if need be.
984         (dump_context::dump_symtab_node): New member function.
985         (dump_context::get_scope_depth): New member function.
986         (dump_context::begin_scope): New member function.
987         (dump_context::end_scope): New member function.
988         (dump_context::ensure_pending_optinfo): New member function.
989         (dump_context::begin_next_optinfo): New member function.
990         (dump_context::end_any_optinfo): New member function.
991         (dump_context::s_current): New global.
992         (dump_context::s_default): New global.
993         (dump_scope_depth): Delete global.
994         (dumpfile_ensure_any_optinfo_are_flushed): New function.
995         (dump_symtab_node): New function.
996         (get_dump_scope_depth): Reimplement in terms of dump_context.
997         (dump_begin_scope): Likewise.
998         (dump_end_scope): Likewise.
999         (selftest::temp_dump_context::temp_dump_context): New ctor.
1000         (selftest::temp_dump_context::~temp_dump_context): New dtor.
1001         (selftest::verify_item): New function.
1002         (ASSERT_IS_TEXT): New macro.
1003         (ASSERT_IS_TREE): New macro.
1004         (ASSERT_IS_GIMPLE): New macro.
1005         (selftest::test_capture_of_dump_calls): New test.
1006         (selftest::dumpfile_c_tests): Call it.
1007         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1008         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1009         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1010         descriptive comment.
1011         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1012         (dump_node, dump_bb): Move these unrelated decls.
1013         (class dump_manager): Add leading comment.
1014         * optinfo.cc: New file.
1015         * optinfo.h: New file.
1017 2018-07-19  Michael Collison  <michael.collison@arm.com>
1018             Richard Henderson <rth@redhat.com>
1020         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1021         (subti): Handle op1 zero.
1022         (subvti4, usub4ti4): New.
1023         (*sub<GPI>3_compare1_imm): New.
1024         (sub<GPI>3_carryinCV): New.
1025         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1026         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1028 2018-07-19  Michael Collison  <michael.collison@arm.com>
1029             Richard Henderson <rth@redhat.com>
1031         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1032         (addti3): Create simpler code if low part is already known to be 0.
1033         (addvti4, uaddvti4): New.
1034         (*add<GPI>3_compareC_cconly_imm): New.
1035         (*add<GPI>3_compareC_cconly): New.
1036         (*add<GPI>3_compareC_imm): New.
1037         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1038         handle constants within this pattern..
1039         (*add<GPI>3_compareV_cconly_imm): New.
1040         (*add<GPI>3_compareV_cconly): New.
1041         (*add<GPI>3_compareV_imm): New.
1042         (add<GPI>3_compareV): New.
1043         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1044         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1045         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1046         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1047         with 'comparison' operator.
1048         (*add<GPI>3_compareV_cconly_imm): Ditto.
1049         (*add<GPI>3_compareV_cconly): Ditto.
1050         (*add<GPI>3_compareV_imm): Ditto.
1051         (add<GPI>3_compareV): Ditto.
1052         (add<mode>3_carryinC): Ditto.
1053         (*add<mode>3_carryinC_zero): Ditto.
1054         (*add<mode>3_carryinC): Ditto.
1055         (add<mode>3_carryinV): Ditto.
1056         (*add<mode>3_carryinV_zero): Ditto.
1057         (*add<mode>3_carryinV): Ditto.
1059 2018-07-19  Michael Collison  <michael.collison@arm.com>
1060             Richard Henderson <rth@redhat.com>
1062         * config/aarch64/aarch64-modes.def (CC_V): New.
1063         * config/aarch64/aarch64-protos.h
1064         (aarch64_addti_scratch_regs): Declare
1065         (aarch64_subvti_scratch_regs): Declare.
1066         (aarch64_expand_subvti): Declare.
1067         (aarch64_gen_unlikely_cbranch): Declare
1068         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1069         for signed overflow using CC_Vmode.
1070         (aarch64_get_condition_code_1): Handle CC_Vmode.
1071         (aarch64_gen_unlikely_cbranch): New function.
1072         (aarch64_addti_scratch_regs): New function.
1073         (aarch64_subvti_scratch_regs): New function.
1074         (aarch64_expand_subvti): New function.
1076 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1078         * config/aarch64/aarch64-option-extensions.def: New entry for profile
1079         extension.
1080         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1081         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1082         extension.
1084 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1086         PR target/83009
1087         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1088         address check not strict.
1090 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1092         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1093         Umq with Umn.
1094         (store_pair_lanes<mode>): Likewise.
1095         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1096         enum value 'ADDR_QUERY_LDP_STP_N'.
1097         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1098         (aarch64_print_address_internal): Add declaration.
1099         (aarch64_print_ldpstp_address): Remove.
1100         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1101         (aarch64_print_operand): Change printing of 'y'.
1102         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1103         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1104         'true' rather than '1'.
1105         * config/aarch64/constraints.md (Uml): Likewise.
1106         (Uml): Rename to Umn.
1107         (Umq): Remove.
1109 2018-07-19  Richard Biener  <rguenther@suse.de>
1111         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1112         a trailing array.
1113         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1114         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1115         (vn_reference_hasher): Likewise.
1116         (struct vn_tables_s): Remove obstack and alloc-pool members.
1117         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1118         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1119         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1120         (vn_reference_insert_pieces): Likewise.
1121         (alloc_vn_nary_op_noinit): Adjust.
1122         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1123         (vn_phi_eq): Adjust.
1124         (shared_lookup_phiargs): Remove.
1125         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1126         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1127         (visit_reference_op_call): Likewise.
1128         (copy_nary, copy_phi, copy_reference): Remove.
1129         (process_scc): Rewind the obstack when iterating.  Do not
1130         copy the elements to valid_info but just move them from one
1131         hashtable to the other.
1132         (allocate_vn_table): Adjust.
1133         (free_vn_table): Likewise.
1134         (init_scc_vn): Likewise.
1135         (free_scc_vn): Likewise.
1137 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1139         PR target/86560
1140         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1141         indirect_return as function type attribute.
1142         (ix86_attribute_table): Change indirect_return to function
1143         type attribute.
1144         * doc/extend.texi: Update indirect_return attribute.
1146 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
1148         * wide-int.h (widest2_int): New.
1149         * gimple-fold.c (arith_overflowed_p): Use it.
1150         * tree.h (widest2_int_cst): New.
1151         * tree-vrp.c (wide_int_binop_overflow): Rename from
1152         vrp_int_const_binop.
1153         Rewrite to work on trees.
1154         (extract_range_from_multiplicative_op_1): Abstract code to...
1155         (wide_int_range_min_max): ...here.
1156         (wide_int_range_cross_product): ...and here.
1157         (extract_range_from_binary_expr_1): Abstract overflow code to...
1158         (wide_int_range_mult_wrapping): ...here.
1159         * tree-vrp.h (wide_int_range_cross_product): New.
1160         (wide_int_range_mult_wrapping): New.
1162 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
1163             Julia Koval  <julia.koval@intel.com>
1165         * config/i386/x86-tune-costs.h (skylake_memcpy,
1166         skylake_memset): Replace rep_prefix with unrolling for size 512.
1168 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
1170         PR middle-end/86544
1171         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1172         in last stmt.
1174 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1176         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1177         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1178         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1179         previously known as "PowerPC AltiVec Built-in Functions".  Move
1180         some material to new subsubsections "PowerPC AltiVec Built-in
1181         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1182         ISA 2.07".
1183         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1184         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1185         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1186         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1188 2018-07-18  Richard Biener  <rguenther@suse.de>
1190         PR tree-optimization/86557
1191         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1192         EXACT_DIV_EXPR.
1194 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
1196         * config/s390/s390.c (s390_function_profiler): Generate CFI.
1198 2018-07-17  Jeff Law  <law@redhat.com>
1200         * config/arm/arm.c (get_label_padding): Update for recent
1201         changes to label_to_alignment.
1203         PR tree-optimization/86010
1204         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1206         * config/mips/mips.c (vr4130_align_insns): Update for recent
1207         changes to label_to_alignment.
1209         * config/frv/frv.c (frv_label_align): Update for recent changes
1210         to label_to_alignment.
1212         * config/nios2/nios2.c (nios2_label_align): Update for recent
1213         changes which dropped ALIGN_LABELS_LOG.
1215 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
1217         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1218         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1220 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
1222         * config/arc/arc.c (arc_label_align): Use align_labels instead of
1223         deprecated align_labels_log.
1225 2018-07-17  Richard Biener  <rguenther@suse.de>
1227         PR lto/86456
1228         * dwarf2out.c (init_sections_and_labels): Always generate
1229         a debug_line_str_section for early LTO debug.
1230         (dwarf2out_finish): Reset debug_line_str_hash output early.
1231         Bump counter for extra dwarf5 .debug_loc labels to not conflict
1232         with fat LTO part.
1233         (dwarf2out_early_finish): Output debug_line_str.
1235 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1237         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1238         index register on z196 or later.
1240 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1242         * config/s390/s390.c (s390_default_align): Set default function
1243         alignment to 16.
1244         (s390_override_options_after_change): Call s390_default align.
1245         (s390_option_override_internal): Call s390_default_align.
1246         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1248 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1250         PR middle-end/86542
1251         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1252         to _looptemp_ clauses, other than the first two.
1254 2018-07-17  Martin Liska  <mliska@suse.cz>
1256         * opts.c: Do not enable OPT_falign_* for -Os.
1258 2018-07-17  Martin Liska  <mliska@suse.cz>
1260         * align.h (MAX_CODE_ALIGN): New.
1261         (MAX_CODE_ALIGN_VALUE): New.
1262         * common/config/i386/i386-common.c (ix86_handle_option):
1263         (MAX_CODE_ALIGN): Moved to align.h.
1264         * final.c (MAX_CODE_ALIGN): Likewise.
1265         * opts.c (parse_and_check_align_values):
1266         (MAX_CODE_ALIGN): Likewise.
1267         (MAX_CODE_ALIGN_VALUE): Likewise.
1269 2018-07-17  Martin Liska  <mliska@suse.cz>
1271         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1272         in order to fulfil coding style.
1273         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1274         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1275         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1276         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1277         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1278         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1279         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1280         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1281         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1283 2018-07-17  Martin Liska  <mliska@suse.cz>
1285         * align.h: New file.
1286         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1287         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1288         align_flags of label_to_alignment.
1289         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1290         class.
1291         * config/m68k/m68k.c: Do not use removed align_labels_value and
1292         align_loops_value.
1293         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1294         (LOOP_ALIGN): Likewise.
1295         (LABEL_ALIGN): Likewise.
1296         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1297         Remove not used macro.
1298         (rs6000_loop_align): Change return type to align_flags.
1299         (rs6000_loop_align_max_skip): Remove.
1300         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1301         Change return type to align_flags.
1302         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1303         Remove not used macro.
1304         (rs6000_loop_align):  Change return type to align_flags.
1305         (rs6000_loop_align_max_skip): Remove.
1306         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1307         * config/rx/rx-protos.h (rx_align_for_label): Make it
1308         static function.
1309         * config/rx/rx.c (rx_align_for_label): Change return type
1310         to align_flags.
1311         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1312         macro definitions.
1313         into align_flags class.
1314         (LABEL_ALIGN): Likewise.
1315         (LOOP_ALIGN): Likewise.
1316         * config/s390/s390.c (s390_label_align): Use align_flags
1317         class member.
1318         (s390_asm_output_function_label): Likewise.
1319         * config/sh/sh.c (sh_override_options_after_change):
1320         Use align_flags class directly without macros.
1321         (find_barrier): Likewise.
1322         (barrier_align): Likewise.
1323         (sh_loop_align): Likewise.
1324         * config/spu/spu.c (spu_option_override):
1325         Use align_flags_tuple::get_value instead of removed macros.
1326         (spu_sched_init): Likewise.
1327         * config/spu/spu.h (GTY): Likewise.
1328         * config/visium/visium.c (visium_option_override):
1329         Set "8" as default secondary alignment.
1330         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1331         in order to guarantee secondary alignment of 8.
1332         * coretypes.h: Include align.h header file.
1333         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1334         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1335         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1336         * doc/tm.texi.in: Likewise.
1337         * final.c (struct label_alignment): Remove not used structure.
1338         (LABEL_ALIGN): Change type to align_flags.
1339         (LOOP_ALIGN): Likewise.
1340         (JUMP_ALIGN): Likewise.
1341         (default_loop_align_max_skip): Remove.
1342         (default_label_align_max_skip): Likewise.
1343         (default_jump_align_max_skip): Likewise.
1344         (default_label_align_after_barrier_max_skip):
1345         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1346         (LABEL_TO_MAX_SKIP): Remove.
1347         (label_to_alignment): Return align_flags type instead of integer.
1348         (label_to_max_skip): Remove.
1349         (align_fuzz): Use align_flags type.
1350         (compute_alignments): Use align_flags type and use align_flags::max
1351         to combine multiple alignments.
1352         (grow_label_align): Grow vec instead of C array.
1353         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1354         (shorten_branches):  Use align_flags type and use align_flags::max
1355         to combine multiple alignments.
1356         (final_scan_insn_1): Remove usage of secondary alignment that comes
1357         from label alignment, but instead use proper secondary alignment
1358         which is computed in grow_label_align.
1359         * flags.h (struct align_flags_tuple): Move to align.h.
1360         (struct align_flags): Likewise.
1361         (state_align_loops): Rename to align_loops.
1362         (state_align_jumps): Rename to align_jumps.
1363         (state_align_labels): Rename to align_labels.
1364         (state_align_functions): Rename to align_functions.
1365         (align_loops_log): Remove.
1366         (align_jumps_log): Remove.
1367         (align_labels_log): Remove.
1368         (align_functions_log): Remove.
1369         (align_loops_max_skip): Remove.
1370         (align_jumps_max_skip): Remove.
1371         (align_labels_max_skip): Remove.
1372         (align_functions_max_skip): Remove.
1373         (align_loops_value): Remove.
1374         (align_jumps_value): Remove.
1375         (align_labels_value): Remove.
1376         (align_functions_value): Remove.
1377         * output.h (label_to_alignment): Change return type to align_flags.
1378         (label_to_max_skip): Remove.
1379         * target.def: Remove loop_align_max_skip, label_align_max_skip,
1380         jump_align_max_skip macros.
1381         * targhooks.h (default_loop_align_max_skip): Remove.
1382         (default_label_align_max_skip): Likewise.
1383         (default_jump_align_max_skip): Likewise.
1384         (default_label_align_after_barrier_max_skip): Remove.
1385         * toplev.c (read_log_maxskip): Use ::normalize function.
1386         (parse_N_M): Remove not used argument and also call ::normalize.
1387         (parse_alignment_opts): Do not pass unused arguments.
1388         * varasm.c (assemble_start_function): Use directly align_functions
1389         instead of removed macros.
1390         * system.h: Do not poison removed macros.
1392 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1394         PR middle-end/86539
1395         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1396         and cond temporaries don't have reference type if iterator has
1397         pointer type.  For init use &for_pre_body instead of pre_p if
1398         for_pre_body is non-empty.
1400 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1402         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1403         double-double modes to SFmode directly directly.
1404         (trunc<mode>sf2_fprs): Delete.
1406 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1408         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1409         for conversions between IFmode and the decimal floating point modes.
1410         (init_float128_ieee): Use the correct names for conversions between
1411         KFmode and the decimal floating point modes.
1413 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1415         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1416         for the conversions between TDmode and IFmode.
1417         (init_float128_ieee): Use more correct names for the conversions
1418         between TDmode and KFmode.
1420 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
1422         PR tree-optimization/86526
1423         * builtins.c (expand_builtin_memcmp): Formatting fixes.
1424         (inline_expand_builtin_string_cmp): Likewise.
1425         (inline_string_cmp): Likewise.  Use c_readstr instead of
1426         builtin_memcpy_read_str.  Add unit_mode temporary.
1428 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1430         PR middle-end/86528
1431         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1432         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1434 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1436         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1437         Alphabetize prototypes of built-in functions, separating out
1438         built-in functions that are listed in this section but should be
1439         described elsewhere.
1441 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
1443         PR target/86511
1444         * expmed.c (emit_store_flag): Do not emit setcc followed by a
1445         conditional move when trapping comparison was split to a
1446         non-trapping one (and vice versa).
1448 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1450         * config/s390/s390.c (s390_function_profiler): Generate nops
1451         instead of profiler call sequences.
1452         * config/s390/s390.opt: Add the new option.
1454 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1456         * config/s390/s390.c (s390_function_profiler): Generate
1457         __mcount_loc section.
1458         * config/s390/s390.opt: Add the new option.
1460 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1462         * common.opt: Add the new warning.
1463         * config/s390/s390.c (s390_function_profiler): Emit "brasl
1464         %r0,__fentry__" when -mfentry is specified.
1465         (s390_option_override_internal): Disallow -mfentry for 31-bit
1466         CPUs.
1467         * config/s390/s390.opt: Add the new option.
1469 2018-07-16  Richard Biener  <rguenther@suse.de>
1471         PR lto/86523
1472         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1473         for function-local FUNCTION_DECL and RESULT_DECL immediately.
1475 2018-07-16  Martin Liska  <mliska@suse.cz>
1477         PR ipa/86529
1478         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1479         to ::get_create.
1481 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1483         * config/arc/arcHS.md: Update ARCHS scheduling rules.
1485 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1487         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1488         for ARCHS4x.
1489         * config/arc/arc-cpus.def (hs4x): New cpu.
1490         (hs4xd): Likewise.
1491         * config/arc/arc-tables.opt: Regenerate.
1492         * config/arc/arc.c (arc_sched_issue_rate): New function.
1493         (TARGET_SCHED_ISSUE_RATE): Define.
1494         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1495         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1496         fpu_cvt.
1497         (attr tune): Add ARCHS4x tune values.
1498         (attr tune_dspmpy): Define.
1499         (*tst): Correct instruction type.
1500         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1501         * config/arc/arcHS4x.md: New file.
1502         * config/arc/fpu.md: Update instruction type attributes.
1503         * config/arc/t-multilib: Regenerate.
1505 2018-07-16  Tom de Vries  <tdevries@suse.de>
1507         PR debug/86455
1508         * var-tracking.c (vt_initialize): Fix pre_dec handling.
1510 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1512         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1513         early clobber.
1515 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
1517         PR tree-optimization/86514
1518         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1519         conversion to a boolean type from a type with greater precision.
1521 2018-07-16  Tom de Vries  <tdevries@suse.de>
1523         * var-tracking.c (vt_initialize): Print adjusted insn slim if
1524         dump_flags request TDF_SLIM.
1526 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
1528         * fold-const.c (int_const_binop_1): Abstract...
1529         (wide_int_binop): ...wide int code here.
1530         (poly_int_binop): ...poly int code here.
1531         Abstract the rest of int_const_binop_1 into int_const_binop.
1532         * fold-const.h (wide_int_binop): New.
1533         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1534         Remove useless PLUS/MINUS_EXPR case.
1535         (zero_nonzero_bits_from_vr): Move wide int code...
1536         (zero_nonzero_bits_from_bounds): ...here.
1537         (extract_range_from_binary_expr_1): Move mask optimization code...
1538         (range_easy_mask_min_max): ...here.
1539         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1540         (range_easy_mask_min_max): New.
1542 2018-07-15  Jeff Law  <law@redhat.com>
1544         PR target/85993
1545         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1546         block.
1548 2018-07-14  Jim Wilson  <jimw@sifive.com>
1550         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1552 2018-07-14  Paul Koning  <ni1d@arrl.net>
1554         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1556 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
1558         * lto-streamer-out.c (copy_function_or_variable): Dump info about
1559         copying section.
1561 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
1562             Steve Munroe  <munroesj52@gmail.com>
1564         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1565         (_mm_andnot_si128): Likewise.
1566         (_mm_or_si128): Likewise.
1567         (_mm_xor_si128): Likewise.
1569 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
1571         PR middle-end/78809
1572         * builtins.c (expand_builtin_memcmp): Inline the calls first
1573         when result_eq is false.
1574         (expand_builtin_strcmp): Inline the calls first.
1575         (expand_builtin_strncmp): Likewise.
1576         (inline_string_cmp): New routine. Expand a string compare
1577         call by using a sequence of char comparison.
1578         (inline_expand_builtin_string_cmp): New routine. Inline expansion
1579         a call to str(n)cmp/memcmp.
1580         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1581         New option.
1582         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1584 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
1586         * config/arm/driver-arm.c: Include arm-native.h.
1587         (host_detect_local_cpu): Use auto-generated data tables.
1588         (vendors, arm_cpu_table): Delete.  Move part information to ...
1589         * config/arm/arm-cpus.in: ... here.
1590         * config/arm/parsecpu.awk (gen_native): New function.
1591         (vendor, part): New CPU fields.
1592         (END): Add support for building the native CPU detection tables.
1593         * config/arm/t-arm (arm-native.h): Add build rule.
1594         (driver-arm.o): Add dependency on arm-native.h.
1596 2018-07-13  Richard Biener  <rguenther@suse.de>
1598         PR middle-end/85974
1599         * match.pd (addr1 - addr2): Allow either of the operand to
1600         have a conversion.
1602 2018-07-13  Tom de Vries  <tdevries@suse.de>
1604         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1605         in remap_ssa_name.
1607 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
1609         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1610         arrays instead of numbered variables.
1612 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
1614         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1615         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1617 2018-07-13  Richard Biener  <rguenther@suse.de>
1619         PR debug/86452
1620         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1621         instead of get_context_die.
1623 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
1624             Richard Biener  <rguenther@suse.de>
1626         PR middle-end/86489
1627         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1628         that the loop latch destination where phi is defined.
1630 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
1632         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1633         (riscv_expand_epilogue): Add assertion to check interrupt mode.
1634         (riscv_set_current_function): Extract getting interrupt type to new
1635         function.
1636         (riscv_get_interrupt_type): New function.
1637         (riscv_merge_decl_attributes): New function, checking interrupt type is
1638         same.
1639         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1641 2018-07-12  Paul Koning  <ni1d@arrl.net>
1643         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1644         directive.
1646 2018-07-12  Paul Koning  <ni1d@arrl.net>
1648         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1649         zero reference, add doloop_end instead.
1650         * doc/md.texi (decrement_and_branch_until_zero): Remove.
1651         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
1652         detail for doloop_end.
1654 2018-07-12  Martin Sebor  <msebor@redhat.com>
1656         PR c/86453
1657         * attribs.c (decl_attributes): Reject conflicting attributes before
1658         calling attribute handlers.
1660 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1662         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1663          parameter.
1664         (gcc::dump_manager::get_dump_file_name): likewise.
1665         (dump_begin): Likewise.
1666         * dumpfile.h (dump_begin): Update prototype.
1667         (gcc::dump_manager::get_dump_file_name,
1668         gcc::dump_manager::get_dump_file_name): Update prototype.
1670 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1672         * internal-fn.h (vectorizable_internal_fn_p): New function.
1673         * tree-vect-slp.c (compatible_calls_p): Likewise.
1674         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
1675         to internal functions.
1676         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1678 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1680         * fold-const.h (inverse_conditions_p): Declare.
1681         * fold-const.c (inverse_conditions_p): New function.
1682         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
1683         that test the inverse condition of a conditional internal function.
1684         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1685         * internal-fn.c (internal_fn_mask_index): Handle conditional
1686         internal functions.
1687         (vectorized_internal_fn_supported_p): New function.
1688         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1689         (any_pred_load_store): Replace with...
1690         (need_to_predicate): ...this new variable.
1691         (redundant_ssa_names): New variable.
1692         (ifcvt_can_use_mask_load_store): Move initial checks to...
1693         (ifcvt_can_predicate): ...this new function.  Handle tree codes
1694         for which a conditional internal function exists.
1695         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1696         instead of ifcvt_can_use_mask_load_store.  Update after variable
1697         name change.
1698         (predicate_load_or_store): New function, split out from
1699         predicate_mem_writes.
1700         (check_redundant_cond_expr): New function.
1701         (value_available_p): Likewise.
1702         (predicate_rhs_code): Likewise.
1703         (predicate_mem_writes): Rename to...
1704         (predicate_statements): ...this.  Use predicate_load_or_store
1705         and predicate_rhs_code.
1706         (combine_blocks, tree_if_conversion): Update after above name changes.
1707         (ifcvt_local_dce): Handle redundant_ssa_names.
1708         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1709         general conditional functions.
1710         * tree-vect-stmts.c (vectorizable_call): Likewise.
1712 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1713             Alan Hayward  <alan.hayward@arm.com>
1714             David Sherwood  <david.sherwood@arm.com>
1716         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1717         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1718         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1719         plus and minus and convert them into IFN_COND_FMA-based sequences.
1720         (convert_mult_to_fma): Handle conditional plus and minus.
1722 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1724         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1725         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1726         (cond_fnms_optab): New optabs.
1727         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1728         internal functions.
1729         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1730         * internal-fn.h (get_conditional_internal_fn): Declare.
1731         (get_unconditional_internal_fn): Likewise.
1732         * internal-fn.c (cond_ternary_direct): New macro.
1733         (expand_cond_ternary_optab_fn): Likewise.
1734         (direct_cond_ternary_optab_supported_p): Likewise.
1735         (FOR_EACH_COND_FN_PAIR): Likewise.
1736         (get_conditional_internal_fn): New function.
1737         (get_unconditional_internal_fn): Likewise.
1738         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1739         (gimple_match_op::gimple_match_op): Add a new overload for 5
1740         operands.
1741         (gimple_match_op::set_op): Likewise.
1742         (gimple_resimplify5): Declare.
1743         * genmatch.c (decision_tree::gen): Generate simplifications for
1744         5 operands.
1745         * gimple-match-head.c (gimple_simplify): Define an overload for
1746         5 operands.  Handle calls with 5 arguments in the top-level overload.
1747         (convert_conditional_op): Handle conversions from unconditional
1748         internal functions to conditional ones.
1749         (gimple_resimplify5): New function.
1750         (build_call_internal): Pass a fifth operand.
1751         (maybe_push_res_to_seq): Likewise.
1752         (try_conditional_simplification): Try converting conditional
1753         internal functions to unconditional internal functions.
1754         Handle 3-operand unconditional forms.
1755         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1756         Define ternary equivalents of the current rules for binary conditional
1757         internal functions.
1758         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1759         ternary operations.
1760         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1761         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1762         (optab): Handle them.
1763         (SVE_COND_FP_TERNARY): New int iterator.
1764         (sve_fmla_op, sve_fmad_op): New int attributes.
1765         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1766         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1767         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1769 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1771         * target.def (preferred_else_value): New target hook.
1772         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1773         * doc/tm.texi: Regenerate.
1774         * targhooks.h (default_preferred_else_value): Declare.
1775         * targhooks.c (default_preferred_else_value): New function.
1776         * internal-fn.h (conditional_internal_fn_code): Declare.
1777         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1778         (get_conditional_internal_fn): Use it.
1779         (conditional_internal_fn_code): New function.
1780         * gimple-match.h (gimple_match_cond): New struct.
1781         (gimple_match_op): Add a cond member function.
1782         (gimple_match_op::gimple_match_op): Update all forms to take a
1783         gimple_match_cond.
1784         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1785         for the suboperation, but don't specify a particular else_value.
1786         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1787         (visit_nary_op, visit_reference_op_load): Pass
1788         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1789         * gimple-match-head.c: Include tree-eh.h
1790         (convert_conditional_op): New function.
1791         (maybe_resimplify_conditional_op): Likewise.
1792         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1793         (gimple_resimplify2): Likewise.
1794         (gimple_resimplify3): Likewise.
1795         (gimple_resimplify4): Likewise.
1796         (maybe_push_res_to_seq): Return null for conditional operations.
1797         (try_conditional_simplification): New function.
1798         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1799         constructor.
1800         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1801         IFN_COND_* call.
1802         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1803         function.
1804         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1806 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1808         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1809         DECL_FCONTEXT
1810         (hash_tree): Do not hash DECL_FCONTEXT
1811         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1812         Do not stream DECL_FCONTEXT.
1813         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1814         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1816 2018-07-12  Richard Biener  <rguenther@suse.de>
1818         PR debug/86462
1819         * dwarf2out.c (gen_block_die): Only output blocks when they have
1820         at least one !DECL_IGNORED_P variable.
1822 2018-07-12  Richard Biener  <rguenther@suse.de>
1824         PR target/84829
1825         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1826         Remove -mieee-fp handling.
1828 2018-07-12  Richard Biener  <rguenther@suse.de>
1830         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1831         left-over from last patch.
1833 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
1835         PR tree-optimization/86492
1836         * gimple-ssa-store-merging.c
1837         (imm_store_chain_info::coalesce_immediate_stores): Call
1838         check_no_overlap even for the merge_overlapping case.  Formatting fix.
1840 2018-07-12  Richard Biener  <rguenther@suse.de>
1842         PR middle-end/86479
1843         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1844         move possibly trapping operations into the conditional.
1846 2018-07-12  Richard Biener  <rguenther@suse.de>
1848         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1849         (vn_lookup_simplify_result): Remove recursion limit applied
1850         here.
1851         (vn_nary_build_or_lookup_1): Adjust.
1852         (try_to_simplify): Likewise.
1853         * gimple-match-head.c (gimple_resimplify1): Instead apply one
1854         here.
1855         (gimple_resimplify2): Likewise.
1856         (gimple_resimplify3): Likewise.
1857         (gimple_resimplify4): Likewise.
1859 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
1861         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1862         Use __mmask64 type instead of __mmask8 for __M argument.
1863         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1864         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1865         __U argument.
1866         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1867         __mmask16 for __M argument.
1868         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1869         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1870         to __mmask16 instead of __mmask8.
1871         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1872         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1873         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1874         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1875         instead of __mmask16 for __U argument.
1876         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1877         __mmask16 instead of __mmask8 for __U argument.
1878         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1879         __U argument.
1880         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1881         __mmask16.
1882         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1883         argument.
1884         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1885         __U argument.
1886         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1887         __mmask16.
1888         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1889         of __mmask16.
1890         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1891         __U argument.
1892         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1893         __U argument.
1894         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1895         __U argument.
1896         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1897         __U argument.
1898         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1899         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1900         return type as well as __M argument type and all casts from __mmask8
1901         to __mmask32.
1902         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1903         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1904         return type as well as __M argument type and all casts from __mmask8
1905         to __mmask16.
1906         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1907         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1908         return type as well as __M argument type and all casts from __mmask8
1909         to __mmask32.
1910         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1911         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1912         return type as well as __M argument type and all casts from __mmask8
1913         to __mmask16.
1914         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1915         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1916         __mmask16.
1918 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
1920         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1921         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1922         for __U argument.
1924 2018-07-11  Paul Koning  <ni1d@arrl.net>
1926         * doc/md.texi (define_subst): Document how multiple occurrences of
1927         the same argument in the replacement pattern are handled.
1929 2018-07-11  Paul Koning  <ni1d@arrl.net>
1931         * doc/extend.texi (Common Variable Attributes): Move "mode" into
1932         alphabetical order.
1933         (Common Type Attributes): Add "mode" attribute.
1935 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
1937         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1938         stream DECL_ORIGINAL_TYPE.
1939         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1940         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1941         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1942         Do not walk original type.
1943         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1944         external decls.
1945         (write_ts_decl_non_common_tree_pointers): Do not stream
1946         DECL_ORIGINAL_TYPE
1947         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1948         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1950 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1952         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1953         thread twice from the same starting edge.
1955 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
1957         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1958         * gimple.c (gimple_call_nonnull_result_p): ...here...
1959         (gimple_call_nonnull_arg): ...and here.
1960         * gimple.h (gimple_call_nonnull_result_p): New.
1961         (gimple_call_nonnull_arg): New.
1963 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
1965         * config/arm/arm-cpus.in: Move information from fpu field of each
1966         cpu definition to the isa field.
1967         * config/arm/parsecpu.awk (fpu): Delete match rule.
1968         (gen_comm_data): Don't add bits from the CPU's FPU entry.
1970 2018-07-11  Richard Biener  <rguenther@suse.de>
1972         PR debug/86457
1973         * dwarf2out.c (init_sections_and_labels): Use
1974         output_asm_line_debug_info consistently.
1975         (dwarf2out_early_finish): Likewise.
1976         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1977         type units.
1979 2018-07-11  Richard Biener  <rguenther@suse.de>
1981         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1982         Rework father_bb setting in a way to avoid propagating constants
1983         multiple times on a loop body.
1985 2018-07-10  Mark Wielaard  <mark@klomp.org>
1987         PR debug/86459
1988         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
1990 2018-07-10  Richard Biener  <rguenther@suse.de>
1992         * hash-map.h (hash_map::iterator::operator*): Return
1993         references to key and value.
1995 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1997         PR c++/86443
1998         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
1999         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2000         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2001         (gimplify_omp_for): For composite loops, move outer
2002         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2003         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
2004         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
2005         TREE_LIST for both the original class iterator and the "last" helper
2006         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
2007         loop, remember has_decl_expr from outer composite loops for the
2008         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2010 2018-07-09  Martin Sebor  <msebor@redhat.com>
2012         PR middle-end/77357
2013         PR middle-end/86428
2014         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2015         accessing implicitly initialized array elements.
2016         * expr.c (string_constant): Handle string initializers of
2017         character arrays within aggregates.
2018         * gimple-fold.c (fold_array_ctor_reference): Add argument.
2019         Store element offset.  As a special case, handle zero size.
2020         (fold_nonarray_ctor_reference): Same.
2021         (fold_ctor_reference): Add argument.  Store subobject offset.
2022         * gimple-fold.h (fold_ctor_reference): Add argument.
2024 2018-07-09  Paul Koning  <ni1d@arrl.net>
2026         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2027         (pdp11_insn_cost): New function.
2028         (pdp11_md_asm_adjust): New function.
2029         (TARGET_INVALID_WITHIN_DOLOOP): Define.
2030         (pdp11_rtx_costs): Update to match machine better.
2031         (output_addr_const_pdp11): Correct format mismatch warnings.
2032         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2033         * config/pdp11/pdp11.md: General change to add base_cost and/or
2034         length attributes for use by new pdp11_insn_cost function.
2035         (MIN_BRANCH): Correct definition.
2036         (MIN_SOB): Ditto.
2037         (doloop_end): Use standard pattern name for looping pattern.
2038         (doloop_end_nocc): New.
2039         (movsf): Add another constraint alternative.
2040         (zero_extendqihi2): Add constraint alternatives for not in place
2041         extend.
2042         (zero_extendhisi2): Remove.
2043         (shift patterns): Add CC handling variants.
2044         (bswaphi2): New.
2045         (bswapsi2): New.
2046         (rothi3): New.
2047         (define_peephole2): New peephole to recognize mov that sets CC for
2048         subsequent test.
2050 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2052         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2053         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2054         wi::add.
2056 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
2058         PR c/86420
2059         * real.c (real_nextafter): Return true if result is denormal.
2061 2018-07-09  Martin Liska  <mliska@suse.cz>
2063         * common.opt: Add back wrongly removed attribute.
2065 2018-07-09  Richard Biener  <rguenther@suse.de>
2067         PR debug/86413
2068         * dwarf2out.c (gen_block_die): For an early generated DIE
2069         always output high/low PC attributes.
2071 2018-07-09  Tom de Vries  <tdevries@suse.de>
2073         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2074         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2075         onto VAR_DECL with abstract origin.
2077 2018-07-07  Jim Wilson  <jimw@sifive.com>
2079         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2081 2018-07-07  Tom de Vries  <tdevries@suse.de>
2083         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2085 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
2087         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2088         overflow_type.
2089         (combine_bound): Use wide-int overflow calculation instead of
2090         rolling our own.
2091         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2092         overflow_type.
2093         * fold-const.c (int_const_binop_2): Same.
2094         (extract_muldiv_1): Same.
2095         (fold_div_compare): Same.
2096         (fold_abs_const): Same.
2097         * match.pd: Same.
2098         * poly-int.h (add): Same.
2099         (sub): Same.
2100         (neg): Same.
2101         (mul): Same.
2102         * predict.c (predict_iv_comparison): Same.
2103         * profile-count.c (slow_safe_scale_64bit): Same.
2104         * simplify-rtx.c (simplify_const_binary_operation): Same.
2105         * tree-chrec.c (tree_fold_binomial): Same.
2106         * tree-data-ref.c (split_constant_offset_1): Same.
2107         * tree-if-conv.c (idx_within_array_bound): Same.
2108         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2109         * tree-ssa-phiopt.c (minmax_replacement): Same.
2110         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2111         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2112         * vr-values.c (vr_values::adjust_range_with_scev): Same.
2113         * wide-int.cc (wi::add_large): Same.
2114         (wi::mul_internal): Same.
2115         (wi::sub_large): Same.
2116         (wi::divmod_internal): Same.
2117         * wide-int.h: Change overflow type to overflow_type for neg, add,
2118         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2119         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2120         mul_internal, divmod_internal.
2121         (overflow_type): New enum.
2122         (accumulate_overflow): New.
2124 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2126         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2127         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2129 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2131         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2132         argument is checked for zero before entering loop, avoid checking again.
2134 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2136         * gimplify.h (generic_expr_could_trap_p): Set as global function.
2137         * gimplify.h (generic_expr_could_trap_p): Likwise.
2138         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2140 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
2142         PR tree-optimization/86401
2143         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2144         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2145         (fold_bit_and_mask): ... here.  New helper function for match.pd.
2146         * fold-const.h (fold_bit_and_mask): Declare.
2147         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2149 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
2151         PR target/86324
2152         * target.def (translate_mode_attribute): New hook.
2153         * targhooks.h (default_translate_mode_attribute): Declare.
2154         * targhooks.c (default_translate_mode_attribute): New function.
2155         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2156         * doc/tm.texi: Regenerate.
2157         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2158         (rs6000_translate_mode_attribute): New function.
2160 2018-07-06  Paul Koning  <ni1d@arrl.net>
2162         * doc/md.texi (define_split): Document DONE and FAIL.
2163         (define_peephole2): Ditto.
2165 2018-07-05  Jeff Law  <law@redhat.com>
2167         PR tree-optimization/86010
2168         * tree-ssa-dse.c (compute_trims): More aggressively trim at
2169         both the head and tail of mem* and str* calls.
2171 2018-07-05  Jim Wilson  <jimw@sifive.com>
2173         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2175 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
2177         * config/aarch64/aarch64-simd.md: correct flags text for
2178         MIN_EXPR replacement.
2180 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
2182         * configure: Regenerated.
2184 2018-07-05  Carl Love  <cel@us.ibm.com>
2186         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2187         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2188         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2189         VSX_BUILTIN_DOUBLEL_V4SF.
2191 2018-07-05  Martin Sebor  <msebor@redhat.com>
2193         PR c++/86400
2194         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2195         than its domain to compute its the upper bound of a char array.
2197 2018-07-05  Nathan Sidwell  <nathan@acm.org>
2199         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2200         * doc/cpp.texi: Update comment.
2201         * doc/tm.texi: Rebuilt.
2202         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2203         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2204         * doc/extend.texi (Backwards Compatibility): Clarify it is system
2205         headers affected by extern "C".
2206         * system.h: Poison NO_IMPLICIT_EXTERN_C.
2207         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2208         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2209         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2210         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2211         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2212         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2213         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2214         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2215         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2216         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2217         config/sparc/sp64-elf.h, config/spu/spu.h,
2218         config/stormy16/stormy16.h, config/v850/v850.h,
2219         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2220         define NO_IMPLICIT_EXTERN_C.
2221         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2223 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2225         PR target/84711
2226         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2227         instead of GET_MODE_SIZE when comparing Units.
2229 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2231         PR target/84711
2232         * rtlanal.c (set_noop_p): Constrain on mode change,
2233         include hard-reg-set.h
2235 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2237         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2239 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
2241         Revert
2242         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2244         PR sanitizer/84250
2245         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2246         libasan.
2247         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2249 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2251         PR sanitizer/84250
2252         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2253         libasan.
2254         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2256 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
2258         PR middle-end/86380
2259         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2261 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
2263         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2264         neg_*_op* variables.
2266 2018-07-04  Martin Liska  <mliska@suse.cz>
2268         * tree-switch-conversion.c: Define
2269         max_ratio_for_speed and max_ratio_for_size constants.
2271 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2272             Martin Liska  <mliska@suse.cz>
2274         PR middle-end/66240
2275         PR target/45996
2276         PR c/84100
2277         * common.opt: Rename align options with 'str_' prefix.
2278         * common/config/i386/i386-common.c (set_malign_value): New
2279         function.
2280         (ix86_handle_option): Use it to set -falign-* options/
2281         * config/aarch64/aarch64-protos.h (struct tune_params): Change
2282         type from int to string.
2283         * config/aarch64/aarch64.c: Update default values from int
2284         to string.
2285         * config/alpha/alpha.c (alpha_override_options_after_change):
2286         Likewise.
2287         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2288         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2289         max skip conditionally.
2290         * config/i386/freebsd.h (SUBALIGN_LOG): New.
2291         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2292         max skip conditionally.
2293         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2294         max skip conditionally.
2295         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2296         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2297         max skip conditionally.
2298         * config/i386/i386.c (struct ptt): Change type from int to
2299         string.
2300         (ix86_default_align): Set default values.
2301         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2302         max skip conditionally.
2303         * config/i386/iamcu.h (SUBALIGN_LOG): New.
2304         (ASM_OUTPUT_MAX_SKIP_ALIGN):
2305         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2306         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2307         max skip conditionally.
2308         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2309         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2310         * config/i386/x86-64.h (SUBALIGN_LOG): New.
2311         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2312         max skip conditionally.
2313         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2314         * config/ia64/ia64.c (ia64_option_override): Set default values
2315         for alignment options.
2316         * config/m68k/m68k.c: Handle new str_align_* options.
2317         * config/mips/mips.c (mips_set_compression_mode): Change
2318         type of constants.
2319         (mips_option_override): Set default values for options.
2320         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2321         Likewise.
2322         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2323         Likewise.
2324         * config/rx/rx.c (rx_option_override): Likewise.
2325         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2326         (LABEL_ALIGN): Use align_labels_log.
2327         (LOOP_ALIGN): Use align_loops_align.
2328         * config/s390/s390.c (s390_asm_output_function_label): Use new
2329         macros.
2330         * config/sh/sh.c (sh_override_options_after_change):
2331         Change type of constants.
2332         * config/spu/spu.c (spu_sched_init): Likewise.
2333         * config/sparc/sparc.c (sparc_option_override): Set default
2334         values for options.
2335         * config/visium/visium.c (visium_option_override): Likewise.
2336         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2337         emit p2align format with last argument if it's not needed.
2338         * doc/invoke.texi: Document extended format of -falign-*.
2339         * final.c: Use align_labels alignment.
2340         * flags.h (struct target_flag_state): Change type to use
2341         align_flags.
2342         (struct align_flags_tuple): New.
2343         (struct align_flags): Likewise.
2344         (align_loops_log): Redefine macro to use new types.
2345         (align_loops_max_skip): Redefine macro to use new types.
2346         (align_jumps_log): Redefine macro to use new types.
2347         (align_jumps_max_skip): Redefine macro to use new types.
2348         (align_labels_log): Redefine macro to use new types.
2349         (align_labels_max_skip): Redefine macro to use new types.
2350         (align_functions_log): Redefine macro to use new types.
2351         (align_loops): Redefine macro to use new types.
2352         (align_jumps): Redefine macro to use new types.
2353         (align_labels): Redefine macro to use new types.
2354         (align_functions): Redefine macro to use new types.
2355         (align_functions_max_skip): Redefine macro to use new types.
2356         (align_loops_value): New macro.
2357         (align_jumps_value): New macro.
2358         (align_labels_value): New macro.
2359         (align_functions_value): New macro.
2360         * function.c (invoke_set_current_function_hook): Propagate
2361         alignment values from flags to global variables default in
2362         topleev.h.
2363         * ipa-icf.c (sem_function::equals_wpa): Use
2364         cl_optimization_option_eq instead of memcmp.
2365         * lto-streamer.h (cl_optimization_stream_out): Support streaming
2366         of string types.
2367         (cl_optimization_stream_in): Likewise.
2368         * optc-save-gen.awk: Support strings in cl_optimization.
2369         * opth-gen.awk: Likewise.
2370         * opts.c (finish_options): Remove error checking of invalid
2371         value ranges.
2372         (MAX_CODE_ALIGN): Remove.
2373         (MAX_CODE_ALIGN_VALUE): Likewise.
2374         (parse_and_check_align_values): New function.
2375         (check_alignment_argument): Likewise.
2376         (common_handle_option): Use check_alignment_argument.
2377         * opts.h (parse_and_check_align_values): Declare.
2378         * toplev.c (init_alignments): Remove.
2379         (read_log_maxskip): New.
2380         (parse_N_M): Likewise.
2381         (parse_alignment_opts): Likewise.
2382         (backend_init_target): Remove usage of init_alignments.
2383         * toplev.h (parse_alignment_opts): Declare.
2384         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2385         argument.
2386         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2387         * tree.c (cl_option_hasher::equal): New.
2388         * varasm.c: Use new global macros.
2390 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2392         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2393         Use a simpler align directive also if MAXSKIP = ALIGN-1.
2394         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2395         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2396         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2397         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2398         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2399         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2400         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2401         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2402         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2403         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2404         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2406 2018-07-04  Martin Liska  <mliska@suse.cz>
2407             Jonathan Wakely  <jwakely@redhat.com>
2409         * coverage.c: Use correct type.
2410         * doc/invoke.texi: Language correction.
2412 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
2414         PR target/85620
2415         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2416         ENDBRANCH for non-tail call which may return via indirect branch.
2417         * doc/extend.texi: Document indirect_return attribute.
2419 2018-07-03  Martin Sebor  <msebor@redhat.com>
2421         PR tree-optimization/86274
2422         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2423         precondition.
2424         (format_floating): Correct handling of infinities and NaNs.
2426 2018-07-03  Martin Sebor  <msebor@redhat.com>
2428         * print-tree.c (print_real_cst): New function.
2429         (print_node_brief): Call it.
2430         (print_node): Ditto.
2432 2018-07-03  Jeff Law  <law@redhat.com>
2434         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2435         into a single pattern.
2437         * config/h8300/h8300.md (ors code_iterator): New.
2438         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2439         a single pattern and single splitter.
2440         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2441         (iorqi3_1, xorqi3_1): Likewise.
2442         (iorqi3, xorqi3 expanders): Similarly.
2444         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2445         (movmd_internal) into a single pattern using the P mode iterator.
2446         (movmd splitters): Similarly.
2447         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2448         (movsd splitters): Similarly.
2450         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2451         ADDB, ADDW and ADDL into a single ADD attribute which selects the
2452         right table based on the size of the operand.
2453         * config/h8300/h8300.md (length_table): Corresponding changes. All
2454         references to "addb", "addw" and "addl" changed to "add".
2455         (btst patterns): Merge two variants into a single pattern.
2456         (tstqi, tsthi): Likewise.
2457         (addhi3_incdec, addsi3_incdec): Likewise.
2458         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2459         (mulhi3, mulsi3): Likewise.
2460         (udivhi3, udivsi3): Likewise.
2461         (divhi3, divsi3): Likewise.
2462         (andorqi3, andorhi3, andorsi3): Likewise.
2464 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
2466         PR target/85694
2467         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2468         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2470 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2472         PR tree-optimization/85694
2473         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2474         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2475         UNSPEC_URHADD.
2476         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2477         (<u>avg<mode>3_ceil): New patterns.
2479 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
2481         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2482         scan-tree-dump directive.
2483         * gcc.dg/vect/slp-perm-2.c: Likewise.
2484         * gcc.dg/vect/slp-perm-3.c: Likewise.
2485         * gcc.dg/vect/slp-perm-5.c: Likewise.
2486         * gcc.dg/vect/slp-perm-6.c: Likewise.
2487         * gcc.dg/vect/slp-perm-7.c: Likewise.
2488         * gcc.dg/vect/slp-perm-8.c: Likewise.
2490 2018-07-03  Marek Polacek  <polacek@redhat.com>
2492         PR middle-end/86202
2493         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2495 2018-07-03  Richard Biener  <rguenther@suse.de>
2497         PR ipa/86389
2498         * tree-ssa-structalias.c (find_func_clobbers): Properly
2499         handle indirect calls.
2501 2018-07-03  Jeff Law  <law@redhat.com>
2503         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2504         (shifts): New code iterator.
2505         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2506         expander.  Fix HImode handling on H8/SX.
2507         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2508         (subqi3, subhi3, subsi3 expanders): Likewise.
2509         (andqi3, andhi3, andsi3 expanders): Likewise.
2510         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2511         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2512         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2513         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2514         (zero_extendqihi2, zero_extendqisi2): Likewise.
2515         (extendqihi2, extendqisi2): Likewise.
2516         (rotlqi3, rotlhi3, rotlsi3): Likewise.
2517         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2518         (rotlqi3_1, rotlhi3_1): Likewise.
2519         (logicalhi3_sn, logicalsi3_sn): Likewise.
2520         (logicalhi3, logicalsi3): Likewise.
2522 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2524         * tree-vect-patterns.c (vect_recog_rotate_pattern)
2525         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2526         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2527         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2528         type to append_pattern_def_seq instead of creating a stmt_vec_info
2529         directly.
2530         (build_mask_conversion): Likewise.  Remove vinfo argument.
2531         (vect_add_conversion_to_patterm): Likewise, renaming to...
2532         (vect_add_conversion_to_pattern): ...this.
2533         (vect_recog_mask_conversion_pattern): Update call to
2534         build_mask_conversion.  Pass the vector type to
2535         append_pattern_def_seq here too.
2536         (vect_recog_gather_scatter_pattern): Update call to
2537         vect_add_conversion_to_pattern.
2539 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2541         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2542         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2543         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2544         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2545         STMT_VINFO_PATTERN_DEF_SEQ to null here.
2546         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2547         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2548         append_pattern_def_seq instead of new_pattern_def_seq.
2549         (vect_recog_divmod_pattern): Do both of the above.
2550         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2551         is null.
2553 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2555         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2556         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2557         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2558         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2559         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2560         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2561         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2562         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2563         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2564         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2565         parameter with a single stmt_vec_info.
2566         (vect_recog_func_ptr): Likewise.
2567         (vect_recog_gather_scatter_pattern): Likewise, folding in...
2568         (vect_try_gather_scatter_pattern): ...this.
2569         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2570         the stmt_vec_info of the statement to be matched.  Don't clear
2571         STMT_VINFO_RELATED_STMT.
2572         (vect_pattern_recog): Update call accordingly.
2574 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2576         PR tree-optimization/85694
2577         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2578         (uavgM3_ceil): Document new optabs.
2579         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2580         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2581         functions.
2582         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2583         (savg_ceil_optab): New optabs.
2584         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2585         (vect_vect_recog_func_ptrs): Add it.
2586         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2587         constant directly from the associated lhs.
2589 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2591         * tree-vect-patterns.c (vect_split_statement): New function.
2592         (vect_convert_input): Use it to try to split an existing cast.
2594 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2596         * poly-int.h (print_hex): New function.
2597         * dumpfile.h (dump_dec, dump_hex): Declare.
2598         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2599         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2600         min_input_precision, operation_precision and operation_sign.
2601         * tree-vect-patterns.c (vect_get_range_info): New function.
2602         (vect_same_loop_or_bb_p, vect_single_imm_use)
2603         (vect_operation_fits_smaller_type): Delete.
2604         (vect_look_through_possible_promotion): Add an optional
2605         single_use_p parameter.
2606         (vect_recog_over_widening_pattern): Rewrite to use new
2607         stmt_vec_info infomration.  Handle one operation at a time.
2608         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2609         (vect_truncatable_operation_p, vect_set_operation_type)
2610         (vect_set_min_input_precision): New functions.
2611         (vect_determine_min_output_precision_1): Likewise.
2612         (vect_determine_min_output_precision): Likewise.
2613         (vect_determine_precisions_from_range): Likewise.
2614         (vect_determine_precisions_from_users): Likewise.
2615         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2616         (vect_vect_recog_func_ptrs): Put over_widening first.
2617         Add cast_forwprop.
2618         (vect_pattern_recog): Call vect_determine_precisions.
2620 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2622         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2623         statements that have been replaced by further pattern statements.
2624         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2626 2018-07-03  Richard Biener  <rguenther@suse.de>
2628         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2629         always set *dt.  Dump vectype in vectype overload.
2630         * dumpfile.h (dump_gimple_expr): New function.
2631         (dump_gimple_expr_loc): Likewise.
2632         * dumpfile.c (dump_gimple_expr): New function.
2633         (dump_gimple_expr_loc): Likewise.
2635 2018-07-02  Jeff Law  <law@redhat.com>
2637         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2638         the H8/300, H8/300H and H8/S variants into a single pattern.
2639         (movhi_h8300, movqi_h8300hs): Similarly.
2640         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2641         (QHI mode iterator): New.
2643         * config/h8300/h8300.md: Remove trailing whitespace.
2645 2018-07-02  Jim Wilson  <jimw@sifive.com>
2647         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2648         instead of emit_insn for interrupt returns.
2649         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2650         (riscv_sret, riscv_uret): Likewise.
2652 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2654         * pretty-print.c (selftest::test_pp_format): Move save and restore
2655         of quotes to class auto_fix_quotes, and add an instance.
2656         * selftest.c: Include "intl.h".
2657         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2658         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2659         * selftest.h (selftest::auto_fix_quotes): New class.
2661 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
2663         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2664         (aarch64_sve_prepare_conditional_op): Remove.
2665         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2666         Allow aarch64_simd_reg_or_zero as select operand; remove
2667         the aarch64_sve_prepare_conditional_op call.
2668         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2669         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2670         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2671         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2672         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2673         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2674         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2675         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2676         and a splitters to match all of the *_any patterns.
2677         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2679         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2680         (SVE_COND_FP_BINARY_REV): Remove.
2681         (sve_int_op_rev, sve_fp_op_rev): New.
2682         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2683         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2684         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2685         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2686         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2687         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2688         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2689         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2690         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2692         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2693         Remove match_dup 1 from the inner unspec.
2694         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2696         * config/aarch64/aarch64.md (movprfx): New attr.
2697         (length): Default movprfx to 8.
2698         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2699         (*madd<SVE_I>, *msub<SVE_I): Likewise.
2700         (*<su>mul<SVE_I>3_highpart): Likewise.
2701         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2702         (*v<ASHIFT><SVE_I>3): Likewise.
2703         (*<su><MAXMIN><SVE_I>3): Likewise.
2704         (*<su><MAXMIN><SVE_F>3): Likewise.
2705         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2706         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2707         (*div<SVE_F>4): Likewise.
2709 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2711         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2712         in dump string.
2714 2018-07-02  Richard Biener  <rguenther@suse.de>
2716         PR tree-optimization/86363
2717         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2718         memset argument refers to a non-variable address.
2720 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2722         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2723         {PLUS,MINUS}_EXPR code to...
2724         (adjust_symbolic_bound): ...here,
2725         (combine_bound): ...here,
2726         (set_value_range_with_overflow): ...and here.
2728 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2730         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2731         code...
2732         (extract_range_from_abs_expr): ...here.
2734 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2736         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2737         -fno-omit-frame-pointer when not optimizing.
2739 2018-07-02  Martin Liska  <mliska@suse.cz>
2741         PR ipa/86279
2742         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2743         (propagate_nothrow): Likewise.
2745 2018-07-02  Martin Liska  <mliska@suse.cz>
2747         PR ipa/86323
2748         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2750 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2752         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2753         function in r262149, changing "loc" param from source_location to
2754         const dump_location_t &.
2755         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2756         declaration, as above.
2758 2018-07-01  Paul Koning  <ni1d@arrl.net>
2760         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2761         -munit-asm, -mgnu-asm, -mdec-asm.
2762         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2763         (pdp11_output_labelref): New.
2764         (pdp11_output_def): New.
2765         (pdp11_output_addr_vec_elt): New.
2766         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2767         %# and %@ format codes.
2768         (pdp11_option_override): New.
2769         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2770         (pdp11_output_ident): New.
2771         (pdp11_asm_named_section): New.
2772         (pdp11_asm_init_sections): New.
2773         (pdp11_file_start): New.
2774         (pdp11_file_end): New.
2775         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2776         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2777         %o, like %c but octal.
2778         (pdp11_option_override): New.
2779         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2780         -mdec-asm.
2781         (DATA_SECTION_ASM_OP): Ditto.
2782         (READONLY_DATA_SECTION_ASM_OP): New.
2783         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2784         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2785         (ASM_OUTPUT_LABELREF): Ditto.
2786         (ASM_OUTPUT_DEF): Ditto.
2787         (ASM_OUTPUT_EXTERNAL): New.
2788         (ASM_OUTPUT_SOURCE_FILENAME): New.
2789         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2790         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2791         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2792         %# and %@ format codes.
2793         * config/pdp11/pdp11.opt (mgnu-asm): New.
2794         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2795         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2796         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2798 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2800         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2801         dereferencing path[] beyond its length.
2802         (debug_path): New.
2803         (debug_all_paths): New.
2804         (rewire_first_differing_edge): New.
2805         (adjust_paths_after_duplication): New.
2806         (duplicate_thread_path): Call adjust_paths_after_duplication.
2807         Add new argument.
2808         (thread_through_all_blocks): Add new argument to
2809         duplicate_thread_path.
2811 2018-06-30  Jim Wilson  <jimw@sifive.com>
2813         * config/riscv/predicates.md (p2m1_shift_operand): New.
2814         (high_mask_shift_operand): New.
2815         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2816         pattern using p2m1_shift_operand.
2817         (lshsi3_zero_extend_3+2): New combiner pattern using
2818         high_mask_shift_operand.
2820 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2822         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2823         split out from...
2824         (vect_recog_rotate_pattern): ...here.
2825         (vect_convert_input): Try to insert casts of invariants in the
2826         preheader.
2827         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2828         preheader to be empty.
2830 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2832         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2833         vector type.  If given, install it in the new statement's
2834         STMT_VINFO_VECTYPE.
2835         (vect_element_precision): New function.
2836         (vect_unpromoted_value): New struct.
2837         (vect_unpromoted_value::vect_unpromoted_value): New function.
2838         (vect_unpromoted_value::set_op): Likewise.
2839         (vect_look_through_possible_promotion): Likewise.
2840         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2841         (vect_widened_op_tree, vect_convert_input): Likewise.
2842         (vect_convert_inputs, vect_convert_output): Likewise.
2843         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2844         to handle the optional cast of the multiplication result and
2845         vect_widened_op_tree to detect the widened multiplication itself.
2846         Do not require the input and output of promotion casts to have
2847         the same sign, but base the signedness of the operation on the
2848         input rather than the result.  If the pattern includes two
2849         promotions, check that those promotions have the same sign.
2850         Do not restrict the MULT_EXPR handling to a double-width result;
2851         handle quadruple-width results and wider.  Use vect_convert_inputs
2852         to convert the inputs to the common type.
2853         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
2854         to handle the optional cast of the ABS result.  Also allow a sign
2855         change or a sign extension between the ABS and MINUS.
2856         Use vect_widened_op_tree to detect the widened subtraction and use
2857         vect_convert_inputs to convert the inputs to the common type.
2858         (vect_handle_widen_op_by_const): Delete.
2859         (vect_recog_widen_op_pattern): New function.
2860         (vect_recog_widen_mult_pattern): Use it.
2861         (vect_recog_widen_shift_pattern): Likewise.
2862         (vect_recog_widen_sum_pattern): Use
2863         vect_look_through_possible_promotion to handle the promoted
2864         PLUS_EXPR operand.
2866 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2868         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2869         the containing gimple_seq *.
2870         * gimple-iterator.h (gsi_for_stmt): Declare it.
2871         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2872         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2873         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2874         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2875         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2876         checks.
2877         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2878         split out from...
2879         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
2880         statement being replaced is part of an existing pattern
2881         definition sequence, inserting the new pattern statements before
2882         the original one.
2883         (vect_pattern_recog_1): Don't return a bool.  If the statement
2884         is already part of a pattern, instead apply pattern matching
2885         to the pattern definition statements.  Don't clear the
2886         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2887         (vect_pattern_recog): Don't break after the first match;
2888         continue processing the pattern definition statements instead.
2889         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2891 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2893         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2894         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2895         (vect_recog_widen_sum_pattern): Use it.
2897 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2899         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2900         phi is not a pattern statement and has not been replaced by
2901         a pattern statement.
2902         * tree-vect-patterns.c (type_conversion_p): Don't check
2903         STMT_VINFO_IN_PATTERN_P.
2904         (vect_recog_vector_vector_shift_pattern): Likewise.
2905         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2906         the pattern statement rather than the original statement; check
2907         directly for a WIDEN_MULT_EXPR here.
2908         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2909         vect_is_simple_use to return the pattern statement rather
2910         than the original statement; use is_pattern_stmt_p to check
2911         for such a pattern statement.
2912         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2913         to return the pattern statement rather than the original statement;
2914         don't do the same transformation here.
2915         (vect_is_simple_use): If the defining statement has been replaced
2916         by a pattern statement, return the pattern statement instead.
2917         Remove the corresponding (local) transformation from the vectype
2918         overload.
2920 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
2922         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2923         end and default to null.
2924         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2925         (vectorizable_reduction): Update calls accordingly, dropping the
2926         gimple ** argument if the passed-back statement isn't needed.
2927         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2928         (vect_recog_rotate_pattern): Likewise.
2929         (vect_recog_mask_conversion_pattern): Likewise.
2930         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2931         (vect_mask_constant_operand_p): Likewise.
2932         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2933         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2934         (get_group_load_store_type, get_load_store_type): Likewise.
2935         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2936         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2937         (vectorizable_conversion, vectorizable_assignment): Likewise.
2938         (vectorizable_shift, vectorizable_operation): Likewise.
2939         (vectorizable_store, vect_is_simple_cond): Likewise.
2940         (vectorizable_condition, vectorizable_comparison): Likewise.
2941         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2942         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2943         and move it to the end.  Cope with null def_stmt_outs.
2945 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2947         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2949 2018-06-29  Jeff Law  <law@redhat.com>
2951         * config/v850/v850.c (v850_legitimate_address_p): Handle large
2952         displacements for TARGET_V850E2V3 and newer.
2953         (TARGET_LRA_P): Remove.  Defaults to LRA now.
2954         * config/v850/v850.md (sign23byte_load): Remove.
2955         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2956         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2958 2018-06-29  Martin Liska  <mliska@suse.cz>
2960         PR lto/85759
2961         * coverage.c (coverage_init): Mangle full path name.
2962         * doc/invoke.texi: Document the change.
2963         * gcov-io.c (mangle_path): New.
2964         * gcov-io.h (mangle_path): Likewise.
2965         * gcov.c (mangle_name): Use mangle_path for path mangling.
2967 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2969         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2970         if starting source register is not even.
2972 2018-06-29  Martin Liska  <mliska@suse.cz>
2974         PR tree-optimization/86263
2975         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2976         Make edge redirection.
2978 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
2980         * dumpfile.c (dump_loc): Add indentation based on scope depth.
2981         (dump_scope_depth): New variable.
2982         (get_dump_scope_depth): New function.
2983         (dump_begin_scope): New function.
2984         (dump_end_scope): New function.
2985         * dumpfile.h (get_dump_scope_depth): New declaration.
2986         (dump_begin_scope): New declaration.
2987         (dump_end_scope): New declaration.
2988         (class auto_dump_scope): New class.
2989         (AUTO_DUMP_SCOPE): New macro.
2990         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
2991         AUTO_DUMP_SCOPE.
2993 2018-06-29  Richard Biener  <rguenther@suse.de>
2995         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
2996         compute_all_dependences succeeds.
2997         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
2998         exceed --param loop-max-datarefs-for-datadeps.
3000 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
3002         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3004 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
3006         PR target/86348
3007         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3008         alternative 0 in preferred_for_speed attribute.
3010 2018-06-28  Paul Koning  <ni1d@arrl.net>
3012         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3013         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3014         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3015         * config/pdp11/pdp11.md: Correct "length" attribute calculation
3016         for shift insn patterns.
3018 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
3020         * cgraph.c (cgraph_node::get_body): Replace assignments to
3021         "dump_file" with calls to set_dump_file.
3022         * dumpfile.c (alt_dump_file): Make static, and group with...
3023         (alt_flags): ...this definition.
3024         (dumps_are_enabled): New variable.
3025         (refresh_dumps_are_enabled): New function.
3026         (set_dump_file): New function.
3027         (set_alt_dump_file): New function.
3028         (gcc::dump_manager::dump_start): Replace assignments to
3029         "dump_file" and "alt_dump_file" with calls to set_dump_file and
3030         set_alt_dump_file.
3031         (gcc::dump_manager::dump_finish): Likewise.
3032         * dumpfile.h (alt_dump_file): Delete decl.
3033         (dumps_are_enabled): New variable decl.
3034         (set_dump_file): New function decl.
3035         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3036         global.
3037         * tree-nested.c (lower_nested_functions): Replace assignments to
3038         "dump_file" with calls to set_dump_file.
3040 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3042         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3043         goto_locus of each outgoing edge of each basic block.
3045 2018-06-28  Richard Biener  <rguenther@suse.de>
3047         * dwarf2out.c (decl_scope_table): Remove.
3048         (push_decl_scope): Likewise.
3049         (pop_decl_scope): Likewise.
3050         (gen_type_die_for_member): Do not call push/pop_decl_scope.
3051         (gen_struct_or_union_type_die): Likewise.
3052         (gen_tagged_type_die): Likewise.
3053         (dwarf2out_init): Do not initialize decl_scope_table.
3054         (dwarf2out_c_finalize): Do not free it.
3056 2018-06-28  Richard Biener  <rguenther@suse.de>
3058         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3059         deciding whether to not re-use a DIE.
3061 2018-06-28  Richard Biener  <rguenther@suse.de>
3063         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3064         DW_AT_abstract_origin attribute.
3066 2018-06-28  Martin Liska  <mliska@suse.cz>
3068         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3069         Use newly introduced constants.
3070         * tree-switch-conversion.h (struct jump_table_cluster):
3071         Define max_ratio_for_size and max_ratio_for_speed.
3073 2018-06-28  Martin Liska  <mliska@suse.cz>
3075         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3076         Add new checking assert to catch invalid state.
3077         (jump_table_cluster::can_be_handled): Handle single case
3078         clusters.
3079         (jump_table_cluster::is_beneficial): Bail out for such case.
3080         (bit_test_cluster::find_bit_tests):
3081         Add new checking assert to catch invalid state.
3082         (bit_test_cluster::can_be_handled): Handle single case
3083         clusters.
3084         (bit_test_cluster::is_beneficial): Bail out for such case.
3085         (switch_decision_tree::analyze_switch_statement):
3086         Fix comment.
3088 2018-06-28  Martin Liska  <mliska@suse.cz>
3090         * common.opt: Introduce -completion option.
3091         * gcc.c (driver_handle_option): Handle it.
3092         (driver::main): Print completions if completion
3093         is set.
3094         * opt-suggestions.c (option_proposer::get_completions):
3095         New function.
3096         (option_proposer::suggest_completion): Likewise.
3097         (option_proposer::find_param_completions): Likewise.
3098         (verify_autocompletions): Likewise.
3099         (test_completion_valid_options): Likewise.
3100         (test_completion_valid_params): Likewise.
3101         (in_completion_p): Likewise.
3102         (empty_completion_p): Likewise.
3103         (test_completion_partial_match): Likewise.
3104         (test_completion_garbage): Likewise.
3105         (opt_proposer_c_tests): Likewise.
3106         * opt-suggestions.h: Declare new functions.
3107         * opts.c (common_handle_option): Handle OPT__completion_.
3108         * selftest-run-tests.c (selftest::run_tests): Add
3109         opt_proposer_c_tests.
3110         * selftest.c (assert_str_startswith): New.
3111         * selftest.h (assert_str_startswith): Likewise.
3112         (opt_proposer_c_tests): New.
3113         (ASSERT_STR_STARTSWITH): Likewise.
3115 2018-06-28  Martin Liska  <mliska@suse.cz>
3117         * Makefile.in: Add opt-suggestions.o.
3118         * gcc-main.c: Include opt-suggestions.h.
3119         * gcc.c (driver::driver): Likewise.
3120         (driver::~driver): Remove m_option_suggestions.
3121         (driver::build_option_suggestions): Moved to option_proposer.
3122         (driver::suggest_option): Likewise.
3123         (driver::handle_unrecognized_options): Use option_proposer.
3124         * gcc.h (class driver): Add new memver m_option_proposer.
3125         * opt-suggestions.c: New file.
3126         * opt-suggestions.h: New file.
3128 2018-06-28  Martin Liska  <mliska@suse.cz>
3130         * vec.h (class auto_string_vec): New (moved from auto_argvec).
3131         (auto_string_vec::~auto_string_vec): Likewise.
3133 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3135         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3136         prevent_decl_creation_for_types fields up and add reset_location field.
3137         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3138         statement if id->reset_location is true.
3139         (copy_edges_for_bb): Do not set goto_locus on the new edges if
3140         id->reset_location is true.
3141         (copy_phis_for_bb): Force input_location on the arguments if
3142         id->reset_location is true.
3143         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3144         is set on the function to be inlined.
3146 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
3148         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3150 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
3152         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3153         registers for Pmode.
3154         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3155         hard registers for the clobbered pseudo.
3157 2018-06-27  Paul Koning  <ni1d@arrl.net>
3159         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3160         mutually exclusive options.
3161         * config/pdp11/constraints.md (h): New constraint.
3162         (O): Update definition to match shift code generation.
3163         (D): New constraint.
3164         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3165         (CCFP): Remove.
3166         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3167         function.
3168         (output_jump): Change arguments.
3169         (pdp11_fixed_cc_regs): New function.
3170         (pdp11_cc_mode): Ditto.
3171         (pdp11_expand_shift): Ditto.
3172         (pdp11_assemble_shift): Ditto.
3173         (pdp11_small_shift): Ditto.
3174         (pdp11_branch_cost): Remove.
3175         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3176         from output.
3177         (pdp11_register_move_cost): Update for CC registers.
3178         (pdp11_rtx_costs): Add case for LSHIFTRT.
3179         (pdp11_output_jump): Add CCNZ mode conditional branches.
3180         (notice_update_cc_on_set): Remove.
3181         (pdp11_cc_mode): New function.
3182         (simple_memory_operand): Correct pre/post decrement case.
3183         (no_side_effect_operand): New function.
3184         (pdp11_regno_reg_class): Add CC_REGS class.
3185         (pdp11_fixed_cc_regs): New function.
3186         (pdp11_small_shift): New function.
3187         (pdp11_expand_shift): New function to expand shift insns.
3188         (pdp11_assemble_shift): New function to output shifts.
3189         (pdp11_branch_cost): Remove.
3190         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3191         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3192         (WCHAR_TYPE): Ditto.
3193         (PTRDIFF_TYPE): Ditto.
3194         (ADJUST_INSN_LENGTH): New macro.
3195         (FIXED_REGISTERS): Add CC registers.
3196         (CALL_USED_REGISTERS): Ditto.
3197         (reg_class): Ditto.
3198         (REG_CLASS_NAMES): Ditto.
3199         (REG_CLASS_CONTENTS): Ditto.
3200         (SELECT_CC_MODE): Use new function.
3201         (TARGET_FLAGS_REGNUM): New macro.
3202         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3203         (cc0_reg_rtx): Remove.
3204         (CC_STATUS_MDEP): Remove.
3205         (CC_STATUS_MDEFP_INIT): Remove.
3206         (CC_IN_FPU): Remove.
3207         (NOTICE_UPDATE_CC): Remove.
3208         (REGISTER_NAMES): Add CC registers.
3209         (BRANCH_COST): Change to constant 1.
3210         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3211         handling.
3212         * config/pdp11/pdp11.opt (mbcopy): Remove.
3213         (mbcopy-builtin): Remove.
3214         (mbranch-cheap): Remove.
3215         (mbranch-expensive): Remove.
3216         * config/pdp11/predicates.md (expand_shift_operand): Update to
3217         match shift code generation.
3218         (ccnz_operator): New predicate.
3219         * doc/invoke.texi (PDP-11 Options): Remove deleted options
3220         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3221         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
3222         exclusive options.
3223         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
3224         description of O constraint.
3226 2018-06-27  Jeff Law  <law@redhat.com>
3227             Austin Law  <austinklaw@gmail.com>
3229         * config/v850/v850.md (addsi3_set_flags): New pattern.
3230         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3231         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3232         (zero_extendhisi2_v850_set_flags): Likewise.
3233         (zero_extendqisi2_v850_set_flags): Likewise.
3234         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3235         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3236         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3238         * config/v850/v850-protos.h (notice_update_cc): Remove.
3239         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3240         (v850_print_operand): Handle 'D' and "d".
3241         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3242         Add handling of arithmetic/logical operations compared against zero.
3243         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3244         Do not look at v850_compare_op, instead get mode from last argument.
3245         (v850_gen_compare): Remove
3246         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3247         after reload for prologue insns.
3248         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3249         patterns.
3250         (construct_save_jarl): Likewise.
3251         (TARGET_FLAGS_REGNUM): Define.
3252         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3253         (NOTICE_UPDATE_CC): Remove.
3254         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3255         than cc0.  Conditionalize on reload_completed.
3256         (cmpsi_insn, setfcc_insn): Likewise.
3257         (tst1 splitter): Turn into define_and_split which sets the flags
3258         after reload.
3259         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3260         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3261         (cstoresf4, cstoredf4): Clobber the flags.
3262         (cmpsi, cmpsf, cmpdf): Remove expanders.
3263         (setf_insn): Remove pattern.
3264         (addsi3): Turn into define_and_split which clobbers the flags after
3265         reload and a suitable pattern (addsi3_clobber_flags) for use after
3266         reload.
3267         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3268         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3269         (ashrsi3, ashrsi3_v850e2): Likewise.
3270         (bins): Clobber the flags.
3271         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3272         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3273         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3274         (call_value_internal_short, call_value_internal_long): Likewise.
3275         (callt_save_interrupt, callt_return_interrupt): Likewise.
3276         (save_interrupt, return_interrupt): Likewise.
3277         (callt_save_all_interrupt, save_all_interrupt): Likewise.
3278         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3279         (restore_all_interrupt, _restore_all_interrupt): Likewise.
3280         (All FP comparisons): Only allow after reload has completed.
3281         (trfsr): Likewise.
3282         (divh, divhu): Tweak output template.
3283         (branch_z_normal, branch_z_invert): Remove
3284         (branch_nz_normal, branch_nz_invert): Likewise.
3285         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3287         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3288         * config/v850/v850.c (notice_update_cc): Remove.
3289         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
3290         (CC_NO_CARRY): Likewise.
3291         (NOTICE_UPDATE_CC): Define to nothing.
3292         * config/v850/v850.md: Remove block comment on cc0 handling
3293         Remove "cc" attribute from all patterns.  Remove cc_status handling
3294         from all patterns.  Minor formatting fixes.
3296 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3298         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3299         (cortex-a76.cortex-a55): Likewise.
3300         * config/aarch64/aarch64-tune.md: Regenerate.
3301         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3302         cortex-a76.cortex-a55.
3304 2018-06-27  Jeff Law  <law@redhat.com>
3306         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3307         (MULTILIB_DIRNAMES): Similarly.
3309 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
3311         * gimple.h (gimple_return_retbnd): Delete.
3312         (gimple_return_set_retbnd): Likewise.
3313         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3314         gimple_return_set_retbnd.
3315         * gimple-pretty-print.c (dump_gimple_return): Remove call to
3316         gimple_return_retbnd and adjust.
3317         * tree-inline.h (struct copy_body_data): Remove retbnd field.
3318         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3319         Explicitly return NULL in a couple more cases.  Move assertion
3320         on debug statements and remove unreachable code.
3321         (reset_debug_binding): Do not test id->retbnd.
3322         (expand_call_inline): Do not set it.
3324 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3326         * configure.ac: Add --disable-gcov option.
3327         * configure: Regenerate.
3328         * Makefile.in: Honour @enable_gcov@.
3329         * doc/install.texi: Document --disable-gcov.
3331 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3333         * config/arm/arm-cpus.in (cortex-a76): New entry.
3334         (cortex-a76.cortex-a55): Likewise.
3335         * config/arm/arm-tables.opt: Regenerate.
3336         * config/arm/arm-tune.md: Likewise.
3337         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3338         * doc/invoke.texi (ARM Options): Document cortex-a76 and
3339         cortex-a76.cortex-a55.
3341 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
3343         PR target/85769
3344         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3346 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3348         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3349         comment.
3350         (EPILOGUE_USES): Likewise.
3352 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
3354         * tree-inline.c (remap_location): New function extracted from...
3355         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
3356         (copy_phis_for_bb): ...here.  Call remap_location.
3357         (copy_cfg_body): Adjust call to copy_edges_for_bb.
3359 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
3361         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3362         unaligned vsx for 16B memset.
3364 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
3366         PR target/86285
3367         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3368         ieee128_float_type_node to long_double_type_node unless
3369         TARGET_LONG_DOUBLE_128 is set.
3371 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
3373         * cfgloop.c (get_loop_location): Convert return type from
3374         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3375         by implicit construction from rtx_insn *, and using
3376         dump_user_location_t::from_function_decl for the fallback case.
3377         * cfgloop.h (get_loop_location): Convert return type from
3378         location_t to dump_user_location_t.
3379         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3380         dump_printf_loc to pass in a dump_location_t rather than a
3381         location_t, via the gimple stmt.
3382         * coverage.c (get_coverage_counts): Update calls to
3383         dump_printf_loc to pass in dump_location_t rather than a
3384         location_t.
3385         * doc/optinfo.texi (Dump types): Convert example of
3386         dump_printf_loc from taking "locus" to taking "insn".  Update
3387         description of the "_loc" calls to cover dump_location_t.
3388         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3389         "selftest.h".
3390         (dump_user_location_t::dump_user_location_t): New constructors,
3391         from gimple *stmt and rtx_insn *.
3392         (dump_user_location_t::from_function_decl): New function.
3393         (dump_loc): Make static.
3394         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3395         const dump_location_t &.
3396         (dump_generic_expr_loc): Delete.
3397         (dump_printf_loc): Convert param "loc" from location_t to
3398         const dump_location_t &.
3399         (selftest::test_impl_location): New function.
3400         (selftest::dumpfile_c_tests): New function.
3401         * dumpfile.h: Include "profile-count.h".
3402         (class dump_user_location_t): New class.
3403         (struct dump_impl_location_t): New struct.
3404         (class dump_location_t): New class.
3405         (dump_printf_loc): Convert 2nd param from source_location to
3406         const dump_location_t &.
3407         (dump_generic_expr_loc): Delete.
3408         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3409         const dump_location_t &.
3410         * gimple-fold.c (fold_gimple_assign): Update call to
3411         dump_printf_loc to pass in a dump_location_t rather than a
3412         location_t, via the gimple stmt.
3413         (gimple_fold_call): Likewise.
3414         * gimple-loop-interchange.cc
3415         (loop_cand::analyze_iloop_reduction_var): Update for change to
3416         check_reduction_path.
3417         (tree_loop_interchange::interchange): Update for change to
3418         find_loop_location.
3419         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3420         change in return-type of find_loop_location.
3421         (graphite_regenerate_ast_isl): Likewise.
3422         * graphite-optimize-isl.c (optimize_isl): Likewise.
3423         * graphite.c (graphite_transform_loops): Likewise.
3424         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3425         pass in a dump_location_t rather than a location_t, via the
3426         gimple stmt.
3427         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3428         * ipa.c (walk_polymorphic_call_targets): Likewise.
3429         * loop-unroll.c (report_unroll): Convert "locus" param from
3430         location_t to dump_location_t.
3431         (decide_unrolling): Update for change to get_loop_location's
3432         return type.
3433         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3434         location_t to dump_user_location_t.
3435         (grid_find_single_omp_among_assignments_1): Updates calls to
3436         dump_printf_loc to pass in a dump_location_t rather than a
3437         location_t, via the gimple stmt.
3438         (grid_parallel_clauses_gridifiable): Convert "tloc" from
3439         location_t to dump_location_t.  Updates calls to dump_printf_loc
3440         to pass in a dump_location_t rather than a location_t, via the
3441         gimple stmt.
3442         (grid_inner_loop_gridifiable_p): Likewise.
3443         (grid_dist_follows_simple_pattern): Likewise.
3444         (grid_gfor_follows_tiling_pattern): Likewise.
3445         (grid_target_follows_gridifiable_pattern): Likewise.
3446         (grid_attempt_target_gridification): Convert initialization
3447         of local "grid" from memset to zero-initialization; FIXME: does
3448         this require C++11?  Update call to dump_printf_loc to pass in a
3449         optinfo_location rather than a location_t, via the gimple stmt.
3450         * profile.c (read_profile_edge_counts): Updates call to
3451         dump_printf_loc to pass in a dump_location_t rather than a
3452         location_t
3453         (compute_branch_probabilities): Likewise.
3454         * selftest-run-tests.c (selftest::run_tests): Call
3455         dumpfile_c_tests.
3456         * selftest.h (dumpfile_c_tests): New decl.
3457         * tree-loop-distribution.c (pass_loop_distribution::execute):
3458         Update for change in return type of find_loop_location.
3459         * tree-parloops.c (parallelize_loops): Likewise.
3460         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3461         "locus" from location_t to dump_user_location_t.
3462         (canonicalize_loop_induction_variables): Likewise.
3463         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3464         for change in return type of find_loop_location.
3465         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3466         to dump_printf_loc to pass in a dump_location_t rather than a
3467         location_t, via the stmt.
3468         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3469         Likewise.
3470         * tree-vect-loop-manip.c (find_loop_location): Convert return
3471         type from source_location to dump_user_location_t.
3472         (vect_do_peeling): Update for above change.
3473         (vect_loop_versioning): Update for change in type of
3474         vect_location.
3475         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3476         from location_t to dump_user_location_t.
3477         (vect_estimate_min_profitable_iters): Update for change in type
3478         of vect_location.
3479         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3480         location_t to dump_location_t.
3481         (vect_slp_bb): Update for change in type of vect_location.
3482         * tree-vectorizer.c (vect_location): Convert from source_location
3483         to dump_user_location_t.
3484         (try_vectorize_loop_1): Update for change in vect_location's type.
3485         (vectorize_loops): Likewise.
3486         (increase_alignment): Likewise.
3487         * tree-vectorizer.h (vect_location): Convert from source_location
3488         to dump_user_location_t.
3489         (find_loop_location): Convert return type from source_location to
3490         dump_user_location_t.
3491         (check_reduction_path): Convert 1st param from location_t to
3492         dump_user_location_t.
3493         * value-prof.c (check_counter): Update call to dump_printf_loc to
3494         pass in a dump_user_location_t rather than a location_t; update
3495         call to error_at for change in type of "locus".
3496         (check_ic_target): Update call to dump_printf_loc to
3497         pass in a dump_user_location_t rather than a location_t, via the
3498         call_stmt.
3500 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
3502         * config/s390/s390.h (enum processor_flags): Do not use
3503         default tune parameter when -march was specified.
3505 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
3507         PR target/86314
3508         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3509         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3510         operands.
3512 2018-06-26  Richard Biener  <rguenther@suse.de>
3514         PR tree-optimization/86287
3515         PR bootstrap/86316
3516         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3517         (vect_analyze_loop): Initialize n_stmts.
3519 2018-06-26  Richard Biener  <rguenther@suse.de>
3521         PR middle-end/86271
3522         * fold-const.c (fold_convertible_p): Pointer extension
3523         isn't valid.
3525 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
3527         PR debug/86064
3528         * dwarf2out.c (loc_list_has_views): Adjust comments.
3529         (dw_loc_list): Split single cross-partition range with
3530         nonzero locview.
3532 2018-06-25  Jeff Law  <law@redhat.com>
3534         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3535         on -mbig-switch by default.
3537         * config/v850/predicates.md (const_float_1_operand): Fix match_code
3538         test.
3539         (const_float_0_operand): Remove unused predicate.
3540         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3541         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3542         (recipsf2): New expander.  Original pattern now called
3543         (recipsf2_insn).
3544         (recipdf2, recipdf2_insn): Similarly.
3545         (rsqrtsf2, rsqrtsf2_insn): Similarly
3546         (rsqrtdf2, rsqrtdf2_insn): Similarly
3548 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
3550         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3551         Simplify logic for FreeBSD (twice).
3553 2018-06-25  Martin Sebor  <msebor@redhat.com>
3555         PR tree-optimization/86204
3556         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3557         a strnlen result if it's less than the length of the string.
3559 2018-06-25  Martin Sebor  <msebor@redhat.com>
3561         PR tree-optimization/85700
3562         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3563         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3564         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3566 2018-06-25  Martin Sebor  <msebor@redhat.com>
3568         * doc/extend.texi (Zero-length arrays): Update and clarify.
3570 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
3572         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3573         added IEEE/IBM long double multilib support on PowerPC little
3574         endian Linux systems.
3575         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3576         (MULTILIB_DEFAULTS): Likewise.
3577         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3578         Likewise.
3579         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3580         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3581         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3583 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
3585         PR middle-end/86311
3586         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3587         (REORDER_45): Likewise.
3589 2018-06-25  Jeff Law  <law@redhat.com>
3591         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3592         dividend to 32 bits.  Adjust length.
3593         (udivmodhi4): Cleanup output template.  Fix length.
3595 2018-06-25  Carl Love  <cel@us.ibm.com>
3597         * config/rs6000/vsx.md: Change word selector to prefered location.
3599 2018-06-25  Richard Biener  <rguenther@suse.de>
3601         PR tree-optimization/86304
3602         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3603         epilogue-if-converted loops as well.
3605 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
3607         * lto-section-out.c (lto_begin_section): Do not print section
3608         name for noaddr and unnumbered dumps.
3610 2018-06-25  Richard Biener  <rguenther@suse.de>
3612         * tree-vectorizer.h (struct vec_info_shared): New structure
3613         with parts split out from struct vec_info and loop_nest from
3614         struct _loop_vec_info.
3615         (struct vec_info): Adjust accordingly.
3616         (struct _loop_vec_info): Likewise.
3617         (LOOP_VINFO_LOOP_NEST): Adjust.
3618         (LOOP_VINFO_DATAREFS): Likewise.
3619         (LOOP_VINFO_DDRS): Likewise.
3620         (struct _bb_vec_info): Likewise.
3621         (BB_VINFO_DATAREFS): Likewise.
3622         (BB_VINFO_DDRS): Likewise.
3623         (struct _stmt_vec_info): Add dr_aux member.
3624         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3625         (DR_MISALIGNMENT_UNINITIALIZED): New.
3626         (set_dr_misalignment): Adjust.
3627         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3628         (vect_analyze_loop): Adjust prototype.
3629         (vect_analyze_loop_form): Likewise.
3630         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3631         Compute dependences lazily.
3632         (vect_record_base_alignments): Use shared datarefs/ddrs.
3633         (vect_verify_datarefs_alignment): Likewise.
3634         (vect_analyze_data_refs_alignment): Likewise.
3635         (vect_analyze_data_ref_accesses): Likewise.
3636         (vect_analyze_data_refs): Likewise.
3637         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3638         constructor parameter for shared part.
3639         (vect_analyze_loop_form): Pass in shared part and adjust.
3640         (vect_analyze_loop_2): Pass in storage for the number of
3641         stmts.  Move loop nest finding to the caller.  Compute
3642         datarefs lazily.
3643         (vect_analyze_loop): Pass in shared part.
3644         (vect_transform_loop): Verify shared datarefs are unchanged.
3645         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3646         constructor parameter for shared part.
3647         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3648         (vect_slp_bb): Verify shared datarefs are unchanged before
3649         transform.
3650         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3651         change.
3652         (new_stmt_vec_info): Initialize DR_AUX misalignment to
3653         DR_MISALIGNMENT_UNINITIALIZED.
3654         * tree-vectorizer.c (vec_info::vec_info): Add constructor
3655         parameter for shared part.
3656         (vec_info::~vec_info): Adjust.
3657         (vec_info_shared::vec_info_shared): New.
3658         (vec_info_shared::~vec_info_shared): Likewise.
3659         (vec_info_shared::save_datarefs): Likewise.
3660         (vec_info_shared::check_datarefs): Likewise.
3661         (try_vectorize_loop_1): Construct shared part live for analyses
3662         of a single loop for multiple vector sizes.
3663         * tree-parloops.c (gather_scalar_reductions): Adjust.
3665 2018-06-25  Richard Biener  <rguenther@suse.de>
3667         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3668         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3669         (vect_analyze_data_refs): Remove similar code from here and
3670         simplify accordingly.
3672 2018-06-25  Richard Biener  <rguenther@suse.de>
3674         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3675         for reverse storage order accesses rather than asserting
3676         they cannot happen here.
3678 2018-06-25  Tom de Vries  <tdevries@suse.de>
3680         PR debug/86257
3681         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3682         Use data16 instead of .byte for insn prefix.
3684 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
3686         PR C++/86082
3687         * parser.c (make_char_string_pack): Pass this literal chars
3688         through cpp_interpret_string.
3689         (cp_parser_userdef_numeric_literal): Check the result of
3690         make_char_string_pack.
3692 2018-06-24  Maya Rashish  <coypu@sdf.org>
3694         * ginclude/stddef.h: Simplify conditions around avoiding
3695         re-definition of __size_t.
3697 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3699         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3700         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3702 2018-06-22  Maya Rashish  <coypu@sdf.org>
3704         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3705         made to OpenBSD and NetBSD through the years.
3707 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3709         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3710         behavior of vec_pack (vector double, vector double) to match
3711         behavior of vec_float2 (vector double, vector double).
3713 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3715         * gimplify.c (gimplify_function_tree): Prevent creation
3716         of a trampoline for the address of the current function
3717         passed to entry/exit instrumentation hooks.
3719 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3721         PR target/86222
3722         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3723         correctly.
3725 2018-06-22  Martin Liska  <mliska@suse.cz>
3727         PR tree-optimization/86263
3728         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3729         Bail out if is_enabled is false.
3730         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3731         New declaration.
3732         (jump_table_cluster::is_enabled): New function.
3734 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3736         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3737         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3738         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3739         (lto_input_ts_binfo_tree_pointers): Likewise.
3740         * tree-streamer-out.c (streamer_write_tree_bitfields,
3741         write_ts_binfo_tree_pointers): Likewise.
3742         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3744 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3746         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3748 2018-06-22  Martin Liska  <mliska@suse.cz>
3750         * symbol-summary.h (get): Make it pure and inline move
3751         functionality from ::get function.
3752         (get): Remove and inline into ::get and ::get_create.
3753         (get_create): Move code from ::get function.
3755 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3757         PR target/85994
3758         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3759         -x assembler-with-cpp.
3761 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3763         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3764         _FILE_OFFSET_BITS=64 for C++.
3766 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3768         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3769         conversion insn that shows up when pr85657-3.c is compiled using
3770         IEEE 128-bit long double.
3771         (neg<mode>2_internal): Use the correct mode to check whether the
3772         mode is IBM extended.
3773         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3774         multiply and divide external functions from being created more
3775         than once.
3777 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3779         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3780         functions.
3781         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3782         the edge can be forwarded.
3783         (cfg_layout_merge_blocks): Likewise.
3785 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3787         * except.c (finish_eh_generation): Commit edge insertions only after
3788         the EH edges have been redirected from post-landing to landing pads.
3790 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3792         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3793         create_tmp_var_for to create the FRAME decl.
3794         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3796 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3798         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3799         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3800         debug statement when resetting its value.
3801         (expand_call_inline): Copy the locus of the call onto the assignment
3802         of the return value, if any.  Use local variable in more cases.
3804 2018-06-21  Martin Liska  <mliska@suse.cz>
3806         * ipa-pure-const.c (propagate_nothrow): Use
3807         funct_state_summaries->get.
3808         (dump_malloc_lattice): Likewise.
3809         (propagate_malloc): Likewise.
3811 2018-06-21  Richard Biener  <rguenther@suse.de>
3813         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3814         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3815         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3816         comment.
3817         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3818         BLOCK_ABSTRACT_ORIGIN unconditionally.
3820 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
3822         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3823         deleting it.
3824         * ipa-reference.c (ipa_reference_c_finalize): Delete
3825         ipa_ref_opt_sum_summaries and set it to NULL.
3827 2018-06-21  Tom de Vries  <tdevries@suse.de>
3829         PR tree-optimization/85859
3830         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3831         test with comment from bb_no_side_effects_p.
3833 2018-06-21  Richard Biener  <rguenther@suse.de>
3835         PR tree-optimization/86232
3836         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3837         max for constant niter.
3839 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3841         * config/aarch64/aarch64-simd.md
3842         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3844 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3846         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3847         Make opernads of the unspec commutative.
3849 2018-06-21  Richard Biener  <rguenther@suse.de>
3851         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3852         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3853         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3854         (vect_analyze_data_ref_dependence): Re-order checks to deal with
3855         NULL DR_STEP.
3856         (vect_record_base_alignments): Do not record base alignment
3857         for gathers or scatters.
3858         (vect_compute_data_ref_alignment): Drop return value that is always
3859         true.  Bail out early for gathers or scatters.
3860         (vect_enhance_data_refs_alignment): Bail out early for gathers
3861         or scatters.
3862         (vect_find_same_alignment_drs): Likewise.
3863         (vect_analyze_data_refs_alignment): Remove dead code.
3864         (vect_slp_analyze_and_verify_node_alignment): Likewise.
3865         (vect_analyze_data_refs): For possible gathers or scatters do
3866         not create an alternate DR, just check their possible validity
3867         and mark them.  Adjust DECL_NONALIASED handling to not rely
3868         on DR_BASE_ADDRESS.
3869         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3870         update inits of gathers or scatters.
3871         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3872         Also copy gather/scatter flag to pattern vinfo.
3874 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3876         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3877         behavior of vec_packsu (vector unsigned long long, vector unsigned
3878         long long) to match behavior of vec_packs with same signature.
3880 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
3881             Thomas Schwinge <thomas@codesourcery.com>
3882             Cesar Philippidis  <cesar@codesourcery.com>
3884         * gimplify.c (gimplify_scan_omp_clauses): Add support for
3885         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3886         (gimplify_adjust_omp_clauses): Likewise.
3887         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3888         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3889         (gimplify_omp_target_update): Update handling of acc update and
3890         enter/exit data.
3891         * omp-low.c (install_var_field): Remove unused parameter
3892         base_pointers_restrict.
3893         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3894         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3895         FINALIZE}
3896         (omp_target_base_pointers_restrict_p): Delete.
3897         (scan_omp_target): Update call to scan_sharing_clauses.
3898         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3899         FINALIZE}.
3900         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3901         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3902         (convert_local_omp_clauses): Likewise.
3903         * tree-pretty-print.c (dump_omp_clause): Likewise.
3904         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
3905         FINALIZE}.
3906         (omp_clause_code_name): Likewise.
3908 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3910         PR debug/86194
3911         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3912         be narrowed.
3914         PR tree-optimization/86231
3915         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
3916         anti-range don't overwrite *vr0min before using it to compute *vr0max.
3918 2018-06-20  Tom de Vries  <tdevries@suse.de>
3920         PR tree-optimization/86097
3921         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3922         iv type if signedness of iv type is not the same as that of *nit.
3924 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3926         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
3927         EDGE_EH edges, verify they are all EDGE_EH.
3929 2018-06-20  Maya Rashish  <coypu@sdf.org>
3931         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3933 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3935         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3936         * config/aarch64/aarch64.c (xgene1_tunings): Add
3937         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3938         (aarch64_mode_valid_for_sched_fusion_p):
3939         Allow 16-byte modes.
3940         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3941         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3942         128-bit modes.
3943         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3944         New pattern.
3945         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3946         * config/aarch64/iterators.md (VQ2): New mode iterator.
3948 2018-06-20  Martin Liska  <mliska@suse.cz>
3950         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3951         Change default ratio from 10 to 8.
3953 2018-06-20  Martin Liska  <mliska@suse.cz>
3955         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3956         New.
3957         (bit_test_cluster::find_bit_tests): Likewise.
3958         (switch_decision_tree::analyze_switch_statement): Find clusters.
3959         * tree-switch-conversion.h (struct jump_table_cluster): Document
3960         hierarchy.
3962 2018-06-20  Martin Liska  <mliska@suse.cz>
3964         * tree-switch-conversion.c (switch_conversion::collect):
3965         Record m_uniq property.
3966         (switch_conversion::expand): Bail out for special conditions.
3967         (group_cluster::~group_cluster): New.
3968         (group_cluster::group_cluster): Likewise.
3969         (group_cluster::dump): Likewise.
3970         (jump_table_cluster::emit): New.
3971         (switch_decision_tree::fix_phi_operands_for_edges): New.
3972         (struct case_node): Remove struct.
3973         (jump_table_cluster::can_be_handled): New.
3974         (case_values_threshold): Moved to header.
3975         (reset_out_edges_aux): Likewise.
3976         (jump_table_cluster::is_beneficial): New.
3977         (bit_test_cluster::can_be_handled): Likewise.
3978         (add_case_node): Remove.
3979         (bit_test_cluster::is_beneficial): New.
3980         (case_bit_test::cmp): New.
3981         (bit_test_cluster::emit): New.
3982         (expand_switch_as_decision_tree_p): Remove.
3983         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3984         (fix_phi_operands_for_edge): Likewise.
3985         (switch_decision_tree::analyze_switch_statement): New.
3986         (compute_cases_per_edge): Move ...
3987         (switch_decision_tree::compute_cases_per_edge): ... here.
3988         (try_switch_expansion): Likewise.
3989         (switch_decision_tree::try_switch_expansion): Likewise.
3990         (record_phi_operand_mapping): Likewise.
3991         (switch_decision_tree::record_phi_operand_mapping): Likewise.
3992         (emit_case_decision_tree): Likewise.
3993         (switch_decision_tree::emit): Likewise.
3994         (balance_case_nodes): Likewise.
3995         (switch_decision_tree::balance_case_nodes): Likewise.
3996         (dump_case_nodes): Likewise.
3997         (switch_decision_tree::dump_case_nodes): Likewise.
3998         (emit_jump): Likewise.
3999         (switch_decision_tree::emit_jump): Likewise.
4000         (emit_cmp_and_jump_insns): Likewise.
4001         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4002         (emit_case_nodes): Likewise.
4003         (switch_decision_tree::emit_case_nodes): Likewise.
4004         (conditional_probability): Remove.
4005         * tree-switch-conversion.h (enum cluster_type): New.
4006         (PRINT_CASE): New.
4007         (struct cluster): Likewise.
4008         (cluster::cluster): Likewise.
4009         (struct simple_cluster): Likewise.
4010         (simple_cluster::simple_cluster): Likewise.
4011         (struct group_cluster): Likewise.
4012         (struct jump_table_cluster): Likewise.
4013         (struct bit_test_cluster): Likewise.
4014         (struct min_cluster_item): Likewise.
4015         (struct case_tree_node): Likewise.
4016         (case_tree_node::case_tree_node): Likewise.
4017         (jump_table_cluster::case_values_threshold): Likewise.
4018         (struct case_bit_test): Likewise.
4019         (struct switch_decision_tree): Likewise.
4020         (struct switch_conversion): Likewise.
4021         (switch_decision_tree::reset_out_edges_aux): Likewise.
4023 2018-06-20  Martin Liska  <mliska@suse.cz>
4025         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4026         (hoist_edge_and_branch_if_true): Likewise.
4027         (expand_switch_using_bit_tests_p): Likewise.
4028         (struct case_bit_test): Likewise.
4029         (case_bit_test_cmp): Likewise.
4030         (emit_case_bit_tests): Likewise.
4031         (switch_conversion::switch_conversion): New class.
4032         (struct switch_conv_info): Remove old struct.
4033         (collect_switch_conv_info): More to ...
4034         (switch_conversion::collect): ... this.
4035         (check_range): Likewise.
4036         (switch_conversion::check_range): Likewise.
4037         (check_all_empty_except_final): Likewise.
4038         (switch_conversion::check_all_empty_except_final): Likewise.
4039         (check_final_bb): Likewise.
4040         (switch_conversion::check_final_bb): Likewise.
4041         (create_temp_arrays): Likewise.
4042         (switch_conversion::create_temp_arrays): Likewise.
4043         (free_temp_arrays): Likewise.
4044         (gather_default_values): Likewise.
4045         (switch_conversion::gather_default_values): Likewise.
4046         (build_constructors): Likewise.
4047         (switch_conversion::build_constructors): Likewise.
4048         (constructor_contains_same_values_p): Likewise.
4049         (switch_conversion::contains_same_values_p): Likewise.
4050         (array_value_type): Likewise.
4051         (switch_conversion::array_value_type): Likewise.
4052         (build_one_array): Likewise.
4053         (switch_conversion::build_one_array): Likewise.
4054         (build_arrays): Likewise.
4055         (switch_conversion::build_arrays): Likewise.
4056         (gen_def_assigns): Likewise.
4057         (switch_conversion::gen_def_assigns): Likewise.
4058         (prune_bbs): Likewise.
4059         (switch_conversion::prune_bbs): Likewise.
4060         (fix_phi_nodes): Likewise.
4061         (switch_conversion::fix_phi_nodes): Likewise.
4062         (gen_inbound_check): Likewise.
4063         (switch_conversion::gen_inbound_check): Likewise.
4064         (process_switch): Use the newly created class.
4065         (switch_conversion::expand): New.
4066         (switch_conversion::~switch_conversion): New.
4067         * tree-switch-conversion.h: New file.
4069 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4071         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4072         tree-vect-patterns.c.
4073         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4074         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
4075         (vect_recog_sad_pattern): Likewise.
4076         (vect_recog_widen_sum_pattern): Likewise.
4077         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
4078         (vect_recog_widen_shift_pattern): Remove the type_in argument.
4079         (vect_recog_rotate_pattern): Likewise.
4080         (vect_recog_mult_pattern): Likewise.
4081         (vect_recog_vector_vector_shift_pattern): Likewise.
4082         (vect_recog_divmod_pattern): Likewise.
4083         (vect_recog_mixed_size_cond_pattern): Likewise.
4084         (vect_recog_bool_pattern): Likewise.
4085         (vect_recog_mask_conversion_pattern): Likewise.
4086         (vect_try_gather_scatter_pattern): Likewise.
4087         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
4088         (vect_recog_over_widening_pattern): Likewise.
4089         (vect_recog_gather_scatter_pattern): Likewise.
4090         (vect_recog_func_ptr): Move from tree-vectorizer.h
4091         (vect_vect_recog_func_ptrs): Move further down the file.
4092         (vect_recog_func): Likewise.  Remove the third argument.
4093         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4094         (vect_pattern_recog_1): Expect the pattern function to do any
4095         necessary target tests.  Also expect it to provide a vector type.
4096         Remove the type_in handling.
4098 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4100         * tree-vect-patterns.c (vect_pattern_detected): New function.
4101         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4102         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4103         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4104         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4105         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4106         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4107         (vect_recog_mask_conversion_pattern)
4108         (vect_try_gather_scatter_pattern): Likewise.
4110 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4112         * tree-vect-patterns.c (vect_get_internal_def): New function.
4113         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4114         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4115         (search_type_for_mask_1): Use it.
4117 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4119         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4120         redundant WIDEN_SUM_EXPR handling.
4121         (vect_recog_sad_pattern): Likewise.
4123 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4125         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4126         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4127         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4128         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4129         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4131 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4133         * tree-vect-stmts.c (vectorizable_call): Make sure that we
4134         use the stmt_vec_info of the original bb statement for the
4135         new zero assignment, even if the call is part of a pattern.
4137 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4139         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4140         that the sequence is attached to the original statement rather
4141         than the pattern statement.
4142         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4143         PATTERN_DEF_SEQ from the original statement rather than
4144         the main pattern statement.
4145         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4146         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4147         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4149 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4151         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4152         definition statements before the early exit for statements that aren't
4153         live or relevant.
4154         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4155         split out from...
4156         (vect_transform_loop): ...here.  Process pattern definition
4157         statements without first checking whether the main pattern
4158         statement is live or relevant.
4160 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4162         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4163         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4165 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
4167         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4168         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4169         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4170         (expand_block_compare): Change select_block_compare_mode call.
4171         (expand_strncmp_align_check): Use new functions, fix comment.
4172         (emit_final_str_compare_gpr): New function.
4173         (expand_strn_compare): Refactor and clean up code.
4174         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4176 2018-06-19  Tony Reix  <tony.reix@atos.com>
4177             Damien Bergamini  <damien.bergamini@atos.com>
4178             David Edelsohn  <dje.gcc@gmail.com>
4180         * collect2.c (static_obj): New variable.
4181         (static_libs): New variable.
4182         (is_in_list): Uncomment declaration.
4183         (main): Track AIX libraries linked statically.
4184         (is_in_list): Uncomment definition.
4185         (scan_prog_file): Don't add AIX shared libraries initializer
4186         to constructor list if linking statically.
4188 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
4190         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4191         constant.
4192         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4194 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
4196         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4197         blocks.
4199 2018-06-19  Martin Liska  <mliska@suse.cz>
4201         * config/i386/i386.c (ix86_can_inline_p): Do not use
4202         ipa_fn_summaries::get_create.
4203         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4204         get.
4205         (devirtualization_time_bonus): Likewise.
4206         (ipcp_propagate_stage): Likewise.
4207         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4208         (edge_set_predicate): Likewise.
4209         (evaluate_conditions_for_known_args): Likewise.
4210         (evaluate_properties_for_edge): Likewise.
4211         (ipa_call_summary::reset): Tranform to ...
4212         (ipa_call_summary::~ipa_call_summary): ... this.
4213         (ipa_fn_summary::reset): Transform to ...
4214         (ipa_fn_summary::~ipa_fn_summary): ... this.
4215         (ipa_fn_summary_t::remove): Rename to ...
4216         (ipa_fn_summary_t::remove_callees): ... this.
4217         (ipa_fn_summary_t::duplicate): Use placement new
4218         instead of memory copy.
4219         (ipa_call_summary_t::duplicate): Likewise.
4220         (ipa_call_summary_t::remove): Remove.
4221         (dump_ipa_call_summary): Change get_create to get.
4222         (ipa_dump_fn_summary): Dump only when summary exists.
4223         (analyze_function_body): Use symbol_summary::get instead
4224         of get_create.
4225         (compute_fn_summary): Likewise.
4226         (estimate_edge_devirt_benefit): Likewise.
4227         (estimate_edge_size_and_time): Likewise.
4228         (inline_update_callee_summaries): Likewise.
4229         (remap_edge_change_prob): Likewise.
4230         (remap_edge_summaries): Likewise.
4231         (ipa_merge_fn_summary_after_inlining): Likewise.
4232         (write_ipa_call_summary): Likewise.
4233         (ipa_fn_summary_write): Likewise.
4234         (ipa_free_fn_summary): Likewise.
4235         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4236         (struct ipa_call_summary): Likewise.
4237         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4238         of get_create.
4239         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4240         (estimate_size_after_inlining): Likewise.
4241         (estimate_growth): Likewise.
4242         (growth_likely_positive): Likewise.
4243         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4244         (inline_call): Likewise.
4245         * ipa-inline.c (caller_growth_limits): Likewise.
4246         (can_inline_edge_p): Likewise.
4247         (can_inline_edge_by_limits_p): Likewise.
4248         (compute_uninlined_call_time): Likewise.
4249         (compute_inlined_call_time): Likewise.
4250         (want_inline_small_function_p): Likewise.
4251         (edge_badness): Likewise.
4252         (update_caller_keys): Likewise.
4253         (update_callee_keys): Likewise.
4254         (inline_small_functions): Likewise.
4255         (inline_to_all_callers_1): Likewise.
4256         (dump_overall_stats): Likewise.
4257         (early_inline_small_functions): Likewise.
4258         (early_inliner): Likewise.
4259         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4260         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4261         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4262         * ipa-split.c (execute_split_functions): Likewise.
4263         * symbol-summary.h: Likewise.
4264         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4266 2018-06-19  Richard Biener  <rguenther@suse.de>
4268         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4269         (vectorize_loops): ... here.  Fix dbgcnt handling.
4270         (try_vectorize_loop): Wrap try_vectorize_loop_1.
4272 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
4274         PR target/86197
4275         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4276         ieee128 argument takes up only one (vector) register, not two (floating
4277         point) registers.
4279 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4281         * gimplify.c (gimplify_init_constructor): Really never clear for an
4282         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4284 2018-06-19  Richard Biener  <rguenther@suse.de>
4286         PR tree-optimization/86179
4287         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4288         after failed recognition.
4290 2018-06-18  Martin Sebor  <msebor@redhat.com>
4292         PR middle-end/85602
4293         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4294         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4295         Handle integer subtraction.
4296         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4297         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4299 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4301         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4302         param from rtx to rtx_insn *.
4303         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4304         param.
4305         (frv_ifcvt_modify_insn): Likwise.
4306         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4307         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
4308         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4309         as_a <rtx_insn *> cast to local "unprotected_region" once
4310         it's been established that it's not NULL or pc_rtx.
4311         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4312         param "sethi" from rtx to rtx_insn *.
4313         (nds32_group_float_insns): Likewise for param "insn".
4314         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4315         param.
4316         (vax_output_int_subtract): Likewise.
4317         * config/vax/vax.c (vax_output_int_add): Likewise for param
4318         "insn".
4319         (vax_output_int_subtract): Likewise.
4320         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4321         (emit_pattern_after): Likewise for param "after".
4322         (emit_insn_after): Likewise.
4323         (emit_jump_insn_after): Likewise.
4324         (emit_call_insn_after): Likewise.
4325         (emit_debug_insn_after): Likewise.
4326         (emit_pattern_before): Likewise for param "before".
4327         (emit_insn_before): Likewise.
4328         (emit_jump_insn_before): Likewise.
4329         * final.c (get_insn_template): Likewise for param "insn", removing
4330         a cast.
4331         * output.h (get_insn_template): Likewise for 2nd param.
4332         * rtl.h (emit_insn_before): Likewise.
4333         (emit_jump_insn_before): Likewise.
4334         (emit_debug_insn_before_noloc): Likewise.
4335         (emit_insn_after): Likewise.
4336         (emit_jump_insn_after): Likewise.
4337         (emit_call_insn_after): Likewise.
4338         (emit_debug_insn_after): Likewise.
4339         (set_insn_deleted): Likewise for param.
4341 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
4343         PR target/85358
4344         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4345         floating point modes, so that IFmode is numerically greater than
4346         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4347         to declare the ordering.  This prevents IFmode from being
4348         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4349         machine.  Include rs6000-modes.h to share the fractional values
4350         between genmodes* and the rest of the compiler.
4351         (IFmode): Likewise.
4352         (KFmode): Likewise.
4353         (TFmode): Likewise.
4354         * config/rs6000/rs6000-modes.h: New file.
4355         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4356         meaning of rs6000_long_double_size so that 126..128 selects an
4357         appropriate 128-bit floating point type.
4358         (rs6000_option_override_internal): Likewise.
4359         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4360         (TARGET_LONG_DOUBLE_128): Change the meaning of
4361         rs6000_long_double_size so that 126..128 selects an appropriate
4362         128-bit floating point type.
4363         (LONG_DOUBLE_TYPE_SIZE): Update comment.
4364         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4365         source and destination to match the standard usage.
4366         (truncifkf2): Likewise.
4367         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4368         ISA 2.07 to use an explicit clobber, instead of passing in a
4369         temporary.
4370         (copysign<mode>3_soft): Likewise.
4372 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4374         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4375         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4376         (vect_slp_analyze_instance_dependence): Likewise.
4377         (vect_enhance_data_refs_alignment): Likewise.
4378         (vect_analyze_data_refs_alignment): Likewise.
4379         (vect_slp_analyze_and_verify_instance_alignment
4380         (vect_analyze_data_ref_accesses): Likewise.
4381         (vect_prune_runtime_alias_test_list): Likewise.
4382         (vect_analyze_data_refs): Likewise.
4383         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4384         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4385         (vect_analyze_scalar_cycles_1): Likewise.
4386         (vect_get_loop_niters): Likewise.
4387         (vect_analyze_loop_form_1): Likewise.
4388         (vect_update_vf_for_slp): Likewise.
4389         (vect_analyze_loop_operations): Likewise.
4390         (vect_analyze_loop): Likewise.
4391         (vectorizable_induction): Likewise.
4392         (vect_transform_loop): Likewise.
4393         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4394         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4395         (vect_make_slp_decision): Likewise.
4396         (vect_detect_hybrid_slp): Likewise.
4397         (vect_slp_analyze_operations): Likewise.
4398         (vect_slp_bb): Likewise.
4399         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4400         (vectorizable_bswap): Likewise.
4401         (vectorizable_call): Likewise.
4402         (vectorizable_simd_clone_call): Likewise.
4403         (vectorizable_conversion): Likewise.
4404         (vectorizable_assignment): Likewise.
4405         (vectorizable_shift): Likewise.
4406         (vectorizable_operation): Likewise.
4407         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4409 2018-06-18  Martin Sebor  <msebor@redhat.com>
4411         PR tree-optimization/81384
4412         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4413         * builtins.c (expand_builtin_strnlen): New function.
4414         (expand_builtin): Call it.
4415         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4416         * builtins.def (BUILT_IN_STRNLEN): New.
4417         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4418         Warn for bounds in excess of maximum object size.
4419         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4420         single-value ranges.  Handle strnlen.
4421         (handle_builtin_strlen): Handle strnlen.
4422         (strlen_check_and_optimize_stmt): Same.
4423         * doc/extend.texi (Other Builtins): Document strnlen.
4425 2018-06-18  Maya Rashish  <coypu@sdf.org>
4427         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4428         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4429         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4431         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4432         here to ...
4433         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4435 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4437         * tree.c (escaped_string::escape): Replace cast to char * by
4438         const_cast<char *> (unescaped).
4440 2018-06-18  Nick Clifton  <nickc@redhat.com>
4442         PR 84195
4443         * tree.c (escaped_string): New class.  Converts an unescaped
4444         string into its escaped equivalent.
4445         (warn_deprecated_use): Use the new class to convert the
4446         deprecation message, if present.
4447         (test_escaped_strings): New self test.
4448         (test_c_tests): Add test_escaped_strings.
4449         * doc/extend.texi (deprecated): Add a note that the
4450         deprecation message is affected by the -fmessage-length
4451         option, and that control characters will be escaped.
4452         (#pragma GCC error): Document this pragma.
4453         (#pragma GCC warning): Likewise.
4454         * doc/invoke.texi (-fmessage-length): Document this option's
4455         effect on the #warning and #error preprocessor directives and
4456         the deprecated attribute.
4458 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4460         * tree.c (decl_value_expr_lookup): Revert latest change.
4461         (decl_value_expr_insert): Likewise.
4463 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
4465         * gimplify.c (nonlocal_vlas): Delete.
4466         (nonlocal_vla_vars): Likewise.
4467         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4468         referenced VLAs.
4469         (gimplify_body): Do not create and destroy nonlocal_vlas.
4470         * tree-nested.c: Include diagnostic.h.
4471         (use_pointer_in_frame): Tweak.
4472         (lookup_field_for_decl): Add assertion and declare the transformation.
4473         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4474         internal error when the reference is in a wrong context.  Do not
4475         create a debug decl by default.
4476         (note_nonlocal_block_vlas): Delete.
4477         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4478         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
4479         create a debug decl by default.
4480         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4481         call is in a wrong context.
4482         (fixup_vla_decls): New function.
4483         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
4484         debug variables were created.
4485         * tree.c (decl_value_expr_lookup): Add checking assertion.
4486         (decl_value_expr_insert): Likewise.
4488 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4490         PR middle-end/82479
4491         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4492         * tree-scalar-evolution.c (interpret_expr): Likewise.
4493         (expression_expensive_p): Likewise.
4494         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4495         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4496         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4497         (ssa_defined_by_minus_one_stmt_p): New.
4499 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4501         PR middle-end/64946
4502         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4503         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4504         * dojump.c (do_jump): Likewise.
4505         * expr.c (expand_expr_real_2): Check operand type's sign.
4506         * fold-const.c (const_unop): Handle ABSU_EXPR.
4507         (fold_abs_const): Likewise.
4508         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4509         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4510         (strip_sign_op_1): Likesise.
4511         * match.pd: Add new pattern to generate ABSU_EXPR.
4512         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4513         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4514         * tree-eh.c (operation_could_trap_helper_p): Likewise.
4515         * tree-inline.c (estimate_operator_cost): Likewise.
4516         * tree-pretty-print.c (dump_generic_node): Likewise.
4517         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4518         * tree.def (ABSU_EXPR): New.
4520 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
4522         PR middle-end/86095
4523         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4524         documented as preserved for backward compatibility only.
4525         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4527         PR rtl-optimization/86108
4528         * bb-reorder.c (create_forwarder_block): Renamed to ...
4529         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
4530         jump from new landing pad to the second part.
4531         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4532         Adjust callers.
4534 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4536         PR middle-end/85878
4537         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4538         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4539         Only call store_expr for halves if the mode is the same.
4541         PR middle-end/86123
4542         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4543         Fix up comment formatting.
4545 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4547         * typed-splay-tree.h (typed_splay_tree::remove): New function.
4548         (typed_splay_tree::closure,
4549         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4550         (typed_splay_tree::typed_splay_tree,
4551         typed_splay_tree::operator =): Declared private.
4552         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4553         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4554         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4555         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4556         typed_splay_tree::splay_tree_splay,
4557         typed_splay_tree::splay_tree_foreach_helper,
4558         typed_splay_tree::splay_tree_insert,
4559         typed_splay_tree::splay_tree_remove,
4560         typed_splay_tree::splay_tree_lookup,
4561         typed_splay_tree::splay_tree_predecessor,
4562         typed_splay_tree::splay_tree_successor,
4563         typed_splay_tree::splay_tree_min,
4564         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4565         (typed_splay_tree::root, typed_splay_tree::comp,
4566         typed_splay_tree::delete_key,
4567         typed_splay_tree::delete_value): New data members.
4568         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4569         typed_splay_tree::remove.
4571 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
4573         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4574         -mginv and -mno-ginv to the assembler.
4575         * config/mips/mips.opt (-mcrc): New option.
4576         (-mginv): Likewise.
4577         * doc/invoke.text (-mcrc): Document.
4578         (-mginv): Likewise.
4580 2018-06-15  Nick Clifton  <nickc@redhat.com>
4582         PR 84195
4583         * tree.c (escaped_string): New class.  Converts an unescaped
4584         string into its escaped equivalent.
4585         (warn_deprecated_use): Use the new class to convert the
4586         deprecation message, if present.
4587         (test_escaped_strings): New self test.
4588         (test_c_tests): Add test_escaped_strings.
4589         * doc/extend.texi (deprecated): Add a note that the
4590         deprecation message is affected by the -fmessage-length
4591         option, and that control characters will be escaped.
4592         (#pragma GCC error): Document this pragma.
4593         (#pragma GCC warning): Likewise.
4594         * doc/invoke.texi (-fmessage-length): Document this option's
4595         effect on the #warning and #error preprocessor directives and
4596         the deprecated attribute.
4598 2018-06-15  Richard Biener  <rguenther@suse.de>
4600         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4601         here, also noting vector size used.
4602         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
4603         size used in MSG_OPTIMIZED_LOCATIONS dump.
4604         (pass_slp_vectorize::execute): Adjust.
4606 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
4608         PR target/85968
4609         * config/arc/arc.c (arc_return_address_register): Fix
4610         if-condition.
4612 2018-06-15  Richard Biener  <rguenther@suse.de>
4614         PR middle-end/86159
4615         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4616         leave useless conversion stripping to force_gimple_operand_gsi.
4617         (gimplify_build2): Likewise.
4618         (gimplify_build1): Likewise.
4620 2018-06-15  Richard Biener  <rguenther@suse.de>
4622         PR middle-end/86076
4623         * tree-cfg.c (move_stmt_op): unshare invariant addresses
4624         before adjusting their block.
4626 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4628         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4629         multilibs for *-*-rtems*.
4630         * config/riscv/t-rtems: New file.
4632 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
4634         PR middle-end/86122
4635         * match.pd ((A +- CST1) +- CST2): Punt if last resort
4636         unsigned_type_for returns NULL.
4638         PR target/85945
4639         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4640         subregs of multi-word pseudos unless the float mode has word size.
4642 2018-06-14  Richard Biener  <rguenther@suse.de>
4644         PR middle-end/86139
4645         * tree-vect-generic.c (build_word_mode_vector_type): Remove
4646         duplicate and harmful type_hash_canon.
4647         * tree.c (type_hash_canon): Assert we didn't find ourselves.
4649 2018-06-14  Richard Biener  <rguenther@suse.de>
4651         PR ipa/86124
4652         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4653         NULL cgraph_node.
4655 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4657         * config/rtems.h (STDINT_LONG32): Define.
4659 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
4660             Prachi Godbole  <prachi.godbole@imgtec.com>
4662         * config/mips/mips-cpus.def: Define P6600.
4663         * config/mips/mips-tables.opt: Regenerate.
4664         * config/mips/mips.c (mips_ucbranch_type): New enum.
4665         (mips_rtx_cost_data): Add support for P6600.
4666         (mips_issue_rate): Likewise.
4667         (mips_multipass_dfa_lookahead): Likewise.
4668         (mips_avoid_hazard): Likewise.
4669         (mips_reorg_process_insns): Likewise.
4670         (mips_classify_branch_p6600): New function.
4671         * config/mips/mips.h (TUNE_P6600): New define.
4672         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4673         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4674         * config/mips/mips.md: Include p6600.md.
4675         (processor): Add p6600.
4676         * config/mips/p6600.md: New file.
4677         * doc/invoke.texi: Add p6600 to supported architectures.
4679 2018-06-13  Martin Sebor  <msebor@redhat.com>
4681         PR tree-optimization/86114
4682         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4683         of integer types.
4684         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4686 2018-06-13  Richard Biener  <rguenther@suse.de>
4688         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4689         Properly set vector type of the intermediate stmt.
4690         * tree-vect-stmts.c (vectorizable_operation): The destination
4691         var always has vectype_out type.
4693 2018-06-13  Jeff Law  <law@redhat.com>
4695         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4696         integer 0 for argument to print_rtl_with_bb.
4697         (rl78_reorg): Likewise.
4699 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
4701         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4702         from rtx to rtx_insn *.
4703         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4704         "label".
4705         (add_sched_insns_for_speculation): Likewise for local "target",
4706         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4707         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4708         from rtx_insn ** to rtx_code_label **.
4709         (reorg_emit_nops): Likewise.
4710         (c6x_reorg): Likewise for local "call_labels".
4711         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4712         rtx to rtx_insn *.
4713         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4714         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4715         the loops over LABEL_REFS.
4716         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4717         braf_label.
4718         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4719         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4720         (split_branches): Strengthen local "olabel" from rtx to
4721         rtx_insn *, adding a safe_as_a cast.
4722         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4723         to "rtx_insn *".
4724         (add_insn_after): Likewise for first two params.
4725         (add_insn_before): Likewise.
4726         (remove_insn): Likewise for param.
4727         (emit_pattern_before_noloc): Likewise for second and third params.
4728         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4729         (emit_call_insn_before_noloc): Likewise.
4730         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4731         to "rtx_insn *".
4732         (emit_barrier_before): Likewise.
4733         (emit_label_before): Strengthen "label" param from "rtx" to
4734         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4735         "rtx_insn *".
4736         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4737         "rtx_insn *".
4738         (emit_pattern_after_noloc): Likewise.
4739         (emit_insn_after_noloc): Likewise.
4740         (emit_jump_insn_after_noloc): Likewise.
4741         (emit_call_insn_after_noloc): Likewise.
4742         (emit_debug_insn_after_noloc): Likewise.
4743         (emit_barrier_after): Likewise.
4744         (emit_label_after): Likewise for both params.
4745         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4746         "loc" param from "int" to "location_t".
4747         (emit_insn_after_setloc): Likewise.
4748         (emit_jump_insn_after_setloc): Likewise.
4749         (emit_call_insn_after_setloc): Likewise.
4750         (emit_debug_insn_after_setloc): Likewise.
4751         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4752         "loc" param from "int" to "location_t".
4753         (emit_pattern_before): Convert NULL_RTX to NULL.
4754         (emit_insn_before_setloc): Convert "loc" param from "int" to
4755         "location_t".
4756         (emit_jump_insn_before_setloc): Likewise.
4757         (emit_call_insn_before_setloc): Likewise.
4758         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4759         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4760         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4761         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4762         Convert 3rd param from "int" to "location_t".
4763         (emit_barrier_before, emit_barrier_after, next_real_insn):
4764         Strengthen param from rtx to rtx_insn *.
4765         (emit_label_before): Strengthen 1st param from "rtx" to
4766         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4767         "rtx_insn *".
4768         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4769         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4770         Strengthen 2nd param from "rtx" to "rtx_insn *".
4771         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4772         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4773         Likewise. Convert 3rd param from "int" to "location_t".
4774         (emit_label_after): Strengthen 1st param from "rtx" to
4775         "rtx_code_label *".
4776         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4777         "rtx_insn *".
4778         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4779         from "rtx" to "rtx_insn *".
4781 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4783         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4784         bodies streamed in with -Q.
4785         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4786         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4787         * gimple-streamer-out.c: Include gimple-pretty-print.h
4788         (output_bb): Dump stmts streamed.
4789         * lto-section-out.c: Include print-tree.h
4790         (lto_begin_section): Dump sections created.
4791         (lto_output_decl_index): Dump decl encoded.
4792         * lto-streamer-out.c: Include print-tree.h
4793         (create_output_block): Dump output block created.
4794         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4795         (output_function): Dump function output.
4796         (output_constructor): Dump constructor streamed.
4797         (write_global_stream): Output indexes encoded.
4798         (produce_asm_for_decls): Dump streams encoded.
4799         * lto-streamer.c (streamer_dump_file): New global var.
4800         * lto-streamer.h (streamer_dump_file): Declare.
4801         * passes.c (ipa_write_summaries): Initialize streamer dump.
4802         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4803         in.
4805 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4807         PR target/86048
4808         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4809         offsets for register save directives.  Emit a second batch of save
4810         directives, if need be, when the function accesses prior frames.
4812 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4814         * config/arc/fpu.md (fmasf4): Force operand to register.
4815         (fnmasf4): Likewise.
4817 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4819         * config/arc/arc-protos.h (arc_pad_return): Remove.
4820         * config/arc/arc.c (machine_function): Remove force_short_suffix
4821         and size_reason.
4822         (arc_print_operand): Adjust printing of '&'.
4823         (arc_verify_short): Remove conditional printing of short suffix.
4824         (arc_final_prescan_insn): Remove reference to size_reason.
4825         (pad_return): New function.
4826         (arc_reorg): Call pad_return.
4827         (arc_pad_return): Remove.
4828         (arc_init_machine_status): Remove reference to force_short_suffix.
4829         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4830         (attr length): When attribute iscompact is true force to 2
4831         regardless; in the case of maybe check if we want to force the
4832         instruction to have 4 bytes length.
4833         (nopv): Change it to generate 4 byte long nop as well.
4834         (blockage): New pattern.
4835         (simple_return): Remove call to arc_pad_return.
4836         (p_return_i): Likewise.
4838 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4840         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4842 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4844         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4845         ARC cores.
4847 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4849         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4850         for ARC700 and ARCv2.
4852 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
4854         PR target/86076
4855         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4856         operands[2] instead of operands[1].
4859 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4861         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4862         case, check whether the outer register overlaps an unallocatable
4863         register, not just whether it fits the required class.
4865 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
4867         * poly-int.h (can_div_trunc_p): Add new overload in which all values
4868         are poly_ints.
4869         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4870         (memrefs_conflict_p): Likewise.
4871         (init_alias_analysis): Likewise.
4872         * cfgexpand.c (expand_debug_expr): Likewise.
4873         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4874         * cse.c (fold_rtx): Likewise.
4875         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4876         * expr.c (emit_block_move_hints): Likewise.
4877         (clear_storage_hints, push_block, emit_push_insn): Likewise.
4878         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4879         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4880         (emit_group_store): Likewise.
4881         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
4882         to read the PRE/POST_MODIFY increment.
4883         * calls.c (store_one_arg): Use strip_offset.
4884         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4885         poly_int_rtx_p.
4886         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4887         by a VEC_SELECT.
4888         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4889         (simplify_binary_operation_1): Extend CONST_INT handling to
4890         poly_int_rtx_p.
4891         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4892         than a HOST_WIDE_INT.
4893         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4894         poly_int64.
4895         (adjust_mems, add_stores): Update accodingly.
4896         (vt_canonicalize_addr): Track polynomial offsets.
4897         (emit_note_insn_var_location): Likewise.
4898         (vt_add_function_parameter): Likewise.
4899         (vt_initialize): Likewise.
4901 2018-06-12  Jeff Law  <law@redhat.com>
4903         * config.gcc (alpha*-*-freebsd*): Remove.
4904         * config/alpha/freebsd.h: Remove.
4906 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
4908         PR other/69968
4909         * spellcheck-tree.c (levenshtein_distance): Rename to...
4910         (get_edit_distance): ...this, and update for underlying renaming.
4911         * spellcheck-tree.h (levenshtein_distance): Rename to...
4912         (get_edit_distance): ...this.
4913         * spellcheck.c (levenshtein_distance): Rename to...
4914         (get_edit_distance): ...this.  Convert from Levenshtein distance
4915         to Damerau-Levenshtein distance by supporting transpositions of
4916         adjacent characters.  Rename "v1" to "v_next" and "v0" to
4917         "v_one_ago".
4918         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4919         (selftest::test_edit_distance_unit_test_oneway): ...this, and
4920         update for underlying renaming.
4921         (selftest::levenshtein_distance_unit_test): Rename to...
4922         (selftest::test_get_edit_distance_unit): ...this, and update for
4923         underlying renaming.
4924         (selftest::test_find_closest_string): Add example from PR 69968
4925         where transposition helps
4926         (selftest::test_metric_conditions): Update for renaming.
4927         (selftest::test_metric_conditions): Likewise.
4928         (selftest::spellcheck_c_tests): Likewise.
4929         * spellcheck.h (levenshtein_distance): Rename both overloads to...
4930         (get_edit_distance): ...this.
4931         (best_match::consider): Update for renaming.
4933 2018-06-12  Martin Sebor  <msebor@redhat.com>
4935         PR tree-optimization/85259
4936         * builtins.c (compute_objsize): Handle constant offsets.
4937         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4938         true iff a warning has been issued.
4939         * gimple.h (gimple_nonartificial_location): New function.
4940         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4941         gimple_nonartificial_location and handle -Wno-system-headers.
4942         (handle_builtin_stxncpy): Same.
4944 2018-06-12  Martin Sebor  <msebor@redhat.com>
4946         PR c/85931
4947         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4949 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
4951         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4952         BUILTIN_VEC_XST entries for pointer to double and long long.
4954 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
4956         PR target/85990
4957         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4958         Update comments.
4959         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4960         Likewise.
4962 2018-06-12  Martin Liska  <mliska@suse.cz>
4964         * doc/options.texi: Document IntegerRange.
4966 2018-06-12  Martin Liska  <mliska@suse.cz>
4968         * config/i386/i386.opt: Make MPX-related options as Deprecated.
4969         * opt-functions.awk: Handle Deprecated flag.
4970         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4971         and report error.
4972         (read_cmdline_option): Report warning for a deprecated option.
4973         * opts.h (struct cl_option): Add new field cl_deprecated.
4974         (CL_ERR_DEPRECATED): New.
4976 2018-06-12  Martin Liska  <mliska@suse.cz>
4978         * doc/options.texi: Document Deprecated option flag.
4980 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4982         * config/arc/arc-arch.h (arc_extras): New enum.
4983         (arc_cpu_t):Add field extra.
4984         (arc_cpu_types): Consider the extras.
4985         * config/arc/arc-cpus.def: Add extras info.
4986         * config/arc/arc-opts.h (processor_type): Consider extra field.
4987         * config/arc/arc.c (arc_override_options): Handle extra field.
4989 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4991         * config/arc/arc-arch.h: Update ARC_OPTX macro.
4992         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
4993         field.
4994         * config/arc/arc.c (arc_init): Update pic warning.
4995         (irq_range): Update irq range parsing warnings.
4996         (arc_override_options): Update various warning messages.
4997         (arc_handle_aux_attribute): Likewise.
4999 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
5001         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5003 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5005         * doc/sourcebuild.texi: Document usage of line number 0 in verify
5006         compiler messages directives.
5008 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
5010         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5011         * config/mips/mips-tables.opt: Regenerate.
5012         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5013         mips64r6.
5014         * doc/invoke.texi: Document -march=i6500.
5016 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
5018         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5019         (i6400_gpmul): Add cpu_unit.
5020         (i6400_gpdiv): Likewise.
5021         (i6400_msa_add_d): Update reservations.
5022         (i6400_msa_int_add) Likewise.
5023         (i6400_msa_short_logic3) Likewise.
5024         (i6400_msa_short_logic2) Likewise.
5025         (i6400_msa_short_logic) Likewise.
5026         (i6400_msa_move) Likewise.
5027         (i6400_msa_cmp) Likewise.
5028         (i6400_msa_short_float2) Likewise.
5029         (i6400_msa_div_d) Likewise.
5030         (i6400_msa_long_logic1) Likewise.
5031         (i6400_msa_long_logic2) Likewise.
5032         (i6400_msa_mult) Likewise.
5033         (i6400_msa_long_float2) Likewise.
5034         (i6400_msa_long_float4) Likewise.
5035         (i6400_msa_long_float5) Likewise.
5036         (i6400_msa_long_float8) Likewise.
5037         (i6400_fpu_fadd): Include frint type.
5038         (i6400_fpu_store): New define_insn_reservation.
5039         (i6400_fpu_load): Likewise.
5040         (i6400_fpu_move): Likewise.
5041         (i6400_fpu_fcmp): Likewise.
5042         (i6400_fpu_fmadd): Likewise.
5043         (i6400_int_mult): Include imul3nc type and update reservation.
5044         (i6400_int_div): Include idiv3 type and update reservation.
5045         (i6400_int_load): Update to check type not move_type.
5046         (i6400_int_store): Likewise.
5047         (i6400_int_prefetch): Set zero latency.
5049 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5051         * gcc.c: Document new %@{...} sequence.
5052         (LINK_COMMAND_SPEC): Use it for the -L switches.
5053         (cpp_unique_options): Use it for the -I switches.
5054         (at_file_argbuf): New global variable.
5055         (in_at_file): Likewise.
5056         (alloc_args): Create at_file_argbuf.
5057         (clear_args): Truncate at_file_argbuf.
5058         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5059         (open_at_file): New function.
5060         (close_at_file): Likewise.
5061         (create_at_file): Delete.
5062         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5063         <'o'>: Likewise.
5064         <'@'>: New case.
5065         (validate_switches_from_spec): Deal with %@{...} sequence.
5066         (validate_switches): Likewise.
5067         (driver::finalize): Call clear_args.
5069 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
5071         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5073 2018-06-11  Martin Sebor  <msebor@redhat.com>
5075         * doc/invoke.texi (-Wall): List -Wc++17-compat.
5076         (Wno-class-memaccess): Add @opindex.
5077         (Wno-templates, Wno-multiple-inheritance): Same.
5078         (Wno-virtual-inheritance, Wno-namespaces): Same.
5079         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5080         (Wno-format-overflow, Wno-format-truncation): Same.
5081         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5082         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5083         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5084         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5085         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5086         (Wno-misspelled-isr): Same.
5088 2018-06-11  Martin Sebor  <msebor@redhat.com>
5090         * PR tree-optimization/86083
5091         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5093 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5095         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5097 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
5099         PR target/85755
5100         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5101         on the correct operand.
5102         (*movdi_internal64): Ditto.
5104 2018-06-11  Martin Liska  <mliska@suse.cz>
5106         PR tree-optimization/86089
5107         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5109 2018-06-11  Julia Koval  <julia.koval@intel.com>
5111         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5112         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5113         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5115 2018-06-11  Olivier Hainque  <hainque@adacore.com>
5117         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5118         for Ada with strict dwarf2.
5120 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
5122         PR target/85755
5123         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5124         addresses.
5126 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
5128         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5130 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
5132         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5133         TARGET_ELF.
5135 2018-06-08  Martin Liska  <mliska@suse.cz>
5137         * tree-cfg.h (debug_function): Fix argument type to match
5138         implementation.
5140 2018-06-08  Martin Liska  <mliska@suse.cz>
5142         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5143         Remove usage of MPX-related (and removed) fields.
5144         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5146 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
5148         * cfg.c (debug): Use TDF_NONE rather than 0.
5149         * cfghooks.c (debug): Likewise.
5150         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5151         (struct dump_option_value_info): Convert to...
5152         (struct kv_pair): ...this template type.
5153         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5154         rather than 0.
5155         (optinfo_verbosity_options): Likewise.
5156         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5157         OPTGROUP_NONE.
5158         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5159         than int for "optgroup_flags" param.
5160         (dump_generic_expr_loc): Use dump_flags_t rather than int for
5161         "dump_kind" param.
5162         (dump_dec): Likewise.
5163         (dump_finish): Use TDF_NONE rather than 0.
5164         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5165         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
5166         than 0.  Update for change to option_ptr.
5167         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5168         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
5169         0.  Update for changes to optinfo_verbosity_options and
5170         optgroup_options.
5171         (opt_info_switch_p): Convert optgroup_flags from int to
5172         optgroup_flags_t.
5173         (dump_basic_block): Use dump_flags_t rather than int
5174         for "dump_kind" param.
5175         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5176         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5177         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5178         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5179         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5180         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5181         TDF_NONE): Convert from macros to...
5182         (enum dump_flag): ...this new enum.
5183         (dump_flags_t): Update to use enum.
5184         (operator|, operator&, operator~, operator|=, operator&=):
5185         Implement for dump_flags_t.
5186         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5187         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5188         Convert from macros to...
5189         (enum optgroup_flag): ...this new enum.
5190         (optgroup_flags_t): New typedef.
5191         (operator|, operator|=): Implement for optgroup_flags_t.
5192         (struct dump_file_info): Convert field "alt_flags" to
5193         dump_flags_t.  Convert field "optgroup_flags" to
5194         optgroup_flags_t.
5195         (dump_basic_block): Use dump_flags_t rather than int for param.
5196         (dump_generic_expr_loc): Likewise.
5197         (dump_dec): Likewise.
5198         (dump_register): Convert param "optgroup_flags" to
5199         optgroup_flags_t.
5200         (opt_info_enable_passes): Likewise.
5201         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5202         than 0.
5203         * gimple-pretty-print.c (debug): Likewise.
5204         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5205         (merged_store_group::apply_stores): Likewise.
5206         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5207         * gimple.c (verify_gimple_pp): Likewise.
5208         * graphite-poly.c (print_pbb_body): Likewise.
5209         * passes.c (pass_manager::register_one_dump_file): Convert
5210         local "optgroup_flags" to optgroup_flags_t.
5211         * print-tree.c (print_node): Use TDF_NONE rather than 0.
5212         (debug): Likewise.
5213         (debug_body): Likewise.
5214         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5215         to optgroup_flags_t.
5216         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5217         than 0.
5218         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5219         (convert_mult_to_fma): Likewise.
5220         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5221         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5222         * tree-vect-data-refs.c (dump_lower_bound): Convert param
5223         "dump_kind" to dump_flags_t.
5225 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5227         * config/rs6000/rs6000.c (min, max): Delete.
5229 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5231         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5232         -mabi=spe and -mabi=no-spe.
5234 2018-06-08  Martin Liska  <mliska@suse.cz>
5236         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5237         where we expect an existing summary.
5239 2018-06-08  Martin Liska  <mliska@suse.cz>
5241         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5242         * ipa-inline.h (estimate_edge_growth): Likewise.
5244 2018-06-08  Martin Liska  <mliska@suse.cz>
5246         * cgraph.c (function_version_hasher::hash): Use
5247         cgraph_node::get_uid ().
5248         (function_version_hasher::equal):
5249         * cgraph.h (cgraph_node::get_uid): New method.
5250         * ipa-inline.c (update_caller_keys): Use
5251         cgraph_node::get_uid ().
5252         (update_callee_keys): Likewise.
5253         * ipa-utils.c (searchc): Likewise.
5254         (ipa_reduced_postorder): Likewise.
5255         * lto-cgraph.c (input_node): Likewise.
5256         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5257         * symbol-summary.h (symtab_insertion): Likewise.
5258         (symtab_removal): Likewise.
5259         (symtab_duplication): Likewise.
5260         * tree-pretty-print.c (dump_function_header): Likewise.
5261         * tree-sra.c (convert_callers_for_node): Likewise.
5263 2018-06-08  Martin Liska  <mliska@suse.cz>
5265         * cgraph.c (symbol_table::create_edge): Always assign a new
5266         unique number.
5267         (symbol_table::free_edge): Do not recycle numbers.
5268         * cgraph.h (cgraph_edge::get): New method.
5269         * symbol-summary.h (symtab_removal): Use it.
5270         (symtab_duplication): Likewise.
5271         (call_summary::hashable_uid): Remove.
5273 2018-06-08  Martin Liska  <mliska@suse.cz>
5275         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5276         (initialize_growth_caches): Remove.
5277         (free_growth_caches): Likewise.
5278         (do_estimate_edge_time): Use edge_growth_cache.
5279         (do_estimate_edge_size): Likewise.
5280         (do_estimate_edge_hints): Likewise.
5281         * ipa-inline.c (reset_edge_caches): Likewise.
5282         (recursive_inlining): Likewise.
5283         (inline_small_functions): Likewise.
5284         * ipa-inline.h (initialize_growth_caches): Remove.
5285         (estimate_edge_size): Likewise.
5286         (estimate_edge_time): Likewise.
5287         (estimate_edge_hints): Likewise.
5288         (reset_edge_growth_cache): Likewise.
5289         * symbol-summary.h (call_summary::remove): New method.
5291 2018-06-08  Martin Liska  <mliska@suse.cz>
5293         * ipa-cp.c (class edge_clone_summary): New summary.
5294         (grow_edge_clone_vectors): Remove.
5295         (ipcp_edge_duplication_hook): Remove.
5296         (class edge_clone_summary_t): New call_summary class.
5297         (ipcp_edge_removal_hook): Remove.
5298         (edge_clone_summary_t::duplicate): New function.
5299         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5300         (create_specialized_node): Likewise.
5301         (ipcp_driver): Initialize edge_clone_summaries and do not
5302         register hooks.
5304 2018-06-08  Martin Liska  <mliska@suse.cz>
5306         * symbol-summary.h (get): New function.
5307         (call_summary::m_initialize_when_cloning): New class member.
5309 2018-06-08  Martin Liska  <mliska@suse.cz>
5311         * cgraph.c (cgraph_node::remove): Do not recycle uid.
5312         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5313         (symbol_table::allocate_cgraph_symbol): Do not set uid.
5314         * passes.c (uid_hash_t): Record removed_nodes by their uids.
5315         (remove_cgraph_node_from_order): Use the removed_nodes set.
5316         (do_per_function_toporder): Likwise.
5317         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5318         instead of summary_uid.
5319         (symtab_removal): Likewise.
5320         (symtab_duplication): Likewise.
5322 2018-06-08  Martin Liska  <mliska@suse.cz>
5324         * ipa-cp.c (ipcp_store_bits_results): Use
5325         ipcp_transformation_sum.
5326         (ipcp_store_vr_results): Likewise.
5327         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5328         to ...
5329         (ipcp_transformation_initialize): ... this.
5330         (ipa_set_node_agg_value_chain):
5331         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5332         (write_ipcp_transformation_info): Likewise.
5333         (read_ipcp_transformation_info): Likewise.
5334         (ipcp_update_bits): Likewise.
5335         (ipcp_update_vr): Likewise.
5336         (ipcp_transform_function): Likewise.
5337         * ipa-prop.h: Rename ipcp_transformation_summary to
5338         ipcp_transformation.
5339         (class ipcp_transformation_t): New function summary.
5340         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5341         (ipa_get_agg_replacements_for_node): Likewise.
5343 2018-06-08  Martin Liska  <mliska@suse.cz>
5345         * ipa-pure-const.c (struct funct_state_d): Do it class instead
5346         of struct.
5347         (class funct_state_summary_t): New function_summary class.
5348         (has_function_state): Remove.
5349         (get_function_state): Likewise.
5350         (set_function_state): Likewise.
5351         (add_new_function): Likewise.
5352         (funct_state_summary_t::insert): New function.
5353         (duplicate_node_data): Remove.
5354         (remove_node_data): Remove.
5355         (funct_state_summary_t::duplicate): New function.
5356         (register_hooks): Create new funct_state_summaries.
5357         (pure_const_generate_summary): Use it.
5358         (pure_const_write_summary): Likewise.
5359         (pure_const_read_summary): Likewise.
5360         (propagate_pure_const): Likewise.
5361         (propagate_nothrow): Likewise.
5362         (dump_malloc_lattice): Likewise.
5363         (propagate_malloc): Likewise.
5364         (execute): Do not register hooks, just remove summary
5365         instead.
5366         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5367         constructor.
5369 2018-06-08  Martin Liska  <mliska@suse.cz>
5371         * ipa-reference.c (remove_node_data): Remove.
5372         (duplicate_node_data): Likewise.
5373         (class ipa_ref_var_info_summary_t): New class.
5374         (class ipa_ref_opt_summary_t): Likewise.
5375         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5376         (get_reference_optimization_summary): Use
5377         ipa_ref_opt_sum_summaries.
5378         (set_reference_vars_info): Remove.
5379         (set_reference_optimization_summary): Likewise.
5380         (ipa_init): Create summaries.
5381         (init_function_info): Use function summary.
5382         (ipa_ref_opt_summary_t::duplicate): New function.
5383         (ipa_ref_opt_summary_t::remove): New function.
5384         (get_read_write_all_from_node): Fix GNU coding style.
5385         (propagate): Use function summary.
5386         (write_node_summary_p): Fix GNU coding style.
5387         (stream_out_bitmap): Likewise.
5388         (ipa_reference_read_optimization_summary): Use function summary.
5389         (ipa_reference_c_finalize): Do not release hooks.
5391 2018-06-08  Martin Liska  <mliska@suse.cz>
5393         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5394         (analyze_function_body): Extract multiple calls of get_create.
5395         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5396         * ipa-inline.c (recursive_inlining): Use ::get method.
5397         * ipa-inline.h (estimate_edge_growth): Likewise.
5399 2018-06-08  Martin Liska  <mliska@suse.cz>
5401         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5402         HSA_INVALID.
5403         (hsa_function_summary::hsa_function_summary): Use the new enum
5404         value.
5405         (hsa_gpu_implementation_p): Use hsa_summaries::get.
5406         * hsa-gen.c (hsa_get_host_function): Likewise.
5407         (get_brig_function_name): Likewise.
5408         * ipa-hsa.c (process_hsa_functions): Likewise.
5409         (ipa_hsa_write_summary): Likewise.
5410         * symbol-summary.h (symtab_duplication): Use ::get function/
5411         (get): New function.
5413 2018-06-08  Martin Liska  <mliska@suse.cz>
5415         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5416         of get.
5417         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5418         (hsa_register_kernel): Likewise.
5419         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5420         * hsa-gen.c (hsa_get_host_function): Likewise.
5421         (get_brig_function_name): Likewise.
5422         (generate_hsa): Likewise.
5423         (pass_gen_hsail::execute): Likewise.
5424         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5425         (devirtualization_time_bonus): Likewise.
5426         (ipcp_propagate_stage): Likewise.
5427         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5428         (edge_set_predicate): Likewise.
5429         (evaluate_conditions_for_known_args): Likewise.
5430         (evaluate_properties_for_edge): Likewise.
5431         (ipa_fn_summary::reset): Likewise.
5432         (ipa_fn_summary_t::duplicate): Likewise.
5433         (dump_ipa_call_summary): Likewise.
5434         (ipa_dump_fn_summary): Likewise.
5435         (analyze_function_body): Likewise.
5436         (compute_fn_summary): Likewise.
5437         (estimate_edge_devirt_benefit): Likewise.
5438         (estimate_edge_size_and_time): Likewise.
5439         (estimate_calls_size_and_time): Likewise.
5440         (estimate_node_size_and_time): Likewise.
5441         (inline_update_callee_summaries): Likewise.
5442         (remap_edge_change_prob): Likewise.
5443         (remap_edge_summaries): Likewise.
5444         (ipa_merge_fn_summary_after_inlining): Likewise.
5445         (ipa_update_overall_fn_summary): Likewise.
5446         (read_ipa_call_summary): Likewise.
5447         (inline_read_section): Likewise.
5448         (write_ipa_call_summary): Likewise.
5449         (ipa_fn_summary_write): Likewise.
5450         (ipa_free_fn_summary): Likewise.
5451         * ipa-hsa.c (process_hsa_functions): Likewise.
5452         (ipa_hsa_write_summary): Likewise.
5453         (ipa_hsa_read_section): Likewise.
5454         * ipa-icf.c (sem_function::merge): Likewise.
5455         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5456         (do_estimate_edge_time): Likewise.
5457         (estimate_size_after_inlining): Likewise.
5458         (estimate_growth): Likewise.
5459         (growth_likely_positive): Likewise.
5460         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5461         (inline_call): Likewise.
5462         * ipa-inline.c (caller_growth_limits): Likewise.
5463         (can_inline_edge_p): Likewise.
5464         (can_inline_edge_by_limits_p): Likewise.
5465         (compute_uninlined_call_time): Likewise.
5466         (compute_inlined_call_time): Likewise.
5467         (want_inline_small_function_p): Likewise.
5468         (edge_badness): Likewise.
5469         (update_caller_keys): Likewise.
5470         (update_callee_keys): Likewise.
5471         (recursive_inlining): Likewise.
5472         (inline_small_functions): Likewise.
5473         (inline_to_all_callers_1): Likewise.
5474         (dump_overall_stats): Likewise.
5475         (early_inline_small_functions): Likewise.
5476         (early_inliner): Likewise.
5477         * ipa-inline.h (estimate_edge_growth): Likewise.
5478         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5479         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5480         * ipa-prop.h (IPA_NODE_REF): Likewise.
5481         (IPA_EDGE_REF): Likewise.
5482         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5483         (propagate_malloc): Likewise.
5484         * ipa-split.c (execute_split_functions): Likewise.
5485         * symbol-summary.h: Rename get to get_create.
5486         (get): Likewise.
5487         (get_create): Likewise.
5488         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5490 2018-06-08  Martin Liska  <mliska@suse.cz>
5492         * symbol-summary.h (release): Move definition out of class
5493         declaration.
5494         (symtab_removal): Likewise.
5495         (symtab_duplication): Likewise.
5497 2018-06-08  Martin Liska  <mliska@suse.cz>
5499         * symbol-summary.h (function_summary): Move constructor
5500         implementation out of class declaration.
5501         (release): Likewise.
5502         (symtab_insertion): Likewise.
5503         (symtab_removal): Likewise.
5504         (symtab_duplication): Likewise.
5505         (get): Likewise.
5507 2018-06-08  Martin Liska  <mliska@suse.cz>
5509         * Makefile.in: Remove support for MPX (macros, related functions,
5510         fields in cgraph_node, ...).
5511         * builtin-types.def (BT_BND): Likewise.
5512         (BT_FN_BND_CONST_PTR): Likewise.
5513         (BT_FN_CONST_PTR_BND): Likewise.
5514         (BT_FN_VOID_PTR_BND): Likewise.
5515         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5516         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5517         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5518         (expand_builtin_mempcpy_with_bounds): Likewise.
5519         (expand_builtin_memset_with_bounds): Likewise.
5520         (expand_builtin_memset_args): Likewise.
5521         (std_expand_builtin_va_start): Likewise.
5522         (expand_builtin): Likewise.
5523         (expand_builtin_with_bounds): Likewise.
5524         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5525         (DEF_LIB_BUILTIN_CHKP): Likewise.
5526         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5527         (DEF_CHKP_BUILTIN): Likewise.
5528         (BUILT_IN_MEMCPY): Likewise.
5529         (BUILT_IN_MEMMOVE): Likewise.
5530         (BUILT_IN_MEMPCPY): Likewise.
5531         (BUILT_IN_MEMSET): Likewise.
5532         (BUILT_IN_STPCPY): Likewise.
5533         (BUILT_IN_STRCAT): Likewise.
5534         (BUILT_IN_STRCHR): Likewise.
5535         (BUILT_IN_STRCPY): Likewise.
5536         (BUILT_IN_STRLEN): Likewise.
5537         (BUILT_IN_MEMCPY_CHK): Likewise.
5538         (BUILT_IN_MEMMOVE_CHK): Likewise.
5539         (BUILT_IN_MEMPCPY_CHK): Likewise.
5540         (BUILT_IN_MEMSET_CHK): Likewise.
5541         (BUILT_IN_STPCPY_CHK): Likewise.
5542         (BUILT_IN_STRCAT_CHK): Likewise.
5543         (BUILT_IN_STRCPY_CHK): Likewise.
5544         * calls.c (store_bounds): Likewise.
5545         (emit_call_1): Likewise.
5546         (special_function_p): Likewise.
5547         (maybe_warn_nonstring_arg): Likewise.
5548         (initialize_argument_information): Likewise.
5549         (finalize_must_preallocate): Likewise.
5550         (compute_argument_addresses): Likewise.
5551         (expand_call): Likewise.
5552         * cfgexpand.c (expand_call_stmt): Likewise.
5553         (expand_return): Likewise.
5554         (expand_gimple_stmt_1): Likewise.
5555         (pass_expand::execute): Likewise.
5556         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5557         (cgraph_node::remove): Likewise.
5558         (cgraph_node::dump): Likewise.
5559         (cgraph_node::verify_node): Likewise.
5560         * cgraph.h (chkp_function_instrumented_p): Likewise.
5561         (symtab_node::get_alias_target): Likewise.
5562         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5563         (cgraph_local_p): Likewise.
5564         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5565         (cgraph_edge::rebuild_references): Likewise.
5566         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5567         (walk_polymorphic_call_targets): Likewise.
5568         (cgraph_node::expand_thunk): Likewise.
5569         (symbol_table::output_weakrefs): Likewise.
5570         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5571         (ix86_handle_option): Likewise.
5572         * config/i386/constraints.md: Likewise.
5573         * config/i386/i386-builtin-types.def (BND): Likewise.
5574         (VOID): Likewise.
5575         (PVOID): Likewise.
5576         (ULONG): Likewise.
5577         * config/i386/i386-builtin.def (BDESC_END): Likewise.
5578         (BDESC_FIRST): Likewise.
5579         (BDESC): Likewise.
5580         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5581         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5582         * config/i386/i386.c (enum reg_class): Likewise.
5583         (ix86_target_string): Likewise.
5584         (ix86_option_override_internal): Likewise.
5585         (ix86_conditional_register_usage): Likewise.
5586         (ix86_valid_target_attribute_inner_p): Likewise.
5587         (ix86_set_indirect_branch_type): Likewise.
5588         (ix86_set_current_function): Likewise.
5589         (ix86_function_arg_regno_p): Likewise.
5590         (init_cumulative_args): Likewise.
5591         (ix86_function_arg_advance): Likewise.
5592         (ix86_function_arg): Likewise.
5593         (ix86_pass_by_reference): Likewise.
5594         (ix86_function_value_regno_p): Likewise.
5595         (ix86_function_value_1): Likewise.
5596         (ix86_function_value_bounds): Likewise.
5597         (ix86_return_in_memory): Likewise.
5598         (ix86_setup_incoming_vararg_bounds): Likewise.
5599         (ix86_va_start): Likewise.
5600         (indirect_thunk_need_prefix): Likewise.
5601         (print_reg): Likewise.
5602         (ix86_print_operand): Likewise.
5603         (ix86_expand_call): Likewise.
5604         (ix86_output_function_return): Likewise.
5605         (reg_encoded_number): Likewise.
5606         (BDESC_VERIFYS): Likewise.
5607         (ix86_init_mpx_builtins): Likewise.
5608         (ix86_init_builtins): Likewise.
5609         (ix86_emit_cmove): Likewise.
5610         (ix86_emit_move_max): Likewise.
5611         (ix86_expand_builtin): Likewise.
5612         (ix86_builtin_mpx_function): Likewise.
5613         (ix86_get_arg_address_for_bt): Likewise.
5614         (ix86_load_bounds): Likewise.
5615         (ix86_store_bounds): Likewise.
5616         (ix86_load_returned_bounds): Likewise.
5617         (ix86_store_returned_bounds): Likewise.
5618         (ix86_class_likely_spilled_p): Likewise.
5619         (ix86_hard_regno_mode_ok): Likewise.
5620         (x86_order_regs_for_local_alloc): Likewise.
5621         (ix86_mitigate_rop): Likewise.
5622         (ix86_bnd_prefixed_insn_p): Likewise.
5623         (ix86_mpx_bound_mode): Likewise.
5624         (ix86_make_bounds_constant): Likewise.
5625         (ix86_initialize_bounds): Likewise.
5626         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5627         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5628         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5629         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5630         (TARGET_CHKP_BOUND_MODE): Likewise.
5631         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5632         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5633         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5634         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5635         * config/i386/i386.h (TARGET_MPX): Likewise.
5636         (TARGET_MPX_P): Likewise.
5637         (VALID_BND_REG_MODE): Likewise.
5638         (FIRST_BND_REG): Likewise.
5639         (LAST_BND_REG): Likewise.
5640         (enum reg_class): Likewise.
5641         (BND_REG_P): Likewise.
5642         (BND_REGNO_P): Likewise.
5643         (BNDmode): Likewise.
5644         (ADJUST_INSN_LENGTH): Likewise.
5645         * config/i386/i386.md: Likewise.
5646         * config/i386/i386.opt: Likewise.
5647         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5648         (defined): Likewise.
5649         (LINK_MPX): Likewise.
5650         (MPX_SPEC): Likewise.
5651         (LIBMPX_SPEC): Likewise.
5652         (LIBMPXWRAPPERS_SPEC): Likewise.
5653         (CHKP_SPEC): Likewise.
5654         * config/i386/predicates.md: Likewise.
5655         * dbxout.c (dbxout_type): Likewise.
5656         * doc/extend.texi: Likewise.
5657         * doc/invoke.texi: Likewise.
5658         * doc/md.texi: Likewise.
5659         * doc/tm.texi: Likewise.
5660         * doc/tm.texi.in: Likewise.
5661         * dwarf2out.c (is_base_type): Likewise.
5662         (gen_formal_types_die): Likewise.
5663         (gen_subprogram_die): Likewise.
5664         (gen_type_die_with_usage): Likewise.
5665         (gen_decl_die): Likewise.
5666         (dwarf2out_late_global_decl): Likewise.
5667         * expr.c (expand_assignment): Likewise.
5668         (emit_storent_insn): Likewise.
5669         (store_expr_with_bounds): Likewise.
5670         (store_expr): Likewise.
5671         (expand_expr_real_1): Likewise.
5672         * expr.h (store_expr_with_bounds): Likewise.
5673         * function.c (use_register_for_decl): Likewise.
5674         (struct bounds_parm_data): Likewise.
5675         (assign_parms_augmented_arg_list): Likewise.
5676         (assign_parm_find_entry_rtl): Likewise.
5677         (assign_parm_is_stack_parm): Likewise.
5678         (assign_parm_load_bounds): Likewise.
5679         (assign_bounds): Likewise.
5680         (assign_parms): Likewise.
5681         (expand_function_start): Likewise.
5682         * gcc.c (CHKP_SPEC): Likewise.
5683         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5684         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5685         (wrestrict_dom_walker::check_call): Likewise.
5686         * gimple.c (gimple_build_call_from_tree): Likewise.
5687         * gimple.h (enum gf_mask): Likewise.
5688         (gimple_call_with_bounds_p): Likewise.
5689         (gimple_call_set_with_bounds): Likewise.
5690         * gimplify.c (gimplify_init_constructor): Likewise.
5691         * ipa-cp.c (initialize_node_lattices): Likewise.
5692         (propagate_constants_across_call): Likewise.
5693         (find_more_scalar_values_for_callers_subset): Likewise.
5694         * ipa-hsa.c (process_hsa_functions): Likewise.
5695         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5696         * ipa-icf.c (sem_function::merge): Likewise.
5697         * ipa-inline.c (early_inliner): Likewise.
5698         * ipa-pure-const.c (warn_function_noreturn): Likewise.
5699         (warn_function_cold): Likewise.
5700         (propagate_pure_const): Likewise.
5701         * ipa-ref.h (enum GTY): Likewise.
5702         * ipa-split.c (find_retbnd): Likewise.
5703         (consider_split): Likewise.
5704         (split_function): Likewise.
5705         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5706         * ipa.c (walk_polymorphic_call_targets): Likewise.
5707         (symbol_table::remove_unreachable_nodes): Likewise.
5708         (process_references): Likewise.
5709         (cgraph_build_static_cdtor_1): Likewise.
5710         * lto-cgraph.c (lto_output_node): Likewise.
5711         (output_refs): Likewise.
5712         (compute_ltrans_boundary): Likewise.
5713         (input_overwrite_node): Likewise.
5714         (input_node): Likewise.
5715         (input_cgraph_1): Likewise.
5716         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5717         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5718         (class pass_chkp_instrumentation_passes): Likewise.
5719         (make_pass_chkp_instrumentation_passes): Likewise.
5720         * passes.def: Likewise.
5721         * rtl.h (struct GTY): Likewise.
5722         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5723         * stor-layout.c (layout_type): Likewise.
5724         * symtab.c: Likewise.
5725         * target.def: Likewise.
5726         * targhooks.c (default_chkp_bound_type): Likewise.
5727         (default_chkp_bound_mode): Likewise.
5728         (default_builtin_chkp_function): Likewise.
5729         (default_chkp_function_value_bounds): Likewise.
5730         (default_chkp_make_bounds_constant): Likewise.
5731         (default_chkp_initialize_bounds): Likewise.
5732         * targhooks.h (default_chkp_bound_type): Likewise.
5733         (default_chkp_bound_mode): Likewise.
5734         (default_builtin_chkp_function): Likewise.
5735         (default_chkp_function_value_bounds): Likewise.
5736         (default_chkp_make_bounds_constant): Likewise.
5737         (default_chkp_initialize_bounds): Likewise.
5738         * toplev.c (compile_file): Likewise.
5739         (process_options): Likewise.
5740         * tree-core.h (DEF_BUILTIN): Likewise.
5741         (DEF_BUILTIN_CHKP): Likewise.
5742         * tree-inline.c (declare_return_variable): Likewise.
5743         (remap_gimple_stmt): Likewise.
5744         (copy_bb): Likewise.
5745         (initialize_inlined_parameters): Likewise.
5746         (expand_call_inline): Likewise.
5747         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5748         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5749         (make_pass_ipa_chkp_produce_thunks): Likewise.
5750         (make_pass_chkp): Likewise.
5751         (make_pass_chkp_opt): Likewise.
5752         (make_pass_chkp_instrumentation_passes): Likewise.
5753         * tree-pretty-print.c (dump_generic_node): Likewise.
5754         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5755         * tree-ssa-dce.c (propagate_necessity): Likewise.
5756         (eliminate_unnecessary_stmts): Likewise.
5757         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5758         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5759         * tree-ssa-sccvn.h: Likewise.
5760         * tree-ssa-strlen.c (get_string_length): Likewise.
5761         (valid_builtin_call): Likewise.
5762         (adjust_last_stmt): Likewise.
5763         (handle_builtin_strchr): Likewise.
5764         (handle_builtin_strcpy): Likewise.
5765         (handle_builtin_stxncpy): Likewise.
5766         (handle_builtin_memcpy): Likewise.
5767         (handle_builtin_strcat): Likewise.
5768         (strlen_check_and_optimize_stmt): Likewise.
5769         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5770         * tree-streamer-in.c: Likewise.
5771         * tree-streamer.c (record_common_node): Likewise.
5772         * tree.c (tree_code_size): Likewise.
5773         (wide_int_to_tree_1): Likewise.
5774         (type_contains_placeholder_1): Likewise.
5775         (build_common_tree_nodes): Likewise.
5776         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5777         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5778         (POINTER_BOUNDS_P): Likewise.
5779         (BOUNDED_TYPE_P): Likewise.
5780         (BOUNDED_P): Likewise.
5781         (CALL_WITH_BOUNDS_P): Likewise.
5782         (pointer_bounds_type_node): Likewise.
5783         * value-prof.c (gimple_ic): Likewise.
5784         * var-tracking.c (vt_add_function_parameters): Likewise.
5785         * varasm.c (make_decl_rtl): Likewise.
5786         (assemble_start_function): Likewise.
5787         (output_constant): Likewise.
5788         (maybe_assemble_visibility): Likewise.
5789         * varpool.c (ctor_for_folding): Likewise.
5790         * chkp-builtins.def: Remove.
5791         * ipa-chkp.c: Remove.
5792         * ipa-chkp.h: Remove.
5793         * rtl-chkp.c: Remove.
5794         * rtl-chkp.h: Remove.
5795         * tree-chkp-opt.c: Remove.
5796         * tree-chkp.c: Remove.
5797         * tree-chkp.h: Remove.
5799 2018-06-07  Carl Love  <cel@us.ibm.com>
5801         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5802         vextract_fp_from_shortl): Add BE support.
5804 2018-06-07  Paul Koning  <ni1d@arrl.net>
5806         * compare-elim.c (try_merge_compare): Don't merge compare if
5807         address contains a side effect.
5808         (try_eliminate_compare): Likewise.
5810 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5812         * config.gcc: Support "tremont".
5813         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5814         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5815         PROCESSOR_TREMONT.
5816         * config/i386/i386.c (m_TREMONT): Define.
5817         (processor_target_table): Add "tremont".
5818         (PTA_TREMONT): Define.
5819         (ix86_lea_outperforms): Add TARGET_TREMONT.
5820         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5821         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5822         and M_INTEL_GOLDMONT_PLUS.
5823         (fold_builtin_cpu): Add "tremont".
5824         (ix86_add_stmt_cost): Add TARGET_TREMONT.
5825         (ix86_option_override_internal): Add "tremont".
5826         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5827         (processor_type): Add PROCESSOR_TREMONT.
5828         * config/i386/x86-tune.def: Add m_TREMONT.
5829         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5831 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5833         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5834         symbol defined for msp430i* devices to be lower case.
5836 2018-06-07  Richard Biener  <rguenther@suse.de>
5838         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5839         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
5840         Properly wrap signed arithmetic if overflow wraps.
5842 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
5844         PR tree-optimization/69615
5845         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5846         of a cast from a same precision integral SSA_NAME in a bb dominated
5847         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
5848         cast to utype if rhs2 has already a compatible type.
5850 2018-06-07  Richard Biener  <rguenther@suse.de>
5852         PR tree-optimization/85935
5853         * graphite-scop-detection.c (find_params_in_bb): Analyze
5854         condition operands with respect to the correct loop.  Assert
5855         the analysis doesn't fail.
5857 2018-06-04  Carl Love  <cel@us.ibm.com>
5859         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5860         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
5861         as it is slightly cheaper.
5862         (first_match_or_eos_index_<mode>):
5863         Calculate index using natural element order.
5864         (first_match_index_<mode>):
5865         Calculate index using natural element order.
5866         (first_match_or_eos_index_<mode>):
5867         Calculate index using natural order.
5868         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5869         for BE and LE modes.
5870         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5871         P9V_BUILTIN_VCLZLSBB_V16QI.
5872         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5873         specific.
5875 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5877         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5878         indentation and line wrap for many prototypes.  Add missing
5879         @smallexample directives around block of prototypes for vec_xl and
5880         vec_xst.
5882 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
5884         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5885         track if we pass or return IEEE 128-bit floating point.
5886         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5887         C++ mangling that is compatible with GCC 8.1.
5888         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5889         (init_cumulative_args): Note if we pass or return IEEE 128-bit
5890         floating point types.
5891         (rs6000_function_arg_advance_1): Likewise.
5892         (rs6000_mangle_type): Optionally generate mangled names that match
5893         what GCC 8.1 generated for IEEE 128-bit floating point types.
5894         (rs6000_globalize_decl_name): If we have an external function that
5895         passes or returns IEEE 128-bit types, generate a weak reference
5896         from the mangled name used in GCC 8.1 to the current mangled
5897         name.
5898         (rs6000_init_builtins): Make __ibm128 use the long double type if
5899         long double is IBM extended double.  Make __float128 use the long
5900         double type if long double is IEEE 128-bit.
5902         PR target/85657
5903         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5904         macro for __ibm128 built-in functions.
5905         (PACK_IF): Add __ibm128 pack/unpack functions.
5906         (UNPACK_IF): Likewise.
5907         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5908         enable long double built-in functions if long double is IEEE
5909         128-bit floating point.
5910         (rs6000_invalid_builtin): Update long double built-in function
5911         error message.
5912         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5913         functions, adjust the built-in function to use the long double
5914         built-in function if __ibm128 and long double are the same type.
5915         * doc/extend.texi (PowerPC builtins): Update documention for
5916         __builtin_{,un}pack_longdouble.  Add documentation for
5917         __builtin_{,un}pack_ibm128.
5919 2018-06-06  Jim Wilson  <jimw@sifive.com>
5921         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5922         (struct machine_function): New field interrupt_mode.
5923         (riscv_handle_type_attribute): New function.  Add forward declaration.
5924         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5925         (riscv_expand_epilogue): Check interrupt_mode field.
5926         (riscv_set_current_function): Check interrupt attribute args and
5927         set interrupt_mode field.
5928         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5929         (riscv_sret, riscv_uret): New.
5930         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5931         new arguments to interrupt attribute.
5933 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
5935         PR target/63177
5936         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5937         Don't handle -mcpu=power8 if -mpower9-vector is also used.
5939 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5941         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5942         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5943         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5944         several redundant entries.
5946 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
5948         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5949         type from "rtx" to "rtx_insn *".
5950         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5951         for local "call_insn", removing cast.
5952         (ix86_expand_call): Likewise, introducing a "call_insn" local.
5954 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
5956         PR tree-optimization/86066
5957         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5958         for BIT_INSERT_EXPR stores.
5960 2018-06-06  Richard Biener  <rguenther@suse.de>
5962         PR tree-optimization/86062
5963         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5964         component refs ontop
5965         of to be offsetted base.
5967 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5969         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5970         to be static and remove check on interrupt attribute name.
5972 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5974         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5975         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5977 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
5979         PR target/79924
5980         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5981         second argument.
5982         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5983         Remove second argument, change how error is called.
5984         (aarch64_layout_arg): Remove second argument from
5985         aarch64_err_no_fpadvsimd call.
5986         (aarch64_init_cumulative_args): Ditto.
5987         (aarch64_gimplify_va_arg_expr): Ditto.
5988         * config/aarch64/aarch64.md (mov<mode>): Ditto.
5990 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
5992         * config/i386/i386.md (simple_return_indirect_internal): New expander.
5993         (*simple_return_indirect_internal<mode>): Rename from
5994         simple_return_indirect_internal.  Use W mode iterator.
5995         (rstorssp): New expander.
5996         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
5997         (clrssbsy): New expander.
5998         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
6000 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6002         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6003         __typeof__.
6004         (cmse_check_pointed_object): Likewise.
6006 2018-06-05  Martin Liska  <mliska@suse.cz>
6008         PR gcov-profile/47618
6009         * doc/invoke.texi: Document how -fprofile-dir format
6010         is extended.
6012 2018-06-05  Richard Biener  <rguenther@suse.de>
6014         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6015         removal pretend DOM info isn't available so we do not update
6016         it and only remove edges, not dominated blocks.  Actually free
6017         DOM info in case we removed something.  Remove unreachable blocks.
6018         (mfb_keep_latches): Work with either DOM info or marked backedges.
6019         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6020         first.  Mark backedges if DOM info isn't available.
6021         (Re-)compute DOM info after cleanup_control_flow_pre.
6023 2018-06-05  Richard Biener  <rguenther@suse.de>
6025         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6026         (locus_discrim_hasher::hash): Adjust.
6027         (locus_discrim_hasher::equal): Likewise.
6028         (next_discriminator_for_locus): Work on line directly.
6029         (same_line_p): Pass in expanded locus1 as well.
6030         (assign_discriminators): Avoid redundant location expansions.
6032 2018-06-05  Richard Biener  <rguenther@suse.de>
6034         PR tree-optimization/86046
6035         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6036         if required after clearing TREE_ADDRESSABLE.
6038 2018-06-05  Richard Biener  <rguenther@suse.de>
6040         PR tree-optimization/86047
6041         * tree-ssa-loop.c (for_each_index): Glob handling of all
6042         decls and constants and really handle all of them.
6044 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6046         PR target/81497
6047         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6048         qualifier_void_pointer and qualifier_const_void_pointer.
6049         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6050         (arm_init_builtins): Handle the above.
6051         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6052         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6053         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6054         void intrinsics.
6056 2018-06-05  Martin Liska  <mliska@suse.cz>
6058         * auto-profile.c (read_autofdo_file): Do not use
6059         gcov_ctr_summary struct.
6060         (afdo_callsite_hot_enough_for_early_inline): Likewise.
6061         * coverage.c (struct counts_entry): Likewise.
6062         (read_counts_file): Read just single summary entry.
6063         (get_coverage_counts): Use gcov_summary struct.
6064         * coverage.h (get_coverage_counts): Likewise.
6065         * gcov-dump.c (dump_working_sets): Likewise.
6066         (tag_summary): Dump just single summary.
6067         * gcov-io.c (gcov_write_summary): Write just histogram
6068         summary.
6069         (gcov_read_summary): Read just single summary.
6070         (compute_working_sets): Use gcov_summary struct.
6071         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6072         of GCOV_COUNTERS_SUMMABLE.
6073         (GCOV_COUNTERS_SUMMABLE): Remove.
6074         (GCOV_FIRST_VALUE_COUNTER): Replace with
6075         GCOV_COUNTER_V_INTERVAL.
6076         (struct gcov_ctr_summary): Remove.
6077         (struct gcov_summary): Directly use fields of former
6078         gcov_ctr_summary.
6079         (compute_working_sets): Use gcov_summary struct.
6080         * gcov.c (read_count_file): Do not use ctrs fields.
6081         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6082         struct.
6083         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6084         struct.
6085         * profile.c: Likewise.
6086         * profile.h: Likewise.
6088 2018-06-05  Martin Liska  <mliska@suse.cz>
6090         PR gcov-profile/84846
6091         * gcov.c (output_lines): Print working directory only
6092         in intermediate format.
6094 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
6096         * config/s390/s390-builtin-types.def: Add void function type.
6097         * config/s390/s390-builtins.def: Use the function type for the
6098         tbeginc builtin.
6100 2018-06-04  Jim Wilson  <jimw@sifive.com>
6102         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6103         to int.
6104         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6105         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
6106         handle EH_RETURN_DATA_REGNO registers properly.
6107         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6108         (riscv_expand_epilogue): Update comment.  Change argument name and
6109         type.  Update code to use new name and type.  Pass new args to
6110         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
6111         EXCEPTION_RETURN.
6112         * config/riscv/riscv.md (NORMAL_RETURN): New.
6113         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6114         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6115         (eh_return): Call gen_eh_return_internal and emit barrier.
6116         (eh_return_internal): Call riscv_expand_epilogue.
6118 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
6120         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6121         bit_insertion field and declare can_be_merged_into method.
6122         (merged_store_group::can_be_merged_into): New method.
6123         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6124         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
6125         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6127 2018-06-04  Richard Biener  <rguenther@suse.de>
6129         PR tree-optimization/85955
6130         * builtins.c (fold_builtin_sincos): Convert pointers to
6131         destination to appropriate type before dereferencing.
6133 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
6135         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6137 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
6139         * expr.c (expand_expr_real_1): Force the operand into memory if
6140         its TYPE_MODE is BLKmode and if there is no integer mode for
6141         the number of bits being extracted.
6143 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6145         PR target/85832
6146         PR target/86036
6147         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6148         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6150 2018-06-04  Richard Biener  <rguenther@suse.de>
6152         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6153         (cleanup_tree_cfg_noloop): ... single caller.  Do
6154         start_recording_case_labels later.
6156 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
6158         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6159         to _IMMINTRIN_H_INCLUDED.
6160         * config/i386/pconfigintrin.h: Ditto.
6161         * config/i386/waitpkgintrin.h: Ditto.
6162         * config/i386/immintrin.h: Add includes for sgxintrin.h,
6163         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6164         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6165         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6166         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6167         waitpkgintrin.h and cldemoteintrin.h.
6169 2018-06-04  Richard Biener  <rguenther@suse.de>
6171         PR tree-optimization/86038
6172         * tracer.c (find_best_successor): Check probability for
6173         being initialized, bail out if not.
6175 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
6177         PR target/86003
6178         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6179         of bits to ignore when comparing architectures.
6181 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6183         PR tree-optimization/69615
6184         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6185         maximum or minimum of the type, try to merge it also as if
6186         range1 is + [-, x - 1] or + [x + 1, -].
6188         PR c++/86025
6189         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6191 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
6193         PR tree-optimization/86034
6194         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6195         the unsigned bitfield type in a bit insertion sequence if it does not
6196         have a larger precision than the bitfield size.
6197         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6199 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
6201         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6203 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6205         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6206         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6207         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6208         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6210 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6212         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6213         Disable -fdelete-null-pointer-checks for ELF toolchain.
6215 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6216             Kito Cheng  <kito.cheng@gmail.com>
6218         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6219         (nds32le-*-*, nds32be-*-*): Integrate checking process.
6220         (nds32*-*-*): Add glibc and uclibc conditions.
6221         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6222         (TARGET_EXCEPT_UNWIND_INFO): Define.
6223         * config/nds32/elf.h: New file.
6224         * config/nds32/linux.h: New file.
6225         * config/nds32/nds32-elf.opt: New file.
6226         * config/nds32/nds32-linux.opt: New file.
6227         * config/nds32/nds32-fp-as-gp.c
6228         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6229         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6230         TARGET_LINUX_ABI.
6231         (nds32_asm_file_end): Ditto.
6232         (nds32_print_operand): Ditto.
6233         (nds32_insert_attributes): Ditto.
6234         (nds32_init_libfuncs): New function.
6235         (TARGET_HAVE_TLS): Define.
6236         (TARGET_INIT_LIBFUNCS): Define.
6237         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6238         spec content.
6239         (TARGET_ELF): Apply different mcmodel setting.
6240         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6241         been migrated into elf.h and linux.h files.
6242         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6243         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6244         (mcmodel): The content has been migrated into nds32-elf.opt and
6245         nds32-linux.opt files.
6246         * config/nds32/t-elf: New file.
6247         * config/nds32/t-linux: New file.
6249 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6250             Shiva Chen  <shiva0217@gmail.com>
6252         * config/nds32/constants.md (unspec_volatile_element): Add
6253         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6254         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6255         optimization.
6256         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6257         (make_pass_nds32_fp_as_gp): Declare.
6258         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6259         optmization pass.
6260         (nds32_asm_function_end_prologue): Remove unused asm output.
6261         (nds32_asm_function_begin_epilogue): Remove unused asm output.
6262         (nds32_asm_file_start): Output necessary fp_as_gp information.
6263         (nds32_option_override): Adjust register usage.
6264         (nds32_expand_prologue): Consider fp_as_gp situation.
6265         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6266         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6267         (epilogue): Ditto.
6268         (return): Ditto.
6269         (simple_return): Ditto.
6270         (omit_fp_begin): Output special directive for fp_as_gp.
6271         (omit_fp_end): Output special directive for fp_as_gp.
6272         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6273         mforbid-fp-as-gp): New options.
6275 2018-06-01  Mark Wielaard  <mark@klomp.org>
6277         * dwarf2out.c (dwarf2out_finish): Remove generation of
6278         DW_AT_loclists_base.
6280 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
6282         * gimple-ssa-store-merging.c: Include gimple-fold.h.
6283         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6284         (struct merged_store_group): Add bit_insertion field.
6285         (dump_char_array): Use standard hexadecimal format.
6286         (merged_store_group::merged_store_group): Set bit_insertion to false.
6287         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
6288         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
6289         also print the mask in the dump file.
6290         (pass_store_merging::gate): Minor tweak.
6291         (imm_store_chain_info::coalesce_immediate): Fix wrong association
6292         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
6293         stores with INTEGER_CST stores.
6294         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6295         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6296         and use it throughout.  Generate bit insertion sequences if need be.
6297         (pass_store_merging::process_store): Remove redundant condition.
6298         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6300 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
6302         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6303         the 128-bit floating point types.  Fix function comment.
6305 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6307         * config/aarch64/aarch64-simd.md
6308         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6309         mnemonics.
6310         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6311         mnemonics.
6313 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
6315         PR tree-optimization/85989
6316         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6317         variable.
6318         (backprop::intersect_uses): Check it when deciding whether this
6319         is a backedge reference.
6320         (backprop::process_block): Add each phi to m_visited_phis
6321         after visiting it, then clear it at the end.
6323 2018-06-01  Richard Biener  <rguenther@suse.de>
6325         * tree-vectorizer.h (vect_dr_stmt): New function.
6326         (vect_get_load_cost): Adjust.
6327         (vect_get_store_cost): Likewise.
6328         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6329         Use vect_dr_stmt instead of DR_SMTT.
6330         (vect_record_base_alignments): Likewise.
6331         (vect_calculate_target_alignment): Likewise.
6332         (vect_compute_data_ref_alignment): Likewise and make static.
6333         (vect_update_misalignment_for_peel): Likewise.
6334         (vect_verify_datarefs_alignment): Likewise.
6335         (vector_alignment_reachable_p): Likewise.
6336         (vect_get_data_access_cost): Likewise.  Pass down
6337         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6338         (vect_get_peeling_costs_all_drs): Likewise.
6339         (vect_peeling_hash_get_lowest_cost): Likewise.
6340         (vect_enhance_data_refs_alignment): Likewise.
6341         (vect_find_same_alignment_drs): Likewise.
6342         (vect_analyze_data_refs_alignment): Likewise.
6343         (vect_analyze_group_access_1): Likewise.
6344         (vect_analyze_group_access): Likewise.
6345         (vect_analyze_data_ref_access): Likewise.
6346         (vect_analyze_data_ref_accesses): Likewise.
6347         (vect_vfa_segment_size): Likewise.
6348         (vect_small_gap_p): Likewise.
6349         (vectorizable_with_step_bound_p): Likewise.
6350         (vect_prune_runtime_alias_test_list): Likewise.
6351         (vect_analyze_data_refs): Likewise.
6352         (vect_supportable_dr_alignment): Likewise.
6353         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6354         (vect_gen_prolog_loop_niters): Likewise.
6355         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6356         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6357         modify DR_STMT.
6358         (vect_recog_mask_conversion_pattern): Likewise.
6359         (vect_try_gather_scatter_pattern): Likewise.
6360         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6361         to vect_get_store_cost.
6362         (vect_get_store_cost): Get stmt_info instead of DR.
6363         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6364         (vect_get_load_cost): Get stmt_info instead of DR.
6366 2018-06-01  Richard Biener  <rguenther@suse.de>
6368         PR middle-end/86017
6369         * gimple-fold.c (var_decl_component_p): Also allow offsetted
6370         vars wrapped in MEM_REFs.
6372 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
6374         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6375         Fix subreg tests so that we only return a choice between
6376         GENERAL_REGS and FP_REGS if the original classes included both.
6378 2018-06-01  Richard Biener  <rguenther@suse.de>
6380         PR ipa/85960
6381         * tree-ssa-structalias.c (get_function_part_constraint):
6382         Handle NULL fi->decl.
6383         (find_func_aliases_for_call): Properly handle indirect
6384         fi from direct call.
6385         (find_func_clobbers): Likewise.
6386         (ipa_pta_execute): Likewise.
6387         (create_variable_info_for): For functions that are ifunc_resolver
6388         resolve to a varinfo that contains the result of the resolver call.
6389         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6390         aliases.
6392 2018-05-31  Michael Collison  <michael.collison@arm.com>
6394         * config/aarch64/aarch64.md:
6395         (*fix_to_zero_extenddfdi2): New pattern.
6396         * gcc.target/aarch64/fix_extend1.c: New testcase.
6398 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
6400         PR middle-end/78809
6401         PR middle-end/83026
6402         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6403         and BUILT_IN_STRNCMP_EQ.
6404         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6405         BUILT_IN_STRNCMP_EQ.
6406         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6407         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6408         (gimple_fold_builtin): Likewise.
6409         * tree-ssa-strlen.c (compute_string_length): New function.
6410         (determine_min_obsize): New function.
6411         (handle_builtin_string_cmp): New function to handle calls to
6412         string compare functions.
6413         (strlen_optimize_stmt): Add handling to builtin string compare
6414         calls.
6415         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6416         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6417         * tree.c (build_common_builtin_nodes): Add new defines of
6418         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6420 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
6422         PR target/85984
6423         * bb-reorder.c (pass_partition_blocks::gate): Return false for
6424         functions with naked attribute.
6426 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6428         * config/i386/sse.md (avx_vec_concat<mode>):
6429         Substitute concat_tg_mode mode attribute with xtg_mode.
6430         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6431         (concat_tg_mode): Remove mode attribute.
6433 2018-05-31  Martin Sebor  <msebor@redhat.com>
6435         PR c/82063
6436         * calls.c (alloc_max_size): Correct a logic error/typo.
6437         Treat excessive arguments as infinite.  Warn for invalid arguments.
6438         * doc/invoke.texi (-Walloc-size-larger-than): Update.
6440 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
6442         PR target/85829
6443         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6444         and movx for Haswell.
6446 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
6447             Cesar Philippidis  <cesar@codesourcery.com>
6449         PR middle-end/85879
6450         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6451         when emitting error on private/firstprivate reductions.
6452         * omp-low.c (lower_omp_target): Avoid reference-type processing
6453         on pointers for firstprivate clause.
6455 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6457         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6458         (st1x2): Likewise.
6459         (st1x3): Likewise.
6460         * config/aarch64/aarch64-simd.md
6461         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6462         (aarch64_ld1_x3_<mode>): Likewise
6463         (aarch64_st1x2<VALLDIF:mode>): Likewise
6464         (aarch64_st1_x2_<mode>): Likewise
6465         (aarch64_st1x3<VALLDIF:mode>): Likewise
6466         (aarch64_st1_x3_<mode>): Likewise
6467         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6468         (vld1_s8_x3): Likewise.
6469         (vld1_u16_x3): Likewise.
6470         (vld1_s16_x3): Likewise.
6471         (vld1_u32_x3): Likewise.
6472         (vld1_s32_x3): Likewise.
6473         (vld1_u64_x3): Likewise.
6474         (vld1_s64_x3): Likewise.
6475         (vld1_f16_x3): Likewise.
6476         (vld1_f32_x3): Likewise.
6477         (vld1_f64_x3): Likewise.
6478         (vld1_p8_x3): Likewise.
6479         (vld1_p16_x3): Likewise.
6480         (vld1_p64_x3): Likewise.
6481         (vld1q_u8_x3): Likewise.
6482         (vld1q_s8_x3): Likewise.
6483         (vld1q_u16_x3): Likewise.
6484         (vld1q_s16_x3): Likewise.
6485         (vld1q_u32_x3): Likewise.
6486         (vld1q_s32_x3): Likewise.
6487         (vld1q_u64_x3): Likewise.
6488         (vld1q_s64_x3): Likewise.
6489         (vld1q_f16_x3): Likewise.
6490         (vld1q_f32_x3): Likewise.
6491         (vld1q_f64_x3): Likewise.
6492         (vld1q_p8_x3): Likewise.
6493         (vld1q_p16_x3): Likewise.
6494         (vld1q_p64_x3): Likewise.
6495         (vst1_s64_x2): Likewise.
6496         (vst1_u64_x2): Likewise.
6497         (vst1_f64_x2): Likewise.
6498         (vst1_s8_x2): Likewise.
6499         (vst1_p8_x2): Likewise.
6500         (vst1_s16_x2): Likewise.
6501         (vst1_p16_x2): Likewise.
6502         (vst1_s32_x2): Likewise.
6503         (vst1_u8_x2): Likewise.
6504         (vst1_u16_x2): Likewise.
6505         (vst1_u32_x2): Likewise.
6506         (vst1_f16_x2): Likewise.
6507         (vst1_f32_x2): Likewise.
6508         (vst1_p64_x2): Likewise.
6509         (vst1q_s8_x2): Likewise.
6510         (vst1q_p8_x2): Likewise.
6511         (vst1q_s16_x2): Likewise.
6512         (vst1q_p16_x2): Likewise.
6513         (vst1q_s32_x2): Likewise.
6514         (vst1q_s64_x2): Likewise.
6515         (vst1q_u8_x2): Likewise.
6516         (vst1q_u16_x2): Likewise.
6517         (vst1q_u32_x2): Likewise.
6518         (vst1q_u64_x2): Likewise.
6519         (vst1q_f16_x2): Likewise.
6520         (vst1q_f32_x2): Likewise.
6521         (vst1q_f64_x2): Likewise.
6522         (vst1q_p64_x2): Likewise.
6523         (vst1_s64_x3): Likewise.
6524         (vst1_u64_x3): Likewise.
6525         (vst1_f64_x3): Likewise.
6526         (vst1_s8_x3): Likewise.
6527         (vst1_p8_x3): Likewise.
6528         (vst1_s16_x3): Likewise.
6529         (vst1_p16_x3): Likewise.
6530         (vst1_s32_x3): Likewise.
6531         (vst1_u8_x3): Likewise.
6532         (vst1_u16_x3): Likewise.
6533         (vst1_u32_x3): Likewise.
6534         (vst1_f16_x3): Likewise.
6535         (vst1_f32_x3): Likewise.
6536         (vst1_p64_x3): Likewise.
6537         (vst1q_s8_x3): Likewise.
6538         (vst1q_p8_x3): Likewise.
6539         (vst1q_s16_x3): Likewise.
6540         (vst1q_p16_x3): Likewise.
6541         (vst1q_s32_x3): Likewise.
6542         (vst1q_s64_x3): Likewise.
6543         (vst1q_u8_x3): Likewise.
6544         (vst1q_u16_x3): Likewise.
6545         (vst1q_u32_x3): Likewise.
6546         (vst1q_u64_x3): Likewise.
6547         (vst1q_f16_x3): Likewise.
6548         (vst1q_f32_x3): Likewise.
6549         (vst1q_f64_x3): Likewise.
6550         (vst1q_p64_x3): Likewise.
6552 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6554         * config/msp430/msp430.c (msp430_output_labelref): Prepend
6555         user_label_prefix to name.
6557         * tree-core.h: Update comment about the format of NAME string
6558         passed to handler in attribute_spec.
6560         * config/msp430/msp430.md: Remove erroneous subreg expression from
6561         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6562         zero_extend{q,h}isi2.
6564 2018-05-30  Borislav Petkov  <bp@suse.de>
6566         * doc/extend.texi: Document some architecture specific
6567         constraints and sort entries.
6569 2018-05-30  Martin Sebor  <msebor@redhat.com>
6571         PR middle-end/85369
6572         * builtins.c (expand_builtin_stpcpy_1): New function.
6573         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6574         only if the former succeeds.
6576 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6578         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6579         in saphira.
6581 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6583         * doc/invoke.texi (-flinker-output): Document
6585 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6587         * passes.c (ipa_write_summaries): Only modify statements if body
6588         is in memory.
6589         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6590         incrementally linking.
6591         (ipa_passes): Likewise.
6592         * lto-cgraph.c (lto_output_node): When incrementally linking do not
6593         pass down resolution info.
6594         * common.opt (flag_incremental_link): Update info.
6595         * gcc.c (plugin specs): Turn flinker-output=* to
6596         -plugin-opt=-linker-output-known
6597         * toplev.c (compile_file): Also cut compilation when doing incremental
6598         link.
6599         * flag-types. (enum lto_partition_model): Add
6600         LTO_LINKER_OUTPUT_NOLTOREL.
6601         (invoke.texi): Add -flinker-output docs.
6602         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6603         link same way as WPA; do not stream in dead initializers.
6605         * dwarf2out.c (dwarf2out_die_ref_for_decl,
6606         darf2out_register_external_decl): Support incremental link.
6608 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6610         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6612 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6614         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6615         it down to simple_object_copy_lto_debug_sections.
6616         (run_gcc): Determine incremental LTO link time and configure
6617         lto1 into non-wpa mode, disable renaming of debug sections.
6619 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6621         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6622         descriptions of various incorrectly documented functions.
6624 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6626         Revert:
6627         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6628         address check not strict.
6630 2018-05-30  Richard Biener  <rguenther@suse.de>
6632         PR tree-optimization/85964
6633         * tracer.c (better_p): Drop initialized count check, we only
6634         call the function with initialized counts now.
6635         (find_best_successor): Do find a best edge if one
6636         has uninitialized count.
6637         (find_best_predecessor): Likewise.  Do BB frequency check only
6638         if count is initialized.
6640 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
6642         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6643         (aarch64_ldrstr_offset_compare): New.
6644         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6645         load/store orderings.
6646         (aarch64_gen_adjusted_ldpstp): Likewise.
6648 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
6650         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6651         Check for subset of GENERAL_REGS and FP_REGS.
6652         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6653         r=w alternative.
6655 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
6657         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6658         and wi::to_poly_offset.  Add the current offset and then check
6659         whether the sum fits, rather than using an unchecked addition of
6660         a checked term.  Check for a shwi rather than a uhwi.
6661         * expr.c (get_bit_range): Use tree_to_poly_uint64.
6662         (store_constructor): Use poly_int_tree_p.
6663         (expand_expr_real_1): Likewise.
6664         * function.c (assign_temp): Likewise.
6665         * fold-const.c (const_binop): Use poly_int_tree_p and
6666         wi::to_poly_offset.
6667         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
6668         division.
6669         * ipa-icf-gimple.c (func_checker::compare_operand): Use
6670         to_poly_offset for MEM offsets.
6671         * ipa-icf.c (sem_variable::equals): Likewise.
6672         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6673         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6674         wi::to_poly_offset for BIT_FIELD_REF offsets.
6675         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6676         wi::to_poly_offset.
6677         * var-tracking.c (emit_note_insn_var_location): Use
6678         tree_to_poly_uint64.
6680 2018-05-29  Jim Wilson  <jimw@sifive.com>
6682         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6684 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
6686         PR target/85950
6687         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6688         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6689         sequence.
6690         (sse4_1_round<mode>2): Use nonimmediate_operand
6691         for operand 1 predicate.
6693 2018-05-29  Martin Sebor  <msebor@redhat.com>
6694             Richard Biener  <rguenther@suse.de>
6696         PR testsuite/85888
6697         * calls.c (get_size_range): Call determine_value_range instead
6698         of get_value_range..
6699         * tree-vrp.h (determine_value_range): Declared new function.
6700         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6702 2018-05-29  Richard Biener  <rguenther@suse.de>
6704         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6705         sure to use non-pattern stmts for get_earlier_stmt arguments.
6706         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6707         called on pattern stmts.
6708         (get_later_stmt): Likewise.
6710 2018-05-29  Martin Liska  <mliska@suse.cz>
6712         PR gcov-profile/85759
6713         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6714         env variables.
6716 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6718         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6719         VEC_UNPACK_*_EXPR.
6720         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6721         VEC_PACK_*_EXPR.
6723         PR target/85918
6724         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6725         VEC_PACK_FLOAT_EXPR): New tree codes.
6726         * tree-pretty-print.c (op_code_prio): Handle
6727         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6728         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6729         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6730         * tree-inline.c (estimate_operator_cost): Likewise.
6731         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6732         * fold-const.c (const_binop): Likewise.
6733         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6734         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6735         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6736         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6737         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6738         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6739         * expr.c (expand_expr_real_2): Likewise.
6740         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6741         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6742         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6743         optabs.
6744         * optabs.c (expand_widen_pattern_expr): For
6745         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6746         sign from result type rather than operand's type.
6747         (expand_binop_directly): For vec_packu_float_optab and
6748         vec_packs_float_optab allow result type to be different from operand's
6749         type.
6750         * optabs-tree.c (optab_for_tree_code): Handle
6751         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6752         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6753         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6754         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6755         VEC_PACK_FLOAT_EXPR.
6756         * tree-vect-stmts.c (supportable_widening_operation): Handle
6757         FIX_TRUNC_EXPR.
6758         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6759         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6760         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6761         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6762         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6763         mode attributes.
6764         (vec_pack<floatprefix>_float_<mode>): New expander.
6765         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6766         attributes.
6767         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6768         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6769         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6770         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6771         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6772         Document.
6773         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6774         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6775         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6776         VEC_PACK_FLOAT_EXPR): Document.
6778 2018-05-29  Richard Biener  <rguenther@suse.de>
6780         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6781         member.
6782         (stmt_vec_info_vec): Make pointer.
6783         (init_stmt_vec_info_vec): Remove.
6784         (free_stmt_vec_info_vec): Likewise.
6785         (set_stmt_vec_info_vec): New function.
6786         (free_stmt_vec_infos): Likewise.
6787         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6788         (set_vinfo_for_stmt): Likewise.
6789         (get_earlier_stmt): Likewise.
6790         (get_later_stmt): Likewise.
6791         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6792         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6793         (vec_info::~vec_info): Free stmt_vec_infos.
6794         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6795         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6796         (pass_slp_vectorize::execute): Likewise.
6797         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6798         (free_stmt_vec_info_vec): Likewise.
6799         (set_stmt_vec_info_vec): New function.
6800         (free_stmt_vec_infos): Likewise.
6801         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6802         the global stmt_vec_info_vec.
6803         * tree-parloops.c (gather_scalar_reductions): Use
6804         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6805         vector.
6807 2018-05-29  Richard Biener  <rguenther@suse.de>
6809         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6811 2018-05-29  Martin Liska  <mliska@suse.cz>
6812             David Malcolm  <dmalcolm@redhat.com>
6814         * vec.c (test_reverse): New.
6815         (vec_c_tests): Add new test.
6816         * vec.h (vl_ptr>::reverse): New function.
6818 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
6820         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6822         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6823         and later.
6825 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6827         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6829 2018-05-28  Richard Biener  <rguenther@suse.de>
6831         PR tree-optimization/85933
6832         * tree-vect-data-refs.c (vect_record_base_alignments): Only
6833         look at stmts marked as vectorizable.
6835 2018-05-28  Richard Biener  <rguenther@suse.de>
6837         PR tree-optimization/85934
6838         * tree-vect-generic.c (expand_vector_operations_1): Hoist
6839         vector boolean check before scalar optimization.
6841 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
6843         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6844         for armv5te.
6846 2018-05-28  Mark Wielaard  <mark@klomp.org>
6848         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6849         if it is an expression containing a minus sign.
6851 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
6853         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6855 2018-05-27  Paul Koning  <ni1d@arrl.net>
6857         * config/pdp11/pdp11.md (truncsihi2): Remove.
6859 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
6860             Chung-Ju Wu  <jasonwucj@gmail.com>
6862         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6863         implementation.
6864         (unaligned_store_dw): Ditto.
6865         * config/nds32/nds32-memory-manipulation.c
6866         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6867         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6868         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6869         (emit_setmem_word_loop): Rename to ...
6870         (emit_setmem_doubleword_loop): ... this.
6871         (nds32_gen_dup_4_byte_to_word_value): New function.
6872         (nds32_gen_dup_8_byte_to_double_word_value): New function.
6873         (nds32_expand_setmem_loop): Refine implementation.
6874         (nds32_expand_setmem_loop_v3m): Ditto.
6875         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6876         pattern.
6878 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6880         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6882 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
6884         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6885         (nds32_init_machine_status): Initialize machine->attr_naked_p and
6886         machine->attr_no_prologue_p.
6887         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6888         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6889         (nds32_expand_epilogue): Consider attr_naked_p.
6890         (nds32_expand_epilogue_v3pop): Likewise.
6891         (nds32_can_use_return_insn): Likewise.
6892         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6893         attr_no_prologue_p fields.
6894         * config/nds32/nds32.opt (mret-in-naked-func): New option.
6896 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
6898         PR target/85918
6899         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6900         attributes.
6901         * config/i386/sse.md
6902         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6903         Rename to ...
6904         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6905         ... this.
6906         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6907         Rename to ...
6908         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6909         ... this.
6910         (*<floatsuffix>floatv2div2sf2): Rename to ...
6911         (*float<floatunssuffix>v2div2sf2): ... this.
6912         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6913         (float<floatunssuffix>v2div2sf2_mask): ... this.
6914         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6915         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6916         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6917         to ...
6918         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6919         ... this.
6920         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6921         Rename to ...
6922         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6923         ... this.
6924         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6925         Rename to ...
6926         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6927         ... this.
6928         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6929         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6930         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6931         gen_ufix_truncv8dfv8si2.
6932         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6933         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6934         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6935         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6936         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6937         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6938         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6939         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6941 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
6943         PR target/85900
6944         PR target/85345
6945         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6947 2018-05-25  Jim Wilson  <jimw@sifive.com>
6949         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6950         * config/riscv/riscv.c (struct machine_function): Add
6951         interrupt_handler_p and attribute_checked_p fields.
6952         (riscv_attribute_table): Add interrupt.
6953         (riscv_interrupt_type_p): New.
6954         (riscv_save_reg_p): Save extra regs for interrupt handler.
6955         (riscv_use_save_libcall): Return false  for interrupt handler.
6956         (riscv_first_stack_step): Add forward declaration.
6957         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
6958         for interrupt handler with large frame.  Use it for saved reg list.
6959         (riscv_expand_prologue): Move flag_stack_usage_info support to
6960         eliminate duplication.
6961         (riscv_expand_epilogue): Generate mret for interrupt handler.
6962         (riscv_epilogue_uses): New.
6963         (riscv_can_use_return_insn): Return false for interrupt handler.
6964         (riscv_function_ok_for_sibcall): Likewise.
6965         (riscv_set_current_function): Add interrupt handler support.
6966         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6967         * config/riscv/riscv.md (UNSPECV_MRET): New.
6968         (GP_REGNUM): New.
6969         (riscv_frflags, riscv_fsflags): Use tab after opcode.
6970         (riscv_mret): New.
6971         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6973 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
6975         PR tree-optimization/85712
6976         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6977         this candidate has already been replaced in-situ by a copy.
6979 2018-05-25  Jason Merrill  <jason@redhat.com>
6981         PR c++/80485 - inline function non-zero address.
6982         * symtab.c (nonzero_address): Check DECL_COMDAT.
6984 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
6986         PR target/83628
6987         * config/alpha/alpha.md (ashlsi3): New insn pattern.
6988         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
6989         extension of SImode operation.  Use const123_operand predicate.
6990         (*saddsi_1): Remove.
6991         (*saddl_se_1): Ditto.
6992         (*ssubsi_1): Ditto.
6993         (*ssubl_se_1): Ditto.
6994         * config/alpha/predicates.md (const123_operand): New predicate.
6995         * config/alpha/constraints.md (P): Use IN_RANGE.
6997 2018-05-25  Richard Biener  <rguenther@suse.de>
6999         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7000         defaulted to true.
7001         (ref_maybe_used_by_stmt_p): Likewise.
7002         (stmt_may_clobber_ref_p): Likewise.
7003         (stmt_may_clobber_ref_p_1): Likewise.
7004         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7005         and pass it along.
7006         (ref_maybe_used_by_stmt_p): Likewise.
7007         (stmt_may_clobber_ref_p): Likewise.
7008         (stmt_may_clobber_ref_p_1): Likewise.
7009         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7010         the alias oracle to disambiguate DRs with stmts DR analysis
7011         couldn't handle.
7012         (vect_analyze_data_refs): Do not give up on not analyzable
7013         DRs for BB vectorization.  Remove code truncating the dataref
7014         vector.
7016 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
7018         PR target/85832
7019         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7020         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
7021         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7023 2018-05-25  Richard Biener  <rguenther@suse.de>
7025         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7026         function, combining stmt data ref gathering and fatal analysis
7027         parts.
7028         (vect_analyze_data_refs): Remove now redudnant code and simplify.
7029         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7030         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7031         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7032         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7034 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7036         PR tree-optimization/85720
7037         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7038         SCC if all partitions are builtins.
7039         (version_loop_by_alias_check): New parameter.  Generate cancelable
7040         runtime alias check if all partitions are builtins.
7041         (distribute_loop): Update call to above function.
7043 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7045         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7046         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7047         (parm_default_def_partition_arg): Ditto.
7048         (set_parm_default_def_partition): Ditto.
7049         (get_parm_default_def_partitions): Ditto and make it static.
7050         (get_undefined_value_partitions): Ditto and make it static.
7051         (remove_ssa_form): Refactor call to init_var_map here.
7052         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7053         computation for loop region.
7054         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7055         (register_default_def): Delete.
7056         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7057         (parm_default_def_partition_arg): Ditto.
7058         (set_parm_default_def_partition): Ditto.
7059         (get_parm_default_def_partitions): Ditto and make it static.
7060         (get_undefined_value_partitions): Ditto and make it static.
7061         (coalesce_with_default, coalesce_with_default): Update comment.
7062         (create_coalesce_list_for_region): New func factored out from
7063         create_outofssa_var_map.
7064         (populate_coalesce_list_for_outofssa): New func factored out from
7065         create_outofssa_var_map and coalesce_ssa_name.
7066         (create_outofssa_var_map): Delete.
7067         (coalesce_ssa_name): Refactor to support live range computation.
7068         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7069         (get_parm_default_def_partitions): Delete.
7070         (get_undefined_value_partitions): Ditto.
7071         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7072         computation for loop region.
7073         (new_tree_live_info, loe_visit_block): Ditto.
7074         (live_worklist, set_var_live_on_entry): Ditto.
7075         (calculate_live_on_exit, verify_live_on_entry): Ditto.
7076         * tree-ssa-live.h (struct _var_map): New fields.
7077         (init_var_map): Change decl.
7078         (region_contains_p): New.
7080 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7082         * tree-ssa-live.h (live_merge_and_clear): Delete.
7084 2018-05-25  Richard Biener  <rguenther@suse.de>
7086         PR c++/85912
7087         * tree-dump.c (dequeue_and_dump): Remove access to removed
7088         operand 2 of a SWITCH_EXPR.
7090 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7092         * doc/sourcebuild.texi (vect_double_cond_arith): Include
7093         multiplication and division.
7094         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7095         (cond_udiv@var{m}, cond_umod@var{m}): Document.
7096         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7097         (cond_udiv_optab, cond_umod_optab): New optabs.
7098         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7099         (IFN_COND_RDIV): New internal functions.
7100         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7101         TRUNC_MOD_EXPR and RDIV_EXPR.
7102         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7103         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7104         New unspecs.
7105         (SVE_INT_BINARY): Include mult.
7106         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7107         (optab, sve_int_op): Handle mult.
7108         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7109         UNSPEC_COND_DIV.
7110         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7111         for SVE_INT_BINARY_SD.
7113 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7115         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7116         (optab, sve_int_op): Handle div and udiv.
7117         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7118         for SVE_INT_BINARY_SD.
7119         (*<optab><mode>3): New insn for the same.
7121 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7123         * tree-vect-patterns.c: Include predict.h.
7124         (vect_recog_divmod_pattern): Restrict check for division support
7125         to when optimizing for size.
7127 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7129         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7130         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7131         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7132         (gimple_match_op::set_op): Likewise.
7133         (gimple_resimplify4): Declare.
7134         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7135         (expr::gen_transform): Likewise.
7136         (decision_tree::gen): Generate a simplification routine for 4 operands.
7137         * gimple-match-head.c (gimple_simplify): Add an overload for
7138         4 operands.  In the top-level function, handle up to 4 call
7139         arguments and call gimple_resimplify4.
7140         (gimple_resimplify4): New function.
7141         (build_call_internal): Pass a fourth operand.
7142         (maybe_push_to_seq): Likewise.
7143         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7144         Fold VEC_COND_EXPRs of an operation and a default value into
7145         an IFN_COND_* function if possible.
7146         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7147         New unspecs.
7148         (SVE_COND_FP_BINARY): Include them.
7149         (optab, sve_fp_op): Handle them.
7150         (SVE_INT_BINARY_REV): New code iterator.
7151         (SVE_COND_FP_BINARY_REV): New int iterator.
7152         (commutative): New int attribute.
7153         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7154         Declare.
7155         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7156         function.
7157         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7158         (*cond_<optab><mode>): New patterns for reversed operands.
7160 2018-05-25  Richard Biener  <rguenther@suse.de>
7162         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7163         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7164         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7165         (STMT_VINFO_GROUPED_ACCESS): Adjust.
7166         * tree-vect-data-refs.c (everywhere): Adjust users.
7167         * tree-vect-loop.c (everywhere): Likewise.
7168         * tree-vect-slp.c (everywhere): Likewise.
7169         * tree-vect-stmts.c (everywhere): Likewise.
7170         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7172 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7174         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7175         Rename to...
7176         (gcc_cv_as_section_exclude): ... this.
7177         Try Solaris as #exclude syntax.
7178         * configure: Regenerate.
7179         * config.in: Regenerate.
7180         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7181         SECTION_EXCLUDE.
7182         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7183         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7185         * varasm.c (default_elf_asm_named_section): Don't check if
7186         HAVE_GAS_SECTION_EXCLUDE is defined.
7188 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7190         * doc/md.texi: Update the documentation of the cond_* optabs
7191         to mention the new final operand.  Fix GET_MODE_NUNITS call.
7192         Describe the scalar case too.
7193         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7194         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7195         instead of 2.
7196         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7197         (get_conditional_internal_fn): Update comment.
7198         * tree-vect-loop.c (vectorizable_reduction): Pass the original
7199         accumulator value as a final argument to conditional functions.
7200         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7201         a define_expand and add an "else" operand.  Assert for now that
7202         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
7203         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7204         (*cond_<optab><mode>): New patterns.
7205         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7206         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7207         (UNSPEC_COND_EOR): Delete.
7208         (optab): Remove associated mappings.
7209         (SVE_INT_BINARY): New code iterator.
7210         (sve_int_op): Remove int attribute and add "minus" to the code
7211         attribute.
7212         (SVE_COND_INT_OP): Delete.
7213         (SVE_COND_FP_OP): Rename to...
7214         (SVE_COND_FP_BINARY): ...this.
7216 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7218         * optabs.c (can_reuse_operands_p): New function.
7219         (maybe_legitimize_operands): Try to reuse the results for
7220         earlier operands.
7222 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7224         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7225         Add {q} suffix to insn mnemonic.
7227 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7229         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7230         (msp430_warn_func_return): New.
7232 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
7234         * fold-const.c (tree_nonzero_bits): New function.
7235         * fold-const.h (tree_nonzero_bits): Likewise.
7236         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7237         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7239 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7241         PR target/85900
7242         PR target/85345
7243         * varasm.c (assemble_alias): Check ifunc_resolver only on
7244         FUNCTION_DECL.
7246 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7248         PR target/85903
7249         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7250         when memory input operand is handled.
7252 2018-05-24  Luis Machado  <luis.machado@linaro.org>
7254         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7255         global.
7256         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7258 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7260         * match.pd: Delay FMA folds until after vectorization.
7262 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7264         PR target/83009
7265         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7266         address check not strict.
7268 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7270         * gimple-match.h (gimple_match_op): New class.
7271         (mprts_hook): Replace parameters with a gimple_match_op *.
7272         (maybe_build_generic_op): Likewise.
7273         (gimple_simplified_result_is_gimple_val): Replace parameters with
7274         a const gimple_match_op *.
7275         (gimple_simplify): Replace code_helper * and tree * parameters with
7276         a gimple_match_op * parameter.
7277         (gimple_resimplify1): Replace code_helper *, tree and tree *
7278         parameters with a gimple_match_op * parameter.
7279         (gimple_resimplify2): Likewise.
7280         (gimple_resimplify3): Likewise.
7281         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7282         parameters with a gimple_match_op * parameter.
7283         * gimple-match-head.c (gimple_simplify): Change prototypes of
7284         auto-generated functions to take a gimple_match_op * instead of
7285         separate code_helper * and tree * parameters.  Make the same
7286         change in the top-level overload and update calls to the
7287         gimple_resimplify routines.  Update calls to the auto-generated
7288         functions and to maybe_push_res_to_seq in the publicly-facing
7289         operation-specific gimple_simplify overloads.
7290         (gimple_match_op::MAX_NUM_OPS): Define.
7291         (gimple_resimplify1): Replace rcode and ops with a single res_op
7292         parameter.  Update call to gimple_simplify.
7293         (gimple_resimplify2): Likewise.
7294         (gimple_resimplify3): Likewise.
7295         (mprts_hook): Replace parameters with a gimple_match_op *.
7296         (maybe_build_generic_op): Likewise.
7297         (build_call_internal): Replace type, nargs and ops with
7298         a gimple_match_op *.
7299         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7300         with a single gimple_match_op *.  Update calls to mprts_hook,
7301         build_call_internal and gimple_simplified_result_is_gimple_val.
7302         Factor out code that is common to the tree_code and combined_fn cases.
7303         * genmatch.c (expr::gen_transform): Replace tem_code and
7304         tem_ops with a gimple_match_op called tem_op.  Update calls
7305         to the gimple_resimplify functions and maybe_push_res_to_seq.
7306         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7307         res_ops.  Update call to the gimple_resimplify functions.
7308         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7309         (decision_tree::gen): Make the functions take a gimple_match_op *
7310         called res_op instead of separate res_code and res_ops parameters.
7311         Update call accordingly.
7312         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7313         and ops with a single res_op parameter.  Update calls to
7314         maybe_build_generic_op and maybe_push_res_to_seq.
7315         (fold_stmt_1): Update calls to gimple_simplify and
7316         replace_stmt_with_simplification.
7317         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7318         and gimple_simplified_result_is_gimple_val.
7319         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7320         gimple_simplify.
7321         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7322         with a gimple_match_op *.
7323         (vn_nary_build_or_lookup): Likewise.  Update call to
7324         vn_nary_build_or_lookup_1.
7325         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7326         gimple_match_op *.  Update calls to the gimple_resimplify routines
7327         and to gimple_simplified_result_is_gimple_val.
7328         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7329         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7330         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7331         (visit_nary_op): Likewise.
7332         (visit_reference_op_load): Likewise.
7334 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7336         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7337         modifier for printing the step amount.
7339 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
7341         PR target/78849
7342         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7343         types.
7345 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
7347         * doc/sourcebuild.texi (Endianness): New subsubsection.
7349 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7351         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7352         <prefetch_dynamic_strides>: New const bool field.
7353         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7354         prefetch_dynamic_strides.
7355         (exynosm1_prefetch_tune): Likewise.
7356         (thunderxt88_prefetch_tune): Likewise.
7357         (thunderx_prefetch_tune): Likewise.
7358         (thunderx2t99_prefetch_tune): Likewise.
7359         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7360         false.
7361         (aarch64_override_options_internal): Update to set
7362         PARAM_PREFETCH_DYNAMIC_STRIDES.
7363         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7364         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7365         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7366         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7367         prefetch-dynamic-strides setting.
7369 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7371         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7372         <minimum_stride>: New const int field.
7373         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7374         minimum_stride field defaulting to -1.
7375         (exynosm1_prefetch_tune): Likewise.
7376         (thunderxt88_prefetch_tune): Likewise.
7377         (thunderx_prefetch_tune): Likewise.
7378         (thunderx2t99_prefetch_tune): Likewise.
7379         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7380         <default_opt_level>: Set to 3.
7381         (aarch64_override_options_internal): Update to set
7382         PARAM_PREFETCH_MINIMUM_STRIDE.
7383         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7384         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7385         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7386         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7387         stride is constant and is below the minimum stride threshold.
7389 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7391         * config/arm/arm-cpus.in (mode26): Delete.
7392         (armv4): Delete mode26 reference.
7393         * config/arm/arm.c (arm_configure_build_target): Delete use of
7394         isa_bit_mode26.
7396 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7398         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7399         New insn pattern.
7400         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7401         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
7402         for non-SSE modes.
7403         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
7404         (floatunsdidf2): Ditto.
7406 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7408         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7409         (fixuns_trunc<mode>si2_avx512f): Ditto.
7410         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7411         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7412         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7414 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7416         PR rtl-optimization/79985
7417         * df-scan.c (df_insn_refs_collect): Remove special case for
7418         global registers and asm statements.
7420 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7422         * extend.texi (Global Register Variables): Rewrite the bullet list.
7423         Note that the register is available for allocation. Note that access
7424         via inline asm must use constraints. Add note about async-signal
7425         handlers. Remove paragraph about automagic register selection.
7427 2018-05-23  Richard Biener  <rguenther@suse.de>
7429         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7430         of fixed offset from memset VN.
7432 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
7434         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7435         first_interp field.
7436         (alloc_cand_and_find_basis): Initialize first_interp field.
7437         (slsr_process_mul): Modify first_interp field.
7438         (slsr_process_add): Likewise.
7439         (slsr_process_cast): Modify first_interp field for each new
7440         interpretation.
7441         (slsr_process_copy): Likewise.
7442         (dump_candidate): Dump first_interp field.
7443         (replace_mult_candidate): Process all interpretations, not just
7444         subsequent ones.
7445         (replace_rhs_if_not_dup): Likewise.
7446         (replace_one_candidate): Likewise.
7448 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
7450         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7451         Add new boolean.
7452         (aarch64_needs_frame_chain): New function.
7453         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7455 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
7457         PR target/84882
7458         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7459         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7460         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7461         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7462         as true for strict-align.
7463         (aarch64_can_inline_p): Perform checks even when callee has no
7464         attributes to check for strict alignment.
7465         * doc/extend.texi (AArch64 Function Attributes): Document
7466         no-strict-align.
7467         * doc/invoke.texi: (AArch64 Options): Likewise.
7469 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
7471         PR tree-optimization/85853
7472         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7473         the handling of the root of the node to...
7474         (vect_slp_analyze_node_operations_1): ...this new function,
7475         and run the whole thing with the child nodes' def types
7476         set according to their SLP node's def type.
7478 2018-05-23  Richard Biener  <rguenther@suse.de>
7480         PR middle-end/85874
7481         * tree-data-ref.c (create_runtime_alias_checks): Defer
7482         and ignore overflow warnings.
7484 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
7486         PR tree-optimization/85822
7487         * tree-vrp.c (is_masked_range_test): Fix handling of negative
7488         constants.
7490 2018-05-23  Richard Biener  <rguenther@suse.de>
7492         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7493         memset constants via native_interpret_expr.
7495 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
7497         PR target/85345
7498         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7499         attribute.
7500         (cgraph_node::create_alias): Likewise.
7501         (cgraph_node::get_availability): Check ifunc_resolver instead
7502         of looking up ifunc attribute.
7503         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7504         * varasm.c (do_assemble_alias): Likewise.
7505         (assemble_alias): Likewise.
7506         (default_binds_local_p_3): Likewise.
7507         * cgraph.h (cgraph_node): Add ifunc_resolver.
7508         (cgraph_node::only_called_directly_or_aliased_p): Return false
7509         for IFUNC resolver.
7510         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7511         attribute.
7512         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7513         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7514         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7515         instead of looking up ifunc attribute.
7517 2018-05-22  Luis Machado  <luis.machado@linaro.org>
7519         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7521 2018-05-22  Martin Sebor  <msebor@redhat.com>
7523         PR middle-end/85359
7524         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7525         only when expasion succeeds.
7526         (expand_builtin_strcmp): Same.
7527         (expand_builtin_strncmp): Same.
7529 2018-05-22  Martin Sebor  <msebor@redhat.com>
7531         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7533 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7534             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7536         * config/aarch64/aarch64-ldpstp.md: Replace uses of
7537         aarch64_mem_pair_operand with memory_operand and delete operand swapping
7538         code.
7539         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7540         Add check for legitimate_address.
7541         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7542         (aarch64_swap_ldrstr_operands): New.
7543         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7544         Define prototype.
7546 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7547             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7549         * config/aarch64/aarch64.md: New patterns to generate stp
7550         and ldp.
7551         (store_pair_sw, store_pair_dw): New patterns to generate stp for
7552         single words and double words.
7553         (load_pair_sw, load_pair_dw): Likewise.
7554         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7555         Delete.
7556         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7557         Delete.
7558         * config/aarch64/aarch64-ldpstp.md: Modify peephole
7559         for different mode ldpstp and add peephole for merged zero stores.
7560         Likewise for loads.
7561         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7562         Add size check.
7563         (aarch64_gen_store_pair): Rename calls to match new patterns.
7564         (aarch64_gen_load_pair): Rename calls to match new patterns.
7565         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7566         (load_pair<DREG:mode><DREG2:mode>): ... This.
7567         (store_pair<mode>): Rename to...
7568         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7569         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7570         New mode iterators.
7571         (V_INT_EQUIV): Handle SImode.
7572         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7573         New predicate.
7575 2018-05-22  Martin Sebor  <msebor@redhat.com>
7577         PR c/85623
7578         * calls.c (maybe_warn_nonstring_arg): Use string length to set
7579         or ajust the presumed bound on an operation to avoid unnecessary
7580         warnings.
7582 2018-05-22  Martin Sebor  <msebor@redhat.com>
7584         PR tree-optimization/85826
7585         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7586         assuming that a DECL necesarily has a constant size.
7588 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
7590         PR middle-end/85862
7591         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7593 2018-05-22  Richard Biener  <rguenther@suse.de>
7595         PR tree-optimization/85834
7596         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7597         non-constant and non-zero memset arguments.
7599 2018-05-22  Martin Liska  <mliska@suse.cz>
7601         PR ipa/85607
7602         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7604 2018-05-22  Richard Biener  <rguenther@suse.de>
7606         PR tree-optimization/85863
7607         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7608         comparisons when vectype is specified.
7609         (vectorizable_condition): Do not specify vectype for
7610         vect_is_simple_cond when SLP vectorizing.
7612 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
7614         PR target/85657
7615         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7616         define __ibm128 as long double.
7617         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7618         as a distinct type when IEEE 128-bit support is enabled.
7619         (init_float128_ieee): Fix up conversions between IFmode and IEEE
7620         128-bit types to use the correct functions.
7621         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7622         convert between 128-bit floating point types that have different
7623         modes but the same representation, instead of using gen_lowpart to
7624         makean alias.
7625         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7626         KFmode.
7627         (IFKF_reg): New attributes to give the register constraints for
7628         IFmode and KFmode.
7629         (extend<mode>tf2_internal): New insns to mark an explicit
7630         conversion between 128-bit floating point types that have a
7631         different mode but share the same representation.
7633 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
7635         PR tree-optimization/85814
7636         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7637         a null return from get_strinfo when unsharing the next
7638         strinfo in the chain.
7640 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7642         PR gcc/84923
7643         * varasm.c (weak_finish): Clean up weak_decls.
7645 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7647         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7648         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7649         UNSPEC_UADALP values.
7650         * config/aarch64/iterators.md (ABAL): New int iterator.
7651         (ABDL2): Likewise.
7652         (ADALP): Likewise.
7653         (sur): Add mappings for the above.
7654         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7655         New define_insn.
7656         (aarch64_<sur>abal<mode>_4): Likewise.
7657         (aarch64_<sur>adalp<mode>_3): Likewise.
7658         (<sur>sadv16qi): New define_expand.
7660 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
7662         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7663         (*movdf_internal): Ditto.
7664         (*rcpsf2_sse): Ditto.
7665         (*rsqrtsf2_sse): Ditto.
7666         (*sqrt<mode>2_sse): Ditto.
7668 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
7670         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7671         eor3q<mode>4.
7672         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7673         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7674         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7675         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7676         vbcaxq_s64): New.
7677         * config/aarch64/arm_neon.h: Likewise.
7678         * config/aarch64/iterators.md (VQ_I): New.
7680 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
7682         * config.gcc: Add arc/t-multilib-linux to tmake_file for
7683         arc*-*-linux*.
7684         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7685         MULTILIB_DIRNAMES
7687 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7689         * config/nds32/constraints.md (S): New constraint.
7690         * config/nds32/nds32.md (call_internal): Use constraint S.
7691         (call_value_internal): Likewise.
7692         (sibcall_internal): Likewise.
7693         (sibcall_value_internal): Likewise.
7695 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7696             Chung-Ju Wu  <jasonwucj@gmail.com>
7698         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7699         into consideration.
7701 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7702             Chung-Ju Wu  <jasonwucj@gmail.com>
7704         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7705         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7706         (nds32_rtx_costs_impl): Simplify.
7707         (nds32_address_cost_impl): Simplify.
7708         (nds32_init_rtx_costs): New function.
7709         (nds32_rtx_costs_speed_prefer): Likewise.
7710         (nds32_rtx_costs_size_prefer): Likewise.
7711         (nds32_address_cost_speed_prefer): Likewise.
7712         (nds32_address_cost_speed_fwprop): Likewise.
7713         (nds32_address_cost_size_prefer): Likewise.
7714         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7715         * config/nds32/nds32.c (nds32_option_override): Use
7716         nds32_init_rtx_costs function.
7718 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7720         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7721         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7722         (TARGET_PIPELINE_N8): Likewise.
7723         (TARGET_PIPELINE_N10): Likewise.
7724         (TARGET_PIPELINE_N13): Likewise.
7725         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7727 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7729         * config/nds32/nds32-fpu.md: Update copyright year.
7731 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7733         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7735 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7737         * config/nds32/nds32.c
7738         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7739         * config/nds32/nds32.opt (minline-asm-r15): New option.
7741 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7743         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7744         MASK_HW_ABS.
7745         * config/nds32/nds32.md (abssi2): New pattern.
7747 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7749         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7750         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7751         Merge insn pattern from sse_cvtsi2ss<round_name> and
7752         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7753         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7754         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7755         using SWI48 mode iterator.
7756         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7757         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7758         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7759         pattern from sse_cvttss2si<round_saeonly_name>
7760         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7761         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7762         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7763         using SWI48 mode iterator.
7764         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7765         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7766         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7767         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7768         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7769         using SWI48 mode iterator.
7770         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7771         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7772         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7773         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7774         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7775         SWI48 mode iterator.
7776         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7777         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7778         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7779         pattern from sse_cvttsd2si<round_saeonly_name>
7780         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7782 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7784         * config/nds32/nds32-md-auxiliary.c
7785         (nds32_valid_smw_lwm_base_p): Refine.
7786         (nds32_output_smw_single_word): Refine.
7787         (nds32_output_smw_double_word): New.
7788         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7790 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7792         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7793         (nds32_output_stack_pop): Refine.
7794         (nds32_expand_unaligned_load): Refine.
7795         (nds32_expand_unaligned_store): Refine.
7797 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7798             Chung-Ju Wu  <jasonwucj@gmail.com>
7800         * config/nds32/constants.md: Add TP_REGNUM constant.
7801         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7802         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7803         UNSPEC_ADD32.
7804         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7805         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7806         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7807         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7808         and PIC code generation.
7809         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7810         code generation.
7811         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7812         optimization.
7813         * config/nds32/nds32.md: Support TLS and PIC.
7814         * config/nds32/nds32.c: Support TLS and PIC.
7815         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7816         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7817         predicate.
7819 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7821         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7822         mode with E_ prefix.
7824 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7825             Chung-Ju Wu  <jasonwucj@gmail.com>
7827         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7828         * config/nds32/nds32-md-auxiliary.c
7829         (symbolic_reference_mentioned_p): New.
7830         (nds32_legitimize_ict_address): New.
7831         (nds32_expand_ict_move): New.
7832         (nds32_indirect_call_referenced_p): New.
7833         (nds32_symbol_binds_local_p): Delete.
7834         (nds32_long_call_p): Modify.
7835         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7836         * config/nds32/nds32-protos.h
7837         (symbolic_reference_mentioned_p): Declare.
7838         (nds32_legitimize_ict_address): Declare.
7839         (nds32_expand_ict_move): Declare.
7840         (nds32_indirect_call_referenced_p): Declare.
7841         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7842         (nds32_relax_group): Use nds32_ict_const_p as condition.
7843         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7844         (nds32_asm_file_start): Output ict_model directive in asm code.
7845         (nds32_legitimate_address_p): Consider indirect call.
7846         (nds32_print_operand): Consider indirect call.
7847         (nds32_print_operand_address): Consider indirect call.
7848         (nds32_insert_attributes): Handle "indirect_call" attribute.
7849         (TARGET_LEGITIMATE_ADDRESS_P): Define.
7850         (TARGET_LEGITIMATE_CONSTANT_P): Define.
7851         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7852         (TARGET_DELEGITIMIZE_ADDRESS): Define.
7853         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7854         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7855         (TARGET_ICT_MODEL_SMALL): Define.
7856         (TARGET_ICT_MODEL_LARGE): Define.
7857         * config/nds32/nds32.md (movsi): Consider ict model.
7858         (call, call_value): Consider ict model.
7859         (sibcall, sibcall_value): Consider ict model.
7860         * config/nds32/nds32.opt (mict-model): New option.
7861         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7862         model.
7864 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
7865             Monk Chiang  <sh.chiang04@gmail.com>
7866             Jim Wilson <jimw@sifive.com>
7868         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7869         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
7870         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7871         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7872         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
7873         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7874         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7875         compute save_libcall_adjustment properly.
7876         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7877         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7878         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7879         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7880         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7881         (ABI_SPEC): Handle mabi=ilp32e.
7882         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7883         (RVE): Add RVE mask.
7884         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7885         <-march>: Add rv32e as an example.
7887 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
7889         PR c++/82899
7890         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7891         (intra_create_variable_infos): Handle C++ constructors.
7893 2018-05-18  Martin Liska  <mliska@suse.cz>
7895         * passes.def: Remove a redundant pass.
7897 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
7899         PR bootstrap/85838
7900         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7902 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7904         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7905         (ARMv4): Update.
7906         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7907         (ARMv6m): Update.
7908         (armv2, armv2a, armv3, armv3m): Delete architectures.
7909         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7910         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7911         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7912         Delete cpus.
7913         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7914         (*mulsidi3adddi): Likewise.
7915         (mulsidi3): Likewise.
7916         (*mulsidi3_nov6): Likewise.
7917         (umulsidi3): Likewise.
7918         (umulsidi3_nov6): Likewise.
7919         (umaddsidi4): Likewise.
7920         (*umulsidi3adddi): Likewise.
7921         (smulsi3_highpart): Likewise.
7922         (*smulsi3_highpart_nov6): Likewise.
7923         (umulsi3_highpart): Likewise.
7924         (*umulsi3_highpart_nov6): Likewise.
7925         * config/arm/arm.h (arm_arch3m): Delete.
7926         * config/arm/arm.c (arm_arch3m): Delete.
7927         (arm_option_override_internal): Update armv3-related comment.
7928         (arm_configure_build_target): Delete use of isa_bit_mode32.
7929         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7930         (arm_rtx_costs_internal): Delete check of arm_arch3m.
7931         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7932         (mulsa3): Likewise.
7933         (mulusa3): Likewise.
7934         * config/arm/arm-protos.h (arm_arch3m): Delete.
7935         * config/arm/arm-tables.opt: Regenerate.
7936         * config/arm/arm-tune.md: Likewise.
7937         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7938         deleted architectures.
7940 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7942         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7943         (armv5t, armv5te): New features.
7944         (ARMv5, ARMv5e): Delete fgroups.
7945         (ARMv5t, ARMv5te): Adjust for above changes.
7946         (ARMv6m): Likewise.
7947         (armv5, armv5e): Delete arches.
7948         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7949         arm_arch5.
7950         (*call_reg_arm): Likewise.
7951         (*call_value_reg_armv5): Likewise.
7952         (*call_value_reg_arm): Likewise.
7953         (*call_symbol): Likewise.
7954         (*call_value_symbol): Likewise.
7955         (*sibcall_insn): Likewise.
7956         (*sibcall_value_insn): Likewise.
7957         (clzsi2): Likewise.
7958         (prefetch): Likewise.
7959         (define_split and define_peephole2 dependent on arm_arch5):
7960         Likewise.
7961         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7962         arm_arch5e.
7963         (TARGET_ARM_QBIT): Likewise.
7964         (TARGET_DSP_MULTIPLY): Likewise.
7965         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7966         (arm_arch5, arm_arch5e): Delete.
7967         (arm_arch5t, arm_arch5te): Declare.
7968         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7969         (arm_arch5t): Declare.
7970         (arm_option_reconfigure_globals): Update for the above.
7971         (arm_options_perform_arch_sanity_checks): Update comment, replace
7972         use of arm_arch5 with arm_arch5t.
7973         (use_return_insn): Likewise.
7974         (arm_emit_call_insn): Likewise.
7975         (output_return_instruction): Likewise.
7976         (arm_final_prescan_insn): Likewise.
7977         (arm_coproc_builtin_available): Likewise.
7978         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7979         arm_arch5e with arm_arch5t and arm_arch5te.
7980         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7981         (arm_arch5t, arm_arch5te): Declare.
7982         * config/arm/arm-tables.opt: Regenerate.
7983         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7984         * config/arm/t-multilib: Likewise.
7985         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7986         instead of arm_arch5.
7987         (*call_reg_thumb1): Likewise.
7988         (*call_value_reg_thumb1_v5): Likewise.
7989         (*call_value_reg_thumb1): Likewise.
7990         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
7991         unreachable path.
7992         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
7994 2018-05-18  Martin Liska  <mliska@suse.cz>
7996         PR gcov-profile/84846
7997         * doc/gcov.texi: Document -t option of gcov tool.
7999 2018-05-18  Martin Liska  <mliska@suse.cz>
8001         PR gcov-profile/84846
8002         * gcov.c (print_usage): Add new -t option.
8003         (process_args): Handle the option.
8004         (generate_results): Use stdout as output when requested by
8005         the option.
8007 2018-05-18  Martin Liska  <mliska@suse.cz>
8009         PR gcov-profile/84846
8010         * coverage.c (coverage_init): Write PWD to .gcno file.
8011         * doc/gcov.texi: Document how working directory is printed.
8012         * gcov-dump.c (dump_gcov_file): Print PWD.
8013         * gcov.c (output_intermediate_file): Likewise.
8014         (read_graph_file): Read PWD string.
8015         (output_lines): Print PWD.
8017 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8019         PR middle-end/85817
8020         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8021         for retval and return false if all args to phi are zero.
8023 2018-05-18  Richard Biener  <rguenther@suse.de>
8025         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8026         method.
8027         (evrp_dom_walker::before_dom_children): Call it.
8029 2018-05-18  Richard Biener  <rguenther@suse.de>
8031         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8032         results when processing array refs with variable index.
8034 2018-05-18  Toon Moene  <toon@moene.org>
8036         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8037         directly after that of -floop-interchange. Indicate that both
8038         options are enabled by default when specifying -O3.
8040 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8042         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8043         iterator.  Delete separate integer-mode vec_set<mode> expander.
8044         (aarch64_simd_vec_setv2di): Delete.
8045         (vec_setv2di): Delete.
8046         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8047         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
8048         the "w, r" alternative.
8050 2018-05-18  Martin Liska  <mliska@suse.cz>
8052         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8053         * tree-pass.h (make_pass_lower_switch_O0): New function.
8054         * tree-switch-conversion.c (node_has_low_bound): Remove.
8055         (node_has_high_bound): Likewise.
8056         (node_is_bounded): Likewise.
8057         (class pass_lower_switch): Make it a template type and create
8058         two instances.
8059         (pass_lower_switch::execute): Add template argument.
8060         (make_pass_lower_switch): New function.
8061         (make_pass_lower_switch_O0): New function.
8062         (do_jump_if_equal): Remove.
8063         (emit_case_nodes): Simplify to just handle all 3 cases and leave
8064         all the hard work to tree optimization passes.
8066 2018-05-18  Martin Liska  <mliska@suse.cz>
8068         * dbgcnt.c (limit_low): Renamed from limit.
8069         (limit_high): New variable.
8070         (dbg_cnt_is_enabled): Check for upper limit.
8071         (dbg_cnt): Adjust dumping.
8072         (dbg_cnt_set_limit_by_index): Add new argument for high
8073         value.
8074         (dbg_cnt_set_limit_by_name): Likewise.
8075         (dbg_cnt_process_single_pair): Parse new format.
8076         (dbg_cnt_process_opt): Use strtok.
8077         (dbg_cnt_list_all_counters): Remove 'value' and add
8078         'limit_high'.
8079         * doc/invoke.texi: Document changes.
8081 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
8083         * doc/sourcebuild.texi (scalar_all_fma): Document.
8084         * tree.def (FMA_EXPR): Delete.
8085         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8086         * internal-fn.c (ternary_direct): New macro.
8087         (expand_ternary_optab_fn): Likewise.
8088         (direct_ternary_optab_supported_p): Likewise.
8089         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8090         * builtins.c (fold_builtin_fma): Delete.
8091         (fold_builtin_3): Don't call it.
8092         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8093         * expr.c (expand_expr_real_2): Likewise.
8094         * fold-const.c (operand_equal_p): Likewise.
8095         (fold_ternary_loc): Likewise.
8096         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8097         * gimple.c (DEFTREECODE): Likewise.
8098         * gimplify.c (gimplify_expr): Likewise.
8099         * optabs-tree.c (optab_for_tree_code): Likewise.
8100         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8101         * tree-eh.c (operation_could_trap_p): Likewise.
8102         (stmt_could_throw_1_p): Likewise.
8103         * tree-inline.c (estimate_operator_cost): Likewise.
8104         * tree-pretty-print.c (dump_generic_node): Likewise.
8105         (op_code_prio): Likewise.
8106         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8107         * tree-ssa-operands.c (get_expr_operands): Likewise.
8108         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8109         * fold-const-call.h (fold_fma): Delete.
8110         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8111         CFN_FNMA and CFN_FNMS.
8112         (fold_fma): Delete.
8113         * genmatch.c (combined_fn): New enum.
8114         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8115         (commutative_op): New function.
8116         (commutate): Use it.  Handle more than 2 operands.
8117         (dt_operand::gen_gimple_expr): Use commutative_op.
8118         (parser::parse_expr): Allow :c to be used with non-binary
8119         operators if the commutative operand is known.
8120         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8121         CFN_FMS, CFN_FNMA and CFN_FNMS.
8122         (backprop::process_assign_use): Remove FMA_EXPR handling.
8123         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8124         (gen_hsa_fma): New function.
8125         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8126         IFN_FNMA and IFN_FNMS.
8127         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8128         * gimple-fold.h (follow_all_ssa_edges): Declare.
8129         * gimple-fold.c (follow_all_ssa_edges): New function.
8130         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8131         gimple_build interface and use follow_all_ssa_edges to fold the result.
8132         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8133         instead of checking for optabs directly.
8134         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8135         rather than FMA_EXPRs.
8136         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8137         call to IFN_FMA instead of an FMA_EXPR.
8139 2018-05-17  Jim Wilson  <jimw@sifive.com>
8141         * expr.c (do_tablejump): When converting index to Pmode, if we have a
8142         sign extended promoted subreg, and the range does not have the sign bit
8143         set, then do a sign extend.
8145         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8146         test, check for sign extended subreg and/or constant operands, and
8147         do a sign extend in that case.
8149 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
8151         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8152         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8153         Add untyped.
8154         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8155         Change logics_shift_reg to logics_shift_imm.
8156         (thunderx2t99_fp_loadpair_basic): Delete.
8157         (thunderx2t99_fp_storepair_basic): Delete.
8158         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8159         (thunderx2t99_asimd_polynomial): Delete.
8160         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8161         and neon_fp_mul_d_scalar_q.
8162         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8163         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8164         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8165         (thunderx2t99_asimd_lut): Add missing tbl types.
8166         (thunderx2t99_asimd_ext): Delete.
8167         (thunderx2t99_asimd_load1_1_mult): Delete.
8168         (thunderx2t99_asimd_load1_2_mult): Delete.
8169         (thunderx2t99_asimd_load1_ldp): New.
8170         (thunderx2t99_asimd_load1): New.
8171         (thunderx2t99_asimd_load2): Add missing *load2* types.
8172         (thunderx2t99_asimd_load3): New.
8173         (thunderx2t99_asimd_load4): New.
8174         (thunderx2t99_asimd_store1_1_mult): Delete.
8175         (thunderx2t99_asimd_store1_2_mult): Delete.
8176         (thunderx2t99_asimd_store2_mult): Delete.
8177         (thunderx2t99_asimd_store2_onelane): Delete.
8178         (thunderx2t99_asimd_store_stp): New.
8179         (thunderx2t99_asimd_store1): New.
8180         (thunderx2t99_asimd_store2): New.
8181         (thunderx2t99_asimd_store3): New.
8182         (thunderx2t99_asimd_store4): New.
8184 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
8186         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8187         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
8189 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
8190             Segher Boessenkool  <segher@kernel.crashing.org>
8192         PR target/85698
8193         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8194         operand.
8196 2018-05-17  Richard Biener  <rguenther@suse.de>
8198         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8199         for pruning loop and prune defs feeding only already visited PHIs.
8201 2018-05-17  Richard Biener  <rguenther@suse.de>
8203         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8205 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
8206             Richard Biener  <rguenther@suse.de>
8208         PR tree-optimization/85793
8209         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8210         for VMAT_ELEMENTWISE.
8212 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8214         * internal-fn.h (lookup_internal_fn): Declare
8215         * internal-fn.c (lookup_internal_fn): New function.
8216         * gimple.c (gimple_build_call_from_tree): Handle calls to
8217         internal functions.
8218         * gimple-pretty-print.c (dump_gimple_call): Print "." before
8219         internal function names.
8220         * tree-pretty-print.c (dump_generic_node): Likewise.
8221         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8223 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8225         * gimple-fold.h (gimple_build): Make the function forms take
8226         combined_fn rather than built_in_function.
8227         (gimple_simplify): Likewise.
8228         * gimple-match-head.c (gimple_simplify): Likewise.
8229         * gimple-fold.c (gimple_build): Likewise.
8230         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8231         rather than gimple_build_call_internal.
8232         (get_initial_defs_for_reduction): Likewise.
8233         (vect_create_epilog_for_reduction): Likewise.
8234         (vectorizable_live_operation): Likewise.
8236 2018-05-17  Martin Liska  <mliska@suse.cz>
8238         * gimple-ssa-sprintf.c (format_directive): Do not use
8239         space in between 'G_' and '('.
8241 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
8243         PR target/85323
8244         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8245         even if the mask is not all ones.
8247         PR target/85323
8248         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8249         vector.
8250         (ix86_gimple_fold_builtin): Likewise.
8252         PR target/85323
8253         * config/i386/i386.c: Include tree-vector-builder.h.
8254         (ix86_vector_shift_count): New function.
8255         (ix86_fold_builtin): Fold shift builtins by scalar count.
8256         (ix86_gimple_fold_builtin): Likewise.
8258         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8259         _mm512_setzero): New intrinsics.
8261 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
8262             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8264         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8265         code generation for cases where splatting a value is not useful.
8266         * simplify-rtx.c (simplify_ternary_operation): Simplify
8267         vec_merge across a vec_duplicate and a paradoxical subreg forming
8268         a vector mode to a vec_concat.
8270 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
8272         * config.gcc: Support "goldmont-plus".
8273         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8274         "goldmont-plus".
8275         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8276         PROCESSOR_GOLDMONT_PLUS.
8277         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8278         (processor_target_table): Add "goldmont-plus".
8279         (PTA_GOLDMONT_PLUS): Define.
8280         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8281         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8282         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8283         (fold_builtin_cpu): Add "goldmont-plus".
8284         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8285         (ix86_option_override_internal): Add "goldmont-plus".
8286         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8287         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8288         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8289         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8291 2018-05-17  Richard Biener  <rguenther@suse.de>
8293         PR tree-optimization/85757
8294         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8295         remove defs that only feed that PHI from further processing.
8297 2018-05-16  Jim Wilson  <jimw@sifive.com>
8299         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8300         asterisk to name.
8301         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8303 2018-05-16  Mark Wielaard  <mark@klomp.org>
8305         * dwarf2out.c (count_index_strings): New function.
8306         (output_indirect_strings): Call count_index_strings and generate
8307         header for dwarf_version >= 5.
8309 2018-05-16  Mark Wielaard  <mark@klomp.org>
8311         * dwarf2out.c (dwarf_FORM): New function.
8312         (set_indirect_string): Use dwarf_FORM.
8313         (reset_indirect_string): Likewise.
8314         (size_of_die): Likewise.
8315         (value_format): Likewise.
8316         (output_die): Likewise.
8317         (add_skeleton_AT_string): Likewise.
8318         (output_macinfo_op): Likewise.
8319         (index_string): Likewise.
8320         (output_index_string_offset): Likewise.
8321         (output_index_string): Likewise.
8322         (count_index_strings): Likewise.
8324 2018-05-16  Carl Love  <cel@us.ibm.com>
8326         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8327         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8329 2018-05-16  Martin Jambor  <mjambor@suse.cz>
8331         * ipa-prop.c (ipa_free_all_edge_args): Remove.
8332         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8334 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
8336         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8337         (fnma<mode>4): Likewise.
8338         (fms<mode>4): Likewise.
8339         (fnms<mode>4): Likewise.
8340         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8341         (aarch64_fnma<mode>4): Likewise.
8342         (aarch64_fms<mode>4): Likewise.
8343         (aarch64_fnms<mode>4): Likewise.
8344         (aarch64_fnmadd<mode>4): Likewise.
8346 2018-05-16  Jason Merrill  <jason@redhat.com>
8348         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
8350 2018-05-16  Richard Biener  <rguenther@suse.de>
8352         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8353         (dump_stmt_cost): Declare.
8354         (add_stmt_cost): Dump cost we add.
8355         (add_stmt_costs): New function.
8356         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8357         No longer exported.
8358         (vect_analyze_stmt): Adjust prototype.
8359         (vectorizable_condition): Likewise.
8360         (vectorizable_live_operation): Likewise.
8361         (vectorizable_reduction): Likewise.
8362         (vectorizable_induction): Likewise.
8363         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8364         cost vector to pass to vectorizable_ and record afterwards.
8365         (vect_model_reduction_cost): Take cost vector argument and adjust.
8366         (vect_model_induction_cost): Likewise.
8367         (vectorizable_reduction): Likewise.
8368         (vectorizable_induction): Likewise.
8369         (vectorizable_live_operation): Likewise.
8370         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8371         SLP_TREE_NUMBER_OF_VEC_STMTS.
8372         (vect_analyze_slp_cost_1): Remove.
8373         (vect_analyze_slp_cost): Likewise.
8374         (vect_slp_analyze_node_operations): Take visited args and
8375         a target cost vector.  Avoid processing already visited stmt sets.
8376         (vect_slp_analyze_operations): Use a local cost vector to gather
8377         costs and register those of non-discarded instances.
8378         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8379         (vect_schedule_slp_instance): Remove copying of
8380         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
8381         zero.
8382         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8383         adding cost.  Record cost entry location.
8384         (vect_prologue_cost_for_slp_op): Function to compute cost of
8385         a constant or invariant generated for SLP vect in the prologue,
8386         split out from vect_analyze_slp_cost_1.
8387         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
8388         (vect_model_promotion_demotion_cost): Likewise.
8389         (vect_model_store_cost): Likewise, make static.
8390         (vect_model_load_cost): Likewise.
8391         (vectorizable_bswap): Add cost vector arg and adjust.
8392         (vectorizable_call): Likewise.
8393         (vectorizable_simd_clone_call): Likewise.
8394         (vectorizable_conversion): Likewise.
8395         (vectorizable_assignment): Likewise.
8396         (vectorizable_shift): Likewise.
8397         (vectorizable_operation): Likewise.
8398         (vectorizable_store): Likewise.
8399         (vectorizable_load): Likewise.
8400         (vectorizable_condition): Likewise.
8401         (vectorizable_comparison): Likewise.
8402         (can_vectorize_live_stmts): Likewise.
8403         (vect_analyze_stmt): Likewise.
8404         (vect_transform_stmt): Adjust calls to vectorizable_*.
8405         * tree-vectorizer.c: Include gimple-pretty-print.h.
8406         (dump_stmt_cost): New function.
8408 2018-05-16  Richard Biener  <rguenther@suse.de>
8410         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8411         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8412         * tree-ssa-dse.c: Include tree-ssa-loop.h.
8413         (check_name): New callback.
8414         (dse_classify_store): Track cycles via a visited bitmap of PHI
8415         defs and simplify handling of in-loop and across loop dead stores
8416         and properly fail for loop-variant refs.  Handle byte-tracking with
8417         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8418         limiting the walk.
8420 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
8422         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8423         (vect_get_mask_type_for_stmt): Likewise.
8424         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8425         split out from...
8426         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
8427         to determine the statement's vector type and the vector type that
8428         should be used for calculating nunits.  Deal with cases in which
8429         the type has to be deferred.
8430         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8431         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8432         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8433         (vect_determine_vf_for_stmt): New functions, split out from...
8434         (vect_determine_vectorization_factor): ...here.
8435         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8436         (vect_get_mask_type_for_stmt): New functions, split out from
8437         vect_determine_vectorization_factor.
8439 2018-05-16  Richard Biener  <rguenther@suse.de>
8441         * tree-cfg.c (verify_gimple_assign_ternary): Properly
8442         verify the [VEC_]COND_EXPR embedded comparison.
8444 2018-05-15  Martin Sebor  <msebor@redhat.com>
8446         PR tree-optimization/85753
8447         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8448         RECORD_TYPE in addition to ARRAY_TYPE.
8450 2018-05-15  Martin Sebor  <msebor@redhat.com>
8452         PR middle-end/85643
8453         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8455 2018-05-15  Richard Biener  <rguenther@suse.de>
8457         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8458         add by_clobber_p one.  Change algorithm to collect all defs
8459         representing uses we need to walk and try reducing them to
8460         a single one before failing.
8461         (dse_dom_walker::dse_optimize_stmt): Adjust.
8463 2018-05-13  Mark Wielaard  <mark@klomp.org>
8465         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8466         (size_of_loc_descr): Likewise.
8467         (output_loc_operands): Likewise.
8468         (output_loc_operands_raw): Likewise.
8469         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8470         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8471         (hash_loc_operands): Likewise.
8472         (compare_loc_operands): Likewise.
8474 2018-05-14  Mark Wielaard  <mark@klomp.org>
8476         * dwarf2out.c (count_index_addrs): New function.
8477         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8479 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8481         PR tree-optimization/83648
8482         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8483         return value as malloc candidate.
8485 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8487         PR ipa/85734
8488         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8489         param as true in call to suggest_attribute.
8491 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
8493         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8494         -mreadonly-in-sdata.
8496 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8498         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8499         New pattern.
8500         (aarch64_crypto_aesd_fused): Likewise.
8502 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
8504         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8505         (movsi_aarch64): Likewise.
8506         (load_pairsi): Likewise.
8507         (load_pairdi): Likewise.
8508         (store_pairsi): Likewise.
8509         (store_pairdi): Likewise.
8510         (load_pairsf): Likewise.
8511         (load_pairdf): Likewise.
8512         (store_pairsf): Likewise.
8513         (store_pairdf): Likewise.
8514         (zero_extend): Likewise.
8515         (trunc): Swap alternatives.
8516         (fcvt_target): Add '?' to prefer w over r.
8518 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
8520         PR target/85756
8521         * config/i386/i386.md: Disallow non-commutative arithmetics in
8522         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8523         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
8524         in the peephole2 before it.
8526 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
8528         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8529         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8530         (ix86_handle_option): Handle -mcldemote.
8531         * config.gcc: New header.
8532         * config/i386/cldemoteintrin.h: New file.
8533         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8534         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8535         -mcldemote.
8536         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8537         OPTION_MASK_ISA_CLDEMOTE.
8538         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8539         (ix86_valid_target_attribute_inner_p): Ditto.
8540         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8541         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8542         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8543         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8544         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8545         (cldemote): New.
8546         * config/i386/i386.opt: Add -mcldemote.
8547         * config/i386/x86intrin.h: New header.
8548         * doc/invoke.texi: Add -mcldemote.
8550 2018-05-14  Richard Biener  <rguenther@suse.de>
8552         * doc/match-and-simplify.texi: Adjust :s documentation.
8554 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
8556         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8557         intended memcpy size.
8558         (REORDER_45): Likewise.
8560 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
8562         * sort.cc: New file.
8563         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8564         * vec.c (qsort_chk): Use gcc_qsort.
8565         * Makefile.in (OBJS-libcommon): Add sort.o.
8566         (build/sort.o): New target.  Use it...
8567         (BUILD_RTL): ... here, and...
8568         (build/gencfn-macros): ... here, and...
8569         (build/genmatch): ... here.
8571 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8572             Chung-Ju Wu  <jasonwucj@gmail.com>
8574         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8575         * config/nds32/nds32-graywolf.md: New file.
8576         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8577         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8578         pipeline.
8579         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8580         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8581         * config/nds32/nds32.md (pipeline_model): Add graywolf.
8582         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8583         * config/nds32/pipelines.md: Include n15 settings.
8585 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8586             Chung-Ju Wu  <jasonwucj@gmail.com>
8588         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8589         * config/nds32/nds32-n13.md: New file.
8590         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8591         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8592         pipeline.
8593         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8594         * config/nds32/nds32.md (pipeline_model): Add n13.
8595         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8596         * config/nds32/pipelines.md: Include n13 settings.
8598 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8599             Chung-Ju Wu  <jasonwucj@gmail.com>
8601         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8602         * config/nds32/nds32-n10.md: New file.
8603         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8604         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8605         pipeline.
8606         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8607         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8608         * config/nds32/nds32.md (pipeline_model): Add n10.
8609         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8610         * config/nds32/pipelines.md: Include n10 settings.
8612 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
8613             Kito Cheng  <kito.cheng@gmail.com>
8614             Chung-Ju Wu  <jasonwucj@gmail.com>
8616         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8617         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8618         Add enum values for DSP extension instructions.
8619         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8620         New constraints.
8621         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8622         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8623         New code iterators.
8624         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8625         * config/nds32/nds32-dspext.md: New file for DSP implementation.
8626         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8627         * config/nds32/nds32-intrinsic.md: Likewise.
8628         * config/nds32/nds32_intrinsic.h: Likewise.
8629         * config/nds32/nds32-md-auxiliary.c: Likewise.
8630         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8631         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8632         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8633         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8634         * config/nds32/nds32-protos.h: New declarations for DSP extension.
8635         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8636         TYPE_DMAC in switch statement.
8637         * config/nds32/nds32.c: New checking and implementation for DSP
8638         extension instructions.
8639         * config/nds32/nds32.h: Likewise.
8640         * config/nds32/nds32.md: Likewise.
8641         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8642         * config/nds32/predicates.md: Implement new predicates for DSP
8643         extension.
8645 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
8647         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8648         Reformat alternatives and attributes so it is easier to identify
8649         which constraints/attributes go with which instruction.
8650         (mov<mode>_hardfloat32, FMOVE64): Likewise.
8651         (mov<mode>_softfloat32, FMOVE64): Likewise.
8652         (mov<mode>_hardfloat64, FMOVE64): Likewise.
8653         (mov<mode>_softfloat64, FMOVE64): Likewise.
8655 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8657         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8658         subsection.
8659         (Basic PowerPC Built-in Functions): The new name of the
8660         subsection previously known as "PowerPC Built-in Functions".
8661         (Basic PowerPC Built-in Functions Available on all Configurations):
8662         New subsubsection.
8663         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8664         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8665         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8666         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8668 2018-05-11  Martin Jambor  <mjambor@suse.cz>
8670         PR ipa/85655
8671         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8672         single const.
8674 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8676         PR target/85733
8677         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8679 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
8681         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8682         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8683         (ix86_handle_option): Handle -mwaitpkg.
8684         * config.gcc: New header.
8685         * config/i386/cpuid.h (bit_WAITPKG): New bit.
8686         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8687         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8688         function type.
8689         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8690         OPTION_MASK_ISA_WAITPKG.
8691         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8692         (ix86_option_override_internal): Add PTA_WAITPKG.
8693         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8694         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8695         IX86_BUILTIN_TPAUSE.
8696         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8697         __builtin_ia32_umwait and __builtin_ia32_tpause.
8698         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8699         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8700         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8701         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8702         UNSPECV_TPAUSE): New.
8703         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8704         * config/i386/i386.opt: Add -mwaitpkg.
8705         * config/i386/waitpkgintrin.h: New file.
8706         * config/i386/x86intrin.h: New header.
8707         * doc/invoke.texi: Add -mwaitpkg.
8709 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8711         PR target/85606
8712         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8713         equivalent.
8714         (cortex-m0): Use armv6s-m isa.
8715         (cortex-m0plus): Likewise.
8716         (cortex-m1): Likewise.
8717         (cortex-m0.small-multiply): Likewise.
8718         (cortex-m0plus.small-multiply): Likewise.
8719         (cortex-m1.small-multiply): Likewise.
8721 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8722             Jakub Jelinek  <jakub@redhat.com>
8724         PR tree-optimization/85692
8725         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8726         source permute as well.
8728 2018-05-11  Martin Liska  <mliska@suse.cz>
8730         PR sanitizer/85556
8731         * doc/extend.texi: Document LLVM style format for no_sanitize
8732         attribute.
8734 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8736         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8737         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8738         (mode_supports_vsx_dform_quad): Likewise.
8739         (mode_supports_vmx_dform): Move these functions to be next to the
8740         other mode_supports functions.
8741         (mode_supports_dq_form): Likewise.
8742         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8743         mode_supports_dq_form.
8744         (reg_offset_addressing_ok_p): Likewise.
8745         (offsettable_ok_by_alignment): Likewise.
8746         (rs6000_legitimate_offset_address_p): Likewise.
8747         (legitimate_lo_sum_address_p): Likewise.
8748         (rs6000_legitimize_address): Likewise.
8749         (rs6000_legitimize_reload_address): Likewise.
8750         (rs6000_secondary_reload_inner): Likewise.
8751         (rs6000_preferred_reload_class): Likewise.
8752         (rs6000_output_move_128bit): Likewise.
8754 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8756         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8757         Generate SImode target register for null target.
8758         <case IX86_BUILTIN_XGETBV>: Ditto.
8759         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8760         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8762 2018-05-10  Carl Love  <cel@us.ibm.com>
8764         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8765         dcbtt and dcbtstt if operands[2] is 0.
8767 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8769         PR target/85693
8770         * config/i386/sse.md (usadv64qi): New expander.
8772 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8774         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8775         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8776         -maltivec=be support.
8777         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8778         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8779         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8780         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8781         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8782         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8783         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8784         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8785         altivec_vsumsws): Adjust.
8786         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8787         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8788         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8789         support.
8790         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8791         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8792         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8793         (altivec_lve<VI_char>x): Delete expand.
8794         (*altivec_lve<VI_char>x_internal): Rename to...
8795         (altivec_lve<VI_char>x): ... this.
8796         (altivec_lvxl_<mode>): Delete expand.
8797         (*altivec_lvxl_<mode>_internal): Rename to ...
8798         (altivec_lvxl_<mode>): ... this.
8799         (altivec_stvxl_<mode>): Delete expand.
8800         (*altivec_stvxl_<mode>_internal): Rename to ...
8801         (altivec_stvxl_<mode>): ... this.
8802         (altivec_stve<VI_char>x): Delete expand.
8803         (*altivec_stve<VI_char>x_internal): Rename to ...
8804         (altivec_stve<VI_char>x): ... this.
8805         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8806         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8807         reduc_plus_scal_<mode>): Adjust.
8808         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8809         comment.
8810         (rs6000_cpu_cpp_builtins): Adjust.
8811         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8812         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8813         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8814         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8815         -maltivec=be support.
8816         (rs6000_split_vec_extract_var): Adjust.
8817         (rs6000_split_v4si_init): Adjust.
8818         (swap_selector_for_mode): Delete.
8819         (altivec_expand_lvx_be, altivec_expand_stvx_be,
8820         altivec_expand_stvex_be): Delete.
8821         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8822         -maltivec=be support.
8823         (rs6000_gimple_fold_builtin): Ditto.
8824         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8825         Adjust.
8826         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8827         (TARGET_DIRECT_MOVE_64BIT): Adjust.
8828         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8829         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8830         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8831         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8832         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8833         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8834         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8835         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8836         anonymous split): Adjust.
8837         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8838         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8840 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
8842         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8843         when --with-gxx-include-dir is also specified.
8844         * configure: Regenerate.
8846 2018-05-09  Jim Wilson  <jimw@sifive.com>
8848         PR target/84797
8849         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8850         * config/riscv/t-withmultilib: New.
8851         * config/riscv/withmultilib.h: New.
8852         * doc/install.texi: Document RISC-V --with-multilib-list support.
8854 2018-05-09  Richard Biener  <rguenther@suse.de>
8856         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8857         vector.
8858         (vect_bb_vectorization_profitable_p): Adjust.  Compute
8859         actual scalar cost using the cost vector and the add_stmt_cost
8860         machinery.
8862 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8864         PR rtl-optimization/85645
8865         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8866         in the REG_CFA_REGISTER note for LR, don't leave it empty.
8868 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8870         PR rtl-optimization/85645
8871         * shrink-wrap.c (spread_components): Return a boolean saying if
8872         anything was changed.
8873         (try_shrink_wrapping_separate): Iterate spread_components until
8874         nothing changes anymore.
8876 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8878         PR rtl-optimization/85645
8879         * regrename.c (build_def_use): Also kill the chains that include the
8880         destination of a REG_CFA_REGISTER note.
8882 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
8884         PR rtl-optimization/85645
8885         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8886         insn that has a REG_CFA_REGISTER note.
8888 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
8890         * cfgexpand.c (expand_clobber): New function.
8891         (expand_gimple_stmt_1): Use it.
8892         * tree-vect-stmts.c (vect_clobber_variable): New function,
8893         split out from...
8894         (vectorizable_simd_clone_call): ...here.
8895         (vectorizable_store): Emit a clobber either side of an
8896         IFN_STORE_LANES sequence.
8897         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8899 2018-05-09  Tom de Vries  <tom@codesourcery.com>
8901         PR target/85626
8902         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8903         (define_insn "trap_if_false"): Add exit after trap.
8905 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
8907         PR rtl-optimization/85638
8908         * bb-reorder.c: Include common/common-target.h.
8909         (create_forwarder_block): New function extracted from...
8910         (fix_up_crossing_landing_pad): ...here.  Rename into...
8911         (dw2_fix_up_crossing_landing_pad): ...this.
8912         (sjlj_fix_up_crossing_landing_pad): New function.
8913         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8914         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8915         from both partitions and exit the loop after one iteration.
8917 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8919         Revert:
8920         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8921         subsection.
8922         (Basic PowerPC Built-in Functions): The new name of the
8923         subsection previously known as "PowerPC Built-in Functions".
8924         (Basic PowerPC Built-in Functions Available on all Configurations):
8925         New subsubsection.
8926         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8927         subsubsection.
8928         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8929         subsubsection.
8930         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8931         subsubsection.
8932         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8933         subsubsection.
8935 2018-05-08  Jim Wilson  <jimw@sifive.com>
8937         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8938         (LD_EMUL_SUFFIX): New.
8939         (LINK_SPEC): Use it.
8941 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8943         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8944         subsection.
8945         (Basic PowerPC Built-in Functions): The new name of the
8946         subsection previously known as "PowerPC Built-in Functions".
8947         (Basic PowerPC Built-in Functions Available on all Configurations):
8948         New subsubsection.
8949         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8950         subsubsection.
8951         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8952         subsubsection.
8953         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8954         subsubsection.
8955         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8956         subsubsection.
8958 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8960         PR target/85683
8961         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8962         after cmpelim optimization.
8964 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
8966         * config.gcc: Support "goldmont".
8967         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8968         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8969         PROCESSOR_GOLDMONT.
8970         * config/i386/i386.c (m_GOLDMONT): Define.
8971         (processor_target_table): Add "goldmont".
8972         (PTA_GOLDMONT): Define.
8973         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8974         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8975         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8976         (fold_builtin_cpu): Add "goldmont".
8977         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8978         (ix86_option_override_internal): Add "goldmont".
8979         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8980         (processor_type): Add PROCESSOR_GOLDMONT.
8981         * config/i386/i386.md: Add CPU "glm".
8982         * config/i386/glm.md: New file.
8983         * config/i386/x86-tune.def: Add m_GOLDMONT.
8984         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8986 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
8988         PR target/85572
8989         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
8990         E_V4DImode.
8991         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
8992         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
8993         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
8995         PR target/85317
8996         * config/i386/i386.c (ix86_fold_builtin): Handle
8997         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
8999         PR target/85480
9000         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9001         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9003 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
9005         PR target/85658
9006         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9007         (check_arch): Likewise.
9008         (check_fpu): Return the result rather than printing it.
9009         (end arch): Fix operator precedence.
9010         (end cpu): Likewise.
9011         (END): Print the result from check_fpu.
9013 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9014             Alan Hayward  <alan.hayward@arm.com>
9015             David Sherwood  <david.sherwood@arm.com>
9017         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9018         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9019         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9020         (*fcmuo<mode>_and): New patterns.
9022 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9024         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9025         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9026         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9027         (cmp_op, sve_imm_con): New code attributes.
9028         (SVE_COND_INT_CMP, imm_con): Delete.
9029         (cmp_op): Remove above unspecs from int attribute.
9030         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9031         to...
9032         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
9033         comparison-specific unspecs.
9034         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9035         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9036         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9037         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9038         (*vec_fcm<cmp_op><mode>): Rename to...
9039         (*fcm<cmp_op><mode>): ...this and adjust likewise.
9040         (*vec_fcmuo<mode>): Rename to...
9041         (*fcmuo<mode>): ...this and adjust likewise.
9042         (*pred_fcm<cmp_op><mode>): New pattern.
9043         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9044         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9045         functions.
9046         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9047         and UNORDERED.
9048         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9049         (aarch64_emit_sve_predicated_cond): New function.
9050         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9051         (aarch64_emit_unspec_cond_or): Replace with...
9052         (aarch64_emit_sve_or_conds): ...this new function.  Use
9053         aarch64_emit_sve_ptrue_op for the individual comparisons and
9054         aarch64_emit_binop to OR them together.
9055         (aarch64_emit_inverted_unspec_cond): Replace with...
9056         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
9057         aarch64_emit_sve_ptrue_op for the comparison and
9058         aarch64_emit_unop to invert the result.
9059         (aarch64_expand_sve_vec_cmp_float): Update after the above
9060         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
9062 2018-05-07  Nathan Sidwell  <nathan@acm.org>
9064         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9065         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9066         (Backwards Compatibility): Likewise.
9068 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9070         PR bootstrap/85681
9071         Revert:
9072         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9074         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9075         <prefetch_dynamic_strides>: New const bool field.
9076         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9077         prefetch_dynamic_strides.
9078         (exynosm1_prefetch_tune): Likewise.
9079         (thunderxt88_prefetch_tune): Likewise.
9080         (thunderx_prefetch_tune): Likewise.
9081         (thunderx2t99_prefetch_tune): Likewise.
9082         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9083         to false.
9084         (aarch64_override_options_internal): Update to set
9085         PARAM_PREFETCH_DYNAMIC_STRIDES.
9086         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9087         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9088         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9089         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9090         prefetch-dynamic-strides setting.
9092         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9094         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9095         <minimum_stride>: New const int field.
9096         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9097         minimum_stride field.
9098         (exynosm1_prefetch_tune): Likewise.
9099         (thunderxt88_prefetch_tune): Likewise.
9100         (thunderx_prefetch_tune): Likewise.
9101         (thunderx2t99_prefetch_tune): Likewise.
9102         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9103         (aarch64_override_options_internal): Update to set
9104         PARAM_PREFETCH_MINIMUM_STRIDE.
9105         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9106         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9107         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9108         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9109         stride is constant and is below the minimum stride threshold.
9111 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9113         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9114         to 512.
9116 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9118         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9119         <prefetch_dynamic_strides>: New const bool field.
9120         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9121         prefetch_dynamic_strides.
9122         (exynosm1_prefetch_tune): Likewise.
9123         (thunderxt88_prefetch_tune): Likewise.
9124         (thunderx_prefetch_tune): Likewise.
9125         (thunderx2t99_prefetch_tune): Likewise.
9126         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9127         to false.
9128         (aarch64_override_options_internal): Update to set
9129         PARAM_PREFETCH_DYNAMIC_STRIDES.
9130         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9131         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9132         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9133         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9134         prefetch-dynamic-strides setting.
9136 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9138         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9139         <minimum_stride>: New const int field.
9140         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9141         minimum_stride field.
9142         (exynosm1_prefetch_tune): Likewise.
9143         (thunderxt88_prefetch_tune): Likewise.
9144         (thunderx_prefetch_tune): Likewise.
9145         (thunderx2t99_prefetch_tune): Likewise.
9146         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9147         (aarch64_override_options_internal): Update to set
9148         PARAM_PREFETCH_MINIMUM_STRIDE.
9149         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9150         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9151         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9152         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9153         stride is constant and is below the minimum stride threshold.
9155 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
9157         PR c++/85659
9158         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9159         the type is addressable.  Don't force op into register if it has
9160         BLKmode.
9162 2018-05-05  Roland McGrath  <mcgrathr@google.com>
9164         PR other/77609
9165         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9166         any section for which we don't know a specific type it should have,
9167         regardless of name.  Previously this was done only for the exact
9168         names ".init_array", ".fini_array", and ".preinit_array".
9169         (default_elf_asm_named_section): Add comment about
9170         relationship with default_section_type_flags and SECTION_NOTYPE.
9171         (get_section): Don't consider it a type conflict if one side has
9172         SECTION_NOTYPE and the other doesn't, as long as neither has the
9173         SECTION_BSS et al used in the default_section_type_flags logic.
9175 2018-05-05  Tom de Vries  <tom@codesourcery.com>
9177         PR target/85653
9178         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9179         (workaround_barsyncs): New function.
9180         (nvptx_reorg): Use workaround_barsyncs.
9181         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9182         (define_expand "nvptx_membar_cta"): New define_expand.
9183         (define_insn "*nvptx_membar_cta"): New insn.
9185 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
9187         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9188         To improve optimization opportunities.
9189         * builtin-types.def: The new needed builtin types for the above.
9191 2018-05-04  Richard Biener  <rguenther@suse.de>
9193         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9194         * gimple-ssa-store-merging.c
9195         (imm_store_chain_info::output_merged_store): Remove redundant create,
9196         release split_store vector contents on failure.
9197         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9198         scalar stmt vector on cache hit.
9200 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
9202         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9203         Xilinx FP support.
9204         * config.gcc (powerpc-xilinx-eabi*): Remove.
9205         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9206         support.
9207         (fusion_addis_mem_combo_load): Ditto.
9208         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9209         FP support.
9210         (rs6000_cpu_cpp_builtins): Ditto.
9211         * config/rs6000/rs6000-linux.c
9212         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9213         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9214         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9215         support.
9216         (rs6000_setup_reg_addr_masks): Ditto.
9217         (rs6000_init_hard_regno_mode_ok): Ditto.
9218         (rs6000_option_override_internal): Ditto.
9219         (legitimate_lo_sum_address_p): Ditto.
9220         (rs6000_legitimize_address): Ditto.
9221         (rs6000_legitimize_reload_address): Ditto.
9222         (rs6000_legitimate_address_p): Ditto.
9223         (abi_v4_pass_in_fpr): Ditto.
9224         (setup_incoming_varargs): Ditto.
9225         (rs6000_gimplify_va_arg): Ditto.
9226         (rs6000_split_multireg_move): Ditto.
9227         (rs6000_savres_strategy): Ditto.
9228         (rs6000_emit_prologue_components): Ditto.
9229         (rs6000_emit_epilogue_components): Ditto.
9230         (rs6000_emit_prologue): Ditto.
9231         (rs6000_emit_epilogue): Ditto.
9232         (rs6000_elf_file_end): Ditto.
9233         (rs6000_function_value): Ditto.
9234         (rs6000_libcall_value): Ditto.
9235         * config/rs6000/rs6000.h: Ditto.
9236         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9237         (TARGET_MINMAX): ... this.  New.
9238         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9239         * config/rs6000/rs6000.md: Remove Xilinx FP support.
9240         (*movsi_internal1_single): Delete.
9241         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9242         mfpu=, mxilinx-fpu): Delete.
9243         * config/rs6000/singlefp.h: Delete.
9244         * config/rs6000/sysv4.h: Remove Xilinx FP support.
9245         * config/rs6000/t-rs6000: Ditto.
9246         * config/rs6000/t-xilinx: Delete.
9247         * config/rs6000/titan.md: Adjust for fp_type removal.
9248         * config/rs6000/vsx.md: Remove Xilinx FP support.
9249         (VStype_simple): Delete.
9250         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9251         * config/rs6000/xfpu.h: Delete.
9252         * config/rs6000/xfpu.md: Delete.
9253         * config/rs6000/xilinx.h: Delete.
9254         * config/rs6000/xilinx.opt: Delete.
9255         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9256         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9258 2018-05-04  Tom de Vries  <tom@codesourcery.com>
9260         PR libgomp/85639
9261         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9262         if ignore == 0.
9264 2018-05-04  Richard Biener  <rguenther@suse.de>
9266         PR middle-end/85627
9267         * tree-complex.c (update_complex_assignment): We are always in SSA form.
9268         (expand_complex_div_wide): Likewise.
9269         (expand_complex_operations_1): Likewise.
9270         (expand_complex_libcall): Preserve EH info of the original stmt.
9271         (tree_lower_complex): Handle removed blocks.
9272         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9273         on complex multiplication and division libcall builtins.
9275 2018-05-04  Richard Biener  <rguenther@suse.de>
9277         PR middle-end/85574
9278         * fold-const.c (negate_expr_p): Restrict negation of operand
9279         zero of a division to when we know that can happen without
9280         overflow.
9281         (fold_negate_expr_1): Likewise.
9283 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
9285         PR libstdc++/85466
9286         * real.h (real_nextafter): Declare.
9287         * real.c (real_nextafter): New function.
9288         * fold-const-call.c (fold_const_nextafter): New function.
9289         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9290         CASE_CFN_NEXTTOWARD.
9291         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9292         even when arg1_mode is different from arg0_mode.
9294 2018-05-03  Nathan Sidwell  <nathan@acm.org>
9296         * doc/extend.texi (Deprecated Features): Remove
9297         -ffriend-injection.
9298         (Backwards Compatibility): Likewise.
9299         * doc/invoke.texi (C++ Language Options): Likewise.
9300         (C++ Dialect Options): Likewise.
9302 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
9304         PR target/85530
9305         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9306         _mm512_mask_mullox_epi64): New intrinsics.
9308 2018-05-03  Tom de Vries  <tom@codesourcery.com>
9310         PR testsuite/85106
9311         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9312         dump files): Add offload-tree.
9314 2018-05-03  Richard Biener  <rguenther@suse.de>
9316         PR tree-optimization/85615
9317         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9318         to loops not nested in BBs loop father to avoid creating multi-entry
9319         loops.
9321 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9323         PR tree-optimization/70291
9324         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9325         arguments.  Change return type to tree.  Emit libcall as a new
9326         statement rather than replacing existing one when inplace_p is true.
9327         (expand_complex_multiplication_components): New function.
9328         (expand_complex_multiplication): Expand floating-point complex
9329         multiplication using the above.
9330         (expand_complex_division): Rename inner_type parameter to type.
9331         Update expand_complex_libcall call-site.
9332         (expand_complex_operations_1): Update expand_complex_multiplication
9333         and expand_complex_division call-sites.
9335 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9337         PR target/85582
9338         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9339         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9340         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9341         the highest significant bit of the shift count mask is clear.  In
9342         check whether and[sq]i3 is needed verify that all significant bits
9343         of the shift count other than the highest are set.
9345 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9347         PR libgomp/82428
9348         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9349         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9350         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9351         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9352         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9353         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9354         __builtin_goacc_parlevel_size.
9356 2018-05-02  Richard Biener  <rguenther@suse.de>
9358         PR tree-optimization/85597
9359         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9360         do not use split vect_get_vec_defs call but call vect_get_slp_defs
9361         directly.
9363 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9365         PR testsuite/85106
9366         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9367         dump files): Add ltrans-tree.
9369 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9371         PR testsuite/85106
9372         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9373         dump files): Add wpa-ipa.
9375 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
9377         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
9378         powerpc*-*-linux*paired* target.
9379         * config/rs6000/750cl.h: Delete.
9380         * config/rs6000/paired.h: Delete.
9381         * config/rs6000/paired.md: Delete.
9382         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9383         float support.
9384         * config/rs6000/rs6000-builtin.def: Remove paired float support.
9385         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9386         comment.  Remove paired float support.
9387         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9388         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9389         VECTOR_PAIRED.
9390         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9391         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9392         declarations.
9393         * config/rs6000/rs6000.c: Remove paired float support.
9394         (paired_expand_vector_init, paired_expand_vector_move,
9395         paired_emit_vector_compare, paired_emit_vector_cond_expr,
9396         (paired_expand_lv_builtin, paired_expand_stv_builtin,
9397         paired_expand_builtin, paired_expand_predicate_builtin,
9398         paired_init_builtins): Delete.
9399         * config/rs6000/rs6000.h: Remove paired float support.
9400         * config/rs6000/rs6000.md: Remove paired float support.
9401         (move_from_CR_ov_bit): Delete.
9402         * config/rs6000/rs6000.opt (mpaired): Delete.
9403         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9404         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9406 2018-05-02  Richard Biener  <rguenther@suse.de>
9408         PR middle-end/85567
9409         * gimplify.c (gimplify_save_expr): When in SSA form allow
9410         SAVE_EXPRs to compute to SSA vars.
9412 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9414         PR target/85582
9415         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9416         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9417         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9418         clobber operands[2], instead use a new pseudo.  Formatting fixes.
9420 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
9422         PR tree-optimization/85586
9423         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9424         exit early for statements in the same group if the accesses are
9425         not strided.
9427 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9429         PR lto/85451
9430         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9431         error message.
9433 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
9435         PR tree-optimization/85143
9436         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9438 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9440         PR lto/85451
9441         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9442         not found" error message.
9444 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9446         PR other/83786
9447         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9448         * vec.c (test_ordered_remove_if): New function.
9449         (vec_c_tests): Call test_ordered_remove_if.
9450         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9451         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9452         * tree-vect-patterns.c (vect_pattern_recog_1): Use
9453         VEC_ORDERED_REMOVE_IF.
9455 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9457         PR tree-optimization/82665
9458         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9459         pointer subtraction where arguments come from a memchr call.
9461 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
9463         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9464         --push-state --as-needed and --pop-state instead of --as-needed and
9465         --no-as-needed if ld supports it.
9466         * configure: Regenerated.
9468         PR web/85578
9469         * doc/install.texi2html: Replace _002d with - and _002a with * in
9470         generated html files using sed.
9472 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9474         PR c++/85523
9475         * gcc-rich-location.c (blank_line_before_p): New function.
9476         (use_new_line): New function.
9477         (gcc_rich_location::add_fixit_insert_formatted): New function.
9478         * gcc-rich-location.h
9479         (gcc_rich_location::add_fixit_insert_formatted): New function.
9481 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9483         * selftest.c (assert_streq): Rename "expected" and "actual" to
9484         "val1" and "val2".  Extend NULL-handling to cover both inputs
9485         symmetrically, while still requiring both to be non-NULL for a pass.
9486         * selftest.h (assert_streq): Rename "expected" and "actual" to
9487         "val1" and "val2".
9488         (ASSERT_EQ): Likewise.
9489         (ASSERT_EQ_AT): Likewise.
9490         (ASSERT_KNOWN_EQ): Likewise.
9491         (ASSERT_KNOWN_EQ_AT): Likewise.
9492         (ASSERT_NE): Likewise.
9493         (ASSERT_MAYBE_NE): Likewise.
9494         (ASSERT_MAYBE_NE_AT): Likewise.
9495         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
9496         the assertion to pass.
9497         (ASSERT_STREQ_AT): Likewise.
9499 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9501         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9502         interaction with -pie.
9504 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9506         * selftest.h: Fix alphabetization of per-source-file selftest
9507         declarations.
9509 2018-04-30  Jason Merrill  <jason@redhat.com>
9511         PR c++/61982 - dead stores to destroyed objects.
9512         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9513         of clobber.
9515 2018-04-30  Jason Merrill  <jason@redhat.com>
9517         * tree.c (build_clobber): New.
9518         * tree.h: Declare it.
9519         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9521 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9523         * diagnostic-show-locus.c (layout::layout): Update for
9524         location_get_source_line returning a char_span.
9525         (struct char_span): Move to input.h.
9526         (struct correction): Update for fields in char_span becoming
9527         private.
9528         (struct source_line): Update for location_get_source_line
9529         returning a char_span.
9530         (layout::print_line): Likewise.
9531         * edit-context.c (edited_file::print_content): Likewise.
9532         (edited_file::print_diff_hunk): Likewise.
9533         (edited_file::print_run_of_changed_lines): Likewise.
9534         (edited_file::get_num_lines): Likewise.
9535         (edited_line::edited_line): Likewise.
9536         * final.c (asm_show_source): Likewise.
9537         * input.c (location_get_source_line): Convert return type
9538         from const char * to char_span, losing the final "line_len"
9539         param.
9540         (dump_location_info): Update for the above.
9541         (get_substring_ranges_for_loc): Likewise.  Use a char_span
9542         when handling the literal within the line.
9543         (test_reading_source_line): Update for location_get_source_line
9544         returning a char_span.
9545         * input.h (class char_span): Move here from
9546         diagnostic-show-locus.c, converting from a struct to a class.
9547         Make data members private.
9548         (char_span::operator bool): New.
9549         (char_span::length): New.
9550         (char_span::get_buffer): New.
9551         (char_span::operator[]): New.
9552         (char_span::subspan): Make const.
9553         (char_span::xstrdup): New.
9554         (location_get_source_line): Convert return type from const char *
9555         to char_span, losing the final "line_size" param.
9557 2018-04-30  Jan Hubicka  <jh@suse.cz>
9559         * lto-wrapper.c (ltrans_priorities): New static var.
9560         (cmp_priority): New.
9561         (run_gcc): Read priorities and if doing parallel build order
9562         the Makefile by them.
9564 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9566         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9568 2018-04-30  Richard Biener  <rguenther@suse.de>
9570         * tree-cfg.c (verify_address): Remove base argument, add
9571         flag whether to check TREE_ADDRESSABLE and do that.
9572         (verify_expr): Remove.
9573         (verify_types_in_gimple_reference): Add pieces from verify_expr.
9574         (verify_gimple_assign_single): Likewise.
9575         (verify_gimple_switch): Likewise.
9576         (verify_expr_location_1): Dereference tp once.  Add (disabled)
9577         piece from verify_expr.
9578         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9580 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9582         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9584 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9586         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9587         (small_data_pattern): Likewise.
9588         (arc_rewrite_small_data): Likewise.
9589         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9590         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9591         (get_symbol_alignment): New function.
9592         (legitimate_small_data_address_p): Likewise.
9593         (legitimate_scaled_address): Update, call
9594         legitimate_small_data_address_p.
9595         (output_sdata): New static variable.
9596         (arc_print_operand): Update how we handle small data operands.
9597         (arc_print_operand_address): Likewise.
9598         (arc_legitimate_address_p): Update, use
9599         legitimate_small_data_address_p.
9600         (arc_rewrite_small_data_p): Remove.
9601         (arc_rewrite_small_data_1): Likewise.
9602         (arc_rewrite_small_data): Likewise.
9603         (small_data_pattern): Likewise.
9604         (compact_sda_memory_operand): Update to use
9605         legitimate_small_data_address_p and get_symbol_alignment.
9606         (prepare_move_operands): Don't rewite sdata pattern.
9607         (prepare_extend_operands): Remove.
9608         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9609         pattern.
9610         (zero_extendqisi2): Likewise.
9611         (zero_extendhisi2): Likewise.
9612         (extendqihi2): Likewise.
9613         (extendqisi2): Likewise.
9614         (extendhisi2): Likewise.
9615         (addsi3): Likewise.
9616         (subsi3): Likewise.
9617         (andsi3): Likewise.
9618         * config/arc/constraints.md (Usd): Change it to memory constraint.
9620 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9622         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9623         as source of std instructions.
9624         * config/arc/arc.md (movsi_insn): Update pattern predicate to
9625         allow 6-bit constants as source for store instructions.
9626         (movdi_insn): Update instruction pattern to allow 6-bit constants
9627         as source for store instructions.
9629 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9631         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9633 2018-04-30  Nathan Sidwell  <nathan@acm.org>
9634             Sandra Loosemore <sandra@codesourcery.com>
9636         * dumpfile.c (dump_open): Allow '-' for stdout.
9637         * doc/invoke.texi (Developer Options): Document dump filename
9638         determination early.  Document stdin/stdout selection.
9640 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
9642         Microblaze Target: PIC data text relative
9644         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9645         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9646         Add declaration.
9647         * config/microblaze/microblaze.h (microblaze_constant_address_p):
9648         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9649         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9650         New addressing mode for data-text relative position indepenedent code.
9651         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9652         'ADDRESS_SYMBOLIC_TXT_REL'.
9653         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9654         (microblaze_legitimate_pic_operand): Exclude function calls from
9655         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9656         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9657         addresses cases.
9658         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9659         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9660         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9661         for 'address + offset'.
9662         (microblaze_expand_prologue): Add new function prologue call for
9663         'r20' assignation.
9664         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9665         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9666         table in case of TARGET_PIC_DATA_TEXT_REL.
9667         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9668         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9669         Add new macros 'UNSPEC_TEXT',
9670         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9671         + exclude function calls from 'UNSPEC_PLT' in case of data text
9672         relative mode.
9673         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9674         new target hook for generating address diff vector tables in case of
9675         flag_pic.
9676         * doc/tm.texi : Regenerate.
9677         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9678         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9679         of addr diff vector generation.
9680         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9681         target hook definition.
9682         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9683         Add default function for generate_pic_addr_diff_vec -> flag_pic.
9684         * doc/invoke.texi (Add new pic option): Add new microblaze pic
9685         option for data text relative.
9687 2018-04-30  Richard Biener  <rguenther@suse.de>
9689         * tree-chrec.h (evolution_function_is_constant_p): Remove
9690         redundant check.
9691         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9693 2018-04-30  Richard Biener  <rguenther@suse.de>
9695         PR bootstrap/85571
9696         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9698 2018-04-30  Richard Biener  <rguenther@suse.de>
9700         PR tree-optimization/28364
9701         PR tree-optimization/85275
9702         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9703         copying first exit test.
9705 2018-04-28  Mark Wielaard  <mark@klomp.org>
9707         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9708         dwarf_version >= 5.
9709         (dwarf_AT): Handle DW_AT_addr_base.
9710         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9712 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9714         PR target/84431
9715         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9716         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9717         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9718         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9720 2018-04-28  Richard Biener  <rguenther@suse.de>
9722         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9723         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9724         to reflect use.  Only add interesting stmts.
9726 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9728         PR ipa/85549
9729         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9730         the jump function allows for passing through aggregate values.
9732 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9734         * input.h (in_system_header_at): Convert from macro to inline
9735         function.
9736         (from_macro_expansion_at): Likewise.
9737         (from_macro_definition_at): Likewise.
9739 2018-04-27  Jeff Law  <law@redhat.com>
9741         * config.gcc: Mark tile* targets as deprecated/obsolete.
9743 2018-04-27  Richard Biener  <rguenther@suse.de>
9745         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9746         fix for ILP32.
9748 2018-04-27  Richard Biener  <rguenther@suse.de>
9750         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9752 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9754         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9755         with Yd constraint. Set "preferred_for_speed" attribute from
9756         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9757         with Yd constraint.
9758         (*movdi_internal): Ditto.
9759         (movti_interunit splitters): Remove
9760         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9761         (movdi_interunit splitters): Ditto.
9762         * config/i386/constraints.md (Ye): Remove.
9763         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9765 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9767         PR target/85512
9768         * config/aarch64/constraints.md (Usg): Limit to 31.
9769         (Usj): Limit to 63.
9771 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9773         PR tree-optimization/85529
9774         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9775         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9776         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9777         zero extension or masking of the MSB bit.
9778         (optimize_range_tests): Add FIRST_BB argument, pass it through
9779         to optimize_range_tests_var_bound.
9780         (maybe_optimize_range_tests, reassociate_bb): Adjust
9781         optimize_range_tests callers.
9783 2018-04-26  Richard Biener  <rguenther@suse.de>
9784             Jakub Jelinek  <jakub@redhat.com>
9786         * cgraph.h (symbol_table): Just declare debug method here.
9787         * symtab.c (symbol_table::debug): Define.
9789 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9791         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9793 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9795         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9796         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9797         (*movdi_internal): Substitute Yi and Yj constraint with x
9798         and Ym and Yn constraint with y constraint.  Update "isa"
9799         attribute and set "preferred_for_speed" attribute from
9800         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9801         (*movsi_internal): Ditto.
9802         (*movdf_internal): Ditto.
9803         (*movsf_internal): Ditto.
9804         (*zero_extendsidi2): Ditto.
9805         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9806         (sse2_loadld): Ditto.
9807         (*vec_extract<ssevecmodelower>_0): Ditto.
9808         (*vec_extractv4si_0_zext_sse4): Ditto.
9809         (vec_concatv2di): Ditto.
9810         (*vec_dup<mode>): Ditto.
9811         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9812         * config/i386/constraints.md (Yi): Remove.
9813         (Yj): Remove.
9814         (Ym): Remove.
9815         (Yn): Remove.
9817 2018-04-26  Nathan Sidwell  <nathan@acm.org>
9819         * dumpfile.c (dump_open): New.
9820         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9821         (dump_finish): Detect stdio/stderr by value not name.
9823 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
9825         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9827 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9829         PR target/84952
9830         * config/nvptx/nvptx.c (verify_neutering_jumps)
9831         (verify_neutering_labels): New function
9832         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9834 2018-04-26  Tom de Vries  <tom@codesourcery.com>
9836         PR target/84025
9837         * config/nvptx/nvptx.c (needs_neutering_p): New function.
9838         (nvptx_single): Use needs_neutering_p to skip over insns that do not
9839         need neutering.
9841 2018-04-26  Richard Biener <rguenther@suse.de>
9842             Tom de Vries  <tom@codesourcery.com>
9844         PR lto/85422
9845         * lto-streamer-out.c (output_function): Fixup loops if required to match
9846         discovery done in the reader.
9848 2018-04-26  Richard Biener  <rguenther@suse.de>
9850         PR tree-optimization/85116
9851         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9852         have a loop exit from the single latch predecessor.  Remove
9853         case of header with just condition.
9854         (ch_base::copy_headers): Exclude infinite loops from any
9855         processing.
9856         (pass_ch::execute): Record exits.
9858 2018-04-26  Richard Biener  <rguenther@suse.de>
9860         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9861         prologue cost vector and pass it to vect_get_load_cost.
9862         (vect_get_peeling_costs_all_drs): Likewise.
9863         (vect_peeling_hash_get_lowest_cost): Likewise.
9864         (vect_enhance_data_refs_alignment): Likewise.
9866 2018-04-26  Richard Biener  <rguenther@suse.de>
9868         PR middle-end/85450
9869         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9870         checking of integer<->pointer conversions.
9871         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9872         sign-/zero-extending pointer types.
9873         (expand_omp_for_static_chunk): Likewise.
9875 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
9876             Jean Lee  <xiaoyur347@gmail.com>
9878         * config/mips/mips.c (mips_asan_shadow_offset): New function.
9879         (TARGET_ASAN_SHADOW_OFFSET): Define.
9880         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9881         true for -fsanitize=address.
9883 2018-04-25  Mark Wielaard  <mark@klomp.org>
9885         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9886         shorter ones.
9888 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9890         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9891         than "alu", remove explicit "memory" and "imm_disp" attributes.
9892         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9894         PR middle-end/85414
9895         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9896         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9897         gen_lowpart_no_emit.
9899 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
9901         PR target/85473
9902         * config/i386/i386.c (ix86_expand_builtin): Change memory
9903         operand to XI, extend p0 to Pmode.
9904         * config/i386/i386.md: Change unspec volatile and operand
9905         1 mode to XI, change operand 0 mode to P.
9907 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9909         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9910         GET_MODE_MASK before any checking.
9911         (nds32_can_use_bset_p): Likewise.
9912         (nds32_can_use_btgl_p): Likewise.
9914 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9916         * config/nds32/nds32-doubleword.md: New define_split pattern for
9917         illegal register number.
9919 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9921         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9923 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
9925         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9927 2018-04-25  Richard Biener  <rguenther@suse.de>
9929         * lto-streamer.h (LTO_major_version): Bump to 8.
9931 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
9933         * BASE-VER: Set to 9.0.0.
9935 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
9937         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9938         in __abskf2 and __powikf2.
9940 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9942         PR target/85512
9943         * config/aarch64/constraints.md (Usg, Usj): New constraints.
9944         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9945         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9946         Use the above on operand 2.  Reindent.
9947         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9949 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9951         PR target/85485
9952         * common/config/i386/i386-common.c (ix86_handle_option): Don't
9953         handle OPT_mcet.
9954         * config/i386/i386.opt (mcet): Removed.
9955         * doc/install.texi: Remove -mcet documentation.
9956         * doc/invoke.texi: Likewise.
9958 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
9960         PR target/85485
9961         * doc/install.texi: Remove -mcet from bootstrap-cet.
9963 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9965         PR target/85511
9966         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9967         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9968         if TARGET_64BIT.
9970         PR target/85503
9971         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9972         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9973         containing a CONST_VECTOR.
9975 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
9977         * doc/install.texi: Update newlib dependency for nvptx.
9979 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9981         PR target/85508
9982         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9983         instead of INTVAL when shifting x left.
9985 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
9987         PR tree-optimization/85478
9988         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
9989         vect_grouped_store_supported for single element vectors.
9991 2018-04-24  Richard Biener  <rguenther@suse.de>
9993         PR target/85491
9994         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
9995         load cost increase to the case of non-constant step.
9997 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
9999         PR target/84828
10000         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10001         destination if any_malformed_asm.
10003 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10005         PR middle-end/85496
10006         * expr.c (store_field): In the bitfield case, if the value comes from
10007         a function call and is returned in registers by means of a PARALLEL,
10008         do not change the mode of the temporary unless BLKmode and VOIDmode.
10010 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
10012         PR rtl-optimization/85423
10013         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10014         dependencies to debug insns when the previous insn is non-debug.
10016 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10018         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10019         enums into a single definition.
10020         (fls): Fix predicates and printing.
10021         (seti): Likewise.
10023 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10025         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10026         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10027         and short u6 immediate.
10028         (check_if_valid_sleep_operand): Remove.
10029         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10031 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10033         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10034         flag_always_save_lp condition.
10035         * config/nds32/nds32.opt (malways-save-lp): New option.
10037 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10039         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10040         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10041         * config/nds32/nds32.h
10042         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10043         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10045 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10047         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10048         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10050 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10051             Chung-Ju Wu  <jasonwucj@gmail.com>
10053         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10054         Declare.
10055         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10056         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10058 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10060         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10062 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10064         * config/nds32/nds32-protos.h (nds32_data_alignment,
10065         nds32_local_alignment): Declare.
10066         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10067         nds32_local_alignment): New functions.
10068         (TARGET_CONSTANT_ALIGNMENT): Define.
10069         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10071 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10073         * config/nds32/nds32.c
10074         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10075         (TARGET_MODES_TIEABLE_P): Likewise.
10077 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10079         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10080         level Ofast and Og.
10082 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
10083             Chung-Ju Wu  <jasonwucj@gmail.com>
10085         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10086         for unaligned access.
10087         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10088         unaligned access.
10089         * config/nds32/nds32-intrinsic.md: Likewise.
10090         * config/nds32/nds32_intrinsic.h: Likewise.
10091         * config/nds32/nds32.h (nds32_builtins): Likewise.
10092         * config/nds32/nds32.opt (munaligned-access): New option.
10093         * config/nds32/nds32.c (nds32_asm_file_start): Display
10094         flag_unaligned_access status.
10096 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10098         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10099         -mno-relax is present.
10100         * config/riscv/linux.h (LINK_SPEC): Ditto.
10102 2018-04-20  Martin Sebor  <msebor@redhat.com>
10104         PR c/85365
10105         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10106         for null pointers.
10107         (gimple_fold_builtin_stxcpy_chk): Same.
10108         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10110 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
10112         PR target/85456
10113         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10114         __powikf2 when long double is IEEE 128-bit.
10116 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10118         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10119         step to make sure stack always aligned.
10121 2018-04-20  Carl Love  <cel@us.ibm.com>
10123         PR target/83402
10124         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10125         size check for arg0.
10127 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10128             Tom de Vries  <tom@codesourcery.com>
10130         PR target/85445
10131         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10132         Emit insns for calls too.
10133         (nvptx_find_par): Always look for worker-level predecessor insn.
10134         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
10135         calls.
10136         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10137         (nvptx_process_pars): Propagate frames for calls.
10139 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
10141         PR target/85469
10142         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10143         Removed.
10144         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10145         (ix86_handle_option): Don't handle OPT_mibt.
10146         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10147         __SHSTK__.
10148         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10149         has_ibt and ibt.
10150         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10151         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10152         (ix86_target_macros): Define __CET__ with flag_cf_protection
10153         for -fcf-protection.
10154         * config/i386/i386.c (isa2_opts): Remove -mibt.
10155         * config/i386/i386.h (TARGET_IBT): Removed.
10156         (TARGET_IBT_P): Likewise.
10157         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10158         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10159         * config/i386/i386.opt (mcet): Update help message.
10160         (mshstk): Likewise.
10161         (mibt): Removed.
10162         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
10163         -mcet as an alias for -mshstk.
10165 2018-04-20  Richard Biener <rguenther@suse.de>
10167         PR middle-end/85475
10168         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10169         complexity by forcing a single use of the multiply operand.
10171 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10173         ipa/85449
10174         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10175         recursion dependency to only apply to non-clones.
10177 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10179         ipa/85447
10180         * ipa-cp.c (create_specialized_node): Check that clones of
10181         self-recursive edges exist during IPA-CP.
10183 2018-04-19  Toon Moene  <toon@moene.org>
10185         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10186         by -O3.
10188 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10190         PR tree-optimization/85467
10191         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10192         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
10193         VECTOR_CST element to type.
10195 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10197         PR target/85397
10198         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10199         * config/i386/i386.md (builtin_setjmp_setup): Removed.
10200         (builtin_longjmp): Likewise.
10201         (save_stack_nonlocal): New pattern.
10202         (restore_stack_nonlocal): Likewise.
10204 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10206         PR target/85404
10207         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10208         Replace ASM_OUTPUT_LABEL with fprintf.
10210 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10212         PR target/85417
10213         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10214         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10215         * config/i386/i386-c.c (ix86_target_macros_internal): Also
10216         define __IBT__ and __SHSTK__ for -fcf-protection.
10217         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10218         TARGET_IBT.
10219         (ix86_trampoline_init): Likewise.
10220         (x86_output_mi_thunk): Likewise.
10221         (ix86_notrack_prefixed_insn_p): Likewise.
10222         (ix86_option_override_internal): Don't disallow -fcf-protection.
10223         * config/i386/i386.md (rdssp<mode>): Also enable for
10224         -fcf-protection.
10225         (incssp<mode>): Likewise.
10226         (nop_endbr): Likewise.
10227         * config/i386/i386.opt (mcet): Change help message to built-in
10228         functions only.
10229         (mibt): Likewise.
10230         (mshstk): Likewise.
10231         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10232         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
10233         enable CET built-in functions.
10235 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
10237         * common/config/i386/i386-common.c
10238         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10239         OPTION_MASK_ISA_MOVDIRI_UNSET,
10240         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10241         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10242         * config.gcc (movdirintrin.h): New header.
10243         * config/i386/cpuid.h (bit_MOVDIRI,
10244         bit_MOVDIR64B): New bits.
10245         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10246         and -mmvodir64b.
10247         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10248         (VOID, PVOID, PCVOID)): New function types.
10249         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10250         __builtin_ia32_directstoreu_u64,
10251         __builtin_ia32_movdir64b): New builtins.
10252         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10253         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10254         and -mmovdiri.
10255         (ix86_valid_target_attribute_inner_p): Ditto.
10256         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10257         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10258         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10259         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10260         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10261         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10262         (movdiri<mode>, movdir64b_<mode>): New.
10263         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10264         * config/i386/immintrin.h: Include movdirintrin.h.
10265         * config/i386/movdirintrin.h: New file.
10266         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10268 2018-04-19  Richard Biener  <rguenther@suse.de>
10270         PR middle-end/85455
10271         * cfg.c (clear_bb_flags): When loop state says we have
10272         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10274 2018-04-19  Richard Biener  <rguenther@suse.de>
10276         PR tree-optimization/84737
10277         * tree-vect-data-refs.c (vect_copy_ref_info): New function
10278         copying restrict info.
10279         (vect_setup_realignment): Use it.
10280         * tree-vectorizer.h (vect_copy_ref_info): Declare.
10281         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10282         the first DR to all generated stores.
10283         (vectorizable_load): Likewise for loads.
10285 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10287         PR tree-optimization/85446
10288         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10289         the integral and pointer types to have the same precision.
10291         * doc/install.texi: Document --disable-cet being the default and
10292         --enable-cet=auto.
10294 2018-04-18  Martin Liska  <mliska@suse.cz>
10296         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10297         style.
10299 2018-04-18  Martin Liska  <mliska@suse.cz>
10301         Revert
10302         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10304         PR ipa/83983
10305         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10306         arguments if they are comparable.
10308 2018-04-18  Martin Liska  <mliska@suse.cz>
10310         Revert
10311         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10313         PR lto/84805
10314         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10315         incomplete types.
10317 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
10319         PR target/85388
10320         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10321         ENDBR after calling __morestack.
10323 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
10325         PR jit/85384
10326         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10327         by using gcc_base_ver to generate a gcc_driver_version, and use
10328         it when generating GCC_DRIVER_NAME.
10329         * configure: Regenerate.
10331 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
10333         PR target/81084
10334         * config.gcc: Obsolete powerpc*-*-*spe*.
10336 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10338         PR debug/84637
10339         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10340         (stabstr_D): Change type of unum from unsigned int to
10341         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
10342         type.
10344 2018-04-17  Jim Wilson  <jimw@sifive.com>
10346         PR 84856
10347         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10348         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10349         Set arg_pointer_offset after using pretend_args_size.
10351 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10353         PR rtl-optimization/85431
10354         * dse.c (record_store): Ignore zero width stores.
10356         PR sanitizer/85230
10357         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
10358         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10359         __builtin_stack_restore rather than after it.
10360         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10361         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10362         argument instead of virtual_dynamic_stack_rtx.
10364 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10366         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10367         New prototype.
10368         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10369         Add note to error message to explain internal mapping of overloaded
10370         built-in function name to non-overloaded built-in function name.
10371         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10372         function.
10374 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10376         PR target/85424
10377         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10378         where the inputs overlap with the output.
10380 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10382         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10383         (=v, v) alternative and explicit "memory" attribute.
10384         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
10385         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10386         attributes.
10387         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10388         "sselog1" type instead of "sselog".
10389         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10390         "sselog".  Remove explicit "memory" attribute.
10391         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10392         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10393         attributes.
10394         (vec_extract_hi_v32hi): Merge all alternatives into one, use
10395         "sselog1" type instead of "sselog".  Remove explicit "memory"
10396         attribute.
10397         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10398         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10399         attribute.
10400         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10401         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10402         attributes.
10403         (vec_extract_hi_v64qi): Merge all alternatives into one, use
10404         "sselog1" type instead of "sselog".  Remove explicit "memory"
10405         attribute.
10406         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10407         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10408         attribute.
10410         PR target/85430
10411         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10413         PR middle-end/85414
10414         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10415         on a SUBREG.
10417 2018-04-17  Martin Jambor  <mjambor@suse.cz>
10419         PR ipa/85421
10420         * ipa-cp.c (create_specialized_node): Call
10421         expand_all_artificial_thunks if necessary.
10423 2018-04-17  Martin Liska  <mliska@suse.cz>
10425         PR lto/85405
10426         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10427         in message, remote space in between '_G' and '('.
10429 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10431         PR target/85281
10432         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10433         avx512f_vmcmp<mode>3<round_saeonly_name>,
10434         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10435         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10436         avx512f_rndscale<mode><round_saeonly_name>,
10437         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10438         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10439         Use %<iptr>2 instead of %2 for -masm=intel.
10440         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10441         avx512f_vcvttss2usi<round_saeonly_name>,
10442         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10443         -masm=intel.
10444         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10445         avx512f_vcvttsd2usi<round_saeonly_name>,
10446         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10447         Use %q1 instead of %1 for -masm=intel.
10448         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10449         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10450         of %3 for -masm=intel.
10451         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10452         -masm=intel.
10453         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10454         -masm=intel.
10455         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10456         -masm=intel.
10457         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10458         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10459         %g1.
10460         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10461         -masm=intel.
10462         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10463         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10464         %g1 and one with %0 and %1.
10465         (avx512er_vmrcp28<mode><round_saeonly_name>,
10466         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10467         %1 for -masm=intel.
10468         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10469         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10470         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10471         of %0 and %{%4%} for -masm=intel.
10472         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10473         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10474         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10475         order of %0 and %{%5%}%{z%} for -masm=intel.
10477 2018-04-17  Jan Hubicka  <jh@suse.cz>
10479         PR lto/85405
10480         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10482 2018-04-17  Martin Liska  <mliska@suse.cz>
10484         PR ipa/85329
10485         * multiple_target.c (create_dispatcher_calls): Set apostrophes
10486         for target_clone error message.  Make default implementation
10487         clone to be a local declaration.
10488         (separate_attrs): Add new argument and check for an empty
10489         string.
10490         (expand_target_clones): Handle it.
10491         (ipa_target_clone): Make redirection just for target_clones
10492         functions.
10494 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
10495             Tom de Vries  <tom@codesourcery.com>
10497         PR middle-end/84955
10498         * omp-expand.c (expand_oacc_for): Add dummy false branch for
10499         tiled basic blocks without omp continue statements.
10501 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
10503         PR target/83660
10504         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10505         vec_extract expression as having side effects to make sure it gets
10506         a cleanup point.
10508 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
10510         PR target/85403
10511         * config/i386/i386.c (get_builtin_code_for_version): Check
10512         error_mark_node.
10514 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
10516         PR target/84331
10517         * config.gcc: Support "skylake".
10518         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10519         PROCESSOR_SKYLAKE.
10520         * config/i386/i386.c (m_SKYLAKE): Define.
10521         (processor_target_table): Add "skylake".
10522         (ix86_option_override_internal): Add "skylake".
10523         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10524         PROCESSOR_CANNONLAKE.
10525         (get_builtin_code_for_version): Fix priority for
10526         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10527         PROCESSOR_SKYLAKE-AVX512.
10528         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10529         (processor_type): Add PROCESSOR_SKYLAKE.
10531 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
10532             Jason Merrill  <jason@redhat.com>
10534         PR c++/85112
10535         * convert.c (convert_to_integer_1): Use direct recursion for
10536         enumeral types and types with a precision less than the number
10537         of bits in their mode.
10539 2018-04-16  Julia Koval  <julia.koval@intel.com>
10541         PR target/84413
10542         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10543         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10545 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
10547         PR target/85293
10548         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10549         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10550         and -mno-direct-move.
10552 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
10554         PR target/83402
10555         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10556         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10557         Ensure negative shifts result in {0}.
10559 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
10561         PR rtl-optimization/79916
10562         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10563         regs (if any) to define how to gnerate SD moves when LRA is in
10564         progress.
10566 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
10568         PR rtl-optimization/85393
10569         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10570         * except.c (expand_dw2_landing_pad_for_region): Make static.
10571         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10572         a label and unconditional jump to old_bb, rather than
10573         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10574         basic block.
10576         PR rtl-optimization/85376
10577         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10578         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10579         instead of a specific value.
10581 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10582             Bin Cheng  <bin.cheng@arm.com>
10584         PR tree-optimization/82965
10585         PR tree-optimization/83991
10586         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10587         by_profile_only parameter.
10588         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10589         information if the loop was predicted to iterate too many times.
10590         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10592 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10594         PR lto/71991
10595         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10596         always inline.
10598 2018-04-13  Martin Liska  <mliska@suse.cz>
10599             Jakub Jelinek  <jakub@redhat.com>
10601         PR middle-end/81657
10602         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10603         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10604         * builtins.c (expand_builtin_memory_copy_args): Use
10605         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10606         handle dest_addr == pc_rtx.
10608 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
10610         PR target/85291
10611         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10612         asked to not generate direct moves.
10613         (fix_trunc<mode>si2_stfiwx): Similar.
10614         (fix_trunc<mode>si2_internal): Similar.
10616 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10618         PR debug/83157
10619         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10620         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10621         lookup if dest in some wider mode is known to be const0_rtx and
10622         if so, record permanent equivalence for it to be ZERO_EXTEND of
10623         the narrower mode destination.
10625 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10627         * lto-streamer-out.c (output_function): Revert 259346.
10628         * omp-expand.c (expand_oacc_for): Likewise.
10630 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
10632         PR rtl-optimization/85354
10633         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10634         * sel-sched.c (sel_global_init): ... here.
10636 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
10638         PR target/85238
10639         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10640         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10641         mode for PE-COFF targets.
10642         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10643         (i386_pe_asm_lto_end): Likewise.
10644         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10645         (TARGET_ASM_LTO_END): Likewise.
10646         * config/i386/winnt.c (saved_debug_info_level): New static variable.
10647         (i386_pe_asm_lto_start): New function.
10648         (i386_pe_asm_lto_end): Likewise.
10650 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10651             Richard Biener  <rguenther@suse.de>
10653         PR middle-end/84955
10654         * lto-streamer-out.c (output_function): Fix CFG loop state before
10655         streaming out.
10656         * omp-expand.c (expand_oacc_for): Handle calls to internal
10657         functions like regular functions.
10659 2018-04-12  Richard Biener  <rguenther@suse.de>
10661         PR lto/85371
10662         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10663         for the early LTO debug to properly generate references to it
10664         during DIE emission.  Do not re-use that for the skeleton for
10665         split-dwarf.
10666         (dwarf2out_early_finish): Likewise.
10668 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10670         PR target/85328
10671         * config/i386/sse.md
10672         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10673         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10674         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10675         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10676         and output is a reg, avoid creating invalid lowpart subreg, but
10677         instead split into a 512-bit move.  Don't split if not AVX512VL,
10678         input is xmm16+ reg and output is a mem.
10679         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10680         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10681         xmm16+ reg and output is a mem.
10683 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10685         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10686         also for flag_dwarf2_cfi_asm.
10688 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10690         PR rtl-optimization/85342
10691         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10692         a bool scalar var inside of the loop instead.  Don't try to update
10693         recog_data.operand after failed apply_change_group.
10695 2018-04-12  Tom de Vries  <tom@codesourcery.com>
10697         PR target/85296
10698         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10699         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
10700         array with flexible array member as array without given dimension.
10701         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10702         argument for undefined param to true.
10704 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10706         PR target/85321
10707         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10708         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10709         from PowerPC section.
10710         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10711         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10712         help text that is too long.
10713         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10714         help text that is too long.
10715         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10716         help text that is too long.
10718 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10720         * config/alpha/alpha.md (stack_probe_internal): Rename
10721         from "probe_stack".  Update all callers.
10723 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10725         PR rtl-optimization/84566
10726         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10727         sched_macro_fuse_insns.
10729 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10731         PR target/84301
10732         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10733         (compute_block_dependences): ... from here.
10735 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10737         PR tree-optimization/85331
10738         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10739         from int to HOST_WIDE_INT.
10741 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10743         PR ipa/84149
10744         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10745         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10746         not the same as the source val.
10747         (cgraph_edge_brings_value_p): New parameter.
10748         (gather_edges_for_value): Pass destination value to
10749         cgraph_edge_brings_value_p.
10750         (perhaps_add_new_callers): Likewise.
10751         (get_info_about_necessary_edges): Likewise and exclude values brought
10752         only by self-recursive edges.
10753         (create_specialized_node): Redirect only clones of self-calling edges.
10754         (+self_recursive_pass_through_p): New function.
10755         (find_more_scalar_values_for_callers_subset): Use it.
10756         (find_aggregate_values_for_callers_subset): Likewise.
10757         (known_aggs_to_agg_replacement_list): Removed.
10758         (decide_whether_version_node): Re-calculate known constants for all
10759         remaining context clones.
10761 2018-04-11  Richard Biener  <rguenther@suse.de>
10763         PR lto/85339
10764         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10765         from early DWARF output.
10766         (dwarf2out_early_finish): Output line info unconditionally into
10767         early DWARF and add reference to it.
10769 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10771         PR target/85281
10772         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10773         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10774         other than V2DFmode using iptr mode attribute.
10775         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10777 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10779         PR rtl-optimization/84659
10780         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10782 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10784         PR debug/85302
10785         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10786         SIZEP is NULL.
10787         (output_loc_list): Pass address of a dummy size variable even in the
10788         locview handling loop.
10789         (index_location_lists): Add comment on why skip_loc_list_entry can't
10790         call size_of_locs.
10792 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10794         PR target/85261
10795         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10796         into register.
10798 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10800         PR target/85321
10801         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10802         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10803         and -mstring-compare-inline-limit.
10805 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10807         PR target/85287
10808         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10809         for stack clash protection in a register whenever we need it to be in
10810         a register.
10812 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10814         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10815         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10817 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10819         PR target/85321
10820         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10821         the help text.
10822         (mlong-double-): Ditto.
10823         * config/rs6000/sysv4.opt (msdata=): Ditto.
10824         (mtls-size=): Ditto.
10826 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10828         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10829         erroneous entries for
10830         "vector int vec_ldl (int, long int *)", and
10831         "vector unsigned int vec_ldl (int, unsigned long int *)".
10832         Add comments and entries for
10833         "vector bool char vec_ldl (int, bool char *)",
10834         "vector bool short vec_ldl (int, bool short *)",
10835         "vector bool int vec_ldl (int, bool int *)",
10836         "vector bool long long vec_ldl (int, bool long long *)",
10837         "vector pixel vec_ldl (int, pixel *)",
10838         "vector long long vec_ldl (int, long long *)",
10839         "vector unsigned long long vec_ldl (int, unsigned long long *)".
10840         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10841         type tree bool_long_long_type_node and correct definition of
10842         bool_V2DI_type_node to make reference to this new type tree.
10843         (rs6000_mangle_type): Replace erroneous reference to
10844         bool_long_type_node with bool_long_long_type_node.
10845         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10846         comments to emphasize sign distinctions for char and int types and
10847         replace RS6000_BTI_bool_long constant with
10848         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
10849         use of RS6000_BTI_pixel.
10850         (bool_long_type_node): Remove this macro definition.
10851         (bool_long_long_type_node): New macro definition
10853 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10855         PR rtl-optimization/85300
10856         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10857         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10858         simplify_unary_operation fails.
10860 2018-04-10  Martin Liska  <mliska@suse.cz>
10862         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10863         cgraph_edge and ipa_ref.
10865 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
10867         PR target/85177
10868         PR target/85255
10869         * config/i386/sse.md
10870         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10871         computation of the VEC_MERGE selector from mask.
10872         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10873         Fix decoding of the VEC_MERGE selector into mask.
10875 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10877         PR tree-optimization/85286
10878         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10880 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
10882         * final.c (final_1): Set insn_last_address as well as
10883         insn_current_address.
10885 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10887         PR target/85173
10888         * explow.c (emit_stack_probe): Call validize_mem on memory location
10889         before passing it to gen_probe_stack.  Create address operand and
10890         legitimize it for the probe_stack_address case.
10892 2018-04-09  Jan Hubicka  <jh@suse.cz>
10894         PR lto/85078
10895         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10896         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10897         * tree.c (free_lang_data_in_type): Fix handling of binfos;
10898         walk basetypes.
10899         (free_lang_data): Rebuild type inheritance graph.
10901 2018-04-09  Martin Sebor  <msebor@redhat.com>
10903         * invoke.texi (-finline-small-functions): Mention other optimization
10904         options.
10905         (-findirect-inlining, -fpartial-inlining): Same.
10906         (-finline-functions-called-once): Same.
10907         (-freorder-blocks-and-partition): Same.
10909 2018-04-09  Jan Hubicka  <jh@suse.cz>
10911         PR rtl/84058
10912         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10913         jumps; choose last target that matches the criteria (i.e.
10914         no partition changes for non-crossing jumps).
10915         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10916         support for redirecting crossing jumps to non-crossing.
10918 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
10920         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10921         also for naked functions.
10923 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
10925         * config/arc/arc.md (add_shift): New pattern.
10926         (add_shift2): Likewise.
10927         (sub_shift): Likewise.
10928         (sub_shift_cmp0_noout): Likewise.
10929         (compare_si_ashiftsi): Likewise.
10930         (xbfu_cmp0_noout): New combine pattern.
10931         (xbfu_cmp0"): Likewise.
10932         (movsi_set_cc_insn): Place the predicable variant first.
10933         (commutative_binary_cmp0_noout): Remove clobber.
10934         (commutative_binary_cmp0): New pattern.
10935         (noncommutative_binary_cmp0): Likewise.
10936         (noncommutative_binary_cmp0_noout): Likewise.
10937         (noncommutative_binary_comparison_result_used): Removed.
10938         (rsub_cmp0): New pattern.
10939         (rsub_cmp0_noout): Likewise.
10940         (extzvsi): Changed, keep only meaningful variants.
10941         (SQH, SEZ): New iterators.
10942         (SQH_postfix): New mode attribute.
10943         (SEZ_prefix): New code attribute.
10944         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10945         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10946         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10947         of numerical value.
10948         (noncommutative_operator): Check the availability of barrel
10949         shifter option.
10951 2018-04-09  Richard Biener  <rguenther@suse.de>
10953         PR tree-optimization/85284
10954         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10955         Only use the niter constraining form of simple_iv when the exit
10956         is always executed.
10958 2018-04-09  Tom de Vries  <tom@codesourcery.com>
10960         PR target/84041
10961         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10962         (define_expand "*memory_barrier"): New define_expand.
10963         (define_insn "memory_barrier"): New insn.
10965 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10967         PR rtl-optimization/80463
10968         PR rtl-optimization/83972
10969         PR rtl-optimization/83480
10971         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10972         correct producer for the insn.
10973         (tidy_control_flow): Fixup seqnos in case of debug insns.
10975 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10977         PR rtl-optimization/83913
10979         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10980         different sched-times when merging exprs.
10982 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10984         PR rtl-optimization/83962
10986         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10987         tidy_fallthru_edge and tidy_control_flow.
10989 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
10991         PR rtl-optimization/83530
10993         * sel-sched.c (force_next_insn): New global variable.
10994         (remove_insn_for_debug): When force_next_insn is true, also leave only
10995         next insn in the ready list.
10996         (sel_sched_region): When the region wasn't scheduled, make another pass
10997         over it with force_next_insn set to 1.
10999 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11001         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11002         into tm_file.
11003         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11004         for interrupt control.
11005         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11006         functions for interrupt control.
11007         * config/nds32/nds32-intrinsic.md: Likewise.
11008         * config/nds32/nds32_intrinsic.h: Likewise.
11009         * config/nds32/nds32.h (nds32_builtins): Likewise.
11011 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11013         * config/nds32/nds32.c (nds32_init_machine_status,
11014         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11015         strict_aligned_p field.
11016         (nds32_expand_to_rtl_hook): New function.
11017         (TARGET_EXPAND_TO_RTL_HOOK): Define.
11018         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11020 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11021             Chung-Ju Wu  <jasonwucj@gmail.com>
11023         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11024         * config/nds32/nds32-n7.md: New file.
11025         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11026         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11027         pipeline.
11028         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11029         * config/nds32/nds32.md (pipeline_model): Add n7.
11030         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11031         * config/nds32/pipelines.md: Include n7 settings.
11033 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11034             Chung-Ju Wu  <jasonwucj@gmail.com>
11036         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11037         * config/nds32/nds32-e8.md: New file.
11038         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11039         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11040         pipeline.
11041         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11042         * config/nds32/nds32.md (pipeline_model): Add e8.
11043         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11044         * config/nds32/pipelines.md: Include e8 settings.
11046 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11047             Chung-Ju Wu  <jasonwucj@gmail.com>
11049         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11050         * config/nds32/nds32-n8.md: New file.
11051         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11052         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11053         pipeline.
11054         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11055         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11056         * config/nds32/nds32.md (pipeline_model): Add n8.
11057         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11058         * config/nds32/pipelines.md: Include n8 settings.
11060 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11061             Chung-Ju Wu  <jasonwucj@gmail.com>
11063         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11064         * config/nds32/nds32-n9-2r1w.md: New file.
11065         * config/nds32/nds32-n9-3r2w.md: New file.
11066         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11067         nds32_register_ports): New or modify for cpu n9.
11068         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11069         pipeline.
11070         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11071         * config/nds32/nds32-utils.c: New file.
11072         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11073         TARGET_MUL_SLOW): Define.
11074         * config/nds32/nds32.md (pipeline_model): New attribute.
11075         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11076         New options that support cpu n9.
11077         * config/nds32/pipelines.md: Include n9 settings.
11078         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11080 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11082         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11083         information if necessary.
11084         (output_cond_branch_compare_zero): Likewise.
11085         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11086         (nds32_target_alignment): Refine for alignment.
11087         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11088         (FUNCTION_BOUNDARY): Modify.
11089         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11090         align case.
11091         * config/nds32/nds32.opt (malways-align, malign-functions): New.
11093 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11095         * config/nds32/constants.md (unspec_volatile_element): Add values for
11096         TLB operation and data prefetch.
11097         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11098         functions for TLB operation and data prefetch.
11099         * config/nds32/nds32-intrinsic.md: Likewise.
11100         * config/nds32/nds32_intrinsic.h: Likewise.
11101         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11102         (nds32_print_operand): Likewise.
11103         * config/nds32/nds32.h (nds32_builtins): Likewise.
11105 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
11106         Andrew Pinski <pinsika@gcc.gnu.org>
11108         PR middle-end/82976
11109         * match.pd: Use constant_boolean_node of correct type instead of
11110         boolean_true_node or boolean_false_node for simplifying
11111         pointer comparisons to zero.
11113 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11115         PR tree-optimization/80021
11116         * tree.c (verify_type_variant): Make error call in verify_variant_match
11117         translatable and remove final full stop.
11119 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11121         * config/nds32/constants.md (unspec_volatile_element): Add
11122         UNSPEC_VOLATILE_EH_RETURN.
11123         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11124         nds32_output_stack_pop): Support dwarf exception handling process.
11125         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11126         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11127         exception handling process.
11128         (nds32_compute_stack_frame): Likewise.
11129         (nds32_return_addr_rtx): Likewise.
11130         (nds32_initial_elimination_offset): Likewise.
11131         (nds32_expand_prologue): Likewise.
11132         (nds32_expand_epilogue): Likewise.
11133         (nds32_dynamic_chain_address): New function.
11134         * config/nds32/nds32.h (machine_function): Add fields for dwarf
11135         exception handling.
11136         (DYNAMIC_CHAIN_ADDRESS): Define.
11137         (EH_RETURN_DATA_REGNO): Define.
11138         (EH_RETURN_STACKADJ_RTX): Define.
11139         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11140         patterns for dwarf exception handling.
11142 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11144         * config/nds32/nds32.h: Clean up obsolete macros.
11146 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11148         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11149         Add enum values for particular instructions.
11150         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11151         particular intrinsic functions.
11152         * config/nds32/nds32-intrinsic.md: Likewise.
11153         * config/nds32/nds32_intrinsic.h: Likewise.
11154         * config/nds32/nds32.h (nds32_builtins): Likewise.
11155         * config/nds32/nds32.md (type): Add pbsad and pbsada.
11156         (btst, ave): New patterns for particular instructions.
11158 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11160         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11161         Add enum values for atomic load/store and memory sync.
11162         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11163         and memory sync.
11164         * config/nds32/nds32-intrinsic.md: Likewise.
11165         * config/nds32/nds32_intrinsic.h: Likewise.
11166         * config/nds32/nds32.h (nds32_builtins): Likewise.
11168 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11170         PR tree-optimization/85257
11171         * fold-const.c (native_encode_vector): If not all elts could fit
11172         and off is -1, return 0 rather than offset.
11173         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11174         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11175         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
11176         adjust buffer in native_interpret_expr call.
11178 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11180         * config/nds32/constants.md (unspec_volatile_element): Add cache
11181         control enum values.
11182         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11183         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11184         * config/nds32/nds32.c (nds32_cctl_names): New.
11185         (nds32_print_operand): Handle cache control register names.
11186         * config/nds32/nds32.h (nds32_builtins): New enum values.
11187         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11188         macros.
11189         * config/nds32/nds32.md (type): Add mmu.
11190         * config/nds32/pipelines.md (simple_insn): Add mmu.
11192 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11194         * config/nds32/nds32.md (type): Remove call.
11195         * config/nds32/pipelines.md (simple_insn): Likewise.
11197 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11199         * config/nds32/constants.md (unspec_volatile_element): Add
11200         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11201         UNSPEC_VOLATILE_FMFCFG.
11202         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11203         description for fmfcfg and fmfcsr.
11204         (bdesc_1arg): Add fmtcsr.
11205         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11206         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11207         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11208         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11209         unspec_fmfcfg): New patterns.
11210         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11211         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11212         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11213         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11214         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11215         __nds32__fmfcfg): Define.
11217 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11219         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11220         intrinsic register names.
11221         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11222         intrinsic register enum values and macros.
11224 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11226         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11227         for load/store addressing form.
11228         (nds32_print_operand_address): Likewise.
11230 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
11232         PR target/85196
11233         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11234         based on LABEL_REF.  Remove useless assertion.
11235         (pic_address_needs_scratch): Fix formatting.
11236         (sparc_legitimize_pic_address): Minor tweaks.
11237         (sparc_delegitimize_address): Adjust assertion accordingly.
11238         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11239         into symbolic_operand.
11240         (movsi_high_pic_label_ref): Likewise.
11241         (movsi_lo_sum_pic_label_ref): Likewise.
11242         (movdi_pic_label_ref): Likewise.
11243         (movdi_high_pic_label_ref): Likewise.
11244         (movdi_lo_sum_pic_label_ref): Likewise.
11246 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
11248         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11249         custom LIB_SPEC setup.
11251 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
11252             Kito Cheng  <kito.cheng@gmail.com>
11254         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11255         * config/riscv/freebsd.h: New.
11257 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11259         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11260         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11261         file.
11263 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11264             Kito Cheng  <kito.cheng@gmail.com>
11266         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11267         nds32_output_call, nds32_symbol_binds_local_p): New functions.
11268         * config/nds32/nds32-protos.h (nds32_output_call,
11269         nds32_output_return): Declare.
11270         * config/nds32/nds32.md: Refine all the call and return patterns.
11272 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11274         PR debug/85252
11275         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11276         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11278         PR rtl-optimization/84872
11279         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11280         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11281         EDGE_CROSSING edge.
11283 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
11285         * expr.c (copy_blkmode_to_reg): Revert 254862.
11286         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11288 2018-04-06  Richard Biener  <rguenther@suse.de>
11290         PR middle-end/85244
11291         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11292         after seeing a component reference with an adjacent field.  Treat
11293         refs to arrays at struct end of external decls similar to
11294         refs to unconstrained commons.
11296 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11298         PR sanitizer/85213
11299         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11300         look through SAVE_EXPRs with non-side-effects argument.  Adjust
11301         recursive calls.
11302         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11303         save_p here.
11305 2018-04-06  Richard Biener  <rguenther@suse.de>
11307         PR middle-end/85180
11308         * alias.c (find_base_term): New wrapper around find_base_term
11309         unwinding CSELIB_VAL_PTR changes.
11310         (find_base_term): Do not restore CSELIB_VAL_PTR during the
11311         recursion.
11313 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11315         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11316         instructions.
11317         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11318         constant definitions.
11319         ("nop"): lr 0,0 -> nopr r0
11320         ("nop_lr0", "nop_lr1"): New insn definitions.
11322 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11324         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11325         NDS32_V3PUSH_AVAILABLE_P macro.
11327 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
11328             Chung-Ju Wu  <jasonwucj@gmail.com>
11330         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11331         (nds32*-*-*): Add float and fpu_config into supported_defaults.
11332         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11333         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11334         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11335         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11336         * config/nds32/constraints.md: New constraints and checking for hard
11337         float configuration.
11338         * config/nds32/iterators.md: New mode iterator and attribute for hard
11339         float configuration.
11340         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11341         patterns.
11342         * config/nds32/nds32-fpu.md: New file.
11343         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11344         deal with hard float code generation.
11345         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11346         ARCH_V3S.
11347         (abi_type, float_reg_number): New enum type.
11348         * config/nds32/nds32-predicates.c: New predicates for hard float.
11349         * config/nds32/nds32-protos.h: Declare functions for hard float.
11350         * config/nds32/nds32.c: Implementation for hard float configuration.
11351         * config/nds32/nds32.h: Definitions for hard float configuration.
11352         * config/nds32/nds32.md: Include hard float machine description and
11353         modify patterns for hard float configuration.
11354         * config/nds32/nds32.opt: New options for hard float configuration.
11355         * config/nds32/predicates.md: New predicates for hard float
11356         configuration.
11358 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11360         * common/config/nds32/nds32-common.c
11361         (nds32_option_optimization_table): Enable -mreleax-hint by default.
11363 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
11365         PR middle-end/85195
11366         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11367         CONSTRUCTOR_ELT (ctor, ...)->value.
11369 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
11371         PR target/85193
11372         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11374 2018-04-05  Tom de Vries  <tom@codesourcery.com>
11376         PR target/85204
11377         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11378         cond jump.
11380 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11381             Kito Cheng  <kito.cheng@gmail.com>
11383         * config/nds32/constraints.md (U33): Fine-tune checking condition.
11384         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11385         * config/nds32/nds32.h (nds32_16bit_address_type): Add
11386         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11388 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11389             Kito Cheng  <kito.cheng@gmail.com>
11391         * config/nds32/constraints.md (Ufe): New memory constraint.
11392         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11393         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11394         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11395         operands.
11396         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11397         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11399 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11401         * config/nds32/nds32.md: Use optimize_size in the condition for
11402         alu-shift instructions.
11404 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11406         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11408 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11410         * config/nds32/nds32.md (negsi2): Refine pattern.
11412 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11413             Chung-Ju Wu  <jasonwucj@gmail.com>
11415         * config/nds32/iterators.md (shift_rotate): New code iterator.
11416         (shift): New code attribute.
11417         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11418         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11419         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11420         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11421         bit-wise operations.
11422         (andsi3, *andsi3): Ditto.
11423         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11424         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11425         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11426         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11427         nds32_ior_operand, nds32_xor_operand): New predicates.
11429 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11431         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11432         (addsi3, subsi3): ... this.
11434 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11436         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11438 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11440         * config/nds32/nds32.md: Adjust indention.
11442 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11444         * config/nds32/nds32.md (feature): New attribute.
11446 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11448         * config/nds32/nds32.md (subtype): New attribute.
11450 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11452         PR target/85203
11453         * config/arm/arm-builtins.c (arm_expand_builtin): Change
11454         expansion to perform a bitwise AND of the argument followed by a
11455         boolean negation of the result.
11457 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
11459         PR rtl-optimization/84878
11460         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11461         the basic block.  Assert the use reference is not artificial and that
11462         it has an associated insn.
11464 2018-04-04  Michael Matz  <matz@suse.de>
11466         * builtins.c (compute_objsize): Pass correct operand
11467         to array_at_struct_end_p.
11469 2018-04-04  Richard Biener  <rguenther@suse.de>
11471         PR lto/85176
11472         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11473         from contexts for DINFO_LEVEL_TERSE and below.
11475 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11477         * config/nds32/nds32-doubleword.md (move_<mode>): Require
11478         resiter_operand condition.
11479         * config/nds32/nds32.md (*move<mode>): Ditto.
11481 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11482             Monk Chiang  <sh.chiang04@gmail.com>
11484         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11486 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11488         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11490 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11491             Kito Cheng  <kito.cheng@gmail.com>
11493         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11494         nds32_cond_code_str, output_cond_branch,
11495         output_cond_branch_compare_zero, nds32_expand_cbranch,
11496         nds32_expand_cstore, nds32_expand_movcc,
11497         nds32_output_cbranchsi4_equality_zero,
11498         nds32_output_cbranchsi4_equality_reg,
11499         nds32_output_cbranchsi4_equality_reg_or_const_int,
11500         nds32_output_cbranchsi4_greater_less_zero: New functions.
11501         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11502         nds32_expand_cstore, nds32_expand_movcc,
11503         nds32_output_cbranchsi4_equality_zero,
11504         nds32_output_cbranchsi4_equality_reg,
11505         nds32_output_cbranchsi4_equality_reg_or_const_int,
11506         nds32_output_cbranchsi4_greater_less_zero): Declare.
11507         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11508         nds32_rimm11s_operand): New predicates.
11509         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11510         * config/nds32/nds32.md: Rewrite all the branch and conditional move
11511         patterns.
11513 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11515         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11516         * config/nds32/nds32.md: Ditto.
11517         * config/nds32/pipelines.md: Ditto.
11519 2018-04-04  Richard Biener  <rguenther@suse.de>
11521         PR tree-optimization/85168
11522         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11523         propagating abnormals.
11525 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11527         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11529 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11530             Kito Cheng  <kito.cheng@gmail.com>
11532         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11533         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11534         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11535         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11536         * config/nds32/nds32.md (sibcall_internal): New.
11537         (sibcall_register): Remove.
11538         (sibcall_immediate): Remove.
11539         (sibcall_value_internal): New.
11540         (sibcall_value_register): Remove.
11541         (sibcall_value_immediate): Remove.
11542         * config/nds32/predicates.md (nds32_general_register_operand): New.
11543         (nds32_call_address_operand): New.
11545 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11547         PR rtl-optimization/85167
11548         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11549         bb_defs if *split_p, instead preinitialize it to NULL.
11551         PR tree-optimization/85156
11552         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11553         evaluating the argument multiple times.
11555 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
11557         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11558         than vector.
11559         (_mm_cvtpd_ps): Likewise.
11560         (_mm_cvttpd_epi32): Likewise.
11561         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11562         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11563         vector, pixel, and bool following altivec.h include.
11565 2018-04-03  Martin Sebor  <msebor@redhat.com>
11567         * doc/extend.texi (Common Function Attributes): Clarify.
11568         (const attribute): Likewise.
11569         (pure attribute): Likewise.
11571 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11573         PR target/85169
11574         * config/i386/i386.c (ix86_expand_vector_set): Use
11575         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
11577 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
11579         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11580         instructions when changing rounding bits to preserve precision bits
11581         in the x87 control word.
11583 2018-04-03  Martin Liska  <mliska@suse.cz>
11585         PR tree-optimization/82491
11586         * rtl.h (strip_offset_and_add): Replace += suboffset with
11587         poly_uint64 () + suboffset.
11589 2018-03-29  Martin Liska  <mliska@suse.cz>
11590             Martin Jambor  <mjambor@suse.cz>
11592         PR ipa/84947
11593         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11594         param_type is not an integral or pointer type.
11596 2018-04-03  Richard Biener  <rguenther@suse.de>
11598         * sese.h (recompute_all_dominators): Remove.
11600 2018-04-02  Martin Sebor  <msebor@redhat.com>
11602         * doc/invoke.texi (-Wrestrict): Fix typos.
11604 2018-04-02  Jim Wilson  <jimw@sifive.com>
11606         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11607         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11608         (<optab>di3, <optab>si3_extend): Likewise.
11609         (<optab>si3_mask, <optab>si3_mask_1): New.
11610         (<optab>di3_mask, <optab>di3_mask_1): New.
11611         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11612         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11613         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11615 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
11617         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11618         example.
11620 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11622         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11623         (nds32_canonicalize_comparison): New function.
11625 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11626             Kito Cheng  <kito.cheng@gmail.com>
11627             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11629         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11630         * config/nds32/constants.md (unspec_volatile_element): Add
11631         UNSPEC_VOLATILE_RELAX_GROUP.
11632         * config/nds32/nds32-relax-opt.c: New file.
11633         * config/nds32/nds32-predicates.c
11634         (nds32_symbol_load_store_p): New function.
11635         * config/nds32/nds32-protos.h
11636         (nds32_symbol_load_store_p): Declare function.
11637         (make_pass_nds32_relax_opt): Declare new rtl pass function.
11638         * config/nds32/nds32.c
11639         (nds32_register_pass): New function to register pass.
11640         (nds32_register_passes): New function to register passes.
11641         * config/nds32/nds32.md (relax_group): New pattern.
11642         * config/nds32/nds32.opt (mrelax-hint): New option.
11643         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11645 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
11647         * config/nds32/t-nds32: Modify files dependency.
11649 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11651         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11652         (PROFILE_HOOK): Define its implementation.
11654 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11656         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11657         type and 32-bit size.
11659 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
11661         PR middle-end/85090
11662         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11663         (V_128_256): New mode iterator.
11664         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11665         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11666         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11667         of V.
11668         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11669         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11671 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
11673         PR target/83315
11674         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11675         NaN inputs correctly.
11677 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
11679         PR target/80546
11680         * config/rs6000/vsx.md (??r): New mode attribute.
11681         (*vsx_mov<mode>_64bit): Use it.
11682         (*vsx_mov<mode>_32bit): Likewise.
11684 2018-03-30  Martin Sebor  <msebor@redhat.com>
11686         PR tree-optimization/84818
11687         * builtins.c (check_access): Use warning_n.
11689 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11691         PR target/83822
11692         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11693         condition.
11694         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11695         condition.
11697 2018-03-30  Julia Koval  <julia.koval@intel.com>
11699         PR target/84413
11700         * x86-tune.def (movx, partial_reg_dependency): Enable for
11701         m_SKYLAKE_AVX512.
11703 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11705         PR inline-asm/84985
11706         * lra-constraints.c (process_alt_operands): Move setting
11707         this_alternative_matches below.
11709 2018-03-29  Martin Liska  <mliska@suse.cz>
11711         PR lto/84995.
11712         * doc/invoke.texi: Document how LTO works with debug info.
11713         Describe auto-load support of binutils.  Mention 'x86-64'
11714         as valid option value of -march option.
11716 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11718         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11720         PR c/85094
11721         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11722         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11723         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11724         checking.
11726 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11728         PR target/84912
11729         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11730         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11731         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11732         for RS6000_BTM_POWERPC64.
11733         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11734         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11735         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11736         definition.
11737         (DIVDE): Use it.
11738         (DIVDEU): Likewise.
11740 2018-03-28 Carl Love  <cel@us.ibm.com>
11742         Revert
11743         2017-09-27  Carl Love  <cel@us.ibm.com>
11745         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11746         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11747         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11748         fctiw instruction.
11750 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11752         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11753         instead of __vector bool.
11754         (_mm_max_pu8): Likewise.
11755         (_mm_min_pi16): Likewise.
11757 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11759         PR target/84912
11760         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11761         (DIVWEUO): Likewise.
11762         (DIVDEO): Likewise.
11763         (DIVDEUO): Likewise.
11764         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11765         DIVWEUO and DIVDEUO.
11766         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11767         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11768         (div_extend): Likewise.
11769         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11770         builtin function.
11771         (__builtin_divweuo): Likewise.
11772         (__builtin_divdeo): Likewise.
11773         (__builtin_divdeuo): Likewise.
11775 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11777         PR target/85095
11778         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11779         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11781         PR tree-optimization/82004
11782         * gimple-match-head.c (optimize_pow_to_exp): New function.
11783         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11784         Don't fold to exp if optimize_pow_to_exp is false.
11786 2018-03-28  Martin Liska  <mliska@suse.cz>
11788         PR other/84819
11789         * calls.c (initialize_argument_information): Fix trailing space.
11790         * common.opt: Fix typo and provide better explanation for
11791         -fsanitize-coverage option.
11792         * config/i386/i386.opt: Fix typo.
11794 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11795             Martin Liska  <mliska@suse.cz>
11797         PR sanitizer/85081
11798         * gimplify.c (asan_poison_variable): Don't do the check for
11799         gimplify_omp_ctxp here.
11800         (gimplify_decl_expr): Do it here.
11801         (gimplify_target_expr): Likewise.
11803 2018-03-28  Martin Liska  <mliska@suse.cz>
11805         PR target/84988
11806         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11807         chkp_type_bounds_count if MPX is not enabled.
11809 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11811         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11813 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11815         PR target/84914
11816         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11817         function to create the function decl for complex long double
11818         multiply and divide for -mabi=ieeelongdouble.
11819         (init_float128_ieee): Call it.
11821 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
11823         PR target/85044
11824         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11825         -fcf-protection=branch -mibt.
11826         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11828 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11830         PR target/81863
11831         * config/arm/arm.c (arm_valid_symbolic_address): Handle
11832         arm_word_relocations.
11834 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
11836         PR target/85056
11837         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11838         extern array declarations.
11840 2018-03-27  Richard Biener  <rguenther@suse.de>
11842         PR middle-end/84067
11843         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11844         explicit single_use checks.
11846 2018-03-27  Richard Biener  <rguenther@suse.de>
11848         PR tree-optimization/85082
11849         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11850         Valueize the VUSE.
11852 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11854         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11855         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11856         Turn on fasynchronous-unwind-tables and funwind-tables.
11858 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
11860         PR target/85073
11861         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11862         (*bmi_blsr_<mode>_ccz): Ditto.
11864 2018-03-26  Tom de Vries  <tom@codesourcery.com>
11866         PR tree-optimization/85063
11867         * omp-general.c (offloading_function_p): New function.  Factor out
11868         of ...
11869         * omp-offload.c (pass_omp_target_link::gate): ... here.
11870         * omp-general.h (offloading_function_p): Declare.
11871         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11872         with attribute omp declare target for offloading functions.
11874 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
11876         PR tree-optimization/84005
11877         * tree-data-ref.h (get_base_for_alignment): Declare.
11878         * tree-data-ref.c (get_base_for_alignment_1): New function.
11879         (get_base_for_alignment): Likewise.
11880         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11881         get_base_for_alignment to find a suitable base object, instead
11882         of always using drb->base_address.
11884 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11886         PR inline-asm/85022
11887         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11888         known size by default.
11890 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
11892         PR inline-asm/85030
11893         * lra-constraints.c (process_alt_operands): Don't match BLKmode
11894         and non BLKmode operands.
11896 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11898         PR target/85026
11899         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11900         Clean up attributes.
11902 2018-03-23  Richard Biener  <rguenther@suse.de>
11904         PR debug/85020
11905         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11906         we are going to emit early debug for LTO.
11908 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
11910         PR inline-asm/85034
11911         * function.c (match_asm_constraints_1): Don't optimize if input
11912         doesn't satisfy general_operand predicate for output's mode.
11914         PR inline-asm/85022
11915         * alias.c (write_dependence_p): Don't require for x_canonicalized
11916         non-VOIDmode if x has VOIDmode.
11918         PR sanitizer/85029
11919         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11920         just don't try to optimize it rather than assert it never happens.
11922 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11924         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11925         macro expansions for definition of ST_INTERNAL_<mode> and
11926         LD_INTERNAL_<mode> builtins.
11927         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11928         Remove prototype.
11929         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11930         function.
11931         (altivec_expand_st_builtin): Likewise.
11932         (altivec_expand_builtin): Remove calls to deleted functions.
11933         (rs6000_address_for_altivec): Delete this function.
11934         * config/rs6000/vector.md: Remove expands for
11935         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11937 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
11939         PR target/84826
11940         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11941         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11942         re-computing once computed.
11943         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11944         (arm_init_machine_status): Initialize
11945         machine->static_chain_stack_bytes.
11947 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11949         PR target/84760
11950         * doc/extend.texi: Add four new prototypes for vec_ld.
11951         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11952         definitions for more logical presentation.
11953         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11954         entries for V1TI variants of __builtin_altivec_ld builtin.
11955         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11956         handling of V1TI variant of LVX icode pattern.
11957         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11958         (rs6000_gimple_fold_builtin): Likewise.
11959         (altivec_init_builtins): Add code to define
11960         __builtin_altivec_lvx_v1ti function.
11962 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11964         PR inline-asm/84941
11965         * function.c (match_asm_constraints_1): Don't do the optimization
11966         if input isn't a REG, SUBREG, MEM or constant.
11968 2018-03-22  Tom de Vries  <tom@codesourcery.com>
11970         PR tree-optimization/84956
11971         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11972         bb_has_abnormal_pred.
11974 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
11976         PR sanitizer/85018
11977         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11978         DECL_INITIAL (decl) to decl at the end.
11979         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11980         adjust the comment.
11982 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
11984         * doc/extend.texi (__builtin_tgmath): Document when complex
11985         integer types are treated as _Complex _Float64.
11987 2018-03-21  Tom de Vries  <tom@codesourcery.com>
11989         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
11991 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
11993         PR tree-optimization/84960
11994         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
11995         if it is ENTRY block, move them into single succ of ENTRY in that case.
11997 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
11999         PR tree-optimization/84811
12000         * poly-int.h (poly_span_traits): Remove the T3 parameter and
12001         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12002         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12003         (known_subrange_p): Update accordingly.  Cast each value involved
12004         in the size comparison, rather than casting the result of the
12005         subtraction.
12007 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12009         PR tree-optimization/84982
12010         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12011         by flipping the least significant bit rather than all bits from
12012         bitpos to bitpos + bitsize - 1.
12014 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12016         * doc/extend.texi (Deprecated Features): Remove mention of
12017         long-deleted deprecations.
12019 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12021         PR jit/84288
12022         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12023         * configure: Regenerate.
12025 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12027         PR tree-optimization/83126
12028         * tree-parloops.c (num_phis): New function.
12029         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12031 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12033         * doc/extend.texi (Deprecated Features): Update deprecated flags,
12034         mention anon-struct/union members and trailing attributes.
12036 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
12038         PR tree-optimization/84969
12039         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12040         builtin memset partitions if they set different rhs values.
12042 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12044         PR rtl-optimization/84989
12045         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12046         VEC_DUPLICATE with scalar result mode.
12048 2018-03-21  Martin Liska  <mliska@suse.cz>
12050         PR ipa/84963
12051         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12052         not intended return statement.
12054 2018-03-21  Martin Liska  <mliska@suse.cz>
12056         PR target/84988
12057         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12058         (chkp_find_bound_slots_1): Limit number of iterations.
12060 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
12062         PR target/84838
12063         * Minor grammar fixes for x86 options.
12065 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12067         PR debug/84875
12068         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12069         holding REG_CFA_RESTORE notes, instead turn them into a USE.
12071 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
12073         PR target/83789
12074         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12075         (altivec_lvx_<mode>_1op): Likewise.
12076         (altivec_stvx_<mode>_2op): Likewise.
12077         (altivec_stvx_<mode>_1op): Likewise.
12078         (altivec_lvx_<VM2:mode>): New define_expand.
12079         (altivec_stvx_<VM2:mode>): Likewise.
12080         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12081         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12082         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12083         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12084         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12085         (rs6000_gen_lvx): Likewise.
12086         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12087         (altivec_expand_stv_builtin): Likewise.
12088         (altivec_expand_builtin): Likewise.
12089         * config/rs6000/vector.md: Likewise.
12091 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12093         PR target/82518
12094         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12095         BYTES_BIG_ENDIAN.
12097 2018-03-20  Richard Biener  <rguenther@suse.de>
12099         PR target/84986
12100         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12101         sign-conversions as zero, fall back to standard scalar_stmt
12102         cost for the rest.
12104 2018-03-20  Martin Liska  <mliska@suse.cz>
12106         PR ipa/84825
12107         * predict.c (rebuild_frequencies): Handle case when we have
12108         PROFILE_ABSENT, but flag_guess_branch_prob is false.
12110 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12112         PR target/84990
12113         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12114         flag_section_anchors.
12115         * varasm.c (use_blocks_for_decl_p): Remove hack for
12116         dw2_force_const_mem.
12118         PR target/84845
12119         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12120         to ...
12121         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
12122         be created, use lowpart_subreg of operands[0] rather than operands[0]
12123         itself.
12124         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12125         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12126         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12127         and n constraint instead of aarch64_shift_imm_di and Usd.
12128         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12129         (*aarch64_<optab>_reg_minus<mode>3): ... this.
12131 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
12133         PR target/82989
12134         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12135         to favor GPR over NEON registers.
12136         (<shift>di3_neon): Likewise.
12138 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12140         PR target/84952
12141         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12142         (nvptx_process_pars): Emit bar.sync asap and alap.
12144 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12146         PR target/84954
12147         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12148         seen_label if seen_label is already set.
12150 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12152         PR target/84945
12153         * config/i386/i386.c (fold_builtin_cpu): For features above 31
12154         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12155         Use 1U instead of 1.  Formatting fixes.
12157         PR c/84953
12158         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12159         instead of TREE_TYPE (s1) for the return value.
12161 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
12163         PR tree-optimization/84946
12164         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12165         bitsize + bitsize in poly_uint64 rather than poly_int64.
12167         PR sanitizer/78651
12168         * dwarf2asm.c: Include fold-const.c.
12169         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12170         of decl rather than decl itself.
12172         PR rtl-optimization/84643
12173         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12175 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
12177         PR sanitizer/78651
12178         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12179         calling assemble_variable.
12181 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
12183         PR target/81647
12184         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12185         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12187 2018-03-19  Jim Wilson  <jimw@sifive.com>
12189         PR bootstrap/84856
12190         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12191         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12192         (riscv_first_stack_step): Likewise.
12193         (riscv_option_override): Use STACK_BOUNDARY instead of
12194         MIN_STACK_BOUNDARY.
12195         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12196         MIN_STACK_BOUNDARY.
12197         (BIGGEST_ALIGNMENT): Set to 128.
12198         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12199         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12200         STACK_BOUNDARY.
12202 2018-03-19  Richard Biener  <rguenther@suse.de>
12204         PR tree-optimization/84933
12205         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12206         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12208 2018-03-19  Richard Biener  <rguenther@suse.de>
12210         PR tree-optimization/84859
12211         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12212         (cond_if_else_store_replacement): Perform sinking operation on
12213         single-store BBs regardless of MAX_STORES_TO_SINK setting.
12214         Generalize what a BB with a single eligible store is.
12216 2018-03-19  Richard Biener  <rguenther@suse.de>
12218         PR tree-optimization/84929
12219         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12220         chrec_is_positive against non-chrec arg.
12222 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
12224         PR target/84711
12225         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12227 2018-03-18  Martin Liska  <mliska@suse.cz>
12229         PR rtl-optimization/84635
12230         * regrename.c (build_def_use): Use matches_mode only when
12231         matches >= 0.
12233 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
12235         PR tree-optimization/84913
12236         * tree-vect-loop.c (vectorizable_reduction): Don't try to
12237         vectorize chains of COND_EXPRs.
12239 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12241         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12243 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12245         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12247 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12249         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12251 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12252             Kito Cheng  <kito.cheng@gmail.com>
12254         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12255         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12256         (nds32_adjust_reg_alloc_order): New function.
12257         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12259 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
12261         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12262         nds32_print_operand, nds32_print_operand_address): Use
12263         HOST_WIDE_INT_PRINT_DEC instead.
12265 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12267         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12269 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
12271         PR target/84902
12272         * config/i386/i386.c (initial_ix86_tune_features,
12273         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12274         unsigned long long.
12275         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12276         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12277         rather than 1u << ix86_tune.  Formatting fix.
12278         (ix86_option_override_internal): Change ix86_arch_mask from
12279         unsigned int to unsigned HOST_WIDE_INT, initialize to
12280         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12281         (ix86_function_specific_restore): Likewise.
12283 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12285         PR target/84899
12286         * postreload.c (reload_combine_recognize_pattern): Perform
12287         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12288         truncate_int_for_mode the result for the destination's mode.
12290         PR c/84909
12291         * hsa-gen.c (mem_type_for_type): Fix comment typo.
12292         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12293         Likewise.
12294         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12295         Likewise.
12297 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
12299         PR target/84876
12300         * lra-assigns.c (lra_split_hard_reg_for): Don't use
12301         regno_allocno_class_array and sorted_pseudos.
12302         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12303         insns where regno is used.
12305 2018-03-16  Martin Liska  <mliska@suse.cz>
12307         PR ipa/84833
12308         * multiple_target.c (create_dispatcher_calls): Redirect
12309         reference in the symbol table.
12311 2018-03-16  Martin Liska  <mliska@suse.cz>
12313         PR ipa/84722
12314         * multiple_target.c (create_dispatcher_calls): Redirect also
12315         an alias.
12317 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12319         PR c++/79937
12320         PR c++/82410
12321         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12322         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12323         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12325 2018-03-16  Julia Koval  <julia.koval@intel.com>
12327         * doc/invoke.texi (Skylake Server): Add CLWB.
12328         Cannonlake): Remove CLWB.
12330 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12332         PR tree-optimization/84841
12333         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12334         1 << 3.
12335         (FLOAT_ONE_CONST_TYPE): Define.
12336         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12337         (sort_by_operand_rank): Put entries with higher constant_type last
12338         rather than first to match comments.
12340 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
12342         * config/nios2/nios2.md (movsi_internal): Fix thinko in
12343         split predicate.
12345 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12347         PR c++/79085
12348         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12349         check and use address of target always.
12351 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
12353         PR target/84574
12354         * config/i386/i386.c (indirect_thunk_needed): Update comments.
12355         (indirect_thunk_bnd_needed): Likewise.
12356         (indirect_thunks_used): Likewise.
12357         (indirect_thunks_bnd_used): Likewise.
12358         (indirect_return_needed): New.
12359         (indirect_return_bnd_needed): Likewise.
12360         (output_indirect_thunk_function): Add a bool argument for
12361         function return.
12362         (output_indirect_thunk_function): Don't generate alias for
12363         function return thunk.
12364         (ix86_code_end): Call output_indirect_thunk_function to generate
12365         function return thunks.
12366         (ix86_output_function_return): Set indirect_return_bnd_needed
12367         and indirect_return_needed instead of indirect_thunk_bnd_needed
12368         and indirect_thunk_needed.
12370 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
12372         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12373         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12374         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12376 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
12377             Paul Hua <paul.hua.gm@gmail.com>
12379         PR c/84852
12380         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12382 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
12384         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12385         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12386         resp. SFmode cases.
12388 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
12390         PR target/84711
12391         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12392         instead of GET_MODE_SIZE when comparing Units.
12394 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12396         PR target/68256
12397         * varasm.c (hash_section): Return an unchangeble hash value
12398         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12399         Return !aarch64_can_use_per_function_literal_pools_p ().
12401 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12403         PR target/84860
12404         * optabs.c (emit_conditional_move): Pass address of cmode's copy
12405         rather than address of cmode as last argument to prepare_cmp_insn.
12407 2018-03-15  Julia Koval  <julia.koval@intel.com>
12409         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12410         F_AVX512VNNI, F_AVX512BITALG): New.
12412 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
12414         PR target/83451
12415         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
12416         insn for floating-point loads and stores.
12418 2018-03-14  Carl Love  <cel@us.ibm.com>
12420         * config/rs6000/rs6000-c.c: Add macro definitions for
12421         ALTIVEC_BUILTIN_VEC_PERMXOR.
12422         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12423         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12424         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12425         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12426         UNSPEC_VPERMXOR.
12427         * config/doc/extend.texi: Add prototypes for vec_permxor.
12429 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
12431         PR c/84852
12432         * diagnostic-show-locus.c (class layout_point): Convert m_line
12433         from int to linenum_type.
12434         (line_span::comparator): Use linenum "compare" function when
12435         comparing line numbers.
12436         (test_line_span): New function.
12437         (layout_range::contains_point): Convert param "row" from int to
12438         linenum_type.
12439         (layout_range::intersects_line_p): Likewise.
12440         (layout::will_show_line_p): Likewise.
12441         (layout::print_source_line): Likewise.
12442         (layout::should_print_annotation_line_p): Likewise.
12443         (layout::print_annotation_line): Likewise.
12444         (layout::print_leading_fixits): Likewise.
12445         (layout::annotation_line_showed_range_p): Likewise.
12446         (struct line_corrections): Likewise for field m_row.
12447         (line_corrections::line_corrections): Likewise for param "row".
12448         (layout::print_trailing_fixits): Likewise.
12449         (layout::get_state_at_point): Likewise.
12450         (layout::get_x_bound_for_row): Likewise.
12451         (layout::print_line): Likewise.
12452         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12453         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12454         * input.c (selftest::test_linenum_comparisons): New function.
12455         (selftest::input_c_tests): Call it.
12456         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12457         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12458         * selftest.h (ASSERT_GT): New macro.
12459         (ASSERT_GT_AT): New macro.
12460         (ASSERT_LT): New macro.
12461         (ASSERT_LT_AT): New macro.
12463 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
12465         PR rtl-optimization/84780
12466         * combine.c (distribute_links): Don't make a link based on pc_rtx.
12468 2018-03-14  Martin Liska  <mliska@suse.cz>
12470         * tree.c (record_node_allocation_statistics): Use
12471         get_stats_node_kind.
12472         (get_stats_node_kind): New function extracted from
12473         record_node_allocation_statistics.
12474         (free_node): Use get_stats_node_kind.
12476 2018-03-14  Richard Biener  <rguenther@suse.de>
12478         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12479         that the value-set of ANTIC_IN doesn't grow.
12481         Revert
12482         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12483         member.
12484         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12485         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12487 2018-03-14  Julia Koval  <julia.koval@intel.com>
12489         * config.gcc (icelake-client, icelake-server): New.
12490         (icelake): Remove.
12491         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12492         (initial_ix86_arch_features): Ditto.
12493         (PTA_SKYLAKE): Add SGX.
12494         (PTA_ICELAKE): Remove.
12495         (PTA_ICELAKE_CLIENT): New.
12496         (PTA_ICELAKE_SERVER): New.
12497         (ix86_option_override_internal): Split up icelake on icelake client and
12498         icelake server.
12499         (get_builtin_code_for_version): Ditto.
12500         (fold_builtin_cpu): Ditto.
12501         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12502         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12503         * config/i386/i386.h (processor_type): Ditto.
12504         * doc/invoke.texi: Ditto.
12506 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
12508         PR sanitizer/83392
12509         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12510         INTEGER_CST offset, add it together with bitpos / 8 and
12511         sign extend based on POINTER_SIZE.
12513         PR target/84844
12514         Revert
12515         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
12517         PR target/78090
12518         * config/i386/constraints.md (Yc): New register constraint.
12519         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12520         Use Yc constraint for alternative 2 of operand 0.  Remove
12521         preferred_for_speed attribute.
12523 2018-03-14  Richard Biener  <rguenther@suse.de>
12525         PR tree-optimization/84830
12526         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12527         with the old one to avoid oscillations.
12529 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
12531         PR target/83712
12532         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12533         pseudos.
12534         (assign_by_spills): Return a flag of reload assignment failure.
12535         Do not process the reload assignment failures.  Do not spill other
12536         reload pseudos if they has the same reg class.  Update n if
12537         necessary.
12538         (lra_assign): Add a return arg.  Set up from the result of
12539         assign_by_spills call.
12540         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12541         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12542         usage_insns if it is not NULL.
12543         (spill_hard_reg_in_range): New function.
12544         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12545         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12546         function prototypes.
12547         (lra_assign): Change prototype.
12548         * lra.c (lra): Add code to deal with fails by splitting hard reg
12549         live ranges.
12551 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
12553         * config/riscv/riscv.opt (mrelax): New option.
12554         * config/riscv/riscv.c (riscv_file_start): Emit ".option
12555         "norelax" when riscv_mrelax is disabled.
12556         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12558 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12560         PR target/84743
12561         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12562         reassociation for int modes.
12564 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12566         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12567         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12568         for big-endian.
12569         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12570         * config/aarch64/aarch64-sve.md
12571         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12572         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12573         (*extend<mode><Vwide>2): Rename to...
12574         (aarch64_sve_extend<mode><Vwide>2): ...this.
12575         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12576         renaming the old pattern to...
12577         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
12578         unsigned packs.
12579         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12580         define_expand, renaming the old pattern to...
12581         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12582         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12583         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12584         account when deciding which SVE instruction the optab should use.
12585         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12587 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12589         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12590         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12591         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12592         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12593         (tlsdesc_small_<mode>): Turn a define_expand and use
12594         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
12595         (tlsdesc_small_advsimd_<mode>): ...this.
12596         (tlsdesc_small_sve_<mode>): New pattern.
12598 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12600         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12601         (UNSPEC_UMUL_HIGHPART): New constants.
12602         (MUL_HIGHPART): New int iteraor.
12603         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12604         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12605         define_expand.
12606         (*<su>mul<mode>3_highpart): New define_insn.
12608 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12610         PR lto/84805
12611         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12612         incomplete types.
12614 2018-03-13  Martin Liska  <mliska@suse.cz>
12616         PR ipa/84658.
12617         * (sem_item_optimizer::sem_item_optimizer): Initialize new
12618         vector.
12619         (sem_item_optimizer::~sem_item_optimizer): Release it.
12620         (sem_item_optimizer::merge_classes): Register variable aliases.
12621         (sem_item_optimizer::fixup_pt_set): New function.
12622         (sem_item_optimizer::fixup_points_to_sets): Likewise.
12623         * ipa-icf.h: Declare new variables and functions.
12625 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
12627         PR middle-end/84834
12628         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12629         integer_pow2p@2 and test integer_pow2p in condition.
12630         (A < 0 ? C : 0): Similarly for @1.
12632         PR middle-end/84831
12633         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12634         characters starting at p contain '\0' character, don't look beyond
12635         that.
12637         PR target/84827
12638         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12639         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12641         PR target/84828
12642         * reg-stack.c (change_stack): Change update_end var from int to
12643         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12644         also call set_block_for_insn on the newly added insns and rescan.
12646         PR target/84786
12647         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12648         on the last operand.
12650         PR c++/84704
12651         * tree.c (stabilize_reference_1): Return save_expr (e) for
12652         STATEMENT_LIST even if it doesn't have side-effects.
12654 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
12656         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12658 2018-03-12  Renlin Li  <renlin.li@arm.com>
12660         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12661         aarch64_output_scalar_simd_mov_immediate.
12663 2018-03-12  Martin Sebor  <msebor@redhat.com>
12665         PR tree-optimization/83456
12666         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12667         for perfectly overlapping calls to memcpy.
12668         (gimple_fold_builtin_memory_chk): Same.
12669         (gimple_fold_builtin_strcpy): Handle no-warning.
12670         (gimple_fold_builtin_stxcpy_chk): Same.
12671         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12673 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12675         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12676         parameter.  Use it for SFmode.
12677         (rs6000_function_arg_advance_1): Adjust.
12678         (rs6000_function_arg): Adjust.
12679         (rs6000_gimplify_va_arg): Pass false for that new parameter.
12681 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12683         PR rtl-optimization/84169
12684         PR rtl-optimization/84780
12685         * combine.c (can_combine_p): Check for a 2-insn combination whether
12686         the destination register is used between the two insns, too.
12688 2018-03-12  Richard Biener  <rguenther@suse.de>
12690         PR tree-optimization/84803
12691         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12692         for refs DR analysis didn't process.
12694 2018-03-12  Richard Biener  <rguenther@suse.de>
12696         PR tree-optimization/84777
12697         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12698         force-vectorize loops ignore whether we are optimizing for size.
12700 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12702         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12703         (TARGET_MD_ASM_ADJUST): Define.
12705 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12706             Kito Cheng  <kito.cheng@gmail.com>
12707             Chung-Ju Wu  <jasonwucj@gmail.com>
12709         * config/nds32/nds32.c (nds32_compute_stack_frame,
12710         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12711         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12712         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12713         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12714         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12715         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12716         * config/nds32/nds32.md (prologue, epilogue): Use macro
12717         NDS32_V3PUSH_AVAILABLE_P to do checking.
12719 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12721         PR debug/58150
12722         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12723         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12724         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12725         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12726         addition of most attributes on !orig_type_die or the attribute not
12727         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12729 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12730             Chung-Ju Wu  <jasonwucj@gmail.com>
12732         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12733         __NDS32_VH__ macro.
12734         * config/nds32/nds32.opt (mvh): New option.
12736 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12737             Chung-Ju Wu  <jasonwucj@gmail.com>
12739         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12740         function.
12741         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12742         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12743         definition.
12745 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12746             Chung-Ju Wu  <jasonwucj@gmail.com>
12748         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12749         function.
12750         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12751         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12753 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12754             Kito Cheng  <kito.cheng@gmail.com>
12755             Chung-Ju Wu  <jasonwucj@gmail.com>
12757         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12758         UNSPEC_FFMISM and UNSPEC_FLMISM.
12759         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12760         for ffb, ffmism and flmism.
12761         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12762         (unspec_ffmism): Ditto.
12763         (unspec_flmism): Ditto.
12764         (nds32_expand_builtin_impl): Check if string extension is available.
12765         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12766         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12768 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12770         Reverting patch:
12771         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12773         PR target/83712
12774         * lra-assigns.c (assign_by_spills): Return a flag of reload
12775         assignment failure.  Do not process the reload assignment
12776         failures.  Do not spill other reload pseudos if they has the same
12777         reg class.
12778         (lra_assign): Add a return arg.  Set up from the result of
12779         assign_by_spills call.
12780         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12781         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12782         usage_insns if it is not NULL.
12783         (spill_hard_reg_in_range): New function.
12784         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12785         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12786         function prototypes.
12787         (lra_assign): Change prototype.
12788         * lra.c (lra): Add code to deal with fails by splitting hard reg
12789         live ranges.
12791 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12793         PR target/84807
12794         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12796 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12798         PR debug/84620
12799         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12800         (dw_val_node): Add val_symbolic_view.
12801         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12802         (symview_upper_bound): New.
12803         (new_line_info_table): Initialize symviews_since_reset.
12804         (dwarf2out_source_line): Count symviews_since_reset and set
12805         symview_upper_bound.
12806         (dw_val_equal_p): Handle symview.
12807         (add_AT_symview): New.
12808         (print_dw_val): Handle symview.
12809         (attr_checksum, attr_checksum_ordered): Likewise.
12810         (same_dw_val_p, size_of_die): Likewise.
12811         (value_format, output_die): Likewise.
12812         (add_high_low_attributes): Use add_AT_symview for entry_view.
12813         (dwarf2out_finish): Reset symview_upper_bound, clear
12814         zero_view_p.
12816 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
12818         PR target/83969
12819         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12820         Add strict argument and use it.
12821         (rs6000_split_multireg_move): Update for new strict argument.
12822         (mem_operand_gpr): Disallow all non-offsettable addresses.
12823         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12825 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
12827         PR target/84772
12828         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12829         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12830         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12832         PR c++/84767
12833         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12834         decl, use remap_type if we want to use the type.
12836 2018-03-09  Martin Sebor  <msebor@redhat.com>
12838         PR tree-optimization/84526
12839         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12840         Remove dead code.
12841         (builtin_access::generic_overlap): Be prepared to handle non-array
12842         base objects.
12844 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
12846         PR rtl-optimization/84682
12847         * lra-constraints.c (process_address_1): Check is_address flag
12848         for address constraints.
12849         (process_alt_operands): Likewise.
12850         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12851         preprocess_constraints.
12852         * recog.h (preprocess_constraints): Add oploc parameter.
12853         Adjust callers.
12854         * recog.c (preprocess_constraints): Test address_operand for
12855         CT_ADDRESS constraints.
12857 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12859         PR target/83712
12860         * lra-assigns.c (assign_by_spills): Return a flag of reload
12861         assignment failure.  Do not process the reload assignment
12862         failures.  Do not spill other reload pseudos if they has the same
12863         reg class.
12864         (lra_assign): Add a return arg.  Set up from the result of
12865         assign_by_spills call.
12866         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12867         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12868         usage_insns if it is not NULL.
12869         (spill_hard_reg_in_range): New function.
12870         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12871         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12872         function prototypes.
12873         (lra_assign): Change prototype.
12874         * lra.c (lra): Add code to deal with fails by splitting hard reg
12875         live ranges.
12877 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12879         PR target/83193
12880         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12881         Accept complain bool parameter.  Only emit errors if it is true.
12882         (arm_parse_cpu_option_name): Likewise.
12883         (arm_target_thumb_only): Adjust callers of the above.
12884         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12885         prototype to take a default true bool parameter.
12886         (arm_parse_arch_option_name): Likewise.
12888 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
12889             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12891         PR jit/64089
12892         PR jit/84288
12893         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12894         * configure: Regenerate.
12895         * configure.ac ("linker --version-script option"): New.
12896         ("linker soname option"): New.
12898 2018-03-09  Richard Biener  <rguenther@suse.de>
12900         PR tree-optimization/84775
12901         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12902         immediate uses of predicate stmts and mark them modified.
12904         Revert
12905         PR tree-optimization/84178
12906         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12907         to caller.
12908         (version_loop_for_if_conversion): Delay update_ssa call.
12909         (tree_if_conversion): Delay update_ssa until after predicate
12910         insertion.
12912 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
12914         PR target/84763
12915         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12916         when the function accesses prior frames.
12918 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12920         PR debug/84456
12921         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12922         gen_llsym, otherwise call maybe_gen_llsym.
12924         PR inline-asm/84742
12925         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12926         has ',' character inside of it.
12928 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12930         PR target/84748
12931         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12932         as clobbering CC_REGNUM.
12934 2018-03-08  Richard Biener  <rguenther@suse.de>
12936         PR middle-end/84552
12937         * tree-scalar-evolution.c: Include tree-into-ssa.h.
12938         (follow_copies_to_constant): Do not follow SSA names registered
12939         for update.
12941 2018-03-08  Richard Biener  <rguenther@suse.de>
12943         PR tree-optimization/84178
12944         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12945         to caller.
12946         (version_loop_for_if_conversion): Delay update_ssa call.
12947         (tree_if_conversion): Delay update_ssa until after predicate
12948         insertion.
12950 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
12952         PR tree-optimization/84178
12953         * tree-if-conv.c (release_bb_predicate): Remove the
12954         the assertion that the stmts have NULL use_ops.
12955         Discard the statements, asserting that they haven't
12956         yet been added to a BB.
12958 2018-03-08  Richard Biener  <rguenther@suse.de>
12960         PR tree-optimization/84746
12961         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12962         (phi_translate): Pass in destination ANTIC_OUT set.
12963         (phi_translate_1): Likewise.  For a simplified result lookup
12964         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12965         (phi_translate_set): Adjust.
12966         (do_pre_regular_insertion): Likewise.
12967         (do_pre_partial_partial_insertion): Likewise.
12969 2018-03-08  Martin Liska  <mliska@suse.cz>
12971         PR gcov-profile/84735
12972         * doc/gcov.texi: Document usage of profile files.
12973         * gcov-io.h: Document changes in the format.
12975 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
12977         PR debug/84404
12978         PR debug/84408
12979         * dwarf2out.c (struct dw_line_info_table): Update comments for
12980         view == -1.
12981         (FORCE_RESET_NEXT_VIEW): New.
12982         (FORCE_RESETTING_VIEW_P): New.
12983         (RESETTING_VIEW_P): Check for -1 too.
12984         (ZERO_VIEW_P): Likewise.
12985         (new_line_info_table): Force-reset next view.
12986         (dwarf2out_begin_function): Likewise.
12987         (dwarf2out_source_line): Simplify zero_view_p initialization.
12988         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
12989         view directly.  Omit view when omitting .loc at line 0.
12991 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
12993         PR tree-optimization/84740
12994         * tree-switch-conversion.c (process_switch): Call build_constructors
12995         only if info.phi_count is non-zero.
12997         PR tree-optimization/84739
12998         * tree-tailcall.c (find_tail_calls): Check call arguments against
12999         DECL_ARGUMENTS (current_function_decl) rather than
13000         DECL_ARGUMENTS (func) when checking for tail recursion.
13002 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13004         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13005         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13006         Volker Reichelt's entry and add entries for people that perform
13007         GCC fuzzy testing and report numerous bugs.
13009 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
13011         PR target/82411
13012         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13013         readonly data in sdata, if that is disabled.
13014         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13015         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13016         -mreadonly-in-sdata option.
13018 2018-03-07  Martin Sebor  <msebor@redhat.com>
13020         PR tree-optimization/84468
13021         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13022         basic block when looking for nul assignment.
13024 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
13026         PR target/84277
13027         * except.h (output_function_exception_table): Adjust prototype.
13028         * except.c (output_function_exception_table): Remove FNNAME parameter
13029         and add SECTION parameter.  Ouput one part of the table at a time.
13030         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13031         the first part of the exception table and emit unwind directives.
13032         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13033         (i386_pe_seh_cold_init): Likewise.
13034         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13035         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13036         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13037         (ix86_output_call_insn): Emit a nop in one more case for SEH.
13038         * config/i386/winnt.c: Include except.h.
13039         (struct seh_frame_state): Add reg_offset, after_prologue and
13040         in_cold_section fields.
13041         (i386_pe_seh_end_prologue): Set seh->after_prologue.
13042         (i386_pe_seh_cold_init): New function.
13043         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13044         to seh->in_cold_section.
13045         (seh_emit_push): Record the offset of the push.
13046         (seh_emit_save): Record the offet of the save.
13047         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13048         Test seh->after_prologue to disregard the epilogue.
13049         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13050         (i386_pe_end_cold_function): New function.
13052 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13054         PR fortran/84565
13055         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13056         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13058         PR c++/84704
13059         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13060         on tmp_var.
13061         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13062         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13064         PR middle-end/84723
13065         * multiple_target.c: Include tree-inline.h and intl.h.
13066         (expand_target_clones): Diagnose and fail if node->definition and
13067         !tree_versionable_function_p (node->decl).
13069 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
13071         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13072         sprint_ul.
13073         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13074         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13075         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13077 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13079         PR target/84710
13080         * combine.c (try_combine): Use reg_or_subregno instead of handling
13081         just paradoxical SUBREGs and REGs.
13083 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
13085         * config/arc/arc.c (arc_finalize_pic): Remove function.
13086         (arc_must_save_register): We use single base PIC register, remove
13087         checks to save/restore the PIC register.
13088         (arc_expand_prologue): Likewise.
13089         * config/arc/arc-protos.h (arc_set_default_type_attributes):
13090         Remove.
13091         (arc_verify_short): Likewise.
13092         (arc_attr_type): Likewise.
13093         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13094         (walk_stores): Likewise.
13095         (arc_address_cost): Make it static.
13096         (arc_verify_short): Likewise.
13097         (branch_dest): Likewise.
13098         (arc_attr_type): Likewise.
13099         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13100         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13101         (arc_final_prescan_insn): Remove inserting the nops due to
13102         hardware hazards.  It is done in reorg step.
13103         (insn_length_variant_t): Remove.
13104         (insn_length_parameters_t): Likewise.
13105         (arc_insn_length_parameters): Likewise.
13106         (arc_get_insn_variants): Likewise.
13107         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13109 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13111         PR inline-asm/84683
13112         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13113         assertion failure.
13115         PR tree-optimization/84687
13116         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13117         on new_node->decl.
13118         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13120 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13122         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13123         Rename to ppc_speculation_barrier.
13124         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13125         __builtin_ppc_speculation_barrier.
13127 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13129         PR target/84700
13130         * combine.c (combine_simplify_rtx): Don't try to simplify if
13131         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13132         are equal to x.
13134 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
13136         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13137         to 32 bytes when compiling for POWER9.
13139 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13141         PR target/84564
13142         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13143         regparm >= 3 with no arg reg available also for calls with
13144         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
13146         PR target/84524
13147         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13148         orig,vex.
13149         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
13151 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
13153         PR target/84264
13154         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13156 2018-03-05  Richard Biener  <rguenther@suse.de>
13158         PR tree-optimization/84486
13159         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13160         When inserting a __builtin_assume_aligned call set the LHS
13161         SSA name alignment info accordingly.
13163 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
13165         PR tree-optimization/84114
13166         * config/aarch64/aarch64.c (aarch64_reassociation_width)
13167         Avoid reassociation of FLOAT_MODE addition.
13169 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
13171         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13172         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13173         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13174         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13175         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13176         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13177         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13178         and -mwbnoinvd.
13179         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13180         __builtin_ia32_wbinvd): New builtins.
13181         (SPECIAL_ARGS2): New.
13182         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13183         (SPECIAL_ARGS2): New.
13184         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13185         (ix86_valid_target_attribute_inner_p): Ditto.
13186         (ix86_init_mmx_sse_builtins): Add special_args2.
13187         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13188         TARGET_WBNOINVD_P): New.
13189         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13190         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13191         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13192         * config/i386/immintrin.h (_wbinvd): New intrinsic.
13193         * config/i386/pconfigintrin.h: New file.
13194         * config/i386/wbnoinvdintrin.h: Ditto.
13195         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13196         wbnoinvdintrin.h.
13197         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13199 2018-03-05  Richard Biener  <rguenther@suse.de>
13201         PR tree-optimization/84670
13202         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13203         member.
13204         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13205         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13206         (compute_antic_aux): Only assert the number of values in ANTIC_IN
13207         doesn't grow if all successors (recursively) were visited at least
13208         once.
13210 2018-03-05  Richard Biener  <rguenther@suse.de>
13212         PR tree-optimization/84650
13213         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13214         if executed in the loop pipeline.
13216 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
13218         * doc/configfiles.texi (Configuration Files): Move info about
13219         conditionalizing $target-protos.h to...
13220         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
13221         differs from $target-protos.h.
13223 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
13224             Chung-Ju Wu  <jasonwucj@gmail.com>
13226         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13227         * config/nds32/nds32-multiple.md (setmemsi): Define.
13228         * config/nds32/nds32-memory-manipulation.c
13229         (nds32_gen_dup_4_byte_to_word_value): New.
13230         (emit_setmem_word_loop): New.
13231         (emit_setmem_byte_loop): New.
13232         (nds32_expand_setmem_loop): New.
13233         (nds32_expand_setmem_loop_v3m): New.
13234         (nds32_expand_setmem_unroll): New.
13235         (nds32_expand_setmem): New.
13237 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13238             Chung-Ju Wu  <jasonwucj@gmail.com>
13240         * config/nds32/nds32-memory-manipulation.c
13241         (nds32_emit_load_store): New.
13242         (nds32_emit_post_inc_load_store): New.
13243         (nds32_emit_mem_move): New.
13244         (nds32_emit_mem_move_block): New.
13245         (nds32_expand_movmemsi_loop_unknown_size): New.
13246         (nds32_expand_movmemsi_loop_known_size): New.
13247         (nds32_expand_movmemsi_loop): New.
13248         (nds32_expand_movmemsi_unroll): New.
13249         (nds32_expand_movmemqi): Rename ...
13250         (nds32_expand_movmemsi): ... to this.
13251         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13252         (movmemsi): ... to this.
13253         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13254         (nds32_expand_movmemsi): ... to this.
13256 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13257             Monk Chiang  <sh.chiang04@gmail.com>
13258             Chung-Ju Wu  <jasonwucj@gmail.com>
13260         * config/nds32/nds32-protos.h
13261         (nds32_expand_load_multiple): New arguments.
13262         (nds32_expand_store_multiple): Ditto.
13263         (nds32_valid_multiple_load_store): Rename ...
13264         (nds32_valid_multiple_load_store_p): ... to this.
13265         * config/nds32/nds32-memory-manipulation.c
13266         (nds32_expand_load_multiple): Refine implementation.
13267         (nds32_expand_store_multiple): Ditto.
13268         * config/nds32/nds32-multiple.md
13269         (load_multiple): Update nds32_expand_load_multiple interface.
13270         (store_multiple): Update nds32_expand_store_multiple interface.
13271         * config/nds32/nds32-predicates.c
13272         (nds32_valid_multiple_load_store): Rename ...
13273         (nds32_valid_multiple_load_store_p): ... to this and refine
13274         implementation.
13275         * config/nds32/predicates.md
13276         (nds32_load_multiple_and_update_address_operation): New predicate.
13277         (nds32_store_multiple_and_update_address_operation): New predicate.
13279 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13280             Chung-Ju Wu  <jasonwucj@gmail.com>
13282         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13283         (combo): New attribute.
13284         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13286 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13288         * config/nds32/nds32.opt: Change -mcmodel= default value.
13290 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
13291             Monk Chiang  <sh.chiang04@gmail.com>
13292             Chung-Ju Wu  <jasonwucj@gmail.com>
13294         * config/nds32/constants.md (unspec_element): New enum.
13295         * config/nds32/constraints.md (Umw): New constraint.
13296         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13297         * config/nds32/nds32-intrinsic.md: Likewise.
13298         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13299         (nds32_valid_smw_lwm_base_p): New.
13300         (nds32_output_smw_single_word): New.
13301         (nds32_output_lmw_single_word): New.
13302         (nds32_expand_unaligned_load): New.
13303         (nds32_expand_unaligned_store): New.
13304         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13305         (nds32_output_smw_single_word): Declare.
13306         (nds32_output_lmw_single_word): Declare.
13307         (nds32_expand_unaligned_load): Declare.
13308         (nds32_expand_unaligned_store): Declare.
13309         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13310         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13311         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13312         NDS32_BUILTIN_UASTORE_DW.
13313         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13314         predicate.
13316 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
13317             Kito Cheng  <kito.cheng@gmail.com>
13318             Chung-Ju Wu  <jasonwucj@gmail.com>
13320         * config/nds32/nds32-intrinsic.c
13321         (nds32_expand_builtin_null_ftype_reg): Delete.
13322         (nds32_expand_builtin_reg_ftype_imm): Ditto.
13323         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13324         (nds32_read_argument): New.
13325         (nds32_legitimize_target): Ditto.
13326         (nds32_legitimize_argument): Ditto.
13327         (nds32_check_constant_argument): Ditto.
13328         (nds32_expand_unop_builtin): Ditto.
13329         (nds32_expand_unopimm_builtin): Ditto.
13330         (nds32_expand_binop_builtin): Ditto.
13331         (nds32_builtin_decl_impl): Ditto.
13332         (builtin_description): Ditto.
13333         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13334         (nds32_init_builtins_impl): Ditto.
13335         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13336         (nds32_builtin_decl): New.
13337         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13338         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13340 2018-03-02  Jeff Law  <law@redhat.com>
13342         * reorg.c (stop_search_p): Handle DEBUG_INSN.
13343         (redundant_insn, fill_simple_delay_slots): Likewise.
13344         (fill_slots_from_thread): Likewise.
13345         * resource.c (mark_referenced_resources): Likewise.
13346         (mark_set_resources, find_dead_or_set_registers): Likewise.
13348 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13350         * substring-locations.h (format_warning_va): Formatting fix for
13351         ATTRIBUTE_GCC_DIAG.
13352         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13353         argument.
13354         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13355         * substring-locations.c: Include intl.h.
13356         (format_warning_va): Turned into small wrapper around
13357         format_warning_n_va, renamed to ...
13358         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13359         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13360         use ngettext.
13361         (format_warning_at_substring_n): New function.
13362         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13363         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
13364         format_warning_at_substring with just a shorter name instead of
13365         const function pointer.
13366         (fmtwarn_n): New function.
13367         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13368         appropriate, get rid of all the fmtstr temporaries, move conditionals
13369         with G_() wrapped string literals directly into fmtwarn arguments,
13370         cast dir.len to (int), formatting fixes.
13372 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
13374         * doc/invoke.texi: Remove "Cilk Plus" references.
13376 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13377             Richard Biener  <rguenther@suse.de>
13379         PR ipa/84628
13380         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13381         for error or warning attributes if CALL_FROM_THUNK_P is set.
13382         Formatting fixes.
13384 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13386         PR target/56540
13387         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13388         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13390         PR target/56540
13391         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13392         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13394         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13395         instead of -1U in last predictors element's probability member.
13397 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13399         PR ipa/83983
13400         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13401         arguments if they are comparable.
13403 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13405         PR tree-optimization/84634
13406         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13407         masks and masked_loop_p with a single loop_masks, making sure it's
13408         null for bb vectorization.
13410 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13412         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13413         (vect_analyze_data_ref_access): Use loop->safe_len rather than
13414         loop->force_vectorize to check whether there is no alias.
13416 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13418         PR target/84614
13419         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13420         prototypes.
13421         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13422         comments.
13423         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13424         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13425         instead of a loop around prev_real_insn.
13426         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13427         prev_real_insn.
13429         PR inline-asm/84625
13430         * config/i386/i386.c (ix86_print_operand): Use conditional
13431         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13432         zero vector.
13434 2018-03-02  Richard Biener  <rguenther@suse.de>
13436         PR tree-optimization/84427
13437         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13438         (bitmap_set_subtract_values): Rewrite to handle multiple
13439         exprs per value.
13440         (clean): Likewise.
13441         (prune_clobbered_mems): Likewise.
13442         (phi_translate): Take edge instead of pred/phiblock.
13443         (phi_translate_1): Likewise.
13444         (phi_translate_set): Likewise.  Insert all translated
13445         exprs for a value into the set, keeping possibly multiple
13446         expressions per value.
13447         (compute_antic_aux): Adjust for phi_translate changes.
13448         When intersecting union the expressions and prune those
13449         not in the final value set, keeping possibly multiple
13450         expressions per value.  Do not use value-insertion
13451         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13452         all expressions.  Add verification that the value-sets
13453         only shrink during iteration.
13454         (compute_partial_antic_aux): Adjust for the phi_translate changes.
13455         (do_pre_regular_insertion): Likewise.
13456         (do_pre_partial_partial_insertion): Likewise.
13458 2018-03-02  Richard Biener  <rguenther@suse.de>
13460         PR target/82005
13461         * config/darwin.c (saved_debug_info_level): New static global.
13462         (darwin_asm_lto_start): Disable debug info generation for LTO out.
13463         (darwin_asm_lto_end): Restore debug info generation settings.
13465 2018-03-01  Martin Liska  <mliska@suse.cz>
13467         PR sanitizer/82484
13468         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13469         volatile arguments.
13471 2018-03-01  Richard Biener  <rguenther@suse.de>
13473         PR debug/84645
13474         * dwarf2out.c (gen_variable_die): Properly handle late VLA
13475         type annotation with LTO when debug was disabled at compile-time.
13477 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
13479         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13480         XINT with INTVAL.
13481         (mips_final_postscan_insn): Likewise.
13483 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
13485         PR rtl-optimization/84528
13486         * alias.c (init_alias_target): Add commentary.
13487         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13488         a unique base value if the frame pointer is not eliminated
13489         to the stack pointer.
13491 2018-03-01  Tom de Vries  <tom@codesourcery.com>
13493         PR rtl-optimization/83327
13494         * lra-int.h (hard_regs_spilled_into): Declare.
13495         * lra.c (hard_regs_spilled_into): Define.
13496         (init_reg_info): Init hard_regs_spilled_into.
13497         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13498         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13499         (process_bb_lives): Handle hard_regs_spilled_into.
13500         (lra_create_live_ranges_1): Before doing liveness propagation, clear
13501         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13503 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
13505         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13506         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13507         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13508         * config/rs6000/aix72.h: New file.
13510 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
13512         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13513         instead of warning_at with conditional singular and plural messages
13514         where possible.
13516         PR target/52991
13517         * stor-layout.c (update_alignment_for_field): For
13518         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13519         && !DECL_PACKED (field), do the alignment update, just use
13520         only desired_align instead of MAX (type_align, desired_align)
13521         as the alignment.
13522         (place_field): Don't do known_align < desired_align handling
13523         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13524         is non-NULL, instead do it after rli->prev_field handling and
13525         only if not within a bitfield word.  For DECL_PACKED (field)
13526         use type_align of BITS_PER_UNIT.
13528 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
13530         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13531         superfluous parentheses and trailing spaces.
13533 2018-02-28  Richard Biener  <rguenther@suse.de>
13535         PR tree-optimization/84584
13536         * graphite-scop-detection.c (scop_detection::add_scop): Discard
13537         SCoPs with fake exit edge.
13539 2018-02-28  Martin Liska  <mliska@suse.cz>
13541         PR testsuite/84597
13542         * timevar.c (timer::print): Fix format to properly print 100%
13543         values.
13545 2018-02-28  Richard Biener  <rguenther@suse.de>
13547         PR middle-end/84607
13548         * genmatch.c (capture_info::walk_match): Do not mark
13549         captured expressions without operands as expr_p given
13550         they act more like predicates and should be subject to
13551         "lost tail" side-effect preserving.
13553 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
13555         PR rtl-optimization/81611
13556         * auto-inc-dec.c (attempt_change): Move dead note from
13557         mem_insn if it's the next use of regno
13558         (find_address): Take address use of reg holding
13559         non-incremented value.  Add parm to limit search to the named
13560         reg only.
13561         (merge_in_block): Attempt to use a mem insn that is the next
13562         use of the original regno.
13564 2018-02-27  Martin Sebor  <msebor@redhat.com>
13566         PR c++/83871
13567         * doc/invoke.texi (-Wmissing-attributes): New option.
13568         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13570 2018-02-27  Martin Sebor  <msebor@redhat.com>
13572         PR translation/84207
13573         * diagnostic-core.h (warning_n, error_n, inform_n): Change
13574         n argument to unsigned HOST_WIDE_INT.
13575         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13576         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
13577         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13578         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13580 2018-02-27  Richard Biener  <rguenther@suse.de>
13582         PR tree-optimization/84512
13583         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13584         Do not use the estimate returned from record_stmt_cost for
13585         the scalar iteration cost but sum properly using add_stmt_cost.
13587 2018-02-27  Richard Biener  <rguenther@suse.de>
13589         PR tree-optimization/84466
13590         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13591         Adjust last change to less strictly validate use operands.
13593 2018-02-27  Martin Liska  <mliska@suse.cz>
13595         PR gcov-profile/84548
13596         * gcov.c (process_file): Allow partial overlap and consider it
13597         also as group functions.
13598         (output_lines): Properly calculate range of lines for a group.
13600 2018-02-27  Martin Liska  <mliska@suse.cz>
13602         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13603         'ggc' suffixes.  Change first column width.
13604         (timer::print): Fix formatting of the column.
13606 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
13608         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13609         preserve inline entry blocks for the sake of debug inline
13610         entry point markers alone.
13611         (remove_unused_locals): Suggest in comments a better place to
13612         force the preservation of inline entry blocks that are
13613         otherwise unused, but do not preserve them.
13615 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13617         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13619 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13621         PR target/84039
13622         * config/i386/constraints.md (Bs): Replace
13623         ix86_indirect_branch_register with
13624         TARGET_INDIRECT_BRANCH_REGISTER.
13625         (Bw): Likewise.
13626         * config/i386/i386.md (indirect_jump): Likewise.
13627         (tablejump): Likewise.
13628         (*sibcall_memory): Likewise.
13629         (*sibcall_value_memory): Likewise.
13630         Peepholes of indirect call and jump via memory: Likewise.
13631         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13632         (*sibcall_value_GOT_32): Likewise.
13633         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13634         (GOT_memory_operand): Likewise.
13635         (call_insn_operand): Likewise.
13636         (sibcall_insn_operand): Likewise.
13637         (GOT32_symbol_operand): Likewise.
13638         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13640 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13642         PR rtl-optimization/83496
13643         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13644         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
13645         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13646         redundant insn, if any.
13647         (relax_delay_slots): Likewise.
13648         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13650 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
13652         PR tree-optimization/83965
13653         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13654         that grouped statements are part of a reduction chain.  Return
13655         true if the statement is not marked as a reduction itself but
13656         is part of a group.
13657         (vect_recog_dot_prod_pattern): Don't check whether the statement
13658         is part of a group here.
13659         (vect_recog_sad_pattern): Likewise.
13660         (vect_recog_widen_sum_pattern): Likewise.
13662 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13664         PR debug/84545
13665         * final.c (rest_of_clean_state): Also look for calls inside sequences.
13667 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13669         PR target/84530
13670         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13671         the bool argument.
13672         (ix86_output_indirect_function_return): New prototype.
13673         (ix86_split_simple_return_pop_internal): Likewise.
13674         * config/i386/i386.c (indirect_return_via_cx): New.
13675         (indirect_return_via_cx_bnd): Likewise.
13676         (indirect_thunk_name): Handle return va CX_REG.
13677         (output_indirect_thunk_function): Create alias for
13678         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13679         (ix86_output_indirect_jmp): Remove the bool argument.
13680         (ix86_output_indirect_function_return): New function.
13681         (ix86_split_simple_return_pop_internal): Likewise.
13682         * config/i386/i386.md (*indirect_jump): Don't pass false
13683         to ix86_output_indirect_jmp.
13684         (*tablejump_1): Likewise.
13685         (simple_return_pop_internal): Change it to define_insn_and_split.
13686         Call ix86_split_simple_return_pop_internal to split it for
13687         -mfunction-return=.
13688         (simple_return_indirect_internal): Call
13689         ix86_output_indirect_function_return instead of
13690         ix86_output_indirect_jmp.
13692 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
13694         PR bootstrap/84405
13695         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13696         memset and value initialization afterwards.
13698 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
13700         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13702 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13704         PR target/84521
13705         * common/config/aarch64/aarch64-common.c
13706         (aarch_option_optimization_table[]): Switch
13707         off fomit-frame-pointer
13709 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13710             Chung-Ju Wu  <jasonwucj@gmail.com>
13712         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13713         volatile memory.
13714         (store_multiple): Ditto.
13716 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13718         * config.gcc: Add --with-cpu support for nds32 target.
13719         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13720         * config/nds32/nds32.opt: Add -mcpu= option.
13722 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13724         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13725         isel=yes): Warn for these deprecated options.
13727 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13729         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13730         ISA_2_5_MASKS_EMBEDDED.
13732 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13734         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13735         p->max as pointers rather than using iterative_hash_expr.
13737 2018-02-23  Carl Love  <cel@us.ibm.com>
13739         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13740         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13741         BU_P8V_OVERLOAD_2.
13742         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13743         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13744         P8V_BUILTIN_VEC_VUNSIGNED2.
13746 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13748         PR target/81572
13749         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13750         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13751         LRA_UNKNOWN_ALT.
13752         * lra-constraints.c (curr_insn_transform): Set up
13753         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13754         LRA_UNKNOWN_ALT.
13755         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13756         * lra-eliminations.c (spill_pseudos): Ditto.
13757         (process_insn_for_elimination): Ditto.
13758         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13759         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13760         LRA_NON_CLOBBERED_ALT.
13762 2018-02-22  Martin Sebor  <msebor@redhat.com>
13764         PR tree-optimization/84480
13765         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13766         to maybe_diag_stxncpy_trunc.  Call it.
13767         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13768         from gimple_fold_builtin_strcpy.  Print inlining stack.
13769         (handle_builtin_stxncpy): Print inlining stack.
13770         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13772 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13774         PR target/84176
13775         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13776         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13777         and -fcheck-pointer-bounds are used together.
13778         (indirect_thunk_prefix): New enum.
13779         (indirect_thunk_need_prefix): New function.
13780         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13781         "_nt" instead of "_bnd" for NOTRACK prefix.
13782         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13783         (output_indirect_thunk_function): Likewise.
13784         (): Likewise.
13785         (ix86_code_end): Update output_indirect_thunk_function calls.
13786         (ix86_output_indirect_branch_via_reg): Replace
13787         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13788         (ix86_output_indirect_branch_via_push): Likewise.
13789         (ix86_output_function_return): Likewise.
13790         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13791         incompatible with -fcf-protection=branch and
13792         -fcheck-pointer-bounds.
13794 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13796         PR target/83335
13797         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13798         Change gcc_assert call to output_operand_lossage.
13800 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13802         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13804 2018-02-22  DJ Delorie  <dj@redhat.com>
13805             Sebastian Perta  <sebastian.perta@renesas.com>
13806             Oleg Endo  <olegendo@gcc.gnu.org>
13808         * config/rx/rx.c (rx_rtx_costs): New function.
13809         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13811 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13813         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13815 2018-02-22  Martin Liska  <mliska@suse.cz>
13817         PR driver/83193
13818         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13819         Add "native" as a possible value.
13821 2018-02-22  Martin Liska  <mliska@suse.cz>
13823         PR driver/83193
13824         * config/i386/i386.c (ix86_option_override_internal):
13825         Add "native" as a possible value for -march and -mtune.
13827 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
13829         PR target/84502
13830         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13831         to all type variants.
13833         PR tree-optimization/84503
13834         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13835         width as info->bitpos + info->bitsize - start.
13836         (merged_store_group::merge_overlapping): Simplify width computation.
13837         (check_no_overlap): New function.
13838         (imm_store_chain_info::try_coalesce_bswap): Compute expected
13839         start + width and last_order of the group, fail if check_no_overlap
13840         fails.
13841         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13842         to group if check_no_overlap fails.
13844 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13846         * config/rs6000/altivec.md: Delete contraint arguments to
13847         define_expand, define_split, and define_peephole2, and in
13848         define_insn_and_split if always unused.
13849         * config/rs6000/darwin.md: Ditto.
13850         * config/rs6000/dfp.md: Ditto.
13851         * config/rs6000/rs6000.md: Ditto.
13852         * config/rs6000/sync.md: Ditto.
13853         * config/rs6000/vector.md: Ditto.
13854         * config/rs6000/vsx.md: Ditto.
13856 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
13858         * config/rs6000/altivec.md: Write output control strings as braced
13859         blocks instead of double-quoted strings.
13860         * config/rs6000/darwin.md: Ditto.
13861         * config/rs6000/rs6000.md: Ditto.
13862         * config/rs6000/vector.md: Ditto.
13863         * config/rs6000/vsx.md: Ditto.
13865 2018-02-21  Jason Merrill  <jason@redhat.com>
13867         PR c++/84314 - ICE with templates and fastcall attribute.
13868         * attribs.c (build_type_attribute_qual_variant): Remove assert.
13870 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13872         * ipa-cp.c (determine_versionability): Fix comment typos.
13874 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
13876         PR c/84229
13877         * ipa-cp.c (determine_versionability): Do not version functions caling
13878         va_arg_pack.
13880 2018-02-21  Martin Liska  <mliska@suse.cz>
13882         PR driver/83193
13883         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13884         Add "native" as a possible value.
13885         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
13886         the macro when native cpu detection is available.
13888 2018-02-21  Martin Liska  <mliska@suse.cz>
13890         PR driver/83193
13891         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13892         Add "native" as a possible value.
13893         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13894         when native cpu detection is available.
13896 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
13897             Martin Sebor  <msebor@redhat.com>
13899         PR tree-optimization/84478
13900         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13901         false.
13902         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13903         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13904         support which is conservatively correct, for 2 only stay conservative
13905         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
13906         argument to the 2 argument get_range_strlen, adjust 6 arg
13907         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13908         false.
13909         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13910         (gimple_fold_builtin_strlen): Pass true as last argument to
13911         get_range_strlen.
13913 2018-02-20  Martin Sebor  <msebor@redhat.com>
13915         PR middle-end/84095
13916         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13917         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
13918         (builtin_memref::builtin_memref): Factor out parts into
13919         set_base_and_offset and call it.
13921 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13923         PR middle-end/84406
13924         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13925         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13926         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
13927         search at the associated MODE_INT.
13929 2018-02-20  Jeff Law  <law@redhat.com>
13931         PR middle-end/82123
13932         PR tree-optimization/81592
13933         PR middle-end/79257
13934         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13935         for range data rather than using global data.
13936         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13937         range data rather than using global data.
13938         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13939         pass it to children as needed.
13940         (struct directive::fmtresult): Similarly.
13941         (struct directive::set_width): Similarly.
13942         (struct directive::set_precision): Similarly.
13943         (format_integer, format_directive, parse_directive): Similarly.
13944         (format_none): Accept unnamed vr_values parameter.
13945         (format_percent, format_floating, format_character): Similarly.
13946         (format_string, format_plain): Similarly.
13947         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13948         the EVRP range analyzer for range data rather than using global data.
13949         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13950         gimple-ssa-evrp-analyze.h
13951         (class sprintf_dom_walker): Add after_dom_children member function.
13952         Add evrp_range_analyzer member.
13953         (sprintf_dom_walker::before_dom_children): Call into the EVRP
13954         range analyzer as needed.
13955         (sprintf_dom_walker::after_dom_children): New member function.
13956         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13957         if not optimizing.
13958         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13959         (evrp_range_analyzer::pop_to_marker): Likewise.
13961 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
13963         PR tree-optimization/84419
13964         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13965         with the required type if its current type is compatible but
13966         different.
13968 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
13970         PR middle-end/82004
13971         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13972         after vectorization.
13974 2018-02-20  Martin Liska  <mliska@suse.cz>
13976         PR driver/83193
13977         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13978         possible values if we don't have a hint.
13980 2018-02-20  Martin Liska  <mliska@suse.cz>
13982         PR c/84310
13983         PR target/79747
13984         * final.c (shorten_branches): Build align_tab array with one
13985         more element.
13986         * opts.c (finish_options): Add alignment option limit check.
13987         (MAX_CODE_ALIGN): Likewise.
13988         (MAX_CODE_ALIGN_VALUE): Likewise.
13989         * doc/invoke.texi: Document maximum allowed option value for
13990         all -falign-* options.
13992 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
13994         PR target/84146
13995         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
13996         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
13997         * var-tracking.c (emit_note_insn_var_location): Remove all references
13998         to NOTE_INSN_CALL_ARG_LOCATION.
13999         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14000         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14001         Use copy_rtx_if_shared.
14002         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14003         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14004         (dwarf2out_var_location): Remove handling of
14005         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14006         on call_insn.
14007         * final.c (final_scan_insn): Remove all references to
14008         NOTE_INSN_CALL_ARG_LOCATION.
14009         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
14010         before dumping final insns.
14011         * except.c (emit_note_eh_region_end): Remove all references to
14012         NOTE_INSN_CALL_ARG_LOCATION.
14013         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14014         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14015         * config/arc/arc.c (hwloop_optimize): Likewise.
14016         * config/arm/arm.c (create_fix_barrier): Likewise.
14017         * config/s390/s390.c (s390_chunkify_start): Likewise.
14018         * config/sh/sh.c (find_barrier): Likewise.
14019         * config/i386/i386.c (rest_of_insert_endbranch,
14020         ix86_seh_fixup_eh_fallthru): Likewise.
14021         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14022         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14023         * config/frv/frv.c (frv_function_prologue): Likewise.
14024         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
14025         reg note.
14026         (note_outside_basic_block_p): Remove all references to
14027         NOTE_INSN_CALL_ARG_LOCATION.
14028         * gengtype.c (adjust_field_rtx_def): Likewise.
14029         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14030         Likewise.
14031         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14032         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14034         PR c++/84444
14035         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14036         is ADDR_EXPR.
14038         PR tree-optimization/84452
14039         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14040         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14041         is NULL.
14043 2018-02-19  Martin Liska  <mliska@suse.cz>
14045         PR sanitizer/82183
14046         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14048 2018-02-19  Martin Liska  <mliska@suse.cz>
14049             Richard Sandiford  <richard.sandiford@linaro.org>
14051         PR tree-optimization/82491
14052         * gimple-fold.c (get_base_constructor): Make earlier bail out
14053         to prevent ubsan.
14055 2018-02-19  Carl Love  <cel@us.ibm.com>
14057         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14058         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14059         BU_P8V_OVERLOAD_1.
14060         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14061         P8V_BUILTIN_VEC_NEG.
14063 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
14065         * config/rl78/rl78.md (movdf): New define expand.
14067 2018-02-19  Martin Liska  <mliska@suse.cz>
14069         PR other/80589
14070         * doc/invoke.texi: Fix typo.
14071         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14073 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
14075         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14076         handle rs6000_single_float and rs6000_double_float specially for
14077         e500 family CPUs.
14079 2018-02-16  Jeff Law  <law@redhat.com>
14081         * config/rx/rx.c (add_pop_cfi_notes): New function.;
14082         (pop_regs): Use it.
14084 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14086         PR ipa/84425
14087         * ipa-inline.c (inline_small_functions): Fix a typo.
14089 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14091         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14093 2018-02-16  Carl Love  <cel@us.ibm.com>
14095         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14096         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14097         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14098         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14099         expansion to P8V_BUILTIN_VEC_FLOAT2.
14101 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
14103         PR rtl-optimization/70023
14104         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14105         src_regno into account.
14107 2018-02-16  Carl Love  <cel@us.ibm.com>
14109         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14110         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14111         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14112         * config/rs6000/rs6000.c: Remove case statements for
14113         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14114         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14115         and P9V_BUILTIN_VEC_VINSERT4B.
14116         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14117         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14118         * config/rs6000/vsx.md:
14119         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14120         vec_insert4b.
14122 2018-02-16  Carl Love  <cel@us.ibm.com>
14124         * config/rs6000/altivec.h: Add builtin names vec_extract4b
14125         vec_insert4b.
14126         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14127         definitions.
14128         * config/rs6000/rs6000-c.c: Add the definitions for
14129         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14130         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14131         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14132         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
14133         definition for insert4b and define insn *insert3b_internal.
14134         * doc/extend.texi: Add documentation for vec_extract4b.
14136 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14138         * doc/extend.texi (Backwards Compatibility): Mention friend
14139         injection.  Note for-scope is deprecated.
14140         * doc/invoke.texi (-ffriend-injection): Deprecate.
14142 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
14144         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14145         that moved to I2, also allow destinations that are a paradoxical
14146         subreg (instead of a normal reg).
14148 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
14150         PR target/83831
14151         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14152         to QImode.
14154 2018-02-16  Richard Biener  <rguenther@suse.de>
14156         PR tree-optimization/84037
14157         PR tree-optimization/84016
14158         PR target/82862
14159         * config/i386/i386.c (ix86_builtin_vectorization_cost):
14160         Adjust vec_construct for the fact we need additional higher latency
14161         128bit inserts for AVX256 and AVX512 vector builds.
14162         (ix86_add_stmt_cost): Scale vector construction cost for
14163         elementwise loads.
14165 2018-02-16  Richard Biener  <rguenther@suse.de>
14167         PR tree-optimization/84417
14168         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14169         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14170         (non_rewritable_lvalue_p): Likewise, use poly-ints.
14172 2018-02-16  Martin Liska  <mliska@suse.cz>
14174         PR sanitizer/84307
14175         * internal-fn.def (ASAN_CHECK): Set proper flags.
14176         (ASAN_MARK): Likewise.
14178 2018-02-16  Julia Koval  <julia.koval@intel.com>
14180         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14181         from PTA_CANNONLAKE.
14183 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14185         PR target/84272
14186         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14187         Use ++iter rather than iter++ for std::list iterators.
14188         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
14189         defer deleting them until all nodes in the forest are processed.  Do
14190         free even leaf nodes.  Change to_process into auto_vec.
14192         PR bootstrap/84405
14193         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14194         * vec.h (vec_default_construct): Use memset instead of placement new
14195         if BROKEN_VALUE_INITIALIZATION is defined.
14196         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14197         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14198         is defined.
14200         PR rtl-optimization/83723
14201         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14202         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
14203         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
14204         recursive calls.
14205         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14206         callers.
14207         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14209 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
14211         PR rtl-optimization/81443
14212         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14213         from inner REGs to paradoxical SUBREGs.
14215 2018-02-16  Richard Biener  <rguenther@suse.de>
14217         PR tree-optimization/84399
14218         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14219         For operands we can analyze at their definition make sure we can
14220         analyze them at each use as well.
14222 2018-02-16  Richard Biener  <rguenther@suse.de>
14224         PR tree-optimization/84190
14225         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14226         volatile accesses if the decl isn't volatile.
14228 2018-02-15  Jason Merrill  <jason@redhat.com>
14230         PR c++/84314 - ICE with templates and fastcall attribute.
14231         * attribs.c (build_type_attribute_qual_variant): Don't clobber
14232         TYPE_CANONICAL on an existing type.
14234 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
14236         PR tree-optimization/84383
14237         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14238         dstoff nor call operand_equal_p if dstbase is NULL.
14240         PR tree-optimization/84334
14241         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14242         also a CONSTANT_CLASS_P, punt.
14244 2018-02-14  Jim Wilson  <jimw@sifive.com>
14246         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14247         first SMALL_OPERAND check.  New local min_second_step.  Move assert
14248         to where locals are set.  Add TARGET_RVC support.
14249         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14251 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
14253         * doc/invoke.texi: Correct -Wformat-overflow code sample.
14255 2018-02-14  Martin Sebor  <msebor@redhat.com>
14257         PR tree-optimization/83698
14258         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14259         arrays constrain the offset range to their bounds.
14260         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14261         (builtin_access::overlap): Avoid setting the size of overlap if it's
14262         already been set.
14263         (maybe_diag_overlap): Also consider arrays when deciding what values
14264         of offsets to include in diagnostics.
14266 2018-02-14  Martin Sebor  <msebor@redhat.com>
14268         PR c/84108
14269         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14270         that correspond to the kind of a declaration.
14272 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
14274         PR target/83984
14275         * config/pa/pa.md: Load address of PIC label using the linkage table
14276         if the label is nonlocal.
14278 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14280         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14281         warning message if user requests -maltivec=be.
14282         * doc/invoke.texi: Document deprecation of -maltivec=be.
14284 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
14286         PR target/84220
14287         * config/rs6000/rs6000-c.c: Update definitions for
14288         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14289         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14291 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14293         PR target/84239
14294         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14295         add _get_ssp intrinsics. Remove argument from
14296         __builtin_ia32_rdssp[d|q].
14297         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14298         * config/i386/i386-builtin.def: Remove argument from
14299         __builtin_ia32_rdssp[d|q].
14300         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14301         ix86_expand_special_args_builtin for _rdssp[d|q].
14302         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14303         Clear register before usage.
14304         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14305         Add documentation for new _get_ssp and _inc_ssp intrinsics.
14307 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
14309         PR tree-optimization/84357
14310         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14311         operand 1 of an ARRAY_REF too.
14313 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
14315         PR target/83831
14316         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14317         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14318         declarations.
14319         (set_of_reg): New struct.
14320         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14321         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14322         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14323         functions.
14324         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14325         Split into bitclr, bitset, bitinvert patterns if appropriate.
14326         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14327         use rx_fuse_in_memory_bitop.
14328         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14329         to named insn, correct maximum insn length.
14331 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
14333         PR target/79242
14334         * machmode.def: Define a complex mode for PARTIAL_INT.
14335         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14336         MODE_PARTIAL_INT.
14337         * doc/rtl.texi: Document CSPImode.
14338         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14339         handling.
14340         (msp430_hard_regno_nregs_with_padding): Likewise.
14342 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
14344         PR target/84279
14345         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14347 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
14349         PR rtl-optimization/84169
14350         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
14351         we generated a parallel as new i3 and we split that to new i2 and i3
14352         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
14353         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
14354         those to i2, not i1.  Partially rewrite this scan code.
14356 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14358         PR c/82210
14359         * stor-layout.c (place_field): For variable length fields, adjust
14360         offset_align afterwards not just based on the field's alignment,
14361         but also on the size.
14363         PR middle-end/84309
14364         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14365         of exps and logs in the use_exp2 case.
14367 2018-02-13  Jeff Law  <law@redhat.com>
14369         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14370         entry for "vector".
14372         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14373         ARGS as unused.
14375 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
14377         PR debug/84342
14378         PR debug/84319
14379         * common.opt (gas-loc-support, gas-locview-support): New.
14380         (ginline-points, ginternal-reset-location-views): New.
14381         * doc/invoke.texi: Document them.  Use @itemx where intended.
14382         (gvariable-location-views): Adjust.
14383         * target.def (reset_location_view): New.
14384         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14385         (TARGET_RESET_LOCATION_VIEW): New.
14386         * doc/tm.texi: Rebuilt.
14387         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14388         (dwarf2out_default_as_locview_support): New.
14389         (output_asm_line_debug_info): Use option variables.
14390         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14391         (output_loc_list): Likewise.
14392         (add_high_low_attributes): Check option variables.
14393         Don't output entry view attribute in strict mode.
14394         (gen_inlined_subroutine_die): Check option variables.
14395         (dwarf2out_inline_entry): Likewise.
14396         (init_sections_and_labels): Likewise.
14397         (dwarf2out_early_finish): Likewise.
14398         (maybe_reset_location_view): New, from...
14399         (dwarf2out_var_location): ... here.  Call it.
14400         * debug.h (dwarf2out_default_as_loc_support): Declare.
14401         (dwarf2out_default_as_locview_support): Declare.
14402         * hooks.c (hook_int_rtx_insn_0): New.
14403         * hooks.h (hook_int_rtx_insn_0): Declare.
14404         * toplev.c (process_options): Take -gas-loc-support and
14405         -gas-locview-support from dwarf2out.  Enable
14406         -gvariable-location-views by default only with locview
14407         assembler support.  Enable -ginternal-reset-location-views by
14408         default only if the target defines the corresponding hook.
14409         Enable -ginline-points by default if location views are
14410         enabled; force it disabled if statement frontiers are
14411         disabled.
14412         * tree-inline.c (expand_call_inline): Check option variables.
14413         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14415 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
14417         PR tree-optimization/84321
14418         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14419         handling.  Also check whether the anti-range contains any values
14420         that satisfy the mask; switch to a VR_RANGE if not.
14422 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
14424         PR sanitizer/84340
14425         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14427 2018-02-13  Martin Jambor  <mjambor@suse.cz>
14429         PR c++/83990
14430         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14431         of call statements, also set location of a load to a temporary.
14433 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
14435         * config/rl78/rl78.c (add_vector_labels): New function.
14436         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14437         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14438         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14439         which checks that no arguments are passed.
14440         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14441         * doc/extend.texi: Documentation for the new attribute.
14443 2018-02-13  Andreas Schwab  <schwab@suse.de>
14445         * config/riscv/linux.h (CPP_SPEC): Define.
14447 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14449         PR target/84335
14450         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14451         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14452         OPTION_MASK_ISA_AES as first argument to def_builtin_const
14453         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14454         instead of OPTION_MASK_ISA_PCLMUL as first argument to
14455         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14456         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14457         temporarily for AES and PCLMUL builtins.
14459         PR tree-optimization/84339
14460         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14461         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14462         Formatting fixes.
14464         PR middle-end/84309
14465         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14466         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14467         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14468         inline function.
14469         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14470         inline function.
14471         * omp-simd-clone.h: New file.
14472         * omp-simd-clone.c: Include omp-simd-clone.h.
14473         (expand_simd_clones): No longer static.
14474         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14475         cgraph.h and omp-simd-clone.h.
14476         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14477         (vect_recog_widen_shift_pattern): Formatting fix.
14478         (vect_pattern_recog_1): Don't check optab for calls.
14480         PR target/84336
14481         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14482         operands[2] into a REG before using gen_lowpart on it.
14484 2018-02-12  Jeff Law  <law@redhat.com>
14486         PR target/83760
14487         * config/sh/sh.c (find_barrier): Consider a sibling call
14488         a barrier as well.
14490         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14491         successfully back substituting a reg.
14493 2018-02-12  Richard Biener  <rguenther@suse.de>
14495         PR tree-optimization/84037
14496         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14497         parameter, move visited init to caller.
14498         (vect_slp_analyze_operations): Separate cost from validity
14499         check, initialize visited once for all instances.
14500         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14501         for all instances.
14502         * tree-vect-stmts.c (vect_model_simple_cost): Make early
14503         out an assert.
14504         (vect_model_promotion_demotion_cost): Likewise.
14505         (vectorizable_bswap): Guard cost modeling with !slp_node
14506         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14507         SLP stmts.
14508         (vectorizable_call): Likewise.
14509         (vectorizable_conversion): Likewise.
14510         (vectorizable_assignment): Likewise.
14511         (vectorizable_shift): Likewise.
14512         (vectorizable_operation): Likewise.
14513         (vectorizable_store): Likewise.
14514         (vectorizable_load): Likewise.
14515         (vectorizable_condition): Likewise.
14516         (vectorizable_comparison): Likewise.
14518 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
14520         PR sanitizer/84307
14521         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14522         (ASAN_MARK): Fix fnspec to account for return value, change pointer
14523         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14525 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14527         PR middle-end/83665
14528         * params.def (inline-min-speedup): Increase from 8 to 15.
14529         (max-inline-insns-auto): Decrease from 40 to 30.
14530         * ipa-split.c (consider_split): Add some buffer for function to
14531         be considered inlining candidate.
14532         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14533         default values.
14535 2018-02-12  Richard Biener  <rguenther@suse.de>
14537         PR tree-optimization/84037
14538         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14539         matched stmts if we cannot swap the non-matched ones.
14541 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14543         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14544         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14545         _mm_maskz_scalef_round_ss): New intrinsics.
14546         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14547         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14548         __builtin_ia32_scalefss_round): Remove.
14549         (__builtin_ia32_scalefsd_mask_round,
14550         __builtin_ia32_scalefss_mask_round): New intrinsics.
14551         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14552         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14553         ((match_operand:VF_128 2 "<round_nimm_predicate>"
14554         "<round_constraint>")): Changed to ...
14555         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14556         "<round_scalar_constraint>")): ... this.
14557         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14558         %0, %1, %2<round_op3>}"): Changed to ...
14559         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14560         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14561         %2<round_scalar_mask_op3>}"): ... this.
14562         * config/i386/subst.md (round_scalar_nimm_predicate): New.
14564 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14566         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14567         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14568         (_mm_maskz_sqrt_round_ss): New intrinsics.
14569         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14570         (__builtin_ia32_sqrtsd_mask_round)
14571         (__builtin_ia32_sqrtss_mask_round): New builtins.
14572         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14573         (__builtin_ia32_sqrtss_round): Remove.
14574         (__builtin_ia32_sqrtsd_mask_round)
14575         (__builtin_ia32_sqrtss_mask_round): New builtins.
14576         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14577         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14578         ((match_operand:VF_128 1 "vector_operand"
14579         "xBm,<round_constraint>")): Changed to ...
14580         ((match_operand:VF_128 1 "vector_operand"
14581         "xBm,<round_scalar_constraint>")): ... this.
14582         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14583         %0, %2, %<iptr>1<round_op3>}): Changed to ...
14584         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14585         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14586         %<iptr>1<round_scalar_mask_op3>}): ... this.
14587         ((set_attr "prefix" "<round_prefix>")): Changed to ...
14588         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14590 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
14592         PR target/84266
14593         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14594         Cast vec_cmpeq result to correct type.
14595         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14596         Cast vec_cmpgt result to correct type.
14598 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
14600         * final.c (final_scan_insn_1): Renamed from...
14601         (final_scan_insn): ... this.  New wrapper, to recover
14602         seen from the outermost call in recursive ones.
14603         * config/sparc/sparc.c (output_return): Drop seen from call.
14604         (output_sibcall): Likewise.
14605         * config/visium/visium.c (output_branch): Likewise.
14607 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
14609         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14610         function label.
14612 2018-02-10  Alan Modra  <amodra@gmail.com>
14614         PR target/84300
14615         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14616         Specify LR as an input.
14618 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
14620         PR sanitizer/83987
14621         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14622         remove_member_access_dummy_vars): New functions.
14623         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14624         lower_omp_1, execute_lower_omp): Use them.
14626         PR rtl-optimization/84308
14627         * shrink-wrap.c (spread_components): Release todo vector.
14629 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
14631         PR rtl-optimization/57193
14632         * ira-color.c (struct allocno_color_data): Add member
14633         conflict_allocno_hard_prefs.
14634         (update_conflict_allocno_hard_prefs): New.
14635         (bucket_allocno_compare_func): Add a preference based on
14636         conflict_allocno_hard_prefs.
14637         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14638         (color_allocnos): Remove a dead code.  Initiate
14639         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
14641 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14643         PR target/84226
14644         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14645         constraint from =wa to wa.  Avoid a subreg on the output operand,
14646         instead use a pseudo and subreg it in a move.
14647         (p9_xxbrd_<mode>): Changed to ...
14648         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14649         (p9_xxbrd_v2df): New expander.
14650         (p9_xxbrw_<mode>): Changed to ...
14651         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14652         (p9_xxbrw_v4sf): New expander.
14654 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14656         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14658 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
14660         PR target/83926
14661         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14662         multiply in 32-bit mode.
14663         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14664         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14665         mode.
14667 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14669         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14670         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14671         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14672         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14674 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
14676         PR lto/84213
14677         * dwarf2out.c (is_trivial_indirect_ref): New function.
14678         (dwarf2out_late_global_decl): Do not generate a location
14679         attribute for variables that have a non-trivial DECL_VALUE_EXPR
14680         and that are not defined in the current unit.
14682 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14684         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14685         instead of a libcall for UNORDERED.
14687 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
14689         PR target/82641
14690         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14691         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14693 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14695         PR target/PR84295
14696         * config/s390/s390.c (s390_set_current_function): Invoke
14697         s390_indirect_branch_settings also if fndecl didn't change.
14699 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14701         * config/rs6000/rs6000.md (blockage): Set length to zero.
14703 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14705         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14707 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14709         PR sanitizer/84285
14710         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14711         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14712         -static-lib*san.
14714         PR debug/84252
14715         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14716         PARALLEL incoming that failed vt_get_decl_and_offset check.
14718         PR middle-end/84237
14719         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14720         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14721         TREE_READONLY bit.
14722         (get_variable_section): For decls in named .bss* sections pass true as
14723         second argument to bss_initializer_p.
14725 2018-02-09  Marek Polacek  <polacek@redhat.com>
14726             Jakub Jelinek  <jakub@redhat.com>
14728         PR c++/83659
14729         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14730         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14731         Sync some changes from cxx_fold_indirect_ref.
14733 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14735         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14736         markers.
14737         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14738         (BLOCK_INLINE_ENTRY_LABEL): New.
14739         (dwarf2out_var_location): Disregard inline entry markers.
14740         (inline_entry_data): New struct.
14741         (inline_entry_data_hasher): New hashtable type.
14742         (inline_entry_data_hasher::hash): New.
14743         (inline_entry_data_hasher::equal): New.
14744         (inline_entry_data_table): New variable.
14745         (add_high_low_attributes): Add DW_AT_entry_pc and
14746         DW_AT_GNU_entry_view attributes if a pending entry is found
14747         in inline_entry_data_table.  Add old entry_pc attribute only
14748         if debug nonbinding markers are disabled.
14749         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14750         markers are enabled.
14751         (block_within_block_p, dwarf2out_inline_entry): New.
14752         (dwarf2out_finish): Check that no entries remained in
14753         inline_entry_data_table.
14754         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14755         (final_scan_insn, notice_source_line): Likewise.
14756         (rest_of_clean_state): Skip inline entry markers.
14757         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14758         markers.
14759         * gimple.c (gimple_build_debug_inline_entry): New.
14760         * gimple.h (enum gimple_debug_subcode): Add
14761         GIMPLE_DEBUG_INLINE_ENTRY.
14762         (gimple_build_debug_inline_entry): Declare.
14763         (gimple_debug_inline_entry_p): New.
14764         (gimple_debug_nonbind_marker_p): Adjust.
14765         * insn-notes.def (INLINE_ENTRY): New.
14766         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14767         inline entry marker notes.
14768         (print_insn): Likewise.
14769         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14770         (INSN_DEBUG_MARKER_KIND): Likewise.
14771         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14772         * tree-inline.c (expand_call_inline): Build and insert
14773         debug_inline_entry stmt.
14774         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14775         inline entry blocks early, if nonbind markers are enabled.
14776         (dump_scope_block): Dump fragment info.
14777         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14778         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14779         (gimple_build_debug_inline_entry): New.
14780         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14781         Enable/disable inline entry points too.
14782         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14783         (DEBUG_INSN): Describe inline entry markers.
14785         * common.opt (gvariable-location-views): New.
14786         (gvariable-location-views=incompat5): New.
14787         * config.in: Rebuilt.
14788         * configure: Rebuilt.
14789         * configure.ac: Test assembler for view support.
14790         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14791         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14792         * dwarf2out.c (var_loc_view): New typedef.
14793         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14794         (dwarf2out_locviews_in_attribute): New.
14795         (dwarf2out_locviews_in_loclist): New.
14796         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14797         (enum dw_line_info_opcode): Add LI_adv_address.
14798         (struct dw_line_info_table): Add view.
14799         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14800         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14801         (zero_view_p): New variable.
14802         (ZERO_VIEW_P): New macro.
14803         (output_asm_line_debug_info): New.
14804         (struct var_loc_node): Add view.
14805         (add_AT_view_list, AT_loc_list): New.
14806         (add_var_loc_to_decl): Add view param.  Test it against last.
14807         (new_loc_list): Add view params.  Record them.
14808         (AT_loc_list_ptr): Handle loc and view lists.
14809         (view_list_to_loc_list_val_node): New.
14810         (print_dw_val): Handle dw_val_class_view_list.
14811         (size_of_die): Likewise.
14812         (value_format): Likewise.
14813         (loc_list_has_views): New.
14814         (gen_llsym): Set vl_symbol too.
14815         (maybe_gen_llsym, skip_loc_list_entry): New.
14816         (dwarf2out_maybe_output_loclist_view_pair): New.
14817         (output_loc_list): Output view list or entries too.
14818         (output_view_list_offset): New.
14819         (output_die): Handle dw_val_class_view_list.
14820         (output_dwarf_version): New.
14821         (output_compilation_unit_header): Use it.
14822         (output_skeleton_debug_sections): Likewise.
14823         (output_rnglists, output_line_info): Likewise.
14824         (output_pubnames, output_aranges): Update version comments.
14825         (output_one_line_info_table): Output view numbers in asm comments.
14826         (dw_loc_list): Determine current endview, pass it to new_loc_list.
14827         Call maybe_gen_llsym.
14828         (loc_list_from_tree_1): Adjust.
14829         (add_AT_location_description): Create view list attribute if
14830         needed, check it's absent otherwise.
14831         (convert_cfa_to_fb_loc_list): Adjust.
14832         (maybe_emit_file): Call output_asm_line_debug_info for test.
14833         (dwarf2out_var_location): Reset views as needed.  Precompute
14834         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
14835         attribute.  Set view.
14836         (new_line_info_table): Reset next view.
14837         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14838         (dwarf2out_source_line): Likewise.  Output view resets and labels to
14839         the assembler, or select appropriate line info opcodes.
14840         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14841         (optimize_string_length): Catch it.  Adjust.
14842         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
14843         dw_val_class_view_list, and remove it if no longer needed.
14844         (hash_loc_list): Hash view numbers.
14845         (loc_list_hasher::equal): Compare them.
14846         (optimize_location_lists): Check whether a view list symbol is
14847         needed, and whether the locview attribute is present, and
14848         whether they match.  Remove the locview attribute if no longer
14849         needed.
14850         (index_location_lists): Call skip_loc_list_entry for test.
14851         (dwarf2out_finish): Call output_asm_line_debug_info for test.
14852         Use output_dwarf_version.
14853         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14854         (struct dw_val_node): Add val_view_list.
14855         * final.c (SEEN_NEXT_VIEW): New.
14856         (set_next_view_needed): New.
14857         (clear_next_view_needed): New.
14858         (maybe_output_next_view): New.
14859         (final_start_function): Rename to...
14860         (final_start_function_1): ... this.  Take pointer to FIRST,
14861         add SEEN parameter.  Emit param bindings in the initial view.
14862         (final_start_function): Reintroduce SEEN-less interface.
14863         (final): Rename to...
14864         (final_1): ... this.  Take SEEN parameter.  Output final pending
14865         next view at the end.
14866         (final): Reintroduce seen-less interface.
14867         (final_scan_insn): Output pending next view before switching
14868         sections or ending a block.  Mark the next view as needed when
14869         outputting variable locations.  Notify debug backend of section
14870         changes, and of location view changes.
14871         (rest_of_handle_final): Adjust.
14872         * toplev.c (process_options): Autodetect value for debug variable
14873         location views option.  Warn on incompat5 without -gdwarf-5.
14874         * doc/invoke.texi (gvariable-location-views): New.
14875         (gvariable-location-views=incompat5): New.
14876         (gno-variable-location-views): New.
14878 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
14880         PR tree-optimization/84136
14881         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14882         that the result of find_edge is non-NULL.
14884 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14886         PR target/83008
14887         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14888         storing integer register in SImode.  Fix cost of 256 and 512
14889         byte aligned SSE register store.
14891 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
14893         * config/i386/i386.c (ix86_multiplication_cost): Fix
14894         multiplication cost for TARGET_AVX512DQ.
14896 2018-02-08  Marek Polacek  <polacek@redhat.com>
14898         PR tree-optimization/84238
14899         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14900         get_range_strlen.
14902 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14904         PR tree-optimization/84265
14905         * tree-vect-stmts.c (vectorizable_store): Don't treat
14906         VMAT_CONTIGUOUS accesses as grouped.
14907         (vectorizable_load): Likewise.
14909 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
14911         PR tree-optimization/81635
14912         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14913         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14914         (test_round_for_mask): New functions.
14915         (wide_int_cc_tests): Call test_round_for_mask.
14916         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14917         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14918         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14919         range returned by get_range_info.
14921 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14923         PR ipa/81360
14924         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14925         * symtab.c: Include builtins.h
14926         (symtab_node::output_to_lto_symbol_table_p): Move here
14927         from lto-streamer-out.c:output_symbol_p.
14928         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14929         (output_symbol_p): Move all logic to symtab.c
14930         (produce_symtab): Update.
14932 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14934         * config/s390/s390-opts.h (enum indirect_branch): Define.
14935         * config/s390/s390-protos.h (s390_return_addr_from_memory)
14936         (s390_indirect_branch_via_thunk)
14937         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14938         (enum s390_indirect_branch_type): Define.
14939         * config/s390/s390.c (struct s390_frame_layout, struct
14940         machine_function): Remove.
14941         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14942         (indirect_branch_table_label_no, indirect_branch_table_name):
14943         Define variables.
14944         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14945         (enum s390_indirect_branch_option): Define.
14946         (s390_return_addr_from_memory): New function.
14947         (s390_handle_string_attribute): New function.
14948         (s390_attribute_table): Add new attribute handler.
14949         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14950         (s390_indirect_branch_via_thunk): New function.
14951         (s390_indirect_branch_via_inline_thunk): New function.
14952         (s390_function_ok_for_sibcall): When jumping via thunk disallow
14953         sibling call optimization for non z10 compiles.
14954         (s390_emit_call): Force indirect branch target to be a single
14955         register.  Add r1 clobber for non-z10 compiles.
14956         (s390_emit_epilogue): Emit return jump via return_use expander.
14957         (s390_reorg): Handle JUMP_INSNs as execute targets.
14958         (s390_option_override_internal): Perform validity checks for the
14959         new command line options.
14960         (s390_indirect_branch_attrvalue): New function.
14961         (s390_indirect_branch_settings): New function.
14962         (s390_set_current_function): Invoke s390_indirect_branch_settings.
14963         (s390_output_indirect_thunk_function):  New function.
14964         (s390_code_end): Implement target hook.
14965         (s390_case_values_threshold): Implement target hook.
14966         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14967         macros.
14968         * config/s390/s390.h (struct s390_frame_layout)
14969         (struct machine_function): Move here from s390.c.
14970         (TARGET_INDIRECT_BRANCH_NOBP_RET)
14971         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14972         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14973         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14974         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14975         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14976         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14977         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14978         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14979         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14980         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14981         (mnemonic attribute): Add values which aren't recognized
14982         automatically.
14983         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14984         pattern for branch conversion.  Fix mnemonic attribute.
14985         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14986         indirect branch via thunk if requested.
14987         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
14988         ("*indirect_jump"): Disable for branch conversion using out of
14989         line thunks.
14990         ("indirect_jump_via_thunk<mode>_z10")
14991         ("indirect_jump_via_thunk<mode>")
14992         ("indirect_jump_via_inlinethunk<mode>_z10")
14993         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
14994         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
14995         ("casesi_jump_via_inlinethunk<mode>_z10")
14996         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
14997         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
14998         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
14999         ("*indirect2_jump"): Disable for branch conversion.
15000         ("casesi_jump"): Turn into expander and expand patterns for branch
15001         conversion.
15002         ("return_use"): New expander.
15003         ("*return"): Emit return via thunk and rename it to ...
15004         ("*return<mode>"): ... this one.
15005         * config/s390/s390.opt: Add new options and and enum for the
15006         option values.
15008 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15010         * lra-constraints.c (match_reload): Unconditionally use
15011         gen_lowpart_SUBREG, rather than selecting between that
15012         and equivalent gen_rtx_SUBREG code.
15014 2018-02-08  Richard Biener  <rguenther@suse.de>
15016         PR tree-optimization/84233
15017         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15018         changed flag instead of boguously re-using phi_inserted.
15020 2018-02-08  Martin Jambor  <mjambor@suse.cz>
15022         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15023         static local variables.
15025 2018-02-08  Richard Biener  <rguenther@suse.de>
15027         PR tree-optimization/84278
15028         * tree-vect-stmts.c (vectorizable_store): When looking for
15029         smaller vector types to perform grouped strided loads/stores
15030         make sure the mode is supported by the target.
15031         (vectorizable_load): Likewise.
15033 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15035         * config/aarch64/aarch64.c (aarch64_components_for_bb):
15036         Increase LDP/STP opportunities by adding adjacent callee-saves.
15038 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15040         PR rtl-optimization/84068
15041         PR rtl-optimization/83459
15042         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15044 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
15046         PR tree-optimization/84224
15047         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15048         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15049         non-zero arguments.
15051 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
15053         PR target/84113
15054         * config/rs6000/altivec.md (*restore_world): Remove LR use.
15055         * config/rs6000/predicates.md (restore_world_operation): Adjust op
15056         count, remove one USE.
15058 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15060         * doc/install.texi (Configuration): Document the
15061         --with-long-double-format={ibm,ieee} PowerPC configuration
15062         options.
15064         PR target/84154
15065         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15066         Convert from define_expand to be define_insn_and_split.  Rework
15067         float/double/_Float128 conversions to QI/HI/SImode to work with
15068         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
15069         conversions to QI/HImode types did a store and then a load to
15070         truncate the value.  For conversions to VSX registers, don't split
15071         the insn, instead emit the code directly.  Use the code iterator
15072         any_fix to combine signed and unsigned conversions.
15073         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15074         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15075         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15076         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15077         (fix_<mode>di2_hw): Likewise.
15078         (fixuns_<mode>di2_hw): Likewise.
15079         (fix_<mode>si2_hw): Likewise.
15080         (fixuns_<mode>si2_hw): Likewise.
15081         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15082         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15083         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15084         fix<uns>_trunc<SFDF:mode>si2_p8.
15085         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15086         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15087         (fix<uns>_<mode>_mem): Likewise.
15088         (fctiw<u>z_<mode>_mem): Likewise.
15089         (fix<uns>_<mode>_mem): Likewise.
15090         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15091         the register allocator from doing a direct move to the GPRs to do
15092         a store, and instead use the ISA 3.0 store byte/half-word from
15093         vector register instruction.  For IEEE 128-bit floating point,
15094         also optimize stores of 32-bit ints.
15095         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15097 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
15099         * genextract.c (push_pathstr_operand): New function to support
15100         [a-zA-Z].
15101         (walk_rtx): Call push_pathstr_operand.
15102         (print_path): Support [a-zA-Z].
15104 2018-02-07  Richard Biener  <rguenther@suse.de>
15106         PR tree-optimization/84037
15107         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15108         (cse_and_gimplify_to_preheader): Declare.
15109         (vect_get_place_in_interleaving_chain): Likewise.
15110         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15111         ivexpr_map.
15112         (_loop_vec_info::~_loop_vec_info): Delete it.
15113         (cse_and_gimplify_to_preheader): New function.
15114         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15115         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15116         (vectorizable_load): Likewise.  For grouped stores always base
15117         the IV on the first element.
15118         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15119         condition before gimplifying.
15121 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15123         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15124         *DIV_EXPR and *MOD_EXPR.
15126 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
15128         PR target/84248
15129         * config/i386/i386.c (ix86_option_override_internal): Mask out
15130         the CF_SET bit when checking -fcf-protection.
15132 2018-02-07  Tom de Vries  <tom@codesourcery.com>
15134         PR libgomp/84217
15135         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15136         enough.
15138 2018-02-07  Richard Biener  <rguenther@suse.de>
15140         PR tree-optimization/84204
15141         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15142         this place.
15144         PR tree-optimization/84205
15145         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15146         special-case isl_ast_op_zdiv_r.
15148         PR tree-optimization/84223
15149         * graphite-scop-detection.c (gather_bbs::before_dom_children):
15150         Only add conditions from within the region.
15151         (gather_bbs::after_dom_children): Adjust.
15153 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
15155         PR target/84209
15156         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15157         * config/avr/avr.md: Only post-reload split REG-REG moves if
15158         either register is GENERAL_REG_P.
15160 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15162         PR tree-optimization/84235
15163         * tree-ssa-scopedtables.c
15164         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15165         if the subtraction is performed in floating point type where NaNs are
15166         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15167         build 1.  Formatting fix.
15169 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
15171         PR target/84146
15172         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15173         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15174         and skip it regardless of bb boundaries.  Use CALL_P macro,
15175         don't test INSN_P (insn) together with CALL_P or JUMP_P check
15176         unnecessarily, formatting fix.
15178 2018-02-06  Michael Collison  <michael.collison@arm.com>
15180         * config/arm/thumb2.md:
15181         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15182         (*thumb_mov_notscc): Ditto.
15184 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
15186         PR target/84154
15187         * config/rs6000/rs6000.md (su code attribute): Use "u" for
15188         unsigned_fix, not "s".
15190 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15192         * configure.ac (gcc_fn_eh_frame_ro): New function.
15193         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15194         correct .eh_frame permissions.
15195         * configure: Regenerate.
15197 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
15199         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15200         irrelevant options.
15202 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15204         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15205         Display warning message for -mno-speculate-indirect-jumps.
15207 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
15209         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15210         Undocumented.
15211         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15213 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
15215         PR tree-optimization/84225
15216         * tree-eh.c (find_trapping_overflow): Only call
15217         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15219 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15221         PR target/84145
15222         * config/i386/i386.c: Reimplement the check of possible options
15223         -mibt/-mshstk conbination. Change error messages.
15224         * doc/invoke.texi: Fix a typo: remove extra '='.
15226 2018-02-06  Marek Polacek  <polacek@redhat.com>
15228         PR tree-optimization/84228
15229         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15231 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
15233         PR target/82641
15234         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15235         emitted arch directives.
15236         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15237         __ARM_FEATURE_COPROC before changing architectures.
15239 2018-02-06  Richard Biener  <rguenther@suse.de>
15241         * config/i386/i386.c (print_reg): Fix typo.
15242         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15244 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
15246         * configure: Regenerate.
15248 2018-02-05  Martin Sebor  <msebor@redhat.com>
15250         PR tree-optimization/83369
15251         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15252         inlining context.
15254 2018-02-05  Martin Liska  <mliska@suse.cz>
15256         * doc/invoke.texi: Cherry-pick upstream r323995.
15258 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
15260         * ira.c (ira_init_register_move_cost): Adjust comment.
15262 2018-02-05  Martin Liska  <mliska@suse.cz>
15264         PR gcov-profile/84137
15265         * doc/gcov.texi: Fix typo in documentation.
15267 2018-02-05  Martin Liska  <mliska@suse.cz>
15269         PR gcov-profile/83879
15270         * doc/gcov.texi: Document necessity of --dynamic-list-data when
15271         using dlopen functionality.
15273 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
15275         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15276         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15277         _mm_maskz_range_ss, _mm_mask_range_round_ss,
15278         _mm_maskz_range_round_ss): New intrinsics.
15279         (__builtin_ia32_rangesd128_round)
15280         (__builtin_ia32_rangess128_round): Remove.
15281         (__builtin_ia32_rangesd128_mask_round,
15282         __builtin_ia32_rangess128_mask_round): New builtins.
15283         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15284         __builtin_ia32_rangess128_round): Remove.
15285         (__builtin_ia32_rangesd128_mask_round,
15286         __builtin_ia32_rangess128_mask_round): New builtins.
15287         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15288         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15289         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15290         "<round_saeonly_constraint>")): Changed to ...
15291         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15292         "<round_saeonly_scalar_constraint>")): ... this.
15293         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15294         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15295         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15296         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15297         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15299 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
15301         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15302         options.
15303         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15304         Remove all values except native, 8540 and 8548.
15306 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
15308         * config/i386/i386.c (ix86_output_function_return): Pass
15309         INVALID_REGNUM, instead of -1, as invalid register number to
15310         indirect_thunk_name and output_indirect_thunk.
15312 2018-02-02  Julia Koval  <julia.koval@intel.com>
15314         * config.gcc: Add -march=icelake.
15315         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15316         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15317         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15318         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15319         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15320         (processor_target_table): Add icelake.
15321         (ix86_option_override_internal): Handle new PTAs.
15322         (get_builtin_code_for_version): Handle icelake.
15323         (M_INTEL_COREI7_ICELAKE): New.
15324         (fold_builtin_cpu): Handle icelake.
15325         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15326         * doc/invoke.texi: Add -march=icelake.
15328 2018-02-02  Julia Koval  <julia.koval@intel.com>
15330         * config/i386/i386.c (ix86_option_override_internal): Change flags type
15331         to wide_int_bitmask.
15332         * wide-int-bitmask.h: New.
15334 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15336         PR target/84066
15337         * config/i386/i386.md: Replace Pmode with word_mode in
15338         builtin_setjmp_setup and builtin_longjmp to support x32.
15340 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
15342         PR target/56010
15343         PR target/83743
15344         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15345         #include "opts.h".
15346         (rs6000_supported_cpu_names): New static variable.
15347         (linux_cpu_translation_table): Likewise.
15348         (elf_platform) <cpu>: Define new static variable and use it.
15349         Translate kernel AT_PLATFORM name to canonical name if needed.
15350         Error if platform name is unknown.
15352 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
15354         PR target/84089
15355         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15357 2018-02-01  Jeff Law  <law@redhat.com>
15359         PR target/84128
15360         * config/i386/i386.c (release_scratch_register_on_entry): Add new
15361         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
15362         the scratch if RELEASE_VIA_POP is false.
15363         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15364         If we have to save a temporary register, decrement SIZE appropriately.
15365         Pass new arguments to release_scratch_register_on_entry.
15366         (ix86_adjust_stack_and_probe): Likewise.
15367         (ix86_emit_probe_stack_range): Pass new arguments to
15368         release_scratch_register_on_entry.
15370 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
15372         PR rtl-optimization/84157
15373         * combine.c (change_zero_ext): Use REG_P predicate in
15374         front of HARD_REGISTER_P predicate.
15376 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
15378         * config/avr/avr.c (avr_option_override): Move disabling of
15379         -fdelete-null-pointer-checks to...
15380         * common/config/avr/avr-common.c (avr_option_optimization_table):
15381         ...here.
15383 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15385         PR tree-optimization/81635
15386         * tree-data-ref.c (split_constant_offset_1): For types that
15387         wrap on overflow, try to use range info to prove that wrapping
15388         cannot occur.
15390 2018-02-01  Renlin Li  <renlin.li@arm.com>
15392         PR target/83370
15393         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15394         TAILCALL_ADDR_REGS.
15395         (aarch64_register_move_cost): Likewise.
15396         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15397         TAILCALL_ADDR_REGS.
15398         (REG_CLASS_NAMES): Likewise.
15399         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15400         TAILCALL_ADDR_REGS. Remove IP registers.
15401         * config/aarch64/aarch64.md (Ucs): Update register constraint.
15403 2018-02-01  Richard Biener  <rguenther@suse.de>
15405         * domwalk.h (dom_walker::dom_walker): Add additional constructor
15406         for specifying RPO order and allow NULL for that.
15407         * domwalk.c (dom_walker::dom_walker): Likewise.
15408         (dom_walker::walk): Handle NULL RPO order.
15409         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15410         in RPO order.
15411         (rewrite_update_dom_walker): Likewise.
15412         (mark_def_dom_walker): Likewise.
15414 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15416         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15417         (aarch64_maybe_expand_sve_subreg_move): Declare.
15418         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15419         * config/aarch64/predicates.md (aarch64_any_register_operand): New
15420         predicate.
15421         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15422         that are semantically a reverse operation.
15423         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15424         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15425         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15426         functions.
15427         (aarch64_can_change_mode_class): For big-endian, forbid changes
15428         between two SVE modes if they have different element sizes.
15430 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15432         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15433         the TImode handling for big-endian targets.
15435 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15437         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15438         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
15439         not just bytes.
15440         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15441         Remove BSWAP handing for big-endian targets and use the form of
15442         LD1RQ appropariate for the mode.
15444 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15446         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15447         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15448         duplicated element.
15450 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15452         PR tearget/83845
15453         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15454         check for operands that need to go through aarch64_sve_reload_be.
15456 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
15458         PR tree-optimization/81661
15459         PR tree-optimization/84117
15460         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15461         * tree-eh.c: Include gimplify.h.
15462         (find_trapping_overflow, replace_trapping_overflow,
15463         rewrite_to_non_trapping_overflow): New functions.
15464         * tree-vect-loop.c: Include tree-eh.h.
15465         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15466         * tree-data-ref.c: Include tree-eh.h.
15467         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15469 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
15471         PR rtl-optimization/84123
15472         * combine.c (change_zero_ext): Check if hard register satisfies
15473         can_change_dest_mode before calling gen_lowpart_SUBREG.
15475 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
15477         PR target/82444
15478         * ira.c (ira_init_register_move_cost): Remove assert.
15480 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15482         PR rtl-optimization/84071
15483         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15484         * doc/tm.texi: Regenerate.
15486 2018-01-31  Richard Biener  <rguenther@suse.de>
15488         PR tree-optimization/84132
15489         * tree-data-ref.c (analyze_miv_subscript): Properly
15490         check whether evolution_function_is_affine_multivariate_p
15491         before calling gcd_of_steps_may_divide_p.
15493 2018-01-31  Julia Koval  <julia.koval@intel.com>
15495         PR target/83618
15496         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15497         * config/i386/i386.md (rdpid_rex64) New.
15498         (rdpid): Make 32bit only.
15500 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
15502         PR lto/84105
15503         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15504         an IDENTIFIER_NODE for FUNCTION_TYPE's.
15506 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15508         Revert
15509         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15511         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15513 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15515         PR rtl-optimization/84071
15516         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15517         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15519 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15521         * config/arc/arc.c (arc_handle_aux_attribute): New function.
15522         (arc_attribute_table): Add 'aux' attribute.
15523         (arc_in_small_data_p): Consider aux like variables.
15524         (arc_is_aux_reg_p): New function.
15525         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15526         (arc_get_aux_arg): New function.
15527         (prepare_move_operands): Handle aux-register access.
15528         (arc_handle_aux_attribute): New function.
15529         * doc/extend.texi (ARC Variable attributes): Add subsection.
15531 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15533         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15534         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15535         (arc_attribute_table): Add 'uncached' attribute.
15536         (arc_print_operand): Print '.di' flag for uncached memory
15537         accesses.
15538         (arc_in_small_data_p): Do not consider for small data the uncached
15539         types.
15540         (arc_is_uncached_mem_p): New function.
15541         * config/arc/predicates.md (compact_store_memory_operand): Check
15542         for uncached memory accesses.
15543         (nonvol_nonimm_operand): Likewise.
15544         * doc/extend.texi (ARC Type Attribute): New subsection.
15546 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
15548         PR c/84100
15549         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15550         falign-loops=): Add Optimization flag.
15552 2018-01-30  Jeff Law  <law@redhat.com>
15554         PR target/84064
15555         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15556         INT_REGISTERS_SAVED.  Check it prior to calling
15557         get_scratch_register_on_entry.
15558         (ix86_adjust_stack_and_probe): Similarly.
15559         (ix86_emit_probe_stack_range): Similarly.
15560         (ix86_expand_prologue): Corresponding changes.
15562 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15564         PR target/40411
15565         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15566         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15568 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
15570         PR target/84112
15571         * lra-constraints.c (curr_insn_transform): Process AND in the
15572         address.
15574 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
15576         PR rtl-optimization/83986
15577         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15578         dependence against last_pending_memory_flush in addition to
15579         pending_jump_insns.
15581 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
15583         PR tree-optimization/81611
15584         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15585         copies.
15587 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15589         PR target/83758
15590         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15591         a reg rtx.
15593 2018-01-30  Richard Biener  <rguenther@suse.de>
15594             Jakub Jelinek  <jakub@redhat.com>
15596         PR tree-optimization/84111
15597         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15598         inner loops added during recursion, as they don't have up-to-date
15599         SSA form.
15601 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15603         PR ipa/81360
15604         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15605         (can_inline_edge_by_limits_p): ... here.
15606         (can_early_inline_edge_p, check_callers,
15607         update_caller_keys, update_callee_keys, recursive_inlining,
15608         add_new_edges_to_heap, speculation_useful_p,
15609         inline_small_functions,
15610         inline_small_functions, flatten_function,
15611         inline_to_all_callers_1): Update.
15613 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15615         * profile-count.c (profile_count::combine_with_ipa_count): Handle
15616         zeros correctly.
15618 2018-01-30  Richard Biener  <rguenther@suse.de>
15620         PR tree-optimization/83008
15621         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15622         invariant and constant vector uses in stmts when they need
15623         more than one stmt.
15625 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15627         PR bootstrap/84017
15628         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15629         * configure: Regenerate.
15631 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15633         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15634         pattern.
15635         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15636         Use gen_rtx_REG rather than gen_lowpart.
15638 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15640         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15641         rather than 0 when creating partial subregs.
15643 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15645         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15646         of usage.
15648 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15650         PR target/81550
15651         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15652         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15653         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15654         flags.  This restores the settings used before the 2017-07-24.
15655         Turning off pre increment/decrement/modify allows IVOPTS to
15656         optimize DF/SF loops where the index is an int.
15658 2018-01-29  Richard Biener  <rguenther@suse.de>
15659             Kelvin Nilsen  <kelvin@gcc.gnu.org>
15661         PR bootstrap/80867
15662         * tree-vect-stmts.c (vectorizable_call): Don't call
15663         targetm.vectorize_builtin_md_vectorized_function if callee is
15664         NULL.
15666 2018-01-22  Carl Love  <cel@us.ibm.com>
15668         * doc/extend.tex: Fix typo in second arg in
15669         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15671 2018-01-29  Richard Biener  <rguenther@suse.de>
15673         PR tree-optimization/84086
15674         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15675         (flush_ssaname_freelist): When SSA names were released reset
15676         the SCEV hash table.
15678 2018-01-29  Richard Biener  <rguenther@suse.de>
15680         PR tree-optimization/84057
15681         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15682         removed paths when removing edges.
15684 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
15686         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15687         -mfunction-return=@var{choice}.
15689 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15691         PR diagnostic/84034
15692         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15693         Handle CR like TAB.
15694         (layout::print_source_line): Likewise.
15695         (test_get_line_width_without_trailing_whitespace): Add test cases.
15697 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
15699         PR middle-end/84040
15700         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15701         debug insns.
15703 2018-01-26  Jim Wilson  <jimw@sifive.com>
15705         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15707         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15708         specified.
15710 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15712         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15713         and CMP + SUB-immediate -> SUBS.
15715 2018-01-26  Martin Sebor  <msebor@redhat.com>
15717         PR tree-optimization/83896
15718         * tree-ssa-strlen.c (get_string_len): Rename...
15719         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15720         Avoid assuming length is constant.
15721         (handle_char_store): Use HOST_WIDE_INT for string length.
15723 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15725         PR target/81763
15726         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15727         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15729 2018-01-26  Richard Biener  <rguenther@suse.de>
15731         PR rtl-optimization/84003
15732         * dse.c (record_store): Only record redundant stores when
15733         the earlier store aliases at least all accesses the later one does.
15735 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15737         PR rtl-optimization/83985
15738         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15739         REG_CFA_RESTORE insns.
15740         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15741         REG_CFA_RESTORE insns here.
15743         PR c/83989
15744         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15745         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15747 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15749         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15750         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15751         (arc_init): Likewise.
15752         (arc_override_options): Likewise.
15753         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15754         value.
15755         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15756         support.
15757         * config/arc/arc.h (TARGET_DBNZ): Define.
15758         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15759         properly set the tune attribute.
15760         (dbnz): Use TARGET_DBNZ guard.
15761         * config/arc/arc.opt (mtune): Add core3 option.
15763 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15765         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15766         recognize new pic like addresses.
15767         (arc_delegitimize_address): Clean up.
15769 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15771         * config/arc/arc-arches.def: Option mrf16 valid for all
15772         architectures.
15773         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15774         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15775         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15776         * config/arc/arc-tables.opt: Regenerate.
15777         * config/arc/arc.c (arc_conditional_register_usage): Handle
15778         reduced register file case.
15779         (arc_file_start): Set must have build attributes.
15780         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15781         mrf16 option value.
15782         * config/arc/arc.opt (mrf16): Add new option.
15783         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15784         * config/arc/genmultilib.awk: Handle new mrf16 option.
15785         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15786         * config/arc/t-multilib: Regenerate.
15787         * doc/invoke.texi (ARC Options): Document mrf16 option.
15789 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15791         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15792         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15793         (arc_attribute_table): Add 'secure_call' attribute.
15794         (arc_print_operand): Print secure call operand.
15795         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15796         secure.
15797         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15798         (call_i): Add support for sjli instruction.
15799         (call_value_i): Likewise.
15800         * config/arc/constraints.md (Csc): New constraint.
15802 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15803             John Eric Martin  <John.Martin@emmicro-us.com>
15805         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15806         * config/arc/arc.c (_arc_jli_section): New struct.
15807         (arc_jli_section): New type.
15808         (rc_jli_sections): New static variable.
15809         (arc_handle_jli_attribute): New function.
15810         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15811         (arc_file_end): New function.
15812         (TARGET_ASM_FILE_END): Define.
15813         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15814         (arc_add_jli_section): New function.
15815         (jli_call_scan): Likewise.
15816         (arc_reorg): Call jli_call_scan.
15817         (arc_output_addsi): Remove 'S' from printing asm operand.
15818         (arc_is_jli_call_p): New function.
15819         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15820         operand.
15821         (movhi_insn): Likewise.
15822         (movsi_insn): Likewise.
15823         (movsi_set_cc_insn): Likewise.
15824         (loadqi_update): Likewise.
15825         (load_zeroextendqisi_update): Likewise.
15826         (load_signextendqisi_update): Likewise.
15827         (loadhi_update): Likewise.
15828         (load_zeroextendhisi_update): Likewise.
15829         (load_signextendhisi_update): Likewise.
15830         (loadsi_update): Likewise.
15831         (loadsf_update): Likewise.
15832         (movsicc_insn): Likewise.
15833         (bset_insn): Likewise.
15834         (bxor_insn): Likewise.
15835         (bclr_insn): Likewise.
15836         (bmsk_insn): Likewise.
15837         (bicsi3_insn): Likewise.
15838         (cmpsi_cc_c_insn): Likewise.
15839         (movsi_ne): Likewise.
15840         (movsi_cond_exec): Likewise.
15841         (clrsbsi2): Likewise.
15842         (norm_f): Likewise.
15843         (normw): Likewise.
15844         (swap): Likewise.
15845         (divaw): Likewise.
15846         (flag): Likewise.
15847         (sr): Likewise.
15848         (kflag): Likewise.
15849         (ffs): Likewise.
15850         (ffs_f): Likewise.
15851         (fls): Likewise.
15852         (call_i): Remove 'S' asm letter, add jli instruction.
15853         (call_value_i): Likewise.
15854         * config/arc/arc.op (mjli-always): New option.
15855         * config/arc/constraints.md (Cji): New constraint.
15856         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15857         operand.
15858         (subsf3_fpx): Likewise.
15859         (mulsf3_fpx): Likewise.
15860         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15861         asm operand.
15862         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15863         function attrbutes.
15864         * doc/invoke.texi (ARC): Document mjli-always option.
15866 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
15868         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15869         avoid addition with 0 and use incw and decw where possible.
15871 2018-01-26  Richard Biener  <rguenther@suse.de>
15873         PR tree-optimization/81082
15874         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15875         association if it requires casting to unsigned.
15876         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15877         from fold_plusminus_mult_expr to catch important cases late when
15878         range info is available.
15880 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15882         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15883         * configure.ac (hidden_linkonce): New test.
15884         * configure: Regenerate.
15885         * config.in: Regenerate.
15887 2018-01-26  Julia Koval  <julia.koval@intel.com>
15889         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15890         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15891         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15892         _mm_mask_bitshuffle_epi64_mask): Fix type.
15893         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15894         USI_FTYPE_V4DI_V4DI_USI): Remove.
15895         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15896         __builtin_ia32_vpshufbitqmb256_mask,
15897         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15898         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15899         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15901 2018-01-26  Alan Modra  <amodra@gmail.com>
15903         PR target/84033
15904         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15905         UNSPEC_VBPERMQ.  Sort other unspecs.
15907 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
15909         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15911 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
15913         PR middle-end/83055
15914         * predict.c (drop_profile): Do not push/pop cfun; update also
15915         node->count.
15916         (handle_missing_profiles): Fix logic looking for zero profiles.
15918 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
15920         PR middle-end/83977
15921         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15922         on functions with #pragma omp declare simd or functions with simd
15923         attribute.
15924         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15925         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15926         Remove trailing \n from warning_at calls.
15928 2018-01-25  Tom de Vries  <tom@codesourcery.com>
15930         PR target/84028
15931         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15932         for neutered workers.
15934 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
15936         PR target/68467
15937         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15938         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15940 2018-01-24  Jeff Law  <law@redhat.com>
15942         PR target/83994
15943         * i386.c (get_probe_interval): Move to earlier point.
15944         (ix86_compute_frame_layout): If -fstack-clash-protection and
15945         the frame is larger than the probe interval, then use pushes
15946         to save registers rather than reg->mem moves.
15947         (ix86_expand_prologue): Remove conditional for int_registers_saved
15948         assertion.
15950 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
15952         PR target/84014
15953         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15954         min/max for never referenced object.
15956 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
15958         PR middle-end/83977
15959         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15960         here.
15961         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15962         attributes from DECL_ATTRIBUTES (decl) without affecting
15963         DECL_ATTRIBUTES (current_function_decl).
15964         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15965         functions with non-NULL DECL_ABSTRACT_ORIGIN.
15967 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
15969         PR tree-optimization/83979
15970         * fold-const.c (fold_comparison): Use constant_boolean_node
15971         instead of boolean_{true,false}_node.
15973 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
15975         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15976         with zero counts.
15978 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15980         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15981         Simplify the clause that sets the length attribute.
15982         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15983         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15984         clause that sets the length attribute.
15985         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15987 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15989         PR target/83589
15990         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
15991         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
15992         Add strict parameter.
15993         (prevent_branch_around_nothing): Insert dummy insn between branch to
15994         label and label with no ptx insn inbetween.
15995         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
15997 2018-01-24  Tom de Vries  <tom@codesourcery.com>
15999         PR target/81352
16000         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16001         for neutered threads in warp.
16002         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16004 2018-01-24  Richard Biener  <rguenther@suse.de>
16006         PR tree-optimization/83176
16007         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16008         operands.
16010 2018-01-24  Richard Biener  <rguenther@suse.de>
16012         PR tree-optimization/82819
16013         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16014         code generating pluses that are no-ops in the target precision.
16016 2018-01-24  Richard Biener  <rguenther@suse.de>
16018         PR middle-end/84000
16019         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16021 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16023         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16024         to merge probabilities.
16025         * predict.c (probably_never_executed): Also mark as cold functions
16026         with global 0 profile and guessed local profile.
16027         * profile-count.c (profile_probability::combine_with_count): New
16028         member function.
16029         * profile-count.h (profile_probability::operator*,
16030         profile_probability::operator*=, profile_probability::operator/,
16031         profile_probability::operator/=): Reduce precision to adjusted
16032         and set value to guessed on contradictory divisions.
16033         (profile_probability::combine_with_freq): Remove.
16034         (profile_probability::combine_wiht_count): Declare.
16035         (profile_count::force_nonzero):: Set to adjusted.
16036         (profile_count::probability_in):: Set quality to adjusted.
16037         * tree-ssa-tail-merge.c (replace_block_by): Use
16038         combine_with_count.
16040 2018-01-23  Andrew Waterman  <andrew@sifive.com>
16041             Jim Wilson  <jimw@sifive.com>
16043         * config/riscv/riscv.c (riscv_stack_boundary): New.
16044         (riscv_option_override): Set riscv_stack_boundary.  Handle
16045         riscv_preferred_stack_boundary_arg.
16046         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16047         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16048         (STACK_BOUNDARY): Set to riscv_stack_boundary.
16049         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16050         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16051         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16053 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
16055         PR target/83905
16056         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16057         of struct ix86_frame.
16058         (ix86_expand_epilogue): Likewise.  Add a local variable for
16059         the reg_save_offset field in struct ix86_frame.
16061 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
16063         PR tree-optimization/82604
16064         * tree-loop-distribution.c (enum partition_kind): New enum item
16065         PKIND_PARTIAL_MEMSET.
16066         (partition_builtin_p): Support above new enum item.
16067         (generate_code_for_partition): Ditto.
16068         (compute_access_range): Differentiate cases that equality can be
16069         proven at all loops, the innermost loops or no loops.
16070         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16071         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
16072         (finalize_partitions, distribute_loop): Don't fuse partition of
16073         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16074         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16075         parloop is enabled.
16077 2018-01-23  Martin Liska  <mliska@suse.cz>
16079         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16080         order to ignore the predictor.
16081         (PRED_POLYMORPHIC_CALL): Likewise.
16082         (PRED_RECURSIVE_CALL): Likewise.
16084 2018-01-23  Martin Liska  <mliska@suse.cz>
16086         * tree-profile.c (tree_profiling): Print function header to
16087         aware reader which function we are working on.
16088         * value-prof.c (gimple_find_values_to_profile): Do not print
16089         not interesting value histograms.
16091 2018-01-23  Martin Liska  <mliska@suse.cz>
16093         * profile-count.h (enum profile_quality): Add
16094         profile_uninitialized as the first value. Do not number values
16095         as they are zero based.
16096         (profile_count::verify): Update sanity check.
16097         (profile_probability::verify): Likewise.
16099 2018-01-23  Nathan Sidwell  <nathan@acm.org>
16101         * doc/invoke.texi (ffor-scope): Deprecate.
16103 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16105         PR tree-optimization/83510
16106         * domwalk.c (set_all_edges_as_executable): New function.
16107         (dom_walker::dom_walker): Convert bool param
16108         "skip_unreachable_blocks" to enum reachability.  Move setup of
16109         edge flags to set_all_edges_as_executable and only do it when
16110         reachability is REACHABLE_BLOCKS.
16111         * domwalk.h (enum dom_walker::reachability): New enum.
16112         (dom_walker::dom_walker): Convert bool param
16113         "skip_unreachable_blocks" to enum reachability.
16114         (set_all_edges_as_executable): New decl.
16115         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
16116         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16117         "reachability".
16118         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16119         but converting true to REACHABLE_BLOCKS.
16120         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16121         * tree-vrp.c
16122         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16123         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16124         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16125         REACHABLE_BLOCKS.
16126         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16127         if check_all_array_refs will be called.
16129 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16131         * tree.c (selftest::test_location_wrappers): Add more test
16132         coverage.
16134 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16136         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16137         (selftest::test_bit_in_range): Likewise.
16139 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16141         PR testsuite/83888
16142         * doc/sourcebuild.texi (vect_float): Say that the selector
16143         only describes the situation when -funsafe-math-optimizations is on.
16144         (vect_float_strict): Document.
16146 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16148         PR tree-optimization/83965
16149         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16150         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16151         instead of checking only for a reduction.
16152         (vect_recog_widen_sum_pattern): Likewise.
16154 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16156         * predict.c (probably_never_executed): Only use precise profile info.
16157         (compute_function_frequency): Skip after inlining hack since we now
16158         have quality checking.
16160 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16162         * profile-count.h (profile_probability::very_unlikely,
16163         profile_probability::unlikely, profile_probability::even): Set
16164         precision to guessed.
16166 2018-01-23  Richard Biener  <rguenther@suse.de>
16168         PR tree-optimization/83963
16169         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16170         Properly terminate dominator walk when crossing the exit edge not
16171         when visiting its source block.
16173 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
16175         PR c++/83918
16176         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16177         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16179 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
16181         PR tree-optimization/83957
16182         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
16183         semicolon after for body surrounded by braces.
16185         PR tree-optimization/83081
16186         * profile-count.h (profile_probability::split): New method.
16187         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16188         Use profile_probability::split.
16189         (do_compare_rtx_and_jump): Fix adjustment of probabilities
16190         when splitting a single conditional jump into 2.
16192 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
16194         PR tree-optimization/69452
16195         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16196         decl.
16198 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16200         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16201         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16202         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16204 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16206         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16207         declaration.
16208         * config/rl78/rl78.md (movdi): New define_expand.
16209         * config/rl78/rl78.c (rl78_split_movdi): New function.
16211 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
16213         PR target/83862
16214         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16215         no longer used.
16216         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16217         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16218         128-bit to produce an UNSPEC move to get the double word with the
16219         signbit and then a shift directly to do signbit.
16220         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16221         implementation with a new version that just does either a direct
16222         move or a regular move.  Move memory interface to separate insns.
16223         Move insns so they are next to the expander.
16224         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16225         with signbit move.  Split big and little endian case.
16226         (signbit<mode>2_dm_mem_le): Likewise.
16227         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16228         (signbit<mode>2_dm2): Likewise.
16230 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16232         * config/rl78/rl78.md (anddi3): New define_expand.
16234 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16236         * config/rl78/rl78.md (umindi3): New define_expand.
16238 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16240         * config/rl78/rl78.md (smindi3): New define_expand.
16242 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16244         * config/rl78/rl78.md (smaxdi3): New define_expand.
16246 2018-01-22  Carl Love  <cel@us.ibm.com>
16248         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16249         LVX_V1TI): Add macro expansion.
16250         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16251         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16252         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16253         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16254         Change check to determine if the instruction is a byte reversing
16255         entry.  Fix typo in comment.
16256         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16257         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16258         Add def_builtin calls for new builtins.
16259         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16260         Add define_insn expansion.
16262 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16264         * config/rl78/rl78.md (umaxdi3): New define_expand.
16266 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16268         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16269         for non-QImode registers.
16271 2018-01-22  Richard Biener  <rguenther@suse.de>
16273         PR tree-optimization/83963
16274         * graphite-scop-detection.c (scop_detection::get_sese): Delay
16275         including the loop exit block.
16276         (scop_detection::merge_sese): Likewise.
16277         (scop_detection::add_scop): Do it here instead.
16279 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16281         * doc/sourcebuild.texi (arm_softfloat): Document.
16283 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
16285         PR gcc/77734
16286         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16287         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16288         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16290 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16291             David Edelsohn  <dje.gcc@gmail.com>
16293         PR target/83946
16294         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16295         Change "crset eq" to "crset 2".
16296         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16297         (*call_indirect_aix<mode>_nospec): Likewise.
16298         (*call_value_indirect_aix<mode>_nospec): Likewise.
16299         (*call_indirect_elfv2<mode>_nospec): Likewise.
16300         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16301         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16302         change assembly output from . to $.
16303         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16304         (indirect_jump<mode>_nospec): Change assembly output from . to $.
16305         (*tablejump<mode>_internal1_nospec): Likewise.
16307 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
16309         PR target/80870
16310         * config/sh/sh_optimize_sett_clrt.cc:
16311         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16313 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
16315         PR tree-optimization/83940
16316         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16317         offset_dt to vect_constant_def rather than vect_unknown_def_type.
16318         (vect_check_load_store_mask): Add a mask_dt_out parameter and
16319         use it to pass back the definition type.
16320         (vect_check_store_rhs): Likewise rhs_dt_out.
16321         (vect_build_gather_load_calls): Add a mask_dt argument and use
16322         it instead of a call to vect_is_simple_use.
16323         (vectorizable_store): Update calls to vect_check_load_store_mask
16324         and vect_check_store_rhs.  Use the dt returned by the latter instead
16325         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
16326         instead of calls to vect_is_simple_use.  Pass the scalar rather
16327         than the vector operand to vect_is_simple_use when handling
16328         second and subsequent copies of an rhs value.
16329         (vectorizable_load): Update calls to vect_check_load_store_mask
16330         and vect_build_gather_load_calls.  Use the cached mask_dt and
16331         gs_info.offset_dt instead of calls to vect_is_simple_use.
16333 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
16335         PR middle-end/83945
16336         * tree-emutls.c: Include gimplify.h.
16337         (lower_emutls_2): New function.
16338         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16339         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16340         it before further processing.
16342         PR target/83930
16343         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16344         UINTVAL (trueop1) instead of INTVAL (op1).
16346 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
16348         PR debug/81570
16349         PR debug/83728
16350         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16351         INCOMING_FRAME_SP_OFFSET if not defined.
16352         (scan_trace): Add ENTRY argument.  If true and
16353         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16354         emit a note to adjust the CFA offset.
16355         (create_cfi_notes): Adjust scan_trace callers.
16356         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16357         INCOMING_FRAME_SP_OFFSET in the CIE.
16358         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16359         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16360         Likewise.
16361         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16362         * doc/tm.texi: Regenerated.
16364 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16366         PR rtl-optimization/83147
16367         * lra-constraints.c (remove_inheritance_pseudos): Use
16368         lra_substitute_pseudo_within_insn.
16370 2018-01-19  Tom de Vries  <tom@codesourcery.com>
16371             Cesar Philippidis  <cesar@codesourcery.com>
16373         PR target/83920
16374         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16376 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
16378         PR target/83790
16379         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16380         spaces for function labels.
16382 2018-01-19  Martin Liska  <mliska@suse.cz>
16384         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16385         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16386         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16387         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16388         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16389         (PRED_CONST_RETURN): Change from 69 to 65.
16390         (PRED_NULL_RETURN): Change from 91 to 71.
16391         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16392         (PRED_LOOP_GUARD): Change from 66 to 73.
16394 2018-01-19  Martin Liska  <mliska@suse.cz>
16396         * predict.c (predict_insn_def): Add new assert.
16397         (struct branch_predictor): Change type to signed integer.
16398         (test_prediction_value_range): Amend test to cover
16399         PROB_UNINITIALIZED.
16400         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16401         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16402         (PRED_LOOP_ITERATIONS_MAX): Likewise.
16403         (PRED_LOOP_IV_COMPARE): Likewise.
16404         * predict.h (PROB_UNINITIALIZED): Define new constant.
16406 2018-01-19  Martin Liska  <mliska@suse.cz>
16408         * predict.c (dump_prediction): Add new format for
16409         analyze_brprob.py script which is enabled with -details
16410         suboption.
16411         * profile-count.h (precise_p): New function.
16413 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16415         PR tree-optimization/83922
16416         * tree-vect-loop.c (vect_verify_full_masking): Return false if
16417         there are no statements that need masking.
16418         (vect_active_double_reduction_p): New function.
16419         (vect_analyze_loop_operations): Use it when handling phis that
16420         are not in the loop header.
16422 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16424         PR tree-optimization/83914
16425         * tree-vect-loop.c (vectorizable_induction): Don't convert
16426         init_expr or apply the peeling adjustment for inductions
16427         that are nested within the vectorized loop.
16429 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16431         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16432         instead of NEG.
16434 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16436         PR sanitizer/81715
16437         PR testsuite/83882
16438         * function.h (gimplify_parameters): Add gimple_seq * argument.
16439         * function.c: Include gimple.h and options.h.
16440         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16441         for the added local temporaries if needed.
16442         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16443         if there are any parameter cleanups, wrap whole body into a
16444         try/finally with the cleanups.
16446 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
16448         PR target/82964
16449         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16450         Use GET_MODE_CLASS for scalar floating point.
16452 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16454         PR ipa/82256
16455         patch by PaX Team
16456         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16457         Fix call of call_cgraph_insertion_hooks.
16459 2018-01-18  Martin Sebor  <msebor@redhat.com>
16461         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16463 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16465         PR ipa/83619
16466         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16467         frequencies.
16469 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
16471         PR other/70268
16472         * common.opt: (-ffile-prefix-map): New option.
16473         * opts.c (common_handle_option): Defer it.
16474         * opts-global.c (handle_common_deferred_options): Handle it.
16475         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16476         * file-prefix-map.h: New file.
16477         (remap_debug_filename, add_debug_prefix_map): ...here.
16478         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16479         * final.c (debug_prefix_map, add_debug_prefix_map
16480         remap_debug_filename): Move to...
16481         * file-prefix-map.c: New file.
16482         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16483         generalize, get rid of alloca(), use strrchr() instead of strchr().
16484         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16485         Implement in terms of add_prefix_map().
16486         (remap_macro_filename, remap_debug_filename): Implement in term of
16487         remap_filename().
16488         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16489         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16490         * dbxout.c: Include file-prefix-map.h.
16491         * varasm.c: Likewise.
16492         * vmsdbgout.c: Likewise.
16493         * xcoffout.c: Likewise.
16494         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16495         * doc/cppopts.texi (-fmacro-prefix-map): Document.
16496         * doc/invoke.texi (-ffile-prefix-map): Document.
16497         (-fdebug-prefix-map): Update description.
16499 2018-01-18  Martin Liska  <mliska@suse.cz>
16501         * config/i386/i386.c (indirect_thunk_name): Document that also
16502         lfence is emitted.
16503         (output_indirect_thunk): Document why both instructions
16504         (pause and lfence) are generated.
16506 2018-01-18  Richard Biener  <rguenther@suse.de>
16508         PR tree-optimization/83887
16509         * graphite-scop-detection.c
16510         (scop_detection::get_nearest_dom_with_single_entry): Remove.
16511         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16512         (scop_detection::merge_sese): Re-implement with a flood-fill
16513         algorithm that properly finds a SESE region if it exists.
16515 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16517         PR c/61240
16518         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16519         pointer_diff optimizations use view_convert instead of convert.
16521 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16523         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16524         Generate different code for -mno-speculate-indirect-jumps.
16525         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16526         (*call_indirect_aix<mode>): Disable for
16527         -mno-speculate-indirect-jumps.
16528         (*call_indirect_aix<mode>_nospec): New define_insn.
16529         (*call_value_indirect_aix<mode>): Disable for
16530         -mno-speculate-indirect-jumps.
16531         (*call_value_indirect_aix<mode>_nospec): New define_insn.
16532         (*sibcall_nonlocal_sysv<mode>): Generate different code for
16533         -mno-speculate-indirect-jumps.
16534         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16536 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16538         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16539         long double type, set the flags for noting the default long double
16540         type, even if we don't pass or return a long double type.
16542 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
16544         PR ipa/83051
16545         * ipa-inline.c (flatten_function): Do not overwrite final inlining
16546         failure.
16548 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
16550         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16551         support for merge[hl].
16552         (fold_mergehl_helper): New helper function.
16553         (tree-vector-builder.h): New #include for tree_vector_builder usage.
16554         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16555         (altivec_vmrglw_direct): Add xxmrglw insn.
16557 2018-01-17  Andrew Waterman  <andrew@sifive.com>
16559         * config/riscv/riscv.c (riscv_conditional_register_usage): If
16560         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16562 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
16564         PR lto/83121
16565         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16566         call the lto_location_cache before reading the
16567         DECL_SOURCE_LOCATION of the types.
16569 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
16570             Richard Sandiford  <richard.sandiford@linaro.org>
16572         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16573         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16574         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16575         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16576         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16577         Add declaration.
16578         * config/aarch64/constraints.md (aarch64_movti_operand):
16579         Limit immediates.
16580         * config/aarch64/predicates.md (Uti): Add new constraint.
16582 2018-01-17 Carl Love  <cel@us.ibm.com>
16584         * config/rs6000/vsx.md (define_expand xl_len_r,
16585         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16586         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16587         lxvll.
16588         (define_expand, define_insn): Move the shift left from  the
16589         define_insn to the define_expand for lxvl and stxvl instructions.
16590         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16591         and XL_LEN_R definitions to PURE.
16593 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
16595         * config/i386/i386.c (indirect_thunk_name): Declare regno
16596         as unsigned int.  Compare regno with INVALID_REGNUM.
16597         (output_indirect_thunk): Ditto.
16598         (output_indirect_thunk_function): Ditto.
16599         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
16600         in the call to output_indirect_thunk_function.
16602 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
16604         PR middle-end/83884
16605         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16606         rather than the size of inner_type to determine the stack slot size
16607         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16609 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
16611         PR target/83546
16612         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16613         to PTA_SILVERMONT.
16615 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
16617         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16618         endian Linux systems to optionally enable multilibs for selecting
16619         the long double type if the user configured an explicit type.
16620         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16621         have no long double multilibs if not defined.
16622         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16623         warn if the user used -mabi={ieee,ibm}longdouble and we built
16624         multilibs for long double.
16625         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16626         appropriate multilib option.
16627         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16628         multilib options.
16629         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16630         for building long double multilibs.
16631         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16633 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
16635         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16636         copies.
16638         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16639         64 bits.
16640         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16641         128 bits.
16643         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16644         variables.
16646         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16647         return value.
16649 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16651         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16652         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16654 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16656         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16657         different rtl trees depending on TARGET_64BIT.
16658         (rs6000_gen_lvx): Likewise.
16660 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16662         * config/visium/visium.md (nop): Tweak comment.
16663         (hazard_nop): Likewise.
16665 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16667         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16668         -mspeculate-indirect-jumps.
16669         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16670         for -mno-speculate-indirect-jumps.
16671         (*call_indirect_elfv2<mode>_nospec): New define_insn.
16672         (*call_value_indirect_elfv2<mode>): Disable for
16673         -mno-speculate-indirect-jumps.
16674         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16675         (indirect_jump): Emit different RTL for
16676         -mno-speculate-indirect-jumps.
16677         (*indirect_jump<mode>): Disable for
16678         -mno-speculate-indirect-jumps.
16679         (*indirect_jump<mode>_nospec): New define_insn.
16680         (tablejump): Emit different RTL for
16681         -mno-speculate-indirect-jumps.
16682         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16683         (tablejumpsi_nospec): New define_expand.
16684         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16685         (tablejumpdi_nospec): New define_expand.
16686         (*tablejump<mode>_internal1): Disable for
16687         -mno-speculate-indirect-jumps.
16688         (*tablejump<mode>_internal1_nospec): New define_insn.
16689         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16690         option.
16692 2018-01-16  Artyom Skrobov tyomitch@gmail.com
16694         * caller-save.c (insert_save): Drop unnecessary parameter.  All
16695         callers updated.
16697 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16698             Richard Biener  <rguenth@suse.de>
16700         PR libgomp/83590
16701         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16702         return early, inline manually is_gimple_sizepos.  Make sure if we
16703         call gimplify_expr we don't end up with a gimple constant.
16704         * tree.c (variably_modified_type_p): Don't return true for
16705         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16706         * gimplify.h (is_gimple_sizepos): Remove.
16708 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16710         PR tree-optimization/83857
16711         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16712         vectorizable_live_operation for pure SLP statements.
16713         (vectorizable_live_operation): Handle PHIs.
16715 2018-01-16  Richard Biener  <rguenther@suse.de>
16717         PR tree-optimization/83867
16718         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16719         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16721 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16723         PR c/83844
16724         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16725         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16726         If off is not INTEGER_CST, issue a may not be aligned warning
16727         rather than isn't aligned.  Use isn%'t rather than isn't.
16728         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16729         into MULT_EXPR.
16730         <case MULT_EXPR>: Improve the case when bottom and one of the
16731         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16732         operand, in that case check if the other operand is multiple of
16733         bottom divided by the INTEGER_CST operand.
16735 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16737         PR target/83858
16738         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16739         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16740         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16741         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16742         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16743         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16744         (pa_function_arg_size): New function.
16746 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16748         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16749         in a separate statement.
16751 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16753         PR tree-optimization/83847
16754         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16755         group gathers and scatters.
16757 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16759         PR rtl-optimization/86620
16760         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16762         PR rtl-optimization/83213
16763         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16764         to last if both are JUMP_INSNs.
16766         PR tree-optimization/83843
16767         * gimple-ssa-store-merging.c
16768         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16769         store_immediate_info for bswap/nop orig_stores.
16771 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16773         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16774         !TARGET_MUL.
16775         <UDIV>: Increase cost if !TARGET_DIV.
16777 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16779         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16780         (define_attr "cr_logical_3op"): New.
16781         (cceq_ior_compare): Adjust.
16782         (cceq_ior_compare_complement): Adjust.
16783         (*cceq_rev_compare): Adjust.
16784         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16785         (is_cracked_insn): Adjust.
16786         (insn_must_be_first_in_group): Adjust.
16787         * config/rs6000/40x.md: Adjust.
16788         * config/rs6000/440.md: Adjust.
16789         * config/rs6000/476.md: Adjust.
16790         * config/rs6000/601.md: Adjust.
16791         * config/rs6000/603.md: Adjust.
16792         * config/rs6000/6xx.md: Adjust.
16793         * config/rs6000/7450.md: Adjust.
16794         * config/rs6000/7xx.md: Adjust.
16795         * config/rs6000/8540.md: Adjust.
16796         * config/rs6000/cell.md: Adjust.
16797         * config/rs6000/e300c2c3.md: Adjust.
16798         * config/rs6000/e500mc.md: Adjust.
16799         * config/rs6000/e500mc64.md: Adjust.
16800         * config/rs6000/e5500.md: Adjust.
16801         * config/rs6000/e6500.md: Adjust.
16802         * config/rs6000/mpc.md: Adjust.
16803         * config/rs6000/power4.md: Adjust.
16804         * config/rs6000/power5.md: Adjust.
16805         * config/rs6000/power6.md: Adjust.
16806         * config/rs6000/power7.md: Adjust.
16807         * config/rs6000/power8.md: Adjust.
16808         * config/rs6000/power9.md: Adjust.
16809         * config/rs6000/rs64.md: Adjust.
16810         * config/rs6000/titan.md: Adjust.
16812 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16814         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16815         ix86_indirect_branch_register logic.
16817 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16819         * config/i386/constraints.md (Bs): Update
16820         ix86_indirect_branch_register check.  Don't check
16821         ix86_indirect_branch_register with GOT_memory_operand.
16822         (Bw): Likewise.
16823         * config/i386/predicates.md (GOT_memory_operand): Don't check
16824         ix86_indirect_branch_register here.
16825         (GOT32_symbol_operand): Likewise.
16827 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16829         * config/i386/predicates.md (constant_call_address_operand):
16830         Rewrite ix86_indirect_branch_register logic.
16831         (sibcall_insn_operand): Likewise.
16833 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16835         * config/i386/constraints.md (Bs): Replace
16836         ix86_indirect_branch_thunk_register with
16837         ix86_indirect_branch_register.
16838         (Bw): Likewise.
16839         * config/i386/i386.md (indirect_jump): Likewise.
16840         (tablejump): Likewise.
16841         (*sibcall_memory): Likewise.
16842         (*sibcall_value_memory): Likewise.
16843         Peepholes of indirect call and jump via memory: Likewise.
16844         * config/i386/i386.opt: Likewise.
16845         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16846         (GOT_memory_operand): Likewise.
16847         (call_insn_operand): Likewise.
16848         (sibcall_insn_operand): Likewise.
16849         (GOT32_symbol_operand): Likewise.
16851 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16853         PR middle-end/83837
16854         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16855         type rather than type addr's type points to.
16856         (expand_omp_atomic_mutex): Likewise.
16857         (expand_omp_atomic): Likewise.
16859 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16861         PR target/83839
16862         * config/i386/i386.c (output_indirect_thunk_function): Use
16863         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16864         for  __x86_return_thunk.
16866 2018-01-15  Richard Biener  <rguenther@suse.de>
16868         PR middle-end/83850
16869         * expmed.c (extract_bit_field_1): Fix typo.
16871 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16873         PR target/83687
16874         * config/arm/iterators.md (VF): New mode iterator.
16875         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16876         Remove integer-related logic from pattern.
16877         (neon_vabd<mode>_3): Likewise.
16879 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
16881         PR middle-end/82694
16882         * common.opt (fstrict-overflow): No longer an alias.
16883         (fwrapv-pointer): New option.
16884         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16885         also for pointer types based on flag_wrapv_pointer.
16886         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16887         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16888         opts->x_flag_wrapv got set.
16889         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16890         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16891         POINTER_TYPE_OVERFLOW_UNDEFINED.
16892         * match.pd: Likewise in address comparison pattern.
16893         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16895 2018-01-15  Richard Biener  <rguenther@suse.de>
16897         PR lto/83804
16898         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16899         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
16900         Reset type names to their identifier if their TYPE_DECL doesn't
16901         have linkage (and thus is used for ODR and devirt).
16902         (save_debug_info_for_decl): Remove.
16903         (save_debug_info_for_type): Likewise.
16904         (add_tree_to_fld_list): Adjust.
16905         * tree-pretty-print.c (dump_generic_node): Make dumping of
16906         type names more robust.
16908 2018-01-15  Richard Biener  <rguenther@suse.de>
16910         * BASE-VER: Bump to 8.0.1.
16912 2018-01-14  Martin Sebor  <msebor@redhat.com>
16914         PR other/83508
16915         * builtins.c (check_access): Avoid warning when the no-warning bit
16916         is set.
16918 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
16920         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16921         * ira-color (allocno_hard_regs_compare): Likewise.
16923 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
16925         PR target/83013
16926         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16927         Use .pushsection/.popsection.
16929 2018-01-14  Martin Sebor  <msebor@redhat.com>
16931         PR c++/81327
16932         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16934 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
16936         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16937         entry from extra_headers.
16938         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16939         extra_headers, make the list bitwise identical to the i?86-*-* one.
16941 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16943         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16944         -mcmodel=large with -mindirect-branch=thunk,
16945         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16946         -mfunction-return=thunk-extern.
16947         * doc/invoke.texi: Document -mcmodel=large is incompatible with
16948         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16949         -mfunction-return=thunk and -mfunction-return=thunk-extern.
16951 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16953         * config/i386/i386.c (print_reg): Print the name of the full
16954         integer register without '%'.
16955         (ix86_print_operand): Handle 'V'.
16956         * doc/extend.texi: Document 'V' modifier.
16958 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16960         * config/i386/constraints.md (Bs): Disallow memory operand for
16961         -mindirect-branch-register.
16962         (Bw): Likewise.
16963         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16964         (GOT_memory_operand): Likewise.
16965         (call_insn_operand): Likewise.
16966         (sibcall_insn_operand): Likewise.
16967         (GOT32_symbol_operand): Likewise.
16968         * config/i386/i386.md (indirect_jump): Call convert_memory_address
16969         for -mindirect-branch-register.
16970         (tablejump): Likewise.
16971         (*sibcall_memory): Likewise.
16972         (*sibcall_value_memory): Likewise.
16973         Disallow peepholes of indirect call and jump via memory for
16974         -mindirect-branch-register.
16975         (*call_pop): Replace m with Bw.
16976         (*call_value_pop): Likewise.
16977         (*sibcall_pop_memory): Replace m with Bs.
16978         * config/i386/i386.opt (mindirect-branch-register): New option.
16979         * doc/invoke.texi: Document -mindirect-branch-register option.
16981 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
16983         * config/i386/i386-protos.h (ix86_output_function_return): New.
16984         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16985         set function_return_type.
16986         (indirect_thunk_name): Add ret_p to indicate thunk for function
16987         return.
16988         (output_indirect_thunk_function): Pass false to
16989         indirect_thunk_name.
16990         (ix86_output_indirect_branch_via_reg): Likewise.
16991         (ix86_output_indirect_branch_via_push): Likewise.
16992         (output_indirect_thunk_function): Create alias for function
16993         return thunk if regno < 0.
16994         (ix86_output_function_return): New function.
16995         (ix86_handle_fndecl_attribute): Handle function_return.
16996         (ix86_attribute_table): Add function_return.
16997         * config/i386/i386.h (machine_function): Add
16998         function_return_type.
16999         * config/i386/i386.md (simple_return_internal): Use
17000         ix86_output_function_return.
17001         (simple_return_internal_long): Likewise.
17002         * config/i386/i386.opt (mfunction-return=): New option.
17003         (indirect_branch): Mention -mfunction-return=.
17004         * doc/extend.texi: Document function_return function attribute.
17005         * doc/invoke.texi: Document -mfunction-return= option.
17007 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17009         * config/i386/i386-opts.h (indirect_branch): New.
17010         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17011         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17012         with local indirect jump when converting indirect call and jump.
17013         (ix86_set_indirect_branch_type): New.
17014         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17015         (indirectlabelno): New.
17016         (indirect_thunk_needed): Likewise.
17017         (indirect_thunk_bnd_needed): Likewise.
17018         (indirect_thunks_used): Likewise.
17019         (indirect_thunks_bnd_used): Likewise.
17020         (INDIRECT_LABEL): Likewise.
17021         (indirect_thunk_name): Likewise.
17022         (output_indirect_thunk): Likewise.
17023         (output_indirect_thunk_function): Likewise.
17024         (ix86_output_indirect_branch_via_reg): Likewise.
17025         (ix86_output_indirect_branch_via_push): Likewise.
17026         (ix86_output_indirect_branch): Likewise.
17027         (ix86_output_indirect_jmp): Likewise.
17028         (ix86_code_end): Call output_indirect_thunk_function if needed.
17029         (ix86_output_call_insn): Call ix86_output_indirect_branch if
17030         needed.
17031         (ix86_handle_fndecl_attribute): Handle indirect_branch.
17032         (ix86_attribute_table): Add indirect_branch.
17033         * config/i386/i386.h (machine_function): Add indirect_branch_type
17034         and has_local_indirect_jump.
17035         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17036         to true.
17037         (tablejump): Likewise.
17038         (*indirect_jump): Use ix86_output_indirect_jmp.
17039         (*tablejump_1): Likewise.
17040         (simple_return_indirect_internal): Likewise.
17041         * config/i386/i386.opt (mindirect-branch=): New option.
17042         (indirect_branch): New.
17043         (keep): Likewise.
17044         (thunk): Likewise.
17045         (thunk-inline): Likewise.
17046         (thunk-extern): Likewise.
17047         * doc/extend.texi: Document indirect_branch function attribute.
17048         * doc/invoke.texi: Document -mindirect-branch= option.
17050 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
17052         PR ipa/83051
17053         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17055 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
17057         * ipa-inline.c (want_inline_small_function_p): Return false if
17058         inlining has already failed with CIF_FINAL_ERROR.
17059         (update_caller_keys): Call want_inline_small_function_p before
17060         can_inline_edge_p.
17061         (update_callee_keys): Likewise.
17063 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17065         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17066         New function.
17067         (rs6000_quadword_masked_address_p): Likewise.
17068         (quad_aligned_load_p): Likewise.
17069         (quad_aligned_store_p): Likewise.
17070         (const_load_sequence_p): Add comment to describe the outer-most loop.
17071         (mimic_memory_attributes_and_flags): New function.
17072         (rs6000_gen_stvx): Likewise.
17073         (replace_swapped_aligned_store): Likewise.
17074         (rs6000_gen_lvx): Likewise.
17075         (replace_swapped_aligned_load): Likewise.
17076         (replace_swapped_load_constant): Capitalize argument name in
17077         comment describing this function.
17078         (rs6000_analyze_swaps): Add a third pass to search for vector loads
17079         and stores that access quad-word aligned addresses and replace
17080         with stvx or lvx instructions when appropriate.
17081         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17082         New function prototype.
17083         (rs6000_quadword_masked_address_p): Likewise.
17084         (rs6000_gen_lvx): Likewise.
17085         (rs6000_gen_stvx): Likewise.
17086         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17087         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17088         when memory address is aligned.
17089         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17090         this split to select lvx instruction when memory address is aligned.
17091         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17092         instruction when memory address is aligned.
17093         (*vsx_le_perm_load_v16qi): Likewise.
17094         (four unnamed splitters): Modify to select the stvx instruction
17095         when memory is aligned.
17097 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
17099         * predict.c (determine_unlikely_bbs): Handle correctly BBs
17100         which appears in the queue multiple times.
17102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17103             Alan Hayward  <alan.hayward@arm.com>
17104             David Sherwood  <david.sherwood@arm.com>
17106         * tree-vectorizer.h (vec_lower_bound): New structure.
17107         (_loop_vec_info): Add check_nonzero and lower_bounds.
17108         (LOOP_VINFO_CHECK_NONZERO): New macro.
17109         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17110         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17111         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17112         fields.  Make seg_len the distance travelled, not including the
17113         access size.
17114         (dr_direction_indicator): Declare.
17115         (dr_zero_step_indicator): Likewise.
17116         (dr_known_forward_stride_p): Likewise.
17117         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17118         tree-ssanames.h.
17119         (runtime_alias_check_p): Allow runtime alias checks with
17120         variable strides.
17121         (operator ==): Compare access_size and align.
17122         (prune_runtime_alias_test_list): Rework for new distinction between
17123         the access_size and seg_len.
17124         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
17125         segment lengths.
17126         (get_segment_min_max): New function.
17127         (create_intersect_range_checks): Use it.
17128         (dr_step_indicator): New function.
17129         (dr_direction_indicator): Likewise.
17130         (dr_zero_step_indicator): Likewise.
17131         (dr_known_forward_stride_p): Likewise.
17132         * tree-loop-distribution.c (data_ref_segment_size): Return
17133         DR_STEP * (niters - 1).
17134         (compute_alias_check_pairs): Update call to the dr_with_seg_len
17135         constructor.
17136         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17137         (vect_preserves_scalar_order_p): New function, split out from...
17138         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
17139         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17140         (vect_vfa_access_size): New function.
17141         (vect_vfa_align): Likewise.
17142         (vect_compile_time_alias): Take access_size_a and access_b arguments.
17143         (dump_lower_bound): New function.
17144         (vect_check_lower_bound): Likewise.
17145         (vect_small_gap_p): Likewise.
17146         (vectorizable_with_step_bound_p): Likewise.
17147         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17148         depencies if the vectorization factor is 1.  Convert the checks
17149         for nonzero steps into checks on the bounds of DR_STEP.  Try using
17150         a bunds check for variable steps if the minimum required step is
17151         relatively small. Update calls to the dr_with_seg_len
17152         constructor and to vect_compile_time_alias.
17153         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17154         function.
17155         (vect_loop_versioning): Call it.
17156         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17157         when retrying.
17158         (vect_estimate_min_profitable_iters): Account for any bounds checks.
17160 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17161             Alan Hayward  <alan.hayward@arm.com>
17162             David Sherwood  <david.sherwood@arm.com>
17164         * doc/sourcebuild.texi (vect_scatter_store): Document.
17165         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17166         optabs.
17167         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17168         Document.
17169         * genopinit.c (main): Add supports_vec_scatter_store and
17170         supports_vec_scatter_store_cached to target_optabs.
17171         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17172         IFN_MASK_SCATTER_STORE.
17173         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17174         functions.
17175         * internal-fn.h (internal_store_fn_p): Declare.
17176         (internal_fn_stored_value_index): Likewise.
17177         * internal-fn.c (scatter_store_direct): New macro.
17178         (expand_scatter_store_optab_fn): New function.
17179         (direct_scatter_store_optab_supported_p): New macro.
17180         (internal_store_fn_p): New function.
17181         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17182         IFN_MASK_SCATTER_STORE.
17183         (internal_fn_mask_index): Likewise.
17184         (internal_fn_stored_value_index): New function.
17185         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17186         for scatter stores.
17187         * optabs-query.h (supports_vec_scatter_store_p): Declare.
17188         * optabs-query.c (supports_vec_scatter_store_p): New function.
17189         * tree-vectorizer.h (vect_get_store_rhs): Declare.
17190         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17191         true for scatter stores.
17192         (vect_gather_scatter_fn_p): Handle scatter stores too.
17193         (vect_check_gather_scatter): Consider using scatter stores if
17194         supports_vec_scatter_store_p.
17195         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17196         scatter stores too.
17197         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17198         internal_fn_stored_value_index.
17199         (check_load_store_masking): Handle scatter stores too.
17200         (vect_get_store_rhs): Make public.
17201         (vectorizable_call): Use internal_store_fn_p.
17202         (vectorizable_store): Handle scatter store internal functions.
17203         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17204         when deciding whether the end of the group has been reached.
17205         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17206         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17207         (mask_scatter_store<mode>): New insns.
17209 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17210             Alan Hayward  <alan.hayward@arm.com>
17211             David Sherwood  <david.sherwood@arm.com>
17213         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17214         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17215         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17216         function.
17217         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17218         Use vect_truncate_gather_scatter_offset if we can't treat the
17219         operation as a normal gather load or scatter store.
17220         (get_group_load_store_type): Take the gather_scatter_info
17221         as argument.  Try using a gather load or scatter store for
17222         single-element groups.
17223         (get_load_store_type): Update calls to get_group_load_store_type
17224         and vect_use_strided_gather_scatters_p.
17226 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17227             Alan Hayward  <alan.hayward@arm.com>
17228             David Sherwood  <david.sherwood@arm.com>
17230         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17231         optional tree argument.
17232         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17233         null target hooks.
17234         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17235         but continue to use the current value as a fallback.
17236         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17237         to compare the updates.
17238         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17239         (get_load_store_type): Use it when handling a strided access.
17240         (vect_get_strided_load_store_ops): New function.
17241         (vect_get_data_ptr_increment): Likewise.
17242         (vectorizable_load): Handle strided gather loads.  Always pass
17243         a step to vect_create_data_ref_ptr and bump_vector_ptr.
17245 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17246             Alan Hayward  <alan.hayward@arm.com>
17247             David Sherwood  <david.sherwood@arm.com>
17249         * doc/md.texi (gather_load@var{m}): Document.
17250         (mask_gather_load@var{m}): Likewise.
17251         * genopinit.c (main): Add supports_vec_gather_load and
17252         supports_vec_gather_load_cached to target_optabs.
17253         * optabs-tree.c (init_tree_optimization_optabs): Use
17254         ggc_cleared_alloc to allocate target_optabs.
17255         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17256         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17257         functions.
17258         * internal-fn.h (internal_load_fn_p): Declare.
17259         (internal_gather_scatter_fn_p): Likewise.
17260         (internal_fn_mask_index): Likewise.
17261         (internal_gather_scatter_fn_supported_p): Likewise.
17262         * internal-fn.c (gather_load_direct): New macro.
17263         (expand_gather_load_optab_fn): New function.
17264         (direct_gather_load_optab_supported_p): New macro.
17265         (direct_internal_fn_optab): New function.
17266         (internal_load_fn_p): Likewise.
17267         (internal_gather_scatter_fn_p): Likewise.
17268         (internal_fn_mask_index): Likewise.
17269         (internal_gather_scatter_fn_supported_p): Likewise.
17270         * optabs-query.c (supports_at_least_one_mode_p): New function.
17271         (supports_vec_gather_load_p): Likewise.
17272         * optabs-query.h (supports_vec_gather_load_p): Declare.
17273         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17274         and memory_type field.
17275         (NUM_PATTERNS): Bump to 15.
17276         * tree-vect-data-refs.c: Include internal-fn.h.
17277         (vect_gather_scatter_fn_p): New function.
17278         (vect_describe_gather_scatter_call): Likewise.
17279         (vect_check_gather_scatter): Try using internal functions for
17280         gather loads.  Recognize existing calls to a gather load function.
17281         (vect_analyze_data_refs): Consider using gather loads if
17282         supports_vec_gather_load_p.
17283         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17284         (vect_get_gather_scatter_offset_type): Likewise.
17285         (vect_convert_mask_for_vectype): Likewise.
17286         (vect_add_conversion_to_patterm): Likewise.
17287         (vect_try_gather_scatter_pattern): Likewise.
17288         (vect_recog_gather_scatter_pattern): New pattern recognizer.
17289         (vect_vect_recog_func_ptrs): Add it.
17290         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17291         internal_fn_mask_index and internal_gather_scatter_fn_p.
17292         (check_load_store_masking): Take the gather_scatter_info as an
17293         argument and handle gather loads.
17294         (vect_get_gather_scatter_ops): New function.
17295         (vectorizable_call): Check internal_load_fn_p.
17296         (vectorizable_load): Likewise.  Handle gather load internal
17297         functions.
17298         (vectorizable_store): Update call to check_load_store_masking.
17299         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17300         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17301         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17302         (aarch64_gather_scale_operand_d): New predicates.
17303         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17304         (mask_gather_load<mode>): New insns.
17306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17307             Alan Hayward  <alan.hayward@arm.com>
17308             David Sherwood  <david.sherwood@arm.com>
17310         * optabs.def (fold_left_plus_optab): New optab.
17311         * doc/md.texi (fold_left_plus_@var{m}): Document.
17312         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17313         * internal-fn.c (fold_left_direct): Define.
17314         (expand_fold_left_optab_fn): Likewise.
17315         (direct_fold_left_optab_supported_p): Likewise.
17316         * fold-const-call.c (fold_const_fold_left): New function.
17317         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17318         * tree-parloops.c (valid_reduction_p): New function.
17319         (gather_scalar_reductions): Use it.
17320         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17321         (vect_finish_replace_stmt): Declare.
17322         * tree-vect-loop.c (fold_left_reduction_fn): New function.
17323         (needs_fold_left_reduction_p): New function, split out from...
17324         (vect_is_simple_reduction): ...here.  Accept reductions that
17325         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17326         (vect_force_simple_reduction): Also store the reduction type in
17327         the assignment's STMT_VINFO_REDUC_TYPE.
17328         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17329         (merge_with_identity): New function.
17330         (vect_expand_fold_left): Likewise.
17331         (vectorize_fold_left_reduction): Likewise.
17332         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
17333         scalar phi in place for it.  Check for target support and reject
17334         cases that would reassociate the operation.  Defer the transform
17335         phase to vectorize_fold_left_reduction.
17336         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17337         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17338         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17340 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17342         * tree-if-conv.c (predicate_mem_writes): Remove redundant
17343         call to ifc_temp_var.
17345 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17346             Alan Hayward  <alan.hayward@arm.com>
17347             David Sherwood  <david.sherwood@arm.com>
17349         * target.def (legitimize_address_displacement): Take the original
17350         offset as a poly_int.
17351         * targhooks.h (default_legitimize_address_displacement): Update
17352         accordingly.
17353         * targhooks.c (default_legitimize_address_displacement): Likewise.
17354         * doc/tm.texi: Regenerate.
17355         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17356         as an argument, moving assert of ad->disp == ad->disp_term to...
17357         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
17358         Try calling targetm.legitimize_address_displacement before expanding
17359         the address rather than afterwards, and adjust for the new interface.
17360         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17361         Match the new hook interface.  Handle SVE addresses.
17362         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17363         new hook interface.
17365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17367         * Makefile.in (OBJS): Add early-remat.o.
17368         * target.def (select_early_remat_modes): New hook.
17369         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17370         * doc/tm.texi: Regenerate.
17371         * targhooks.h (default_select_early_remat_modes): Declare.
17372         * targhooks.c (default_select_early_remat_modes): New function.
17373         * timevar.def (TV_EARLY_REMAT): New timevar.
17374         * passes.def (pass_early_remat): New pass.
17375         * tree-pass.h (make_pass_early_remat): Declare.
17376         * early-remat.c: New file.
17377         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17378         function.
17379         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17381 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17382             Alan Hayward  <alan.hayward@arm.com>
17383             David Sherwood  <david.sherwood@arm.com>
17385         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17386         vfm1 with a bound_epilog parameter.
17387         (vect_do_peeling): Update calls accordingly, and move the prologue
17388         call earlier in the function.  Treat the base bound_epilog as 0 for
17389         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
17390         this base when peeling for gaps.
17391         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17392         with fully-masked loops.
17393         (vect_estimate_min_profitable_iters): Handle the single peeled
17394         iteration in that case.
17396 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17397             Alan Hayward  <alan.hayward@arm.com>
17398             David Sherwood  <david.sherwood@arm.com>
17400         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17401         single-element interleaving even if the size is not a power of 2.
17402         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17403         accesses for single-element interleaving if the group size is
17404         not a power of 2.
17406 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17407             Alan Hayward  <alan.hayward@arm.com>
17408             David Sherwood  <david.sherwood@arm.com>
17410         * doc/md.texi (fold_extract_last_@var{m}): Document.
17411         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17412         * optabs.def (fold_extract_last_optab): New optab.
17413         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17414         * internal-fn.c (fold_extract_direct): New macro.
17415         (expand_fold_extract_optab_fn): Likewise.
17416         (direct_fold_extract_optab_supported_p): Likewise.
17417         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17418         * tree-vect-loop.c (vect_model_reduction_cost): Handle
17419         EXTRACT_LAST_REDUCTION.
17420         (get_initial_def_for_reduction): Do not create an initial vector
17421         for EXTRACT_LAST_REDUCTION reductions.
17422         (vectorizable_reduction): Leave the scalar phi in place for
17423         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
17424         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
17425         epilogue code for EXTRACT_LAST_REDUCTION and defer the
17426         transform phase to vectorizable_condition.
17427         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17428         split out from...
17429         (vect_finish_stmt_generation): ...here.
17430         (vect_finish_replace_stmt): New function.
17431         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17432         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17433         pattern.
17434         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17436 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17437             Alan Hayward  <alan.hayward@arm.com>
17438             David Sherwood  <david.sherwood@arm.com>
17440         * doc/md.texi (extract_last_@var{m}): Document.
17441         * optabs.def (extract_last_optab): New optab.
17442         * internal-fn.def (EXTRACT_LAST): New internal function.
17443         * internal-fn.c (cond_unary_direct): New macro.
17444         (expand_cond_unary_optab_fn): Likewise.
17445         (direct_cond_unary_optab_supported_p): Likewise.
17446         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17447         loops using EXTRACT_LAST.
17448         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17449         (extract_last_<mode>): ...this optab.
17450         (vec_extract<mode><Vel>): Update accordingly.
17452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17453             Alan Hayward  <alan.hayward@arm.com>
17454             David Sherwood  <david.sherwood@arm.com>
17456         * target.def (empty_mask_is_expensive): New hook.
17457         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17458         * doc/tm.texi: Regenerate.
17459         * targhooks.h (default_empty_mask_is_expensive): Declare.
17460         * targhooks.c (default_empty_mask_is_expensive): New function.
17461         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17462         if the target says that empty masks are expensive.
17463         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17464         New function.
17465         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17467 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17468             Alan Hayward  <alan.hayward@arm.com>
17469             David Sherwood  <david.sherwood@arm.com>
17471         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17472         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17473         (vect_use_loop_mask_for_alignment_p): New function.
17474         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17475         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17476         niters_skip argument.  Make sure that the first niters_skip elements
17477         of the first iteration are inactive.
17478         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17479         Update call to vect_set_loop_masks_directly.
17480         (get_misalign_in_elems): New function, split out from...
17481         (vect_gen_prolog_loop_niters): ...here.
17482         (vect_update_init_of_dr): Take a code argument that specifies whether
17483         the adjustment should be added or subtracted.
17484         (vect_update_init_of_drs): Likewise.
17485         (vect_prepare_for_masked_peels): New function.
17486         (vect_do_peeling): Skip prologue peeling if we're using a mask
17487         instead.  Update call to vect_update_inits_of_drs.
17488         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17489         mask_skip_niters.
17490         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17491         alignment.  Do not include the number of peeled iterations in
17492         the minimum threshold in that case.
17493         (vectorizable_induction): Adjust the start value down by
17494         LOOP_VINFO_MASK_SKIP_NITERS iterations.
17495         (vect_transform_loop): Call vect_prepare_for_masked_peels.
17496         Take the number of skipped iterations into account when calculating
17497         the loop bounds.
17498         * tree-vect-stmts.c (vect_gen_while_not): New function.
17500 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17501             Alan Hayward  <alan.hayward@arm.com>
17502             David Sherwood  <david.sherwood@arm.com>
17504         * doc/sourcebuild.texi (vect_fully_masked): Document.
17505         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17506         default value to 0.
17507         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17508         split out from...
17509         (vect_analyze_loop_2): ...here. Don't check the vectorization
17510         factor against the number of loop iterations if the loop is
17511         fully-masked.
17513 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17514             Alan Hayward  <alan.hayward@arm.com>
17515             David Sherwood  <david.sherwood@arm.com>
17517         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17518         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17519         (dump_groups): Update accordingly.
17520         (iv_use::mem_type): New member variable.
17521         (address_p): New function.
17522         (record_use): Add a mem_type argument and initialize the new
17523         mem_type field.
17524         (record_group_use): Add a mem_type argument.  Use address_p.
17525         Remove obsolete null checks of base_object.  Update call to record_use.
17526         (find_interesting_uses_op): Update call to record_group_use.
17527         (find_interesting_uses_cond): Likewise.
17528         (find_interesting_uses_address): Likewise.
17529         (get_mem_type_for_internal_fn): New function.
17530         (find_address_like_use): Likewise.
17531         (find_interesting_uses_stmt): Try find_address_like_use before
17532         calling find_interesting_uses_op.
17533         (addr_offset_valid_p): Use the iv mem_type field as the type
17534         of the addressed memory.
17535         (add_autoinc_candidates): Likewise.
17536         (get_address_cost): Likewise.
17537         (split_small_address_groups_p): Use address_p.
17538         (split_address_groups): Likewise.
17539         (add_iv_candidate_for_use): Likewise.
17540         (autoinc_possible_for_pair): Likewise.
17541         (rewrite_groups): Likewise.
17542         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17543         (determine_group_iv_cost): Update after split of USE_ADDRESS.
17544         (get_alias_ptr_type_for_ptr_address): New function.
17545         (rewrite_use_address): Rewrite address uses in calls that were
17546         identified by find_address_like_use.
17548 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17549             Alan Hayward  <alan.hayward@arm.com>
17550             David Sherwood  <david.sherwood@arm.com>
17552         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17553         TARGET_MEM_REFs.
17554         * gimple-expr.h (is_gimple_addressable: Likewise.
17555         * gimple-expr.c (is_gimple_address): Likewise.
17556         * internal-fn.c (expand_call_mem_ref): New function.
17557         (expand_mask_load_optab_fn): Use it.
17558         (expand_mask_store_optab_fn): Likewise.
17560 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17561             Alan Hayward  <alan.hayward@arm.com>
17562             David Sherwood  <david.sherwood@arm.com>
17564         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17565         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17566         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17567         (cond_umax@var{mode}): Document.
17568         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17569         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17570         (cond_umin_optab, cond_umax_optab): New optabs.
17571         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17572         (COND_IOR, COND_XOR): New internal functions.
17573         * internal-fn.h (get_conditional_internal_fn): Declare.
17574         * internal-fn.c (cond_binary_direct): New macro.
17575         (expand_cond_binary_optab_fn): Likewise.
17576         (direct_cond_binary_optab_supported_p): Likewise.
17577         (get_conditional_internal_fn): New function.
17578         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17579         Cope with reduction statements that are vectorized as calls rather
17580         than assignments.
17581         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17582         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17583         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17584         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17585         (UNSPEC_COND_EOR): New unspecs.
17586         (optab): Add mappings for them.
17587         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17588         (sve_int_op, sve_fp_op): New int attributes.
17590 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17591             Alan Hayward  <alan.hayward@arm.com>
17592             David Sherwood  <david.sherwood@arm.com>
17594         * optabs.def (while_ult_optab): New optab.
17595         * doc/md.texi (while_ult@var{m}@var{n}): Document.
17596         * internal-fn.def (WHILE_ULT): New internal function.
17597         * internal-fn.h (direct_internal_fn_supported_p): New override
17598         that takes two types as argument.
17599         * internal-fn.c (while_direct): New macro.
17600         (expand_while_optab_fn): New function.
17601         (convert_optab_supported_p): Likewise.
17602         (direct_while_optab_supported_p): New macro.
17603         * wide-int.h (wi::udiv_ceil): New function.
17604         * tree-vectorizer.h (rgroup_masks): New structure.
17605         (vec_loop_masks): New typedef.
17606         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17607         and fully_masked_p.
17608         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17609         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17610         (vect_max_vf): New function.
17611         (slpeel_make_loop_iterate_ntimes): Delete.
17612         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17613         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17614         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17615         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17616         internal-fn.h, stor-layout.h and optabs-query.h.
17617         (vect_set_loop_mask): New function.
17618         (add_preheader_seq): Likewise.
17619         (add_header_seq): Likewise.
17620         (interleave_supported_p): Likewise.
17621         (vect_maybe_permute_loop_masks): Likewise.
17622         (vect_set_loop_masks_directly): Likewise.
17623         (vect_set_loop_condition_masked): Likewise.
17624         (vect_set_loop_condition_unmasked): New function, split out from
17625         slpeel_make_loop_iterate_ntimes.
17626         (slpeel_make_loop_iterate_ntimes): Rename to..
17627         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
17628         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17629         (vect_do_peeling): Update call accordingly.
17630         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17631         loops.
17632         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17633         mask_compare_type, can_fully_mask_p and fully_masked_p.
17634         (release_vec_loop_masks): New function.
17635         (_loop_vec_info): Use it to free the loop masks.
17636         (can_produce_all_loop_masks_p): New function.
17637         (vect_get_max_nscalars_per_iter): Likewise.
17638         (vect_verify_full_masking): Likewise.
17639         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17640         retries, and free the mask rgroups before retrying.  Check loop-wide
17641         reasons for disallowing fully-masked loops.  Make the final decision
17642         about whether use a fully-masked loop or not.
17643         (vect_estimate_min_profitable_iters): Do not assume that peeling
17644         for the number of iterations will be needed for fully-masked loops.
17645         (vectorizable_reduction): Disable fully-masked loops.
17646         (vectorizable_live_operation): Likewise.
17647         (vect_halve_mask_nunits): New function.
17648         (vect_double_mask_nunits): Likewise.
17649         (vect_record_loop_mask): Likewise.
17650         (vect_get_loop_mask): Likewise.
17651         (vect_transform_loop): Handle the case in which the final loop
17652         iteration might handle a partial vector.  Call vect_set_loop_condition
17653         instead of slpeel_make_loop_iterate_ntimes.
17654         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17655         (check_load_store_masking): New function.
17656         (prepare_load_store_mask): Likewise.
17657         (vectorizable_store): Handle fully-masked loops.
17658         (vectorizable_load): Likewise.
17659         (supportable_widening_operation): Use vect_halve_mask_nunits for
17660         booleans.
17661         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17662         (vect_gen_while): New function.
17663         * config/aarch64/aarch64.md (umax<mode>3): New expander.
17664         (aarch64_uqdec<mode>): New insn.
17666 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17667             Alan Hayward  <alan.hayward@arm.com>
17668             David Sherwood  <david.sherwood@arm.com>
17670         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17671         (reduc_xor_scal_optab): New optabs.
17672         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17673         (reduc_xor_scal_@var{m}): Document.
17674         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17675         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17676         internal functions.
17677         * fold-const-call.c (fold_const_call): Handle them.
17678         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17679         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17680         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17681         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17682         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17683         (UNSPEC_XORV): New unspecs.
17684         (optab): Add entries for them.
17685         (BITWISEV): New int iterator.
17686         (bit_reduc_op): New int attributes.
17688 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17689             Alan Hayward  <alan.hayward@arm.com>
17690             David Sherwood  <david.sherwood@arm.com>
17692         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17693         * internal-fn.def (VEC_SHL_INSERT): New internal function.
17694         * optabs.def (vec_shl_insert_optab): New optab.
17695         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17696         (duplicate_and_interleave): Likewise.
17697         * tree-vect-loop.c: Include internal-fn.h.
17698         (neutral_op_for_slp_reduction): New function, split out from
17699         get_initial_defs_for_reduction.
17700         (get_initial_def_for_reduction): Handle option 2 for variable-length
17701         vectors by loading the neutral value into a vector and then shifting
17702         the initial value into element 0.
17703         (get_initial_defs_for_reduction): Replace the code argument with
17704         the neutral value calculated by neutral_op_for_slp_reduction.
17705         Use gimple_build_vector for constant-length vectors.
17706         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17707         but the first group_size elements have a neutral value.
17708         Use duplicate_and_interleave otherwise.
17709         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17710         Update call to get_initial_defs_for_reduction.  Handle SLP
17711         reductions for variable-length vectors by creating one vector
17712         result for each scalar result, with the elements associated
17713         with other scalar results stubbed out with the neutral value.
17714         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17715         Require IFN_VEC_SHL_INSERT for double reductions on
17716         variable-length vectors, or SLP reductions that have
17717         a neutral value.  Require can_duplicate_and_interleave_p
17718         support for variable-length unchained SLP reductions if there
17719         is no neutral value, such as for MIN/MAX reductions.  Also require
17720         the number of vector elements to be a multiple of the number of
17721         SLP statements when doing variable-length unchained SLP reductions.
17722         Update call to vect_create_epilog_for_reduction.
17723         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17724         and remove initial values.
17725         (duplicate_and_interleave): Make public.
17726         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17727         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17729 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17730             Alan Hayward  <alan.hayward@arm.com>
17731             David Sherwood  <david.sherwood@arm.com>
17733         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17734         (can_duplicate_and_interleave_p): New function.
17735         (vect_get_and_check_slp_defs): Take the vector of statements
17736         rather than just the current one.  Remove excess parentheses.
17737         Restriction rejectinon of vect_constant_def and vect_external_def
17738         for variable-length vectors to boolean types, or types for which
17739         can_duplicate_and_interleave_p is false.
17740         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17741         (duplicate_and_interleave): New function.
17742         (vect_get_constant_vectors): Use gimple_build_vector for
17743         constant-length vectors and suitable variable-length constant
17744         vectors.  Use duplicate_and_interleave for other variable-length
17745         vectors.  Don't defer the update when inserting new statements.
17747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17748             Alan Hayward  <alan.hayward@arm.com>
17749             David Sherwood  <david.sherwood@arm.com>
17751         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17752         min_profitable_iters doesn't go negative.
17754 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17755             Alan Hayward  <alan.hayward@arm.com>
17756             David Sherwood  <david.sherwood@arm.com>
17758         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17759         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17760         * optabs.def (vec_mask_load_lanes_optab): New optab.
17761         (vec_mask_store_lanes_optab): Likewise.
17762         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17763         (MASK_STORE_LANES): Likewise.
17764         * internal-fn.c (mask_load_lanes_direct): New macro.
17765         (mask_store_lanes_direct): Likewise.
17766         (expand_mask_load_optab_fn): Handle masked operations.
17767         (expand_mask_load_lanes_optab_fn): New macro.
17768         (expand_mask_store_optab_fn): Handle masked operations.
17769         (expand_mask_store_lanes_optab_fn): New macro.
17770         (direct_mask_load_lanes_optab_supported_p): Likewise.
17771         (direct_mask_store_lanes_optab_supported_p): Likewise.
17772         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17773         parameter.
17774         (vect_load_lanes_supported): Likewise.
17775         * tree-vect-data-refs.c (strip_conversion): New function.
17776         (can_group_stmts_p): Likewise.
17777         (vect_analyze_data_ref_accesses): Use it instead of checking
17778         for a pair of assignments.
17779         (vect_store_lanes_supported): Take a masked_p parameter.
17780         (vect_load_lanes_supported): Likewise.
17781         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17782         vect_store_lanes_supported and vect_load_lanes_supported.
17783         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17784         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17785         parameter.  Don't allow gaps for masked accesses.
17786         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17787         and vect_load_lanes_supported.
17788         (get_load_store_type): Take a masked_p parameter and update
17789         call to get_group_load_store_type.
17790         (vectorizable_store): Update call to get_load_store_type.
17791         Handle IFN_MASK_STORE_LANES.
17792         (vectorizable_load): Update call to get_load_store_type.
17793         Handle IFN_MASK_LOAD_LANES.
17795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17796             Alan Hayward  <alan.hayward@arm.com>
17797             David Sherwood  <david.sherwood@arm.com>
17799         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17800         modes for SVE.
17801         * config/aarch64/aarch64-protos.h
17802         (aarch64_sve_struct_memory_operand_p): Declare.
17803         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17804         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17805         (VPRED, vpred): Handle SVE structure modes.
17806         * config/aarch64/constraints.md (Utx): New constraint.
17807         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17808         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17809         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17810         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17811         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17812         structure modes.  Split into pieces after RA.
17813         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17814         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17815         New patterns.
17816         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17817         SVE structure modes.
17818         (aarch64_classify_address): Likewise.
17819         (sizetochar): Move earlier in file.
17820         (aarch64_print_operand): Handle SVE register lists.
17821         (aarch64_array_mode): New function.
17822         (aarch64_sve_struct_memory_operand_p): Likewise.
17823         (TARGET_ARRAY_MODE): Redefine.
17825 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17826             Alan Hayward  <alan.hayward@arm.com>
17827             David Sherwood  <david.sherwood@arm.com>
17829         * target.def (array_mode): New target hook.
17830         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17831         * doc/tm.texi: Regenerate.
17832         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17833         * hooks.c (hook_optmode_mode_uhwi_none): New function.
17834         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17835         targetm.array_mode.
17836         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
17837         type sizes.
17839 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17840             Alan Hayward  <alan.hayward@arm.com>
17841             David Sherwood  <david.sherwood@arm.com>
17843         * fold-const.c (fold_binary_loc): Check the argument types
17844         rather than the result type when testing for a vector operation.
17846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17848         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17849         * doc/tm.texi: Regenerate.
17851 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17852             Alan Hayward  <alan.hayward@arm.com>
17853             David Sherwood  <david.sherwood@arm.com>
17855         * doc/invoke.texi (-msve-vector-bits=): Document new option.
17856         (sve): Document new AArch64 extension.
17857         * doc/md.texi (w): Extend the description of the AArch64
17858         constraint to include SVE vectors.
17859         (Upl, Upa): Document new AArch64 predicate constraints.
17860         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17861         enum.
17862         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17863         (msve-vector-bits=): New option.
17864         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17865         SVE when these are disabled.
17866         (sve): New extension.
17867         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17868         modes.  Adjust their number of units based on aarch64_sve_vg.
17869         (MAX_BITSIZE_MODE_ANY_MODE): Define.
17870         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17871         aarch64_addr_query_type.
17872         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17873         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17874         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17875         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17876         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17877         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17878         (aarch64_simd_imm_zero_p): Delete.
17879         (aarch64_check_zero_based_sve_index_immediate): Declare.
17880         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17881         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17882         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17883         (aarch64_sve_float_mul_immediate_p): Likewise.
17884         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17885         rather than an rtx.
17886         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17887         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17888         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17889         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17890         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17891         (aarch64_regmode_natural_size): Likewise.
17892         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17893         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17894         left one place.
17895         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17896         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17897         for VG and the SVE predicate registers.
17898         (V_ALIASES): Add a "z"-prefixed alias.
17899         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17900         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17901         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17902         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17903         (REG_CLASS_NAMES): Add entries for them.
17904         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
17905         and the predicate registers.
17906         (aarch64_sve_vg): Declare.
17907         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17908         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17909         (REGMODE_NATURAL_SIZE): Define.
17910         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17911         SVE macros.
17912         * config/aarch64/aarch64.c: Include cfgrtl.h.
17913         (simd_immediate_info): Add a constructor for series vectors,
17914         and an associated step field.
17915         (aarch64_sve_vg): New variable.
17916         (aarch64_dbx_register_number): Handle VG and the predicate registers.
17917         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17918         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17919         (VEC_ANY_DATA, VEC_STRUCT): New constants.
17920         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17921         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17922         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17923         (aarch64_get_mask_mode): New functions.
17924         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17925         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17926         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
17927         predicate modes and predicate registers.  Explicitly restrict
17928         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
17929         to store a vector mode if it is recognized by
17930         aarch64_classify_vector_mode.
17931         (aarch64_regmode_natural_size): New function.
17932         (aarch64_hard_regno_caller_save_mode): Return the original mode
17933         for predicates.
17934         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17935         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17936         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17937         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17938         functions.
17939         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
17940         does not overlap dest if the function is frame-related.  Handle
17941         SVE constants.
17942         (aarch64_split_add_offset): New function.
17943         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17944         them aarch64_add_offset.
17945         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17946         and update call to aarch64_sub_sp.
17947         (aarch64_add_cfa_expression): New function.
17948         (aarch64_expand_prologue): Pass extra temporary registers to the
17949         functions above.  Handle the case in which we need to emit new
17950         DW_CFA_expressions for registers that were originally saved
17951         relative to the stack pointer, but now have to be expressed
17952         relative to the frame pointer.
17953         (aarch64_output_mi_thunk): Pass extra temporary registers to the
17954         functions above.
17955         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
17956         IP0 and IP1 values for SVE frames.
17957         (aarch64_expand_vec_series): New function.
17958         (aarch64_expand_sve_widened_duplicate): Likewise.
17959         (aarch64_expand_sve_const_vector): Likewise.
17960         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17961         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
17962         into the register, rather than emitting a SET directly.
17963         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17964         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17965         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17966         (offset_9bit_signed_scaled_p): New functions.
17967         (aarch64_replicate_bitmask_imm): New function.
17968         (aarch64_bitmask_imm): Use it.
17969         (aarch64_cannot_force_const_mem): Reject expressions involving
17970         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
17971         (aarch64_classify_index): Handle SVE indices, by requiring
17972         a plain register index with a scale that matches the element size.
17973         (aarch64_classify_address): Handle SVE addresses.  Assert that
17974         the mode of the address is VOIDmode or an integer mode.
17975         Update call to aarch64_classify_symbol.
17976         (aarch64_classify_symbolic_expression): Update call to
17977         aarch64_classify_symbol.
17978         (aarch64_const_vec_all_in_range_p): New function.
17979         (aarch64_print_vector_float_operand): Likewise.
17980         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
17981         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
17982         and the FP immediates 1.0 and 0.5.
17983         (aarch64_print_address_internal): Handle SVE addresses.
17984         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17985         (aarch64_regno_regclass): Handle predicate registers.
17986         (aarch64_secondary_reload): Handle big-endian reloads of SVE
17987         data modes.
17988         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
17989         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
17990         (aarch64_convert_sve_vector_bits): New function.
17991         (aarch64_override_options): Use it to handle -msve-vector-bits=.
17992         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17993         rather than an rtx.
17994         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
17995         Handle SVE vector and predicate modes.  Accept VL-based constants
17996         that need only one temporary register, and VL offsets that require
17997         no temporary registers.
17998         (aarch64_conditional_register_usage): Mark the predicate registers
17999         as fixed if SVE isn't available.
18000         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18001         Return true for SVE vector and predicate modes.
18002         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18003         rather than an unsigned int.  Handle SVE modes.
18004         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
18005         SVE modes.
18006         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18007         if SVE is enabled.
18008         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18009         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18010         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18011         (aarch64_sve_float_mul_immediate_p): New functions.
18012         (aarch64_sve_valid_immediate): New function.
18013         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18014         Explicitly reject structure modes.  Check for INDEX constants.
18015         Handle PTRUE and PFALSE constants.
18016         (aarch64_check_zero_based_sve_index_immediate): New function.
18017         (aarch64_simd_imm_zero_p): Delete.
18018         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18019         vector modes.  Accept constants in the range of CNT[BHWD].
18020         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18021         ask for an Advanced SIMD mode.
18022         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18023         (aarch64_simd_vector_alignment): Handle SVE predicates.
18024         (aarch64_vectorize_preferred_vector_alignment): New function.
18025         (aarch64_simd_vector_alignment_reachable): Use it instead of
18026         the vector size.
18027         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18028         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18029         functions.
18030         (MAX_VECT_LEN): Delete.
18031         (expand_vec_perm_d): Add a vec_flags field.
18032         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18033         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18034         (aarch64_evpc_ext): Don't apply a big-endian lane correction
18035         for SVE modes.
18036         (aarch64_evpc_rev): Rename to...
18037         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
18038         (aarch64_evpc_rev_global): New function.
18039         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18040         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18041         MAX_VECT_LEN.
18042         (aarch64_evpc_sve_tbl): New function.
18043         (aarch64_expand_vec_perm_const_1): Update after rename of
18044         aarch64_evpc_rev.  Handle SVE permutes too, trying
18045         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18046         than aarch64_evpc_tbl.
18047         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18048         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18049         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18050         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18051         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18052         (aarch64_expand_sve_vcond): New functions.
18053         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18054         of aarch64_vector_mode_p.
18055         (aarch64_dwarf_poly_indeterminate_value): New function.
18056         (aarch64_compute_pressure_classes): Likewise.
18057         (aarch64_can_change_mode_class): Likewise.
18058         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18059         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18060         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18061         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18062         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18063         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18064         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18065         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18066         constraints.
18067         (Dn, Dl, Dr): Accept const as well as const_vector.
18068         (Dz): Likewise.  Compare against CONST0_RTX.
18069         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18070         of "vector" where appropriate.
18071         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18072         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18073         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18074         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18075         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18076         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18077         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18078         (v_int_equiv): Extend to SVE modes.
18079         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18080         mode attributes.
18081         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18082         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18083         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18084         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18085         (SVE_COND_FP_CMP): New int iterators.
18086         (perm_hilo): Handle the new unpack unspecs.
18087         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18088         attributes.
18089         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18090         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18091         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18092         (aarch64_equality_operator, aarch64_constant_vector_operand)
18093         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18094         (aarch64_sve_nonimmediate_operand): Likewise.
18095         (aarch64_sve_general_operand): Likewise.
18096         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18097         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18098         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18099         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18100         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18101         (aarch64_sve_float_arith_immediate): Likewise.
18102         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18103         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18104         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18105         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18106         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18107         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18108         (aarch64_sve_float_arith_operand): Likewise.
18109         (aarch64_sve_float_arith_with_sub_operand): Likewise.
18110         (aarch64_sve_float_mul_operand): Likewise.
18111         (aarch64_sve_vec_perm_operand): Likewise.
18112         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18113         (aarch64_mov_operand): Accept const_poly_int and const_vector.
18114         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18115         as well as const_vector.
18116         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18117         in file.  Use CONST0_RTX and CONSTM1_RTX.
18118         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
18119         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18120         Use aarch64_simd_imm_zero.
18121         * config/aarch64/aarch64-sve.md: New file.
18122         * config/aarch64/aarch64.md: Include it.
18123         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18124         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18125         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18126         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18127         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18128         (sve): New attribute.
18129         (enabled): Disable instructions with the sve attribute unless
18130         TARGET_SVE.
18131         (movqi, movhi): Pass CONST_POLY_INT operaneds through
18132         aarch64_expand_mov_immediate.
18133         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18134         CNT[BHSD] immediates.
18135         (movti): Split CONST_POLY_INT moves into two halves.
18136         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18137         Split additions that need a temporary here if the destination
18138         is the stack pointer.
18139         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18140         (*add<mode>3_poly_1): New instruction.
18141         (set_clobber_cc): New expander.
18143 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18145         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18146         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
18147         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18148         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18149         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
18150         Change innermode from fixed_mode_size to machine_mode.
18151         (simplify_subreg): Update call accordingly.  Handle a constant-sized
18152         subreg of a variable-length CONST_VECTOR.
18154 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18155             Alan Hayward  <alan.hayward@arm.com>
18156             David Sherwood  <david.sherwood@arm.com>
18158         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18159         (add_offset_to_base): New function, split out from...
18160         (create_mem_ref): ...here.  When handling a scale other than 1,
18161         check first whether the address is valid without the offset.
18162         Add it into the base if so, leaving the index and scale as-is.
18164 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18166         PR c++/83778
18167         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18168         fold_for_warn before checking if arg2 is INTEGER_CST.
18170 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
18172         * config/rs6000/predicates.md (load_multiple_operation): Delete.
18173         (store_multiple_operation): Delete.
18174         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18175         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18176         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18177         guarded by TARGET_STRING.
18178         (rs6000_output_load_multiple): Delete.
18179         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18180         OPTION_MASK_STRING / TARGET_STRING handling.
18181         (print_operand) <'N', 'O'>: Add comment that these are unused now.
18182         (const rs6000_opt_masks) <"string">: Change mask to 0.
18183         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18184         (MASK_STRING): Delete.
18185         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18186         parts.  Simplify.
18187         (load_multiple): Delete.
18188         (*ldmsi8): Delete.
18189         (*ldmsi7): Delete.
18190         (*ldmsi6): Delete.
18191         (*ldmsi5): Delete.
18192         (*ldmsi4): Delete.
18193         (*ldmsi3): Delete.
18194         (store_multiple): Delete.
18195         (*stmsi8): Delete.
18196         (*stmsi7): Delete.
18197         (*stmsi6): Delete.
18198         (*stmsi5): Delete.
18199         (*stmsi4): Delete.
18200         (*stmsi3): Delete.
18201         (movmemsi_8reg): Delete.
18202         (corresponding unnamed define_insn): Delete.
18203         (movmemsi_6reg): Delete.
18204         (corresponding unnamed define_insn): Delete.
18205         (movmemsi_4reg): Delete.
18206         (corresponding unnamed define_insn): Delete.
18207         (movmemsi_2reg): Delete.
18208         (corresponding unnamed define_insn): Delete.
18209         (movmemsi_1reg): Delete.
18210         (corresponding unnamed define_insn): Delete.
18211         * config/rs6000/rs6000.opt (mno-string): New.
18212         (mstring): Replace by deprecation warning stub.
18213         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18215 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18217         * regrename.c (regrename_do_replace): If replacing the same
18218         reg multiple times, try to reuse last created gen_raw_REG.
18220         PR debug/81155
18221         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18222         main to workaround a bug in GDB.
18224 2018-01-12  Tom de Vries  <tom@codesourcery.com>
18226         PR target/83737
18227         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18229 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
18231         PR rtl-optimization/80481
18232         * ira-color.c (get_cap_member): New function.
18233         (allocnos_conflict_by_live_ranges_p): Use it.
18234         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18235         (setup_slot_coalesced_allocno_live_ranges): Ditto.
18237 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
18239         PR target/83628
18240         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18241         (*saddl_se_1): Ditto.
18242         (*ssubsi_1): Ditto.
18243         (*ssubl_se_1): Ditto.
18245 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18247         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18248         rather than wi::to_widest for DR_INITs.
18249         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18250         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18251         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18252         INTEGER_CSTs.
18253         (vect_analyze_group_access_1): Note that here.
18255 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18257         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18258         polynomial type sizes.
18260 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18262         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18263         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18264         (gimple_add_tmp_var): Likewise.
18266 2018-01-12  Martin Liska  <mliska@suse.cz>
18268         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18269         (gimple_alloc_sizes): Likewise.
18270         (dump_gimple_statistics): Use PRIu64 in printf format.
18271         * gimple.h: Change uint64_t to int.
18273 2018-01-12  Martin Liska  <mliska@suse.cz>
18275         * tree-core.h: Use uint64_t instead of int.
18276         * tree.c (tree_node_counts): Likewise.
18277         (tree_node_sizes): Likewise.
18278         (dump_tree_statistics): Use PRIu64 in printf format.
18280 2018-01-12  Martin Liska  <mliska@suse.cz>
18282         * Makefile.in: As qsort_chk is implemented in vec.c, add
18283         vec.o to linkage of gencfn-macros.
18284         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18285         passing the info to record_node_allocation_statistics.
18286         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18287         and pass the info.
18288         * ggc-common.c (struct ggc_usage): Add operator== and use
18289         it in operator< and compare function.
18290         * mem-stats.h (struct mem_usage): Likewise.
18291         * vec.c (struct vec_usage): Remove operator< and compare
18292         function. Can be simply inherited.
18294 2018-01-12  Martin Jambor  <mjambor@suse.cz>
18296         PR target/81616
18297         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18298         * tree-ssa-math-opts.c: Include domwalk.h.
18299         (convert_mult_to_fma_1): New function.
18300         (fma_transformation_info): New type.
18301         (fma_deferring_state): Likewise.
18302         (cancel_fma_deferring): New function.
18303         (result_of_phi): Likewise.
18304         (last_fma_candidate_feeds_initial_phi): Likewise.
18305         (convert_mult_to_fma): Added deferring logic, split actual
18306         transformation to convert_mult_to_fma_1.
18307         (math_opts_dom_walker): New type.
18308         (math_opts_dom_walker::after_dom_children): New method, body moved
18309         here from pass_optimize_widening_mul::execute, added deferring logic
18310         bits.
18311         (pass_optimize_widening_mul::execute): Moved most of code to
18312         math_opts_dom_walker::after_dom_children.
18313         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18314         * config/i386/i386.c (ix86_option_override_internal): Added
18315         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18317 2018-01-12  Richard Biener  <rguenther@suse.de>
18319         PR debug/83157
18320         * dwarf2out.c (gen_variable_die): Do not reset old_die for
18321         inline instance vars.
18323 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
18325         PR target/81819
18326         * config/rx/rx.c (rx_is_restricted_memory_address):
18327         Handle SUBREG case.
18329 2018-01-12  Richard Biener  <rguenther@suse.de>
18331         PR tree-optimization/80846
18332         * target.def (split_reduction): New target hook.
18333         * targhooks.c (default_split_reduction): New function.
18334         * targhooks.h (default_split_reduction): Declare.
18335         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18336         target requests first reduce vectors by combining low and high
18337         parts.
18338         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18339         (get_vectype_for_scalar_type_and_size): Export.
18340         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18341         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18342         * doc/tm.texi: Regenerate.
18343         * config/i386/i386.c (ix86_split_reduction): Implement
18344         TARGET_VECTORIZE_SPLIT_REDUCTION.
18346 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18348         PR target/83368
18349         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18350         in PIC mode except for TARGET_VXWORKS_RTP.
18351         * config/sparc/sparc.c: Include cfgrtl.h.
18352         (TARGET_INIT_PIC_REG): Define.
18353         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18354         (sparc_pic_register_p): New predicate.
18355         (sparc_legitimate_address_p): Use it.
18356         (sparc_legitimize_pic_address): Likewise.
18357         (sparc_delegitimize_address): Likewise.
18358         (sparc_mode_dependent_address_p): Likewise.
18359         (gen_load_pcrel_sym): Remove 4th parameter.
18360         (load_got_register): Adjust call to above.  Remove obsolete stuff.
18361         (sparc_expand_prologue): Do not call load_got_register here.
18362         (sparc_flat_expand_prologue): Likewise.
18363         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18364         (sparc_use_pseudo_pic_reg): New function.
18365         (sparc_init_pic_reg): Likewise.
18366         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18367         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18369 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
18371         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18372         Add item for branch_cost.
18374 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18376         PR rtl-optimization/83565
18377         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18378         not extend the result to a larger mode for rotate operations.
18379         (num_sign_bit_copies1): Likewise.
18381 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18383         PR target/40411
18384         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18385         -symbolic.
18386         Use values-Xc.o for -pedantic.
18387         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18389 2018-01-12  Martin Liska  <mliska@suse.cz>
18391         PR ipa/83054
18392         * ipa-devirt.c (final_warning_record::grow_type_warnings):
18393         New function.
18394         (possible_polymorphic_call_targets): Use it.
18395         (ipa_devirt): Likewise.
18397 2018-01-12  Martin Liska  <mliska@suse.cz>
18399         * profile-count.h (enum profile_quality): Use 0 as invalid
18400         enum value of profile_quality.
18402 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18404         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18405         -mext-string options.
18407 2018-01-12  Richard Biener  <rguenther@suse.de>
18409         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18410         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18411         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18412         Likewise.
18413         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18415 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18417         * configure.ac (--with-long-double-format): Add support for the
18418         configuration option to change the default long double format on
18419         PowerPC systems.
18420         * config.gcc (powerpc*-linux*-*): Likewise.
18421         * configure: Regenerate.
18422         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18423         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18424         used without modification.
18426 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18428         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18429         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18430         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18431         MISC_BUILTIN_SPEC_BARRIER.
18432         (rs6000_init_builtins): Likewise.
18433         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18434         enum value.
18435         (speculation_barrier): New define_insn.
18436         * doc/extend.texi: Document __builtin_speculation_barrier.
18438 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18440         PR target/83203
18441         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18442         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18443         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18444         iterators.
18445         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
18446         integral modes instead of "ss" and "sd".
18447         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18448         vectors with 32-bit and 64-bit elements.
18449         (vecdupssescalarmodesuffix): New mode attribute.
18450         (vec_dup<mode>): Use it.
18452 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
18454         PR target/83330
18455         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18456         frame if argument is passed on stack.
18458 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18460         PR target/82682
18461         * ree.c (combine_reaching_defs): Optimize also
18462         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18463         reg2=any_extend(exp); reg1=reg2;, formatting fix.
18465 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18467         PR middle-end/83189
18468         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18470 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18472         PR middle-end/83718
18473         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18474         after they are computed.
18476 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
18478         PR tree-optimization/83695
18479         * gimple-loop-linterchange.cc
18480         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18481         reset cached scev information after interchange.
18482         (pass_linterchange::execute): Remove call to scev_reset_htab.
18484 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18486         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18487         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18488         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18489         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18490         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18491         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18492         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18493         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18494         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18495         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18496         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18497         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18498         (V_lane_reg): Likewise.
18499         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18500         New define_expand.
18501         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18502         (vfmal_lane_low<mode>_intrinsic,
18503         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18504         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18505         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18506         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18507         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18508         vfmsl_lane_high<mode>_intrinsic): New define_insns.
18510 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18512         * config/arm/arm-cpus.in (fp16fml): New feature.
18513         (ALL_SIMD): Add fp16fml.
18514         (armv8.2-a): Add fp16fml as an option.
18515         (armv8.3-a): Likewise.
18516         (armv8.4-a): Add fp16fml as part of fp16.
18517         * config/arm/arm.h (TARGET_FP16FML): Define.
18518         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18519         when appropriate.
18520         * config/arm/arm-modes.def (V2HF): Define.
18521         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18522         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18523         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18524         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18525         vfmsl_low, vfmsl_high): New set of builtins.
18526         * config/arm/iterators.md (PLUSMINUS): New code iterator.
18527         (vfml_op): New code attribute.
18528         (VFMLHALVES): New int iterator.
18529         (VFML, VFMLSEL): New mode attributes.
18530         (V_reg): Define mapping for V2HF.
18531         (V_hi, V_lo): New mode attributes.
18532         (VF_constraint): Likewise.
18533         (vfml_half, vfml_half_selector): New int attributes.
18534         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18535         define_expand.
18536         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18537         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18538         New define_insn.
18539         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18540         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18541         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18542         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
18543         documentation.
18544         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18545         Document new effective target and option set.
18547 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18549         * config/arm/arm-cpus.in (armv8_4): New feature.
18550         (ARMv8_4a): New fgroup.
18551         (armv8.4-a): New arch.
18552         * config/arm/arm-tables.opt: Regenerate.
18553         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18554         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18555         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18556         Add matching rules for -march=armv8.4-a and extensions.
18557         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18559 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
18561         PR target/81821
18562         * config/rx/rx.md (BW): New mode attribute.
18563         (sync_lock_test_and_setsi): Add mode suffix to insn output.
18565 2018-01-11  Richard Biener  <rguenther@suse.de>
18567         PR tree-optimization/83435
18568         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18569         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18570         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18572 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18573             Alan Hayward  <alan.hayward@arm.com>
18574             David Sherwood  <david.sherwood@arm.com>
18576         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18577         field.
18578         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
18579         (aarch64_print_address_internal): Use it to check for a zero offset.
18581 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18582             Alan Hayward  <alan.hayward@arm.com>
18583             David Sherwood  <david.sherwood@arm.com>
18585         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18586         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18587         Return a poly_int64 rather than a HOST_WIDE_INT.
18588         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18589         rather than a HOST_WIDE_INT.
18590         * config/aarch64/aarch64.h (aarch64_frame): Protect with
18591         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
18592         hard_fp_offset, frame_size, initial_adjust, callee_offset and
18593         final_offset from HOST_WIDE_INT to poly_int64.
18594         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18595         to_constant when getting the number of units in an Advanced SIMD
18596         mode.
18597         (aarch64_builtin_vectorized_function): Check for a constant number
18598         of units.
18599         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18600         GET_MODE_SIZE.
18601         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18602         attribute instead of GET_MODE_NUNITS.
18603         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18604         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18605         GET_MODE_SIZE for fixed-size registers.
18606         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18607         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18608         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18609         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18610         (aarch64_print_operand, aarch64_print_address_internal)
18611         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18612         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18613         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18614         Handle polynomial GET_MODE_SIZE.
18615         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
18616         wider than SImode without modification.
18617         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18618         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18619         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18620         passing and returning SVE modes.
18621         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18622         rather than GEN_INT.
18623         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18624         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18625         (aarch64_allocate_and_probe_stack_space): Likewise.
18626         (aarch64_layout_frame): Cope with polynomial offsets.
18627         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18628         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
18629         polynomial offsets.
18630         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18631         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18632         poly_int64 rather than a HOST_WIDE_INT.
18633         (aarch64_get_separate_components, aarch64_process_components)
18634         (aarch64_expand_prologue, aarch64_expand_epilogue)
18635         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18636         (aarch64_anchor_offset): New function, split out from...
18637         (aarch64_legitimize_address): ...here.
18638         (aarch64_builtin_vectorization_cost): Handle polynomial
18639         TYPE_VECTOR_SUBPARTS.
18640         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18641         GET_MODE_NUNITS.
18642         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18643         number of elements from the PARALLEL rather than the mode.
18644         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18645         rather than GET_MODE_BITSIZE.
18646         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18647         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18648         (aarch64_expand_vec_perm_const_1): Handle polynomial
18649         d->perm.length () and d->perm elements.
18650         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
18651         Apply to_constant to d->perm elements.
18652         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18653         polynomial CONST_VECTOR_NUNITS.
18654         (aarch64_move_pointer): Take amount as a poly_int64 rather
18655         than an int.
18656         (aarch64_progress_pointer): Avoid temporary variable.
18657         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18658         the mode attribute instead of GET_MODE.
18660 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18661             Alan Hayward  <alan.hayward@arm.com>
18662             David Sherwood  <david.sherwood@arm.com>
18664         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18665         x exists before using it.
18666         (aarch64_add_constant_internal): Rename to...
18667         (aarch64_add_offset_1): ...this.  Replace regnum with separate
18668         src and dest rtxes.  Handle the case in which they're different,
18669         including when the offset is zero.  Replace scratchreg with an rtx.
18670         Use 2 additions if there is no spare register into which we can
18671         move a 16-bit constant.
18672         (aarch64_add_constant): Delete.
18673         (aarch64_add_offset): Replace reg with separate src and dest
18674         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
18675         Use aarch64_add_offset_1.
18676         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18677         an rtx rather than an int.  Take the delta as a poly_int64
18678         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
18679         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18680         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18681         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18682         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18683         and aarch64_add_sp.
18684         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18685         aarch64_add_constant.
18687 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18689         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18690         Use scalar_float_mode.
18692 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18694         * config/aarch64/aarch64-simd.md
18695         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18696         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18697         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18698         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18699         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18700         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18701         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18702         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18703         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18704         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18706 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18708         PR target/83514
18709         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18710         targ_options->x_arm_arch_string is non NULL.
18712 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18714         * config/aarch64/aarch64.h
18715         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18717 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18719         PR target/82096
18720         * expmed.c (emit_store_flag_force): Swap if const op0
18721         and change VOIDmode to mode of op0.
18723 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18725         PR rtl-optimization/83761
18726         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18727         than bytes to mode_for_size.
18729 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18731         PR middle-end/83189
18732         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18733         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18734         profile.
18736 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18738         PR middle-end/83575
18739         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18740         when in layout mode.
18741         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18742         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18743         partition fixup.
18745 2018-01-10  Michael Collison  <michael.collison@arm.com>
18747         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18748         * config/aarch64/aarch64-option-extension.def: Add
18749         AARCH64_OPT_EXTENSION of 'fp16fml'.
18750         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18751         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18752         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18753         * config/aarch64/constraints.md (Ui7): New constraint.
18754         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18755         (VFMLA_SEL_W): Ditto.
18756         (f16quad): Ditto.
18757         (f16mac1): Ditto.
18758         (VFMLA16_LOW): New int iterator.
18759         (VFMLA16_HIGH): Ditto.
18760         (UNSPEC_FMLAL): New unspec.
18761         (UNSPEC_FMLSL): Ditto.
18762         (UNSPEC_FMLAL2): Ditto.
18763         (UNSPEC_FMLSL2): Ditto.
18764         (f16mac): New code attribute.
18765         * config/aarch64/aarch64-simd-builtins.def
18766         (aarch64_fmlal_lowv2sf): Ditto.
18767         (aarch64_fmlsl_lowv2sf): Ditto.
18768         (aarch64_fmlalq_lowv4sf): Ditto.
18769         (aarch64_fmlslq_lowv4sf): Ditto.
18770         (aarch64_fmlal_highv2sf): Ditto.
18771         (aarch64_fmlsl_highv2sf): Ditto.
18772         (aarch64_fmlalq_highv4sf): Ditto.
18773         (aarch64_fmlslq_highv4sf): Ditto.
18774         (aarch64_fmlal_lane_lowv2sf): Ditto.
18775         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18776         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18777         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18778         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18779         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18780         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18781         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18782         (aarch64_fmlal_lane_highv2sf): Ditto.
18783         (aarch64_fmlsl_lane_highv2sf): Ditto.
18784         (aarch64_fmlal_laneq_highv2sf): Ditto.
18785         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18786         (aarch64_fmlalq_lane_highv4sf): Ditto.
18787         (aarch64_fmlsl_lane_highv4sf): Ditto.
18788         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18789         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18790         * config/aarch64/aarch64-simd.md:
18791         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18792         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18793         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18794         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18795         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18796         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18797         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18798         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18799         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18800         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18801         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18802         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18803         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18804         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18805         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18806         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18807         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18808         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18809         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18810         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18811         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18812         (vfmlsl_low_u32): Ditto.
18813         (vfmlalq_low_u32): Ditto.
18814         (vfmlslq_low_u32): Ditto.
18815         (vfmlal_high_u32): Ditto.
18816         (vfmlsl_high_u32): Ditto.
18817         (vfmlalq_high_u32): Ditto.
18818         (vfmlslq_high_u32): Ditto.
18819         (vfmlal_lane_low_u32): Ditto.
18820         (vfmlsl_lane_low_u32): Ditto.
18821         (vfmlal_laneq_low_u32): Ditto.
18822         (vfmlsl_laneq_low_u32): Ditto.
18823         (vfmlalq_lane_low_u32): Ditto.
18824         (vfmlslq_lane_low_u32): Ditto.
18825         (vfmlalq_laneq_low_u32): Ditto.
18826         (vfmlslq_laneq_low_u32): Ditto.
18827         (vfmlal_lane_high_u32): Ditto.
18828         (vfmlsl_lane_high_u32): Ditto.
18829         (vfmlal_laneq_high_u32): Ditto.
18830         (vfmlsl_laneq_high_u32): Ditto.
18831         (vfmlalq_lane_high_u32): Ditto.
18832         (vfmlslq_lane_high_u32): Ditto.
18833         (vfmlalq_laneq_high_u32): Ditto.
18834         (vfmlslq_laneq_high_u32): Ditto.
18835         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18836         (AARCH64_FL_FOR_ARCH8_4): New.
18837         (AARCH64_ISA_F16FML): New ISA flag.
18838         (TARGET_F16FML): New feature flag for fp16fml.
18839         (doc/invoke.texi): Document new fp16fml option.
18841 2018-01-10  Michael Collison  <michael.collison@arm.com>
18843         * config/aarch64/aarch64-builtins.c:
18844         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18845         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18846         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18847         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18848         (AARCH64_ISA_SHA3): New ISA flag.
18849         (TARGET_SHA3): New feature flag for sha3.
18850         * config/aarch64/iterators.md (sha512_op): New int attribute.
18851         (CRYPTO_SHA512): New int iterator.
18852         (UNSPEC_SHA512H): New unspec.
18853         (UNSPEC_SHA512H2): Ditto.
18854         (UNSPEC_SHA512SU0): Ditto.
18855         (UNSPEC_SHA512SU1): Ditto.
18856         * config/aarch64/aarch64-simd-builtins.def
18857         (aarch64_crypto_sha512hqv2di): New builtin.
18858         (aarch64_crypto_sha512h2qv2di): Ditto.
18859         (aarch64_crypto_sha512su0qv2di): Ditto.
18860         (aarch64_crypto_sha512su1qv2di): Ditto.
18861         (aarch64_eor3qv8hi): Ditto.
18862         (aarch64_rax1qv2di): Ditto.
18863         (aarch64_xarqv2di): Ditto.
18864         (aarch64_bcaxqv8hi): Ditto.
18865         * config/aarch64/aarch64-simd.md:
18866         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18867         (aarch64_crypto_sha512su0qv2di): Ditto.
18868         (aarch64_crypto_sha512su1qv2di): Ditto.
18869         (aarch64_eor3qv8hi): Ditto.
18870         (aarch64_rax1qv2di): Ditto.
18871         (aarch64_xarqv2di): Ditto.
18872         (aarch64_bcaxqv8hi): Ditto.
18873         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18874         (vsha512h2q_u64): Ditto.
18875         (vsha512su0q_u64): Ditto.
18876         (vsha512su1q_u64): Ditto.
18877         (veor3q_u16): Ditto.
18878         (vrax1q_u64): Ditto.
18879         (vxarq_u64): Ditto.
18880         (vbcaxq_u16): Ditto.
18881         * config/arm/types.md (crypto_sha512): New type attribute.
18882         (crypto_sha3): Ditto.
18883         (doc/invoke.texi): Document new sha3 option.
18885 2018-01-10  Michael Collison  <michael.collison@arm.com>
18887         * config/aarch64/aarch64-builtins.c:
18888         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18889         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18890         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18891         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18892         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18893         (AARCH64_ISA_SM4): New ISA flag.
18894         (TARGET_SM4): New feature flag for sm4.
18895         * config/aarch64/aarch64-simd-builtins.def
18896         (aarch64_sm3ss1qv4si): Ditto.
18897         (aarch64_sm3tt1aq4si): Ditto.
18898         (aarch64_sm3tt1bq4si): Ditto.
18899         (aarch64_sm3tt2aq4si): Ditto.
18900         (aarch64_sm3tt2bq4si): Ditto.
18901         (aarch64_sm3partw1qv4si): Ditto.
18902         (aarch64_sm3partw2qv4si): Ditto.
18903         (aarch64_sm4eqv4si): Ditto.
18904         (aarch64_sm4ekeyqv4si): Ditto.
18905         * config/aarch64/aarch64-simd.md:
18906         (aarch64_sm3ss1qv4si): Ditto.
18907         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18908         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18909         (aarch64_sm4eqv4si): Ditto.
18910         (aarch64_sm4ekeyqv4si): Ditto.
18911         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18912         (sm3part_op): Ditto.
18913         (CRYPTO_SM3TT): Ditto.
18914         (CRYPTO_SM3PART): Ditto.
18915         (UNSPEC_SM3SS1): New unspec.
18916         (UNSPEC_SM3TT1A): Ditto.
18917         (UNSPEC_SM3TT1B): Ditto.
18918         (UNSPEC_SM3TT2A): Ditto.
18919         (UNSPEC_SM3TT2B): Ditto.
18920         (UNSPEC_SM3PARTW1): Ditto.
18921         (UNSPEC_SM3PARTW2): Ditto.
18922         (UNSPEC_SM4E): Ditto.
18923         (UNSPEC_SM4EKEY): Ditto.
18924         * config/aarch64/constraints.md (Ui2): New constraint.
18925         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18926         * config/arm/types.md (crypto_sm3): New type attribute.
18927         (crypto_sm4): Ditto.
18928         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18929         (vsm3tt1aq_u32): Ditto.
18930         (vsm3tt1bq_u32): Ditto.
18931         (vsm3tt2aq_u32): Ditto.
18932         (vsm3tt2bq_u32): Ditto.
18933         (vsm3partw1q_u32): Ditto.
18934         (vsm3partw2q_u32): Ditto.
18935         (vsm4eq_u32): Ditto.
18936         (vsm4ekeyq_u32): Ditto.
18937         (doc/invoke.texi): Document new sm4 option.
18939 2018-01-10  Michael Collison  <michael.collison@arm.com>
18941         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18942         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18943         (AARCH64_FL_FOR_ARCH8_4): New.
18944         (AARCH64_FL_V8_4): New flag.
18945         (doc/invoke.texi): Document new armv8.4-a option.
18947 2018-01-10  Michael Collison  <michael.collison@arm.com>
18949         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18950         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18951         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18952         * config/aarch64/aarch64-option-extension.def: Add
18953         AARCH64_OPT_EXTENSION of 'sha2'.
18954         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18955         (crypto): Disable sha2 and aes if crypto disabled.
18956         (crypto): Enable aes and sha2 if enabled.
18957         (simd): Disable sha2 and aes if simd disabled.
18958         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18959         New flags.
18960         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18961         (TARGET_SHA2): New feature flag for sha2.
18962         (TARGET_AES): New feature flag for aes.
18963         * config/aarch64/aarch64-simd.md:
18964         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18965         conditional on TARGET_AES.
18966         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18967         (aarch64_crypto_sha1hsi): Make pattern conditional
18968         on TARGET_SHA2.
18969         (aarch64_crypto_sha1hv4si): Ditto.
18970         (aarch64_be_crypto_sha1hv4si): Ditto.
18971         (aarch64_crypto_sha1su1v4si): Ditto.
18972         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18973         (aarch64_crypto_sha1su0v4si): Ditto.
18974         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18975         (aarch64_crypto_sha256su0v4si): Ditto.
18976         (aarch64_crypto_sha256su1v4si): Ditto.
18977         (doc/invoke.texi): Document new aes and sha2 options.
18979 2018-01-10  Martin Sebor  <msebor@redhat.com>
18981         PR tree-optimization/83781
18982         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18983         as string arrays.
18985 2018-01-11  Martin Sebor  <msebor@gmail.com>
18986             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18988         PR tree-optimization/83501
18989         PR tree-optimization/81703
18991         * tree-ssa-strlen.c (get_string_cst): Rename...
18992         (get_string_len): ...to this.  Handle global constants.
18993         (handle_char_store): Adjust.
18995 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
18996             Jim Wilson  <jimw@sifive.com>
18998         * config/riscv/riscv-protos.h (riscv_output_return): New.
18999         * config/riscv/riscv.c (struct machine_function): New naked_p field.
19000         (riscv_attribute_table, riscv_output_return),
19001         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19002         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19003         (riscv_compute_frame_info): Only compute frame->mask if not a naked
19004         function.
19005         (riscv_expand_prologue): Add early return for naked function.
19006         (riscv_expand_epilogue): Likewise.
19007         (riscv_function_ok_for_sibcall): Return false for naked function.
19008         (riscv_set_current_function): New.
19009         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19010         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19011         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19012         * doc/extend.texi (RISC-V Function Attributes): New.
19014 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19016         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19017         check for 128-bit long double before checking TCmode.
19018         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19019         128-bit long doubles before checking TFmode or TCmode.
19020         (FLOAT128_IBM_P): Likewise.
19022 2018-01-10  Martin Sebor  <msebor@redhat.com>
19024         PR tree-optimization/83671
19025         * builtins.c (c_strlen): Unconditionally return zero for the empty
19026         string.
19027         Use -Warray-bounds for warnings.
19028         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19029         for non-constant array indices with COMPONENT_REF, arrays of
19030         arrays, and pointers to arrays.
19031         (gimple_fold_builtin_strlen): Determine and set length range for
19032         non-constant character arrays.
19034 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
19036         PR middle-end/81897
19037         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19038         empty blocks.
19040 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
19042         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19044 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19046         PR target/83399
19047         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19048         VECTOR_MEM_ALTIVEC_OR_VSX_P.
19049         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19050         indexed_or_indirect_operand predicate.
19051         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19052         (*vsx_le_perm_load_v8hi): Likewise.
19053         (*vsx_le_perm_load_v16qi): Likewise.
19054         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19055         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19056         (*vsx_le_perm_store_v8hi): Likewise.
19057         (*vsx_le_perm_store_v16qi): Likewise.
19058         (eight unnamed splitters): Likewise.
19060 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19062         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19063         * config/rs6000/emmintrin.h: Likewise.
19064         * config/rs6000/mmintrin.h: Likewise.
19065         * config/rs6000/xmmintrin.h: Likewise.
19067 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
19069         PR c++/43486
19070         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19071         "public_flag".
19072         * tree.c (tree_nop_conversion): Return true for location wrapper
19073         nodes.
19074         (maybe_wrap_with_location): New function.
19075         (selftest::check_strip_nops): New function.
19076         (selftest::test_location_wrappers): New function.
19077         (selftest::tree_c_tests): Call it.
19078         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19079         (maybe_wrap_with_location): New decl.
19080         (EXPR_LOCATION_WRAPPER_P): New macro.
19081         (location_wrapper_p): New inline function.
19082         (tree_strip_any_location_wrapper): New inline function.
19084 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
19086         PR target/83735
19087         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19088         stack_realign_offset for the largest alignment of stack slot
19089         actually used.
19090         (ix86_find_max_used_stack_alignment): New function.
19091         (ix86_finalize_stack_frame_flags): Use it.  Set
19092         max_used_stack_alignment if we don't realign stack.
19093         * config/i386/i386.h (machine_function): Add
19094         max_used_stack_alignment.
19096 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
19098         * config/arm/arm.opt (-mbranch-cost): New option.
19099         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19100         account.
19102 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
19104         PR target/83629
19105         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19106         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19108 2018-01-10  Richard Biener  <rguenther@suse.de>
19110         PR debug/83765
19111         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19112         early out so it also covers the case where we have a non-NULL
19113         origin.
19115 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19117         PR tree-optimization/83753
19118         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19119         for non-strided grouped accesses if the number of elements is 1.
19121 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19123         PR target/81616
19124         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19125         * i386.h (TARGET_USE_GATHER): Define.
19126         * x86-tune.def (X86_TUNE_USE_GATHER): New.
19128 2018-01-10  Martin Liska  <mliska@suse.cz>
19130         PR bootstrap/82831
19131         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19132         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19133         partitioning.
19134         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19135         CLEANUP_NO_PARTITIONING is not set.
19137 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19139         * doc/rtl.texi: Remove documentation of (const ...) wrappers
19140         for vectors, as a partial revert of r254296.
19141         * rtl.h (const_vec_p): Delete.
19142         (const_vec_duplicate_p): Don't test for vector CONSTs.
19143         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19144         * expmed.c (make_tree): Likewise.
19146         Revert:
19147         * common.md (E, F): Use CONSTANT_P instead of checking for
19148         CONST_VECTOR.
19149         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19150         checking for CONST_VECTOR.
19152 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19154         PR middle-end/83575
19155         * predict.c (force_edge_cold): Handle in more sane way edges
19156         with no prediction.
19158 2018-01-09  Carl Love  <cel@us.ibm.com>
19160         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19161         V4SI, V4SF types.
19162         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19163         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19164         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19165         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
19166         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19167         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
19168         * config/rs6000/rs6000-protos.h: Add extern defition for
19169         rs6000_generate_float2_double_code.
19170         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19171         function.
19172         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19173         (float2_v2df): Add define_expand.
19175 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
19177         PR target/83628
19178         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19179         op_mode in the force_to_mode call.
19181 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19183         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19184         instead of checking each element individually.
19185         (aarch64_evpc_uzp): Likewise.
19186         (aarch64_evpc_zip): Likewise.
19187         (aarch64_evpc_ext): Likewise.
19188         (aarch64_evpc_rev): Likewise.
19189         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19190         instead of checking each element individually.  Return true without
19191         generating rtl if
19192         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19193         whether all selected elements come from the same input, instead of
19194         checking each element individually.  Remove calls to gen_rtx_REG,
19195         start_sequence and end_sequence and instead assert that no rtl is
19196         generated.
19198 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19200         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19201         order of HIGH and CONST checks.
19203 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19205         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19206         if the destination isn't an SSA_NAME.
19208 2018-01-09  Richard Biener  <rguenther@suse.de>
19210         PR tree-optimization/83668
19211         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19212         move prologue...
19213         (canonicalize_loop_form): ... here, renamed from ...
19214         (canonicalize_loop_closed_ssa_form): ... this and amended to
19215         swap successor edges for loop exit blocks to make us use
19216         the RPO order we need for initial schedule generation.
19218 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
19220         PR tree-optimization/64811
19221         * match.pd: When optimizing comparisons with Inf, avoid
19222         introducing or losing exceptions from comparisons with NaN.
19224 2018-01-09  Martin Liska  <mliska@suse.cz>
19226         PR sanitizer/82517
19227         * asan.c (shadow_mem_size): Add gcc_assert.
19229 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
19231         Don't save registers in main().
19233         PR target/83738
19234         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19235         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19236         * config/avr/avr.c (avr_set_current_function): Don't error if
19237         naked, OS_task or OS_main are specified at the same time.
19238         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19239         OS_main.
19240         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19241         attribute.
19242         * common/config/avr/avr-common.c (avr_option_optimization_table):
19243         Switch on -mmain-is-OS_task for optimizing compilations.
19245 2018-01-09  Richard Biener  <rguenther@suse.de>
19247         PR tree-optimization/83572
19248         * graphite.c: Include cfganal.h.
19249         (graphite_transform_loops): Connect infinite loops to exit
19250         and remove fake edges at the end.
19252 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19254         * ipa-inline.c (edge_badness): Revert accidental checkin.
19256 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19258         PR ipa/80763
19259         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19260         symbols; not inline clones.
19262 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
19264         PR target/83507
19265         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19266         hard registers.  Formatting fixes.
19268         PR preprocessor/83722
19269         * gcc.c (try_generate_repro): Pass
19270         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19271         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19272         do_report_bug.
19274 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
19275             Kito Cheng  <kito.cheng@gmail.com>
19277         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19278         (riscv_leaf_function_p): Delete.
19279         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19281 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19283         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19284         function.
19285         (do_ifelse): New function.
19286         (do_isel): New function.
19287         (do_sub3): New function.
19288         (do_add3): New function.
19289         (do_load_mask_compare): New function.
19290         (do_overlap_load_compare): New function.
19291         (expand_compare_loop): New function.
19292         (expand_block_compare): Call expand_compare_loop() when appropriate.
19293         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19294         option description.
19295         (-mblock-compare-inline-loop-limit): New option.
19297 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19299         PR target/83677
19300         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19301         Reverse order of second and third operands in first alternative.
19302         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19303         of first and second elements in UNSPEC_VPERMR vector.
19304         (altivec_expand_vec_perm_le): Likewise.
19306 2018-01-08  Jeff Law  <law@redhat.com>
19308         PR rtl-optimizatin/81308
19309         * tree-switch-conversion.c (cfg_altered): New file scoped static.
19310         (process_switch): If group_case_labels makes a change, then set
19311         cfg_altered.
19312         (pass_convert_switch::execute): If a switch is converted, then
19313         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
19315         PR rtl-optimization/81308
19316         * recog.c (split_all_insns): Conditionally cleanup the CFG after
19317         splitting insns.
19319 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
19321         PR target/83663 - Revert r255946
19322         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19323         generation for cases where splatting a value is not useful.
19324         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19325         across a vec_duplicate and a paradoxical subreg forming a vector
19326         mode to a vec_concat.
19328 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19330         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19331         -march=armv8.3-a variants.
19332         * config/arm/t-multilib: Likewise.
19333         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
19335 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19337         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19338         to generate rtl.
19339         (cceq_ior_compare_complement): Give it a name so I can use it, and
19340         change boolean_or_operator predicate to boolean_operator so it can
19341         be used to generate a crand.
19342         (eqne): New code iterator.
19343         (bd/bd_neg): New code_attrs.
19344         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19345         a single define_insn.
19346         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19347         decrement (bdnzt/bdnzf/bdzt/bdzf).
19348         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19349         with the new names of the branch decrement patterns, and added the
19350         names of the branch decrement conditional patterns.
19352 2018-01-08  Richard Biener  <rguenther@suse.de>
19354         PR tree-optimization/83563
19355         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19356         cache.
19358 2018-01-08  Richard Biener  <rguenther@suse.de>
19360         PR middle-end/83713
19361         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19363 2018-01-08  Richard Biener  <rguenther@suse.de>
19365         PR tree-optimization/83685
19366         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19367         references to abnormals.
19369 2018-01-08  Richard Biener  <rguenther@suse.de>
19371         PR lto/83719
19372         * dwarf2out.c (output_indirect_strings): Handle empty
19373         skeleton_debug_str_hash.
19374         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19376 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19378         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19379         (emit_store_direct): Likewise.
19380         (arc_trampoline_adjust_address): Likewise.
19381         (arc_asm_trampoline_template): New function.
19382         (arc_initialize_trampoline): Use asm_trampoline_template.
19383         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19384         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19385         * config/arc/arc.md (flush_icache): Delete pattern.
19387 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19389         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19390         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19391         munaligned-access.
19393 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19395         PR target/83681
19396         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19397         by not USED_FOR_TARGET.
19398         (make_pass_resolve_sw_modes): Likewise.
19400 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19402         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19403         USED_FOR_TARGET.
19405 2018-01-08  Richard Biener  <rguenther@suse.de>
19407         PR middle-end/83580
19408         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19410 2018-01-08  Richard Biener  <rguenther@suse.de>
19412         PR middle-end/83517
19413         * match.pd ((t * 2) / 2) -> t): Add missing :c.
19415 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
19417         PR middle-end/81897
19418         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19419         basic blocks with a small number of successors.
19420         (convert_control_dep_chain_into_preds): Improve handling of
19421         forwarder blocks.
19422         (dump_predicates): Split apart into...
19423         (dump_pred_chain): ...here...
19424         (dump_pred_info): ...and here.
19425         (can_one_predicate_be_invalidated_p): Add debugging printfs.
19426         (can_chain_union_be_invalidated_p): Improve check for invalidation
19427         of paths.
19428         (uninit_uses_cannot_happen): Avoid unnecessary if
19429         convert_control_dep_chain_into_preds yielded nothing.
19431 2018-01-06  Martin Sebor  <msebor@redhat.com>
19433         PR tree-optimization/83640
19434         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19435         subtracting negative offset from size.
19436         (builtin_access::overlap): Adjust offset bounds of the access to fall
19437         within the size of the object if possible.
19439 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
19441         PR rtl-optimization/83699
19442         * expmed.c (extract_bit_field_1): Restrict the vector usage of
19443         extract_bit_field_as_subreg to cases in which the extracted
19444         value is also a vector.
19446         * lra-constraints.c (process_alt_operands): Test for the equivalence
19447         substitutions when detecting a possible reload cycle.
19449 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
19451         PR debug/83480
19452         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19453         by default if flag_selective_schedling{,2}.  Formatting fixes.
19455         PR rtl-optimization/83682
19456         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19457         if it has non-VECTOR_MODE element mode.
19458         (vec_duplicate_p): Likewise.
19460         PR middle-end/83694
19461         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19462         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19464 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19466         PR target/83604
19467         * config/i386/i386-builtin.def
19468         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19469         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19470         Require also OPTION_MASK_ISA_AVX512F in addition to
19471         OPTION_MASK_ISA_GFNI.
19472         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19473         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19474         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19475         to OPTION_MASK_ISA_GFNI.
19476         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19477         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19478         OPTION_MASK_ISA_AVX512BW.
19479         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19480         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19481         addition to OPTION_MASK_ISA_GFNI.
19482         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19483         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19484         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19485         to OPTION_MASK_ISA_GFNI.
19486         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19487         a requirement for all ISAs rather than any of them with a few
19488         exceptions.
19489         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19490         processing.
19491         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19492         bitmasks to be enabled with 3 exceptions, instead of requiring any
19493         enabled ISA with lots of exceptions.
19494         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19495         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19496         Change avx512bw in isa attribute to avx512f.
19497         * config/i386/sgxintrin.h: Add license boilerplate.
19498         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
19499         to __AVX512F__ and __AVX512VL to __AVX512VL__.
19500         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19501         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19502         defined.
19503         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19504         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19505         temporarily sse2 rather than sse if not enabled already.
19507         PR target/83604
19508         * config/i386/sse.md (VI248_VLBW): Rename to ...
19509         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
19510         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19511         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19512         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19513         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19514         mode iterator instead of VI248_VLBW.
19516 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
19518         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19519         (record_modified): Skip clobbers; add debug output.
19520         (param_change_prob): Use sreal frequencies.
19522 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19524         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19525         punt for user-aligned variables.
19527 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19529         * tree-chrec.c (chrec_contains_symbols): Return true for
19530         POLY_INT_CST.
19532 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
19534         PR target/82439
19535         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19536         of (x|y) == x for BICS pattern.
19538 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19540         PR tree-optimization/83605
19541         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19542         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19543         can throw.
19545 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19547         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19548         * config/epiphany/rtems.h: New file.
19550 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19551             Uros Bizjak  <ubizjak@gmail.com>
19553         PR target/83554
19554         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19555         QIreg_operand instead of register_operand predicate.
19556         * config/i386/i386.c (ix86_rop_should_change_byte_p,
19557         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19558         comments instead of -fmitigate[-_]rop.
19560 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19562         PR bootstrap/81926
19563         * cgraphunit.c (symbol_table::compile): Switch to text_section
19564         before calling assembly_start debug hook.
19565         * run-rtl-passes.c (run_rtl_passes): Likewise.
19566         Include output.h.
19568 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19570         * tree-vrp.c (extract_range_from_binary_expr_1): Check
19571         range_int_cst_p rather than !symbolic_range_p before calling
19572         extract_range_from_multiplicative_op_1.
19574 2018-01-04  Jeff Law  <law@redhat.com>
19576         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19577         redundant test in assertion.
19579 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19581         * doc/rtl.texi: Document machine_mode wrapper classes.
19583 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19585         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19586         using tree_to_uhwi.
19588 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19590         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19591         the VEC_PERM_EXPR fold to fail.
19593 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19595         PR debug/83585
19596         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19597         to switched_sections.
19599 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19601         PR target/83680
19602         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19603         test for d.testing.
19605 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
19607         PR target/83387
19608         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19609         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19611 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19613         PR debug/83666
19614         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19615         is BLKmode and bitpos not zero or mode change is needed.
19617 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19619         PR target/83675
19620         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19621         TARGET_VIS2.
19623 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
19625         PR target/83628
19626         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19627         instead of MULT rtx.  Update all corresponding splitters.
19628         (*saddl_se): Ditto.
19629         (*ssub<modesuffix>): Ditto.
19630         (*ssubl_se): Ditto.
19631         (*cmp_sadd_di): Update split patterns.
19632         (*cmp_sadd_si): Ditto.
19633         (*cmp_sadd_sidi): Ditto.
19634         (*cmp_ssub_di): Ditto.
19635         (*cmp_ssub_si): Ditto.
19636         (*cmp_ssub_sidi): Ditto.
19637         * config/alpha/predicates.md (const23_operand): New predicate.
19638         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19639         Look for ASHIFT, not MULT inner operand.
19640         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19642 2018-01-04  Martin Liska  <mliska@suse.cz>
19644         PR gcov-profile/83669
19645         * gcov.c (output_intermediate_file): Add version to intermediate
19646         gcov file.
19647         * doc/gcov.texi: Document new field 'version' in intermediate
19648         file format. Fix location of '-k' option of gcov command.
19650 2018-01-04  Martin Liska  <mliska@suse.cz>
19652         PR ipa/82352
19653         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19655 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19657         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19659 2018-01-03  Martin Sebor  <msebor@redhat.com>
19661         PR tree-optimization/83655
19662         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19663         checking calls with invalid arguments.
19665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19667         * tree-vect-stmts.c (vect_get_store_rhs): New function.
19668         (vectorizable_mask_load_store): Delete.
19669         (vectorizable_call): Return false for masked loads and stores.
19670         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
19671         instead of gimple_assign_rhs1.
19672         (vectorizable_load): Handle IFN_MASK_LOAD.
19673         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19675 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19677         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19678         split out from..,
19679         (vectorizable_mask_load_store): ...here.
19680         (vectorizable_load): ...and here.
19682 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19684         * tree-vect-stmts.c (vect_build_all_ones_mask)
19685         (vect_build_zero_merge_argument): New functions, split out from...
19686         (vectorizable_load): ...here.
19688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19690         * tree-vect-stmts.c (vect_check_store_rhs): New function,
19691         split out from...
19692         (vectorizable_mask_load_store): ...here.
19693         (vectorizable_store): ...and here.
19695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19697         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19698         split out from...
19699         (vectorizable_mask_load_store): ...here.
19701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19703         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19704         (vect_model_store_cost): Take a vec_load_store_type instead of a
19705         vect_def_type.
19706         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19707         (vect_model_store_cost): Take a vec_load_store_type instead of a
19708         vect_def_type.
19709         (vectorizable_mask_load_store): Update accordingly.
19710         (vectorizable_store): Likewise.
19711         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19715         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19716         IFN_MASK_LOAD calls here rather than...
19717         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19720             Alan Hayward  <alan.hayward@arm.com>
19721             David Sherwood  <david.sherwood@arm.com>
19723         * expmed.c (extract_bit_field_1): For vector extracts,
19724         fall back to extract_bit_field_as_subreg if vec_extract
19725         isn't available.
19727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19728             Alan Hayward  <alan.hayward@arm.com>
19729             David Sherwood  <david.sherwood@arm.com>
19731         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19732         they are variable or constant sized.
19733         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19734         slots for constant-sized data.
19736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19737             Alan Hayward  <alan.hayward@arm.com>
19738             David Sherwood  <david.sherwood@arm.com>
19740         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19741         handling COND_EXPRs with boolean comparisons, try to find a better
19742         basis for the mask type than the boolean itself.
19744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19746         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19747         is calculated and how it can be overridden.
19748         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19749         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19750         if defined.
19751         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19752         if nonzero.
19754 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19755             Alan Hayward  <alan.hayward@arm.com>
19756             David Sherwood  <david.sherwood@arm.com>
19758         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19759         Remove the mode argument.
19760         (aarch64_simd_valid_immediate): Remove the mode and inverse
19761         arguments.
19762         * config/aarch64/iterators.md (bitsize): New iterator.
19763         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19764         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19765         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19766         aarch64_simd_valid_immediate.
19767         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19768         (aarch64_reg_or_bic_imm): Likewise.
19769         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19770         with an insn_type enum and msl with a modifier_type enum.
19771         Replace element_width with a scalar_mode.  Change the shift
19772         to unsigned int.  Add constructors for scalar_float_mode and
19773         scalar_int_mode elements.
19774         (aarch64_vect_float_const_representable_p): Delete.
19775         (aarch64_can_const_movi_rtx_p)
19776         (aarch64_simd_scalar_immediate_valid_for_move)
19777         (aarch64_simd_make_constant): Update call to
19778         aarch64_simd_valid_immediate.
19779         (aarch64_advsimd_valid_immediate_hs): New function.
19780         (aarch64_advsimd_valid_immediate): Likewise.
19781         (aarch64_simd_valid_immediate): Remove mode and inverse
19782         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19783         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19784         and aarch64_float_const_representable_p on the result.
19785         (aarch64_output_simd_mov_immediate): Remove mode argument.
19786         Update call to aarch64_simd_valid_immediate and use of
19787         simd_immediate_info.
19788         (aarch64_output_scalar_simd_mov_immediate): Update call
19789         accordingly.
19791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19792             Alan Hayward  <alan.hayward@arm.com>
19793             David Sherwood  <david.sherwood@arm.com>
19795         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19796         (mode_nunits): Likewise CONST_MODE_NUNITS.
19797         * machmode.def (ADJUST_NUNITS): Document.
19798         * genmodes.c (mode_data::need_nunits_adj): New field.
19799         (blank_mode): Update accordingly.
19800         (adj_nunits): New variable.
19801         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19802         parameter.
19803         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19804         listed in adj_nunits.
19805         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19806         listed in adj_nunits.  Don't emit case statements for such modes.
19807         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19808         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19809         nothing if adj_nunits is nonnull.
19810         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19811         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19812         (emit_mode_fbit): Update use of print_maybe_const_decl.
19813         (emit_move_size): Likewise.  Treat the array as non-const
19814         if adj_nunits.
19815         (emit_mode_adjustments): Handle adj_nunits.
19817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19819         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19820         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19821         (VECTOR_MODES): Use it.
19822         (make_vector_modes): Take the prefix as an argument.
19824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19825             Alan Hayward  <alan.hayward@arm.com>
19826             David Sherwood  <david.sherwood@arm.com>
19828         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19829         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19830         for MODE_VECTOR_BOOL.
19831         * machmode.def (VECTOR_BOOL_MODE): Document.
19832         * genmodes.c (VECTOR_BOOL_MODE): New macro.
19833         (make_vector_bool_mode): New function.
19834         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19835         MODE_VECTOR_BOOL.
19836         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19837         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19838         Likewise.
19839         * stor-layout.c (int_mode_for_mode): Likewise.
19840         * tree.c (build_vector_type_for_mode): Likewise.
19841         * varasm.c (output_constant_pool_2): Likewise.
19842         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19843         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
19844         for MODE_VECTOR_BOOL.
19845         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19846         of mode class checks.
19847         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19848         instead of a list of mode class checks.
19849         (expand_vector_scalar_condition): Likewise.
19850         (type_for_widest_vector_mode): Handle BImode as an inner mode.
19852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19853             Alan Hayward  <alan.hayward@arm.com>
19854             David Sherwood  <david.sherwood@arm.com>
19856         * machmode.h (mode_size): Change from unsigned short to
19857         poly_uint16_pod.
19858         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19859         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19860         or if measurement_type is not polynomial.
19861         (fixed_size_mode::includes_p): Check for constant-sized modes.
19862         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19863         return a poly_uint16 rather than an unsigned short.
19864         (emit_mode_size): Change the type of mode_size from unsigned short
19865         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
19866         (emit_mode_adjustments): Cope with polynomial vector sizes.
19867         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19868         for GET_MODE_SIZE.
19869         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19870         for GET_MODE_SIZE.
19871         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19872         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19873         * caller-save.c (setup_save_areas): Likewise.
19874         (replace_reg_with_saved_mem): Likewise.
19875         * calls.c (emit_library_call_value_1): Likewise.
19876         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19877         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19878         (gen_lowpart_for_combine): Likewise.
19879         * convert.c (convert_to_integer_1): Likewise.
19880         * cse.c (equiv_constant, cse_insn): Likewise.
19881         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19882         (cselib_subst_to_values): Likewise.
19883         * dce.c (word_dce_process_block): Likewise.
19884         * df-problems.c (df_word_lr_mark_ref): Likewise.
19885         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19886         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19887         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19888         (rtl_for_decl_location): Likewise.
19889         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19890         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19891         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19892         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19893         (expand_expr_real_1): Likewise.
19894         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19895         (pad_below): Likewise.
19896         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19897         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19898         * ira.c (get_subreg_tracking_sizes): Likewise.
19899         * ira-build.c (ira_create_allocno_objects): Likewise.
19900         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19901         (ira_sort_regnos_for_alter_reg): Likewise.
19902         * ira-costs.c (record_operand_costs): Likewise.
19903         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19904         (resolve_simple_move): Likewise.
19905         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19906         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19907         (lra_constraints): Likewise.
19908         (CONST_POOL_OK_P): Reject variable-sized modes.
19909         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19910         (add_pseudo_to_slot, lra_spill): Likewise.
19911         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19912         * optabs-query.c (get_best_extraction_insn): Likewise.
19913         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19914         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19915         (expand_mult_highpart, valid_multiword_target_p): Likewise.
19916         * recog.c (offsettable_address_addr_space_p): Likewise.
19917         * regcprop.c (maybe_mode_change): Likewise.
19918         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19919         * regrename.c (build_def_use): Likewise.
19920         * regstat.c (dump_reg_info): Likewise.
19921         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19922         (find_reloads, find_reloads_subreg_address): Likewise.
19923         * reload1.c (eliminate_regs_1): Likewise.
19924         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19925         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19926         (simplify_binary_operation_1, simplify_subreg): Likewise.
19927         * targhooks.c (default_function_arg_padding): Likewise.
19928         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19929         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19930         (verify_gimple_assign_ternary): Likewise.
19931         * tree-inline.c (estimate_move_cost): Likewise.
19932         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19933         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19934         (get_address_cost_ainc): Likewise.
19935         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19936         (vect_supportable_dr_alignment): Likewise.
19937         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19938         (vectorizable_reduction): Likewise.
19939         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19940         (vectorizable_operation, vectorizable_load): Likewise.
19941         * tree.c (build_same_sized_truth_vector_type): Likewise.
19942         * valtrack.c (cleanup_auto_inc_dec): Likewise.
19943         * var-tracking.c (emit_note_insn_var_location): Likewise.
19944         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19945         (ADDR_VEC_ALIGN): Likewise.
19947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19948             Alan Hayward  <alan.hayward@arm.com>
19949             David Sherwood  <david.sherwood@arm.com>
19951         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19952         unsigned short.
19953         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19954         or if measurement_type is polynomial.
19955         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19956         * combine.c (make_extraction): Likewise.
19957         * dse.c (find_shift_sequence): Likewise.
19958         * dwarf2out.c (mem_loc_descriptor): Likewise.
19959         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19960         (extract_bit_field, extract_low_bits): Likewise.
19961         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19962         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19963         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19964         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19965         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19966         * reload.c (find_reloads): Likewise.
19967         * reload1.c (alter_reg): Likewise.
19968         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19969         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19970         * tree-if-conv.c (predicate_mem_writes): Likewise.
19971         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19972         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19973         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19974         * valtrack.c (dead_debug_insert_temp): Likewise.
19975         * varasm.c (mergeable_constant_section): Likewise.
19976         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19979             Alan Hayward  <alan.hayward@arm.com>
19980             David Sherwood  <david.sherwood@arm.com>
19982         * expr.c (expand_assignment): Cope with polynomial mode sizes
19983         when assigning to a CONCAT.
19985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19986             Alan Hayward  <alan.hayward@arm.com>
19987             David Sherwood  <david.sherwood@arm.com>
19989         * machmode.h (mode_precision): Change from unsigned short to
19990         poly_uint16_pod.
19991         (mode_to_precision): Return a poly_uint16 rather than an unsigned
19992         short.
19993         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
19994         or if measurement_type is not polynomial.
19995         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
19996         in which the mode is already known to be a scalar_int_mode.
19997         * genmodes.c (emit_mode_precision): Change the type of mode_precision
19998         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
19999         initializer.
20000         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20001         for GET_MODE_PRECISION.
20002         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20003         for GET_MODE_PRECISION.
20004         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20005         as polynomial.
20006         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20007         (expand_field_assignment, make_extraction): Likewise.
20008         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20009         (get_last_value): Likewise.
20010         * convert.c (convert_to_integer_1): Likewise.
20011         * cse.c (cse_insn): Likewise.
20012         * expr.c (expand_expr_real_1): Likewise.
20013         * lra-constraints.c (simplify_operand_subreg): Likewise.
20014         * optabs-query.c (can_atomic_load_p): Likewise.
20015         * optabs.c (expand_atomic_load): Likewise.
20016         (expand_atomic_store): Likewise.
20017         * ree.c (combine_reaching_defs): Likewise.
20018         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20019         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20020         * tree.h (type_has_mode_precision_p): Likewise.
20021         * ubsan.c (instrument_si_overflow): Likewise.
20023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20024             Alan Hayward  <alan.hayward@arm.com>
20025             David Sherwood  <david.sherwood@arm.com>
20027         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20028         polynomial numbers of units.
20029         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20030         (valid_vector_subparts_p): New function.
20031         (build_vector_type): Remove temporary shim and take the number
20032         of units as a poly_uint64 rather than an int.
20033         (build_opaque_vector_type): Take the number of units as a
20034         poly_uint64 rather than an int.
20035         * tree.c (build_vector_from_ctor): Handle polynomial
20036         TYPE_VECTOR_SUBPARTS.
20037         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20038         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20039         (build_vector_from_val): If the number of units is variable,
20040         use build_vec_duplicate_cst for constant operands and
20041         VEC_DUPLICATE_EXPR otherwise.
20042         (make_vector_type): Remove temporary is_constant ().
20043         (build_vector_type, build_opaque_vector_type): Take the number of
20044         units as a poly_uint64 rather than an int.
20045         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20046         VECTOR_CST_NELTS.
20047         * cfgexpand.c (expand_debug_expr): Likewise.
20048         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20049         (store_constructor, expand_expr_real_1): Likewise.
20050         (const_scalar_mask_from_tree): Likewise.
20051         * fold-const-call.c (fold_const_reduction): Likewise.
20052         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20053         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20054         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20055         (fold_relational_const): Likewise.
20056         (native_interpret_vector): Likewise.  Change the size from an
20057         int to an unsigned int.
20058         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20059         TYPE_VECTOR_SUBPARTS.
20060         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20061         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20062         duplicating a non-constant operand into a variable-length vector.
20063         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20064         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20065         * ipa-icf.c (sem_variable::equals): Likewise.
20066         * match.pd: Likewise.
20067         * omp-simd-clone.c (simd_clone_subparts): Likewise.
20068         * print-tree.c (print_node): Likewise.
20069         * stor-layout.c (layout_type): Likewise.
20070         * targhooks.c (default_builtin_vectorization_cost): Likewise.
20071         * tree-cfg.c (verify_gimple_comparison): Likewise.
20072         (verify_gimple_assign_binary): Likewise.
20073         (verify_gimple_assign_ternary): Likewise.
20074         (verify_gimple_assign_single): Likewise.
20075         * tree-pretty-print.c (dump_generic_node): Likewise.
20076         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20077         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20078         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20079         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20080         (vect_shift_permute_load_chain): Likewise.
20081         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20082         (expand_vector_condition, optimize_vector_constructor): Likewise.
20083         (lower_vec_perm, get_compute_type): Likewise.
20084         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20085         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20086         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20087         (vect_recog_mask_conversion_pattern): Likewise.
20088         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20089         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20090         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20091         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20092         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20093         (vectorizable_shift, vectorizable_operation, vectorizable_store)
20094         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20095         (supportable_widening_operation): Likewise.
20096         (supportable_narrowing_operation): Likewise.
20097         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20098         Likewise.
20099         * varasm.c (output_constant): Likewise.
20101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20102             Alan Hayward  <alan.hayward@arm.com>
20103             David Sherwood  <david.sherwood@arm.com>
20105         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20106         so that both the length == 3 and length != 3 cases set up their
20107         own permute vectors.  Add comments explaining why we know the
20108         number of elements is constant.
20109         (vect_permute_load_chain): Likewise.
20111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20112             Alan Hayward  <alan.hayward@arm.com>
20113             David Sherwood  <david.sherwood@arm.com>
20115         * machmode.h (mode_nunits): Change from unsigned char to
20116         poly_uint16_pod.
20117         (ONLY_FIXED_SIZE_MODES): New macro.
20118         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20119         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20120         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20121         New typedefs.
20122         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20123         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20124         or if measurement_type is not polynomial.
20125         * genmodes.c (ZERO_COEFFS): New macro.
20126         (emit_mode_nunits_inline): Make mode_nunits_inline return a
20127         poly_uint16.
20128         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20129         Use ZERO_COEFFS when emitting initializers.
20130         * data-streamer.h (bp_pack_poly_value): New function.
20131         (bp_unpack_poly_value): Likewise.
20132         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20133         for GET_MODE_NUNITS.
20134         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20135         for GET_MODE_NUNITS.
20136         * tree.c (make_vector_type): Remove temporary shim and make
20137         the real function take the number of units as a poly_uint64
20138         rather than an int.
20139         (build_vector_type_for_mode): Handle polynomial nunits.
20140         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20141         * emit-rtl.c (const_vec_series_p_1): Likewise.
20142         (gen_rtx_CONST_VECTOR): Likewise.
20143         * fold-const.c (test_vec_duplicate_folding): Likewise.
20144         * genrecog.c (validate_pattern): Likewise.
20145         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20146         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20147         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20148         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20149         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20150         * rtlanal.c (subreg_get_info): Likewise.
20151         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20152         (vect_grouped_load_supported): Likewise.
20153         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20154         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20155         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20156         (simplify_const_unary_operation, simplify_binary_operation_1)
20157         (simplify_const_binary_operation, simplify_ternary_operation)
20158         (test_vector_ops_duplicate, test_vector_ops): Likewise.
20159         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20160         instead of CONST_VECTOR_NUNITS.
20161         * varasm.c (output_constant_pool_2): Likewise.
20162         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20163         explicit-encoded elements in the XVEC for variable-length vectors.
20165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20167         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20170             Alan Hayward  <alan.hayward@arm.com>
20171             David Sherwood  <david.sherwood@arm.com>
20173         * coretypes.h (fixed_size_mode): Declare.
20174         (fixed_size_mode_pod): New typedef.
20175         * builtins.h (target_builtins::x_apply_args_mode)
20176         (target_builtins::x_apply_result_mode): Change type to
20177         fixed_size_mode_pod.
20178         * builtins.c (apply_args_size, apply_result_size, result_vector)
20179         (expand_builtin_apply_args_1, expand_builtin_apply)
20180         (expand_builtin_return): Update accordingly.
20182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20184         * cse.c (hash_rtx_cb): Hash only the encoded elements.
20185         * cselib.c (cselib_hash_rtx): Likewise.
20186         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20187         CONST_VECTOR encoding.
20189 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20190             Jeff Law  <law@redhat.com>
20192         PR target/83641
20193         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20194         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20195         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20196         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20198         PR target/83641
20199         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20200         explicitly probe *sp in a noreturn function if there were any callee
20201         register saves or frame pointer is needed.
20203 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20205         PR debug/83621
20206         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20207         BLKmode for ternary, binary or unary expressions.
20209         PR debug/83645
20210         * var-tracking.c (delete_vta_debug_insn): New inline function.
20211         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20212         insns from get_insns () to NULL instead of each bb separately.
20213         Use delete_vta_debug_insn.  No longer static.
20214         (vt_debug_insns_local, variable_tracking_main_1): Adjust
20215         delete_vta_debug_insns callers.
20216         * rtl.h (delete_vta_debug_insns): Declare.
20217         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20218         instead of variable_tracking_main.
20220 2018-01-03  Martin Sebor  <msebor@redhat.com>
20222         PR tree-optimization/83603
20223         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20224         arguments past the endof the argument list in functions declared
20225         without a prototype.
20226         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20227         Avoid checking when arguments are null.
20229 2018-01-03  Martin Sebor  <msebor@redhat.com>
20231         PR c/83559
20232         * doc/extend.texi (attribute const): Fix a typo.
20233         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20234         issuing -Wsuggest-attribute for void functions.
20236 2018-01-03  Martin Sebor  <msebor@redhat.com>
20238         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20239         offset_int::from instead of wide_int::to_shwi.
20240         (maybe_diag_overlap): Remove assertion.
20241         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20242         * gimple-ssa-sprintf.c (format_directive): Same.
20243         (parse_directive): Same.
20244         (sprintf_dom_walker::compute_format_length): Same.
20245         (try_substitute_return_value): Same.
20247 2018-01-03  Jeff Law  <law@redhat.com>
20249         PR middle-end/83654
20250         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20251         non-constant residual for zero at runtime and avoid probing in
20252         that case.  Reorganize code for trailing problem to mirror handling
20253         of the residual.
20255 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20257         PR tree-optimization/83501
20258         * tree-ssa-strlen.c (get_string_cst): New.
20259         (handle_char_store): Call get_string_cst.
20261 2018-01-03  Martin Liska  <mliska@suse.cz>
20263         PR tree-optimization/83593
20264         * tree-ssa-strlen.c: Include tree-cfg.h.
20265         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20266         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20267         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20268         to false.
20269         (strlen_dom_walker::before_dom_children): Call
20270         gimple_purge_dead_eh_edges. Dump tranformation with details
20271         dump flags.
20272         (strlen_dom_walker::before_dom_children): Update call by adding
20273         new argument cleanup_eh.
20274         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20276 2018-01-03  Martin Liska  <mliska@suse.cz>
20278         PR ipa/83549
20279         * cif-code.def (VARIADIC_THUNK): New enum value.
20280         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20281         thunks.
20283 2018-01-03  Jan Beulich  <jbeulich@suse.com>
20285         * sse.md (mov<mode>_internal): Tighten condition for when to use
20286         vmovdqu<ssescalarsize> for TI and OI modes.
20288 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20290         Update copyright years.
20292 2018-01-03  Martin Liska  <mliska@suse.cz>
20294         PR ipa/83594
20295         * ipa-visibility.c (function_and_variable_visibility): Skip
20296         functions with noipa attribure.
20298 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20300         * gcc.c (process_command): Update copyright notice dates.
20301         * gcov-dump.c (print_version): Ditto.
20302         * gcov.c (print_version): Ditto.
20303         * gcov-tool.c (print_version): Ditto.
20304         * gengtype.c (create_file): Ditto.
20305         * doc/cpp.texi: Bump @copying's copyright year.
20306         * doc/cppinternals.texi: Ditto.
20307         * doc/gcc.texi: Ditto.
20308         * doc/gccint.texi: Ditto.
20309         * doc/gcov.texi: Ditto.
20310         * doc/install.texi: Ditto.
20311         * doc/invoke.texi: Ditto.
20313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20315         * vector-builder.h (vector_builder::m_full_nelts): Change from
20316         unsigned int to poly_uint64.
20317         (vector_builder::full_nelts): Update prototype accordingly.
20318         (vector_builder::new_vector): Likewise.
20319         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20320         (vector_builder::operator ==): Likewise.
20321         (vector_builder::finalize): Likewise.
20322         * int-vector-builder.h (int_vector_builder::int_vector_builder):
20323         Take the number of elements as a poly_uint64 rather than an
20324         unsigned int.
20325         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20326         from unsigned int to poly_uint64.
20327         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20328         (vec_perm_indices::new_vector): Likewise.
20329         (vec_perm_indices::length): Likewise.
20330         (vec_perm_indices::nelts_per_input): Likewise.
20331         (vec_perm_indices::input_nelts): Likewise.
20332         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20333         number of elements per input as a poly_uint64 rather than an
20334         unsigned int.  Use the original encoding for variable-length
20335         vectors, rather than clamping each individual element.
20336         For the second and subsequent elements in each pattern,
20337         clamp the step and base before clamping their sum.
20338         (vec_perm_indices::series_p): Handle polynomial element counts.
20339         (vec_perm_indices::all_in_range_p): Likewise.
20340         (vec_perm_indices_to_tree): Likewise.
20341         (vec_perm_indices_to_rtx): Likewise.
20342         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20343         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20344         (tree_vector_builder::new_binary_operation): Handle polynomial
20345         element counts.  Return false if we need to know the number
20346         of elements at compile time.
20347         * fold-const.c (fold_vec_perm): Punt if the number of elements
20348         isn't known at compile time.
20350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20352         * vec-perm-indices.h (vec_perm_builder): Change element type
20353         from HOST_WIDE_INT to poly_int64.
20354         (vec_perm_indices::element_type): Update accordingly.
20355         (vec_perm_indices::clamp): Handle polynomial element_types.
20356         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20357         (vec_perm_indices::all_in_range_p): Likewise.
20358         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20359         than shwi trees.
20360         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20361         polynomial vec_perm_indices element types.
20362         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20363         * fold-const.c (fold_vec_perm): Likewise.
20364         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20365         * tree-vect-generic.c (lower_vec_perm): Likewise.
20366         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20367         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20368         element type to HOST_WIDE_INT.
20370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20371             Alan Hayward  <alan.hayward@arm.com>
20372             David Sherwood  <david.sherwood@arm.com>
20374         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20375         rather than an int.  Use plus_constant.
20376         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20377         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20380             Alan Hayward  <alan.hayward@arm.com>
20381             David Sherwood  <david.sherwood@arm.com>
20383         * calls.c (emit_call_1, expand_call): Change struct_value_size from
20384         a HOST_WIDE_INT to a poly_int64.
20386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20387             Alan Hayward  <alan.hayward@arm.com>
20388             David Sherwood  <david.sherwood@arm.com>
20390         * calls.c (load_register_parameters): Cope with polynomial
20391         mode sizes.  Require a constant size for BLKmode parameters
20392         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
20393         forces a parameter to be padded at the lsb end in order to
20394         fill a complete number of words, require the parameter size
20395         to be ordered wrt UNITS_PER_WORD.
20397 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20398             Alan Hayward  <alan.hayward@arm.com>
20399             David Sherwood  <david.sherwood@arm.com>
20401         * reload1.c (spill_stack_slot_width): Change element type
20402         from unsigned int to poly_uint64_pod.
20403         (alter_reg): Treat mode sizes as polynomial.
20405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20406             Alan Hayward  <alan.hayward@arm.com>
20407             David Sherwood  <david.sherwood@arm.com>
20409         * reload.c (complex_word_subreg_p): New function.
20410         (reload_inner_reg_of_subreg, push_reload): Use it.
20412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20413             Alan Hayward  <alan.hayward@arm.com>
20414             David Sherwood  <david.sherwood@arm.com>
20416         * lra-constraints.c (process_alt_operands): Reject matched
20417         operands whose sizes aren't ordered.
20418         (match_reload): Refer to this check here.
20420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20421             Alan Hayward  <alan.hayward@arm.com>
20422             David Sherwood  <david.sherwood@arm.com>
20424         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20425         that the mode size is in the set {1, 2, 4, 8, 16}.
20427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20428             Alan Hayward  <alan.hayward@arm.com>
20429             David Sherwood  <david.sherwood@arm.com>
20431         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20432         Use plus_constant instead of gen_rtx_PLUS.
20434 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20435             Alan Hayward  <alan.hayward@arm.com>
20436             David Sherwood  <david.sherwood@arm.com>
20438         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20439         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20440         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20441         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20442         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20443         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20444         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20445         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20446         * config/i386/i386.c (ix86_push_rounding): ...this new function.
20447         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20448         a poly_int64.
20449         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20450         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20451         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20452         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20453         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20454         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20455         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20456         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20457         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20458         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20459         function.
20460         * expr.c (emit_move_resolve_push): Treat the input and result
20461         of PUSH_ROUNDING as a poly_int64.
20462         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20463         (emit_push_insn): Likewise.
20464         * lra-eliminations.c (mark_not_eliminable): Likewise.
20465         * recog.c (push_operand): Likewise.
20466         * reload1.c (elimination_effects): Likewise.
20467         * rtlanal.c (nonzero_bits1): Likewise.
20468         * calls.c (store_one_arg): Likewise.  Require the padding to be
20469         known at compile time.
20471 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20472             Alan Hayward  <alan.hayward@arm.com>
20473             David Sherwood  <david.sherwood@arm.com>
20475         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20476         Use plus_constant instead of gen_rtx_PLUS.
20478 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20479             Alan Hayward  <alan.hayward@arm.com>
20480             David Sherwood  <david.sherwood@arm.com>
20482         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20483         rather than an int.
20485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20486             Alan Hayward  <alan.hayward@arm.com>
20487             David Sherwood  <david.sherwood@arm.com>
20489         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20490         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20491         via stack temporaries.  Treat the mode size as polynomial too.
20493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20494             Alan Hayward  <alan.hayward@arm.com>
20495             David Sherwood  <david.sherwood@arm.com>
20497         * expr.c (expand_expr_real_2): When handling conversions involving
20498         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20499         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
20500         as a poly_uint64 too.
20502 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20503             Alan Hayward  <alan.hayward@arm.com>
20504             David Sherwood  <david.sherwood@arm.com>
20506         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20508 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20509             Alan Hayward  <alan.hayward@arm.com>
20510             David Sherwood  <david.sherwood@arm.com>
20512         * combine.c (can_change_dest_mode): Handle polynomial
20513         REGMODE_NATURAL_SIZE.
20514         * expmed.c (store_bit_field_1): Likewise.
20515         * expr.c (store_constructor): Likewise.
20516         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20517         and polynomial REGMODE_NATURAL_SIZE.
20518         (gen_lowpart_common): Likewise.
20519         * reginfo.c (record_subregs_of_mode): Likewise.
20520         * rtlanal.c (read_modify_subreg_p): Likewise.
20522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20523             Alan Hayward  <alan.hayward@arm.com>
20524             David Sherwood  <david.sherwood@arm.com>
20526         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20527         numbers of elements.
20529 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20530             Alan Hayward  <alan.hayward@arm.com>
20531             David Sherwood  <david.sherwood@arm.com>
20533         * match.pd: Cope with polynomial numbers of vector elements.
20535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20536             Alan Hayward  <alan.hayward@arm.com>
20537             David Sherwood  <david.sherwood@arm.com>
20539         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20540         in a POINTER_PLUS_EXPR.
20542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20543             Alan Hayward  <alan.hayward@arm.com>
20544             David Sherwood  <david.sherwood@arm.com>
20546         * omp-simd-clone.c (simd_clone_subparts): New function.
20547         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20548         (ipa_simd_modify_function_body): Likewise.
20550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20551             Alan Hayward  <alan.hayward@arm.com>
20552             David Sherwood  <david.sherwood@arm.com>
20554         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20555         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20556         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20557         (expand_vector_condition, vector_element): Likewise.
20558         (subparts_gt): New function.
20559         (get_compute_type): Use subparts_gt.
20560         (count_type_subparts): Delete.
20561         (expand_vector_operations_1): Use subparts_gt instead of
20562         count_type_subparts.
20564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20565             Alan Hayward  <alan.hayward@arm.com>
20566             David Sherwood  <david.sherwood@arm.com>
20568         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20569         (vect_compile_time_alias): ...this new function.  Do the calculation
20570         on poly_ints rather than trees.
20571         (vect_prune_runtime_alias_test_list): Update call accordingly.
20573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20574             Alan Hayward  <alan.hayward@arm.com>
20575             David Sherwood  <david.sherwood@arm.com>
20577         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20578         numbers of units.
20579         (vect_schedule_slp_instance): Likewise.
20581 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20582             Alan Hayward  <alan.hayward@arm.com>
20583             David Sherwood  <david.sherwood@arm.com>
20585         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20586         constant and extern definitions for variable-length vectors.
20587         (vect_get_constant_vectors): Note that the number of units
20588         is known to be constant.
20590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20591             Alan Hayward  <alan.hayward@arm.com>
20592             David Sherwood  <david.sherwood@arm.com>
20594         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20595         of units as polynomial.  Choose between WIDE and NARROW based
20596         on multiple_p.
20598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20599             Alan Hayward  <alan.hayward@arm.com>
20600             David Sherwood  <david.sherwood@arm.com>
20602         * tree-vect-stmts.c (simd_clone_subparts): New function.
20603         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20606             Alan Hayward  <alan.hayward@arm.com>
20607             David Sherwood  <david.sherwood@arm.com>
20609         * tree-vect-stmts.c (vectorizable_call): Treat the number of
20610         vectors as polynomial.  Use build_index_vector for
20611         IFN_GOMP_SIMD_LANE.
20613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20614             Alan Hayward  <alan.hayward@arm.com>
20615             David Sherwood  <david.sherwood@arm.com>
20617         * tree-vect-stmts.c (get_load_store_type): Treat the number of
20618         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20619         for variable-length vectors.
20620         (vectorizable_mask_load_store): Treat the number of units as
20621         polynomial, asserting that it is constant if the condition has
20622         already been enforced.
20623         (vectorizable_store, vectorizable_load): Likewise.
20625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20626             Alan Hayward  <alan.hayward@arm.com>
20627             David Sherwood  <david.sherwood@arm.com>
20629         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20630         of units as polynomial.  Punt if we can't tell at compile time
20631         which vector contains the final result.
20633 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20634             Alan Hayward  <alan.hayward@arm.com>
20635             David Sherwood  <david.sherwood@arm.com>
20637         * tree-vect-loop.c (vectorizable_induction): Treat the number
20638         of units as polynomial.  Punt on SLP inductions.  Use an integer
20639         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
20640         cast of such a series for variable-length floating-point
20641         reductions.
20643 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20644             Alan Hayward  <alan.hayward@arm.com>
20645             David Sherwood  <david.sherwood@arm.com>
20647         * tree.h (build_index_vector): Declare.
20648         * tree.c (build_index_vector): New function.
20649         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20650         of units as polynomial, forcibly converting it to a constant if
20651         vectorizable_reduction has already enforced the condition.
20652         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
20653         to create a {1,2,3,...} vector.
20654         (vectorizable_reduction): Treat the number of units as polynomial.
20655         Choose vectype_in based on the largest scalar element size rather
20656         than the smallest number of units.  Enforce the restrictions
20657         relied on above.
20659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20660             Alan Hayward  <alan.hayward@arm.com>
20661             David Sherwood  <david.sherwood@arm.com>
20663         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20664         number of units as polynomial.
20666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20667             Alan Hayward  <alan.hayward@arm.com>
20668             David Sherwood  <david.sherwood@arm.com>
20670         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20671         * target.def (autovectorize_vector_sizes): Return the vector sizes
20672         by pointer, using vector_sizes rather than a bitmask.
20673         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20674         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20675         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20676         Likewise.
20677         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20678         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20679         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20680         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20681         * omp-general.c (omp_max_vf): Likewise.
20682         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20683         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20684         * tree-vect-loop.c (vect_analyze_loop): Likewise.
20685         * tree-vect-slp.c (vect_slp_bb): Likewise.
20686         * doc/tm.texi: Regenerate.
20687         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20688         to a poly_uint64.
20689         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20690         the vector size as a poly_uint64 rather than an unsigned int.
20691         (current_vector_size): Change from an unsigned int to a poly_uint64.
20692         (get_vectype_for_scalar_type): Update accordingly.
20693         * tree.h (build_truth_vector_type): Take the size and number of
20694         units as a poly_uint64 rather than an unsigned int.
20695         (build_vector_type): Add a temporary overload that takes
20696         the number of units as a poly_uint64 rather than an unsigned int.
20697         * tree.c (make_vector_type): Likewise.
20698         (build_truth_vector_type): Take the number of units as a poly_uint64
20699         rather than an unsigned int.
20701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20702             Alan Hayward  <alan.hayward@arm.com>
20703             David Sherwood  <david.sherwood@arm.com>
20705         * target.def (get_mask_mode): Take the number of units and length
20706         as poly_uint64s rather than unsigned ints.
20707         * targhooks.h (default_get_mask_mode): Update accordingly.
20708         * targhooks.c (default_get_mask_mode): Likewise.
20709         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20710         * doc/tm.texi: Regenerate.
20712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20713             Alan Hayward  <alan.hayward@arm.com>
20714             David Sherwood  <david.sherwood@arm.com>
20716         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20717         * omp-general.c (omp_max_vf): Likewise.
20718         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20719         (expand_omp_simd): Handle polynomial safelen.
20720         * omp-low.c (omplow_simd_context): Add a default constructor.
20721         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20722         (lower_rec_simd_input_clauses): Update accordingly.
20723         (lower_rec_input_clauses): Likewise.
20725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20726             Alan Hayward  <alan.hayward@arm.com>
20727             David Sherwood  <david.sherwood@arm.com>
20729         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20730         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20731         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20732         (vect_analyze_slp_cost): Likewise.
20733         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20734         (vect_model_load_cost): Likewise.
20736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20737             Alan Hayward  <alan.hayward@arm.com>
20738             David Sherwood  <david.sherwood@arm.com>
20740         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20741         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20742         from an unsigned int * to a poly_uint64_pod *.
20743         (calculate_unrolling_factor): New function.
20744         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20746 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20747             Alan Hayward  <alan.hayward@arm.com>
20748             David Sherwood  <david.sherwood@arm.com>
20750         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20751         from an unsigned int to a poly_uint64.
20752         (_loop_vec_info::slp_unrolling_factor): Likewise.
20753         (_loop_vec_info::vectorization_factor): Change from an int
20754         to a poly_uint64.
20755         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20756         (vect_get_num_vectors): New function.
20757         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20758         (vect_get_num_copies): Use vect_get_num_vectors.
20759         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20760         to an unsigned int *.
20761         (vect_analyze_data_refs): Change min_vf from an int * to a
20762         poly_uint64 *.
20763         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20764         than an unsigned HOST_WIDE_INT.
20765         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20766         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20767         to an unsigned int *.
20768         (vect_analyze_data_ref_dependences): Likewise.
20769         (vect_compute_data_ref_alignment): Handle polynomial vf.
20770         (vect_enhance_data_refs_alignment): Likewise.
20771         (vect_prune_runtime_alias_test_list): Likewise.
20772         (vect_shift_permute_load_chain): Likewise.
20773         (vect_supportable_dr_alignment): Likewise.
20774         (dependence_distance_ge_vf): Take the vectorization factor as a
20775         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20776         (vect_analyze_data_refs): Change min_vf from an int * to a
20777         poly_uint64 *.
20778         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20779         vfm1 as a poly_uint64 rather than an int.  Make the same change
20780         for the returned bound_scalar.
20781         (vect_gen_vector_loop_niters): Handle polynomial vf.
20782         (vect_do_peeling): Likewise.  Update call to
20783         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20784         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20785         be constant.
20786         * tree-vect-loop.c (vect_determine_vectorization_factor)
20787         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20788         (vect_get_known_peeling_cost): Likewise.
20789         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20790         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20791         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20792         updating the upper bounds of the loop.
20793         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20794         rather than an int.
20795         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20796         polynomial unroll factors.
20797         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20798         (vect_make_slp_decision): Likewise.
20799         (vect_supported_load_permutation_p): Likewise, and polynomial
20800         vf too.
20801         (vect_analyze_slp_cost): Handle polynomial vf.
20802         (vect_slp_analyze_node_operations): Likewise.
20803         (vect_slp_analyze_bb_1): Likewise.
20804         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20805         than an unsigned HOST_WIDE_INT.
20806         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20807         (vectorizable_load): Handle polynomial vf.
20808         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20809         a poly_uint64.
20810         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20812 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20813             Alan Hayward  <alan.hayward@arm.com>
20814             David Sherwood  <david.sherwood@arm.com>
20816         * match.pd: Handle bit operations involving three constants
20817         and try to fold one pair.
20819 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20821         * tree-vect-loop-manip.c: Include gimple-fold.h.
20822         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20823         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
20824         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20825         Add a path that uses a step of VF instead of 1, but disable it
20826         for now.
20827         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20828         and niters_no_overflow parameters.  Update calls to
20829         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20830         Create a new SSA name if the latter choses to use a ste other
20831         than zero, and return it via niters_vector_mult_vf_var.
20832         * tree-vect-loop.c (vect_transform_loop): Update calls to
20833         vect_do_peeling, vect_gen_vector_loop_niters and
20834         slpeel_make_loop_iterate_ntimes.
20835         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20836         (vect_gen_vector_loop_niters): Update declarations after above changes.
20838 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
20840         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20841         128-bit round to integer instructions.
20842         (ceil<mode>2): Likewise.
20843         (btrunc<mode>2): Likewise.
20844         (round<mode>2): Likewise.
20846 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20848         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20849         unaligned VSX load/store on P8/P9.
20850         (expand_block_clear): Allow the use of unaligned VSX
20851         load/store on P8/P9.
20853 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20855         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20856         New function.
20857         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20858         swap associated with both a load and a store.
20860 2018-01-02  Andrew Waterman  <andrew@sifive.com>
20862         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20863         * config/riscv/riscv.md (clear_cache): Use it.
20865 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
20867         * web.c: Remove out-of-date comment.
20869 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20871         * expr.c (fixup_args_size_notes): Check that any existing
20872         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20873         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20874         (emit_single_push_insn): ...here.
20876 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20878         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20879         (const_vector_encoded_nelts): New function.
20880         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20881         (const_vector_int_elt, const_vector_elt): Declare.
20882         * emit-rtl.c (const_vector_int_elt_1): New function.
20883         (const_vector_elt): Likewise.
20884         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20885         of CONST_VECTOR_ELT.
20887 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20889         * expr.c: Include rtx-vector-builder.h.
20890         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20891         directly on the tree encoding.
20892         (const_vector_from_tree): Likewise.
20893         * optabs.c: Include rtx-vector-builder.h.
20894         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20895         sequence of "u" values.
20896         * vec-perm-indices.c: Include rtx-vector-builder.h.
20897         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20898         directly on the vec_perm_indices encoding.
20900 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20902         * doc/rtl.texi (const_vector): Describe new encoding scheme.
20903         * Makefile.in (OBJS): Add rtx-vector-builder.o.
20904         * rtx-vector-builder.h: New file.
20905         * rtx-vector-builder.c: Likewise.
20906         * rtl.h (rtx_def::u2): Add a const_vector field.
20907         (CONST_VECTOR_NPATTERNS): New macro.
20908         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20909         (CONST_VECTOR_DUPLICATE_P): Likewise.
20910         (CONST_VECTOR_STEPPED_P): Likewise.
20911         (CONST_VECTOR_ENCODED_ELT): Likewise.
20912         (const_vec_duplicate_p): Check for a duplicated vector encoding.
20913         (unwrap_const_vec_duplicate): Likewise.
20914         (const_vec_series_p): Check for a non-duplicated vector encoding.
20915         Say that the function only returns true for integer vectors.
20916         * emit-rtl.c: Include rtx-vector-builder.h.
20917         (gen_const_vec_duplicate_1): Delete.
20918         (gen_const_vector): Call gen_const_vec_duplicate instead of
20919         gen_const_vec_duplicate_1.
20920         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20921         (gen_const_vec_duplicate): Use rtx_vector_builder.
20922         (gen_const_vec_series): Likewise.
20923         (gen_rtx_CONST_VECTOR): Likewise.
20924         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20925         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20926         Build a new vector rather than modifying a CONST_VECTOR in-place.
20927         (handle_special_swappables): Update call accordingly.
20928         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20929         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20930         Build a new vector rather than modifying a CONST_VECTOR in-place.
20931         (handle_special_swappables): Update call accordingly.
20933 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20935         * simplify-rtx.c (simplify_const_binary_operation): Use
20936         CONST_VECTOR_ELT instead of XVECEXP.
20938 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20940         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20941         the selector elements to be different from the data elements
20942         if the selector is a VECTOR_CST.
20943         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20944         ssizetype for the selector.
20946 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20948         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20949         before testing each element individually.
20950         * tree-vect-generic.c (lower_vec_perm): Likewise.
20952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20954         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20955         * selftest-run-tests.c (selftest::run_tests): Call it.
20956         * vector-builder.h (vector_builder::operator ==): New function.
20957         (vector_builder::operator !=): Likewise.
20958         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20959         (vec_perm_indices::all_from_input_p): New function.
20960         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20961         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20962         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20963         instead of reading the VECTOR_CST directly.  Detect whether both
20964         vector inputs are the same before constructing the vec_perm_indices,
20965         and update the number of inputs argument accordingly.  Use the
20966         utility functions added above.  Only construct sel2 if we need to.
20968 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20970         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20971         the broadcast of the low byte.
20972         (expand_mult_highpart): Use an explicit encoding for the permutes.
20973         * optabs-query.c (can_mult_highpart_p): Likewise.
20974         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20975         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20976         (vectorizable_bswap): Likewise.
20977         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20978         explicit encoding for the power-of-2 permutes.
20979         (vect_permute_store_chain): Likewise.
20980         (vect_grouped_load_supported): Likewise.
20981         (vect_permute_load_chain): Likewise.
20983 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20985         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20986         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20987         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
20988         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20989         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
20990         (vect_gen_perm_mask_any): Likewise.
20992 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
20994         * int-vector-builder.h: New file.
20995         * vec-perm-indices.h: Include int-vector-builder.h.
20996         (vec_perm_indices): Redefine as an int_vector_builder.
20997         (auto_vec_perm_indices): Delete.
20998         (vec_perm_builder): Redefine as a stand-alone class.
20999         (vec_perm_indices::vec_perm_indices): New function.
21000         (vec_perm_indices::clamp): Likewise.
21001         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21002         (vec_perm_indices::new_vector): New function.
21003         (vec_perm_indices::new_expanded_vector): Update for new
21004         vec_perm_indices class.
21005         (vec_perm_indices::rotate_inputs): New function.
21006         (vec_perm_indices::all_in_range_p): Operate directly on the
21007         encoded form, without computing elided elements.
21008         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21009         encoding.  Update for new vec_perm_indices class.
21010         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21011         the given vec_perm_builder.
21012         (expand_vec_perm_var): Update vec_perm_builder constructor.
21013         (expand_mult_highpart): Use vec_perm_builder instead of
21014         auto_vec_perm_indices.
21015         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21016         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
21017         or double series encoding as appropriate.
21018         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21019         vec_perm_indices instead of auto_vec_perm_indices.
21020         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21021         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21022         (vect_permute_store_chain): Likewise.
21023         (vect_grouped_load_supported): Likewise.
21024         (vect_permute_load_chain): Likewise.
21025         (vect_shift_permute_load_chain): Likewise.
21026         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21027         (vect_transform_slp_perm_load): Likewise.
21028         (vect_schedule_slp_instance): Likewise.
21029         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21030         (vectorizable_mask_load_store): Likewise.
21031         (vectorizable_bswap): Likewise.
21032         (vectorizable_store): Likewise.
21033         (vectorizable_load): Likewise.
21034         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21035         vec_perm_indices instead of auto_vec_perm_indices.  Use
21036         tree_to_vec_perm_builder to read the vector from a tree.
21037         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21038         vec_perm_builder instead of a vec_perm_indices.
21039         (have_whole_vector_shift): Use vec_perm_builder and
21040         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
21041         truncation to calc_vec_perm_mask_for_shift.
21042         (vect_create_epilog_for_reduction): Likewise.
21043         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21044         from auto_vec_perm_indices to vec_perm_indices.
21045         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21046         instead of changing individual elements.
21047         (aarch64_vectorize_vec_perm_const): Use new_vector to install
21048         the vector in d.perm.
21049         * config/arm/arm.c (expand_vec_perm_d::perm): Change
21050         from auto_vec_perm_indices to vec_perm_indices.
21051         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21052         instead of changing individual elements.
21053         (arm_vectorize_vec_perm_const): Use new_vector to install
21054         the vector in d.perm.
21055         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21056         Update vec_perm_builder constructor.
21057         (rs6000_expand_interleave): Likewise.
21058         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21059         (rs6000_expand_interleave): Likewise.
21061 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21063         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21064         to qimode could truncate the indices.
21065         * optabs.c (expand_vec_perm_var): Likewise.
21067 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21069         * Makefile.in (OBJS): Add vec-perm-indices.o.
21070         * vec-perm-indices.h: New file.
21071         * vec-perm-indices.c: Likewise.
21072         * target.h (vec_perm_indices): Replace with a forward class
21073         declaration.
21074         (auto_vec_perm_indices): Move to vec-perm-indices.h.
21075         * optabs.h: Include vec-perm-indices.h.
21076         (expand_vec_perm): Delete.
21077         (selector_fits_mode_p, expand_vec_perm_var): Declare.
21078         (expand_vec_perm_const): Declare.
21079         * target.def (vec_perm_const_ok): Replace with...
21080         (vec_perm_const): ...this new hook.
21081         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21082         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21083         * doc/tm.texi: Regenerate.
21084         * optabs.def (vec_perm_const): Delete.
21085         * doc/md.texi (vec_perm_const): Likewise.
21086         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21087         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21088         expand_vec_perm for constant permutation vectors.  Assert that
21089         the mode of variable permutation vectors is the integer equivalent
21090         of the mode that is being permuted.
21091         * optabs-query.h (selector_fits_mode_p): Declare.
21092         * optabs-query.c: Include vec-perm-indices.h.
21093         (selector_fits_mode_p): New function.
21094         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21095         is defined, instead of checking whether the vec_perm_const_optab
21096         exists.  Use targetm.vectorize.vec_perm_const instead of
21097         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
21098         fit in the vector mode before using a variable permute.
21099         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21100         vec_perm_indices instead of an rtx.
21101         (expand_vec_perm): Replace with...
21102         (expand_vec_perm_const): ...this new function.  Take the selector
21103         as a vec_perm_indices rather than an rtx.  Also take the mode of
21104         the selector.  Update call to shift_amt_for_vec_perm_mask.
21105         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21106         Use vec_perm_indices::new_expanded_vector to expand the original
21107         selector into bytes.  Check whether the indices fit in the vector
21108         mode before using a variable permute.
21109         (expand_vec_perm_var): Make global.
21110         (expand_mult_highpart): Use expand_vec_perm_const.
21111         * fold-const.c: Includes vec-perm-indices.h.
21112         * tree-ssa-forwprop.c: Likewise.
21113         * tree-vect-data-refs.c: Likewise.
21114         * tree-vect-generic.c: Likewise.
21115         * tree-vect-loop.c: Likewise.
21116         * tree-vect-slp.c: Likewise.
21117         * tree-vect-stmts.c: Likewise.
21118         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21119         Delete.
21120         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21121         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21122         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21123         (aarch64_vectorize_vec_perm_const): ...this new function.
21124         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21125         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21126         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21127         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21128         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21129         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21130         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21131         into...
21132         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
21133         check for NEON modes.
21134         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21135         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21136         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21137         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21138         into...
21139         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
21140         the old VEC_PERM_CONST conditions.
21141         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21142         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21143         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21144         (ia64_vectorize_vec_perm_const_ok): Merge into...
21145         (ia64_vectorize_vec_perm_const): ...this new function.
21146         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21147         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21148         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21149         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21150         * config/mips/mips.c (mips_expand_vec_perm_const)
21151         (mips_vectorize_vec_perm_const_ok): Merge into...
21152         (mips_vectorize_vec_perm_const): ...this new function.
21153         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21154         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21155         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21156         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21157         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21158         (rs6000_expand_vec_perm_const): Delete.
21159         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21160         Delete.
21161         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21162         (altivec_expand_vec_perm_const_le): Take each operand individually.
21163         Operate on constant selectors rather than rtxes.
21164         (altivec_expand_vec_perm_const): Likewise.  Update call to
21165         altivec_expand_vec_perm_const_le.
21166         (rs6000_expand_vec_perm_const): Delete.
21167         (rs6000_vectorize_vec_perm_const_ok): Delete.
21168         (rs6000_vectorize_vec_perm_const): New function.
21169         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21170         an element count and rtx array.
21171         (rs6000_expand_extract_even): Update call accordingly.
21172         (rs6000_expand_interleave): Likewise.
21173         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21174         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21175         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21176         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21177         (rs6000_expand_vec_perm_const): Delete.
21178         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21179         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21180         (altivec_expand_vec_perm_const_le): Take each operand individually.
21181         Operate on constant selectors rather than rtxes.
21182         (altivec_expand_vec_perm_const): Likewise.  Update call to
21183         altivec_expand_vec_perm_const_le.
21184         (rs6000_expand_vec_perm_const): Delete.
21185         (rs6000_vectorize_vec_perm_const_ok): Delete.
21186         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
21187         reference to the SPE evmerge intructions.
21188         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21189         an element count and rtx array.
21190         (rs6000_expand_extract_even): Update call accordingly.
21191         (rs6000_expand_interleave): Likewise.
21192         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21193         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21194         new function.
21195         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21197 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21199         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21200         vector mode and that that mode matches the mode of the data
21201         being permuted.
21202         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21203         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
21204         directly using expand_vec_perm_1 when forcing selectors into
21205         registers.
21206         (expand_vec_perm_var): New function, split out from expand_vec_perm.
21208 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21210         * optabs-query.h (can_vec_perm_p): Delete.
21211         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21212         * optabs-query.c (can_vec_perm_p): Split into...
21213         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21214         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21215         particular selector is valid.
21216         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21217         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21218         (vect_grouped_load_supported): Likewise.
21219         (vect_shift_permute_load_chain): Likewise.
21220         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21221         (vect_transform_slp_perm_load): Likewise.
21222         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21223         (vectorizable_bswap): Likewise.
21224         (vect_gen_perm_mask_checked): Likewise.
21225         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
21226         implementations of variable permutation vectors into account
21227         when deciding which selector to use.
21228         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21229         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21230         with a false third argument.
21231         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21232         to test whether the constant selector is valid and can_vec_perm_var_p
21233         to test whether a variable selector is valid.
21235 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21237         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21238         * optabs-query.c (can_vec_perm_p): Likewise.
21239         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21240         instead of vec_perm_indices.
21241         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21242         (vect_gen_perm_mask_checked): Likewise,
21243         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21244         (vect_gen_perm_mask_checked): Likewise,
21246 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21248         * optabs-query.h (qimode_for_vec_perm): Declare.
21249         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21250         (qimode_for_vec_perm): ...this new function.
21251         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21253 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21255         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21256         does not have a conditional at the top.
21258 2018-01-02  Richard Biener  <rguenther@suse.de>
21260         * ipa-inline.c (big_speedup_p): Fix expression.
21262 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21264         PR target/81616
21265         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21266         for generic 4->6.
21268 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21270         PR target/81616
21271         Generic tuning.
21272         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21273         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21274         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21275         cond_taken_branch_cost 3->4.
21277 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
21279         PR tree-optimization/83581
21280         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21281         TODO_cleanup_cfg if any changes have been made.
21283         PR middle-end/83608
21284         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21285         convert_modes if target mode has the right side, but different mode
21286         class.
21288         PR middle-end/83609
21289         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21290         last argument when extracting from CONCAT.  If either from_real or
21291         from_imag is NULL, use expansion through memory.  If result is not
21292         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21293         the parts directly to inner mode, if even that fails, use expansion
21294         through memory.
21296         PR middle-end/83623
21297         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21298         check for bswap in mode rather than HImode and use that in expand_unop
21299         too.
21301 Copyright (C) 2018 Free Software Foundation, Inc.
21303 Copying and distribution of this file, with or without modification,
21304 are permitted in any medium without royalty provided the copyright
21305 notice and this notice are preserved.