[33/46] Use stmt_vec_infos instead of vec_info/gimple stmt pairs
[official-gcc.git] / gcc / ChangeLog
blob2caade9e0a3a7ecbff05ca052b2f1e73a1f3429e
1 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4         and gimple stmt arguments with a stmt_vec_info.
5         (vect_record_base_alignments): Update calls accordingly.
6         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
7         and gimple stmt arguments with a stmt_vec_info.
8         (vect_build_slp_tree_1): Remove vinfo argument and update call
9         to vect_record_max_nunits.
10         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11         and vect_record_max_nunits.
13 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
15         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
16         file and take a stmt_vec_info instead of a gimple stmt.
17         (supportable_widening_operation, vect_finish_replace_stmt)
18         (vect_finish_stmt_generation, vect_get_store_rhs)
19         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
20         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
21         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
22         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
23         (vect_create_data_ref_ptr, bump_vector_ptr)
24         (vect_permute_store_chain, vect_setup_realignment)
25         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
26         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
27         (vectorizable_reduction, vectorizable_induction)
28         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
29         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
30         than gimple stmts as arguments.
31         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
32         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
33         (can_group_stmts_p, vect_check_gather_scatter)
34         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
35         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
36         (vect_permute_load_chain, vect_shift_permute_load_chain)
37         (vect_transform_grouped_load)
38         (vect_record_grouped_load_vectors): Likewise.
39         * tree-vect-loop.c (vect_fixup_reduc_chain)
40         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
41         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
42         (vectorizable_reduction, vectorizable_induction)
43         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
44         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
45         (vect_get_load_store_mask): Likewise.
46         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
47         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
48         * tree-vect-stmts.c (vect_mark_relevant)
49         (is_simple_and_all_uses_invariant)
50         (exist_non_indexing_operands_for_use_p, process_use)
51         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
52         (vect_get_vec_def_for_operand, vect_get_vec_defs)
53         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
54         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
55         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
56         (get_negative_load_store_type, get_load_store_type)
57         (vect_check_load_store_mask, vect_check_store_rhs)
58         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
59         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
60         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
61         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
62         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
63         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
64         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
65         (supportable_widening_operation): Likewise.
67 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
69         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
70         a stmt_vec_info instead of a gcall.
71         (vect_check_gather_scatter): Update call accordingly.
72         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
73         of a gphi.
74         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
75         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
76         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
77         instead of a gimple stmt.
78         (vect_transform_loop): Update calls accordingly.
79         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
80         stmt_vec_infos instead of gimple stmts.
81         (vect_analyze_slp_instance): Update use accordingly.
82         * tree-vect-stmts.c (read_vector_array, write_vector_array)
83         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
84         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
85         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
86         (vect_gen_widened_results_half, vect_get_loop_based_defs)
87         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
88         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
89         down to subroutines.
91 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
93         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
94         of the worklist from a vector of gimple stmts to a vector of
95         stmt_vec_infos.
96         * tree-vect-stmts.c (vect_mark_relevant, process_use)
97         (vect_mark_stmts_to_be_vectorized): Likewise
99 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
101         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
102         statement before passing it to vect_analyze_stmt.
103         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
104         the chain of phi vector definitions.  Track the exit phi via its
105         stmt_vec_info.
106         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
107         STMT_VINFO_REDUC_DEF.
108         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
109         stmt_vec_infos to handle the statement chains.
110         (vect_get_slp_defs): Record the first statement in the node
111         using a stmt_vec_info.
112         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
113         statements here and pass their stmt_vec_info down to subroutines.
114         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
115         down to vect_finish_stmt_generation.
116         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
117         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
118         stmt_vec_infos to subroutines.
119         (vect_remove_stores): Use stmt_vec_infos to handle the statement
120         chains.
122 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
124         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
125         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
126         (vect_permute_store_chain, vect_setup_realignment)
127         (vect_permute_load_chain, vect_shift_permute_load_chain)
128         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
129         stmts internally, and when passing values to other vectorizer routines.
130         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
131         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
132         (vect_analyze_loop_operations, get_initial_def_for_reduction)
133         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
134         (vectorizable_reduction, vectorizable_induction)
135         (vectorizable_live_operation, vect_transform_loop_stmt)
136         (vect_transform_loop): Likewise.
137         * tree-vect-patterns.c (vect_reassociating_reduction_p)
138         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
139         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
140         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
141         (vect_slp_analyze_node_operations_1): Likewise.
142         * tree-vect-stmts.c (vect_mark_relevant, process_use)
143         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
144         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
145         (vect_finish_stmt_generation_1, get_group_load_store_type)
146         (get_load_store_type, vect_build_gather_load_calls)
147         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
148         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
149         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
150         (vectorizable_store, vectorizable_load, vectorizable_condition)
151         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
152         (supportable_widening_operation): Likewise.
153         (vect_get_vector_types_for_stmt): Likewise.
154         * tree-vectorizer.h (vect_dr_behavior): Likewise.
156 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
158         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
159         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
160         (vect_permute_store_chain, vect_permute_load_chain)
161         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
162         repeated stmt_vec_info lookups.
163         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
164         (vect_update_ivs_after_vectorizer): Likewise.
165         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
166         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
167         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
168         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
169         (vect_bb_slp_scalar_cost): Likewise.
170         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
172 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
174         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
175         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
176         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
177         to get gassigns and gcalls, rather than operating on generc gimple
178         stmts.
179         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
180         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
181         (vectorizable_load, vect_analyze_stmt): Likewise.
182         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
184 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
186         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
187         return stmt_vec_infos rather than gimple stmts.  Do not accept
188         null arguments.
189         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
190         of a gimple stmt.
191         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
192         Update use of get_later_stmt.
193         (vect_get_constant_vectors): Update call accordingly.
194         (vect_schedule_slp_instance): Likewise
195         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
196         (vect_slp_analyze_instance_dependence): Likewise.
197         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
199 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
201         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
202         (stmt_info_for_cost::stmt_info): ...this new field.
203         (add_stmt_costs): Update accordingly.
204         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
205         (vect_get_known_peeling_cost): Likewise.
206         (vect_estimate_min_profitable_iters): Likewise.
207         * tree-vect-stmts.c (record_stmt_cost): Likewise.
209 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
211         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
212         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
213         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
214         accordingly.
215         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
217 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
219         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
220         a gimple stmt to a stmt_vec_info.
221         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
223 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
225         * tree-vectorizer.h (vec_info::grouped_stores): Change from
226         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
227         (_loop_vec_info::reduction_chains): Likewise.
228         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
229         accordingly.
230         * tree-vect-slp.c (vect_analyze_slp): Likewise.
232 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
234         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
235         a gimple stmt to a stmt_vec_info.
236         (_stmt_vec_info::next_element): Likewise.
237         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
238         (vect_slp_analyze_and_verify_node_alignment)
239         (vect_analyze_group_access_1, vect_analyze_group_access)
240         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
241         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
242         (vect_supportable_dr_alignment): Update accordingly.
243         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
244         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
245         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
246         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
247         * tree-vect-slp.c (vect_build_slp_tree_1)
248         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
249         (vect_split_slp_store_group, vect_analyze_slp_instance)
250         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
251         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
252         (get_group_load_store_type, get_load_store_type)
253         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
254         (vect_transform_stmt, vect_remove_stores): Likewise.
256 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
258         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
259         than a gimple stmt.
260         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
261         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
262         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
263         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
264         (vector_alignment_reachable_p, vect_get_data_access_cost)
265         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
266         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
267         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
268         (vect_analyze_group_access_1, vect_analyze_group_access)
269         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
270         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
271         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
272         result of vect_dr_stmt and use the stmt_vec_info instead of
273         the associated gimple stmt.
274         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
275         (vect_gen_prolog_loop_niters): Likewise.
276         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
278 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
280         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
281         to a vec<stmt_vec_info>.
282         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
283         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
284         vec<stmt_vec_info>.
285         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
286         to a vec<stmt_vec_info>.
287         (bst_traits::value_type, bst_traits::value_type): Likewise.
288         (bst_traits::hash): Update accordingly.
289         (vect_get_and_check_slp_defs): Change the stmts parameter from
290         a vec<gimple *> to a vec<stmt_vec_info>.
291         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
292         (vect_build_slp_tree): Likewise.
293         (vect_build_slp_tree_2): Likewise.  Update uses of
294         SLP_TREE_SCALAR_STMTS.
295         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
296         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
297         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
298         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
299         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
300         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
301         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
302         (vect_get_constant_vectors, vect_get_slp_defs)
303         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
304         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
305         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
306         instead of gimple stmts.
307         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
308         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
309         (vect_slp_analyze_instance_dependence): Update uses of
310         SLP_TREE_SCALAR_STMTS.
311         (vect_slp_analyze_and_verify_node_alignment): Likewise.
312         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
313         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
314         (get_initial_defs_for_reduction): Likewise.
315         (vect_create_epilog_for_reduction): Likewise.
316         (vectorize_fold_left_reduction): Likewise.
317         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
318         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
319         (can_vectorize_live_stmts): Likewise.
321 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
323         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
324         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
325         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
326         than gimple stmts.
327         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
328         of a gimple stmt.
329         (gather_scalar_reductions): Update after above interface changes.
330         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
331         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
332         than gimple stmts.
333         (vect_force_simple_reduction): Likewise.
334         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
335         LOOP_VINFO_REDUCTIONS.
336         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
338 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
340         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
341         a gimple stmt to a stmt_vec_info.
342         * tree-vect-loop.c (vect_active_double_reduction_p)
343         (vect_force_simple_reduction, vectorizable_reduction): Update
344         accordingly.
346 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
348         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
349         vec<gimple *> to a vec<stmt_vec_info>.
350         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
351         the reduction_phis argument from a vec<gimple *> to a
352         vec<stmt_vec_info>.
353         (vectorizable_reduction): Likewise the phis local variable that
354         is passed to vect_create_epilog_for_reduction.  Update for new type
355         of SLP_TREE_VEC_STMTS.
356         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
357         (vectorizable_live_operation): Likewise.
358         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
359         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
361 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
363         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
364         a gimple stmt to a stmt_vec_info.
365         (vectorizable_condition, vectorizable_live_operation)
366         (vectorizable_reduction, vectorizable_induction): Pass back the
367         vectorized statement as a stmt_vec_info.
368         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
369         use of STMT_VINFO_VEC_STMT.
370         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
371         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
372         as stmt_vec_infos rather than gimple stmts.
373         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
374         to a stmt_vec_info.
375         (vectorizable_live_operation): Likewise.
376         (vectorizable_reduction, vectorizable_induction): Likewise,
377         updating use of STMT_VINFO_VEC_STMT.
378         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
379         of STMT_VINFO_VEC_STMT.
380         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
381         (vectorizable_simd_clone_call, vectorizable_conversion)
382         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
383         (vectorizable_store, vectorizable_load, vectorizable_condition)
384         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
385         from a gimple stmt to a stmt_vec_info.
386         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
387         pointer to a stmt_vec_info to the vectorizable_* routines.
389 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
391         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
392         a gimple stmt to a stmt_vec_info.
393         (is_pattern_stmt_p): Update accordingly.
394         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
395         (vect_record_grouped_load_vectors): Likewise.
396         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
397         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
398         (vect_model_reduction_cost): Likewise.
399         (vect_create_epilog_for_reduction): Likewise.
400         (vectorizable_reduction, vectorizable_induction): Likewise.
401         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
402         Return the stmt_vec_info for the pattern statement.
403         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
404         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
405         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
406         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
407         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
408         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
409         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
410         (free_stmt_vec_info, vect_is_simple_use): Likewise.
412 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
414         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
415         (vect_finish_stmt_generation): Likewise.
416         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
417         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
418         (vect_build_gather_load_calls): Use the return value of the above
419         functions instead of a separate call to vinfo_for_stmt.  Use narrow
420         scopes for the input gimple stmt and wider scopes for the associated
421         stmt_vec_info.  Use vec_info::lookup_def when setting these
422         stmt_vec_infos from an SSA_NAME definition.
423         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
424         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
425         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
426         (vectorizable_store, vectorizable_load, vectorizable_condition)
427         (vectorizable_comparison): Likewise.
428         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
429         (vectorizable_reduction): Likewise.
431 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
433         * tree-vectorizer.h (vect_is_simple_use): Add an optional
434         stmt_vec_info * parameter before the optional gimple **.
435         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
436         (process_use, vect_get_vec_def_for_operand_1): Update callers.
437         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
438         * tree-vect-loop.c (vectorizable_reduction): Likewise.
439         (vectorizable_live_operation): Likewise.
440         * tree-vect-patterns.c (type_conversion_p): Likewise.
441         (vect_look_through_possible_promotion): Likewise.
442         (vect_recog_rotate_pattern): Likewise.
443         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
445 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
447         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
448         a typedef to a wrapper class.
449         (NULL_STMT_VEC_INFO): New macro.
450         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
451         (stmt_vec_info::operator*): New function.
452         (stmt_vec_info::operator gimple *): Likewise.
453         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
454         (add_stmt_costs): Likewise.
455         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
456         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
457         (vect_get_known_peeling_cost): Likewise.
458         (vect_estimate_min_profitable_iters): Likewise.
459         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
460         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
461         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
462         (vectorizable_store, free_stmt_vec_infos): Likewise.
463         (new_stmt_vec_info): Change return type of xcalloc to
464         _stmt_vec_info *.
466 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
468         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
469         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
470         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
471         a single_imm_use-based sequence.
472         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
474 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
476         * tree-vectorizer.h (vec_info::lookup_def): Declare.
477         * tree-vectorizer.c (vec_info::lookup_def): New function.
478         * tree-vect-patterns.c (vect_get_internal_def): Use it.
479         (vect_widened_op_tree): Likewise.
480         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
481         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
482         (vectorizable_reduction): Likewise.
483         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
484         of a gimple *.
485         (vect_is_slp_reduction): Update calls accordingly.  Use
486         vec_info::lookup_def.
487         (vect_is_simple_reduction): Likewise
488         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
490 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
492         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
493         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
494         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
495         of vinfo_for_stmt.
496         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
497         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
498         (vect_update_vf_for_slp, vect_analyze_loop_operations)
499         (vect_is_slp_reduction, vectorizable_induction)
500         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
501         * tree-vect-patterns.c (vect_init_pattern_stmt):
502         (vect_determine_min_output_precision_1, vect_determine_precisions)
503         (vect_pattern_recog): Likewise.
504         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
505         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
506         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
507         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
508         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
509         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
510         info field from a loop to a loop_vec_info.
512 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
514         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
515         (vec_info::add_stmt): Declare.
516         * tree-vectorizer.c (vec_info::add_stmt): New function.
517         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
518         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
519         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
520         (vectorizable_induction): Likewise.
521         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
522         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
523         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
524         (vectorizable_load): Likewise.
525         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
526         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
527         (vect_recog_gather_scatter_pattern): Likewise.
528         (append_pattern_def_seq): Likewise.  Remove a check that is
529         performed by add_stmt itself.
531 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
533         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
534         which make_ssa_name was called with new_stmt before new_stmt
535         had been created.
537 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
539         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
540         split out from...
541         (vect_is_slp_reduction): ...here...
542         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
543         that are already known to be false.
545 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
547         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
548         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
549         STMT_VINFO_NUM_SLP_USES when it's true.
550         (vect_free_slp_instance): Add a final_p parameter and pass it to
551         vect_free_slp_tree.
552         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
553         (vect_analyze_slp_instance): Likewise.
554         (vect_slp_analyze_operations): Likewise.
555         (vect_slp_analyze_bb_1): Likewise.
556         * tree-vectorizer.c (vec_info): Likewise.
557         * tree-vect-loop.c (vect_transform_loop): Likewise.
559 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
561         * tree-vect-loop.c (vectorizable_reduction): Assert that the
562         function is not called for second and subsequent members of
563         a reduction group.
565 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
567         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
568         cases for nested loops from here to ...
569         (vect_create_epilog_for_reduction): ...here.  Only call
570         vect_is_simple_use for inner-loop reductions.
572 2018-07-31  Martin Liska  <mliska@suse.cz>
574         PR gcov-profile/85338
575         PR gcov-profile/85350
576         PR gcov-profile/85372
577         * profile.c (struct location_triplet): New.
578         (struct location_triplet_hash): Likewise.
579         (output_location): Do not output a BB that
580         is already recorded for a line.
581         (branch_prob): Use streamed_locations.
583 2018-07-31  Martin Liska  <mliska@suse.cz>
585         PR gcov-profile/85370
586         * coverage.c (coverage_begin_function): Do not mark target
587         clones as artificial functions.
589 2018-07-31  Martin Liska  <mliska@suse.cz>
591         PR gcov-profile/83813
592         PR gcov-profile/84758
593         PR gcov-profile/85217
594         PR gcov-profile/85332
595         * profile.c (branch_prob): Do not record GOTO expressions
596         for GIMPLE statements which locations are already streamed.
598 2018-07-31  Olivier Hainque  <hainque@adacore.com>
600         * gcc.c (handle_spec_function): Accept a soft_matched_part
601         argument, as do_spec_1.  Pass it down to ...
602         (eval_spec_function): Accept a soft_matched_part argument,
603         and pass it down to ...
604         (do_spec_2): Accept a soft_matched_part argument, and pass
605         it down to do_spec_1.
606         (do_spec_1): Pass soft_matched_part to handle_spec_function.
607         (handle_braces): Update call to handle_spec_function.
608         (driver::set_up_specs): Update calls to do_spec_2.
609         (compare_debug_dump_opt_spec_function): Likewise.
610         (compare_debug_self_opt_spec_function): Likewise.
612 2018-07-31  Olivier Hainque  <hainque@adacore.com>
614         * common.opt (nolibc): New option.
615         * doc/invoke.texi (Link Options): Document it.
616         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
617         * config/alpha/linux.h: Likewise.
618         * config/arc/elf.h: Likewise.
619         * config/arm/uclinux-elf.h: Likewise.
620         * config/arm/unknown-elf.h: Likewise.
621         * config/avr/avrlibc.h: Likewise.
622         * config/bfin/bfin.h: Likewise.
623         * config/bfin/linux.h: Likewise.
624         * config/bfin/uclinux.h: Likewise.
625         * config/darwin.h: Likewise.
626         * config/darwin10.h: Likewise.
627         * config/darwin12.h: Likewise.
628         * config/gnu-user.h: Likewise.
629         * config/lm32/uclinux-elf.h: Likewise.
630         * config/pa/pa-hpux11.h: Likewise.
631         * config/pa/pa64-hpux.h: Likewise.
632         * config/sparc/sparc.h: Likewise.
634 2018-07-31  Olivier Hainque  <hainque@adacore.com>
636         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
637         undefined variables.
639 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
641         PR target/86640
642         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
643         instead of GEN_INT.
645 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
647         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
648         terminated string literal.
650 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
652         PR rtl-optimization/85160
653         * combine.c (is_just_move): New function.
654         (try_combine): Allow combining two instructions into two if neither of
655         the original instructions was a move.
657 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
659         PR target/86673
660         * doc/extend.texi (Global Register Variables): Discourage use of type
661         qualifiers.
662         (Local Register Variables): Likewise.
664 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
666         PR tree-optimization/86506
667         * hwint.h (ceil_log2): Resync with hwint.c implementation.
669 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
671         PR target/86547
672         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
673         hard_regno, make sure no insn between `from` and `to` clobbers it.
675 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
676             Tom de Vries  <tdevries@suse.de>
678         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
679         (PTX_DEFAULT_RUNTIME_DIM): ... this.
680         (nvptx_goacc_validate_dims): Set default worker and gang dims to
681         PTX_DEFAULT_RUNTIME_DIM.
682         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
684 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
686         * config/pa/pa.c (pa_output_addr_vec): Align address table.
687         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
688         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
690 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
692         * config/rs6000/constraints.md (wG constraint): Delete, no longer
693         used.
694         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
695         predicate to reflect toc fusion has been deleted.
696         (toc_fusion_mem_raw): Delete, no longer used.
697         (toc_fusion_mem_wrapped): Likewise.
698         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
699         fusion mask bit.
700         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
701         Delete, no longer used.
702         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
703         meant to be used for toc fusion.
704         (rs6000_debug_print_mode): Delete toc fusion debugging.
705         (rs6000_debug_reg_global): Likewise.
706         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
707         fusion and secondary reload support that were never used.
708         (rs6000_option_override_internal): Delete TOC fusion, that was only
709         partially defined, and it did not work unless you also used the
710         -mcmodel= switch.
711         (rs6000_legitimate_address_p): Delete TOC fusion support.
712         (rs6000_opt_masks): Likewise.
713         (fusion_wrap_memory_address): Delete function, no longer used.
714         (fusion_split_address); Delete TOC fusion support.
715         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
716         longer used with toc fusion being deleted.
717         (TARGET_TOC_FUSION_FP): Likewise.
718         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
719         UNSPEC.
720         (toc fusion spliter): Delete TOC fusion support.
721         (toc_fusionload_<mode>): Likewise.
722         (toc_fusionload_di): Likewise.
723         (fusion_gpr_load_<mode>): Delete generator function, this insn no
724         longer needs to be named.  Rename predicate to delete TOC fusion.
725         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
726         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
727         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
728         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
729         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
731 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
733         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
734         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
735         __int128 in built-in function prototypes.
736         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
737         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
739 2018-07-27  Martin Sebor  <msebor@redhat.com>
741         PR tree-optimization/86696
742         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
743         types, including enums.
744         (handle_char_store): Be prepared for the above function to fail.
746 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
748         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
749         when optimization level is lower than 2 or optimize for size.
751 2018-07-26  Martin Sebor  <msebor@redhat.com>
753         PR tree-optimization/86043
754         PR tree-optimization/86042
755         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
756         (get_string_cst_length): Rename...
757         (get_min_string_length): ...to this.  Add argument.
758         (handle_char_store): Extend to handle multi-character stores by
759         MEM_REF.
760         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
761         * tree.h (initializer_zerop): Add argument.
763 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
765         PR middle-end/86660
766         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
767         declare target to variables if they have always,{to,from,tofrom} map
768         kinds.
770 2018-07-26  Martin Liska  <mliska@suse.cz>
772         PR lto/86548
773         * lto-wrapper.c: Add linker_output as prefix
774         for ltrans_output_file.
776 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
778         PR rtl-optimization/85805
779         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
780         value for hard registers if that was written in the same mode.
782 2018-07-26  Martin Liska  <mliska@suse.cz>
784         PR gcov-profile/86536
785         * gcov.c (format_gcov): Use printf format %.*f directly
786         and do not handle special values.
788 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
790         * common/config/arc/arc-common.c (arc_option_optimization_table):
791         Update default optimizations for size.
793 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
795         * config/arc/arc.md (movsf_insn): Add short instruction selection.
796         * config/arc/constraints.md (CfZ): New constraint.
797         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
798         (subsf3_fpu): Likewise.
799         (cmpsf_fpu): Likewise.
800         (cmpsf_fpu_uneq): Likewise.
802 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
804         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
805         accesses as well.
806         (arc_is_uncached_mem_p): uncached applies to both the variable and
807         the pointer.
809 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
811         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
812         register names.
814 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
816         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
817         field "m_scopes" from vec to auto_vec.
819 2018-07-25  Martin Liska  <mliska@suse.cz>
821         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
822         return type.
824 2018-07-25  Richard Biener  <rguenther@suse.de>
826         PR debug/86654
827         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
828         special wrt context_die late.
829         (gen_subprogram_die): Re-use DIEs in local scope.
831 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
833         PR tree-optimization/86644
834         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
836 2018-07-25  Martin Liska  <mliska@suse.cz>
838         PR middle-end/86645
839         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
840         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
842 2018-07-25  Martin Liska  <mliska@suse.cz>
844         PR sanitizer/79635
845         * params.def: Explain ASan abbreviation and provide
846         a documentation link.
848 2018-07-24  Martin Sebor  <msebor@redhat.com>
850         PR tree-optimization/86622
851         PR tree-optimization/86532
852         * builtins.h (string_length): Declare.
853         * builtins.c (c_strlen): Correct handling of non-constant offsets.      
854         (check_access): Be prepared for non-constant length ranges.
855         (string_length): Make extern.
856         * expr.c (string_constant): Only handle the minor non-constant
857         array index.  Use string_constant to compute the length of
858         a generic string constant.
860 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
862         PR tree-optimization/86618
863         * tree-vect-stmts.c (vectorizable_call): Don't take the address
864         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
866 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
868         PR tree-optimization/86636
869         * json.cc (json::object::set): Fix comment.  Add assertions.
870         (json::array::append): Move here from json.h.  Add comment and an
871         assertion.
872         (json::string::string): Likewise.
873         * json.h (json::array::append): Move to json.cc.
874         (json::string::string): Likewise.
875         * optinfo-emit-json.cc
876         (optrecord_json_writer::impl_location_to_json): Assert that we
877         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
878         wrapper around it.  Expand the location once, rather than three
879         times.
880         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
881         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
882         wrappers.
883         (optrecord_json_writer::optinfo_to_json): Likewise, in four
884         places.  Fix some overlong lines.
886 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
888         * config/aarch64/aarch64-simd.md
889         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
890         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
891         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
892         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
893         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
894         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
895         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
896         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
897         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
899 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
901         PR middle-end/86627
902         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
903         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
904         and abs_d == d, do the power of two handling if profitable.
906 2018-07-24  Richard Biener  <rguenther@suse.de>
908         * match.pd: Add BIT_FIELD_REF canonicalizations.
910 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
912         PR c/86617
913         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
915 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
917         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
918         terminated STRING_CST object.
920 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
922         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
924 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
926         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
927         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
928         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
929         the elements into a register.
930         (rs6000_split_v4si_init_di_reg): Delete.
931         (rs6000_split_v4si_init): Delete.
932         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
933         (vsx_init_v4si): Rewrite as a define_expand.
935 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
937         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
938         zero_extend argument from memory): New.
940 2018-07-22  Martin Sebor  <msebor@redhat.com>
942         PR bootstrap/86621
943         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
944         diagnosing calls with unknown arguments unless -Walloca-larger-than
945         is restricted to less than PTRDIFF_MAX bytes.
947 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
949         * doc/gcov.texi (Invoking Gcov): Editorial changes.
951 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
953         * pretty-print.c (text_info::set_location): Remove redundant
954         "line_table" parameter from call to rich_location::set_range.
956 2018-07-20  Martin Sebor  <msebor@redhat.com>
958         PR middle-end/82063
959         * builtins.c (expand_builtin_alloca): Adjust.
960         * calls.c (alloc_max_size): Simplify.
961         * cgraphunit.c (cgraph_node::expand): Adjust.
962         * common.opt (larger_than_size, warn_frame_larger_than): Remove
963         variables.
964         (frame_larger_than_size): Same.
965         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
966         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
967         Initialize.
968         * doc/invoke.texi (GCC Command Options): Document option arguments.
969         Explain byte-size arguments and suffixes.
970         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
971         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
972         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
973         * doc/options.texi (UInteger): Expand.
974         (Host_Wide_Int, ByteSize): Document new properties.
975         * final.c (final_start_function_1): Include sizes in an error message.
976         * function.c (frame_offset_overflow): Same.
977         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
978         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
979         Diagnose unbounded alloca calls only for limits of less than
980         PTRDIFF_MAX.
981         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
982         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
983         for alloca(0).
984         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
985         only for limits of less than PTRDIFF_MAX.
986         * langhooks-def.h (lhd_handle_option): Change function argument
987         to HOST_WIDE_INT.
988         * langhooks.c (lhd_handle_option): Same.
989         * langhooks.h (handle_option): Same.
990         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
991         ByteSize flags.
992         (var_type, var_type_struct): Same.
993         (var_set): Handle ByteSize flag.
994         * optc-gen.awk: Add comments to output to ease debugging.  Make
995         use of HOST_WIDE_INT where appropriate.
996         * opts-gen-save.awk:  Use %lx to format unsigned long.
997         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
998         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
999         arguments.  Parse bytes-size suffixes.
1000         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1001         (enum_value_to_arg): Same.
1002         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
1003         (handle_option): Adjust.
1004         (generate_option): Change function argument to HOST_WIDE_INT.
1005         (cmdline_handle_error): Adjust.
1006         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1007         (set_option): Change function argument to HOST_WIDE_INT.
1008         (option_enabled): Handle cl_host_wide_int.
1009         (get_option_state): Handle CLVC_SIZE.
1010         (control_warning_option): Same.
1011         * opts.c (common_handle_option): Change function argument to
1012         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
1013         OPT_Wvla_larger_than_.
1014         * opts.h (enum cl_var_type): Add an enumerator.
1015         * stor-layout.c (layout_decl): Print a more meaningful warning.
1016         * toplev.c (output_stack_usage): Adjust.
1018 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
1020         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1021         call to inline_expand_builtin_string_cmp.
1022         (expand_builtin_strcmp): Likewise.
1023         (expand_builtin_strncmp): Likewise.
1024         (inline_string_cmp): Delete the last parameter, change char_type_node
1025         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1026         two operands.
1027         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1028         the inlining expansion on target where the type of the call has same or 
1029         narrower precision than unsigned char.
1031 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
1033         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1034         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1035         * common.opt (fsave-optimization-record): New option.
1036         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1037         * doc/invoke.texi (-fsave-optimization-record): New option.
1038         * dumpfile.c: Include "optinfo-emit-json.h".
1039         (struct kv_pair): Move to coretypes.h.
1040         (optgroup_options): Make non-static.
1041         (dump_context::end_scope): Call
1042         optimization_records_maybe_pop_dump_scope.
1043         * dumpfile.h (optgroup_options): New decl.
1044         * json.cc: New file.
1045         * json.h: New file.
1046         * optinfo-emit-json.cc: New file.
1047         * optinfo-emit-json.h: New file.
1048         * optinfo.cc: Include "optinfo-emit-json.h".
1049         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1050         (optinfo_enabled_p): Check optimization_records_enabled_p.
1051         (optinfo_wants_inlining_info_p): Likewise.
1052         * optinfo.h: Update comment.
1053         * profile-count.c (profile_quality_as_string): New function.
1054         * profile-count.h (profile_quality_as_string): New decl.
1055         (profile_count::quality): New accessor.
1056         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1057         and optinfo_emit_json_cc_tests.
1058         * selftest.h (selftest::json_cc_tests): New decl.
1059         (selftest::optinfo_emit_json_cc_tests): New decl.
1060         * toplev.c: Include "optinfo-emit-json.h".
1061         (compile_file): Call optimization_records_finish.
1062         (do_compile): Call optimization_records_start.
1063         * tree-ssa-live.c: Include optinfo.h.
1064         (remove_unused_scope_block_p): Retain inlining information if
1065         optinfo_wants_inlining_info_p returns true.
1067 2018-07-20  Richard Biener  <rguenther@suse.de>
1069         PR debug/86585
1070         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1071         to cover -flto-partition=none.
1073 2018-07-20  Martin Liska  <mliska@suse.cz>
1075         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1076         (get_decl_source_range): Remove unused function.
1078 2018-07-20  Richard Biener  <rguenther@suse.de>
1080         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1081         (struct vn_phi_s): Likewise.
1082         (struct vn_reference_s): Likewise.
1083         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1084         for searching the slot of an entry known to be in the hash itself.
1085         (vn_phi_hasher::equal): Likewise.
1086         (vn_reference_hasher::equal): Likewise.
1087         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1088         globals.
1089         (optimistic_info, current_info): Remove, keeping only valid_info.
1090         (vn_reference_lookup_1): Remove fallback lookup.
1091         (vn_reference_lookup_2): Likewise.
1092         (vn_nary_op_lookup_1): Likewise.
1093         (vn_phi_lookup): Likewise.
1094         (vn_nary_build_or_lookup_1): Make sure to not chain the built
1095         hash element.
1096         (vn_reference_insert): Adjust, chain the inserted hash element
1097         at last_inserted_ref.
1098         (vn_reference_insert_pieces): Likewise.
1099         (visit_reference_op_call): Likewise.
1100         (vn_nary_op_insert_into): Chain the inserted hash element at
1101         last_inserted_nary.
1102         (vn_nary_op_insert_pieces): Adjust.
1103         (vn_nary_op_insert): Likewise.
1104         (vn_nary_op_insert_stmt): Likewise.
1105         (vn_phi_insert): Adjust, chain the inserted hash element at
1106         last_inserted_phi.
1107         (process_scc): Remove clearing and copying the optimistic
1108         table.  Instead remove elements inserted during an optimistic
1109         iteration from the single table we maintain.
1110         (init_scc_vn): Adjust.
1111         (free_scc_vn): Likewise.
1112         (sccvn_dom_walker::record_cond): Likewise.
1113         (sccvn_dom_walker::after_dom_children): Likewise.
1115 2018-07-19  Martin Sebor  <msebor@redhat.com>
1117         PR tree-optimization/84047
1118         PR tree-optimization/83776
1119         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1120         (check_array_bounds): Call it.
1122 2018-07-19  Martin Sebor  <msebor@redhat.com>
1124         * align.h (align_flags): Use member initialization.
1126 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
1128         * Makefile.in (OBJS): Add optinfo.o.
1129         * coretypes.h (class symtab_node): New forward decl.
1130         (struct cgraph_node): New forward decl.
1131         (class varpool_node): New forward decl.
1132         * dump-context.h: New file.
1133         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1134         "tree-pass.h".
1135         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1136         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1137         (set_alt_dump_file): Likewise.
1138         (dump_context::~dump_context): New dtor.
1139         (dump_gimple_stmt): Move implementation to...
1140         (dump_context::dump_gimple_stmt): ...this new member function.
1141         Add the stmt to any pending optinfo, creating one if need be.
1142         (dump_gimple_stmt_loc): Move implementation to...
1143         (dump_context::dump_gimple_stmt_loc): ...this new member function.
1144         Start a new optinfo and add the stmt to it.
1145         (dump_gimple_expr): Move implementation to...
1146         (dump_context::dump_gimple_expr): ...this new member function.
1147         Add the stmt to any pending optinfo, creating one if need be.
1148         (dump_gimple_expr_loc): Move implementation to...
1149         (dump_context::dump_gimple_expr_loc): ...this new member function.
1150         Start a new optinfo and add the stmt to it.
1151         (dump_generic_expr): Move implementation to...
1152         (dump_context::dump_generic_expr): ...this new member function.
1153         Add the tree to any pending optinfo, creating one if need be.
1154         (dump_generic_expr_loc): Move implementation to...
1155         (dump_context::dump_generic_expr_loc): ...this new member
1156         function.  Add the tree to any pending optinfo, creating one if
1157         need be.
1158         (dump_printf): Move implementation to...
1159         (dump_context::dump_printf_va): ...this new member function.  Add
1160         the text to any pending optinfo, creating one if need be.
1161         (dump_printf_loc): Move implementation to...
1162         (dump_context::dump_printf_loc_va): ...this new member function.
1163         Start a new optinfo and add the stmt to it.
1164         (dump_dec): Move implementation to...
1165         (dump_context::dump_dec): ...this new member function.  Add the
1166         value to any pending optinfo, creating one if need be.
1167         (dump_context::dump_symtab_node): New member function.
1168         (dump_context::get_scope_depth): New member function.
1169         (dump_context::begin_scope): New member function.
1170         (dump_context::end_scope): New member function.
1171         (dump_context::ensure_pending_optinfo): New member function.
1172         (dump_context::begin_next_optinfo): New member function.
1173         (dump_context::end_any_optinfo): New member function.
1174         (dump_context::s_current): New global.
1175         (dump_context::s_default): New global.
1176         (dump_scope_depth): Delete global.
1177         (dumpfile_ensure_any_optinfo_are_flushed): New function.
1178         (dump_symtab_node): New function.
1179         (get_dump_scope_depth): Reimplement in terms of dump_context.
1180         (dump_begin_scope): Likewise.
1181         (dump_end_scope): Likewise.
1182         (selftest::temp_dump_context::temp_dump_context): New ctor.
1183         (selftest::temp_dump_context::~temp_dump_context): New dtor.
1184         (selftest::verify_item): New function.
1185         (ASSERT_IS_TEXT): New macro.
1186         (ASSERT_IS_TREE): New macro.
1187         (ASSERT_IS_GIMPLE): New macro.
1188         (selftest::test_capture_of_dump_calls): New test.
1189         (selftest::dumpfile_c_tests): Call it.
1190         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1191         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1192         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1193         descriptive comment.
1194         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1195         (dump_node, dump_bb): Move these unrelated decls.
1196         (class dump_manager): Add leading comment.
1197         * optinfo.cc: New file.
1198         * optinfo.h: New file.
1200 2018-07-19  Michael Collison  <michael.collison@arm.com>
1201             Richard Henderson <rth@redhat.com>
1203         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1204         (subti): Handle op1 zero.
1205         (subvti4, usub4ti4): New.
1206         (*sub<GPI>3_compare1_imm): New.
1207         (sub<GPI>3_carryinCV): New.
1208         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1209         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1211 2018-07-19  Michael Collison  <michael.collison@arm.com>
1212             Richard Henderson <rth@redhat.com>
1214         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1215         (addti3): Create simpler code if low part is already known to be 0.
1216         (addvti4, uaddvti4): New.
1217         (*add<GPI>3_compareC_cconly_imm): New.
1218         (*add<GPI>3_compareC_cconly): New.
1219         (*add<GPI>3_compareC_imm): New.
1220         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1221         handle constants within this pattern..
1222         (*add<GPI>3_compareV_cconly_imm): New.
1223         (*add<GPI>3_compareV_cconly): New.
1224         (*add<GPI>3_compareV_imm): New.
1225         (add<GPI>3_compareV): New.
1226         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1227         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1228         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1229         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1230         with 'comparison' operator.
1231         (*add<GPI>3_compareV_cconly_imm): Ditto.
1232         (*add<GPI>3_compareV_cconly): Ditto.
1233         (*add<GPI>3_compareV_imm): Ditto.
1234         (add<GPI>3_compareV): Ditto.
1235         (add<mode>3_carryinC): Ditto.
1236         (*add<mode>3_carryinC_zero): Ditto.
1237         (*add<mode>3_carryinC): Ditto.
1238         (add<mode>3_carryinV): Ditto.
1239         (*add<mode>3_carryinV_zero): Ditto.
1240         (*add<mode>3_carryinV): Ditto.
1242 2018-07-19  Michael Collison  <michael.collison@arm.com>
1243             Richard Henderson <rth@redhat.com>
1245         * config/aarch64/aarch64-modes.def (CC_V): New.
1246         * config/aarch64/aarch64-protos.h
1247         (aarch64_addti_scratch_regs): Declare
1248         (aarch64_subvti_scratch_regs): Declare.
1249         (aarch64_expand_subvti): Declare.
1250         (aarch64_gen_unlikely_cbranch): Declare
1251         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1252         for signed overflow using CC_Vmode.
1253         (aarch64_get_condition_code_1): Handle CC_Vmode.
1254         (aarch64_gen_unlikely_cbranch): New function.
1255         (aarch64_addti_scratch_regs): New function.
1256         (aarch64_subvti_scratch_regs): New function.
1257         (aarch64_expand_subvti): New function.
1259 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1261         * config/aarch64/aarch64-option-extensions.def: New entry for profile
1262         extension.
1263         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1264         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1265         extension.
1267 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1269         PR target/83009
1270         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1271         address check not strict.
1273 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1275         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1276         Umq with Umn.
1277         (store_pair_lanes<mode>): Likewise.
1278         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1279         enum value 'ADDR_QUERY_LDP_STP_N'.
1280         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1281         (aarch64_print_address_internal): Add declaration.
1282         (aarch64_print_ldpstp_address): Remove.
1283         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1284         (aarch64_print_operand): Change printing of 'y'.
1285         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1286         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1287         'true' rather than '1'.
1288         * config/aarch64/constraints.md (Uml): Likewise.
1289         (Uml): Rename to Umn.
1290         (Umq): Remove.
1292 2018-07-19  Richard Biener  <rguenther@suse.de>
1294         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1295         a trailing array.
1296         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1297         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1298         (vn_reference_hasher): Likewise.
1299         (struct vn_tables_s): Remove obstack and alloc-pool members.
1300         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1301         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1302         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1303         (vn_reference_insert_pieces): Likewise.
1304         (alloc_vn_nary_op_noinit): Adjust.
1305         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1306         (vn_phi_eq): Adjust.
1307         (shared_lookup_phiargs): Remove.
1308         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1309         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1310         (visit_reference_op_call): Likewise.
1311         (copy_nary, copy_phi, copy_reference): Remove.
1312         (process_scc): Rewind the obstack when iterating.  Do not
1313         copy the elements to valid_info but just move them from one
1314         hashtable to the other.
1315         (allocate_vn_table): Adjust.
1316         (free_vn_table): Likewise.
1317         (init_scc_vn): Likewise.
1318         (free_scc_vn): Likewise.
1320 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
1322         PR target/86560
1323         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1324         indirect_return as function type attribute.
1325         (ix86_attribute_table): Change indirect_return to function
1326         type attribute.
1327         * doc/extend.texi: Update indirect_return attribute.
1329 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
1331         * wide-int.h (widest2_int): New.
1332         * gimple-fold.c (arith_overflowed_p): Use it.
1333         * tree.h (widest2_int_cst): New.
1334         * tree-vrp.c (wide_int_binop_overflow): Rename from
1335         vrp_int_const_binop.
1336         Rewrite to work on trees.
1337         (extract_range_from_multiplicative_op_1): Abstract code to...
1338         (wide_int_range_min_max): ...here.
1339         (wide_int_range_cross_product): ...and here.
1340         (extract_range_from_binary_expr_1): Abstract overflow code to...
1341         (wide_int_range_mult_wrapping): ...here.
1342         * tree-vrp.h (wide_int_range_cross_product): New.
1343         (wide_int_range_mult_wrapping): New.
1345 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
1346             Julia Koval  <julia.koval@intel.com>
1348         * config/i386/x86-tune-costs.h (skylake_memcpy,
1349         skylake_memset): Replace rep_prefix with unrolling for size 512.
1351 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
1353         PR middle-end/86544
1354         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1355         in last stmt.
1357 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1359         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1360         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1361         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1362         previously known as "PowerPC AltiVec Built-in Functions".  Move
1363         some material to new subsubsections "PowerPC AltiVec Built-in
1364         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1365         ISA 2.07".
1366         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1367         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1368         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1369         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1371 2018-07-18  Richard Biener  <rguenther@suse.de>
1373         PR tree-optimization/86557
1374         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1375         EXACT_DIV_EXPR.
1377 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
1379         * config/s390/s390.c (s390_function_profiler): Generate CFI.
1381 2018-07-17  Jeff Law  <law@redhat.com>
1383         * config/arm/arm.c (get_label_padding): Update for recent
1384         changes to label_to_alignment.
1386         PR tree-optimization/86010
1387         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1389         * config/mips/mips.c (vr4130_align_insns): Update for recent
1390         changes to label_to_alignment.
1392         * config/frv/frv.c (frv_label_align): Update for recent changes
1393         to label_to_alignment.
1395         * config/nios2/nios2.c (nios2_label_align): Update for recent
1396         changes which dropped ALIGN_LABELS_LOG.
1398 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
1400         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1401         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1403 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
1405         * config/arc/arc.c (arc_label_align): Use align_labels instead of
1406         deprecated align_labels_log.
1408 2018-07-17  Richard Biener  <rguenther@suse.de>
1410         PR lto/86456
1411         * dwarf2out.c (init_sections_and_labels): Always generate
1412         a debug_line_str_section for early LTO debug.
1413         (dwarf2out_finish): Reset debug_line_str_hash output early.
1414         Bump counter for extra dwarf5 .debug_loc labels to not conflict
1415         with fat LTO part.
1416         (dwarf2out_early_finish): Output debug_line_str.
1418 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1420         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1421         index register on z196 or later.
1423 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
1425         * config/s390/s390.c (s390_default_align): Set default function
1426         alignment to 16.
1427         (s390_override_options_after_change): Call s390_default align.
1428         (s390_option_override_internal): Call s390_default_align.
1429         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1431 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1433         PR middle-end/86542
1434         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1435         to _looptemp_ clauses, other than the first two.
1437 2018-07-17  Martin Liska  <mliska@suse.cz>
1439         * opts.c: Do not enable OPT_falign_* for -Os.
1441 2018-07-17  Martin Liska  <mliska@suse.cz>
1443         * align.h (MAX_CODE_ALIGN): New.
1444         (MAX_CODE_ALIGN_VALUE): New.
1445         * common/config/i386/i386-common.c (ix86_handle_option):
1446         (MAX_CODE_ALIGN): Moved to align.h.
1447         * final.c (MAX_CODE_ALIGN): Likewise.
1448         * opts.c (parse_and_check_align_values):
1449         (MAX_CODE_ALIGN): Likewise.
1450         (MAX_CODE_ALIGN_VALUE): Likewise.
1452 2018-07-17  Martin Liska  <mliska@suse.cz>
1454         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1455         in order to fulfil coding style.
1456         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1457         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1458         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1459         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1460         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1461         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1462         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1463         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1464         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1466 2018-07-17  Martin Liska  <mliska@suse.cz>
1468         * align.h: New file.
1469         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1470         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1471         align_flags of label_to_alignment.
1472         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1473         class.
1474         * config/m68k/m68k.c: Do not use removed align_labels_value and
1475         align_loops_value.
1476         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1477         (LOOP_ALIGN): Likewise.
1478         (LABEL_ALIGN): Likewise.
1479         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1480         Remove not used macro.
1481         (rs6000_loop_align): Change return type to align_flags.
1482         (rs6000_loop_align_max_skip): Remove.
1483         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1484         Change return type to align_flags.
1485         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1486         Remove not used macro.
1487         (rs6000_loop_align):  Change return type to align_flags.
1488         (rs6000_loop_align_max_skip): Remove.
1489         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1490         * config/rx/rx-protos.h (rx_align_for_label): Make it
1491         static function.
1492         * config/rx/rx.c (rx_align_for_label): Change return type
1493         to align_flags.
1494         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1495         macro definitions.
1496         into align_flags class.
1497         (LABEL_ALIGN): Likewise.
1498         (LOOP_ALIGN): Likewise.
1499         * config/s390/s390.c (s390_label_align): Use align_flags
1500         class member.
1501         (s390_asm_output_function_label): Likewise.
1502         * config/sh/sh.c (sh_override_options_after_change):
1503         Use align_flags class directly without macros.
1504         (find_barrier): Likewise.
1505         (barrier_align): Likewise.
1506         (sh_loop_align): Likewise.
1507         * config/spu/spu.c (spu_option_override):
1508         Use align_flags_tuple::get_value instead of removed macros.
1509         (spu_sched_init): Likewise.
1510         * config/spu/spu.h (GTY): Likewise.
1511         * config/visium/visium.c (visium_option_override):
1512         Set "8" as default secondary alignment.
1513         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1514         in order to guarantee secondary alignment of 8.
1515         * coretypes.h: Include align.h header file.
1516         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1517         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1518         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1519         * doc/tm.texi.in: Likewise.
1520         * final.c (struct label_alignment): Remove not used structure.
1521         (LABEL_ALIGN): Change type to align_flags.
1522         (LOOP_ALIGN): Likewise.
1523         (JUMP_ALIGN): Likewise.
1524         (default_loop_align_max_skip): Remove.
1525         (default_label_align_max_skip): Likewise.
1526         (default_jump_align_max_skip): Likewise.
1527         (default_label_align_after_barrier_max_skip):
1528         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1529         (LABEL_TO_MAX_SKIP): Remove.
1530         (label_to_alignment): Return align_flags type instead of integer.
1531         (label_to_max_skip): Remove.
1532         (align_fuzz): Use align_flags type.
1533         (compute_alignments): Use align_flags type and use align_flags::max
1534         to combine multiple alignments.
1535         (grow_label_align): Grow vec instead of C array.
1536         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1537         (shorten_branches):  Use align_flags type and use align_flags::max
1538         to combine multiple alignments.
1539         (final_scan_insn_1): Remove usage of secondary alignment that comes
1540         from label alignment, but instead use proper secondary alignment
1541         which is computed in grow_label_align.
1542         * flags.h (struct align_flags_tuple): Move to align.h.
1543         (struct align_flags): Likewise.
1544         (state_align_loops): Rename to align_loops.
1545         (state_align_jumps): Rename to align_jumps.
1546         (state_align_labels): Rename to align_labels.
1547         (state_align_functions): Rename to align_functions.
1548         (align_loops_log): Remove.
1549         (align_jumps_log): Remove.
1550         (align_labels_log): Remove.
1551         (align_functions_log): Remove.
1552         (align_loops_max_skip): Remove.
1553         (align_jumps_max_skip): Remove.
1554         (align_labels_max_skip): Remove.
1555         (align_functions_max_skip): Remove.
1556         (align_loops_value): Remove.
1557         (align_jumps_value): Remove.
1558         (align_labels_value): Remove.
1559         (align_functions_value): Remove.
1560         * output.h (label_to_alignment): Change return type to align_flags.
1561         (label_to_max_skip): Remove.
1562         * target.def: Remove loop_align_max_skip, label_align_max_skip,
1563         jump_align_max_skip macros.
1564         * targhooks.h (default_loop_align_max_skip): Remove.
1565         (default_label_align_max_skip): Likewise.
1566         (default_jump_align_max_skip): Likewise.
1567         (default_label_align_after_barrier_max_skip): Remove.
1568         * toplev.c (read_log_maxskip): Use ::normalize function.
1569         (parse_N_M): Remove not used argument and also call ::normalize.
1570         (parse_alignment_opts): Do not pass unused arguments.
1571         * varasm.c (assemble_start_function): Use directly align_functions
1572         instead of removed macros.
1573         * system.h: Do not poison removed macros.
1575 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
1577         PR middle-end/86539
1578         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1579         and cond temporaries don't have reference type if iterator has
1580         pointer type.  For init use &for_pre_body instead of pre_p if
1581         for_pre_body is non-empty.
1583 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1585         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1586         double-double modes to SFmode directly directly.
1587         (trunc<mode>sf2_fprs): Delete.
1589 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1591         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1592         for conversions between IFmode and the decimal floating point modes.
1593         (init_float128_ieee): Use the correct names for conversions between
1594         KFmode and the decimal floating point modes.
1596 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
1598         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1599         for the conversions between TDmode and IFmode.
1600         (init_float128_ieee): Use more correct names for the conversions
1601         between TDmode and KFmode.
1603 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
1605         PR tree-optimization/86526
1606         * builtins.c (expand_builtin_memcmp): Formatting fixes.
1607         (inline_expand_builtin_string_cmp): Likewise.
1608         (inline_string_cmp): Likewise.  Use c_readstr instead of
1609         builtin_memcpy_read_str.  Add unit_mode temporary.
1611 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1613         PR middle-end/86528
1614         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1615         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1617 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1619         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1620         Alphabetize prototypes of built-in functions, separating out
1621         built-in functions that are listed in this section but should be
1622         described elsewhere.
1624 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
1626         PR target/86511
1627         * expmed.c (emit_store_flag): Do not emit setcc followed by a
1628         conditional move when trapping comparison was split to a
1629         non-trapping one (and vice versa).
1631 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1633         * config/s390/s390.c (s390_function_profiler): Generate nops
1634         instead of profiler call sequences.
1635         * config/s390/s390.opt: Add the new option.
1637 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1639         * config/s390/s390.c (s390_function_profiler): Generate
1640         __mcount_loc section.
1641         * config/s390/s390.opt: Add the new option.
1643 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1645         * common.opt: Add the new warning.
1646         * config/s390/s390.c (s390_function_profiler): Emit "brasl
1647         %r0,__fentry__" when -mfentry is specified.
1648         (s390_option_override_internal): Disallow -mfentry for 31-bit
1649         CPUs.
1650         * config/s390/s390.opt: Add the new option.
1652 2018-07-16  Richard Biener  <rguenther@suse.de>
1654         PR lto/86523
1655         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1656         for function-local FUNCTION_DECL and RESULT_DECL immediately.
1658 2018-07-16  Martin Liska  <mliska@suse.cz>
1660         PR ipa/86529
1661         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1662         to ::get_create.
1664 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1666         * config/arc/arcHS.md: Update ARCHS scheduling rules.
1668 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
1670         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1671         for ARCHS4x.
1672         * config/arc/arc-cpus.def (hs4x): New cpu.
1673         (hs4xd): Likewise.
1674         * config/arc/arc-tables.opt: Regenerate.
1675         * config/arc/arc.c (arc_sched_issue_rate): New function.
1676         (TARGET_SCHED_ISSUE_RATE): Define.
1677         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1678         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1679         fpu_cvt.
1680         (attr tune): Add ARCHS4x tune values.
1681         (attr tune_dspmpy): Define.
1682         (*tst): Correct instruction type.
1683         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1684         * config/arc/arcHS4x.md: New file.
1685         * config/arc/fpu.md: Update instruction type attributes.
1686         * config/arc/t-multilib: Regenerate.
1688 2018-07-16  Tom de Vries  <tdevries@suse.de>
1690         PR debug/86455
1691         * var-tracking.c (vt_initialize): Fix pre_dec handling.
1693 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1695         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1696         early clobber.
1698 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
1700         PR tree-optimization/86514
1701         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1702         conversion to a boolean type from a type with greater precision.
1704 2018-07-16  Tom de Vries  <tdevries@suse.de>
1706         * var-tracking.c (vt_initialize): Print adjusted insn slim if
1707         dump_flags request TDF_SLIM.
1709 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
1711         * fold-const.c (int_const_binop_1): Abstract...
1712         (wide_int_binop): ...wide int code here.
1713         (poly_int_binop): ...poly int code here.
1714         Abstract the rest of int_const_binop_1 into int_const_binop.
1715         * fold-const.h (wide_int_binop): New.
1716         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1717         Remove useless PLUS/MINUS_EXPR case.
1718         (zero_nonzero_bits_from_vr): Move wide int code...
1719         (zero_nonzero_bits_from_bounds): ...here.
1720         (extract_range_from_binary_expr_1): Move mask optimization code...
1721         (range_easy_mask_min_max): ...here.
1722         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1723         (range_easy_mask_min_max): New.
1725 2018-07-15  Jeff Law  <law@redhat.com>
1727         PR target/85993
1728         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1729         block.
1731 2018-07-14  Jim Wilson  <jimw@sifive.com>
1733         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1735 2018-07-14  Paul Koning  <ni1d@arrl.net>
1737         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1739 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
1741         * lto-streamer-out.c (copy_function_or_variable): Dump info about
1742         copying section.
1744 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
1745             Steve Munroe  <munroesj52@gmail.com>
1747         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1748         (_mm_andnot_si128): Likewise.
1749         (_mm_or_si128): Likewise.
1750         (_mm_xor_si128): Likewise.
1752 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
1754         PR middle-end/78809
1755         * builtins.c (expand_builtin_memcmp): Inline the calls first
1756         when result_eq is false.
1757         (expand_builtin_strcmp): Inline the calls first.
1758         (expand_builtin_strncmp): Likewise.
1759         (inline_string_cmp): New routine. Expand a string compare
1760         call by using a sequence of char comparison.
1761         (inline_expand_builtin_string_cmp): New routine. Inline expansion
1762         a call to str(n)cmp/memcmp.
1763         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1764         New option.
1765         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1767 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
1769         * config/arm/driver-arm.c: Include arm-native.h.
1770         (host_detect_local_cpu): Use auto-generated data tables.
1771         (vendors, arm_cpu_table): Delete.  Move part information to ...
1772         * config/arm/arm-cpus.in: ... here.
1773         * config/arm/parsecpu.awk (gen_native): New function.
1774         (vendor, part): New CPU fields.
1775         (END): Add support for building the native CPU detection tables.
1776         * config/arm/t-arm (arm-native.h): Add build rule.
1777         (driver-arm.o): Add dependency on arm-native.h.
1779 2018-07-13  Richard Biener  <rguenther@suse.de>
1781         PR middle-end/85974
1782         * match.pd (addr1 - addr2): Allow either of the operand to
1783         have a conversion.
1785 2018-07-13  Tom de Vries  <tdevries@suse.de>
1787         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1788         in remap_ssa_name.
1790 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
1792         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1793         arrays instead of numbered variables.
1795 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
1797         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1798         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1800 2018-07-13  Richard Biener  <rguenther@suse.de>
1802         PR debug/86452
1803         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1804         instead of get_context_die.
1806 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
1807             Richard Biener  <rguenther@suse.de>
1809         PR middle-end/86489
1810         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1811         that the loop latch destination where phi is defined.
1813 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
1815         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1816         (riscv_expand_epilogue): Add assertion to check interrupt mode.
1817         (riscv_set_current_function): Extract getting interrupt type to new
1818         function.
1819         (riscv_get_interrupt_type): New function.
1820         (riscv_merge_decl_attributes): New function, checking interrupt type is
1821         same.
1822         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1824 2018-07-12  Paul Koning  <ni1d@arrl.net>
1826         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1827         directive.
1829 2018-07-12  Paul Koning  <ni1d@arrl.net>
1831         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1832         zero reference, add doloop_end instead.
1833         * doc/md.texi (decrement_and_branch_until_zero): Remove.
1834         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
1835         detail for doloop_end.
1837 2018-07-12  Martin Sebor  <msebor@redhat.com>
1839         PR c/86453
1840         * attribs.c (decl_attributes): Reject conflicting attributes before
1841         calling attribute handlers.
1843 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1845         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1846          parameter.
1847         (gcc::dump_manager::get_dump_file_name): likewise.
1848         (dump_begin): Likewise.
1849         * dumpfile.h (dump_begin): Update prototype.
1850         (gcc::dump_manager::get_dump_file_name,
1851         gcc::dump_manager::get_dump_file_name): Update prototype.
1853 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1855         * internal-fn.h (vectorizable_internal_fn_p): New function.
1856         * tree-vect-slp.c (compatible_calls_p): Likewise.
1857         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
1858         to internal functions.
1859         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1861 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1863         * fold-const.h (inverse_conditions_p): Declare.
1864         * fold-const.c (inverse_conditions_p): New function.
1865         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
1866         that test the inverse condition of a conditional internal function.
1867         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1868         * internal-fn.c (internal_fn_mask_index): Handle conditional
1869         internal functions.
1870         (vectorized_internal_fn_supported_p): New function.
1871         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1872         (any_pred_load_store): Replace with...
1873         (need_to_predicate): ...this new variable.
1874         (redundant_ssa_names): New variable.
1875         (ifcvt_can_use_mask_load_store): Move initial checks to...
1876         (ifcvt_can_predicate): ...this new function.  Handle tree codes
1877         for which a conditional internal function exists.
1878         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1879         instead of ifcvt_can_use_mask_load_store.  Update after variable
1880         name change.
1881         (predicate_load_or_store): New function, split out from
1882         predicate_mem_writes.
1883         (check_redundant_cond_expr): New function.
1884         (value_available_p): Likewise.
1885         (predicate_rhs_code): Likewise.
1886         (predicate_mem_writes): Rename to...
1887         (predicate_statements): ...this.  Use predicate_load_or_store
1888         and predicate_rhs_code.
1889         (combine_blocks, tree_if_conversion): Update after above name changes.
1890         (ifcvt_local_dce): Handle redundant_ssa_names.
1891         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1892         general conditional functions.
1893         * tree-vect-stmts.c (vectorizable_call): Likewise.
1895 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1896             Alan Hayward  <alan.hayward@arm.com>
1897             David Sherwood  <david.sherwood@arm.com>
1899         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1900         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1901         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1902         plus and minus and convert them into IFN_COND_FMA-based sequences.
1903         (convert_mult_to_fma): Handle conditional plus and minus.
1905 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1907         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1908         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1909         (cond_fnms_optab): New optabs.
1910         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1911         internal functions.
1912         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1913         * internal-fn.h (get_conditional_internal_fn): Declare.
1914         (get_unconditional_internal_fn): Likewise.
1915         * internal-fn.c (cond_ternary_direct): New macro.
1916         (expand_cond_ternary_optab_fn): Likewise.
1917         (direct_cond_ternary_optab_supported_p): Likewise.
1918         (FOR_EACH_COND_FN_PAIR): Likewise.
1919         (get_conditional_internal_fn): New function.
1920         (get_unconditional_internal_fn): Likewise.
1921         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1922         (gimple_match_op::gimple_match_op): Add a new overload for 5
1923         operands.
1924         (gimple_match_op::set_op): Likewise.
1925         (gimple_resimplify5): Declare.
1926         * genmatch.c (decision_tree::gen): Generate simplifications for
1927         5 operands.
1928         * gimple-match-head.c (gimple_simplify): Define an overload for
1929         5 operands.  Handle calls with 5 arguments in the top-level overload.
1930         (convert_conditional_op): Handle conversions from unconditional
1931         internal functions to conditional ones.
1932         (gimple_resimplify5): New function.
1933         (build_call_internal): Pass a fifth operand.
1934         (maybe_push_res_to_seq): Likewise.
1935         (try_conditional_simplification): Try converting conditional
1936         internal functions to unconditional internal functions.
1937         Handle 3-operand unconditional forms.
1938         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1939         Define ternary equivalents of the current rules for binary conditional
1940         internal functions.
1941         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1942         ternary operations.
1943         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1944         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1945         (optab): Handle them.
1946         (SVE_COND_FP_TERNARY): New int iterator.
1947         (sve_fmla_op, sve_fmad_op): New int attributes.
1948         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1949         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1950         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1952 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
1954         * target.def (preferred_else_value): New target hook.
1955         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1956         * doc/tm.texi: Regenerate.
1957         * targhooks.h (default_preferred_else_value): Declare.
1958         * targhooks.c (default_preferred_else_value): New function.
1959         * internal-fn.h (conditional_internal_fn_code): Declare.
1960         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1961         (get_conditional_internal_fn): Use it.
1962         (conditional_internal_fn_code): New function.
1963         * gimple-match.h (gimple_match_cond): New struct.
1964         (gimple_match_op): Add a cond member function.
1965         (gimple_match_op::gimple_match_op): Update all forms to take a
1966         gimple_match_cond.
1967         * genmatch.c (expr::gen_transform): Use the same condition as res_op
1968         for the suboperation, but don't specify a particular else_value.
1969         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1970         (visit_nary_op, visit_reference_op_load): Pass
1971         gimple_match_cond::UNCOND to the gimple_match_op constructor.
1972         * gimple-match-head.c: Include tree-eh.h
1973         (convert_conditional_op): New function.
1974         (maybe_resimplify_conditional_op): Likewise.
1975         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1976         (gimple_resimplify2): Likewise.
1977         (gimple_resimplify3): Likewise.
1978         (gimple_resimplify4): Likewise.
1979         (maybe_push_res_to_seq): Return null for conditional operations.
1980         (try_conditional_simplification): New function.
1981         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
1982         constructor.
1983         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1984         IFN_COND_* call.
1985         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1986         function.
1987         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1989 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
1991         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1992         DECL_FCONTEXT
1993         (hash_tree): Do not hash DECL_FCONTEXT
1994         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1995         Do not stream DECL_FCONTEXT.
1996         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1997         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1999 2018-07-12  Richard Biener  <rguenther@suse.de>
2001         PR debug/86462
2002         * dwarf2out.c (gen_block_die): Only output blocks when they have
2003         at least one !DECL_IGNORED_P variable.
2005 2018-07-12  Richard Biener  <rguenther@suse.de>
2007         PR target/84829
2008         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2009         Remove -mieee-fp handling.
2011 2018-07-12  Richard Biener  <rguenther@suse.de>
2013         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2014         left-over from last patch.
2016 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
2018         PR tree-optimization/86492
2019         * gimple-ssa-store-merging.c
2020         (imm_store_chain_info::coalesce_immediate_stores): Call
2021         check_no_overlap even for the merge_overlapping case.  Formatting fix.
2023 2018-07-12  Richard Biener  <rguenther@suse.de>
2025         PR middle-end/86479
2026         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2027         move possibly trapping operations into the conditional.
2029 2018-07-12  Richard Biener  <rguenther@suse.de>
2031         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2032         (vn_lookup_simplify_result): Remove recursion limit applied
2033         here.
2034         (vn_nary_build_or_lookup_1): Adjust.
2035         (try_to_simplify): Likewise.
2036         * gimple-match-head.c (gimple_resimplify1): Instead apply one
2037         here.
2038         (gimple_resimplify2): Likewise.
2039         (gimple_resimplify3): Likewise.
2040         (gimple_resimplify4): Likewise.
2042 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
2044         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2045         Use __mmask64 type instead of __mmask8 for __M argument.
2046         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2047         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2048         __U argument.
2049         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2050         __mmask16 for __M argument.
2051         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2052         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2053         to __mmask16 instead of __mmask8.
2054         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2055         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2056         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2057         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2058         instead of __mmask16 for __U argument.
2059         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2060         __mmask16 instead of __mmask8 for __U argument.
2061         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2062         __U argument.
2063         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2064         __mmask16.
2065         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2066         argument.
2067         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2068         __U argument.
2069         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2070         __mmask16.
2071         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2072         of __mmask16.
2073         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2074         __U argument.
2075         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2076         __U argument.
2077         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2078         __U argument.
2079         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2080         __U argument.
2081         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2082         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2083         return type as well as __M argument type and all casts from __mmask8
2084         to __mmask32.
2085         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2086         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2087         return type as well as __M argument type and all casts from __mmask8
2088         to __mmask16.
2089         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2090         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2091         return type as well as __M argument type and all casts from __mmask8
2092         to __mmask32.
2093         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2094         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2095         return type as well as __M argument type and all casts from __mmask8
2096         to __mmask16.
2097         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2098         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2099         __mmask16.
2101 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
2103         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2104         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2105         for __U argument.
2107 2018-07-11  Paul Koning  <ni1d@arrl.net>
2109         * doc/md.texi (define_subst): Document how multiple occurrences of
2110         the same argument in the replacement pattern are handled.
2112 2018-07-11  Paul Koning  <ni1d@arrl.net>
2114         * doc/extend.texi (Common Variable Attributes): Move "mode" into
2115         alphabetical order.
2116         (Common Type Attributes): Add "mode" attribute.
2118 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
2120         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2121         stream DECL_ORIGINAL_TYPE.
2122         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2123         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2124         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2125         Do not walk original type.
2126         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2127         external decls.
2128         (write_ts_decl_non_common_tree_pointers): Do not stream
2129         DECL_ORIGINAL_TYPE
2130         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2131         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2133 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2135         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2136         thread twice from the same starting edge.
2138 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
2140         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2141         * gimple.c (gimple_call_nonnull_result_p): ...here...
2142         (gimple_call_nonnull_arg): ...and here.
2143         * gimple.h (gimple_call_nonnull_result_p): New.
2144         (gimple_call_nonnull_arg): New.
2146 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
2148         * config/arm/arm-cpus.in: Move information from fpu field of each
2149         cpu definition to the isa field.
2150         * config/arm/parsecpu.awk (fpu): Delete match rule.
2151         (gen_comm_data): Don't add bits from the CPU's FPU entry.
2153 2018-07-11  Richard Biener  <rguenther@suse.de>
2155         PR debug/86457
2156         * dwarf2out.c (init_sections_and_labels): Use
2157         output_asm_line_debug_info consistently.
2158         (dwarf2out_early_finish): Likewise.
2159         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2160         type units.
2162 2018-07-11  Richard Biener  <rguenther@suse.de>
2164         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2165         Rework father_bb setting in a way to avoid propagating constants
2166         multiple times on a loop body.
2168 2018-07-10  Mark Wielaard  <mark@klomp.org>
2170         PR debug/86459
2171         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2173 2018-07-10  Richard Biener  <rguenther@suse.de>
2175         * hash-map.h (hash_map::iterator::operator*): Return
2176         references to key and value.
2178 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
2180         PR c++/86443
2181         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2182         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2183         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2184         (gimplify_omp_for): For composite loops, move outer
2185         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2186         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
2187         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
2188         TREE_LIST for both the original class iterator and the "last" helper
2189         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
2190         loop, remember has_decl_expr from outer composite loops for the
2191         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2193 2018-07-09  Martin Sebor  <msebor@redhat.com>
2195         PR middle-end/77357
2196         PR middle-end/86428
2197         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2198         accessing implicitly initialized array elements.
2199         * expr.c (string_constant): Handle string initializers of
2200         character arrays within aggregates.
2201         * gimple-fold.c (fold_array_ctor_reference): Add argument.
2202         Store element offset.  As a special case, handle zero size.
2203         (fold_nonarray_ctor_reference): Same.
2204         (fold_ctor_reference): Add argument.  Store subobject offset.
2205         * gimple-fold.h (fold_ctor_reference): Add argument.
2207 2018-07-09  Paul Koning  <ni1d@arrl.net>
2209         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2210         (pdp11_insn_cost): New function.
2211         (pdp11_md_asm_adjust): New function.
2212         (TARGET_INVALID_WITHIN_DOLOOP): Define.
2213         (pdp11_rtx_costs): Update to match machine better.
2214         (output_addr_const_pdp11): Correct format mismatch warnings.
2215         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2216         * config/pdp11/pdp11.md: General change to add base_cost and/or
2217         length attributes for use by new pdp11_insn_cost function.
2218         (MIN_BRANCH): Correct definition.
2219         (MIN_SOB): Ditto.
2220         (doloop_end): Use standard pattern name for looping pattern.
2221         (doloop_end_nocc): New.
2222         (movsf): Add another constraint alternative.
2223         (zero_extendqihi2): Add constraint alternatives for not in place
2224         extend.
2225         (zero_extendhisi2): Remove.
2226         (shift patterns): Add CC handling variants.
2227         (bswaphi2): New.
2228         (bswapsi2): New.
2229         (rothi3): New.
2230         (define_peephole2): New peephole to recognize mov that sets CC for
2231         subsequent test.
2233 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2235         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2236         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2237         wi::add.
2239 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
2241         PR c/86420
2242         * real.c (real_nextafter): Return true if result is denormal.
2244 2018-07-09  Martin Liska  <mliska@suse.cz>
2246         * common.opt: Add back wrongly removed attribute.
2248 2018-07-09  Richard Biener  <rguenther@suse.de>
2250         PR debug/86413
2251         * dwarf2out.c (gen_block_die): For an early generated DIE
2252         always output high/low PC attributes.
2254 2018-07-09  Tom de Vries  <tdevries@suse.de>
2256         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2257         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2258         onto VAR_DECL with abstract origin.
2260 2018-07-07  Jim Wilson  <jimw@sifive.com>
2262         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2264 2018-07-07  Tom de Vries  <tdevries@suse.de>
2266         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2268 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
2270         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2271         overflow_type.
2272         (combine_bound): Use wide-int overflow calculation instead of
2273         rolling our own.
2274         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2275         overflow_type.
2276         * fold-const.c (int_const_binop_2): Same.
2277         (extract_muldiv_1): Same.
2278         (fold_div_compare): Same.
2279         (fold_abs_const): Same.
2280         * match.pd: Same.
2281         * poly-int.h (add): Same.
2282         (sub): Same.
2283         (neg): Same.
2284         (mul): Same.
2285         * predict.c (predict_iv_comparison): Same.
2286         * profile-count.c (slow_safe_scale_64bit): Same.
2287         * simplify-rtx.c (simplify_const_binary_operation): Same.
2288         * tree-chrec.c (tree_fold_binomial): Same.
2289         * tree-data-ref.c (split_constant_offset_1): Same.
2290         * tree-if-conv.c (idx_within_array_bound): Same.
2291         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2292         * tree-ssa-phiopt.c (minmax_replacement): Same.
2293         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2294         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2295         * vr-values.c (vr_values::adjust_range_with_scev): Same.
2296         * wide-int.cc (wi::add_large): Same.
2297         (wi::mul_internal): Same.
2298         (wi::sub_large): Same.
2299         (wi::divmod_internal): Same.
2300         * wide-int.h: Change overflow type to overflow_type for neg, add,
2301         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2302         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2303         mul_internal, divmod_internal.
2304         (overflow_type): New enum.
2305         (accumulate_overflow): New.
2307 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
2309         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2310         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2312 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2314         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2315         argument is checked for zero before entering loop, avoid checking again.
2317 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
2319         * gimplify.h (generic_expr_could_trap_p): Set as global function.
2320         * gimplify.h (generic_expr_could_trap_p): Likwise.
2321         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2323 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
2325         PR tree-optimization/86401
2326         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2327         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2328         (fold_bit_and_mask): ... here.  New helper function for match.pd.
2329         * fold-const.h (fold_bit_and_mask): Declare.
2330         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2332 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
2334         PR target/86324
2335         * target.def (translate_mode_attribute): New hook.
2336         * targhooks.h (default_translate_mode_attribute): Declare.
2337         * targhooks.c (default_translate_mode_attribute): New function.
2338         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2339         * doc/tm.texi: Regenerate.
2340         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2341         (rs6000_translate_mode_attribute): New function.
2343 2018-07-06  Paul Koning  <ni1d@arrl.net>
2345         * doc/md.texi (define_split): Document DONE and FAIL.
2346         (define_peephole2): Ditto.
2348 2018-07-05  Jeff Law  <law@redhat.com>
2350         PR tree-optimization/86010
2351         * tree-ssa-dse.c (compute_trims): More aggressively trim at
2352         both the head and tail of mem* and str* calls.
2354 2018-07-05  Jim Wilson  <jimw@sifive.com>
2356         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2358 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
2360         * config/aarch64/aarch64-simd.md: correct flags text for
2361         MIN_EXPR replacement.
2363 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
2365         * configure: Regenerated.
2367 2018-07-05  Carl Love  <cel@us.ibm.com>
2369         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2370         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2371         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2372         VSX_BUILTIN_DOUBLEL_V4SF.
2374 2018-07-05  Martin Sebor  <msebor@redhat.com>
2376         PR c++/86400
2377         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2378         than its domain to compute its the upper bound of a char array.
2380 2018-07-05  Nathan Sidwell  <nathan@acm.org>
2382         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2383         * doc/cpp.texi: Update comment.
2384         * doc/tm.texi: Rebuilt.
2385         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2386         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2387         * doc/extend.texi (Backwards Compatibility): Clarify it is system
2388         headers affected by extern "C".
2389         * system.h: Poison NO_IMPLICIT_EXTERN_C.
2390         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2391         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2392         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2393         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2394         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2395         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2396         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2397         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2398         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2399         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2400         config/sparc/sp64-elf.h, config/spu/spu.h,
2401         config/stormy16/stormy16.h, config/v850/v850.h,
2402         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2403         define NO_IMPLICIT_EXTERN_C.
2404         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2406 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2408         PR target/84711
2409         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2410         instead of GET_MODE_SIZE when comparing Units.
2412 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2414         PR target/84711
2415         * rtlanal.c (set_noop_p): Constrain on mode change,
2416         include hard-reg-set.h
2418 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
2420         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2422 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
2424         Revert
2425         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2427         PR sanitizer/84250
2428         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2429         libasan.
2430         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2432 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
2434         PR sanitizer/84250
2435         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2436         libasan.
2437         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2439 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
2441         PR middle-end/86380
2442         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2444 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
2446         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2447         neg_*_op* variables.
2449 2018-07-04  Martin Liska  <mliska@suse.cz>
2451         * tree-switch-conversion.c: Define
2452         max_ratio_for_speed and max_ratio_for_size constants.
2454 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2455             Martin Liska  <mliska@suse.cz>
2457         PR middle-end/66240
2458         PR target/45996
2459         PR c/84100
2460         * common.opt: Rename align options with 'str_' prefix.
2461         * common/config/i386/i386-common.c (set_malign_value): New
2462         function.
2463         (ix86_handle_option): Use it to set -falign-* options/
2464         * config/aarch64/aarch64-protos.h (struct tune_params): Change
2465         type from int to string.
2466         * config/aarch64/aarch64.c: Update default values from int
2467         to string.
2468         * config/alpha/alpha.c (alpha_override_options_after_change):
2469         Likewise.
2470         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2471         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2472         max skip conditionally.
2473         * config/i386/freebsd.h (SUBALIGN_LOG): New.
2474         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2475         max skip conditionally.
2476         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2477         max skip conditionally.
2478         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2479         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2480         max skip conditionally.
2481         * config/i386/i386.c (struct ptt): Change type from int to
2482         string.
2483         (ix86_default_align): Set default values.
2484         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2485         max skip conditionally.
2486         * config/i386/iamcu.h (SUBALIGN_LOG): New.
2487         (ASM_OUTPUT_MAX_SKIP_ALIGN):
2488         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2489         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2490         max skip conditionally.
2491         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2492         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2493         * config/i386/x86-64.h (SUBALIGN_LOG): New.
2494         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2495         max skip conditionally.
2496         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2497         * config/ia64/ia64.c (ia64_option_override): Set default values
2498         for alignment options.
2499         * config/m68k/m68k.c: Handle new str_align_* options.
2500         * config/mips/mips.c (mips_set_compression_mode): Change
2501         type of constants.
2502         (mips_option_override): Set default values for options.
2503         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2504         Likewise.
2505         * config/rs6000/rs6000.c (rs6000_option_override_internal):
2506         Likewise.
2507         * config/rx/rx.c (rx_option_override): Likewise.
2508         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2509         (LABEL_ALIGN): Use align_labels_log.
2510         (LOOP_ALIGN): Use align_loops_align.
2511         * config/s390/s390.c (s390_asm_output_function_label): Use new
2512         macros.
2513         * config/sh/sh.c (sh_override_options_after_change):
2514         Change type of constants.
2515         * config/spu/spu.c (spu_sched_init): Likewise.
2516         * config/sparc/sparc.c (sparc_option_override): Set default
2517         values for options.
2518         * config/visium/visium.c (visium_option_override): Likewise.
2519         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2520         emit p2align format with last argument if it's not needed.
2521         * doc/invoke.texi: Document extended format of -falign-*.
2522         * final.c: Use align_labels alignment.
2523         * flags.h (struct target_flag_state): Change type to use
2524         align_flags.
2525         (struct align_flags_tuple): New.
2526         (struct align_flags): Likewise.
2527         (align_loops_log): Redefine macro to use new types.
2528         (align_loops_max_skip): Redefine macro to use new types.
2529         (align_jumps_log): Redefine macro to use new types.
2530         (align_jumps_max_skip): Redefine macro to use new types.
2531         (align_labels_log): Redefine macro to use new types.
2532         (align_labels_max_skip): Redefine macro to use new types.
2533         (align_functions_log): Redefine macro to use new types.
2534         (align_loops): Redefine macro to use new types.
2535         (align_jumps): Redefine macro to use new types.
2536         (align_labels): Redefine macro to use new types.
2537         (align_functions): Redefine macro to use new types.
2538         (align_functions_max_skip): Redefine macro to use new types.
2539         (align_loops_value): New macro.
2540         (align_jumps_value): New macro.
2541         (align_labels_value): New macro.
2542         (align_functions_value): New macro.
2543         * function.c (invoke_set_current_function_hook): Propagate
2544         alignment values from flags to global variables default in
2545         topleev.h.
2546         * ipa-icf.c (sem_function::equals_wpa): Use
2547         cl_optimization_option_eq instead of memcmp.
2548         * lto-streamer.h (cl_optimization_stream_out): Support streaming
2549         of string types.
2550         (cl_optimization_stream_in): Likewise.
2551         * optc-save-gen.awk: Support strings in cl_optimization.
2552         * opth-gen.awk: Likewise.
2553         * opts.c (finish_options): Remove error checking of invalid
2554         value ranges.
2555         (MAX_CODE_ALIGN): Remove.
2556         (MAX_CODE_ALIGN_VALUE): Likewise.
2557         (parse_and_check_align_values): New function.
2558         (check_alignment_argument): Likewise.
2559         (common_handle_option): Use check_alignment_argument.
2560         * opts.h (parse_and_check_align_values): Declare.
2561         * toplev.c (init_alignments): Remove.
2562         (read_log_maxskip): New.
2563         (parse_N_M): Likewise.
2564         (parse_alignment_opts): Likewise.
2565         (backend_init_target): Remove usage of init_alignments.
2566         * toplev.h (parse_alignment_opts): Declare.
2567         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2568         argument.
2569         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2570         * tree.c (cl_option_hasher::equal): New.
2571         * varasm.c: Use new global macros.
2573 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
2575         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2576         Use a simpler align directive also if MAXSKIP = ALIGN-1.
2577         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2578         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2579         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2580         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2581         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2582         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2583         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2584         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2585         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2586         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2587         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2589 2018-07-04  Martin Liska  <mliska@suse.cz>
2590             Jonathan Wakely  <jwakely@redhat.com>
2592         * coverage.c: Use correct type.
2593         * doc/invoke.texi: Language correction.
2595 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
2597         PR target/85620
2598         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2599         ENDBRANCH for non-tail call which may return via indirect branch.
2600         * doc/extend.texi: Document indirect_return attribute.
2602 2018-07-03  Martin Sebor  <msebor@redhat.com>
2604         PR tree-optimization/86274
2605         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2606         precondition.
2607         (format_floating): Correct handling of infinities and NaNs.
2609 2018-07-03  Martin Sebor  <msebor@redhat.com>
2611         * print-tree.c (print_real_cst): New function.
2612         (print_node_brief): Call it.
2613         (print_node): Ditto.
2615 2018-07-03  Jeff Law  <law@redhat.com>
2617         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2618         into a single pattern.
2620         * config/h8300/h8300.md (ors code_iterator): New.
2621         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2622         a single pattern and single splitter.
2623         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2624         (iorqi3_1, xorqi3_1): Likewise.
2625         (iorqi3, xorqi3 expanders): Similarly.
2627         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2628         (movmd_internal) into a single pattern using the P mode iterator.
2629         (movmd splitters): Similarly.
2630         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2631         (movsd splitters): Similarly.
2633         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2634         ADDB, ADDW and ADDL into a single ADD attribute which selects the
2635         right table based on the size of the operand.
2636         * config/h8300/h8300.md (length_table): Corresponding changes. All
2637         references to "addb", "addw" and "addl" changed to "add".
2638         (btst patterns): Merge two variants into a single pattern.
2639         (tstqi, tsthi): Likewise.
2640         (addhi3_incdec, addsi3_incdec): Likewise.
2641         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2642         (mulhi3, mulsi3): Likewise.
2643         (udivhi3, udivsi3): Likewise.
2644         (divhi3, divsi3): Likewise.
2645         (andorqi3, andorhi3, andorsi3): Likewise.
2647 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
2649         PR target/85694
2650         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2651         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2653 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2655         PR tree-optimization/85694
2656         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2657         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2658         UNSPEC_URHADD.
2659         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2660         (<u>avg<mode>3_ceil): New patterns.
2662 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
2664         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2665         scan-tree-dump directive.
2666         * gcc.dg/vect/slp-perm-2.c: Likewise.
2667         * gcc.dg/vect/slp-perm-3.c: Likewise.
2668         * gcc.dg/vect/slp-perm-5.c: Likewise.
2669         * gcc.dg/vect/slp-perm-6.c: Likewise.
2670         * gcc.dg/vect/slp-perm-7.c: Likewise.
2671         * gcc.dg/vect/slp-perm-8.c: Likewise.
2673 2018-07-03  Marek Polacek  <polacek@redhat.com>
2675         PR middle-end/86202
2676         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2678 2018-07-03  Richard Biener  <rguenther@suse.de>
2680         PR ipa/86389
2681         * tree-ssa-structalias.c (find_func_clobbers): Properly
2682         handle indirect calls.
2684 2018-07-03  Jeff Law  <law@redhat.com>
2686         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2687         (shifts): New code iterator.
2688         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2689         expander.  Fix HImode handling on H8/SX.
2690         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2691         (subqi3, subhi3, subsi3 expanders): Likewise.
2692         (andqi3, andhi3, andsi3 expanders): Likewise.
2693         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2694         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2695         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2696         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2697         (zero_extendqihi2, zero_extendqisi2): Likewise.
2698         (extendqihi2, extendqisi2): Likewise.
2699         (rotlqi3, rotlhi3, rotlsi3): Likewise.
2700         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2701         (rotlqi3_1, rotlhi3_1): Likewise.
2702         (logicalhi3_sn, logicalsi3_sn): Likewise.
2703         (logicalhi3, logicalsi3): Likewise.
2705 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2707         * tree-vect-patterns.c (vect_recog_rotate_pattern)
2708         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2709         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2710         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2711         type to append_pattern_def_seq instead of creating a stmt_vec_info
2712         directly.
2713         (build_mask_conversion): Likewise.  Remove vinfo argument.
2714         (vect_add_conversion_to_patterm): Likewise, renaming to...
2715         (vect_add_conversion_to_pattern): ...this.
2716         (vect_recog_mask_conversion_pattern): Update call to
2717         build_mask_conversion.  Pass the vector type to
2718         append_pattern_def_seq here too.
2719         (vect_recog_gather_scatter_pattern): Update call to
2720         vect_add_conversion_to_pattern.
2722 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2724         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2725         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2726         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2727         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2728         STMT_VINFO_PATTERN_DEF_SEQ to null here.
2729         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2730         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2731         append_pattern_def_seq instead of new_pattern_def_seq.
2732         (vect_recog_divmod_pattern): Do both of the above.
2733         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2734         is null.
2736 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2738         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2739         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2740         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2741         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2742         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2743         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2744         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2745         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2746         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2747         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2748         parameter with a single stmt_vec_info.
2749         (vect_recog_func_ptr): Likewise.
2750         (vect_recog_gather_scatter_pattern): Likewise, folding in...
2751         (vect_try_gather_scatter_pattern): ...this.
2752         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2753         the stmt_vec_info of the statement to be matched.  Don't clear
2754         STMT_VINFO_RELATED_STMT.
2755         (vect_pattern_recog): Update call accordingly.
2757 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2759         PR tree-optimization/85694
2760         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2761         (uavgM3_ceil): Document new optabs.
2762         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2763         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2764         functions.
2765         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2766         (savg_ceil_optab): New optabs.
2767         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2768         (vect_vect_recog_func_ptrs): Add it.
2769         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2770         constant directly from the associated lhs.
2772 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2774         * tree-vect-patterns.c (vect_split_statement): New function.
2775         (vect_convert_input): Use it to try to split an existing cast.
2777 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2779         * poly-int.h (print_hex): New function.
2780         * dumpfile.h (dump_dec, dump_hex): Declare.
2781         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2782         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2783         min_input_precision, operation_precision and operation_sign.
2784         * tree-vect-patterns.c (vect_get_range_info): New function.
2785         (vect_same_loop_or_bb_p, vect_single_imm_use)
2786         (vect_operation_fits_smaller_type): Delete.
2787         (vect_look_through_possible_promotion): Add an optional
2788         single_use_p parameter.
2789         (vect_recog_over_widening_pattern): Rewrite to use new
2790         stmt_vec_info infomration.  Handle one operation at a time.
2791         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2792         (vect_truncatable_operation_p, vect_set_operation_type)
2793         (vect_set_min_input_precision): New functions.
2794         (vect_determine_min_output_precision_1): Likewise.
2795         (vect_determine_min_output_precision): Likewise.
2796         (vect_determine_precisions_from_range): Likewise.
2797         (vect_determine_precisions_from_users): Likewise.
2798         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2799         (vect_vect_recog_func_ptrs): Put over_widening first.
2800         Add cast_forwprop.
2801         (vect_pattern_recog): Call vect_determine_precisions.
2803 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
2805         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2806         statements that have been replaced by further pattern statements.
2807         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2809 2018-07-03  Richard Biener  <rguenther@suse.de>
2811         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2812         always set *dt.  Dump vectype in vectype overload.
2813         * dumpfile.h (dump_gimple_expr): New function.
2814         (dump_gimple_expr_loc): Likewise.
2815         * dumpfile.c (dump_gimple_expr): New function.
2816         (dump_gimple_expr_loc): Likewise.
2818 2018-07-02  Jeff Law  <law@redhat.com>
2820         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2821         the H8/300, H8/300H and H8/S variants into a single pattern.
2822         (movhi_h8300, movqi_h8300hs): Similarly.
2823         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2824         (QHI mode iterator): New.
2826         * config/h8300/h8300.md: Remove trailing whitespace.
2828 2018-07-02  Jim Wilson  <jimw@sifive.com>
2830         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2831         instead of emit_insn for interrupt returns.
2832         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2833         (riscv_sret, riscv_uret): Likewise.
2835 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2837         * pretty-print.c (selftest::test_pp_format): Move save and restore
2838         of quotes to class auto_fix_quotes, and add an instance.
2839         * selftest.c: Include "intl.h".
2840         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2841         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2842         * selftest.h (selftest::auto_fix_quotes): New class.
2844 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
2846         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2847         (aarch64_sve_prepare_conditional_op): Remove.
2848         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2849         Allow aarch64_simd_reg_or_zero as select operand; remove
2850         the aarch64_sve_prepare_conditional_op call.
2851         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2852         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2853         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2854         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2855         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2856         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2857         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2858         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2859         and a splitters to match all of the *_any patterns.
2860         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2862         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2863         (SVE_COND_FP_BINARY_REV): Remove.
2864         (sve_int_op_rev, sve_fp_op_rev): New.
2865         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2866         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2867         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2868         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2869         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2870         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2871         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2872         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2873         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2875         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2876         Remove match_dup 1 from the inner unspec.
2877         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2879         * config/aarch64/aarch64.md (movprfx): New attr.
2880         (length): Default movprfx to 8.
2881         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2882         (*madd<SVE_I>, *msub<SVE_I): Likewise.
2883         (*<su>mul<SVE_I>3_highpart): Likewise.
2884         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2885         (*v<ASHIFT><SVE_I>3): Likewise.
2886         (*<su><MAXMIN><SVE_I>3): Likewise.
2887         (*<su><MAXMIN><SVE_F>3): Likewise.
2888         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2889         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2890         (*div<SVE_F>4): Likewise.
2892 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
2894         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2895         in dump string.
2897 2018-07-02  Richard Biener  <rguenther@suse.de>
2899         PR tree-optimization/86363
2900         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2901         memset argument refers to a non-variable address.
2903 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2905         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2906         {PLUS,MINUS}_EXPR code to...
2907         (adjust_symbolic_bound): ...here,
2908         (combine_bound): ...here,
2909         (set_value_range_with_overflow): ...and here.
2911 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
2913         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2914         code...
2915         (extract_range_from_abs_expr): ...here.
2917 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
2919         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2920         -fno-omit-frame-pointer when not optimizing.
2922 2018-07-02  Martin Liska  <mliska@suse.cz>
2924         PR ipa/86279
2925         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2926         (propagate_nothrow): Likewise.
2928 2018-07-02  Martin Liska  <mliska@suse.cz>
2930         PR ipa/86323
2931         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2933 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
2935         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2936         function in r262149, changing "loc" param from source_location to
2937         const dump_location_t &.
2938         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2939         declaration, as above.
2941 2018-07-01  Paul Koning  <ni1d@arrl.net>
2943         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2944         -munit-asm, -mgnu-asm, -mdec-asm.
2945         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2946         (pdp11_output_labelref): New.
2947         (pdp11_output_def): New.
2948         (pdp11_output_addr_vec_elt): New.
2949         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
2950         %# and %@ format codes.
2951         (pdp11_option_override): New.
2952         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2953         (pdp11_output_ident): New.
2954         (pdp11_asm_named_section): New.
2955         (pdp11_asm_init_sections): New.
2956         (pdp11_file_start): New.
2957         (pdp11_file_end): New.
2958         (output_ascii): Use .ascii/.asciz for -mdec-asm.
2959         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
2960         %o, like %c but octal.
2961         (pdp11_option_override): New.
2962         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2963         -mdec-asm.
2964         (DATA_SECTION_ASM_OP): Ditto.
2965         (READONLY_DATA_SECTION_ASM_OP): New.
2966         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2967         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2968         (ASM_OUTPUT_LABELREF): Ditto.
2969         (ASM_OUTPUT_DEF): Ditto.
2970         (ASM_OUTPUT_EXTERNAL): New.
2971         (ASM_OUTPUT_SOURCE_FILENAME): New.
2972         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2973         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2974         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
2975         %# and %@ format codes.
2976         * config/pdp11/pdp11.opt (mgnu-asm): New.
2977         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2978         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2979         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2981 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
2983         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2984         dereferencing path[] beyond its length.
2985         (debug_path): New.
2986         (debug_all_paths): New.
2987         (rewire_first_differing_edge): New.
2988         (adjust_paths_after_duplication): New.
2989         (duplicate_thread_path): Call adjust_paths_after_duplication.
2990         Add new argument.
2991         (thread_through_all_blocks): Add new argument to
2992         duplicate_thread_path.
2994 2018-06-30  Jim Wilson  <jimw@sifive.com>
2996         * config/riscv/predicates.md (p2m1_shift_operand): New.
2997         (high_mask_shift_operand): New.
2998         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2999         pattern using p2m1_shift_operand.
3000         (lshsi3_zero_extend_3+2): New combiner pattern using
3001         high_mask_shift_operand.
3003 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3005         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3006         split out from...
3007         (vect_recog_rotate_pattern): ...here.
3008         (vect_convert_input): Try to insert casts of invariants in the
3009         preheader.
3010         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3011         preheader to be empty.
3013 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3015         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3016         vector type.  If given, install it in the new statement's
3017         STMT_VINFO_VECTYPE.
3018         (vect_element_precision): New function.
3019         (vect_unpromoted_value): New struct.
3020         (vect_unpromoted_value::vect_unpromoted_value): New function.
3021         (vect_unpromoted_value::set_op): Likewise.
3022         (vect_look_through_possible_promotion): Likewise.
3023         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3024         (vect_widened_op_tree, vect_convert_input): Likewise.
3025         (vect_convert_inputs, vect_convert_output): Likewise.
3026         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3027         to handle the optional cast of the multiplication result and
3028         vect_widened_op_tree to detect the widened multiplication itself.
3029         Do not require the input and output of promotion casts to have
3030         the same sign, but base the signedness of the operation on the
3031         input rather than the result.  If the pattern includes two
3032         promotions, check that those promotions have the same sign.
3033         Do not restrict the MULT_EXPR handling to a double-width result;
3034         handle quadruple-width results and wider.  Use vect_convert_inputs
3035         to convert the inputs to the common type.
3036         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
3037         to handle the optional cast of the ABS result.  Also allow a sign
3038         change or a sign extension between the ABS and MINUS.
3039         Use vect_widened_op_tree to detect the widened subtraction and use
3040         vect_convert_inputs to convert the inputs to the common type.
3041         (vect_handle_widen_op_by_const): Delete.
3042         (vect_recog_widen_op_pattern): New function.
3043         (vect_recog_widen_mult_pattern): Use it.
3044         (vect_recog_widen_shift_pattern): Likewise.
3045         (vect_recog_widen_sum_pattern): Use
3046         vect_look_through_possible_promotion to handle the promoted
3047         PLUS_EXPR operand.
3049 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3051         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3052         the containing gimple_seq *.
3053         * gimple-iterator.h (gsi_for_stmt): Declare it.
3054         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3055         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3056         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3057         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3058         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3059         checks.
3060         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3061         split out from...
3062         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
3063         statement being replaced is part of an existing pattern
3064         definition sequence, inserting the new pattern statements before
3065         the original one.
3066         (vect_pattern_recog_1): Don't return a bool.  If the statement
3067         is already part of a pattern, instead apply pattern matching
3068         to the pattern definition statements.  Don't clear the
3069         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3070         (vect_pattern_recog): Don't break after the first match;
3071         continue processing the pattern definition statements instead.
3072         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3074 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3076         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3077         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3078         (vect_recog_widen_sum_pattern): Use it.
3080 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3082         * tree-vect-loop.c (vectorizable_reduction): Assert that the
3083         phi is not a pattern statement and has not been replaced by
3084         a pattern statement.
3085         * tree-vect-patterns.c (type_conversion_p): Don't check
3086         STMT_VINFO_IN_PATTERN_P.
3087         (vect_recog_vector_vector_shift_pattern): Likewise.
3088         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3089         the pattern statement rather than the original statement; check
3090         directly for a WIDEN_MULT_EXPR here.
3091         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3092         vect_is_simple_use to return the pattern statement rather
3093         than the original statement; use is_pattern_stmt_p to check
3094         for such a pattern statement.
3095         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3096         to return the pattern statement rather than the original statement;
3097         don't do the same transformation here.
3098         (vect_is_simple_use): If the defining statement has been replaced
3099         by a pattern statement, return the pattern statement instead.
3100         Remove the corresponding (local) transformation from the vectype
3101         overload.
3103 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
3105         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3106         end and default to null.
3107         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3108         (vectorizable_reduction): Update calls accordingly, dropping the
3109         gimple ** argument if the passed-back statement isn't needed.
3110         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3111         (vect_recog_rotate_pattern): Likewise.
3112         (vect_recog_mask_conversion_pattern): Likewise.
3113         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3114         (vect_mask_constant_operand_p): Likewise.
3115         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3116         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3117         (get_group_load_store_type, get_load_store_type): Likewise.
3118         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3119         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3120         (vectorizable_conversion, vectorizable_assignment): Likewise.
3121         (vectorizable_shift, vectorizable_operation): Likewise.
3122         (vectorizable_store, vect_is_simple_cond): Likewise.
3123         (vectorizable_condition, vectorizable_comparison): Likewise.
3124         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3125         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3126         and move it to the end.  Cope with null def_stmt_outs.
3128 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3130         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3132 2018-06-29  Jeff Law  <law@redhat.com>
3134         * config/v850/v850.c (v850_legitimate_address_p): Handle large
3135         displacements for TARGET_V850E2V3 and newer.
3136         (TARGET_LRA_P): Remove.  Defaults to LRA now.
3137         * config/v850/v850.md (sign23byte_load): Remove.
3138         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3139         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3141 2018-06-29  Martin Liska  <mliska@suse.cz>
3143         PR lto/85759
3144         * coverage.c (coverage_init): Mangle full path name.
3145         * doc/invoke.texi: Document the change.
3146         * gcov-io.c (mangle_path): New.
3147         * gcov-io.h (mangle_path): Likewise.
3148         * gcov.c (mangle_name): Use mangle_path for path mangling.
3150 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3152         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3153         if starting source register is not even.
3155 2018-06-29  Martin Liska  <mliska@suse.cz>
3157         PR tree-optimization/86263
3158         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3159         Make edge redirection.
3161 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
3163         * dumpfile.c (dump_loc): Add indentation based on scope depth.
3164         (dump_scope_depth): New variable.
3165         (get_dump_scope_depth): New function.
3166         (dump_begin_scope): New function.
3167         (dump_end_scope): New function.
3168         * dumpfile.h (get_dump_scope_depth): New declaration.
3169         (dump_begin_scope): New declaration.
3170         (dump_end_scope): New declaration.
3171         (class auto_dump_scope): New class.
3172         (AUTO_DUMP_SCOPE): New macro.
3173         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3174         AUTO_DUMP_SCOPE.
3176 2018-06-29  Richard Biener  <rguenther@suse.de>
3178         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3179         compute_all_dependences succeeds.
3180         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3181         exceed --param loop-max-datarefs-for-datadeps.
3183 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
3185         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3187 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
3189         PR target/86348
3190         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3191         alternative 0 in preferred_for_speed attribute.
3193 2018-06-28  Paul Koning  <ni1d@arrl.net>
3195         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3196         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3197         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3198         * config/pdp11/pdp11.md: Correct "length" attribute calculation
3199         for shift insn patterns.
3201 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
3203         * cgraph.c (cgraph_node::get_body): Replace assignments to
3204         "dump_file" with calls to set_dump_file.
3205         * dumpfile.c (alt_dump_file): Make static, and group with...
3206         (alt_flags): ...this definition.
3207         (dumps_are_enabled): New variable.
3208         (refresh_dumps_are_enabled): New function.
3209         (set_dump_file): New function.
3210         (set_alt_dump_file): New function.
3211         (gcc::dump_manager::dump_start): Replace assignments to
3212         "dump_file" and "alt_dump_file" with calls to set_dump_file and
3213         set_alt_dump_file.
3214         (gcc::dump_manager::dump_finish): Likewise.
3215         * dumpfile.h (alt_dump_file): Delete decl.
3216         (dumps_are_enabled): New variable decl.
3217         (set_dump_file): New function decl.
3218         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3219         global.
3220         * tree-nested.c (lower_nested_functions): Replace assignments to
3221         "dump_file" with calls to set_dump_file.
3223 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3225         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3226         goto_locus of each outgoing edge of each basic block.
3228 2018-06-28  Richard Biener  <rguenther@suse.de>
3230         * dwarf2out.c (decl_scope_table): Remove.
3231         (push_decl_scope): Likewise.
3232         (pop_decl_scope): Likewise.
3233         (gen_type_die_for_member): Do not call push/pop_decl_scope.
3234         (gen_struct_or_union_type_die): Likewise.
3235         (gen_tagged_type_die): Likewise.
3236         (dwarf2out_init): Do not initialize decl_scope_table.
3237         (dwarf2out_c_finalize): Do not free it.
3239 2018-06-28  Richard Biener  <rguenther@suse.de>
3241         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3242         deciding whether to not re-use a DIE.
3244 2018-06-28  Richard Biener  <rguenther@suse.de>
3246         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3247         DW_AT_abstract_origin attribute.
3249 2018-06-28  Martin Liska  <mliska@suse.cz>
3251         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3252         Use newly introduced constants.
3253         * tree-switch-conversion.h (struct jump_table_cluster):
3254         Define max_ratio_for_size and max_ratio_for_speed.
3256 2018-06-28  Martin Liska  <mliska@suse.cz>
3258         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3259         Add new checking assert to catch invalid state.
3260         (jump_table_cluster::can_be_handled): Handle single case
3261         clusters.
3262         (jump_table_cluster::is_beneficial): Bail out for such case.
3263         (bit_test_cluster::find_bit_tests):
3264         Add new checking assert to catch invalid state.
3265         (bit_test_cluster::can_be_handled): Handle single case
3266         clusters.
3267         (bit_test_cluster::is_beneficial): Bail out for such case.
3268         (switch_decision_tree::analyze_switch_statement):
3269         Fix comment.
3271 2018-06-28  Martin Liska  <mliska@suse.cz>
3273         * common.opt: Introduce -completion option.
3274         * gcc.c (driver_handle_option): Handle it.
3275         (driver::main): Print completions if completion
3276         is set.
3277         * opt-suggestions.c (option_proposer::get_completions):
3278         New function.
3279         (option_proposer::suggest_completion): Likewise.
3280         (option_proposer::find_param_completions): Likewise.
3281         (verify_autocompletions): Likewise.
3282         (test_completion_valid_options): Likewise.
3283         (test_completion_valid_params): Likewise.
3284         (in_completion_p): Likewise.
3285         (empty_completion_p): Likewise.
3286         (test_completion_partial_match): Likewise.
3287         (test_completion_garbage): Likewise.
3288         (opt_proposer_c_tests): Likewise.
3289         * opt-suggestions.h: Declare new functions.
3290         * opts.c (common_handle_option): Handle OPT__completion_.
3291         * selftest-run-tests.c (selftest::run_tests): Add
3292         opt_proposer_c_tests.
3293         * selftest.c (assert_str_startswith): New.
3294         * selftest.h (assert_str_startswith): Likewise.
3295         (opt_proposer_c_tests): New.
3296         (ASSERT_STR_STARTSWITH): Likewise.
3298 2018-06-28  Martin Liska  <mliska@suse.cz>
3300         * Makefile.in: Add opt-suggestions.o.
3301         * gcc-main.c: Include opt-suggestions.h.
3302         * gcc.c (driver::driver): Likewise.
3303         (driver::~driver): Remove m_option_suggestions.
3304         (driver::build_option_suggestions): Moved to option_proposer.
3305         (driver::suggest_option): Likewise.
3306         (driver::handle_unrecognized_options): Use option_proposer.
3307         * gcc.h (class driver): Add new memver m_option_proposer.
3308         * opt-suggestions.c: New file.
3309         * opt-suggestions.h: New file.
3311 2018-06-28  Martin Liska  <mliska@suse.cz>
3313         * vec.h (class auto_string_vec): New (moved from auto_argvec).
3314         (auto_string_vec::~auto_string_vec): Likewise.
3316 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
3318         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3319         prevent_decl_creation_for_types fields up and add reset_location field.
3320         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3321         statement if id->reset_location is true.
3322         (copy_edges_for_bb): Do not set goto_locus on the new edges if
3323         id->reset_location is true.
3324         (copy_phis_for_bb): Force input_location on the arguments if
3325         id->reset_location is true.
3326         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3327         is set on the function to be inlined.
3329 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
3331         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3333 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
3335         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3336         registers for Pmode.
3337         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3338         hard registers for the clobbered pseudo.
3340 2018-06-27  Paul Koning  <ni1d@arrl.net>
3342         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3343         mutually exclusive options.
3344         * config/pdp11/constraints.md (h): New constraint.
3345         (O): Update definition to match shift code generation.
3346         (D): New constraint.
3347         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3348         (CCFP): Remove.
3349         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3350         function.
3351         (output_jump): Change arguments.
3352         (pdp11_fixed_cc_regs): New function.
3353         (pdp11_cc_mode): Ditto.
3354         (pdp11_expand_shift): Ditto.
3355         (pdp11_assemble_shift): Ditto.
3356         (pdp11_small_shift): Ditto.
3357         (pdp11_branch_cost): Remove.
3358         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3359         from output.
3360         (pdp11_register_move_cost): Update for CC registers.
3361         (pdp11_rtx_costs): Add case for LSHIFTRT.
3362         (pdp11_output_jump): Add CCNZ mode conditional branches.
3363         (notice_update_cc_on_set): Remove.
3364         (pdp11_cc_mode): New function.
3365         (simple_memory_operand): Correct pre/post decrement case.
3366         (no_side_effect_operand): New function.
3367         (pdp11_regno_reg_class): Add CC_REGS class.
3368         (pdp11_fixed_cc_regs): New function.
3369         (pdp11_small_shift): New function.
3370         (pdp11_expand_shift): New function to expand shift insns.
3371         (pdp11_assemble_shift): New function to output shifts.
3372         (pdp11_branch_cost): Remove.
3373         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3374         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3375         (WCHAR_TYPE): Ditto.
3376         (PTRDIFF_TYPE): Ditto.
3377         (ADJUST_INSN_LENGTH): New macro.
3378         (FIXED_REGISTERS): Add CC registers.
3379         (CALL_USED_REGISTERS): Ditto.
3380         (reg_class): Ditto.
3381         (REG_CLASS_NAMES): Ditto.
3382         (REG_CLASS_CONTENTS): Ditto.
3383         (SELECT_CC_MODE): Use new function.
3384         (TARGET_FLAGS_REGNUM): New macro.
3385         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3386         (cc0_reg_rtx): Remove.
3387         (CC_STATUS_MDEP): Remove.
3388         (CC_STATUS_MDEFP_INIT): Remove.
3389         (CC_IN_FPU): Remove.
3390         (NOTICE_UPDATE_CC): Remove.
3391         (REGISTER_NAMES): Add CC registers.
3392         (BRANCH_COST): Change to constant 1.
3393         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3394         handling.
3395         * config/pdp11/pdp11.opt (mbcopy): Remove.
3396         (mbcopy-builtin): Remove.
3397         (mbranch-cheap): Remove.
3398         (mbranch-expensive): Remove.
3399         * config/pdp11/predicates.md (expand_shift_operand): Update to
3400         match shift code generation.
3401         (ccnz_operator): New predicate.
3402         * doc/invoke.texi (PDP-11 Options): Remove deleted options
3403         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3404         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
3405         exclusive options.
3406         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
3407         description of O constraint.
3409 2018-06-27  Jeff Law  <law@redhat.com>
3410             Austin Law  <austinklaw@gmail.com>
3412         * config/v850/v850.md (addsi3_set_flags): New pattern.
3413         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3414         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3415         (zero_extendhisi2_v850_set_flags): Likewise.
3416         (zero_extendqisi2_v850_set_flags): Likewise.
3417         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3418         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3419         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3421         * config/v850/v850-protos.h (notice_update_cc): Remove.
3422         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3423         (v850_print_operand): Handle 'D' and "d".
3424         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3425         Add handling of arithmetic/logical operations compared against zero.
3426         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3427         Do not look at v850_compare_op, instead get mode from last argument.
3428         (v850_gen_compare): Remove
3429         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3430         after reload for prologue insns.
3431         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3432         patterns.
3433         (construct_save_jarl): Likewise.
3434         (TARGET_FLAGS_REGNUM): Define.
3435         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3436         (NOTICE_UPDATE_CC): Remove.
3437         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3438         than cc0.  Conditionalize on reload_completed.
3439         (cmpsi_insn, setfcc_insn): Likewise.
3440         (tst1 splitter): Turn into define_and_split which sets the flags
3441         after reload.
3442         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3443         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3444         (cstoresf4, cstoredf4): Clobber the flags.
3445         (cmpsi, cmpsf, cmpdf): Remove expanders.
3446         (setf_insn): Remove pattern.
3447         (addsi3): Turn into define_and_split which clobbers the flags after
3448         reload and a suitable pattern (addsi3_clobber_flags) for use after
3449         reload.
3450         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3451         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3452         (ashrsi3, ashrsi3_v850e2): Likewise.
3453         (bins): Clobber the flags.
3454         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3455         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3456         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3457         (call_value_internal_short, call_value_internal_long): Likewise.
3458         (callt_save_interrupt, callt_return_interrupt): Likewise.
3459         (save_interrupt, return_interrupt): Likewise.
3460         (callt_save_all_interrupt, save_all_interrupt): Likewise.
3461         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3462         (restore_all_interrupt, _restore_all_interrupt): Likewise.
3463         (All FP comparisons): Only allow after reload has completed.
3464         (trfsr): Likewise.
3465         (divh, divhu): Tweak output template.
3466         (branch_z_normal, branch_z_invert): Remove
3467         (branch_nz_normal, branch_nz_invert): Likewise.
3468         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3470         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3471         * config/v850/v850.c (notice_update_cc): Remove.
3472         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
3473         (CC_NO_CARRY): Likewise.
3474         (NOTICE_UPDATE_CC): Define to nothing.
3475         * config/v850/v850.md: Remove block comment on cc0 handling
3476         Remove "cc" attribute from all patterns.  Remove cc_status handling
3477         from all patterns.  Minor formatting fixes.
3479 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3481         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3482         (cortex-a76.cortex-a55): Likewise.
3483         * config/aarch64/aarch64-tune.md: Regenerate.
3484         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3485         cortex-a76.cortex-a55.
3487 2018-06-27  Jeff Law  <law@redhat.com>
3489         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3490         (MULTILIB_DIRNAMES): Similarly.
3492 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
3494         * gimple.h (gimple_return_retbnd): Delete.
3495         (gimple_return_set_retbnd): Likewise.
3496         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3497         gimple_return_set_retbnd.
3498         * gimple-pretty-print.c (dump_gimple_return): Remove call to
3499         gimple_return_retbnd and adjust.
3500         * tree-inline.h (struct copy_body_data): Remove retbnd field.
3501         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3502         Explicitly return NULL in a couple more cases.  Move assertion
3503         on debug statements and remove unreachable code.
3504         (reset_debug_binding): Do not test id->retbnd.
3505         (expand_call_inline): Do not set it.
3507 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
3509         * configure.ac: Add --disable-gcov option.
3510         * configure: Regenerate.
3511         * Makefile.in: Honour @enable_gcov@.
3512         * doc/install.texi: Document --disable-gcov.
3514 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3516         * config/arm/arm-cpus.in (cortex-a76): New entry.
3517         (cortex-a76.cortex-a55): Likewise.
3518         * config/arm/arm-tables.opt: Regenerate.
3519         * config/arm/arm-tune.md: Likewise.
3520         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3521         * doc/invoke.texi (ARM Options): Document cortex-a76 and
3522         cortex-a76.cortex-a55.
3524 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
3526         PR target/85769
3527         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3529 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3531         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3532         comment.
3533         (EPILOGUE_USES): Likewise.
3535 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
3537         * tree-inline.c (remap_location): New function extracted from...
3538         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
3539         (copy_phis_for_bb): ...here.  Call remap_location.
3540         (copy_cfg_body): Adjust call to copy_edges_for_bb.
3542 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
3544         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3545         unaligned vsx for 16B memset.
3547 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
3549         PR target/86285
3550         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3551         ieee128_float_type_node to long_double_type_node unless
3552         TARGET_LONG_DOUBLE_128 is set.
3554 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
3556         * cfgloop.c (get_loop_location): Convert return type from
3557         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3558         by implicit construction from rtx_insn *, and using
3559         dump_user_location_t::from_function_decl for the fallback case.
3560         * cfgloop.h (get_loop_location): Convert return type from
3561         location_t to dump_user_location_t.
3562         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3563         dump_printf_loc to pass in a dump_location_t rather than a
3564         location_t, via the gimple stmt.
3565         * coverage.c (get_coverage_counts): Update calls to
3566         dump_printf_loc to pass in dump_location_t rather than a
3567         location_t.
3568         * doc/optinfo.texi (Dump types): Convert example of
3569         dump_printf_loc from taking "locus" to taking "insn".  Update
3570         description of the "_loc" calls to cover dump_location_t.
3571         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3572         "selftest.h".
3573         (dump_user_location_t::dump_user_location_t): New constructors,
3574         from gimple *stmt and rtx_insn *.
3575         (dump_user_location_t::from_function_decl): New function.
3576         (dump_loc): Make static.
3577         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3578         const dump_location_t &.
3579         (dump_generic_expr_loc): Delete.
3580         (dump_printf_loc): Convert param "loc" from location_t to
3581         const dump_location_t &.
3582         (selftest::test_impl_location): New function.
3583         (selftest::dumpfile_c_tests): New function.
3584         * dumpfile.h: Include "profile-count.h".
3585         (class dump_user_location_t): New class.
3586         (struct dump_impl_location_t): New struct.
3587         (class dump_location_t): New class.
3588         (dump_printf_loc): Convert 2nd param from source_location to
3589         const dump_location_t &.
3590         (dump_generic_expr_loc): Delete.
3591         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3592         const dump_location_t &.
3593         * gimple-fold.c (fold_gimple_assign): Update call to
3594         dump_printf_loc to pass in a dump_location_t rather than a
3595         location_t, via the gimple stmt.
3596         (gimple_fold_call): Likewise.
3597         * gimple-loop-interchange.cc
3598         (loop_cand::analyze_iloop_reduction_var): Update for change to
3599         check_reduction_path.
3600         (tree_loop_interchange::interchange): Update for change to
3601         find_loop_location.
3602         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3603         change in return-type of find_loop_location.
3604         (graphite_regenerate_ast_isl): Likewise.
3605         * graphite-optimize-isl.c (optimize_isl): Likewise.
3606         * graphite.c (graphite_transform_loops): Likewise.
3607         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3608         pass in a dump_location_t rather than a location_t, via the
3609         gimple stmt.
3610         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3611         * ipa.c (walk_polymorphic_call_targets): Likewise.
3612         * loop-unroll.c (report_unroll): Convert "locus" param from
3613         location_t to dump_location_t.
3614         (decide_unrolling): Update for change to get_loop_location's
3615         return type.
3616         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3617         location_t to dump_user_location_t.
3618         (grid_find_single_omp_among_assignments_1): Updates calls to
3619         dump_printf_loc to pass in a dump_location_t rather than a
3620         location_t, via the gimple stmt.
3621         (grid_parallel_clauses_gridifiable): Convert "tloc" from
3622         location_t to dump_location_t.  Updates calls to dump_printf_loc
3623         to pass in a dump_location_t rather than a location_t, via the
3624         gimple stmt.
3625         (grid_inner_loop_gridifiable_p): Likewise.
3626         (grid_dist_follows_simple_pattern): Likewise.
3627         (grid_gfor_follows_tiling_pattern): Likewise.
3628         (grid_target_follows_gridifiable_pattern): Likewise.
3629         (grid_attempt_target_gridification): Convert initialization
3630         of local "grid" from memset to zero-initialization; FIXME: does
3631         this require C++11?  Update call to dump_printf_loc to pass in a
3632         optinfo_location rather than a location_t, via the gimple stmt.
3633         * profile.c (read_profile_edge_counts): Updates call to
3634         dump_printf_loc to pass in a dump_location_t rather than a
3635         location_t
3636         (compute_branch_probabilities): Likewise.
3637         * selftest-run-tests.c (selftest::run_tests): Call
3638         dumpfile_c_tests.
3639         * selftest.h (dumpfile_c_tests): New decl.
3640         * tree-loop-distribution.c (pass_loop_distribution::execute):
3641         Update for change in return type of find_loop_location.
3642         * tree-parloops.c (parallelize_loops): Likewise.
3643         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3644         "locus" from location_t to dump_user_location_t.
3645         (canonicalize_loop_induction_variables): Likewise.
3646         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3647         for change in return type of find_loop_location.
3648         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3649         to dump_printf_loc to pass in a dump_location_t rather than a
3650         location_t, via the stmt.
3651         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3652         Likewise.
3653         * tree-vect-loop-manip.c (find_loop_location): Convert return
3654         type from source_location to dump_user_location_t.
3655         (vect_do_peeling): Update for above change.
3656         (vect_loop_versioning): Update for change in type of
3657         vect_location.
3658         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3659         from location_t to dump_user_location_t.
3660         (vect_estimate_min_profitable_iters): Update for change in type
3661         of vect_location.
3662         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3663         location_t to dump_location_t.
3664         (vect_slp_bb): Update for change in type of vect_location.
3665         * tree-vectorizer.c (vect_location): Convert from source_location
3666         to dump_user_location_t.
3667         (try_vectorize_loop_1): Update for change in vect_location's type.
3668         (vectorize_loops): Likewise.
3669         (increase_alignment): Likewise.
3670         * tree-vectorizer.h (vect_location): Convert from source_location
3671         to dump_user_location_t.
3672         (find_loop_location): Convert return type from source_location to
3673         dump_user_location_t.
3674         (check_reduction_path): Convert 1st param from location_t to
3675         dump_user_location_t.
3676         * value-prof.c (check_counter): Update call to dump_printf_loc to
3677         pass in a dump_user_location_t rather than a location_t; update
3678         call to error_at for change in type of "locus".
3679         (check_ic_target): Update call to dump_printf_loc to
3680         pass in a dump_user_location_t rather than a location_t, via the
3681         call_stmt.
3683 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
3685         * config/s390/s390.h (enum processor_flags): Do not use
3686         default tune parameter when -march was specified.
3688 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
3690         PR target/86314
3691         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3692         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3693         operands.
3695 2018-06-26  Richard Biener  <rguenther@suse.de>
3697         PR tree-optimization/86287
3698         PR bootstrap/86316
3699         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3700         (vect_analyze_loop): Initialize n_stmts.
3702 2018-06-26  Richard Biener  <rguenther@suse.de>
3704         PR middle-end/86271
3705         * fold-const.c (fold_convertible_p): Pointer extension
3706         isn't valid.
3708 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
3710         PR debug/86064
3711         * dwarf2out.c (loc_list_has_views): Adjust comments.
3712         (dw_loc_list): Split single cross-partition range with
3713         nonzero locview.
3715 2018-06-25  Jeff Law  <law@redhat.com>
3717         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3718         on -mbig-switch by default.
3720         * config/v850/predicates.md (const_float_1_operand): Fix match_code
3721         test.
3722         (const_float_0_operand): Remove unused predicate.
3723         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3724         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3725         (recipsf2): New expander.  Original pattern now called
3726         (recipsf2_insn).
3727         (recipdf2, recipdf2_insn): Similarly.
3728         (rsqrtsf2, rsqrtsf2_insn): Similarly
3729         (rsqrtdf2, rsqrtdf2_insn): Similarly
3731 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
3733         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3734         Simplify logic for FreeBSD (twice).
3736 2018-06-25  Martin Sebor  <msebor@redhat.com>
3738         PR tree-optimization/86204
3739         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3740         a strnlen result if it's less than the length of the string.
3742 2018-06-25  Martin Sebor  <msebor@redhat.com>
3744         PR tree-optimization/85700
3745         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3746         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3747         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3749 2018-06-25  Martin Sebor  <msebor@redhat.com>
3751         * doc/extend.texi (Zero-length arrays): Update and clarify.
3753 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
3755         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3756         added IEEE/IBM long double multilib support on PowerPC little
3757         endian Linux systems.
3758         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3759         (MULTILIB_DEFAULTS): Likewise.
3760         * config/rs6000/rs6000.c (rs6000_option_override_internal):
3761         Likewise.
3762         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3763         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3764         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3766 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
3768         PR middle-end/86311
3769         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3770         (REORDER_45): Likewise.
3772 2018-06-25  Jeff Law  <law@redhat.com>
3774         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3775         dividend to 32 bits.  Adjust length.
3776         (udivmodhi4): Cleanup output template.  Fix length.
3778 2018-06-25  Carl Love  <cel@us.ibm.com>
3780         * config/rs6000/vsx.md: Change word selector to prefered location.
3782 2018-06-25  Richard Biener  <rguenther@suse.de>
3784         PR tree-optimization/86304
3785         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3786         epilogue-if-converted loops as well.
3788 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
3790         * lto-section-out.c (lto_begin_section): Do not print section
3791         name for noaddr and unnumbered dumps.
3793 2018-06-25  Richard Biener  <rguenther@suse.de>
3795         * tree-vectorizer.h (struct vec_info_shared): New structure
3796         with parts split out from struct vec_info and loop_nest from
3797         struct _loop_vec_info.
3798         (struct vec_info): Adjust accordingly.
3799         (struct _loop_vec_info): Likewise.
3800         (LOOP_VINFO_LOOP_NEST): Adjust.
3801         (LOOP_VINFO_DATAREFS): Likewise.
3802         (LOOP_VINFO_DDRS): Likewise.
3803         (struct _bb_vec_info): Likewise.
3804         (BB_VINFO_DATAREFS): Likewise.
3805         (BB_VINFO_DDRS): Likewise.
3806         (struct _stmt_vec_info): Add dr_aux member.
3807         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3808         (DR_MISALIGNMENT_UNINITIALIZED): New.
3809         (set_dr_misalignment): Adjust.
3810         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3811         (vect_analyze_loop): Adjust prototype.
3812         (vect_analyze_loop_form): Likewise.
3813         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3814         Compute dependences lazily.
3815         (vect_record_base_alignments): Use shared datarefs/ddrs.
3816         (vect_verify_datarefs_alignment): Likewise.
3817         (vect_analyze_data_refs_alignment): Likewise.
3818         (vect_analyze_data_ref_accesses): Likewise.
3819         (vect_analyze_data_refs): Likewise.
3820         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3821         constructor parameter for shared part.
3822         (vect_analyze_loop_form): Pass in shared part and adjust.
3823         (vect_analyze_loop_2): Pass in storage for the number of
3824         stmts.  Move loop nest finding to the caller.  Compute
3825         datarefs lazily.
3826         (vect_analyze_loop): Pass in shared part.
3827         (vect_transform_loop): Verify shared datarefs are unchanged.
3828         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3829         constructor parameter for shared part.
3830         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3831         (vect_slp_bb): Verify shared datarefs are unchanged before
3832         transform.
3833         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3834         change.
3835         (new_stmt_vec_info): Initialize DR_AUX misalignment to
3836         DR_MISALIGNMENT_UNINITIALIZED.
3837         * tree-vectorizer.c (vec_info::vec_info): Add constructor
3838         parameter for shared part.
3839         (vec_info::~vec_info): Adjust.
3840         (vec_info_shared::vec_info_shared): New.
3841         (vec_info_shared::~vec_info_shared): Likewise.
3842         (vec_info_shared::save_datarefs): Likewise.
3843         (vec_info_shared::check_datarefs): Likewise.
3844         (try_vectorize_loop_1): Construct shared part live for analyses
3845         of a single loop for multiple vector sizes.
3846         * tree-parloops.c (gather_scalar_reductions): Adjust.
3848 2018-06-25  Richard Biener  <rguenther@suse.de>
3850         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3851         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3852         (vect_analyze_data_refs): Remove similar code from here and
3853         simplify accordingly.
3855 2018-06-25  Richard Biener  <rguenther@suse.de>
3857         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3858         for reverse storage order accesses rather than asserting
3859         they cannot happen here.
3861 2018-06-25  Tom de Vries  <tdevries@suse.de>
3863         PR debug/86257
3864         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3865         Use data16 instead of .byte for insn prefix.
3867 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
3869         PR C++/86082
3870         * parser.c (make_char_string_pack): Pass this literal chars
3871         through cpp_interpret_string.
3872         (cp_parser_userdef_numeric_literal): Check the result of
3873         make_char_string_pack.
3875 2018-06-24  Maya Rashish  <coypu@sdf.org>
3877         * ginclude/stddef.h: Simplify conditions around avoiding
3878         re-definition of __size_t.
3880 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3882         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3883         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3885 2018-06-22  Maya Rashish  <coypu@sdf.org>
3887         * doc/invoke.texi (mno-fancy-math-387): Update for changes
3888         made to OpenBSD and NetBSD through the years.
3890 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3892         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3893         behavior of vec_pack (vector double, vector double) to match
3894         behavior of vec_float2 (vector double, vector double).
3896 2018-06-22  Olivier Hainque  <hainque@adacore.com>
3898         * gimplify.c (gimplify_function_tree): Prevent creation
3899         of a trampoline for the address of the current function
3900         passed to entry/exit instrumentation hooks.
3902 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
3904         PR target/86222
3905         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3906         correctly.
3908 2018-06-22  Martin Liska  <mliska@suse.cz>
3910         PR tree-optimization/86263
3911         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3912         Bail out if is_enabled is false.
3913         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3914         New declaration.
3915         (jump_table_cluster::is_enabled): New function.
3917 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3919         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3920         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3921         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3922         (lto_input_ts_binfo_tree_pointers): Likewise.
3923         * tree-streamer-out.c (streamer_write_tree_bitfields,
3924         write_ts_binfo_tree_pointers): Likewise.
3925         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3927 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
3929         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3931 2018-06-22  Martin Liska  <mliska@suse.cz>
3933         * symbol-summary.h (get): Make it pure and inline move
3934         functionality from ::get function.
3935         (get): Remove and inline into ::get and ::get_create.
3936         (get_create): Move code from ::get function.
3938 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3940         PR target/85994
3941         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3942         -x assembler-with-cpp.
3944 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3946         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3947         _FILE_OFFSET_BITS=64 for C++.
3949 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
3951         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3952         conversion insn that shows up when pr85657-3.c is compiled using
3953         IEEE 128-bit long double.
3954         (neg<mode>2_internal): Use the correct mode to check whether the
3955         mode is IBM extended.
3956         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3957         multiply and divide external functions from being created more
3958         than once.
3960 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3962         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3963         functions.
3964         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
3965         the edge can be forwarded.
3966         (cfg_layout_merge_blocks): Likewise.
3968 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3970         * except.c (finish_eh_generation): Commit edge insertions only after
3971         the EH edges have been redirected from post-landing to landing pads.
3973 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3975         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3976         create_tmp_var_for to create the FRAME decl.
3977         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3979 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3981         * tree-inline.c (copy_edges_for_bb): Minor tweak.
3982         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3983         debug statement when resetting its value.
3984         (expand_call_inline): Copy the locus of the call onto the assignment
3985         of the return value, if any.  Use local variable in more cases.
3987 2018-06-21  Martin Liska  <mliska@suse.cz>
3989         * ipa-pure-const.c (propagate_nothrow): Use
3990         funct_state_summaries->get.
3991         (dump_malloc_lattice): Likewise.
3992         (propagate_malloc): Likewise.
3994 2018-06-21  Richard Biener  <rguenther@suse.de>
3996         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3997         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3998         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3999         comment.
4000         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4001         BLOCK_ABSTRACT_ORIGIN unconditionally.
4003 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
4005         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4006         deleting it.
4007         * ipa-reference.c (ipa_reference_c_finalize): Delete
4008         ipa_ref_opt_sum_summaries and set it to NULL.
4010 2018-06-21  Tom de Vries  <tdevries@suse.de>
4012         PR tree-optimization/85859
4013         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4014         test with comment from bb_no_side_effects_p.
4016 2018-06-21  Richard Biener  <rguenther@suse.de>
4018         PR tree-optimization/86232
4019         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4020         max for constant niter.
4022 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4024         * config/aarch64/aarch64-simd.md
4025         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4027 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4029         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4030         Make opernads of the unspec commutative.
4032 2018-06-21  Richard Biener  <rguenther@suse.de>
4034         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4035         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4036         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4037         (vect_analyze_data_ref_dependence): Re-order checks to deal with
4038         NULL DR_STEP.
4039         (vect_record_base_alignments): Do not record base alignment
4040         for gathers or scatters.
4041         (vect_compute_data_ref_alignment): Drop return value that is always
4042         true.  Bail out early for gathers or scatters.
4043         (vect_enhance_data_refs_alignment): Bail out early for gathers
4044         or scatters.
4045         (vect_find_same_alignment_drs): Likewise.
4046         (vect_analyze_data_refs_alignment): Remove dead code.
4047         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4048         (vect_analyze_data_refs): For possible gathers or scatters do
4049         not create an alternate DR, just check their possible validity
4050         and mark them.  Adjust DECL_NONALIASED handling to not rely
4051         on DR_BASE_ADDRESS.
4052         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4053         update inits of gathers or scatters.
4054         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4055         Also copy gather/scatter flag to pattern vinfo.
4057 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4059         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4060         behavior of vec_packsu (vector unsigned long long, vector unsigned
4061         long long) to match behavior of vec_packs with same signature.
4063 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
4064             Thomas Schwinge <thomas@codesourcery.com>
4065             Cesar Philippidis  <cesar@codesourcery.com>
4067         * gimplify.c (gimplify_scan_omp_clauses): Add support for
4068         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4069         (gimplify_adjust_omp_clauses): Likewise.
4070         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4071         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4072         (gimplify_omp_target_update): Update handling of acc update and
4073         enter/exit data.
4074         * omp-low.c (install_var_field): Remove unused parameter
4075         base_pointers_restrict.
4076         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4077         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4078         FINALIZE}
4079         (omp_target_base_pointers_restrict_p): Delete.
4080         (scan_omp_target): Update call to scan_sharing_clauses.
4081         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4082         FINALIZE}.
4083         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4084         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4085         (convert_local_omp_clauses): Likewise.
4086         * tree-pretty-print.c (dump_omp_clause): Likewise.
4087         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
4088         FINALIZE}.
4089         (omp_clause_code_name): Likewise.
4091 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4093         PR debug/86194
4094         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4095         be narrowed.
4097         PR tree-optimization/86231
4098         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
4099         anti-range don't overwrite *vr0min before using it to compute *vr0max.
4101 2018-06-20  Tom de Vries  <tdevries@suse.de>
4103         PR tree-optimization/86097
4104         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4105         iv type if signedness of iv type is not the same as that of *nit.
4107 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
4109         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
4110         EDGE_EH edges, verify they are all EDGE_EH.
4112 2018-06-20  Maya Rashish  <coypu@sdf.org>
4114         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4116 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4118         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4119         * config/aarch64/aarch64.c (xgene1_tunings): Add
4120         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4121         (aarch64_mode_valid_for_sched_fusion_p):
4122         Allow 16-byte modes.
4123         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4124         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4125         128-bit modes.
4126         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4127         New pattern.
4128         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4129         * config/aarch64/iterators.md (VQ2): New mode iterator.
4131 2018-06-20  Martin Liska  <mliska@suse.cz>
4133         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4134         Change default ratio from 10 to 8.
4136 2018-06-20  Martin Liska  <mliska@suse.cz>
4138         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4139         New.
4140         (bit_test_cluster::find_bit_tests): Likewise.
4141         (switch_decision_tree::analyze_switch_statement): Find clusters.
4142         * tree-switch-conversion.h (struct jump_table_cluster): Document
4143         hierarchy.
4145 2018-06-20  Martin Liska  <mliska@suse.cz>
4147         * tree-switch-conversion.c (switch_conversion::collect):
4148         Record m_uniq property.
4149         (switch_conversion::expand): Bail out for special conditions.
4150         (group_cluster::~group_cluster): New.
4151         (group_cluster::group_cluster): Likewise.
4152         (group_cluster::dump): Likewise.
4153         (jump_table_cluster::emit): New.
4154         (switch_decision_tree::fix_phi_operands_for_edges): New.
4155         (struct case_node): Remove struct.
4156         (jump_table_cluster::can_be_handled): New.
4157         (case_values_threshold): Moved to header.
4158         (reset_out_edges_aux): Likewise.
4159         (jump_table_cluster::is_beneficial): New.
4160         (bit_test_cluster::can_be_handled): Likewise.
4161         (add_case_node): Remove.
4162         (bit_test_cluster::is_beneficial): New.
4163         (case_bit_test::cmp): New.
4164         (bit_test_cluster::emit): New.
4165         (expand_switch_as_decision_tree_p): Remove.
4166         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4167         (fix_phi_operands_for_edge): Likewise.
4168         (switch_decision_tree::analyze_switch_statement): New.
4169         (compute_cases_per_edge): Move ...
4170         (switch_decision_tree::compute_cases_per_edge): ... here.
4171         (try_switch_expansion): Likewise.
4172         (switch_decision_tree::try_switch_expansion): Likewise.
4173         (record_phi_operand_mapping): Likewise.
4174         (switch_decision_tree::record_phi_operand_mapping): Likewise.
4175         (emit_case_decision_tree): Likewise.
4176         (switch_decision_tree::emit): Likewise.
4177         (balance_case_nodes): Likewise.
4178         (switch_decision_tree::balance_case_nodes): Likewise.
4179         (dump_case_nodes): Likewise.
4180         (switch_decision_tree::dump_case_nodes): Likewise.
4181         (emit_jump): Likewise.
4182         (switch_decision_tree::emit_jump): Likewise.
4183         (emit_cmp_and_jump_insns): Likewise.
4184         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4185         (emit_case_nodes): Likewise.
4186         (switch_decision_tree::emit_case_nodes): Likewise.
4187         (conditional_probability): Remove.
4188         * tree-switch-conversion.h (enum cluster_type): New.
4189         (PRINT_CASE): New.
4190         (struct cluster): Likewise.
4191         (cluster::cluster): Likewise.
4192         (struct simple_cluster): Likewise.
4193         (simple_cluster::simple_cluster): Likewise.
4194         (struct group_cluster): Likewise.
4195         (struct jump_table_cluster): Likewise.
4196         (struct bit_test_cluster): Likewise.
4197         (struct min_cluster_item): Likewise.
4198         (struct case_tree_node): Likewise.
4199         (case_tree_node::case_tree_node): Likewise.
4200         (jump_table_cluster::case_values_threshold): Likewise.
4201         (struct case_bit_test): Likewise.
4202         (struct switch_decision_tree): Likewise.
4203         (struct switch_conversion): Likewise.
4204         (switch_decision_tree::reset_out_edges_aux): Likewise.
4206 2018-06-20  Martin Liska  <mliska@suse.cz>
4208         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4209         (hoist_edge_and_branch_if_true): Likewise.
4210         (expand_switch_using_bit_tests_p): Likewise.
4211         (struct case_bit_test): Likewise.
4212         (case_bit_test_cmp): Likewise.
4213         (emit_case_bit_tests): Likewise.
4214         (switch_conversion::switch_conversion): New class.
4215         (struct switch_conv_info): Remove old struct.
4216         (collect_switch_conv_info): More to ...
4217         (switch_conversion::collect): ... this.
4218         (check_range): Likewise.
4219         (switch_conversion::check_range): Likewise.
4220         (check_all_empty_except_final): Likewise.
4221         (switch_conversion::check_all_empty_except_final): Likewise.
4222         (check_final_bb): Likewise.
4223         (switch_conversion::check_final_bb): Likewise.
4224         (create_temp_arrays): Likewise.
4225         (switch_conversion::create_temp_arrays): Likewise.
4226         (free_temp_arrays): Likewise.
4227         (gather_default_values): Likewise.
4228         (switch_conversion::gather_default_values): Likewise.
4229         (build_constructors): Likewise.
4230         (switch_conversion::build_constructors): Likewise.
4231         (constructor_contains_same_values_p): Likewise.
4232         (switch_conversion::contains_same_values_p): Likewise.
4233         (array_value_type): Likewise.
4234         (switch_conversion::array_value_type): Likewise.
4235         (build_one_array): Likewise.
4236         (switch_conversion::build_one_array): Likewise.
4237         (build_arrays): Likewise.
4238         (switch_conversion::build_arrays): Likewise.
4239         (gen_def_assigns): Likewise.
4240         (switch_conversion::gen_def_assigns): Likewise.
4241         (prune_bbs): Likewise.
4242         (switch_conversion::prune_bbs): Likewise.
4243         (fix_phi_nodes): Likewise.
4244         (switch_conversion::fix_phi_nodes): Likewise.
4245         (gen_inbound_check): Likewise.
4246         (switch_conversion::gen_inbound_check): Likewise.
4247         (process_switch): Use the newly created class.
4248         (switch_conversion::expand): New.
4249         (switch_conversion::~switch_conversion): New.
4250         * tree-switch-conversion.h: New file.
4252 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4254         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4255         tree-vect-patterns.c.
4256         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4257         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
4258         (vect_recog_sad_pattern): Likewise.
4259         (vect_recog_widen_sum_pattern): Likewise.
4260         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
4261         (vect_recog_widen_shift_pattern): Remove the type_in argument.
4262         (vect_recog_rotate_pattern): Likewise.
4263         (vect_recog_mult_pattern): Likewise.
4264         (vect_recog_vector_vector_shift_pattern): Likewise.
4265         (vect_recog_divmod_pattern): Likewise.
4266         (vect_recog_mixed_size_cond_pattern): Likewise.
4267         (vect_recog_bool_pattern): Likewise.
4268         (vect_recog_mask_conversion_pattern): Likewise.
4269         (vect_try_gather_scatter_pattern): Likewise.
4270         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
4271         (vect_recog_over_widening_pattern): Likewise.
4272         (vect_recog_gather_scatter_pattern): Likewise.
4273         (vect_recog_func_ptr): Move from tree-vectorizer.h
4274         (vect_vect_recog_func_ptrs): Move further down the file.
4275         (vect_recog_func): Likewise.  Remove the third argument.
4276         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4277         (vect_pattern_recog_1): Expect the pattern function to do any
4278         necessary target tests.  Also expect it to provide a vector type.
4279         Remove the type_in handling.
4281 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4283         * tree-vect-patterns.c (vect_pattern_detected): New function.
4284         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4285         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4286         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4287         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4288         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4289         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4290         (vect_recog_mask_conversion_pattern)
4291         (vect_try_gather_scatter_pattern): Likewise.
4293 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4295         * tree-vect-patterns.c (vect_get_internal_def): New function.
4296         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4297         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4298         (search_type_for_mask_1): Use it.
4300 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4302         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4303         redundant WIDEN_SUM_EXPR handling.
4304         (vect_recog_sad_pattern): Likewise.
4306 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4308         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4309         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4310         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4311         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4312         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4314 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4316         * tree-vect-stmts.c (vectorizable_call): Make sure that we
4317         use the stmt_vec_info of the original bb statement for the
4318         new zero assignment, even if the call is part of a pattern.
4320 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4322         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4323         that the sequence is attached to the original statement rather
4324         than the pattern statement.
4325         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4326         PATTERN_DEF_SEQ from the original statement rather than
4327         the main pattern statement.
4328         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4329         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4330         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4332 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
4334         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4335         definition statements before the early exit for statements that aren't
4336         live or relevant.
4337         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4338         split out from...
4339         (vect_transform_loop): ...here.  Process pattern definition
4340         statements without first checking whether the main pattern
4341         statement is live or relevant.
4343 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4345         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4346         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4348 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
4350         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4351         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4352         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4353         (expand_block_compare): Change select_block_compare_mode call.
4354         (expand_strncmp_align_check): Use new functions, fix comment.
4355         (emit_final_str_compare_gpr): New function.
4356         (expand_strn_compare): Refactor and clean up code.
4357         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4359 2018-06-19  Tony Reix  <tony.reix@atos.com>
4360             Damien Bergamini  <damien.bergamini@atos.com>
4361             David Edelsohn  <dje.gcc@gmail.com>
4363         * collect2.c (static_obj): New variable.
4364         (static_libs): New variable.
4365         (is_in_list): Uncomment declaration.
4366         (main): Track AIX libraries linked statically.
4367         (is_in_list): Uncomment definition.
4368         (scan_prog_file): Don't add AIX shared libraries initializer
4369         to constructor list if linking statically.
4371 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
4373         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4374         constant.
4375         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4377 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
4379         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4380         blocks.
4382 2018-06-19  Martin Liska  <mliska@suse.cz>
4384         * config/i386/i386.c (ix86_can_inline_p): Do not use
4385         ipa_fn_summaries::get_create.
4386         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4387         get.
4388         (devirtualization_time_bonus): Likewise.
4389         (ipcp_propagate_stage): Likewise.
4390         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4391         (edge_set_predicate): Likewise.
4392         (evaluate_conditions_for_known_args): Likewise.
4393         (evaluate_properties_for_edge): Likewise.
4394         (ipa_call_summary::reset): Tranform to ...
4395         (ipa_call_summary::~ipa_call_summary): ... this.
4396         (ipa_fn_summary::reset): Transform to ...
4397         (ipa_fn_summary::~ipa_fn_summary): ... this.
4398         (ipa_fn_summary_t::remove): Rename to ...
4399         (ipa_fn_summary_t::remove_callees): ... this.
4400         (ipa_fn_summary_t::duplicate): Use placement new
4401         instead of memory copy.
4402         (ipa_call_summary_t::duplicate): Likewise.
4403         (ipa_call_summary_t::remove): Remove.
4404         (dump_ipa_call_summary): Change get_create to get.
4405         (ipa_dump_fn_summary): Dump only when summary exists.
4406         (analyze_function_body): Use symbol_summary::get instead
4407         of get_create.
4408         (compute_fn_summary): Likewise.
4409         (estimate_edge_devirt_benefit): Likewise.
4410         (estimate_edge_size_and_time): Likewise.
4411         (inline_update_callee_summaries): Likewise.
4412         (remap_edge_change_prob): Likewise.
4413         (remap_edge_summaries): Likewise.
4414         (ipa_merge_fn_summary_after_inlining): Likewise.
4415         (write_ipa_call_summary): Likewise.
4416         (ipa_fn_summary_write): Likewise.
4417         (ipa_free_fn_summary): Likewise.
4418         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4419         (struct ipa_call_summary): Likewise.
4420         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4421         of get_create.
4422         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4423         (estimate_size_after_inlining): Likewise.
4424         (estimate_growth): Likewise.
4425         (growth_likely_positive): Likewise.
4426         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4427         (inline_call): Likewise.
4428         * ipa-inline.c (caller_growth_limits): Likewise.
4429         (can_inline_edge_p): Likewise.
4430         (can_inline_edge_by_limits_p): Likewise.
4431         (compute_uninlined_call_time): Likewise.
4432         (compute_inlined_call_time): Likewise.
4433         (want_inline_small_function_p): Likewise.
4434         (edge_badness): Likewise.
4435         (update_caller_keys): Likewise.
4436         (update_callee_keys): Likewise.
4437         (inline_small_functions): Likewise.
4438         (inline_to_all_callers_1): Likewise.
4439         (dump_overall_stats): Likewise.
4440         (early_inline_small_functions): Likewise.
4441         (early_inliner): Likewise.
4442         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4443         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4444         * ipa-pure-const.c (malloc_candidate_p): Likewise.
4445         * ipa-split.c (execute_split_functions): Likewise.
4446         * symbol-summary.h: Likewise.
4447         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4449 2018-06-19  Richard Biener  <rguenther@suse.de>
4451         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4452         (vectorize_loops): ... here.  Fix dbgcnt handling.
4453         (try_vectorize_loop): Wrap try_vectorize_loop_1.
4455 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
4457         PR target/86197
4458         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4459         ieee128 argument takes up only one (vector) register, not two (floating
4460         point) registers.
4462 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
4464         * gimplify.c (gimplify_init_constructor): Really never clear for an
4465         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4467 2018-06-19  Richard Biener  <rguenther@suse.de>
4469         PR tree-optimization/86179
4470         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4471         after failed recognition.
4473 2018-06-18  Martin Sebor  <msebor@redhat.com>
4475         PR middle-end/85602
4476         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4477         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4478         Handle integer subtraction.
4479         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4480         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4482 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4484         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4485         param from rtx to rtx_insn *.
4486         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4487         param.
4488         (frv_ifcvt_modify_insn): Likwise.
4489         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4490         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
4491         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4492         as_a <rtx_insn *> cast to local "unprotected_region" once
4493         it's been established that it's not NULL or pc_rtx.
4494         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4495         param "sethi" from rtx to rtx_insn *.
4496         (nds32_group_float_insns): Likewise for param "insn".
4497         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4498         param.
4499         (vax_output_int_subtract): Likewise.
4500         * config/vax/vax.c (vax_output_int_add): Likewise for param
4501         "insn".
4502         (vax_output_int_subtract): Likewise.
4503         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4504         (emit_pattern_after): Likewise for param "after".
4505         (emit_insn_after): Likewise.
4506         (emit_jump_insn_after): Likewise.
4507         (emit_call_insn_after): Likewise.
4508         (emit_debug_insn_after): Likewise.
4509         (emit_pattern_before): Likewise for param "before".
4510         (emit_insn_before): Likewise.
4511         (emit_jump_insn_before): Likewise.
4512         * final.c (get_insn_template): Likewise for param "insn", removing
4513         a cast.
4514         * output.h (get_insn_template): Likewise for 2nd param.
4515         * rtl.h (emit_insn_before): Likewise.
4516         (emit_jump_insn_before): Likewise.
4517         (emit_debug_insn_before_noloc): Likewise.
4518         (emit_insn_after): Likewise.
4519         (emit_jump_insn_after): Likewise.
4520         (emit_call_insn_after): Likewise.
4521         (emit_debug_insn_after): Likewise.
4522         (set_insn_deleted): Likewise for param.
4524 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
4526         PR target/85358
4527         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4528         floating point modes, so that IFmode is numerically greater than
4529         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4530         to declare the ordering.  This prevents IFmode from being
4531         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4532         machine.  Include rs6000-modes.h to share the fractional values
4533         between genmodes* and the rest of the compiler.
4534         (IFmode): Likewise.
4535         (KFmode): Likewise.
4536         (TFmode): Likewise.
4537         * config/rs6000/rs6000-modes.h: New file.
4538         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4539         meaning of rs6000_long_double_size so that 126..128 selects an
4540         appropriate 128-bit floating point type.
4541         (rs6000_option_override_internal): Likewise.
4542         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4543         (TARGET_LONG_DOUBLE_128): Change the meaning of
4544         rs6000_long_double_size so that 126..128 selects an appropriate
4545         128-bit floating point type.
4546         (LONG_DOUBLE_TYPE_SIZE): Update comment.
4547         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4548         source and destination to match the standard usage.
4549         (truncifkf2): Likewise.
4550         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4551         ISA 2.07 to use an explicit clobber, instead of passing in a
4552         temporary.
4553         (copysign<mode>3_soft): Likewise.
4555 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
4557         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4558         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4559         (vect_slp_analyze_instance_dependence): Likewise.
4560         (vect_enhance_data_refs_alignment): Likewise.
4561         (vect_analyze_data_refs_alignment): Likewise.
4562         (vect_slp_analyze_and_verify_instance_alignment
4563         (vect_analyze_data_ref_accesses): Likewise.
4564         (vect_prune_runtime_alias_test_list): Likewise.
4565         (vect_analyze_data_refs): Likewise.
4566         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4567         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4568         (vect_analyze_scalar_cycles_1): Likewise.
4569         (vect_get_loop_niters): Likewise.
4570         (vect_analyze_loop_form_1): Likewise.
4571         (vect_update_vf_for_slp): Likewise.
4572         (vect_analyze_loop_operations): Likewise.
4573         (vect_analyze_loop): Likewise.
4574         (vectorizable_induction): Likewise.
4575         (vect_transform_loop): Likewise.
4576         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4577         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4578         (vect_make_slp_decision): Likewise.
4579         (vect_detect_hybrid_slp): Likewise.
4580         (vect_slp_analyze_operations): Likewise.
4581         (vect_slp_bb): Likewise.
4582         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4583         (vectorizable_bswap): Likewise.
4584         (vectorizable_call): Likewise.
4585         (vectorizable_simd_clone_call): Likewise.
4586         (vectorizable_conversion): Likewise.
4587         (vectorizable_assignment): Likewise.
4588         (vectorizable_shift): Likewise.
4589         (vectorizable_operation): Likewise.
4590         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4592 2018-06-18  Martin Sebor  <msebor@redhat.com>
4594         PR tree-optimization/81384
4595         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4596         * builtins.c (expand_builtin_strnlen): New function.
4597         (expand_builtin): Call it.
4598         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4599         * builtins.def (BUILT_IN_STRNLEN): New.
4600         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4601         Warn for bounds in excess of maximum object size.
4602         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4603         single-value ranges.  Handle strnlen.
4604         (handle_builtin_strlen): Handle strnlen.
4605         (strlen_check_and_optimize_stmt): Same.
4606         * doc/extend.texi (Other Builtins): Document strnlen.
4608 2018-06-18  Maya Rashish  <coypu@sdf.org>
4610         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4611         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4612         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4614         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4615         here to ...
4616         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4618 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4620         * tree.c (escaped_string::escape): Replace cast to char * by
4621         const_cast<char *> (unescaped).
4623 2018-06-18  Nick Clifton  <nickc@redhat.com>
4625         PR 84195
4626         * tree.c (escaped_string): New class.  Converts an unescaped
4627         string into its escaped equivalent.
4628         (warn_deprecated_use): Use the new class to convert the
4629         deprecation message, if present.
4630         (test_escaped_strings): New self test.
4631         (test_c_tests): Add test_escaped_strings.
4632         * doc/extend.texi (deprecated): Add a note that the
4633         deprecation message is affected by the -fmessage-length
4634         option, and that control characters will be escaped.
4635         (#pragma GCC error): Document this pragma.
4636         (#pragma GCC warning): Likewise.
4637         * doc/invoke.texi (-fmessage-length): Document this option's
4638         effect on the #warning and #error preprocessor directives and
4639         the deprecated attribute.
4641 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
4643         * tree.c (decl_value_expr_lookup): Revert latest change.
4644         (decl_value_expr_insert): Likewise.
4646 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
4648         * gimplify.c (nonlocal_vlas): Delete.
4649         (nonlocal_vla_vars): Likewise.
4650         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4651         referenced VLAs.
4652         (gimplify_body): Do not create and destroy nonlocal_vlas.
4653         * tree-nested.c: Include diagnostic.h.
4654         (use_pointer_in_frame): Tweak.
4655         (lookup_field_for_decl): Add assertion and declare the transformation.
4656         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4657         internal error when the reference is in a wrong context.  Do not
4658         create a debug decl by default.
4659         (note_nonlocal_block_vlas): Delete.
4660         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4661         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
4662         create a debug decl by default.
4663         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4664         call is in a wrong context.
4665         (fixup_vla_decls): New function.
4666         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
4667         debug variables were created.
4668         * tree.c (decl_value_expr_lookup): Add checking assertion.
4669         (decl_value_expr_insert): Likewise.
4671 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4673         PR middle-end/82479
4674         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4675         * tree-scalar-evolution.c (interpret_expr): Likewise.
4676         (expression_expensive_p): Likewise.
4677         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4678         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4679         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4680         (ssa_defined_by_minus_one_stmt_p): New.
4682 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
4684         PR middle-end/64946
4685         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4686         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4687         * dojump.c (do_jump): Likewise.
4688         * expr.c (expand_expr_real_2): Check operand type's sign.
4689         * fold-const.c (const_unop): Handle ABSU_EXPR.
4690         (fold_abs_const): Likewise.
4691         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4692         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4693         (strip_sign_op_1): Likesise.
4694         * match.pd: Add new pattern to generate ABSU_EXPR.
4695         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4696         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4697         * tree-eh.c (operation_could_trap_helper_p): Likewise.
4698         * tree-inline.c (estimate_operator_cost): Likewise.
4699         * tree-pretty-print.c (dump_generic_node): Likewise.
4700         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4701         * tree.def (ABSU_EXPR): New.
4703 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
4705         PR middle-end/86095
4706         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4707         documented as preserved for backward compatibility only.
4708         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4710         PR rtl-optimization/86108
4711         * bb-reorder.c (create_forwarder_block): Renamed to ...
4712         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
4713         jump from new landing pad to the second part.
4714         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4715         Adjust callers.
4717 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
4719         PR middle-end/85878
4720         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4721         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4722         Only call store_expr for halves if the mode is the same.
4724         PR middle-end/86123
4725         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4726         Fix up comment formatting.
4728 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4730         * typed-splay-tree.h (typed_splay_tree::remove): New function.
4731         (typed_splay_tree::closure,
4732         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4733         (typed_splay_tree::typed_splay_tree,
4734         typed_splay_tree::operator =): Declared private.
4735         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4736         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4737         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4738         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4739         typed_splay_tree::splay_tree_splay,
4740         typed_splay_tree::splay_tree_foreach_helper,
4741         typed_splay_tree::splay_tree_insert,
4742         typed_splay_tree::splay_tree_remove,
4743         typed_splay_tree::splay_tree_lookup,
4744         typed_splay_tree::splay_tree_predecessor,
4745         typed_splay_tree::splay_tree_successor,
4746         typed_splay_tree::splay_tree_min,
4747         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4748         (typed_splay_tree::root, typed_splay_tree::comp,
4749         typed_splay_tree::delete_key,
4750         typed_splay_tree::delete_value): New data members.
4751         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4752         typed_splay_tree::remove.
4754 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
4756         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4757         -mginv and -mno-ginv to the assembler.
4758         * config/mips/mips.opt (-mcrc): New option.
4759         (-mginv): Likewise.
4760         * doc/invoke.text (-mcrc): Document.
4761         (-mginv): Likewise.
4763 2018-06-15  Nick Clifton  <nickc@redhat.com>
4765         PR 84195
4766         * tree.c (escaped_string): New class.  Converts an unescaped
4767         string into its escaped equivalent.
4768         (warn_deprecated_use): Use the new class to convert the
4769         deprecation message, if present.
4770         (test_escaped_strings): New self test.
4771         (test_c_tests): Add test_escaped_strings.
4772         * doc/extend.texi (deprecated): Add a note that the
4773         deprecation message is affected by the -fmessage-length
4774         option, and that control characters will be escaped.
4775         (#pragma GCC error): Document this pragma.
4776         (#pragma GCC warning): Likewise.
4777         * doc/invoke.texi (-fmessage-length): Document this option's
4778         effect on the #warning and #error preprocessor directives and
4779         the deprecated attribute.
4781 2018-06-15  Richard Biener  <rguenther@suse.de>
4783         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4784         here, also noting vector size used.
4785         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
4786         size used in MSG_OPTIMIZED_LOCATIONS dump.
4787         (pass_slp_vectorize::execute): Adjust.
4789 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
4791         PR target/85968
4792         * config/arc/arc.c (arc_return_address_register): Fix
4793         if-condition.
4795 2018-06-15  Richard Biener  <rguenther@suse.de>
4797         PR middle-end/86159
4798         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4799         leave useless conversion stripping to force_gimple_operand_gsi.
4800         (gimplify_build2): Likewise.
4801         (gimplify_build1): Likewise.
4803 2018-06-15  Richard Biener  <rguenther@suse.de>
4805         PR middle-end/86076
4806         * tree-cfg.c (move_stmt_op): unshare invariant addresses
4807         before adjusting their block.
4809 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4811         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4812         multilibs for *-*-rtems*.
4813         * config/riscv/t-rtems: New file.
4815 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
4817         PR middle-end/86122
4818         * match.pd ((A +- CST1) +- CST2): Punt if last resort
4819         unsigned_type_for returns NULL.
4821         PR target/85945
4822         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4823         subregs of multi-word pseudos unless the float mode has word size.
4825 2018-06-14  Richard Biener  <rguenther@suse.de>
4827         PR middle-end/86139
4828         * tree-vect-generic.c (build_word_mode_vector_type): Remove
4829         duplicate and harmful type_hash_canon.
4830         * tree.c (type_hash_canon): Assert we didn't find ourselves.
4832 2018-06-14  Richard Biener  <rguenther@suse.de>
4834         PR ipa/86124
4835         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4836         NULL cgraph_node.
4838 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4840         * config/rtems.h (STDINT_LONG32): Define.
4842 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
4843             Prachi Godbole  <prachi.godbole@imgtec.com>
4845         * config/mips/mips-cpus.def: Define P6600.
4846         * config/mips/mips-tables.opt: Regenerate.
4847         * config/mips/mips.c (mips_ucbranch_type): New enum.
4848         (mips_rtx_cost_data): Add support for P6600.
4849         (mips_issue_rate): Likewise.
4850         (mips_multipass_dfa_lookahead): Likewise.
4851         (mips_avoid_hazard): Likewise.
4852         (mips_reorg_process_insns): Likewise.
4853         (mips_classify_branch_p6600): New function.
4854         * config/mips/mips.h (TUNE_P6600): New define.
4855         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4856         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4857         * config/mips/mips.md: Include p6600.md.
4858         (processor): Add p6600.
4859         * config/mips/p6600.md: New file.
4860         * doc/invoke.texi: Add p6600 to supported architectures.
4862 2018-06-13  Martin Sebor  <msebor@redhat.com>
4864         PR tree-optimization/86114
4865         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4866         of integer types.
4867         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4869 2018-06-13  Richard Biener  <rguenther@suse.de>
4871         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4872         Properly set vector type of the intermediate stmt.
4873         * tree-vect-stmts.c (vectorizable_operation): The destination
4874         var always has vectype_out type.
4876 2018-06-13  Jeff Law  <law@redhat.com>
4878         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4879         integer 0 for argument to print_rtl_with_bb.
4880         (rl78_reorg): Likewise.
4882 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
4884         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4885         from rtx to rtx_insn *.
4886         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4887         "label".
4888         (add_sched_insns_for_speculation): Likewise for local "target",
4889         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4890         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4891         from rtx_insn ** to rtx_code_label **.
4892         (reorg_emit_nops): Likewise.
4893         (c6x_reorg): Likewise for local "call_labels".
4894         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4895         rtx to rtx_insn *.
4896         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4897         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4898         the loops over LABEL_REFS.
4899         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4900         braf_label.
4901         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4902         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4903         (split_branches): Strengthen local "olabel" from rtx to
4904         rtx_insn *, adding a safe_as_a cast.
4905         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4906         to "rtx_insn *".
4907         (add_insn_after): Likewise for first two params.
4908         (add_insn_before): Likewise.
4909         (remove_insn): Likewise for param.
4910         (emit_pattern_before_noloc): Likewise for second and third params.
4911         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4912         (emit_call_insn_before_noloc): Likewise.
4913         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4914         to "rtx_insn *".
4915         (emit_barrier_before): Likewise.
4916         (emit_label_before): Strengthen "label" param from "rtx" to
4917         "rtx_code_label *".  Strengthen "before" param from "rtx" to
4918         "rtx_insn *".
4919         (emit_insn_after_1): Strengthen "after" param from "rtx" to
4920         "rtx_insn *".
4921         (emit_pattern_after_noloc): Likewise.
4922         (emit_insn_after_noloc): Likewise.
4923         (emit_jump_insn_after_noloc): Likewise.
4924         (emit_call_insn_after_noloc): Likewise.
4925         (emit_debug_insn_after_noloc): Likewise.
4926         (emit_barrier_after): Likewise.
4927         (emit_label_after): Likewise for both params.
4928         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
4929         "loc" param from "int" to "location_t".
4930         (emit_insn_after_setloc): Likewise.
4931         (emit_jump_insn_after_setloc): Likewise.
4932         (emit_call_insn_after_setloc): Likewise.
4933         (emit_debug_insn_after_setloc): Likewise.
4934         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
4935         "loc" param from "int" to "location_t".
4936         (emit_pattern_before): Convert NULL_RTX to NULL.
4937         (emit_insn_before_setloc): Convert "loc" param from "int" to
4938         "location_t".
4939         (emit_jump_insn_before_setloc): Likewise.
4940         (emit_call_insn_before_setloc): Likewise.
4941         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4942         rtx_insn *.  Convert "loc" param from "int" to "location_t".
4943         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4944         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4945         Convert 3rd param from "int" to "location_t".
4946         (emit_barrier_before, emit_barrier_after, next_real_insn):
4947         Strengthen param from rtx to rtx_insn *.
4948         (emit_label_before): Strengthen 1st param from "rtx" to
4949         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
4950         "rtx_insn *".
4951         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4952         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4953         Strengthen 2nd param from "rtx" to "rtx_insn *".
4954         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4955         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4956         Likewise. Convert 3rd param from "int" to "location_t".
4957         (emit_label_after): Strengthen 1st param from "rtx" to
4958         "rtx_code_label *".
4959         (next_real_insn, remove_insn): Strengthen param from "rtx" to
4960         "rtx_insn *".
4961         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4962         from "rtx" to "rtx_insn *".
4964 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
4966         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4967         bodies streamed in with -Q.
4968         * dumpfile.c (dump_files): Add lto-stream-out dump file.
4969         * dumpfile.h (tree_dump_index): Add lto_stream_out.
4970         * gimple-streamer-out.c: Include gimple-pretty-print.h
4971         (output_bb): Dump stmts streamed.
4972         * lto-section-out.c: Include print-tree.h
4973         (lto_begin_section): Dump sections created.
4974         (lto_output_decl_index): Dump decl encoded.
4975         * lto-streamer-out.c: Include print-tree.h
4976         (create_output_block): Dump output block created.
4977         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4978         (output_function): Dump function output.
4979         (output_constructor): Dump constructor streamed.
4980         (write_global_stream): Output indexes encoded.
4981         (produce_asm_for_decls): Dump streams encoded.
4982         * lto-streamer.c (streamer_dump_file): New global var.
4983         * lto-streamer.h (streamer_dump_file): Declare.
4984         * passes.c (ipa_write_summaries): Initialize streamer dump.
4985         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4986         in.
4988 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
4990         PR target/86048
4991         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4992         offsets for register save directives.  Emit a second batch of save
4993         directives, if need be, when the function accesses prior frames.
4995 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
4997         * config/arc/fpu.md (fmasf4): Force operand to register.
4998         (fnmasf4): Likewise.
5000 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5002         * config/arc/arc-protos.h (arc_pad_return): Remove.
5003         * config/arc/arc.c (machine_function): Remove force_short_suffix
5004         and size_reason.
5005         (arc_print_operand): Adjust printing of '&'.
5006         (arc_verify_short): Remove conditional printing of short suffix.
5007         (arc_final_prescan_insn): Remove reference to size_reason.
5008         (pad_return): New function.
5009         (arc_reorg): Call pad_return.
5010         (arc_pad_return): Remove.
5011         (arc_init_machine_status): Remove reference to force_short_suffix.
5012         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5013         (attr length): When attribute iscompact is true force to 2
5014         regardless; in the case of maybe check if we want to force the
5015         instruction to have 4 bytes length.
5016         (nopv): Change it to generate 4 byte long nop as well.
5017         (blockage): New pattern.
5018         (simple_return): Remove call to arc_pad_return.
5019         (p_return_i): Likewise.
5021 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5023         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5025 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5027         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5028         ARC cores.
5030 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5032         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5033         for ARC700 and ARCv2.
5035 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
5037         PR target/86076
5038         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5039         operands[2] instead of operands[1].
5042 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5044         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5045         case, check whether the outer register overlaps an unallocatable
5046         register, not just whether it fits the required class.
5048 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
5050         * poly-int.h (can_div_trunc_p): Add new overload in which all values
5051         are poly_ints.
5052         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5053         (memrefs_conflict_p): Likewise.
5054         (init_alias_analysis): Likewise.
5055         * cfgexpand.c (expand_debug_expr): Likewise.
5056         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5057         * cse.c (fold_rtx): Likewise.
5058         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5059         * expr.c (emit_block_move_hints): Likewise.
5060         (clear_storage_hints, push_block, emit_push_insn): Likewise.
5061         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5062         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5063         (emit_group_store): Likewise.
5064         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
5065         to read the PRE/POST_MODIFY increment.
5066         * calls.c (store_one_arg): Use strip_offset.
5067         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5068         poly_int_rtx_p.
5069         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5070         by a VEC_SELECT.
5071         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5072         (simplify_binary_operation_1): Extend CONST_INT handling to
5073         poly_int_rtx_p.
5074         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5075         than a HOST_WIDE_INT.
5076         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5077         poly_int64.
5078         (adjust_mems, add_stores): Update accodingly.
5079         (vt_canonicalize_addr): Track polynomial offsets.
5080         (emit_note_insn_var_location): Likewise.
5081         (vt_add_function_parameter): Likewise.
5082         (vt_initialize): Likewise.
5084 2018-06-12  Jeff Law  <law@redhat.com>
5086         * config.gcc (alpha*-*-freebsd*): Remove.
5087         * config/alpha/freebsd.h: Remove.
5089 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
5091         PR other/69968
5092         * spellcheck-tree.c (levenshtein_distance): Rename to...
5093         (get_edit_distance): ...this, and update for underlying renaming.
5094         * spellcheck-tree.h (levenshtein_distance): Rename to...
5095         (get_edit_distance): ...this.
5096         * spellcheck.c (levenshtein_distance): Rename to...
5097         (get_edit_distance): ...this.  Convert from Levenshtein distance
5098         to Damerau-Levenshtein distance by supporting transpositions of
5099         adjacent characters.  Rename "v1" to "v_next" and "v0" to
5100         "v_one_ago".
5101         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5102         (selftest::test_edit_distance_unit_test_oneway): ...this, and
5103         update for underlying renaming.
5104         (selftest::levenshtein_distance_unit_test): Rename to...
5105         (selftest::test_get_edit_distance_unit): ...this, and update for
5106         underlying renaming.
5107         (selftest::test_find_closest_string): Add example from PR 69968
5108         where transposition helps
5109         (selftest::test_metric_conditions): Update for renaming.
5110         (selftest::test_metric_conditions): Likewise.
5111         (selftest::spellcheck_c_tests): Likewise.
5112         * spellcheck.h (levenshtein_distance): Rename both overloads to...
5113         (get_edit_distance): ...this.
5114         (best_match::consider): Update for renaming.
5116 2018-06-12  Martin Sebor  <msebor@redhat.com>
5118         PR tree-optimization/85259
5119         * builtins.c (compute_objsize): Handle constant offsets.
5120         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5121         true iff a warning has been issued.
5122         * gimple.h (gimple_nonartificial_location): New function.
5123         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5124         gimple_nonartificial_location and handle -Wno-system-headers.
5125         (handle_builtin_stxncpy): Same.
5127 2018-06-12  Martin Sebor  <msebor@redhat.com>
5129         PR c/85931
5130         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5132 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
5134         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5135         BUILTIN_VEC_XST entries for pointer to double and long long.
5137 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
5139         PR target/85990
5140         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5141         Update comments.
5142         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5143         Likewise.
5145 2018-06-12  Martin Liska  <mliska@suse.cz>
5147         * doc/options.texi: Document IntegerRange.
5149 2018-06-12  Martin Liska  <mliska@suse.cz>
5151         * config/i386/i386.opt: Make MPX-related options as Deprecated.
5152         * opt-functions.awk: Handle Deprecated flag.
5153         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5154         and report error.
5155         (read_cmdline_option): Report warning for a deprecated option.
5156         * opts.h (struct cl_option): Add new field cl_deprecated.
5157         (CL_ERR_DEPRECATED): New.
5159 2018-06-12  Martin Liska  <mliska@suse.cz>
5161         * doc/options.texi: Document Deprecated option flag.
5163 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5165         * config/arc/arc-arch.h (arc_extras): New enum.
5166         (arc_cpu_t):Add field extra.
5167         (arc_cpu_types): Consider the extras.
5168         * config/arc/arc-cpus.def: Add extras info.
5169         * config/arc/arc-opts.h (processor_type): Consider extra field.
5170         * config/arc/arc.c (arc_override_options): Handle extra field.
5172 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
5174         * config/arc/arc-arch.h: Update ARC_OPTX macro.
5175         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5176         field.
5177         * config/arc/arc.c (arc_init): Update pic warning.
5178         (irq_range): Update irq range parsing warnings.
5179         (arc_override_options): Update various warning messages.
5180         (arc_handle_aux_attribute): Likewise.
5182 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
5184         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5186 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
5188         * doc/sourcebuild.texi: Document usage of line number 0 in verify
5189         compiler messages directives.
5191 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
5193         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5194         * config/mips/mips-tables.opt: Regenerate.
5195         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5196         mips64r6.
5197         * doc/invoke.texi: Document -march=i6500.
5199 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
5201         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5202         (i6400_gpmul): Add cpu_unit.
5203         (i6400_gpdiv): Likewise.
5204         (i6400_msa_add_d): Update reservations.
5205         (i6400_msa_int_add) Likewise.
5206         (i6400_msa_short_logic3) Likewise.
5207         (i6400_msa_short_logic2) Likewise.
5208         (i6400_msa_short_logic) Likewise.
5209         (i6400_msa_move) Likewise.
5210         (i6400_msa_cmp) Likewise.
5211         (i6400_msa_short_float2) Likewise.
5212         (i6400_msa_div_d) Likewise.
5213         (i6400_msa_long_logic1) Likewise.
5214         (i6400_msa_long_logic2) Likewise.
5215         (i6400_msa_mult) Likewise.
5216         (i6400_msa_long_float2) Likewise.
5217         (i6400_msa_long_float4) Likewise.
5218         (i6400_msa_long_float5) Likewise.
5219         (i6400_msa_long_float8) Likewise.
5220         (i6400_fpu_fadd): Include frint type.
5221         (i6400_fpu_store): New define_insn_reservation.
5222         (i6400_fpu_load): Likewise.
5223         (i6400_fpu_move): Likewise.
5224         (i6400_fpu_fcmp): Likewise.
5225         (i6400_fpu_fmadd): Likewise.
5226         (i6400_int_mult): Include imul3nc type and update reservation.
5227         (i6400_int_div): Include idiv3 type and update reservation.
5228         (i6400_int_load): Update to check type not move_type.
5229         (i6400_int_store): Likewise.
5230         (i6400_int_prefetch): Set zero latency.
5232 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
5234         * gcc.c: Document new %@{...} sequence.
5235         (LINK_COMMAND_SPEC): Use it for the -L switches.
5236         (cpp_unique_options): Use it for the -I switches.
5237         (at_file_argbuf): New global variable.
5238         (in_at_file): Likewise.
5239         (alloc_args): Create at_file_argbuf.
5240         (clear_args): Truncate at_file_argbuf.
5241         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5242         (open_at_file): New function.
5243         (close_at_file): Likewise.
5244         (create_at_file): Delete.
5245         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5246         <'o'>: Likewise.
5247         <'@'>: New case.
5248         (validate_switches_from_spec): Deal with %@{...} sequence.
5249         (validate_switches): Likewise.
5250         (driver::finalize): Call clear_args.
5252 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
5254         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5256 2018-06-11  Martin Sebor  <msebor@redhat.com>
5258         * doc/invoke.texi (-Wall): List -Wc++17-compat.
5259         (Wno-class-memaccess): Add @opindex.
5260         (Wno-templates, Wno-multiple-inheritance): Same.
5261         (Wno-virtual-inheritance, Wno-namespaces): Same.
5262         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5263         (Wno-format-overflow, Wno-format-truncation): Same.
5264         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5265         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5266         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5267         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5268         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5269         (Wno-misspelled-isr): Same.
5271 2018-06-11  Martin Sebor  <msebor@redhat.com>
5273         * PR tree-optimization/86083
5274         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5276 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5278         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5280 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
5282         PR target/85755
5283         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5284         on the correct operand.
5285         (*movdi_internal64): Ditto.
5287 2018-06-11  Martin Liska  <mliska@suse.cz>
5289         PR tree-optimization/86089
5290         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5292 2018-06-11  Julia Koval  <julia.koval@intel.com>
5294         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5295         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5296         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5298 2018-06-11  Olivier Hainque  <hainque@adacore.com>
5300         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5301         for Ada with strict dwarf2.
5303 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
5305         PR target/85755
5306         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5307         addresses.
5309 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
5311         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5313 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
5315         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5316         TARGET_ELF.
5318 2018-06-08  Martin Liska  <mliska@suse.cz>
5320         * tree-cfg.h (debug_function): Fix argument type to match
5321         implementation.
5323 2018-06-08  Martin Liska  <mliska@suse.cz>
5325         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5326         Remove usage of MPX-related (and removed) fields.
5327         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5329 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
5331         * cfg.c (debug): Use TDF_NONE rather than 0.
5332         * cfghooks.c (debug): Likewise.
5333         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5334         (struct dump_option_value_info): Convert to...
5335         (struct kv_pair): ...this template type.
5336         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5337         rather than 0.
5338         (optinfo_verbosity_options): Likewise.
5339         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5340         OPTGROUP_NONE.
5341         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5342         than int for "optgroup_flags" param.
5343         (dump_generic_expr_loc): Use dump_flags_t rather than int for
5344         "dump_kind" param.
5345         (dump_dec): Likewise.
5346         (dump_finish): Use TDF_NONE rather than 0.
5347         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5348         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
5349         than 0.  Update for change to option_ptr.
5350         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5351         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
5352         0.  Update for changes to optinfo_verbosity_options and
5353         optgroup_options.
5354         (opt_info_switch_p): Convert optgroup_flags from int to
5355         optgroup_flags_t.
5356         (dump_basic_block): Use dump_flags_t rather than int
5357         for "dump_kind" param.
5358         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5359         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5360         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5361         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5362         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5363         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5364         TDF_NONE): Convert from macros to...
5365         (enum dump_flag): ...this new enum.
5366         (dump_flags_t): Update to use enum.
5367         (operator|, operator&, operator~, operator|=, operator&=):
5368         Implement for dump_flags_t.
5369         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5370         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5371         Convert from macros to...
5372         (enum optgroup_flag): ...this new enum.
5373         (optgroup_flags_t): New typedef.
5374         (operator|, operator|=): Implement for optgroup_flags_t.
5375         (struct dump_file_info): Convert field "alt_flags" to
5376         dump_flags_t.  Convert field "optgroup_flags" to
5377         optgroup_flags_t.
5378         (dump_basic_block): Use dump_flags_t rather than int for param.
5379         (dump_generic_expr_loc): Likewise.
5380         (dump_dec): Likewise.
5381         (dump_register): Convert param "optgroup_flags" to
5382         optgroup_flags_t.
5383         (opt_info_enable_passes): Likewise.
5384         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5385         than 0.
5386         * gimple-pretty-print.c (debug): Likewise.
5387         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5388         (merged_store_group::apply_stores): Likewise.
5389         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5390         * gimple.c (verify_gimple_pp): Likewise.
5391         * graphite-poly.c (print_pbb_body): Likewise.
5392         * passes.c (pass_manager::register_one_dump_file): Convert
5393         local "optgroup_flags" to optgroup_flags_t.
5394         * print-tree.c (print_node): Use TDF_NONE rather than 0.
5395         (debug): Likewise.
5396         (debug_body): Likewise.
5397         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5398         to optgroup_flags_t.
5399         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5400         than 0.
5401         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5402         (convert_mult_to_fma): Likewise.
5403         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5404         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5405         * tree-vect-data-refs.c (dump_lower_bound): Convert param
5406         "dump_kind" to dump_flags_t.
5408 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5410         * config/rs6000/rs6000.c (min, max): Delete.
5412 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
5414         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5415         -mabi=spe and -mabi=no-spe.
5417 2018-06-08  Martin Liska  <mliska@suse.cz>
5419         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5420         where we expect an existing summary.
5422 2018-06-08  Martin Liska  <mliska@suse.cz>
5424         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5425         * ipa-inline.h (estimate_edge_growth): Likewise.
5427 2018-06-08  Martin Liska  <mliska@suse.cz>
5429         * cgraph.c (function_version_hasher::hash): Use
5430         cgraph_node::get_uid ().
5431         (function_version_hasher::equal):
5432         * cgraph.h (cgraph_node::get_uid): New method.
5433         * ipa-inline.c (update_caller_keys): Use
5434         cgraph_node::get_uid ().
5435         (update_callee_keys): Likewise.
5436         * ipa-utils.c (searchc): Likewise.
5437         (ipa_reduced_postorder): Likewise.
5438         * lto-cgraph.c (input_node): Likewise.
5439         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5440         * symbol-summary.h (symtab_insertion): Likewise.
5441         (symtab_removal): Likewise.
5442         (symtab_duplication): Likewise.
5443         * tree-pretty-print.c (dump_function_header): Likewise.
5444         * tree-sra.c (convert_callers_for_node): Likewise.
5446 2018-06-08  Martin Liska  <mliska@suse.cz>
5448         * cgraph.c (symbol_table::create_edge): Always assign a new
5449         unique number.
5450         (symbol_table::free_edge): Do not recycle numbers.
5451         * cgraph.h (cgraph_edge::get): New method.
5452         * symbol-summary.h (symtab_removal): Use it.
5453         (symtab_duplication): Likewise.
5454         (call_summary::hashable_uid): Remove.
5456 2018-06-08  Martin Liska  <mliska@suse.cz>
5458         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5459         (initialize_growth_caches): Remove.
5460         (free_growth_caches): Likewise.
5461         (do_estimate_edge_time): Use edge_growth_cache.
5462         (do_estimate_edge_size): Likewise.
5463         (do_estimate_edge_hints): Likewise.
5464         * ipa-inline.c (reset_edge_caches): Likewise.
5465         (recursive_inlining): Likewise.
5466         (inline_small_functions): Likewise.
5467         * ipa-inline.h (initialize_growth_caches): Remove.
5468         (estimate_edge_size): Likewise.
5469         (estimate_edge_time): Likewise.
5470         (estimate_edge_hints): Likewise.
5471         (reset_edge_growth_cache): Likewise.
5472         * symbol-summary.h (call_summary::remove): New method.
5474 2018-06-08  Martin Liska  <mliska@suse.cz>
5476         * ipa-cp.c (class edge_clone_summary): New summary.
5477         (grow_edge_clone_vectors): Remove.
5478         (ipcp_edge_duplication_hook): Remove.
5479         (class edge_clone_summary_t): New call_summary class.
5480         (ipcp_edge_removal_hook): Remove.
5481         (edge_clone_summary_t::duplicate): New function.
5482         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5483         (create_specialized_node): Likewise.
5484         (ipcp_driver): Initialize edge_clone_summaries and do not
5485         register hooks.
5487 2018-06-08  Martin Liska  <mliska@suse.cz>
5489         * symbol-summary.h (get): New function.
5490         (call_summary::m_initialize_when_cloning): New class member.
5492 2018-06-08  Martin Liska  <mliska@suse.cz>
5494         * cgraph.c (cgraph_node::remove): Do not recycle uid.
5495         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5496         (symbol_table::allocate_cgraph_symbol): Do not set uid.
5497         * passes.c (uid_hash_t): Record removed_nodes by their uids.
5498         (remove_cgraph_node_from_order): Use the removed_nodes set.
5499         (do_per_function_toporder): Likwise.
5500         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5501         instead of summary_uid.
5502         (symtab_removal): Likewise.
5503         (symtab_duplication): Likewise.
5505 2018-06-08  Martin Liska  <mliska@suse.cz>
5507         * ipa-cp.c (ipcp_store_bits_results): Use
5508         ipcp_transformation_sum.
5509         (ipcp_store_vr_results): Likewise.
5510         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5511         to ...
5512         (ipcp_transformation_initialize): ... this.
5513         (ipa_set_node_agg_value_chain):
5514         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5515         (write_ipcp_transformation_info): Likewise.
5516         (read_ipcp_transformation_info): Likewise.
5517         (ipcp_update_bits): Likewise.
5518         (ipcp_update_vr): Likewise.
5519         (ipcp_transform_function): Likewise.
5520         * ipa-prop.h: Rename ipcp_transformation_summary to
5521         ipcp_transformation.
5522         (class ipcp_transformation_t): New function summary.
5523         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5524         (ipa_get_agg_replacements_for_node): Likewise.
5526 2018-06-08  Martin Liska  <mliska@suse.cz>
5528         * ipa-pure-const.c (struct funct_state_d): Do it class instead
5529         of struct.
5530         (class funct_state_summary_t): New function_summary class.
5531         (has_function_state): Remove.
5532         (get_function_state): Likewise.
5533         (set_function_state): Likewise.
5534         (add_new_function): Likewise.
5535         (funct_state_summary_t::insert): New function.
5536         (duplicate_node_data): Remove.
5537         (remove_node_data): Remove.
5538         (funct_state_summary_t::duplicate): New function.
5539         (register_hooks): Create new funct_state_summaries.
5540         (pure_const_generate_summary): Use it.
5541         (pure_const_write_summary): Likewise.
5542         (pure_const_read_summary): Likewise.
5543         (propagate_pure_const): Likewise.
5544         (propagate_nothrow): Likewise.
5545         (dump_malloc_lattice): Likewise.
5546         (propagate_malloc): Likewise.
5547         (execute): Do not register hooks, just remove summary
5548         instead.
5549         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5550         constructor.
5552 2018-06-08  Martin Liska  <mliska@suse.cz>
5554         * ipa-reference.c (remove_node_data): Remove.
5555         (duplicate_node_data): Likewise.
5556         (class ipa_ref_var_info_summary_t): New class.
5557         (class ipa_ref_opt_summary_t): Likewise.
5558         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5559         (get_reference_optimization_summary): Use
5560         ipa_ref_opt_sum_summaries.
5561         (set_reference_vars_info): Remove.
5562         (set_reference_optimization_summary): Likewise.
5563         (ipa_init): Create summaries.
5564         (init_function_info): Use function summary.
5565         (ipa_ref_opt_summary_t::duplicate): New function.
5566         (ipa_ref_opt_summary_t::remove): New function.
5567         (get_read_write_all_from_node): Fix GNU coding style.
5568         (propagate): Use function summary.
5569         (write_node_summary_p): Fix GNU coding style.
5570         (stream_out_bitmap): Likewise.
5571         (ipa_reference_read_optimization_summary): Use function summary.
5572         (ipa_reference_c_finalize): Do not release hooks.
5574 2018-06-08  Martin Liska  <mliska@suse.cz>
5576         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5577         (analyze_function_body): Extract multiple calls of get_create.
5578         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5579         * ipa-inline.c (recursive_inlining): Use ::get method.
5580         * ipa-inline.h (estimate_edge_growth): Likewise.
5582 2018-06-08  Martin Liska  <mliska@suse.cz>
5584         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5585         HSA_INVALID.
5586         (hsa_function_summary::hsa_function_summary): Use the new enum
5587         value.
5588         (hsa_gpu_implementation_p): Use hsa_summaries::get.
5589         * hsa-gen.c (hsa_get_host_function): Likewise.
5590         (get_brig_function_name): Likewise.
5591         * ipa-hsa.c (process_hsa_functions): Likewise.
5592         (ipa_hsa_write_summary): Likewise.
5593         * symbol-summary.h (symtab_duplication): Use ::get function/
5594         (get): New function.
5596 2018-06-08  Martin Liska  <mliska@suse.cz>
5598         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5599         of get.
5600         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5601         (hsa_register_kernel): Likewise.
5602         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5603         * hsa-gen.c (hsa_get_host_function): Likewise.
5604         (get_brig_function_name): Likewise.
5605         (generate_hsa): Likewise.
5606         (pass_gen_hsail::execute): Likewise.
5607         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5608         (devirtualization_time_bonus): Likewise.
5609         (ipcp_propagate_stage): Likewise.
5610         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5611         (edge_set_predicate): Likewise.
5612         (evaluate_conditions_for_known_args): Likewise.
5613         (evaluate_properties_for_edge): Likewise.
5614         (ipa_fn_summary::reset): Likewise.
5615         (ipa_fn_summary_t::duplicate): Likewise.
5616         (dump_ipa_call_summary): Likewise.
5617         (ipa_dump_fn_summary): Likewise.
5618         (analyze_function_body): Likewise.
5619         (compute_fn_summary): Likewise.
5620         (estimate_edge_devirt_benefit): Likewise.
5621         (estimate_edge_size_and_time): Likewise.
5622         (estimate_calls_size_and_time): Likewise.
5623         (estimate_node_size_and_time): Likewise.
5624         (inline_update_callee_summaries): Likewise.
5625         (remap_edge_change_prob): Likewise.
5626         (remap_edge_summaries): Likewise.
5627         (ipa_merge_fn_summary_after_inlining): Likewise.
5628         (ipa_update_overall_fn_summary): Likewise.
5629         (read_ipa_call_summary): Likewise.
5630         (inline_read_section): Likewise.
5631         (write_ipa_call_summary): Likewise.
5632         (ipa_fn_summary_write): Likewise.
5633         (ipa_free_fn_summary): Likewise.
5634         * ipa-hsa.c (process_hsa_functions): Likewise.
5635         (ipa_hsa_write_summary): Likewise.
5636         (ipa_hsa_read_section): Likewise.
5637         * ipa-icf.c (sem_function::merge): Likewise.
5638         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5639         (do_estimate_edge_time): Likewise.
5640         (estimate_size_after_inlining): Likewise.
5641         (estimate_growth): Likewise.
5642         (growth_likely_positive): Likewise.
5643         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5644         (inline_call): Likewise.
5645         * ipa-inline.c (caller_growth_limits): Likewise.
5646         (can_inline_edge_p): Likewise.
5647         (can_inline_edge_by_limits_p): Likewise.
5648         (compute_uninlined_call_time): Likewise.
5649         (compute_inlined_call_time): Likewise.
5650         (want_inline_small_function_p): Likewise.
5651         (edge_badness): Likewise.
5652         (update_caller_keys): Likewise.
5653         (update_callee_keys): Likewise.
5654         (recursive_inlining): Likewise.
5655         (inline_small_functions): Likewise.
5656         (inline_to_all_callers_1): Likewise.
5657         (dump_overall_stats): Likewise.
5658         (early_inline_small_functions): Likewise.
5659         (early_inliner): Likewise.
5660         * ipa-inline.h (estimate_edge_growth): Likewise.
5661         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5662         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5663         * ipa-prop.h (IPA_NODE_REF): Likewise.
5664         (IPA_EDGE_REF): Likewise.
5665         * ipa-pure-const.c (malloc_candidate_p): Likewise.
5666         (propagate_malloc): Likewise.
5667         * ipa-split.c (execute_split_functions): Likewise.
5668         * symbol-summary.h: Rename get to get_create.
5669         (get): Likewise.
5670         (get_create): Likewise.
5671         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5673 2018-06-08  Martin Liska  <mliska@suse.cz>
5675         * symbol-summary.h (release): Move definition out of class
5676         declaration.
5677         (symtab_removal): Likewise.
5678         (symtab_duplication): Likewise.
5680 2018-06-08  Martin Liska  <mliska@suse.cz>
5682         * symbol-summary.h (function_summary): Move constructor
5683         implementation out of class declaration.
5684         (release): Likewise.
5685         (symtab_insertion): Likewise.
5686         (symtab_removal): Likewise.
5687         (symtab_duplication): Likewise.
5688         (get): Likewise.
5690 2018-06-08  Martin Liska  <mliska@suse.cz>
5692         * Makefile.in: Remove support for MPX (macros, related functions,
5693         fields in cgraph_node, ...).
5694         * builtin-types.def (BT_BND): Likewise.
5695         (BT_FN_BND_CONST_PTR): Likewise.
5696         (BT_FN_CONST_PTR_BND): Likewise.
5697         (BT_FN_VOID_PTR_BND): Likewise.
5698         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5699         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5700         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5701         (expand_builtin_mempcpy_with_bounds): Likewise.
5702         (expand_builtin_memset_with_bounds): Likewise.
5703         (expand_builtin_memset_args): Likewise.
5704         (std_expand_builtin_va_start): Likewise.
5705         (expand_builtin): Likewise.
5706         (expand_builtin_with_bounds): Likewise.
5707         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5708         (DEF_LIB_BUILTIN_CHKP): Likewise.
5709         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5710         (DEF_CHKP_BUILTIN): Likewise.
5711         (BUILT_IN_MEMCPY): Likewise.
5712         (BUILT_IN_MEMMOVE): Likewise.
5713         (BUILT_IN_MEMPCPY): Likewise.
5714         (BUILT_IN_MEMSET): Likewise.
5715         (BUILT_IN_STPCPY): Likewise.
5716         (BUILT_IN_STRCAT): Likewise.
5717         (BUILT_IN_STRCHR): Likewise.
5718         (BUILT_IN_STRCPY): Likewise.
5719         (BUILT_IN_STRLEN): Likewise.
5720         (BUILT_IN_MEMCPY_CHK): Likewise.
5721         (BUILT_IN_MEMMOVE_CHK): Likewise.
5722         (BUILT_IN_MEMPCPY_CHK): Likewise.
5723         (BUILT_IN_MEMSET_CHK): Likewise.
5724         (BUILT_IN_STPCPY_CHK): Likewise.
5725         (BUILT_IN_STRCAT_CHK): Likewise.
5726         (BUILT_IN_STRCPY_CHK): Likewise.
5727         * calls.c (store_bounds): Likewise.
5728         (emit_call_1): Likewise.
5729         (special_function_p): Likewise.
5730         (maybe_warn_nonstring_arg): Likewise.
5731         (initialize_argument_information): Likewise.
5732         (finalize_must_preallocate): Likewise.
5733         (compute_argument_addresses): Likewise.
5734         (expand_call): Likewise.
5735         * cfgexpand.c (expand_call_stmt): Likewise.
5736         (expand_return): Likewise.
5737         (expand_gimple_stmt_1): Likewise.
5738         (pass_expand::execute): Likewise.
5739         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5740         (cgraph_node::remove): Likewise.
5741         (cgraph_node::dump): Likewise.
5742         (cgraph_node::verify_node): Likewise.
5743         * cgraph.h (chkp_function_instrumented_p): Likewise.
5744         (symtab_node::get_alias_target): Likewise.
5745         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5746         (cgraph_local_p): Likewise.
5747         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5748         (cgraph_edge::rebuild_references): Likewise.
5749         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5750         (walk_polymorphic_call_targets): Likewise.
5751         (cgraph_node::expand_thunk): Likewise.
5752         (symbol_table::output_weakrefs): Likewise.
5753         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5754         (ix86_handle_option): Likewise.
5755         * config/i386/constraints.md: Likewise.
5756         * config/i386/i386-builtin-types.def (BND): Likewise.
5757         (VOID): Likewise.
5758         (PVOID): Likewise.
5759         (ULONG): Likewise.
5760         * config/i386/i386-builtin.def (BDESC_END): Likewise.
5761         (BDESC_FIRST): Likewise.
5762         (BDESC): Likewise.
5763         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5764         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5765         * config/i386/i386.c (enum reg_class): Likewise.
5766         (ix86_target_string): Likewise.
5767         (ix86_option_override_internal): Likewise.
5768         (ix86_conditional_register_usage): Likewise.
5769         (ix86_valid_target_attribute_inner_p): Likewise.
5770         (ix86_set_indirect_branch_type): Likewise.
5771         (ix86_set_current_function): Likewise.
5772         (ix86_function_arg_regno_p): Likewise.
5773         (init_cumulative_args): Likewise.
5774         (ix86_function_arg_advance): Likewise.
5775         (ix86_function_arg): Likewise.
5776         (ix86_pass_by_reference): Likewise.
5777         (ix86_function_value_regno_p): Likewise.
5778         (ix86_function_value_1): Likewise.
5779         (ix86_function_value_bounds): Likewise.
5780         (ix86_return_in_memory): Likewise.
5781         (ix86_setup_incoming_vararg_bounds): Likewise.
5782         (ix86_va_start): Likewise.
5783         (indirect_thunk_need_prefix): Likewise.
5784         (print_reg): Likewise.
5785         (ix86_print_operand): Likewise.
5786         (ix86_expand_call): Likewise.
5787         (ix86_output_function_return): Likewise.
5788         (reg_encoded_number): Likewise.
5789         (BDESC_VERIFYS): Likewise.
5790         (ix86_init_mpx_builtins): Likewise.
5791         (ix86_init_builtins): Likewise.
5792         (ix86_emit_cmove): Likewise.
5793         (ix86_emit_move_max): Likewise.
5794         (ix86_expand_builtin): Likewise.
5795         (ix86_builtin_mpx_function): Likewise.
5796         (ix86_get_arg_address_for_bt): Likewise.
5797         (ix86_load_bounds): Likewise.
5798         (ix86_store_bounds): Likewise.
5799         (ix86_load_returned_bounds): Likewise.
5800         (ix86_store_returned_bounds): Likewise.
5801         (ix86_class_likely_spilled_p): Likewise.
5802         (ix86_hard_regno_mode_ok): Likewise.
5803         (x86_order_regs_for_local_alloc): Likewise.
5804         (ix86_mitigate_rop): Likewise.
5805         (ix86_bnd_prefixed_insn_p): Likewise.
5806         (ix86_mpx_bound_mode): Likewise.
5807         (ix86_make_bounds_constant): Likewise.
5808         (ix86_initialize_bounds): Likewise.
5809         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5810         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5811         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5812         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5813         (TARGET_CHKP_BOUND_MODE): Likewise.
5814         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5815         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5816         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5817         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5818         * config/i386/i386.h (TARGET_MPX): Likewise.
5819         (TARGET_MPX_P): Likewise.
5820         (VALID_BND_REG_MODE): Likewise.
5821         (FIRST_BND_REG): Likewise.
5822         (LAST_BND_REG): Likewise.
5823         (enum reg_class): Likewise.
5824         (BND_REG_P): Likewise.
5825         (BND_REGNO_P): Likewise.
5826         (BNDmode): Likewise.
5827         (ADJUST_INSN_LENGTH): Likewise.
5828         * config/i386/i386.md: Likewise.
5829         * config/i386/i386.opt: Likewise.
5830         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5831         (defined): Likewise.
5832         (LINK_MPX): Likewise.
5833         (MPX_SPEC): Likewise.
5834         (LIBMPX_SPEC): Likewise.
5835         (LIBMPXWRAPPERS_SPEC): Likewise.
5836         (CHKP_SPEC): Likewise.
5837         * config/i386/predicates.md: Likewise.
5838         * dbxout.c (dbxout_type): Likewise.
5839         * doc/extend.texi: Likewise.
5840         * doc/invoke.texi: Likewise.
5841         * doc/md.texi: Likewise.
5842         * doc/tm.texi: Likewise.
5843         * doc/tm.texi.in: Likewise.
5844         * dwarf2out.c (is_base_type): Likewise.
5845         (gen_formal_types_die): Likewise.
5846         (gen_subprogram_die): Likewise.
5847         (gen_type_die_with_usage): Likewise.
5848         (gen_decl_die): Likewise.
5849         (dwarf2out_late_global_decl): Likewise.
5850         * expr.c (expand_assignment): Likewise.
5851         (emit_storent_insn): Likewise.
5852         (store_expr_with_bounds): Likewise.
5853         (store_expr): Likewise.
5854         (expand_expr_real_1): Likewise.
5855         * expr.h (store_expr_with_bounds): Likewise.
5856         * function.c (use_register_for_decl): Likewise.
5857         (struct bounds_parm_data): Likewise.
5858         (assign_parms_augmented_arg_list): Likewise.
5859         (assign_parm_find_entry_rtl): Likewise.
5860         (assign_parm_is_stack_parm): Likewise.
5861         (assign_parm_load_bounds): Likewise.
5862         (assign_bounds): Likewise.
5863         (assign_parms): Likewise.
5864         (expand_function_start): Likewise.
5865         * gcc.c (CHKP_SPEC): Likewise.
5866         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5867         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5868         (wrestrict_dom_walker::check_call): Likewise.
5869         * gimple.c (gimple_build_call_from_tree): Likewise.
5870         * gimple.h (enum gf_mask): Likewise.
5871         (gimple_call_with_bounds_p): Likewise.
5872         (gimple_call_set_with_bounds): Likewise.
5873         * gimplify.c (gimplify_init_constructor): Likewise.
5874         * ipa-cp.c (initialize_node_lattices): Likewise.
5875         (propagate_constants_across_call): Likewise.
5876         (find_more_scalar_values_for_callers_subset): Likewise.
5877         * ipa-hsa.c (process_hsa_functions): Likewise.
5878         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5879         * ipa-icf.c (sem_function::merge): Likewise.
5880         * ipa-inline.c (early_inliner): Likewise.
5881         * ipa-pure-const.c (warn_function_noreturn): Likewise.
5882         (warn_function_cold): Likewise.
5883         (propagate_pure_const): Likewise.
5884         * ipa-ref.h (enum GTY): Likewise.
5885         * ipa-split.c (find_retbnd): Likewise.
5886         (consider_split): Likewise.
5887         (split_function): Likewise.
5888         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5889         * ipa.c (walk_polymorphic_call_targets): Likewise.
5890         (symbol_table::remove_unreachable_nodes): Likewise.
5891         (process_references): Likewise.
5892         (cgraph_build_static_cdtor_1): Likewise.
5893         * lto-cgraph.c (lto_output_node): Likewise.
5894         (output_refs): Likewise.
5895         (compute_ltrans_boundary): Likewise.
5896         (input_overwrite_node): Likewise.
5897         (input_node): Likewise.
5898         (input_cgraph_1): Likewise.
5899         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5900         * passes.c (pass_manager::execute_early_local_passes): Likewise.
5901         (class pass_chkp_instrumentation_passes): Likewise.
5902         (make_pass_chkp_instrumentation_passes): Likewise.
5903         * passes.def: Likewise.
5904         * rtl.h (struct GTY): Likewise.
5905         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5906         * stor-layout.c (layout_type): Likewise.
5907         * symtab.c: Likewise.
5908         * target.def: Likewise.
5909         * targhooks.c (default_chkp_bound_type): Likewise.
5910         (default_chkp_bound_mode): Likewise.
5911         (default_builtin_chkp_function): Likewise.
5912         (default_chkp_function_value_bounds): Likewise.
5913         (default_chkp_make_bounds_constant): Likewise.
5914         (default_chkp_initialize_bounds): Likewise.
5915         * targhooks.h (default_chkp_bound_type): Likewise.
5916         (default_chkp_bound_mode): Likewise.
5917         (default_builtin_chkp_function): Likewise.
5918         (default_chkp_function_value_bounds): Likewise.
5919         (default_chkp_make_bounds_constant): Likewise.
5920         (default_chkp_initialize_bounds): Likewise.
5921         * toplev.c (compile_file): Likewise.
5922         (process_options): Likewise.
5923         * tree-core.h (DEF_BUILTIN): Likewise.
5924         (DEF_BUILTIN_CHKP): Likewise.
5925         * tree-inline.c (declare_return_variable): Likewise.
5926         (remap_gimple_stmt): Likewise.
5927         (copy_bb): Likewise.
5928         (initialize_inlined_parameters): Likewise.
5929         (expand_call_inline): Likewise.
5930         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5931         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5932         (make_pass_ipa_chkp_produce_thunks): Likewise.
5933         (make_pass_chkp): Likewise.
5934         (make_pass_chkp_opt): Likewise.
5935         (make_pass_chkp_instrumentation_passes): Likewise.
5936         * tree-pretty-print.c (dump_generic_node): Likewise.
5937         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5938         * tree-ssa-dce.c (propagate_necessity): Likewise.
5939         (eliminate_unnecessary_stmts): Likewise.
5940         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5941         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5942         * tree-ssa-sccvn.h: Likewise.
5943         * tree-ssa-strlen.c (get_string_length): Likewise.
5944         (valid_builtin_call): Likewise.
5945         (adjust_last_stmt): Likewise.
5946         (handle_builtin_strchr): Likewise.
5947         (handle_builtin_strcpy): Likewise.
5948         (handle_builtin_stxncpy): Likewise.
5949         (handle_builtin_memcpy): Likewise.
5950         (handle_builtin_strcat): Likewise.
5951         (strlen_check_and_optimize_stmt): Likewise.
5952         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5953         * tree-streamer-in.c: Likewise.
5954         * tree-streamer.c (record_common_node): Likewise.
5955         * tree.c (tree_code_size): Likewise.
5956         (wide_int_to_tree_1): Likewise.
5957         (type_contains_placeholder_1): Likewise.
5958         (build_common_tree_nodes): Likewise.
5959         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5960         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5961         (POINTER_BOUNDS_P): Likewise.
5962         (BOUNDED_TYPE_P): Likewise.
5963         (BOUNDED_P): Likewise.
5964         (CALL_WITH_BOUNDS_P): Likewise.
5965         (pointer_bounds_type_node): Likewise.
5966         * value-prof.c (gimple_ic): Likewise.
5967         * var-tracking.c (vt_add_function_parameters): Likewise.
5968         * varasm.c (make_decl_rtl): Likewise.
5969         (assemble_start_function): Likewise.
5970         (output_constant): Likewise.
5971         (maybe_assemble_visibility): Likewise.
5972         * varpool.c (ctor_for_folding): Likewise.
5973         * chkp-builtins.def: Remove.
5974         * ipa-chkp.c: Remove.
5975         * ipa-chkp.h: Remove.
5976         * rtl-chkp.c: Remove.
5977         * rtl-chkp.h: Remove.
5978         * tree-chkp-opt.c: Remove.
5979         * tree-chkp.c: Remove.
5980         * tree-chkp.h: Remove.
5982 2018-06-07  Carl Love  <cel@us.ibm.com>
5984         * config/rs6000/vsx.md (vextract_fp_from_shorth,
5985         vextract_fp_from_shortl): Add BE support.
5987 2018-06-07  Paul Koning  <ni1d@arrl.net>
5989         * compare-elim.c (try_merge_compare): Don't merge compare if
5990         address contains a side effect.
5991         (try_eliminate_compare): Likewise.
5993 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
5995         * config.gcc: Support "tremont".
5996         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5997         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5998         PROCESSOR_TREMONT.
5999         * config/i386/i386.c (m_TREMONT): Define.
6000         (processor_target_table): Add "tremont".
6001         (PTA_TREMONT): Define.
6002         (ix86_lea_outperforms): Add TARGET_TREMONT.
6003         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6004         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6005         and M_INTEL_GOLDMONT_PLUS.
6006         (fold_builtin_cpu): Add "tremont".
6007         (ix86_add_stmt_cost): Add TARGET_TREMONT.
6008         (ix86_option_override_internal): Add "tremont".
6009         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6010         (processor_type): Add PROCESSOR_TREMONT.
6011         * config/i386/x86-tune.def: Add m_TREMONT.
6012         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6014 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6016         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6017         symbol defined for msp430i* devices to be lower case.
6019 2018-06-07  Richard Biener  <rguenther@suse.de>
6021         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6022         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
6023         Properly wrap signed arithmetic if overflow wraps.
6025 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
6027         PR tree-optimization/69615
6028         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6029         of a cast from a same precision integral SSA_NAME in a bb dominated
6030         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
6031         cast to utype if rhs2 has already a compatible type.
6033 2018-06-07  Richard Biener  <rguenther@suse.de>
6035         PR tree-optimization/85935
6036         * graphite-scop-detection.c (find_params_in_bb): Analyze
6037         condition operands with respect to the correct loop.  Assert
6038         the analysis doesn't fail.
6040 2018-06-04  Carl Love  <cel@us.ibm.com>
6042         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6043         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
6044         as it is slightly cheaper.
6045         (first_match_or_eos_index_<mode>):
6046         Calculate index using natural element order.
6047         (first_match_index_<mode>):
6048         Calculate index using natural element order.
6049         (first_match_or_eos_index_<mode>):
6050         Calculate index using natural order.
6051         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6052         for BE and LE modes.
6053         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6054         P9V_BUILTIN_VCLZLSBB_V16QI.
6055         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6056         specific.
6058 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6060         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6061         indentation and line wrap for many prototypes.  Add missing
6062         @smallexample directives around block of prototypes for vec_xl and
6063         vec_xst.
6065 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
6067         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6068         track if we pass or return IEEE 128-bit floating point.
6069         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6070         C++ mangling that is compatible with GCC 8.1.
6071         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6072         (init_cumulative_args): Note if we pass or return IEEE 128-bit
6073         floating point types.
6074         (rs6000_function_arg_advance_1): Likewise.
6075         (rs6000_mangle_type): Optionally generate mangled names that match
6076         what GCC 8.1 generated for IEEE 128-bit floating point types.
6077         (rs6000_globalize_decl_name): If we have an external function that
6078         passes or returns IEEE 128-bit types, generate a weak reference
6079         from the mangled name used in GCC 8.1 to the current mangled
6080         name.
6081         (rs6000_init_builtins): Make __ibm128 use the long double type if
6082         long double is IBM extended double.  Make __float128 use the long
6083         double type if long double is IEEE 128-bit.
6085         PR target/85657
6086         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6087         macro for __ibm128 built-in functions.
6088         (PACK_IF): Add __ibm128 pack/unpack functions.
6089         (UNPACK_IF): Likewise.
6090         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6091         enable long double built-in functions if long double is IEEE
6092         128-bit floating point.
6093         (rs6000_invalid_builtin): Update long double built-in function
6094         error message.
6095         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6096         functions, adjust the built-in function to use the long double
6097         built-in function if __ibm128 and long double are the same type.
6098         * doc/extend.texi (PowerPC builtins): Update documention for
6099         __builtin_{,un}pack_longdouble.  Add documentation for
6100         __builtin_{,un}pack_ibm128.
6102 2018-06-06  Jim Wilson  <jimw@sifive.com>
6104         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6105         (struct machine_function): New field interrupt_mode.
6106         (riscv_handle_type_attribute): New function.  Add forward declaration.
6107         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6108         (riscv_expand_epilogue): Check interrupt_mode field.
6109         (riscv_set_current_function): Check interrupt attribute args and
6110         set interrupt_mode field.
6111         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6112         (riscv_sret, riscv_uret): New.
6113         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6114         new arguments to interrupt attribute.
6116 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
6118         PR target/63177
6119         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6120         Don't handle -mcpu=power8 if -mpower9-vector is also used.
6122 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6124         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6125         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6126         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6127         several redundant entries.
6129 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
6131         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6132         type from "rtx" to "rtx_insn *".
6133         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6134         for local "call_insn", removing cast.
6135         (ix86_expand_call): Likewise, introducing a "call_insn" local.
6137 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
6139         PR tree-optimization/86066
6140         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6141         for BIT_INSERT_EXPR stores.
6143 2018-06-06  Richard Biener  <rguenther@suse.de>
6145         PR tree-optimization/86062
6146         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6147         component refs ontop
6148         of to be offsetted base.
6150 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6152         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6153         to be static and remove check on interrupt attribute name.
6155 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6157         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6158         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6160 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
6162         PR target/79924
6163         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6164         second argument.
6165         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6166         Remove second argument, change how error is called.
6167         (aarch64_layout_arg): Remove second argument from
6168         aarch64_err_no_fpadvsimd call.
6169         (aarch64_init_cumulative_args): Ditto.
6170         (aarch64_gimplify_va_arg_expr): Ditto.
6171         * config/aarch64/aarch64.md (mov<mode>): Ditto.
6173 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
6175         * config/i386/i386.md (simple_return_indirect_internal): New expander.
6176         (*simple_return_indirect_internal<mode>): Rename from
6177         simple_return_indirect_internal.  Use W mode iterator.
6178         (rstorssp): New expander.
6179         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
6180         (clrssbsy): New expander.
6181         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
6183 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6185         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6186         __typeof__.
6187         (cmse_check_pointed_object): Likewise.
6189 2018-06-05  Martin Liska  <mliska@suse.cz>
6191         PR gcov-profile/47618
6192         * doc/invoke.texi: Document how -fprofile-dir format
6193         is extended.
6195 2018-06-05  Richard Biener  <rguenther@suse.de>
6197         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6198         removal pretend DOM info isn't available so we do not update
6199         it and only remove edges, not dominated blocks.  Actually free
6200         DOM info in case we removed something.  Remove unreachable blocks.
6201         (mfb_keep_latches): Work with either DOM info or marked backedges.
6202         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6203         first.  Mark backedges if DOM info isn't available.
6204         (Re-)compute DOM info after cleanup_control_flow_pre.
6206 2018-06-05  Richard Biener  <rguenther@suse.de>
6208         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6209         (locus_discrim_hasher::hash): Adjust.
6210         (locus_discrim_hasher::equal): Likewise.
6211         (next_discriminator_for_locus): Work on line directly.
6212         (same_line_p): Pass in expanded locus1 as well.
6213         (assign_discriminators): Avoid redundant location expansions.
6215 2018-06-05  Richard Biener  <rguenther@suse.de>
6217         PR tree-optimization/86046
6218         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6219         if required after clearing TREE_ADDRESSABLE.
6221 2018-06-05  Richard Biener  <rguenther@suse.de>
6223         PR tree-optimization/86047
6224         * tree-ssa-loop.c (for_each_index): Glob handling of all
6225         decls and constants and really handle all of them.
6227 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6229         PR target/81497
6230         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6231         qualifier_void_pointer and qualifier_const_void_pointer.
6232         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6233         (arm_init_builtins): Handle the above.
6234         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6235         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6236         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6237         void intrinsics.
6239 2018-06-05  Martin Liska  <mliska@suse.cz>
6241         * auto-profile.c (read_autofdo_file): Do not use
6242         gcov_ctr_summary struct.
6243         (afdo_callsite_hot_enough_for_early_inline): Likewise.
6244         * coverage.c (struct counts_entry): Likewise.
6245         (read_counts_file): Read just single summary entry.
6246         (get_coverage_counts): Use gcov_summary struct.
6247         * coverage.h (get_coverage_counts): Likewise.
6248         * gcov-dump.c (dump_working_sets): Likewise.
6249         (tag_summary): Dump just single summary.
6250         * gcov-io.c (gcov_write_summary): Write just histogram
6251         summary.
6252         (gcov_read_summary): Read just single summary.
6253         (compute_working_sets): Use gcov_summary struct.
6254         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6255         of GCOV_COUNTERS_SUMMABLE.
6256         (GCOV_COUNTERS_SUMMABLE): Remove.
6257         (GCOV_FIRST_VALUE_COUNTER): Replace with
6258         GCOV_COUNTER_V_INTERVAL.
6259         (struct gcov_ctr_summary): Remove.
6260         (struct gcov_summary): Directly use fields of former
6261         gcov_ctr_summary.
6262         (compute_working_sets): Use gcov_summary struct.
6263         * gcov.c (read_count_file): Do not use ctrs fields.
6264         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6265         struct.
6266         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6267         struct.
6268         * profile.c: Likewise.
6269         * profile.h: Likewise.
6271 2018-06-05  Martin Liska  <mliska@suse.cz>
6273         PR gcov-profile/84846
6274         * gcov.c (output_lines): Print working directory only
6275         in intermediate format.
6277 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
6279         * config/s390/s390-builtin-types.def: Add void function type.
6280         * config/s390/s390-builtins.def: Use the function type for the
6281         tbeginc builtin.
6283 2018-06-04  Jim Wilson  <jimw@sifive.com>
6285         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6286         to int.
6287         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6288         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
6289         handle EH_RETURN_DATA_REGNO registers properly.
6290         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6291         (riscv_expand_epilogue): Update comment.  Change argument name and
6292         type.  Update code to use new name and type.  Pass new args to
6293         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
6294         EXCEPTION_RETURN.
6295         * config/riscv/riscv.md (NORMAL_RETURN): New.
6296         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6297         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6298         (eh_return): Call gen_eh_return_internal and emit barrier.
6299         (eh_return_internal): Call riscv_expand_epilogue.
6301 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
6303         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6304         bit_insertion field and declare can_be_merged_into method.
6305         (merged_store_group::can_be_merged_into): New method.
6306         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6307         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
6308         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6310 2018-06-04  Richard Biener  <rguenther@suse.de>
6312         PR tree-optimization/85955
6313         * builtins.c (fold_builtin_sincos): Convert pointers to
6314         destination to appropriate type before dereferencing.
6316 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
6318         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6320 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
6322         * expr.c (expand_expr_real_1): Force the operand into memory if
6323         its TYPE_MODE is BLKmode and if there is no integer mode for
6324         the number of bits being extracted.
6326 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6328         PR target/85832
6329         PR target/86036
6330         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6331         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6333 2018-06-04  Richard Biener  <rguenther@suse.de>
6335         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6336         (cleanup_tree_cfg_noloop): ... single caller.  Do
6337         start_recording_case_labels later.
6339 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
6341         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6342         to _IMMINTRIN_H_INCLUDED.
6343         * config/i386/pconfigintrin.h: Ditto.
6344         * config/i386/waitpkgintrin.h: Ditto.
6345         * config/i386/immintrin.h: Add includes for sgxintrin.h,
6346         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6347         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6348         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6349         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6350         waitpkgintrin.h and cldemoteintrin.h.
6352 2018-06-04  Richard Biener  <rguenther@suse.de>
6354         PR tree-optimization/86038
6355         * tracer.c (find_best_successor): Check probability for
6356         being initialized, bail out if not.
6358 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
6360         PR target/86003
6361         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6362         of bits to ignore when comparing architectures.
6364 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
6366         PR tree-optimization/69615
6367         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6368         maximum or minimum of the type, try to merge it also as if
6369         range1 is + [-, x - 1] or + [x + 1, -].
6371         PR c++/86025
6372         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6374 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
6376         PR tree-optimization/86034
6377         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6378         the unsigned bitfield type in a bit insertion sequence if it does not
6379         have a larger precision than the bitfield size.
6380         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6382 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
6384         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6386 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6388         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6389         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6390         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6391         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6393 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
6395         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6396         Disable -fdelete-null-pointer-checks for ELF toolchain.
6398 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6399             Kito Cheng  <kito.cheng@gmail.com>
6401         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6402         (nds32le-*-*, nds32be-*-*): Integrate checking process.
6403         (nds32*-*-*): Add glibc and uclibc conditions.
6404         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6405         (TARGET_EXCEPT_UNWIND_INFO): Define.
6406         * config/nds32/elf.h: New file.
6407         * config/nds32/linux.h: New file.
6408         * config/nds32/nds32-elf.opt: New file.
6409         * config/nds32/nds32-linux.opt: New file.
6410         * config/nds32/nds32-fp-as-gp.c
6411         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6412         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6413         TARGET_LINUX_ABI.
6414         (nds32_asm_file_end): Ditto.
6415         (nds32_print_operand): Ditto.
6416         (nds32_insert_attributes): Ditto.
6417         (nds32_init_libfuncs): New function.
6418         (TARGET_HAVE_TLS): Define.
6419         (TARGET_INIT_LIBFUNCS): Define.
6420         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6421         spec content.
6422         (TARGET_ELF): Apply different mcmodel setting.
6423         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6424         been migrated into elf.h and linux.h files.
6425         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6426         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6427         (mcmodel): The content has been migrated into nds32-elf.opt and
6428         nds32-linux.opt files.
6429         * config/nds32/t-elf: New file.
6430         * config/nds32/t-linux: New file.
6432 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
6433             Shiva Chen  <shiva0217@gmail.com>
6435         * config/nds32/constants.md (unspec_volatile_element): Add
6436         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6437         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6438         optimization.
6439         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6440         (make_pass_nds32_fp_as_gp): Declare.
6441         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6442         optmization pass.
6443         (nds32_asm_function_end_prologue): Remove unused asm output.
6444         (nds32_asm_function_begin_epilogue): Remove unused asm output.
6445         (nds32_asm_file_start): Output necessary fp_as_gp information.
6446         (nds32_option_override): Adjust register usage.
6447         (nds32_expand_prologue): Consider fp_as_gp situation.
6448         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6449         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6450         (epilogue): Ditto.
6451         (return): Ditto.
6452         (simple_return): Ditto.
6453         (omit_fp_begin): Output special directive for fp_as_gp.
6454         (omit_fp_end): Output special directive for fp_as_gp.
6455         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6456         mforbid-fp-as-gp): New options.
6458 2018-06-01  Mark Wielaard  <mark@klomp.org>
6460         * dwarf2out.c (dwarf2out_finish): Remove generation of
6461         DW_AT_loclists_base.
6463 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
6465         * gimple-ssa-store-merging.c: Include gimple-fold.h.
6466         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6467         (struct merged_store_group): Add bit_insertion field.
6468         (dump_char_array): Use standard hexadecimal format.
6469         (merged_store_group::merged_store_group): Set bit_insertion to false.
6470         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
6471         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
6472         also print the mask in the dump file.
6473         (pass_store_merging::gate): Minor tweak.
6474         (imm_store_chain_info::coalesce_immediate): Fix wrong association
6475         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
6476         stores with INTEGER_CST stores.
6477         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6478         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6479         and use it throughout.  Generate bit insertion sequences if need be.
6480         (pass_store_merging::process_store): Remove redundant condition.
6481         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6483 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
6485         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6486         the 128-bit floating point types.  Fix function comment.
6488 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6490         * config/aarch64/aarch64-simd.md
6491         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6492         mnemonics.
6493         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6494         mnemonics.
6496 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
6498         PR tree-optimization/85989
6499         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6500         variable.
6501         (backprop::intersect_uses): Check it when deciding whether this
6502         is a backedge reference.
6503         (backprop::process_block): Add each phi to m_visited_phis
6504         after visiting it, then clear it at the end.
6506 2018-06-01  Richard Biener  <rguenther@suse.de>
6508         * tree-vectorizer.h (vect_dr_stmt): New function.
6509         (vect_get_load_cost): Adjust.
6510         (vect_get_store_cost): Likewise.
6511         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6512         Use vect_dr_stmt instead of DR_SMTT.
6513         (vect_record_base_alignments): Likewise.
6514         (vect_calculate_target_alignment): Likewise.
6515         (vect_compute_data_ref_alignment): Likewise and make static.
6516         (vect_update_misalignment_for_peel): Likewise.
6517         (vect_verify_datarefs_alignment): Likewise.
6518         (vector_alignment_reachable_p): Likewise.
6519         (vect_get_data_access_cost): Likewise.  Pass down
6520         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6521         (vect_get_peeling_costs_all_drs): Likewise.
6522         (vect_peeling_hash_get_lowest_cost): Likewise.
6523         (vect_enhance_data_refs_alignment): Likewise.
6524         (vect_find_same_alignment_drs): Likewise.
6525         (vect_analyze_data_refs_alignment): Likewise.
6526         (vect_analyze_group_access_1): Likewise.
6527         (vect_analyze_group_access): Likewise.
6528         (vect_analyze_data_ref_access): Likewise.
6529         (vect_analyze_data_ref_accesses): Likewise.
6530         (vect_vfa_segment_size): Likewise.
6531         (vect_small_gap_p): Likewise.
6532         (vectorizable_with_step_bound_p): Likewise.
6533         (vect_prune_runtime_alias_test_list): Likewise.
6534         (vect_analyze_data_refs): Likewise.
6535         (vect_supportable_dr_alignment): Likewise.
6536         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6537         (vect_gen_prolog_loop_niters): Likewise.
6538         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6539         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6540         modify DR_STMT.
6541         (vect_recog_mask_conversion_pattern): Likewise.
6542         (vect_try_gather_scatter_pattern): Likewise.
6543         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6544         to vect_get_store_cost.
6545         (vect_get_store_cost): Get stmt_info instead of DR.
6546         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6547         (vect_get_load_cost): Get stmt_info instead of DR.
6549 2018-06-01  Richard Biener  <rguenther@suse.de>
6551         PR middle-end/86017
6552         * gimple-fold.c (var_decl_component_p): Also allow offsetted
6553         vars wrapped in MEM_REFs.
6555 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
6557         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6558         Fix subreg tests so that we only return a choice between
6559         GENERAL_REGS and FP_REGS if the original classes included both.
6561 2018-06-01  Richard Biener  <rguenther@suse.de>
6563         PR ipa/85960
6564         * tree-ssa-structalias.c (get_function_part_constraint):
6565         Handle NULL fi->decl.
6566         (find_func_aliases_for_call): Properly handle indirect
6567         fi from direct call.
6568         (find_func_clobbers): Likewise.
6569         (ipa_pta_execute): Likewise.
6570         (create_variable_info_for): For functions that are ifunc_resolver
6571         resolve to a varinfo that contains the result of the resolver call.
6572         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6573         aliases.
6575 2018-05-31  Michael Collison  <michael.collison@arm.com>
6577         * config/aarch64/aarch64.md:
6578         (*fix_to_zero_extenddfdi2): New pattern.
6579         * gcc.target/aarch64/fix_extend1.c: New testcase.
6581 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
6583         PR middle-end/78809
6584         PR middle-end/83026
6585         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6586         and BUILT_IN_STRNCMP_EQ.
6587         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6588         BUILT_IN_STRNCMP_EQ.
6589         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6590         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6591         (gimple_fold_builtin): Likewise.
6592         * tree-ssa-strlen.c (compute_string_length): New function.
6593         (determine_min_obsize): New function.
6594         (handle_builtin_string_cmp): New function to handle calls to
6595         string compare functions.
6596         (strlen_optimize_stmt): Add handling to builtin string compare
6597         calls.
6598         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6599         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6600         * tree.c (build_common_builtin_nodes): Add new defines of
6601         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6603 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
6605         PR target/85984
6606         * bb-reorder.c (pass_partition_blocks::gate): Return false for
6607         functions with naked attribute.
6609 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6611         * config/i386/sse.md (avx_vec_concat<mode>):
6612         Substitute concat_tg_mode mode attribute with xtg_mode.
6613         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6614         (concat_tg_mode): Remove mode attribute.
6616 2018-05-31  Martin Sebor  <msebor@redhat.com>
6618         PR c/82063
6619         * calls.c (alloc_max_size): Correct a logic error/typo.
6620         Treat excessive arguments as infinite.  Warn for invalid arguments.
6621         * doc/invoke.texi (-Walloc-size-larger-than): Update.
6623 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
6625         PR target/85829
6626         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6627         and movx for Haswell.
6629 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
6630             Cesar Philippidis  <cesar@codesourcery.com>
6632         PR middle-end/85879
6633         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6634         when emitting error on private/firstprivate reductions.
6635         * omp-low.c (lower_omp_target): Avoid reference-type processing
6636         on pointers for firstprivate clause.
6638 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6640         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6641         (st1x2): Likewise.
6642         (st1x3): Likewise.
6643         * config/aarch64/aarch64-simd.md
6644         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6645         (aarch64_ld1_x3_<mode>): Likewise
6646         (aarch64_st1x2<VALLDIF:mode>): Likewise
6647         (aarch64_st1_x2_<mode>): Likewise
6648         (aarch64_st1x3<VALLDIF:mode>): Likewise
6649         (aarch64_st1_x3_<mode>): Likewise
6650         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6651         (vld1_s8_x3): Likewise.
6652         (vld1_u16_x3): Likewise.
6653         (vld1_s16_x3): Likewise.
6654         (vld1_u32_x3): Likewise.
6655         (vld1_s32_x3): Likewise.
6656         (vld1_u64_x3): Likewise.
6657         (vld1_s64_x3): Likewise.
6658         (vld1_f16_x3): Likewise.
6659         (vld1_f32_x3): Likewise.
6660         (vld1_f64_x3): Likewise.
6661         (vld1_p8_x3): Likewise.
6662         (vld1_p16_x3): Likewise.
6663         (vld1_p64_x3): Likewise.
6664         (vld1q_u8_x3): Likewise.
6665         (vld1q_s8_x3): Likewise.
6666         (vld1q_u16_x3): Likewise.
6667         (vld1q_s16_x3): Likewise.
6668         (vld1q_u32_x3): Likewise.
6669         (vld1q_s32_x3): Likewise.
6670         (vld1q_u64_x3): Likewise.
6671         (vld1q_s64_x3): Likewise.
6672         (vld1q_f16_x3): Likewise.
6673         (vld1q_f32_x3): Likewise.
6674         (vld1q_f64_x3): Likewise.
6675         (vld1q_p8_x3): Likewise.
6676         (vld1q_p16_x3): Likewise.
6677         (vld1q_p64_x3): Likewise.
6678         (vst1_s64_x2): Likewise.
6679         (vst1_u64_x2): Likewise.
6680         (vst1_f64_x2): Likewise.
6681         (vst1_s8_x2): Likewise.
6682         (vst1_p8_x2): Likewise.
6683         (vst1_s16_x2): Likewise.
6684         (vst1_p16_x2): Likewise.
6685         (vst1_s32_x2): Likewise.
6686         (vst1_u8_x2): Likewise.
6687         (vst1_u16_x2): Likewise.
6688         (vst1_u32_x2): Likewise.
6689         (vst1_f16_x2): Likewise.
6690         (vst1_f32_x2): Likewise.
6691         (vst1_p64_x2): Likewise.
6692         (vst1q_s8_x2): Likewise.
6693         (vst1q_p8_x2): Likewise.
6694         (vst1q_s16_x2): Likewise.
6695         (vst1q_p16_x2): Likewise.
6696         (vst1q_s32_x2): Likewise.
6697         (vst1q_s64_x2): Likewise.
6698         (vst1q_u8_x2): Likewise.
6699         (vst1q_u16_x2): Likewise.
6700         (vst1q_u32_x2): Likewise.
6701         (vst1q_u64_x2): Likewise.
6702         (vst1q_f16_x2): Likewise.
6703         (vst1q_f32_x2): Likewise.
6704         (vst1q_f64_x2): Likewise.
6705         (vst1q_p64_x2): Likewise.
6706         (vst1_s64_x3): Likewise.
6707         (vst1_u64_x3): Likewise.
6708         (vst1_f64_x3): Likewise.
6709         (vst1_s8_x3): Likewise.
6710         (vst1_p8_x3): Likewise.
6711         (vst1_s16_x3): Likewise.
6712         (vst1_p16_x3): Likewise.
6713         (vst1_s32_x3): Likewise.
6714         (vst1_u8_x3): Likewise.
6715         (vst1_u16_x3): Likewise.
6716         (vst1_u32_x3): Likewise.
6717         (vst1_f16_x3): Likewise.
6718         (vst1_f32_x3): Likewise.
6719         (vst1_p64_x3): Likewise.
6720         (vst1q_s8_x3): Likewise.
6721         (vst1q_p8_x3): Likewise.
6722         (vst1q_s16_x3): Likewise.
6723         (vst1q_p16_x3): Likewise.
6724         (vst1q_s32_x3): Likewise.
6725         (vst1q_s64_x3): Likewise.
6726         (vst1q_u8_x3): Likewise.
6727         (vst1q_u16_x3): Likewise.
6728         (vst1q_u32_x3): Likewise.
6729         (vst1q_u64_x3): Likewise.
6730         (vst1q_f16_x3): Likewise.
6731         (vst1q_f32_x3): Likewise.
6732         (vst1q_f64_x3): Likewise.
6733         (vst1q_p64_x3): Likewise.
6735 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6737         * config/msp430/msp430.c (msp430_output_labelref): Prepend
6738         user_label_prefix to name.
6740         * tree-core.h: Update comment about the format of NAME string
6741         passed to handler in attribute_spec.
6743         * config/msp430/msp430.md: Remove erroneous subreg expression from
6744         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6745         zero_extend{q,h}isi2.
6747 2018-05-30  Borislav Petkov  <bp@suse.de>
6749         * doc/extend.texi: Document some architecture specific
6750         constraints and sort entries.
6752 2018-05-30  Martin Sebor  <msebor@redhat.com>
6754         PR middle-end/85369
6755         * builtins.c (expand_builtin_stpcpy_1): New function.
6756         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6757         only if the former succeeds.
6759 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6761         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6762         in saphira.
6764 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6766         * doc/invoke.texi (-flinker-output): Document
6768 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6770         * passes.c (ipa_write_summaries): Only modify statements if body
6771         is in memory.
6772         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6773         incrementally linking.
6774         (ipa_passes): Likewise.
6775         * lto-cgraph.c (lto_output_node): When incrementally linking do not
6776         pass down resolution info.
6777         * common.opt (flag_incremental_link): Update info.
6778         * gcc.c (plugin specs): Turn flinker-output=* to
6779         -plugin-opt=-linker-output-known
6780         * toplev.c (compile_file): Also cut compilation when doing incremental
6781         link.
6782         * flag-types. (enum lto_partition_model): Add
6783         LTO_LINKER_OUTPUT_NOLTOREL.
6784         (invoke.texi): Add -flinker-output docs.
6785         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6786         link same way as WPA; do not stream in dead initializers.
6788         * dwarf2out.c (dwarf2out_die_ref_for_decl,
6789         darf2out_register_external_decl): Support incremental link.
6791 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6793         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6795 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
6797         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6798         it down to simple_object_copy_lto_debug_sections.
6799         (run_gcc): Determine incremental LTO link time and configure
6800         lto1 into non-wpa mode, disable renaming of debug sections.
6802 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6804         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6805         descriptions of various incorrectly documented functions.
6807 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6809         Revert:
6810         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6811         address check not strict.
6813 2018-05-30  Richard Biener  <rguenther@suse.de>
6815         PR tree-optimization/85964
6816         * tracer.c (better_p): Drop initialized count check, we only
6817         call the function with initialized counts now.
6818         (find_best_successor): Do find a best edge if one
6819         has uninitialized count.
6820         (find_best_predecessor): Likewise.  Do BB frequency check only
6821         if count is initialized.
6823 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
6825         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6826         (aarch64_ldrstr_offset_compare): New.
6827         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6828         load/store orderings.
6829         (aarch64_gen_adjusted_ldpstp): Likewise.
6831 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
6833         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6834         Check for subset of GENERAL_REGS and FP_REGS.
6835         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6836         r=w alternative.
6838 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
6840         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6841         and wi::to_poly_offset.  Add the current offset and then check
6842         whether the sum fits, rather than using an unchecked addition of
6843         a checked term.  Check for a shwi rather than a uhwi.
6844         * expr.c (get_bit_range): Use tree_to_poly_uint64.
6845         (store_constructor): Use poly_int_tree_p.
6846         (expand_expr_real_1): Likewise.
6847         * function.c (assign_temp): Likewise.
6848         * fold-const.c (const_binop): Use poly_int_tree_p and
6849         wi::to_poly_offset.
6850         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
6851         division.
6852         * ipa-icf-gimple.c (func_checker::compare_operand): Use
6853         to_poly_offset for MEM offsets.
6854         * ipa-icf.c (sem_variable::equals): Likewise.
6855         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6856         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6857         wi::to_poly_offset for BIT_FIELD_REF offsets.
6858         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6859         wi::to_poly_offset.
6860         * var-tracking.c (emit_note_insn_var_location): Use
6861         tree_to_poly_uint64.
6863 2018-05-29  Jim Wilson  <jimw@sifive.com>
6865         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6867 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
6869         PR target/85950
6870         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6871         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6872         sequence.
6873         (sse4_1_round<mode>2): Use nonimmediate_operand
6874         for operand 1 predicate.
6876 2018-05-29  Martin Sebor  <msebor@redhat.com>
6877             Richard Biener  <rguenther@suse.de>
6879         PR testsuite/85888
6880         * calls.c (get_size_range): Call determine_value_range instead
6881         of get_value_range..
6882         * tree-vrp.h (determine_value_range): Declared new function.
6883         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6885 2018-05-29  Richard Biener  <rguenther@suse.de>
6887         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6888         sure to use non-pattern stmts for get_earlier_stmt arguments.
6889         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6890         called on pattern stmts.
6891         (get_later_stmt): Likewise.
6893 2018-05-29  Martin Liska  <mliska@suse.cz>
6895         PR gcov-profile/85759
6896         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6897         env variables.
6899 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
6901         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6902         VEC_UNPACK_*_EXPR.
6903         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6904         VEC_PACK_*_EXPR.
6906         PR target/85918
6907         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6908         VEC_PACK_FLOAT_EXPR): New tree codes.
6909         * tree-pretty-print.c (op_code_prio): Handle
6910         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6911         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6912         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6913         * tree-inline.c (estimate_operator_cost): Likewise.
6914         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6915         * fold-const.c (const_binop): Likewise.
6916         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6917         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6918         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6919         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6920         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6921         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6922         * expr.c (expand_expr_real_2): Likewise.
6923         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6924         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6925         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6926         optabs.
6927         * optabs.c (expand_widen_pattern_expr): For
6928         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6929         sign from result type rather than operand's type.
6930         (expand_binop_directly): For vec_packu_float_optab and
6931         vec_packs_float_optab allow result type to be different from operand's
6932         type.
6933         * optabs-tree.c (optab_for_tree_code): Handle
6934         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6935         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
6936         * tree-vect-generic.c (expand_vector_operations_1):  Handle
6937         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6938         VEC_PACK_FLOAT_EXPR.
6939         * tree-vect-stmts.c (supportable_widening_operation): Handle
6940         FIX_TRUNC_EXPR.
6941         (supportable_narrowing_operation): Handle FLOAT_EXPR.
6942         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6943         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6944         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
6945         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6946         mode attributes.
6947         (vec_pack<floatprefix>_float_<mode>): New expander.
6948         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6949         attributes.
6950         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6951         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6952         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6953         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6954         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6955         Document.
6956         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6957         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6958         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6959         VEC_PACK_FLOAT_EXPR): Document.
6961 2018-05-29  Richard Biener  <rguenther@suse.de>
6963         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6964         member.
6965         (stmt_vec_info_vec): Make pointer.
6966         (init_stmt_vec_info_vec): Remove.
6967         (free_stmt_vec_info_vec): Likewise.
6968         (set_stmt_vec_info_vec): New function.
6969         (free_stmt_vec_infos): Likewise.
6970         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6971         (set_vinfo_for_stmt): Likewise.
6972         (get_earlier_stmt): Likewise.
6973         (get_later_stmt): Likewise.
6974         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6975         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6976         (vec_info::~vec_info): Free stmt_vec_infos.
6977         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6978         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6979         (pass_slp_vectorize::execute): Likewise.
6980         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6981         (free_stmt_vec_info_vec): Likewise.
6982         (set_stmt_vec_info_vec): New function.
6983         (free_stmt_vec_infos): Likewise.
6984         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6985         the global stmt_vec_info_vec.
6986         * tree-parloops.c (gather_scalar_reductions): Use
6987         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6988         vector.
6990 2018-05-29  Richard Biener  <rguenther@suse.de>
6992         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6994 2018-05-29  Martin Liska  <mliska@suse.cz>
6995             David Malcolm  <dmalcolm@redhat.com>
6997         * vec.c (test_reverse): New.
6998         (vec_c_tests): Add new test.
6999         * vec.h (vl_ptr>::reverse): New function.
7001 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
7003         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7005         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7006         and later.
7008 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7010         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7012 2018-05-28  Richard Biener  <rguenther@suse.de>
7014         PR tree-optimization/85933
7015         * tree-vect-data-refs.c (vect_record_base_alignments): Only
7016         look at stmts marked as vectorizable.
7018 2018-05-28  Richard Biener  <rguenther@suse.de>
7020         PR tree-optimization/85934
7021         * tree-vect-generic.c (expand_vector_operations_1): Hoist
7022         vector boolean check before scalar optimization.
7024 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
7026         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7027         for armv5te.
7029 2018-05-28  Mark Wielaard  <mark@klomp.org>
7031         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7032         if it is an expression containing a minus sign.
7034 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
7036         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7038 2018-05-27  Paul Koning  <ni1d@arrl.net>
7040         * config/pdp11/pdp11.md (truncsihi2): Remove.
7042 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
7043             Chung-Ju Wu  <jasonwucj@gmail.com>
7045         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7046         implementation.
7047         (unaligned_store_dw): Ditto.
7048         * config/nds32/nds32-memory-manipulation.c
7049         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7050         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7051         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7052         (emit_setmem_word_loop): Rename to ...
7053         (emit_setmem_doubleword_loop): ... this.
7054         (nds32_gen_dup_4_byte_to_word_value): New function.
7055         (nds32_gen_dup_8_byte_to_double_word_value): New function.
7056         (nds32_expand_setmem_loop): Refine implementation.
7057         (nds32_expand_setmem_loop_v3m): Ditto.
7058         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7059         pattern.
7061 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7063         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7065 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
7067         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7068         (nds32_init_machine_status): Initialize machine->attr_naked_p and
7069         machine->attr_no_prologue_p.
7070         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7071         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7072         (nds32_expand_epilogue): Consider attr_naked_p.
7073         (nds32_expand_epilogue_v3pop): Likewise.
7074         (nds32_can_use_return_insn): Likewise.
7075         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7076         attr_no_prologue_p fields.
7077         * config/nds32/nds32.opt (mret-in-naked-func): New option.
7079 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
7081         PR target/85918
7082         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7083         attributes.
7084         * config/i386/sse.md
7085         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7086         Rename to ...
7087         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7088         ... this.
7089         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7090         Rename to ...
7091         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7092         ... this.
7093         (*<floatsuffix>floatv2div2sf2): Rename to ...
7094         (*float<floatunssuffix>v2div2sf2): ... this.
7095         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7096         (float<floatunssuffix>v2div2sf2_mask): ... this.
7097         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7098         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7099         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7100         to ...
7101         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7102         ... this.
7103         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7104         Rename to ...
7105         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7106         ... this.
7107         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7108         Rename to ...
7109         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7110         ... this.
7111         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7112         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7113         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7114         gen_ufix_truncv8dfv8si2.
7115         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7116         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7117         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7118         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7119         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7120         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7121         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7122         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7124 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7126         PR target/85900
7127         PR target/85345
7128         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7130 2018-05-25  Jim Wilson  <jimw@sifive.com>
7132         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7133         * config/riscv/riscv.c (struct machine_function): Add
7134         interrupt_handler_p and attribute_checked_p fields.
7135         (riscv_attribute_table): Add interrupt.
7136         (riscv_interrupt_type_p): New.
7137         (riscv_save_reg_p): Save extra regs for interrupt handler.
7138         (riscv_use_save_libcall): Return false  for interrupt handler.
7139         (riscv_first_stack_step): Add forward declaration.
7140         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
7141         for interrupt handler with large frame.  Use it for saved reg list.
7142         (riscv_expand_prologue): Move flag_stack_usage_info support to
7143         eliminate duplication.
7144         (riscv_expand_epilogue): Generate mret for interrupt handler.
7145         (riscv_epilogue_uses): New.
7146         (riscv_can_use_return_insn): Return false for interrupt handler.
7147         (riscv_function_ok_for_sibcall): Likewise.
7148         (riscv_set_current_function): Add interrupt handler support.
7149         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7150         * config/riscv/riscv.md (UNSPECV_MRET): New.
7151         (GP_REGNUM): New.
7152         (riscv_frflags, riscv_fsflags): Use tab after opcode.
7153         (riscv_mret): New.
7154         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7156 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
7158         PR tree-optimization/85712
7159         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7160         this candidate has already been replaced in-situ by a copy.
7162 2018-05-25  Jason Merrill  <jason@redhat.com>
7164         PR c++/80485 - inline function non-zero address.
7165         * symtab.c (nonzero_address): Check DECL_COMDAT.
7167 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
7169         PR target/83628
7170         * config/alpha/alpha.md (ashlsi3): New insn pattern.
7171         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
7172         extension of SImode operation.  Use const123_operand predicate.
7173         (*saddsi_1): Remove.
7174         (*saddl_se_1): Ditto.
7175         (*ssubsi_1): Ditto.
7176         (*ssubl_se_1): Ditto.
7177         * config/alpha/predicates.md (const123_operand): New predicate.
7178         * config/alpha/constraints.md (P): Use IN_RANGE.
7180 2018-05-25  Richard Biener  <rguenther@suse.de>
7182         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7183         defaulted to true.
7184         (ref_maybe_used_by_stmt_p): Likewise.
7185         (stmt_may_clobber_ref_p): Likewise.
7186         (stmt_may_clobber_ref_p_1): Likewise.
7187         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7188         and pass it along.
7189         (ref_maybe_used_by_stmt_p): Likewise.
7190         (stmt_may_clobber_ref_p): Likewise.
7191         (stmt_may_clobber_ref_p_1): Likewise.
7192         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7193         the alias oracle to disambiguate DRs with stmts DR analysis
7194         couldn't handle.
7195         (vect_analyze_data_refs): Do not give up on not analyzable
7196         DRs for BB vectorization.  Remove code truncating the dataref
7197         vector.
7199 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
7201         PR target/85832
7202         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7203         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
7204         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7206 2018-05-25  Richard Biener  <rguenther@suse.de>
7208         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7209         function, combining stmt data ref gathering and fatal analysis
7210         parts.
7211         (vect_analyze_data_refs): Remove now redudnant code and simplify.
7212         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7213         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7214         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7215         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7217 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7219         PR tree-optimization/85720
7220         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7221         SCC if all partitions are builtins.
7222         (version_loop_by_alias_check): New parameter.  Generate cancelable
7223         runtime alias check if all partitions are builtins.
7224         (distribute_loop): Update call to above function.
7226 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7228         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7229         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7230         (parm_default_def_partition_arg): Ditto.
7231         (set_parm_default_def_partition): Ditto.
7232         (get_parm_default_def_partitions): Ditto and make it static.
7233         (get_undefined_value_partitions): Ditto and make it static.
7234         (remove_ssa_form): Refactor call to init_var_map here.
7235         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7236         computation for loop region.
7237         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7238         (register_default_def): Delete.
7239         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7240         (parm_default_def_partition_arg): Ditto.
7241         (set_parm_default_def_partition): Ditto.
7242         (get_parm_default_def_partitions): Ditto and make it static.
7243         (get_undefined_value_partitions): Ditto and make it static.
7244         (coalesce_with_default, coalesce_with_default): Update comment.
7245         (create_coalesce_list_for_region): New func factored out from
7246         create_outofssa_var_map.
7247         (populate_coalesce_list_for_outofssa): New func factored out from
7248         create_outofssa_var_map and coalesce_ssa_name.
7249         (create_outofssa_var_map): Delete.
7250         (coalesce_ssa_name): Refactor to support live range computation.
7251         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7252         (get_parm_default_def_partitions): Delete.
7253         (get_undefined_value_partitions): Ditto.
7254         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7255         computation for loop region.
7256         (new_tree_live_info, loe_visit_block): Ditto.
7257         (live_worklist, set_var_live_on_entry): Ditto.
7258         (calculate_live_on_exit, verify_live_on_entry): Ditto.
7259         * tree-ssa-live.h (struct _var_map): New fields.
7260         (init_var_map): Change decl.
7261         (region_contains_p): New.
7263 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
7265         * tree-ssa-live.h (live_merge_and_clear): Delete.
7267 2018-05-25  Richard Biener  <rguenther@suse.de>
7269         PR c++/85912
7270         * tree-dump.c (dequeue_and_dump): Remove access to removed
7271         operand 2 of a SWITCH_EXPR.
7273 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7275         * doc/sourcebuild.texi (vect_double_cond_arith): Include
7276         multiplication and division.
7277         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7278         (cond_udiv@var{m}, cond_umod@var{m}): Document.
7279         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7280         (cond_udiv_optab, cond_umod_optab): New optabs.
7281         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7282         (IFN_COND_RDIV): New internal functions.
7283         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7284         TRUNC_MOD_EXPR and RDIV_EXPR.
7285         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7286         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7287         New unspecs.
7288         (SVE_INT_BINARY): Include mult.
7289         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7290         (optab, sve_int_op): Handle mult.
7291         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7292         UNSPEC_COND_DIV.
7293         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7294         for SVE_INT_BINARY_SD.
7296 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7298         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7299         (optab, sve_int_op): Handle div and udiv.
7300         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7301         for SVE_INT_BINARY_SD.
7302         (*<optab><mode>3): New insn for the same.
7304 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7306         * tree-vect-patterns.c: Include predict.h.
7307         (vect_recog_divmod_pattern): Restrict check for division support
7308         to when optimizing for size.
7310 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7312         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7313         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7314         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7315         (gimple_match_op::set_op): Likewise.
7316         (gimple_resimplify4): Declare.
7317         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7318         (expr::gen_transform): Likewise.
7319         (decision_tree::gen): Generate a simplification routine for 4 operands.
7320         * gimple-match-head.c (gimple_simplify): Add an overload for
7321         4 operands.  In the top-level function, handle up to 4 call
7322         arguments and call gimple_resimplify4.
7323         (gimple_resimplify4): New function.
7324         (build_call_internal): Pass a fourth operand.
7325         (maybe_push_to_seq): Likewise.
7326         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7327         Fold VEC_COND_EXPRs of an operation and a default value into
7328         an IFN_COND_* function if possible.
7329         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7330         New unspecs.
7331         (SVE_COND_FP_BINARY): Include them.
7332         (optab, sve_fp_op): Handle them.
7333         (SVE_INT_BINARY_REV): New code iterator.
7334         (SVE_COND_FP_BINARY_REV): New int iterator.
7335         (commutative): New int attribute.
7336         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7337         Declare.
7338         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7339         function.
7340         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7341         (*cond_<optab><mode>): New patterns for reversed operands.
7343 2018-05-25  Richard Biener  <rguenther@suse.de>
7345         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7346         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7347         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7348         (STMT_VINFO_GROUPED_ACCESS): Adjust.
7349         * tree-vect-data-refs.c (everywhere): Adjust users.
7350         * tree-vect-loop.c (everywhere): Likewise.
7351         * tree-vect-slp.c (everywhere): Likewise.
7352         * tree-vect-stmts.c (everywhere): Likewise.
7353         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7355 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7357         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7358         Rename to...
7359         (gcc_cv_as_section_exclude): ... this.
7360         Try Solaris as #exclude syntax.
7361         * configure: Regenerate.
7362         * config.in: Regenerate.
7363         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7364         SECTION_EXCLUDE.
7365         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7366         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7368         * varasm.c (default_elf_asm_named_section): Don't check if
7369         HAVE_GAS_SECTION_EXCLUDE is defined.
7371 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7373         * doc/md.texi: Update the documentation of the cond_* optabs
7374         to mention the new final operand.  Fix GET_MODE_NUNITS call.
7375         Describe the scalar case too.
7376         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7377         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7378         instead of 2.
7379         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7380         (get_conditional_internal_fn): Update comment.
7381         * tree-vect-loop.c (vectorizable_reduction): Pass the original
7382         accumulator value as a final argument to conditional functions.
7383         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7384         a define_expand and add an "else" operand.  Assert for now that
7385         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
7386         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7387         (*cond_<optab><mode>): New patterns.
7388         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7389         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7390         (UNSPEC_COND_EOR): Delete.
7391         (optab): Remove associated mappings.
7392         (SVE_INT_BINARY): New code iterator.
7393         (sve_int_op): Remove int attribute and add "minus" to the code
7394         attribute.
7395         (SVE_COND_INT_OP): Delete.
7396         (SVE_COND_FP_OP): Rename to...
7397         (SVE_COND_FP_BINARY): ...this.
7399 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
7401         * optabs.c (can_reuse_operands_p): New function.
7402         (maybe_legitimize_operands): Try to reuse the results for
7403         earlier operands.
7405 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7407         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7408         Add {q} suffix to insn mnemonic.
7410 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7412         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7413         (msp430_warn_func_return): New.
7415 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
7417         * fold-const.c (tree_nonzero_bits): New function.
7418         * fold-const.h (tree_nonzero_bits): Likewise.
7419         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7420         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7422 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
7424         PR target/85900
7425         PR target/85345
7426         * varasm.c (assemble_alias): Check ifunc_resolver only on
7427         FUNCTION_DECL.
7429 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
7431         PR target/85903
7432         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7433         when memory input operand is handled.
7435 2018-05-24  Luis Machado  <luis.machado@linaro.org>
7437         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7438         global.
7439         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7441 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7443         * match.pd: Delay FMA folds until after vectorization.
7445 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
7447         PR target/83009
7448         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7449         address check not strict.
7451 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
7453         * gimple-match.h (gimple_match_op): New class.
7454         (mprts_hook): Replace parameters with a gimple_match_op *.
7455         (maybe_build_generic_op): Likewise.
7456         (gimple_simplified_result_is_gimple_val): Replace parameters with
7457         a const gimple_match_op *.
7458         (gimple_simplify): Replace code_helper * and tree * parameters with
7459         a gimple_match_op * parameter.
7460         (gimple_resimplify1): Replace code_helper *, tree and tree *
7461         parameters with a gimple_match_op * parameter.
7462         (gimple_resimplify2): Likewise.
7463         (gimple_resimplify3): Likewise.
7464         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7465         parameters with a gimple_match_op * parameter.
7466         * gimple-match-head.c (gimple_simplify): Change prototypes of
7467         auto-generated functions to take a gimple_match_op * instead of
7468         separate code_helper * and tree * parameters.  Make the same
7469         change in the top-level overload and update calls to the
7470         gimple_resimplify routines.  Update calls to the auto-generated
7471         functions and to maybe_push_res_to_seq in the publicly-facing
7472         operation-specific gimple_simplify overloads.
7473         (gimple_match_op::MAX_NUM_OPS): Define.
7474         (gimple_resimplify1): Replace rcode and ops with a single res_op
7475         parameter.  Update call to gimple_simplify.
7476         (gimple_resimplify2): Likewise.
7477         (gimple_resimplify3): Likewise.
7478         (mprts_hook): Replace parameters with a gimple_match_op *.
7479         (maybe_build_generic_op): Likewise.
7480         (build_call_internal): Replace type, nargs and ops with
7481         a gimple_match_op *.
7482         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7483         with a single gimple_match_op *.  Update calls to mprts_hook,
7484         build_call_internal and gimple_simplified_result_is_gimple_val.
7485         Factor out code that is common to the tree_code and combined_fn cases.
7486         * genmatch.c (expr::gen_transform): Replace tem_code and
7487         tem_ops with a gimple_match_op called tem_op.  Update calls
7488         to the gimple_resimplify functions and maybe_push_res_to_seq.
7489         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7490         res_ops.  Update call to the gimple_resimplify functions.
7491         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7492         (decision_tree::gen): Make the functions take a gimple_match_op *
7493         called res_op instead of separate res_code and res_ops parameters.
7494         Update call accordingly.
7495         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7496         and ops with a single res_op parameter.  Update calls to
7497         maybe_build_generic_op and maybe_push_res_to_seq.
7498         (fold_stmt_1): Update calls to gimple_simplify and
7499         replace_stmt_with_simplification.
7500         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7501         and gimple_simplified_result_is_gimple_val.
7502         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7503         gimple_simplify.
7504         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7505         with a gimple_match_op *.
7506         (vn_nary_build_or_lookup): Likewise.  Update call to
7507         vn_nary_build_or_lookup_1.
7508         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7509         gimple_match_op *.  Update calls to the gimple_resimplify routines
7510         and to gimple_simplified_result_is_gimple_val.
7511         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7512         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7513         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7514         (visit_nary_op): Likewise.
7515         (visit_reference_op_load): Likewise.
7517 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7519         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7520         modifier for printing the step amount.
7522 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
7524         PR target/78849
7525         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7526         types.
7528 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
7530         * doc/sourcebuild.texi (Endianness): New subsubsection.
7532 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7534         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7535         <prefetch_dynamic_strides>: New const bool field.
7536         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7537         prefetch_dynamic_strides.
7538         (exynosm1_prefetch_tune): Likewise.
7539         (thunderxt88_prefetch_tune): Likewise.
7540         (thunderx_prefetch_tune): Likewise.
7541         (thunderx2t99_prefetch_tune): Likewise.
7542         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7543         false.
7544         (aarch64_override_options_internal): Update to set
7545         PARAM_PREFETCH_DYNAMIC_STRIDES.
7546         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7547         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7548         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7549         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7550         prefetch-dynamic-strides setting.
7552 2018-05-23  Luis Machado  <luis.machado@linaro.org>
7554         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7555         <minimum_stride>: New const int field.
7556         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7557         minimum_stride field defaulting to -1.
7558         (exynosm1_prefetch_tune): Likewise.
7559         (thunderxt88_prefetch_tune): Likewise.
7560         (thunderx_prefetch_tune): Likewise.
7561         (thunderx2t99_prefetch_tune): Likewise.
7562         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7563         <default_opt_level>: Set to 3.
7564         (aarch64_override_options_internal): Update to set
7565         PARAM_PREFETCH_MINIMUM_STRIDE.
7566         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7567         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7568         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7569         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7570         stride is constant and is below the minimum stride threshold.
7572 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7574         * config/arm/arm-cpus.in (mode26): Delete.
7575         (armv4): Delete mode26 reference.
7576         * config/arm/arm.c (arm_configure_build_target): Delete use of
7577         isa_bit_mode26.
7579 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7581         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7582         New insn pattern.
7583         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7584         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
7585         for non-SSE modes.
7586         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
7587         (floatunsdidf2): Ditto.
7589 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
7591         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7592         (fixuns_trunc<mode>si2_avx512f): Ditto.
7593         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7594         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7595         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7597 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7599         PR rtl-optimization/79985
7600         * df-scan.c (df_insn_refs_collect): Remove special case for
7601         global registers and asm statements.
7603 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
7605         * extend.texi (Global Register Variables): Rewrite the bullet list.
7606         Note that the register is available for allocation. Note that access
7607         via inline asm must use constraints. Add note about async-signal
7608         handlers. Remove paragraph about automagic register selection.
7610 2018-05-23  Richard Biener  <rguenther@suse.de>
7612         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7613         of fixed offset from memset VN.
7615 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
7617         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7618         first_interp field.
7619         (alloc_cand_and_find_basis): Initialize first_interp field.
7620         (slsr_process_mul): Modify first_interp field.
7621         (slsr_process_add): Likewise.
7622         (slsr_process_cast): Modify first_interp field for each new
7623         interpretation.
7624         (slsr_process_copy): Likewise.
7625         (dump_candidate): Dump first_interp field.
7626         (replace_mult_candidate): Process all interpretations, not just
7627         subsequent ones.
7628         (replace_rhs_if_not_dup): Likewise.
7629         (replace_one_candidate): Likewise.
7631 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
7633         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7634         Add new boolean.
7635         (aarch64_needs_frame_chain): New function.
7636         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7638 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
7640         PR target/84882
7641         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7642         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7643         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7644         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7645         as true for strict-align.
7646         (aarch64_can_inline_p): Perform checks even when callee has no
7647         attributes to check for strict alignment.
7648         * doc/extend.texi (AArch64 Function Attributes): Document
7649         no-strict-align.
7650         * doc/invoke.texi: (AArch64 Options): Likewise.
7652 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
7654         PR tree-optimization/85853
7655         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7656         the handling of the root of the node to...
7657         (vect_slp_analyze_node_operations_1): ...this new function,
7658         and run the whole thing with the child nodes' def types
7659         set according to their SLP node's def type.
7661 2018-05-23  Richard Biener  <rguenther@suse.de>
7663         PR middle-end/85874
7664         * tree-data-ref.c (create_runtime_alias_checks): Defer
7665         and ignore overflow warnings.
7667 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
7669         PR tree-optimization/85822
7670         * tree-vrp.c (is_masked_range_test): Fix handling of negative
7671         constants.
7673 2018-05-23  Richard Biener  <rguenther@suse.de>
7675         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7676         memset constants via native_interpret_expr.
7678 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
7680         PR target/85345
7681         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7682         attribute.
7683         (cgraph_node::create_alias): Likewise.
7684         (cgraph_node::get_availability): Check ifunc_resolver instead
7685         of looking up ifunc attribute.
7686         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7687         * varasm.c (do_assemble_alias): Likewise.
7688         (assemble_alias): Likewise.
7689         (default_binds_local_p_3): Likewise.
7690         * cgraph.h (cgraph_node): Add ifunc_resolver.
7691         (cgraph_node::only_called_directly_or_aliased_p): Return false
7692         for IFUNC resolver.
7693         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7694         attribute.
7695         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7696         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7697         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7698         instead of looking up ifunc attribute.
7700 2018-05-22  Luis Machado  <luis.machado@linaro.org>
7702         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7704 2018-05-22  Martin Sebor  <msebor@redhat.com>
7706         PR middle-end/85359
7707         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7708         only when expasion succeeds.
7709         (expand_builtin_strcmp): Same.
7710         (expand_builtin_strncmp): Same.
7712 2018-05-22  Martin Sebor  <msebor@redhat.com>
7714         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7716 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7717             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7719         * config/aarch64/aarch64-ldpstp.md: Replace uses of
7720         aarch64_mem_pair_operand with memory_operand and delete operand swapping
7721         code.
7722         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7723         Add check for legitimate_address.
7724         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7725         (aarch64_swap_ldrstr_operands): New.
7726         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7727         Define prototype.
7729 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
7730             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7732         * config/aarch64/aarch64.md: New patterns to generate stp
7733         and ldp.
7734         (store_pair_sw, store_pair_dw): New patterns to generate stp for
7735         single words and double words.
7736         (load_pair_sw, load_pair_dw): Likewise.
7737         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7738         Delete.
7739         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7740         Delete.
7741         * config/aarch64/aarch64-ldpstp.md: Modify peephole
7742         for different mode ldpstp and add peephole for merged zero stores.
7743         Likewise for loads.
7744         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7745         Add size check.
7746         (aarch64_gen_store_pair): Rename calls to match new patterns.
7747         (aarch64_gen_load_pair): Rename calls to match new patterns.
7748         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7749         (load_pair<DREG:mode><DREG2:mode>): ... This.
7750         (store_pair<mode>): Rename to...
7751         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7752         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7753         New mode iterators.
7754         (V_INT_EQUIV): Handle SImode.
7755         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7756         New predicate.
7758 2018-05-22  Martin Sebor  <msebor@redhat.com>
7760         PR c/85623
7761         * calls.c (maybe_warn_nonstring_arg): Use string length to set
7762         or ajust the presumed bound on an operation to avoid unnecessary
7763         warnings.
7765 2018-05-22  Martin Sebor  <msebor@redhat.com>
7767         PR tree-optimization/85826
7768         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7769         assuming that a DECL necesarily has a constant size.
7771 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
7773         PR middle-end/85862
7774         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7776 2018-05-22  Richard Biener  <rguenther@suse.de>
7778         PR tree-optimization/85834
7779         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7780         non-constant and non-zero memset arguments.
7782 2018-05-22  Martin Liska  <mliska@suse.cz>
7784         PR ipa/85607
7785         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7787 2018-05-22  Richard Biener  <rguenther@suse.de>
7789         PR tree-optimization/85863
7790         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7791         comparisons when vectype is specified.
7792         (vectorizable_condition): Do not specify vectype for
7793         vect_is_simple_cond when SLP vectorizing.
7795 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
7797         PR target/85657
7798         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7799         define __ibm128 as long double.
7800         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7801         as a distinct type when IEEE 128-bit support is enabled.
7802         (init_float128_ieee): Fix up conversions between IFmode and IEEE
7803         128-bit types to use the correct functions.
7804         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7805         convert between 128-bit floating point types that have different
7806         modes but the same representation, instead of using gen_lowpart to
7807         makean alias.
7808         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7809         KFmode.
7810         (IFKF_reg): New attributes to give the register constraints for
7811         IFmode and KFmode.
7812         (extend<mode>tf2_internal): New insns to mark an explicit
7813         conversion between 128-bit floating point types that have a
7814         different mode but share the same representation.
7816 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
7818         PR tree-optimization/85814
7819         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7820         a null return from get_strinfo when unsharing the next
7821         strinfo in the chain.
7823 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7825         PR gcc/84923
7826         * varasm.c (weak_finish): Clean up weak_decls.
7828 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7830         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7831         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7832         UNSPEC_UADALP values.
7833         * config/aarch64/iterators.md (ABAL): New int iterator.
7834         (ABDL2): Likewise.
7835         (ADALP): Likewise.
7836         (sur): Add mappings for the above.
7837         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7838         New define_insn.
7839         (aarch64_<sur>abal<mode>_4): Likewise.
7840         (aarch64_<sur>adalp<mode>_3): Likewise.
7841         (<sur>sadv16qi): New define_expand.
7843 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
7845         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7846         (*movdf_internal): Ditto.
7847         (*rcpsf2_sse): Ditto.
7848         (*rsqrtsf2_sse): Ditto.
7849         (*sqrt<mode>2_sse): Ditto.
7851 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
7853         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7854         eor3q<mode>4.
7855         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7856         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7857         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7858         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7859         vbcaxq_s64): New.
7860         * config/aarch64/arm_neon.h: Likewise.
7861         * config/aarch64/iterators.md (VQ_I): New.
7863 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
7865         * config.gcc: Add arc/t-multilib-linux to tmake_file for
7866         arc*-*-linux*.
7867         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7868         MULTILIB_DIRNAMES
7870 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7872         * config/nds32/constraints.md (S): New constraint.
7873         * config/nds32/nds32.md (call_internal): Use constraint S.
7874         (call_value_internal): Likewise.
7875         (sibcall_internal): Likewise.
7876         (sibcall_value_internal): Likewise.
7878 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7879             Chung-Ju Wu  <jasonwucj@gmail.com>
7881         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7882         into consideration.
7884 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
7885             Chung-Ju Wu  <jasonwucj@gmail.com>
7887         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7888         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7889         (nds32_rtx_costs_impl): Simplify.
7890         (nds32_address_cost_impl): Simplify.
7891         (nds32_init_rtx_costs): New function.
7892         (nds32_rtx_costs_speed_prefer): Likewise.
7893         (nds32_rtx_costs_size_prefer): Likewise.
7894         (nds32_address_cost_speed_prefer): Likewise.
7895         (nds32_address_cost_speed_fwprop): Likewise.
7896         (nds32_address_cost_size_prefer): Likewise.
7897         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7898         * config/nds32/nds32.c (nds32_option_override): Use
7899         nds32_init_rtx_costs function.
7901 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
7903         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7904         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7905         (TARGET_PIPELINE_N8): Likewise.
7906         (TARGET_PIPELINE_N10): Likewise.
7907         (TARGET_PIPELINE_N13): Likewise.
7908         (TARGET_PIPELINE_GRAYWOLF): Likewise.
7910 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
7912         * config/nds32/nds32-fpu.md: Update copyright year.
7914 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7916         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7918 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7920         * config/nds32/nds32.c
7921         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7922         * config/nds32/nds32.opt (minline-asm-r15): New option.
7924 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7926         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7927         MASK_HW_ABS.
7928         * config/nds32/nds32.md (abssi2): New pattern.
7930 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
7932         * config/i386/i386.md (rex64namesuffix): New mode attribute.
7933         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7934         Merge insn pattern from sse_cvtsi2ss<round_name> and
7935         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7936         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7937         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7938         using SWI48 mode iterator.
7939         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7940         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7941         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7942         pattern from sse_cvttss2si<round_saeonly_name>
7943         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7944         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7945         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7946         using SWI48 mode iterator.
7947         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7948         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7949         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7950         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7951         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7952         using SWI48 mode iterator.
7953         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7954         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7955         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7956         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7957         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7958         SWI48 mode iterator.
7959         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7960         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7961         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7962         pattern from sse_cvttsd2si<round_saeonly_name>
7963         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7965 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7967         * config/nds32/nds32-md-auxiliary.c
7968         (nds32_valid_smw_lwm_base_p): Refine.
7969         (nds32_output_smw_single_word): Refine.
7970         (nds32_output_smw_double_word): New.
7971         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7973 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
7975         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7976         (nds32_output_stack_pop): Refine.
7977         (nds32_expand_unaligned_load): Refine.
7978         (nds32_expand_unaligned_store): Refine.
7980 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
7981             Chung-Ju Wu  <jasonwucj@gmail.com>
7983         * config/nds32/constants.md: Add TP_REGNUM constant.
7984         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7985         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7986         UNSPEC_ADD32.
7987         * config/nds32/nds32-doubleword.md: Consider flag_pic.
7988         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7989         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7990         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7991         and PIC code generation.
7992         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7993         code generation.
7994         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7995         optimization.
7996         * config/nds32/nds32.md: Support TLS and PIC.
7997         * config/nds32/nds32.c: Support TLS and PIC.
7998         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7999         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8000         predicate.
8002 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
8004         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8005         mode with E_ prefix.
8007 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
8008             Chung-Ju Wu  <jasonwucj@gmail.com>
8010         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8011         * config/nds32/nds32-md-auxiliary.c
8012         (symbolic_reference_mentioned_p): New.
8013         (nds32_legitimize_ict_address): New.
8014         (nds32_expand_ict_move): New.
8015         (nds32_indirect_call_referenced_p): New.
8016         (nds32_symbol_binds_local_p): Delete.
8017         (nds32_long_call_p): Modify.
8018         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8019         * config/nds32/nds32-protos.h
8020         (symbolic_reference_mentioned_p): Declare.
8021         (nds32_legitimize_ict_address): Declare.
8022         (nds32_expand_ict_move): Declare.
8023         (nds32_indirect_call_referenced_p): Declare.
8024         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8025         (nds32_relax_group): Use nds32_ict_const_p as condition.
8026         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8027         (nds32_asm_file_start): Output ict_model directive in asm code.
8028         (nds32_legitimate_address_p): Consider indirect call.
8029         (nds32_print_operand): Consider indirect call.
8030         (nds32_print_operand_address): Consider indirect call.
8031         (nds32_insert_attributes): Handle "indirect_call" attribute.
8032         (TARGET_LEGITIMATE_ADDRESS_P): Define.
8033         (TARGET_LEGITIMATE_CONSTANT_P): Define.
8034         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8035         (TARGET_DELEGITIMIZE_ADDRESS): Define.
8036         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8037         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8038         (TARGET_ICT_MODEL_SMALL): Define.
8039         (TARGET_ICT_MODEL_LARGE): Define.
8040         * config/nds32/nds32.md (movsi): Consider ict model.
8041         (call, call_value): Consider ict model.
8042         (sibcall, sibcall_value): Consider ict model.
8043         * config/nds32/nds32.opt (mict-model): New option.
8044         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8045         model.
8047 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
8048             Monk Chiang  <sh.chiang04@gmail.com>
8049             Jim Wilson <jimw@sifive.com>
8051         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8052         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
8053         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8054         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8055         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
8056         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8057         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8058         compute save_libcall_adjustment properly.
8059         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8060         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8061         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8062         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8063         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8064         (ABI_SPEC): Handle mabi=ilp32e.
8065         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8066         (RVE): Add RVE mask.
8067         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8068         <-march>: Add rv32e as an example.
8070 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
8072         PR c++/82899
8073         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8074         (intra_create_variable_infos): Handle C++ constructors.
8076 2018-05-18  Martin Liska  <mliska@suse.cz>
8078         * passes.def: Remove a redundant pass.
8080 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8082         PR bootstrap/85838
8083         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8085 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8087         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8088         (ARMv4): Update.
8089         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8090         (ARMv6m): Update.
8091         (armv2, armv2a, armv3, armv3m): Delete architectures.
8092         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8093         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8094         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8095         Delete cpus.
8096         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8097         (*mulsidi3adddi): Likewise.
8098         (mulsidi3): Likewise.
8099         (*mulsidi3_nov6): Likewise.
8100         (umulsidi3): Likewise.
8101         (umulsidi3_nov6): Likewise.
8102         (umaddsidi4): Likewise.
8103         (*umulsidi3adddi): Likewise.
8104         (smulsi3_highpart): Likewise.
8105         (*smulsi3_highpart_nov6): Likewise.
8106         (umulsi3_highpart): Likewise.
8107         (*umulsi3_highpart_nov6): Likewise.
8108         * config/arm/arm.h (arm_arch3m): Delete.
8109         * config/arm/arm.c (arm_arch3m): Delete.
8110         (arm_option_override_internal): Update armv3-related comment.
8111         (arm_configure_build_target): Delete use of isa_bit_mode32.
8112         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8113         (arm_rtx_costs_internal): Delete check of arm_arch3m.
8114         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8115         (mulsa3): Likewise.
8116         (mulusa3): Likewise.
8117         * config/arm/arm-protos.h (arm_arch3m): Delete.
8118         * config/arm/arm-tables.opt: Regenerate.
8119         * config/arm/arm-tune.md: Likewise.
8120         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8121         deleted architectures.
8123 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8125         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8126         (armv5t, armv5te): New features.
8127         (ARMv5, ARMv5e): Delete fgroups.
8128         (ARMv5t, ARMv5te): Adjust for above changes.
8129         (ARMv6m): Likewise.
8130         (armv5, armv5e): Delete arches.
8131         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8132         arm_arch5.
8133         (*call_reg_arm): Likewise.
8134         (*call_value_reg_armv5): Likewise.
8135         (*call_value_reg_arm): Likewise.
8136         (*call_symbol): Likewise.
8137         (*call_value_symbol): Likewise.
8138         (*sibcall_insn): Likewise.
8139         (*sibcall_value_insn): Likewise.
8140         (clzsi2): Likewise.
8141         (prefetch): Likewise.
8142         (define_split and define_peephole2 dependent on arm_arch5):
8143         Likewise.
8144         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8145         arm_arch5e.
8146         (TARGET_ARM_QBIT): Likewise.
8147         (TARGET_DSP_MULTIPLY): Likewise.
8148         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8149         (arm_arch5, arm_arch5e): Delete.
8150         (arm_arch5t, arm_arch5te): Declare.
8151         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8152         (arm_arch5t): Declare.
8153         (arm_option_reconfigure_globals): Update for the above.
8154         (arm_options_perform_arch_sanity_checks): Update comment, replace
8155         use of arm_arch5 with arm_arch5t.
8156         (use_return_insn): Likewise.
8157         (arm_emit_call_insn): Likewise.
8158         (output_return_instruction): Likewise.
8159         (arm_final_prescan_insn): Likewise.
8160         (arm_coproc_builtin_available): Likewise.
8161         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8162         arm_arch5e with arm_arch5t and arm_arch5te.
8163         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8164         (arm_arch5t, arm_arch5te): Declare.
8165         * config/arm/arm-tables.opt: Regenerate.
8166         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8167         * config/arm/t-multilib: Likewise.
8168         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8169         instead of arm_arch5.
8170         (*call_reg_thumb1): Likewise.
8171         (*call_value_reg_thumb1_v5): Likewise.
8172         (*call_value_reg_thumb1): Likewise.
8173         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8174         unreachable path.
8175         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8177 2018-05-18  Martin Liska  <mliska@suse.cz>
8179         PR gcov-profile/84846
8180         * doc/gcov.texi: Document -t option of gcov tool.
8182 2018-05-18  Martin Liska  <mliska@suse.cz>
8184         PR gcov-profile/84846
8185         * gcov.c (print_usage): Add new -t option.
8186         (process_args): Handle the option.
8187         (generate_results): Use stdout as output when requested by
8188         the option.
8190 2018-05-18  Martin Liska  <mliska@suse.cz>
8192         PR gcov-profile/84846
8193         * coverage.c (coverage_init): Write PWD to .gcno file.
8194         * doc/gcov.texi: Document how working directory is printed.
8195         * gcov-dump.c (dump_gcov_file): Print PWD.
8196         * gcov.c (output_intermediate_file): Likewise.
8197         (read_graph_file): Read PWD string.
8198         (output_lines): Print PWD.
8200 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8202         PR middle-end/85817
8203         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8204         for retval and return false if all args to phi are zero.
8206 2018-05-18  Richard Biener  <rguenther@suse.de>
8208         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8209         method.
8210         (evrp_dom_walker::before_dom_children): Call it.
8212 2018-05-18  Richard Biener  <rguenther@suse.de>
8214         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8215         results when processing array refs with variable index.
8217 2018-05-18  Toon Moene  <toon@moene.org>
8219         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8220         directly after that of -floop-interchange. Indicate that both
8221         options are enabled by default when specifying -O3.
8223 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8225         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8226         iterator.  Delete separate integer-mode vec_set<mode> expander.
8227         (aarch64_simd_vec_setv2di): Delete.
8228         (vec_setv2di): Delete.
8229         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8230         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
8231         the "w, r" alternative.
8233 2018-05-18  Martin Liska  <mliska@suse.cz>
8235         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8236         * tree-pass.h (make_pass_lower_switch_O0): New function.
8237         * tree-switch-conversion.c (node_has_low_bound): Remove.
8238         (node_has_high_bound): Likewise.
8239         (node_is_bounded): Likewise.
8240         (class pass_lower_switch): Make it a template type and create
8241         two instances.
8242         (pass_lower_switch::execute): Add template argument.
8243         (make_pass_lower_switch): New function.
8244         (make_pass_lower_switch_O0): New function.
8245         (do_jump_if_equal): Remove.
8246         (emit_case_nodes): Simplify to just handle all 3 cases and leave
8247         all the hard work to tree optimization passes.
8249 2018-05-18  Martin Liska  <mliska@suse.cz>
8251         * dbgcnt.c (limit_low): Renamed from limit.
8252         (limit_high): New variable.
8253         (dbg_cnt_is_enabled): Check for upper limit.
8254         (dbg_cnt): Adjust dumping.
8255         (dbg_cnt_set_limit_by_index): Add new argument for high
8256         value.
8257         (dbg_cnt_set_limit_by_name): Likewise.
8258         (dbg_cnt_process_single_pair): Parse new format.
8259         (dbg_cnt_process_opt): Use strtok.
8260         (dbg_cnt_list_all_counters): Remove 'value' and add
8261         'limit_high'.
8262         * doc/invoke.texi: Document changes.
8264 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
8266         * doc/sourcebuild.texi (scalar_all_fma): Document.
8267         * tree.def (FMA_EXPR): Delete.
8268         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8269         * internal-fn.c (ternary_direct): New macro.
8270         (expand_ternary_optab_fn): Likewise.
8271         (direct_ternary_optab_supported_p): Likewise.
8272         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8273         * builtins.c (fold_builtin_fma): Delete.
8274         (fold_builtin_3): Don't call it.
8275         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8276         * expr.c (expand_expr_real_2): Likewise.
8277         * fold-const.c (operand_equal_p): Likewise.
8278         (fold_ternary_loc): Likewise.
8279         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8280         * gimple.c (DEFTREECODE): Likewise.
8281         * gimplify.c (gimplify_expr): Likewise.
8282         * optabs-tree.c (optab_for_tree_code): Likewise.
8283         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8284         * tree-eh.c (operation_could_trap_p): Likewise.
8285         (stmt_could_throw_1_p): Likewise.
8286         * tree-inline.c (estimate_operator_cost): Likewise.
8287         * tree-pretty-print.c (dump_generic_node): Likewise.
8288         (op_code_prio): Likewise.
8289         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8290         * tree-ssa-operands.c (get_expr_operands): Likewise.
8291         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8292         * fold-const-call.h (fold_fma): Delete.
8293         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8294         CFN_FNMA and CFN_FNMS.
8295         (fold_fma): Delete.
8296         * genmatch.c (combined_fn): New enum.
8297         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8298         (commutative_op): New function.
8299         (commutate): Use it.  Handle more than 2 operands.
8300         (dt_operand::gen_gimple_expr): Use commutative_op.
8301         (parser::parse_expr): Allow :c to be used with non-binary
8302         operators if the commutative operand is known.
8303         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8304         CFN_FMS, CFN_FNMA and CFN_FNMS.
8305         (backprop::process_assign_use): Remove FMA_EXPR handling.
8306         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8307         (gen_hsa_fma): New function.
8308         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8309         IFN_FNMA and IFN_FNMS.
8310         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8311         * gimple-fold.h (follow_all_ssa_edges): Declare.
8312         * gimple-fold.c (follow_all_ssa_edges): New function.
8313         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8314         gimple_build interface and use follow_all_ssa_edges to fold the result.
8315         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8316         instead of checking for optabs directly.
8317         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8318         rather than FMA_EXPRs.
8319         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8320         call to IFN_FMA instead of an FMA_EXPR.
8322 2018-05-17  Jim Wilson  <jimw@sifive.com>
8324         * expr.c (do_tablejump): When converting index to Pmode, if we have a
8325         sign extended promoted subreg, and the range does not have the sign bit
8326         set, then do a sign extend.
8328         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8329         test, check for sign extended subreg and/or constant operands, and
8330         do a sign extend in that case.
8332 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
8334         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8335         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8336         Add untyped.
8337         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8338         Change logics_shift_reg to logics_shift_imm.
8339         (thunderx2t99_fp_loadpair_basic): Delete.
8340         (thunderx2t99_fp_storepair_basic): Delete.
8341         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8342         (thunderx2t99_asimd_polynomial): Delete.
8343         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8344         and neon_fp_mul_d_scalar_q.
8345         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8346         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8347         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8348         (thunderx2t99_asimd_lut): Add missing tbl types.
8349         (thunderx2t99_asimd_ext): Delete.
8350         (thunderx2t99_asimd_load1_1_mult): Delete.
8351         (thunderx2t99_asimd_load1_2_mult): Delete.
8352         (thunderx2t99_asimd_load1_ldp): New.
8353         (thunderx2t99_asimd_load1): New.
8354         (thunderx2t99_asimd_load2): Add missing *load2* types.
8355         (thunderx2t99_asimd_load3): New.
8356         (thunderx2t99_asimd_load4): New.
8357         (thunderx2t99_asimd_store1_1_mult): Delete.
8358         (thunderx2t99_asimd_store1_2_mult): Delete.
8359         (thunderx2t99_asimd_store2_mult): Delete.
8360         (thunderx2t99_asimd_store2_onelane): Delete.
8361         (thunderx2t99_asimd_store_stp): New.
8362         (thunderx2t99_asimd_store1): New.
8363         (thunderx2t99_asimd_store2): New.
8364         (thunderx2t99_asimd_store3): New.
8365         (thunderx2t99_asimd_store4): New.
8367 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
8369         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8370         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
8372 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
8373             Segher Boessenkool  <segher@kernel.crashing.org>
8375         PR target/85698
8376         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8377         operand.
8379 2018-05-17  Richard Biener  <rguenther@suse.de>
8381         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8382         for pruning loop and prune defs feeding only already visited PHIs.
8384 2018-05-17  Richard Biener  <rguenther@suse.de>
8386         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8388 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
8389             Richard Biener  <rguenther@suse.de>
8391         PR tree-optimization/85793
8392         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8393         for VMAT_ELEMENTWISE.
8395 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8397         * internal-fn.h (lookup_internal_fn): Declare
8398         * internal-fn.c (lookup_internal_fn): New function.
8399         * gimple.c (gimple_build_call_from_tree): Handle calls to
8400         internal functions.
8401         * gimple-pretty-print.c (dump_gimple_call): Print "." before
8402         internal function names.
8403         * tree-pretty-print.c (dump_generic_node): Likewise.
8404         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8406 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
8408         * gimple-fold.h (gimple_build): Make the function forms take
8409         combined_fn rather than built_in_function.
8410         (gimple_simplify): Likewise.
8411         * gimple-match-head.c (gimple_simplify): Likewise.
8412         * gimple-fold.c (gimple_build): Likewise.
8413         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8414         rather than gimple_build_call_internal.
8415         (get_initial_defs_for_reduction): Likewise.
8416         (vect_create_epilog_for_reduction): Likewise.
8417         (vectorizable_live_operation): Likewise.
8419 2018-05-17  Martin Liska  <mliska@suse.cz>
8421         * gimple-ssa-sprintf.c (format_directive): Do not use
8422         space in between 'G_' and '('.
8424 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
8426         PR target/85323
8427         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8428         even if the mask is not all ones.
8430         PR target/85323
8431         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8432         vector.
8433         (ix86_gimple_fold_builtin): Likewise.
8435         PR target/85323
8436         * config/i386/i386.c: Include tree-vector-builder.h.
8437         (ix86_vector_shift_count): New function.
8438         (ix86_fold_builtin): Fold shift builtins by scalar count.
8439         (ix86_gimple_fold_builtin): Likewise.
8441         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8442         _mm512_setzero): New intrinsics.
8444 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
8445             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8447         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8448         code generation for cases where splatting a value is not useful.
8449         * simplify-rtx.c (simplify_ternary_operation): Simplify
8450         vec_merge across a vec_duplicate and a paradoxical subreg forming
8451         a vector mode to a vec_concat.
8453 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
8455         * config.gcc: Support "goldmont-plus".
8456         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8457         "goldmont-plus".
8458         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8459         PROCESSOR_GOLDMONT_PLUS.
8460         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8461         (processor_target_table): Add "goldmont-plus".
8462         (PTA_GOLDMONT_PLUS): Define.
8463         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8464         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8465         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8466         (fold_builtin_cpu): Add "goldmont-plus".
8467         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8468         (ix86_option_override_internal): Add "goldmont-plus".
8469         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8470         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8471         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8472         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8474 2018-05-17  Richard Biener  <rguenther@suse.de>
8476         PR tree-optimization/85757
8477         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8478         remove defs that only feed that PHI from further processing.
8480 2018-05-16  Jim Wilson  <jimw@sifive.com>
8482         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8483         asterisk to name.
8484         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8486 2018-05-16  Mark Wielaard  <mark@klomp.org>
8488         * dwarf2out.c (count_index_strings): New function.
8489         (output_indirect_strings): Call count_index_strings and generate
8490         header for dwarf_version >= 5.
8492 2018-05-16  Mark Wielaard  <mark@klomp.org>
8494         * dwarf2out.c (dwarf_FORM): New function.
8495         (set_indirect_string): Use dwarf_FORM.
8496         (reset_indirect_string): Likewise.
8497         (size_of_die): Likewise.
8498         (value_format): Likewise.
8499         (output_die): Likewise.
8500         (add_skeleton_AT_string): Likewise.
8501         (output_macinfo_op): Likewise.
8502         (index_string): Likewise.
8503         (output_index_string_offset): Likewise.
8504         (output_index_string): Likewise.
8505         (count_index_strings): Likewise.
8507 2018-05-16  Carl Love  <cel@us.ibm.com>
8509         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8510         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8512 2018-05-16  Martin Jambor  <mjambor@suse.cz>
8514         * ipa-prop.c (ipa_free_all_edge_args): Remove.
8515         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8517 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
8519         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8520         (fnma<mode>4): Likewise.
8521         (fms<mode>4): Likewise.
8522         (fnms<mode>4): Likewise.
8523         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8524         (aarch64_fnma<mode>4): Likewise.
8525         (aarch64_fms<mode>4): Likewise.
8526         (aarch64_fnms<mode>4): Likewise.
8527         (aarch64_fnmadd<mode>4): Likewise.
8529 2018-05-16  Jason Merrill  <jason@redhat.com>
8531         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
8533 2018-05-16  Richard Biener  <rguenther@suse.de>
8535         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8536         (dump_stmt_cost): Declare.
8537         (add_stmt_cost): Dump cost we add.
8538         (add_stmt_costs): New function.
8539         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8540         No longer exported.
8541         (vect_analyze_stmt): Adjust prototype.
8542         (vectorizable_condition): Likewise.
8543         (vectorizable_live_operation): Likewise.
8544         (vectorizable_reduction): Likewise.
8545         (vectorizable_induction): Likewise.
8546         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8547         cost vector to pass to vectorizable_ and record afterwards.
8548         (vect_model_reduction_cost): Take cost vector argument and adjust.
8549         (vect_model_induction_cost): Likewise.
8550         (vectorizable_reduction): Likewise.
8551         (vectorizable_induction): Likewise.
8552         (vectorizable_live_operation): Likewise.
8553         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8554         SLP_TREE_NUMBER_OF_VEC_STMTS.
8555         (vect_analyze_slp_cost_1): Remove.
8556         (vect_analyze_slp_cost): Likewise.
8557         (vect_slp_analyze_node_operations): Take visited args and
8558         a target cost vector.  Avoid processing already visited stmt sets.
8559         (vect_slp_analyze_operations): Use a local cost vector to gather
8560         costs and register those of non-discarded instances.
8561         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8562         (vect_schedule_slp_instance): Remove copying of
8563         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
8564         zero.
8565         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8566         adding cost.  Record cost entry location.
8567         (vect_prologue_cost_for_slp_op): Function to compute cost of
8568         a constant or invariant generated for SLP vect in the prologue,
8569         split out from vect_analyze_slp_cost_1.
8570         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
8571         (vect_model_promotion_demotion_cost): Likewise.
8572         (vect_model_store_cost): Likewise, make static.
8573         (vect_model_load_cost): Likewise.
8574         (vectorizable_bswap): Add cost vector arg and adjust.
8575         (vectorizable_call): Likewise.
8576         (vectorizable_simd_clone_call): Likewise.
8577         (vectorizable_conversion): Likewise.
8578         (vectorizable_assignment): Likewise.
8579         (vectorizable_shift): Likewise.
8580         (vectorizable_operation): Likewise.
8581         (vectorizable_store): Likewise.
8582         (vectorizable_load): Likewise.
8583         (vectorizable_condition): Likewise.
8584         (vectorizable_comparison): Likewise.
8585         (can_vectorize_live_stmts): Likewise.
8586         (vect_analyze_stmt): Likewise.
8587         (vect_transform_stmt): Adjust calls to vectorizable_*.
8588         * tree-vectorizer.c: Include gimple-pretty-print.h.
8589         (dump_stmt_cost): New function.
8591 2018-05-16  Richard Biener  <rguenther@suse.de>
8593         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8594         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8595         * tree-ssa-dse.c: Include tree-ssa-loop.h.
8596         (check_name): New callback.
8597         (dse_classify_store): Track cycles via a visited bitmap of PHI
8598         defs and simplify handling of in-loop and across loop dead stores
8599         and properly fail for loop-variant refs.  Handle byte-tracking with
8600         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8601         limiting the walk.
8603 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
8605         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8606         (vect_get_mask_type_for_stmt): Likewise.
8607         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8608         split out from...
8609         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
8610         to determine the statement's vector type and the vector type that
8611         should be used for calculating nunits.  Deal with cases in which
8612         the type has to be deferred.
8613         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8614         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8615         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8616         (vect_determine_vf_for_stmt): New functions, split out from...
8617         (vect_determine_vectorization_factor): ...here.
8618         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8619         (vect_get_mask_type_for_stmt): New functions, split out from
8620         vect_determine_vectorization_factor.
8622 2018-05-16  Richard Biener  <rguenther@suse.de>
8624         * tree-cfg.c (verify_gimple_assign_ternary): Properly
8625         verify the [VEC_]COND_EXPR embedded comparison.
8627 2018-05-15  Martin Sebor  <msebor@redhat.com>
8629         PR tree-optimization/85753
8630         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8631         RECORD_TYPE in addition to ARRAY_TYPE.
8633 2018-05-15  Martin Sebor  <msebor@redhat.com>
8635         PR middle-end/85643
8636         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8638 2018-05-15  Richard Biener  <rguenther@suse.de>
8640         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8641         add by_clobber_p one.  Change algorithm to collect all defs
8642         representing uses we need to walk and try reducing them to
8643         a single one before failing.
8644         (dse_dom_walker::dse_optimize_stmt): Adjust.
8646 2018-05-13  Mark Wielaard  <mark@klomp.org>
8648         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8649         (size_of_loc_descr): Likewise.
8650         (output_loc_operands): Likewise.
8651         (output_loc_operands_raw): Likewise.
8652         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8653         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8654         (hash_loc_operands): Likewise.
8655         (compare_loc_operands): Likewise.
8657 2018-05-14  Mark Wielaard  <mark@klomp.org>
8659         * dwarf2out.c (count_index_addrs): New function.
8660         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8662 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8664         PR tree-optimization/83648
8665         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8666         return value as malloc candidate.
8668 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8670         PR ipa/85734
8671         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8672         param as true in call to suggest_attribute.
8674 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
8676         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8677         -mreadonly-in-sdata.
8679 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8681         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8682         New pattern.
8683         (aarch64_crypto_aesd_fused): Likewise.
8685 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
8687         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8688         (movsi_aarch64): Likewise.
8689         (load_pairsi): Likewise.
8690         (load_pairdi): Likewise.
8691         (store_pairsi): Likewise.
8692         (store_pairdi): Likewise.
8693         (load_pairsf): Likewise.
8694         (load_pairdf): Likewise.
8695         (store_pairsf): Likewise.
8696         (store_pairdf): Likewise.
8697         (zero_extend): Likewise.
8698         (trunc): Swap alternatives.
8699         (fcvt_target): Add '?' to prefer w over r.
8701 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
8703         PR target/85756
8704         * config/i386/i386.md: Disallow non-commutative arithmetics in
8705         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8706         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
8707         in the peephole2 before it.
8709 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
8711         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8712         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8713         (ix86_handle_option): Handle -mcldemote.
8714         * config.gcc: New header.
8715         * config/i386/cldemoteintrin.h: New file.
8716         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8717         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8718         -mcldemote.
8719         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8720         OPTION_MASK_ISA_CLDEMOTE.
8721         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8722         (ix86_valid_target_attribute_inner_p): Ditto.
8723         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8724         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8725         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8726         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8727         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8728         (cldemote): New.
8729         * config/i386/i386.opt: Add -mcldemote.
8730         * config/i386/x86intrin.h: New header.
8731         * doc/invoke.texi: Add -mcldemote.
8733 2018-05-14  Richard Biener  <rguenther@suse.de>
8735         * doc/match-and-simplify.texi: Adjust :s documentation.
8737 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
8739         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8740         intended memcpy size.
8741         (REORDER_45): Likewise.
8743 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
8745         * sort.cc: New file.
8746         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8747         * vec.c (qsort_chk): Use gcc_qsort.
8748         * Makefile.in (OBJS-libcommon): Add sort.o.
8749         (build/sort.o): New target.  Use it...
8750         (BUILD_RTL): ... here, and...
8751         (build/gencfn-macros): ... here, and...
8752         (build/genmatch): ... here.
8754 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8755             Chung-Ju Wu  <jasonwucj@gmail.com>
8757         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8758         * config/nds32/nds32-graywolf.md: New file.
8759         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8760         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8761         pipeline.
8762         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8763         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8764         * config/nds32/nds32.md (pipeline_model): Add graywolf.
8765         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8766         * config/nds32/pipelines.md: Include n15 settings.
8768 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8769             Chung-Ju Wu  <jasonwucj@gmail.com>
8771         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8772         * config/nds32/nds32-n13.md: New file.
8773         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8774         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8775         pipeline.
8776         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8777         * config/nds32/nds32.md (pipeline_model): Add n13.
8778         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8779         * config/nds32/pipelines.md: Include n13 settings.
8781 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
8782             Chung-Ju Wu  <jasonwucj@gmail.com>
8784         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8785         * config/nds32/nds32-n10.md: New file.
8786         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8787         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8788         pipeline.
8789         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8790         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8791         * config/nds32/nds32.md (pipeline_model): Add n10.
8792         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8793         * config/nds32/pipelines.md: Include n10 settings.
8795 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
8796             Kito Cheng  <kito.cheng@gmail.com>
8797             Chung-Ju Wu  <jasonwucj@gmail.com>
8799         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8800         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8801         Add enum values for DSP extension instructions.
8802         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8803         New constraints.
8804         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8805         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8806         New code iterators.
8807         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8808         * config/nds32/nds32-dspext.md: New file for DSP implementation.
8809         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8810         * config/nds32/nds32-intrinsic.md: Likewise.
8811         * config/nds32/nds32_intrinsic.h: Likewise.
8812         * config/nds32/nds32-md-auxiliary.c: Likewise.
8813         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8814         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8815         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8816         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8817         * config/nds32/nds32-protos.h: New declarations for DSP extension.
8818         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8819         TYPE_DMAC in switch statement.
8820         * config/nds32/nds32.c: New checking and implementation for DSP
8821         extension instructions.
8822         * config/nds32/nds32.h: Likewise.
8823         * config/nds32/nds32.md: Likewise.
8824         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8825         * config/nds32/predicates.md: Implement new predicates for DSP
8826         extension.
8828 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
8830         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8831         Reformat alternatives and attributes so it is easier to identify
8832         which constraints/attributes go with which instruction.
8833         (mov<mode>_hardfloat32, FMOVE64): Likewise.
8834         (mov<mode>_softfloat32, FMOVE64): Likewise.
8835         (mov<mode>_hardfloat64, FMOVE64): Likewise.
8836         (mov<mode>_softfloat64, FMOVE64): Likewise.
8838 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8840         * doc/extend.texi (PowerPC Built-in Functions): Rename this
8841         subsection.
8842         (Basic PowerPC Built-in Functions): The new name of the
8843         subsection previously known as "PowerPC Built-in Functions".
8844         (Basic PowerPC Built-in Functions Available on all Configurations):
8845         New subsubsection.
8846         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8847         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8848         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8849         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8851 2018-05-11  Martin Jambor  <mjambor@suse.cz>
8853         PR ipa/85655
8854         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8855         single const.
8857 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8859         PR target/85733
8860         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8862 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
8864         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8865         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8866         (ix86_handle_option): Handle -mwaitpkg.
8867         * config.gcc: New header.
8868         * config/i386/cpuid.h (bit_WAITPKG): New bit.
8869         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8870         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8871         function type.
8872         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8873         OPTION_MASK_ISA_WAITPKG.
8874         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8875         (ix86_option_override_internal): Add PTA_WAITPKG.
8876         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8877         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8878         IX86_BUILTIN_TPAUSE.
8879         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8880         __builtin_ia32_umwait and __builtin_ia32_tpause.
8881         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8882         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8883         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8884         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8885         UNSPECV_TPAUSE): New.
8886         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8887         * config/i386/i386.opt: Add -mwaitpkg.
8888         * config/i386/waitpkgintrin.h: New file.
8889         * config/i386/x86intrin.h: New header.
8890         * doc/invoke.texi: Add -mwaitpkg.
8892 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
8894         PR target/85606
8895         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8896         equivalent.
8897         (cortex-m0): Use armv6s-m isa.
8898         (cortex-m0plus): Likewise.
8899         (cortex-m1): Likewise.
8900         (cortex-m0.small-multiply): Likewise.
8901         (cortex-m0plus.small-multiply): Likewise.
8902         (cortex-m1.small-multiply): Likewise.
8904 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8905             Jakub Jelinek  <jakub@redhat.com>
8907         PR tree-optimization/85692
8908         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8909         source permute as well.
8911 2018-05-11  Martin Liska  <mliska@suse.cz>
8913         PR sanitizer/85556
8914         * doc/extend.texi: Document LLVM style format for no_sanitize
8915         attribute.
8917 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
8919         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8920         mode_supports_vsx_dform_quad to mode_supports_dq_form.
8921         (mode_supports_vsx_dform_quad): Likewise.
8922         (mode_supports_vmx_dform): Move these functions to be next to the
8923         other mode_supports functions.
8924         (mode_supports_dq_form): Likewise.
8925         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8926         mode_supports_dq_form.
8927         (reg_offset_addressing_ok_p): Likewise.
8928         (offsettable_ok_by_alignment): Likewise.
8929         (rs6000_legitimate_offset_address_p): Likewise.
8930         (legitimate_lo_sum_address_p): Likewise.
8931         (rs6000_legitimize_address): Likewise.
8932         (rs6000_legitimize_reload_address): Likewise.
8933         (rs6000_secondary_reload_inner): Likewise.
8934         (rs6000_preferred_reload_class): Likewise.
8935         (rs6000_output_move_128bit): Likewise.
8937 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8939         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8940         Generate SImode target register for null target.
8941         <case IX86_BUILTIN_XGETBV>: Ditto.
8942         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8943         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8945 2018-05-10  Carl Love  <cel@us.ibm.com>
8947         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8948         dcbtt and dcbtstt if operands[2] is 0.
8950 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
8952         PR target/85693
8953         * config/i386/sse.md (usadv64qi): New expander.
8955 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
8957         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8958         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8959         -maltivec=be support.
8960         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8961         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8962         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8963         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8964         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8965         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8966         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8967         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8968         altivec_vsumsws): Adjust.
8969         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8970         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8971         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8972         support.
8973         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8974         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8975         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8976         (altivec_lve<VI_char>x): Delete expand.
8977         (*altivec_lve<VI_char>x_internal): Rename to...
8978         (altivec_lve<VI_char>x): ... this.
8979         (altivec_lvxl_<mode>): Delete expand.
8980         (*altivec_lvxl_<mode>_internal): Rename to ...
8981         (altivec_lvxl_<mode>): ... this.
8982         (altivec_stvxl_<mode>): Delete expand.
8983         (*altivec_stvxl_<mode>_internal): Rename to ...
8984         (altivec_stvxl_<mode>): ... this.
8985         (altivec_stve<VI_char>x): Delete expand.
8986         (*altivec_stve<VI_char>x_internal): Rename to ...
8987         (altivec_stve<VI_char>x): ... this.
8988         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8989         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8990         reduc_plus_scal_<mode>): Adjust.
8991         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8992         comment.
8993         (rs6000_cpu_cpp_builtins): Adjust.
8994         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8995         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8996         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8997         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8998         -maltivec=be support.
8999         (rs6000_split_vec_extract_var): Adjust.
9000         (rs6000_split_v4si_init): Adjust.
9001         (swap_selector_for_mode): Delete.
9002         (altivec_expand_lvx_be, altivec_expand_stvx_be,
9003         altivec_expand_stvex_be): Delete.
9004         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9005         -maltivec=be support.
9006         (rs6000_gimple_fold_builtin): Ditto.
9007         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9008         Adjust.
9009         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9010         (TARGET_DIRECT_MOVE_64BIT): Adjust.
9011         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9012         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9013         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9014         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9015         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9016         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9017         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9018         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9019         anonymous split): Adjust.
9020         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9021         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9023 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
9025         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9026         when --with-gxx-include-dir is also specified.
9027         * configure: Regenerate.
9029 2018-05-09  Jim Wilson  <jimw@sifive.com>
9031         PR target/84797
9032         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9033         * config/riscv/t-withmultilib: New.
9034         * config/riscv/withmultilib.h: New.
9035         * doc/install.texi: Document RISC-V --with-multilib-list support.
9037 2018-05-09  Richard Biener  <rguenther@suse.de>
9039         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9040         vector.
9041         (vect_bb_vectorization_profitable_p): Adjust.  Compute
9042         actual scalar cost using the cost vector and the add_stmt_cost
9043         machinery.
9045 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9047         PR rtl-optimization/85645
9048         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9049         in the REG_CFA_REGISTER note for LR, don't leave it empty.
9051 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9053         PR rtl-optimization/85645
9054         * shrink-wrap.c (spread_components): Return a boolean saying if
9055         anything was changed.
9056         (try_shrink_wrapping_separate): Iterate spread_components until
9057         nothing changes anymore.
9059 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9061         PR rtl-optimization/85645
9062         * regrename.c (build_def_use): Also kill the chains that include the
9063         destination of a REG_CFA_REGISTER note.
9065 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
9067         PR rtl-optimization/85645
9068         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9069         insn that has a REG_CFA_REGISTER note.
9071 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
9073         * cfgexpand.c (expand_clobber): New function.
9074         (expand_gimple_stmt_1): Use it.
9075         * tree-vect-stmts.c (vect_clobber_variable): New function,
9076         split out from...
9077         (vectorizable_simd_clone_call): ...here.
9078         (vectorizable_store): Emit a clobber either side of an
9079         IFN_STORE_LANES sequence.
9080         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9082 2018-05-09  Tom de Vries  <tom@codesourcery.com>
9084         PR target/85626
9085         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9086         (define_insn "trap_if_false"): Add exit after trap.
9088 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
9090         PR rtl-optimization/85638
9091         * bb-reorder.c: Include common/common-target.h.
9092         (create_forwarder_block): New function extracted from...
9093         (fix_up_crossing_landing_pad): ...here.  Rename into...
9094         (dw2_fix_up_crossing_landing_pad): ...this.
9095         (sjlj_fix_up_crossing_landing_pad): New function.
9096         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9097         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9098         from both partitions and exit the loop after one iteration.
9100 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9102         Revert:
9103         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9104         subsection.
9105         (Basic PowerPC Built-in Functions): The new name of the
9106         subsection previously known as "PowerPC Built-in Functions".
9107         (Basic PowerPC Built-in Functions Available on all Configurations):
9108         New subsubsection.
9109         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9110         subsubsection.
9111         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9112         subsubsection.
9113         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9114         subsubsection.
9115         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9116         subsubsection.
9118 2018-05-08  Jim Wilson  <jimw@sifive.com>
9120         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9121         (LD_EMUL_SUFFIX): New.
9122         (LINK_SPEC): Use it.
9124 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9126         * doc/extend.texi (PowerPC Built-in Functions): Rename this
9127         subsection.
9128         (Basic PowerPC Built-in Functions): The new name of the
9129         subsection previously known as "PowerPC Built-in Functions".
9130         (Basic PowerPC Built-in Functions Available on all Configurations):
9131         New subsubsection.
9132         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9133         subsubsection.
9134         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9135         subsubsection.
9136         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9137         subsubsection.
9138         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9139         subsubsection.
9141 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9143         PR target/85683
9144         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9145         after cmpelim optimization.
9147 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
9149         * config.gcc: Support "goldmont".
9150         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9151         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9152         PROCESSOR_GOLDMONT.
9153         * config/i386/i386.c (m_GOLDMONT): Define.
9154         (processor_target_table): Add "goldmont".
9155         (PTA_GOLDMONT): Define.
9156         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9157         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9158         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9159         (fold_builtin_cpu): Add "goldmont".
9160         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9161         (ix86_option_override_internal): Add "goldmont".
9162         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9163         (processor_type): Add PROCESSOR_GOLDMONT.
9164         * config/i386/i386.md: Add CPU "glm".
9165         * config/i386/glm.md: New file.
9166         * config/i386/x86-tune.def: Add m_GOLDMONT.
9167         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9169 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
9171         PR target/85572
9172         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9173         E_V4DImode.
9174         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9175         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
9176         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
9178         PR target/85317
9179         * config/i386/i386.c (ix86_fold_builtin): Handle
9180         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9182         PR target/85480
9183         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9184         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9186 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
9188         PR target/85658
9189         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9190         (check_arch): Likewise.
9191         (check_fpu): Return the result rather than printing it.
9192         (end arch): Fix operator precedence.
9193         (end cpu): Likewise.
9194         (END): Print the result from check_fpu.
9196 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9197             Alan Hayward  <alan.hayward@arm.com>
9198             David Sherwood  <david.sherwood@arm.com>
9200         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9201         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9202         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9203         (*fcmuo<mode>_and): New patterns.
9205 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
9207         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9208         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9209         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9210         (cmp_op, sve_imm_con): New code attributes.
9211         (SVE_COND_INT_CMP, imm_con): Delete.
9212         (cmp_op): Remove above unspecs from int attribute.
9213         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9214         to...
9215         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
9216         comparison-specific unspecs.
9217         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9218         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9219         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9220         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9221         (*vec_fcm<cmp_op><mode>): Rename to...
9222         (*fcm<cmp_op><mode>): ...this and adjust likewise.
9223         (*vec_fcmuo<mode>): Rename to...
9224         (*fcmuo<mode>): ...this and adjust likewise.
9225         (*pred_fcm<cmp_op><mode>): New pattern.
9226         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9227         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9228         functions.
9229         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9230         and UNORDERED.
9231         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9232         (aarch64_emit_sve_predicated_cond): New function.
9233         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9234         (aarch64_emit_unspec_cond_or): Replace with...
9235         (aarch64_emit_sve_or_conds): ...this new function.  Use
9236         aarch64_emit_sve_ptrue_op for the individual comparisons and
9237         aarch64_emit_binop to OR them together.
9238         (aarch64_emit_inverted_unspec_cond): Replace with...
9239         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
9240         aarch64_emit_sve_ptrue_op for the comparison and
9241         aarch64_emit_unop to invert the result.
9242         (aarch64_expand_sve_vec_cmp_float): Update after the above
9243         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
9245 2018-05-07  Nathan Sidwell  <nathan@acm.org>
9247         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9248         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9249         (Backwards Compatibility): Likewise.
9251 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9253         PR bootstrap/85681
9254         Revert:
9255         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9257         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9258         <prefetch_dynamic_strides>: New const bool field.
9259         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9260         prefetch_dynamic_strides.
9261         (exynosm1_prefetch_tune): Likewise.
9262         (thunderxt88_prefetch_tune): Likewise.
9263         (thunderx_prefetch_tune): Likewise.
9264         (thunderx2t99_prefetch_tune): Likewise.
9265         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9266         to false.
9267         (aarch64_override_options_internal): Update to set
9268         PARAM_PREFETCH_DYNAMIC_STRIDES.
9269         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9270         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9271         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9272         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9273         prefetch-dynamic-strides setting.
9275         2018-05-07  Luis Machado  <luis.machado@linaro.org>
9277         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9278         <minimum_stride>: New const int field.
9279         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9280         minimum_stride field.
9281         (exynosm1_prefetch_tune): Likewise.
9282         (thunderxt88_prefetch_tune): Likewise.
9283         (thunderx_prefetch_tune): Likewise.
9284         (thunderx2t99_prefetch_tune): Likewise.
9285         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9286         (aarch64_override_options_internal): Update to set
9287         PARAM_PREFETCH_MINIMUM_STRIDE.
9288         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9289         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9290         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9291         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9292         stride is constant and is below the minimum stride threshold.
9294 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9296         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9297         to 512.
9299 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9301         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9302         <prefetch_dynamic_strides>: New const bool field.
9303         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9304         prefetch_dynamic_strides.
9305         (exynosm1_prefetch_tune): Likewise.
9306         (thunderxt88_prefetch_tune): Likewise.
9307         (thunderx_prefetch_tune): Likewise.
9308         (thunderx2t99_prefetch_tune): Likewise.
9309         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9310         to false.
9311         (aarch64_override_options_internal): Update to set
9312         PARAM_PREFETCH_DYNAMIC_STRIDES.
9313         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9314         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9315         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9316         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9317         prefetch-dynamic-strides setting.
9319 2018-05-07  Luis Machado  <luis.machado@linaro.org>
9321         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9322         <minimum_stride>: New const int field.
9323         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9324         minimum_stride field.
9325         (exynosm1_prefetch_tune): Likewise.
9326         (thunderxt88_prefetch_tune): Likewise.
9327         (thunderx_prefetch_tune): Likewise.
9328         (thunderx2t99_prefetch_tune): Likewise.
9329         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9330         (aarch64_override_options_internal): Update to set
9331         PARAM_PREFETCH_MINIMUM_STRIDE.
9332         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9333         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9334         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9335         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9336         stride is constant and is below the minimum stride threshold.
9338 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
9340         PR c++/85659
9341         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9342         the type is addressable.  Don't force op into register if it has
9343         BLKmode.
9345 2018-05-05  Roland McGrath  <mcgrathr@google.com>
9347         PR other/77609
9348         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9349         any section for which we don't know a specific type it should have,
9350         regardless of name.  Previously this was done only for the exact
9351         names ".init_array", ".fini_array", and ".preinit_array".
9352         (default_elf_asm_named_section): Add comment about
9353         relationship with default_section_type_flags and SECTION_NOTYPE.
9354         (get_section): Don't consider it a type conflict if one side has
9355         SECTION_NOTYPE and the other doesn't, as long as neither has the
9356         SECTION_BSS et al used in the default_section_type_flags logic.
9358 2018-05-05  Tom de Vries  <tom@codesourcery.com>
9360         PR target/85653
9361         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9362         (workaround_barsyncs): New function.
9363         (nvptx_reorg): Use workaround_barsyncs.
9364         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9365         (define_expand "nvptx_membar_cta"): New define_expand.
9366         (define_insn "*nvptx_membar_cta"): New insn.
9368 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
9370         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9371         To improve optimization opportunities.
9372         * builtin-types.def: The new needed builtin types for the above.
9374 2018-05-04  Richard Biener  <rguenther@suse.de>
9376         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9377         * gimple-ssa-store-merging.c
9378         (imm_store_chain_info::output_merged_store): Remove redundant create,
9379         release split_store vector contents on failure.
9380         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9381         scalar stmt vector on cache hit.
9383 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
9385         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9386         Xilinx FP support.
9387         * config.gcc (powerpc-xilinx-eabi*): Remove.
9388         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9389         support.
9390         (fusion_addis_mem_combo_load): Ditto.
9391         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9392         FP support.
9393         (rs6000_cpu_cpp_builtins): Ditto.
9394         * config/rs6000/rs6000-linux.c
9395         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9396         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9397         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9398         support.
9399         (rs6000_setup_reg_addr_masks): Ditto.
9400         (rs6000_init_hard_regno_mode_ok): Ditto.
9401         (rs6000_option_override_internal): Ditto.
9402         (legitimate_lo_sum_address_p): Ditto.
9403         (rs6000_legitimize_address): Ditto.
9404         (rs6000_legitimize_reload_address): Ditto.
9405         (rs6000_legitimate_address_p): Ditto.
9406         (abi_v4_pass_in_fpr): Ditto.
9407         (setup_incoming_varargs): Ditto.
9408         (rs6000_gimplify_va_arg): Ditto.
9409         (rs6000_split_multireg_move): Ditto.
9410         (rs6000_savres_strategy): Ditto.
9411         (rs6000_emit_prologue_components): Ditto.
9412         (rs6000_emit_epilogue_components): Ditto.
9413         (rs6000_emit_prologue): Ditto.
9414         (rs6000_emit_epilogue): Ditto.
9415         (rs6000_elf_file_end): Ditto.
9416         (rs6000_function_value): Ditto.
9417         (rs6000_libcall_value): Ditto.
9418         * config/rs6000/rs6000.h: Ditto.
9419         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9420         (TARGET_MINMAX): ... this.  New.
9421         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9422         * config/rs6000/rs6000.md: Remove Xilinx FP support.
9423         (*movsi_internal1_single): Delete.
9424         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9425         mfpu=, mxilinx-fpu): Delete.
9426         * config/rs6000/singlefp.h: Delete.
9427         * config/rs6000/sysv4.h: Remove Xilinx FP support.
9428         * config/rs6000/t-rs6000: Ditto.
9429         * config/rs6000/t-xilinx: Delete.
9430         * config/rs6000/titan.md: Adjust for fp_type removal.
9431         * config/rs6000/vsx.md: Remove Xilinx FP support.
9432         (VStype_simple): Delete.
9433         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9434         * config/rs6000/xfpu.h: Delete.
9435         * config/rs6000/xfpu.md: Delete.
9436         * config/rs6000/xilinx.h: Delete.
9437         * config/rs6000/xilinx.opt: Delete.
9438         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9439         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9441 2018-05-04  Tom de Vries  <tom@codesourcery.com>
9443         PR libgomp/85639
9444         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9445         if ignore == 0.
9447 2018-05-04  Richard Biener  <rguenther@suse.de>
9449         PR middle-end/85627
9450         * tree-complex.c (update_complex_assignment): We are always in SSA form.
9451         (expand_complex_div_wide): Likewise.
9452         (expand_complex_operations_1): Likewise.
9453         (expand_complex_libcall): Preserve EH info of the original stmt.
9454         (tree_lower_complex): Handle removed blocks.
9455         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9456         on complex multiplication and division libcall builtins.
9458 2018-05-04  Richard Biener  <rguenther@suse.de>
9460         PR middle-end/85574
9461         * fold-const.c (negate_expr_p): Restrict negation of operand
9462         zero of a division to when we know that can happen without
9463         overflow.
9464         (fold_negate_expr_1): Likewise.
9466 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
9468         PR libstdc++/85466
9469         * real.h (real_nextafter): Declare.
9470         * real.c (real_nextafter): New function.
9471         * fold-const-call.c (fold_const_nextafter): New function.
9472         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9473         CASE_CFN_NEXTTOWARD.
9474         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9475         even when arg1_mode is different from arg0_mode.
9477 2018-05-03  Nathan Sidwell  <nathan@acm.org>
9479         * doc/extend.texi (Deprecated Features): Remove
9480         -ffriend-injection.
9481         (Backwards Compatibility): Likewise.
9482         * doc/invoke.texi (C++ Language Options): Likewise.
9483         (C++ Dialect Options): Likewise.
9485 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
9487         PR target/85530
9488         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9489         _mm512_mask_mullox_epi64): New intrinsics.
9491 2018-05-03  Tom de Vries  <tom@codesourcery.com>
9493         PR testsuite/85106
9494         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9495         dump files): Add offload-tree.
9497 2018-05-03  Richard Biener  <rguenther@suse.de>
9499         PR tree-optimization/85615
9500         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9501         to loops not nested in BBs loop father to avoid creating multi-entry
9502         loops.
9504 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9506         PR tree-optimization/70291
9507         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9508         arguments.  Change return type to tree.  Emit libcall as a new
9509         statement rather than replacing existing one when inplace_p is true.
9510         (expand_complex_multiplication_components): New function.
9511         (expand_complex_multiplication): Expand floating-point complex
9512         multiplication using the above.
9513         (expand_complex_division): Rename inner_type parameter to type.
9514         Update expand_complex_libcall call-site.
9515         (expand_complex_operations_1): Update expand_complex_multiplication
9516         and expand_complex_division call-sites.
9518 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9520         PR target/85582
9521         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9522         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9523         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9524         the highest significant bit of the shift count mask is clear.  In
9525         check whether and[sq]i3 is needed verify that all significant bits
9526         of the shift count other than the highest are set.
9528 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9530         PR libgomp/82428
9531         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9532         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9533         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9534         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9535         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9536         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9537         __builtin_goacc_parlevel_size.
9539 2018-05-02  Richard Biener  <rguenther@suse.de>
9541         PR tree-optimization/85597
9542         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9543         do not use split vect_get_vec_defs call but call vect_get_slp_defs
9544         directly.
9546 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9548         PR testsuite/85106
9549         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9550         dump files): Add ltrans-tree.
9552 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9554         PR testsuite/85106
9555         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9556         dump files): Add wpa-ipa.
9558 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
9560         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
9561         powerpc*-*-linux*paired* target.
9562         * config/rs6000/750cl.h: Delete.
9563         * config/rs6000/paired.h: Delete.
9564         * config/rs6000/paired.md: Delete.
9565         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9566         float support.
9567         * config/rs6000/rs6000-builtin.def: Remove paired float support.
9568         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9569         comment.  Remove paired float support.
9570         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9571         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9572         VECTOR_PAIRED.
9573         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9574         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9575         declarations.
9576         * config/rs6000/rs6000.c: Remove paired float support.
9577         (paired_expand_vector_init, paired_expand_vector_move,
9578         paired_emit_vector_compare, paired_emit_vector_cond_expr,
9579         (paired_expand_lv_builtin, paired_expand_stv_builtin,
9580         paired_expand_builtin, paired_expand_predicate_builtin,
9581         paired_init_builtins): Delete.
9582         * config/rs6000/rs6000.h: Remove paired float support.
9583         * config/rs6000/rs6000.md: Remove paired float support.
9584         (move_from_CR_ov_bit): Delete.
9585         * config/rs6000/rs6000.opt (mpaired): Delete.
9586         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9587         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9589 2018-05-02  Richard Biener  <rguenther@suse.de>
9591         PR middle-end/85567
9592         * gimplify.c (gimplify_save_expr): When in SSA form allow
9593         SAVE_EXPRs to compute to SSA vars.
9595 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
9597         PR target/85582
9598         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9599         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9600         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9601         clobber operands[2], instead use a new pseudo.  Formatting fixes.
9603 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
9605         PR tree-optimization/85586
9606         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9607         exit early for statements in the same group if the accesses are
9608         not strided.
9610 2018-05-02  Tom de Vries  <tom@codesourcery.com>
9612         PR lto/85451
9613         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9614         error message.
9616 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
9618         PR tree-optimization/85143
9619         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9621 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9623         PR lto/85451
9624         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9625         not found" error message.
9627 2018-05-01  Tom de Vries  <tom@codesourcery.com>
9629         PR other/83786
9630         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9631         * vec.c (test_ordered_remove_if): New function.
9632         (vec_c_tests): Call test_ordered_remove_if.
9633         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9634         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9635         * tree-vect-patterns.c (vect_pattern_recog_1): Use
9636         VEC_ORDERED_REMOVE_IF.
9638 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9640         PR tree-optimization/82665
9641         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9642         pointer subtraction where arguments come from a memchr call.
9644 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
9646         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9647         --push-state --as-needed and --pop-state instead of --as-needed and
9648         --no-as-needed if ld supports it.
9649         * configure: Regenerated.
9651         PR web/85578
9652         * doc/install.texi2html: Replace _002d with - and _002a with * in
9653         generated html files using sed.
9655 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9657         PR c++/85523
9658         * gcc-rich-location.c (blank_line_before_p): New function.
9659         (use_new_line): New function.
9660         (gcc_rich_location::add_fixit_insert_formatted): New function.
9661         * gcc-rich-location.h
9662         (gcc_rich_location::add_fixit_insert_formatted): New function.
9664 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9666         * selftest.c (assert_streq): Rename "expected" and "actual" to
9667         "val1" and "val2".  Extend NULL-handling to cover both inputs
9668         symmetrically, while still requiring both to be non-NULL for a pass.
9669         * selftest.h (assert_streq): Rename "expected" and "actual" to
9670         "val1" and "val2".
9671         (ASSERT_EQ): Likewise.
9672         (ASSERT_EQ_AT): Likewise.
9673         (ASSERT_KNOWN_EQ): Likewise.
9674         (ASSERT_KNOWN_EQ_AT): Likewise.
9675         (ASSERT_NE): Likewise.
9676         (ASSERT_MAYBE_NE): Likewise.
9677         (ASSERT_MAYBE_NE_AT): Likewise.
9678         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
9679         the assertion to pass.
9680         (ASSERT_STREQ_AT): Likewise.
9682 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9684         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9685         interaction with -pie.
9687 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9689         * selftest.h: Fix alphabetization of per-source-file selftest
9690         declarations.
9692 2018-04-30  Jason Merrill  <jason@redhat.com>
9694         PR c++/61982 - dead stores to destroyed objects.
9695         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9696         of clobber.
9698 2018-04-30  Jason Merrill  <jason@redhat.com>
9700         * tree.c (build_clobber): New.
9701         * tree.h: Declare it.
9702         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9704 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9706         * diagnostic-show-locus.c (layout::layout): Update for
9707         location_get_source_line returning a char_span.
9708         (struct char_span): Move to input.h.
9709         (struct correction): Update for fields in char_span becoming
9710         private.
9711         (struct source_line): Update for location_get_source_line
9712         returning a char_span.
9713         (layout::print_line): Likewise.
9714         * edit-context.c (edited_file::print_content): Likewise.
9715         (edited_file::print_diff_hunk): Likewise.
9716         (edited_file::print_run_of_changed_lines): Likewise.
9717         (edited_file::get_num_lines): Likewise.
9718         (edited_line::edited_line): Likewise.
9719         * final.c (asm_show_source): Likewise.
9720         * input.c (location_get_source_line): Convert return type
9721         from const char * to char_span, losing the final "line_len"
9722         param.
9723         (dump_location_info): Update for the above.
9724         (get_substring_ranges_for_loc): Likewise.  Use a char_span
9725         when handling the literal within the line.
9726         (test_reading_source_line): Update for location_get_source_line
9727         returning a char_span.
9728         * input.h (class char_span): Move here from
9729         diagnostic-show-locus.c, converting from a struct to a class.
9730         Make data members private.
9731         (char_span::operator bool): New.
9732         (char_span::length): New.
9733         (char_span::get_buffer): New.
9734         (char_span::operator[]): New.
9735         (char_span::subspan): Make const.
9736         (char_span::xstrdup): New.
9737         (location_get_source_line): Convert return type from const char *
9738         to char_span, losing the final "line_size" param.
9740 2018-04-30  Jan Hubicka  <jh@suse.cz>
9742         * lto-wrapper.c (ltrans_priorities): New static var.
9743         (cmp_priority): New.
9744         (run_gcc): Read priorities and if doing parallel build order
9745         the Makefile by them.
9747 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
9749         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9751 2018-04-30  Richard Biener  <rguenther@suse.de>
9753         * tree-cfg.c (verify_address): Remove base argument, add
9754         flag whether to check TREE_ADDRESSABLE and do that.
9755         (verify_expr): Remove.
9756         (verify_types_in_gimple_reference): Add pieces from verify_expr.
9757         (verify_gimple_assign_single): Likewise.
9758         (verify_gimple_switch): Likewise.
9759         (verify_expr_location_1): Dereference tp once.  Add (disabled)
9760         piece from verify_expr.
9761         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9763 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9765         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9767 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9769         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9770         (small_data_pattern): Likewise.
9771         (arc_rewrite_small_data): Likewise.
9772         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9773         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9774         (get_symbol_alignment): New function.
9775         (legitimate_small_data_address_p): Likewise.
9776         (legitimate_scaled_address): Update, call
9777         legitimate_small_data_address_p.
9778         (output_sdata): New static variable.
9779         (arc_print_operand): Update how we handle small data operands.
9780         (arc_print_operand_address): Likewise.
9781         (arc_legitimate_address_p): Update, use
9782         legitimate_small_data_address_p.
9783         (arc_rewrite_small_data_p): Remove.
9784         (arc_rewrite_small_data_1): Likewise.
9785         (arc_rewrite_small_data): Likewise.
9786         (small_data_pattern): Likewise.
9787         (compact_sda_memory_operand): Update to use
9788         legitimate_small_data_address_p and get_symbol_alignment.
9789         (prepare_move_operands): Don't rewite sdata pattern.
9790         (prepare_extend_operands): Remove.
9791         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9792         pattern.
9793         (zero_extendqisi2): Likewise.
9794         (zero_extendhisi2): Likewise.
9795         (extendqihi2): Likewise.
9796         (extendqisi2): Likewise.
9797         (extendhisi2): Likewise.
9798         (addsi3): Likewise.
9799         (subsi3): Likewise.
9800         (andsi3): Likewise.
9801         * config/arc/constraints.md (Usd): Change it to memory constraint.
9803 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
9805         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9806         as source of std instructions.
9807         * config/arc/arc.md (movsi_insn): Update pattern predicate to
9808         allow 6-bit constants as source for store instructions.
9809         (movdi_insn): Update instruction pattern to allow 6-bit constants
9810         as source for store instructions.
9812 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
9814         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9816 2018-04-30  Nathan Sidwell  <nathan@acm.org>
9817             Sandra Loosemore <sandra@codesourcery.com>
9819         * dumpfile.c (dump_open): Allow '-' for stdout.
9820         * doc/invoke.texi (Developer Options): Document dump filename
9821         determination early.  Document stdin/stdout selection.
9823 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
9825         Microblaze Target: PIC data text relative
9827         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9828         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9829         Add declaration.
9830         * config/microblaze/microblaze.h (microblaze_constant_address_p):
9831         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9832         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9833         New addressing mode for data-text relative position indepenedent code.
9834         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9835         'ADDRESS_SYMBOLIC_TXT_REL'.
9836         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9837         (microblaze_legitimate_pic_operand): Exclude function calls from
9838         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9839         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9840         addresses cases.
9841         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9842         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9843         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9844         for 'address + offset'.
9845         (microblaze_expand_prologue): Add new function prologue call for
9846         'r20' assignation.
9847         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9848         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9849         table in case of TARGET_PIC_DATA_TEXT_REL.
9850         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9851         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9852         Add new macros 'UNSPEC_TEXT',
9853         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9854         + exclude function calls from 'UNSPEC_PLT' in case of data text
9855         relative mode.
9856         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9857         new target hook for generating address diff vector tables in case of
9858         flag_pic.
9859         * doc/tm.texi : Regenerate.
9860         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9861         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9862         of addr diff vector generation.
9863         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9864         target hook definition.
9865         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9866         Add default function for generate_pic_addr_diff_vec -> flag_pic.
9867         * doc/invoke.texi (Add new pic option): Add new microblaze pic
9868         option for data text relative.
9870 2018-04-30  Richard Biener  <rguenther@suse.de>
9872         * tree-chrec.h (evolution_function_is_constant_p): Remove
9873         redundant check.
9874         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9876 2018-04-30  Richard Biener  <rguenther@suse.de>
9878         PR bootstrap/85571
9879         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9881 2018-04-30  Richard Biener  <rguenther@suse.de>
9883         PR tree-optimization/28364
9884         PR tree-optimization/85275
9885         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9886         copying first exit test.
9888 2018-04-28  Mark Wielaard  <mark@klomp.org>
9890         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9891         dwarf_version >= 5.
9892         (dwarf_AT): Handle DW_AT_addr_base.
9893         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9895 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
9897         PR target/84431
9898         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9899         (*ashl<dwi>3_doubleword_mask_1): Ditto.
9900         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9901         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9903 2018-04-28  Richard Biener  <rguenther@suse.de>
9905         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9906         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9907         to reflect use.  Only add interesting stmts.
9909 2018-04-27  Martin Jambor  <mjambor@suse.cz>
9911         PR ipa/85549
9912         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9913         the jump function allows for passing through aggregate values.
9915 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
9917         * input.h (in_system_header_at): Convert from macro to inline
9918         function.
9919         (from_macro_expansion_at): Likewise.
9920         (from_macro_definition_at): Likewise.
9922 2018-04-27  Jeff Law  <law@redhat.com>
9924         * config.gcc: Mark tile* targets as deprecated/obsolete.
9926 2018-04-27  Richard Biener  <rguenther@suse.de>
9928         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9929         fix for ILP32.
9931 2018-04-27  Richard Biener  <rguenther@suse.de>
9933         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9935 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
9937         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9938         with Yd constraint. Set "preferred_for_speed" attribute from
9939         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9940         with Yd constraint.
9941         (*movdi_internal): Ditto.
9942         (movti_interunit splitters): Remove
9943         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9944         (movdi_interunit splitters): Ditto.
9945         * config/i386/constraints.md (Ye): Remove.
9946         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9948 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9950         PR target/85512
9951         * config/aarch64/constraints.md (Usg): Limit to 31.
9952         (Usj): Limit to 63.
9954 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
9956         PR tree-optimization/85529
9957         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9958         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9959         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9960         zero extension or masking of the MSB bit.
9961         (optimize_range_tests): Add FIRST_BB argument, pass it through
9962         to optimize_range_tests_var_bound.
9963         (maybe_optimize_range_tests, reassociate_bb): Adjust
9964         optimize_range_tests callers.
9966 2018-04-26  Richard Biener  <rguenther@suse.de>
9967             Jakub Jelinek  <jakub@redhat.com>
9969         * cgraph.h (symbol_table): Just declare debug method here.
9970         * symtab.c (symbol_table::debug): Define.
9972 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9974         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9976 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
9978         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9979         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9980         (*movdi_internal): Substitute Yi and Yj constraint with x
9981         and Ym and Yn constraint with y constraint.  Update "isa"
9982         attribute and set "preferred_for_speed" attribute from
9983         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9984         (*movsi_internal): Ditto.
9985         (*movdf_internal): Ditto.
9986         (*movsf_internal): Ditto.
9987         (*zero_extendsidi2): Ditto.
9988         * config/i386/sse.md (vec_set<mode>_0): Ditto.
9989         (sse2_loadld): Ditto.
9990         (*vec_extract<ssevecmodelower>_0): Ditto.
9991         (*vec_extractv4si_0_zext_sse4): Ditto.
9992         (vec_concatv2di): Ditto.
9993         (*vec_dup<mode>): Ditto.
9994         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9995         * config/i386/constraints.md (Yi): Remove.
9996         (Yj): Remove.
9997         (Ym): Remove.
9998         (Yn): Remove.
10000 2018-04-26  Nathan Sidwell  <nathan@acm.org>
10002         * dumpfile.c (dump_open): New.
10003         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10004         (dump_finish): Detect stdio/stderr by value not name.
10006 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
10008         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10010 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10012         PR target/84952
10013         * config/nvptx/nvptx.c (verify_neutering_jumps)
10014         (verify_neutering_labels): New function
10015         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10017 2018-04-26  Tom de Vries  <tom@codesourcery.com>
10019         PR target/84025
10020         * config/nvptx/nvptx.c (needs_neutering_p): New function.
10021         (nvptx_single): Use needs_neutering_p to skip over insns that do not
10022         need neutering.
10024 2018-04-26  Richard Biener <rguenther@suse.de>
10025             Tom de Vries  <tom@codesourcery.com>
10027         PR lto/85422
10028         * lto-streamer-out.c (output_function): Fixup loops if required to match
10029         discovery done in the reader.
10031 2018-04-26  Richard Biener  <rguenther@suse.de>
10033         PR tree-optimization/85116
10034         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10035         have a loop exit from the single latch predecessor.  Remove
10036         case of header with just condition.
10037         (ch_base::copy_headers): Exclude infinite loops from any
10038         processing.
10039         (pass_ch::execute): Record exits.
10041 2018-04-26  Richard Biener  <rguenther@suse.de>
10043         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10044         prologue cost vector and pass it to vect_get_load_cost.
10045         (vect_get_peeling_costs_all_drs): Likewise.
10046         (vect_peeling_hash_get_lowest_cost): Likewise.
10047         (vect_enhance_data_refs_alignment): Likewise.
10049 2018-04-26  Richard Biener  <rguenther@suse.de>
10051         PR middle-end/85450
10052         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10053         checking of integer<->pointer conversions.
10054         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10055         sign-/zero-extending pointer types.
10056         (expand_omp_for_static_chunk): Likewise.
10058 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
10059             Jean Lee  <xiaoyur347@gmail.com>
10061         * config/mips/mips.c (mips_asan_shadow_offset): New function.
10062         (TARGET_ASAN_SHADOW_OFFSET): Define.
10063         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10064         true for -fsanitize=address.
10066 2018-04-25  Mark Wielaard  <mark@klomp.org>
10068         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10069         shorter ones.
10071 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10073         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10074         than "alu", remove explicit "memory" and "imm_disp" attributes.
10075         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10077         PR middle-end/85414
10078         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10079         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10080         gen_lowpart_no_emit.
10082 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
10084         PR target/85473
10085         * config/i386/i386.c (ix86_expand_builtin): Change memory
10086         operand to XI, extend p0 to Pmode.
10087         * config/i386/i386.md: Change unspec volatile and operand
10088         1 mode to XI, change operand 0 mode to P.
10090 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10092         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10093         GET_MODE_MASK before any checking.
10094         (nds32_can_use_bset_p): Likewise.
10095         (nds32_can_use_btgl_p): Likewise.
10097 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10099         * config/nds32/nds32-doubleword.md: New define_split pattern for
10100         illegal register number.
10102 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10104         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10106 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
10108         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10110 2018-04-25  Richard Biener  <rguenther@suse.de>
10112         * lto-streamer.h (LTO_major_version): Bump to 8.
10114 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
10116         * BASE-VER: Set to 9.0.0.
10118 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
10120         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10121         in __abskf2 and __powikf2.
10123 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10125         PR target/85512
10126         * config/aarch64/constraints.md (Usg, Usj): New constraints.
10127         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10128         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10129         Use the above on operand 2.  Reindent.
10130         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10132 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10134         PR target/85485
10135         * common/config/i386/i386-common.c (ix86_handle_option): Don't
10136         handle OPT_mcet.
10137         * config/i386/i386.opt (mcet): Removed.
10138         * doc/install.texi: Remove -mcet documentation.
10139         * doc/invoke.texi: Likewise.
10141 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
10143         PR target/85485
10144         * doc/install.texi: Remove -mcet from bootstrap-cet.
10146 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10148         PR target/85511
10149         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10150         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10151         if TARGET_64BIT.
10153         PR target/85503
10154         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10155         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10156         containing a CONST_VECTOR.
10158 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
10160         * doc/install.texi: Update newlib dependency for nvptx.
10162 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10164         PR target/85508
10165         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10166         instead of INTVAL when shifting x left.
10168 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
10170         PR tree-optimization/85478
10171         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10172         vect_grouped_store_supported for single element vectors.
10174 2018-04-24  Richard Biener  <rguenther@suse.de>
10176         PR target/85491
10177         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10178         load cost increase to the case of non-constant step.
10180 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
10182         PR target/84828
10183         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10184         destination if any_malformed_asm.
10186 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
10188         PR middle-end/85496
10189         * expr.c (store_field): In the bitfield case, if the value comes from
10190         a function call and is returned in registers by means of a PARALLEL,
10191         do not change the mode of the temporary unless BLKmode and VOIDmode.
10193 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
10195         PR rtl-optimization/85423
10196         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10197         dependencies to debug insns when the previous insn is non-debug.
10199 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10201         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10202         enums into a single definition.
10203         (fls): Fix predicates and printing.
10204         (seti): Likewise.
10206 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
10208         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10209         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10210         and short u6 immediate.
10211         (check_if_valid_sleep_operand): Remove.
10212         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10214 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10216         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10217         flag_always_save_lp condition.
10218         * config/nds32/nds32.opt (malways-save-lp): New option.
10220 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10222         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10223         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10224         * config/nds32/nds32.h
10225         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10226         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10228 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10230         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10231         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10233 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
10234             Chung-Ju Wu  <jasonwucj@gmail.com>
10236         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10237         Declare.
10238         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10239         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10241 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10243         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10245 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10247         * config/nds32/nds32-protos.h (nds32_data_alignment,
10248         nds32_local_alignment): Declare.
10249         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10250         nds32_local_alignment): New functions.
10251         (TARGET_CONSTANT_ALIGNMENT): Define.
10252         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10254 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10256         * config/nds32/nds32.c
10257         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10258         (TARGET_MODES_TIEABLE_P): Likewise.
10260 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
10262         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10263         level Ofast and Og.
10265 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
10266             Chung-Ju Wu  <jasonwucj@gmail.com>
10268         * config/nds32/constants.md (unspec_volatile_element): Add enum values
10269         for unaligned access.
10270         * config/nds32/nds32-intrinsic.c: Implementation of expanding
10271         unaligned access.
10272         * config/nds32/nds32-intrinsic.md: Likewise.
10273         * config/nds32/nds32_intrinsic.h: Likewise.
10274         * config/nds32/nds32.h (nds32_builtins): Likewise.
10275         * config/nds32/nds32.opt (munaligned-access): New option.
10276         * config/nds32/nds32.c (nds32_asm_file_start): Display
10277         flag_unaligned_access status.
10279 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10281         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10282         -mno-relax is present.
10283         * config/riscv/linux.h (LINK_SPEC): Ditto.
10285 2018-04-20  Martin Sebor  <msebor@redhat.com>
10287         PR c/85365
10288         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10289         for null pointers.
10290         (gimple_fold_builtin_stxcpy_chk): Same.
10291         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10293 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
10295         PR target/85456
10296         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10297         __powikf2 when long double is IEEE 128-bit.
10299 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
10301         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10302         step to make sure stack always aligned.
10304 2018-04-20  Carl Love  <cel@us.ibm.com>
10306         PR target/83402
10307         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10308         size check for arg0.
10310 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10311             Tom de Vries  <tom@codesourcery.com>
10313         PR target/85445
10314         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10315         Emit insns for calls too.
10316         (nvptx_find_par): Always look for worker-level predecessor insn.
10317         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
10318         calls.
10319         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10320         (nvptx_process_pars): Propagate frames for calls.
10322 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
10324         PR target/85469
10325         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10326         Removed.
10327         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10328         (ix86_handle_option): Don't handle OPT_mibt.
10329         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10330         __SHSTK__.
10331         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10332         has_ibt and ibt.
10333         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10334         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10335         (ix86_target_macros): Define __CET__ with flag_cf_protection
10336         for -fcf-protection.
10337         * config/i386/i386.c (isa2_opts): Remove -mibt.
10338         * config/i386/i386.h (TARGET_IBT): Removed.
10339         (TARGET_IBT_P): Likewise.
10340         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10341         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10342         * config/i386/i386.opt (mcet): Update help message.
10343         (mshstk): Likewise.
10344         (mibt): Removed.
10345         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
10346         -mcet as an alias for -mshstk.
10348 2018-04-20  Richard Biener <rguenther@suse.de>
10350         PR middle-end/85475
10351         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10352         complexity by forcing a single use of the multiply operand.
10354 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10356         ipa/85449
10357         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10358         recursion dependency to only apply to non-clones.
10360 2018-04-20  Martin Jambor  <mjambor@suse.cz>
10362         ipa/85447
10363         * ipa-cp.c (create_specialized_node): Check that clones of
10364         self-recursive edges exist during IPA-CP.
10366 2018-04-19  Toon Moene  <toon@moene.org>
10368         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10369         by -O3.
10371 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10373         PR tree-optimization/85467
10374         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10375         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
10376         VECTOR_CST element to type.
10378 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10380         PR target/85397
10381         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10382         * config/i386/i386.md (builtin_setjmp_setup): Removed.
10383         (builtin_longjmp): Likewise.
10384         (save_stack_nonlocal): New pattern.
10385         (restore_stack_nonlocal): Likewise.
10387 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10389         PR target/85404
10390         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10391         Replace ASM_OUTPUT_LABEL with fprintf.
10393 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
10395         PR target/85417
10396         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10397         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10398         * config/i386/i386-c.c (ix86_target_macros_internal): Also
10399         define __IBT__ and __SHSTK__ for -fcf-protection.
10400         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10401         TARGET_IBT.
10402         (ix86_trampoline_init): Likewise.
10403         (x86_output_mi_thunk): Likewise.
10404         (ix86_notrack_prefixed_insn_p): Likewise.
10405         (ix86_option_override_internal): Don't disallow -fcf-protection.
10406         * config/i386/i386.md (rdssp<mode>): Also enable for
10407         -fcf-protection.
10408         (incssp<mode>): Likewise.
10409         (nop_endbr): Likewise.
10410         * config/i386/i386.opt (mcet): Change help message to built-in
10411         functions only.
10412         (mibt): Likewise.
10413         (mshstk): Likewise.
10414         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10415         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
10416         enable CET built-in functions.
10418 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
10420         * common/config/i386/i386-common.c
10421         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10422         OPTION_MASK_ISA_MOVDIRI_UNSET,
10423         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10424         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10425         * config.gcc (movdirintrin.h): New header.
10426         * config/i386/cpuid.h (bit_MOVDIRI,
10427         bit_MOVDIR64B): New bits.
10428         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10429         and -mmvodir64b.
10430         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10431         (VOID, PVOID, PCVOID)): New function types.
10432         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10433         __builtin_ia32_directstoreu_u64,
10434         __builtin_ia32_movdir64b): New builtins.
10435         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10436         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10437         and -mmovdiri.
10438         (ix86_valid_target_attribute_inner_p): Ditto.
10439         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10440         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10441         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10442         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10443         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10444         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10445         (movdiri<mode>, movdir64b_<mode>): New.
10446         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10447         * config/i386/immintrin.h: Include movdirintrin.h.
10448         * config/i386/movdirintrin.h: New file.
10449         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10451 2018-04-19  Richard Biener  <rguenther@suse.de>
10453         PR middle-end/85455
10454         * cfg.c (clear_bb_flags): When loop state says we have
10455         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10457 2018-04-19  Richard Biener  <rguenther@suse.de>
10459         PR tree-optimization/84737
10460         * tree-vect-data-refs.c (vect_copy_ref_info): New function
10461         copying restrict info.
10462         (vect_setup_realignment): Use it.
10463         * tree-vectorizer.h (vect_copy_ref_info): Declare.
10464         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10465         the first DR to all generated stores.
10466         (vectorizable_load): Likewise for loads.
10468 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
10470         PR tree-optimization/85446
10471         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10472         the integral and pointer types to have the same precision.
10474         * doc/install.texi: Document --disable-cet being the default and
10475         --enable-cet=auto.
10477 2018-04-18  Martin Liska  <mliska@suse.cz>
10479         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10480         style.
10482 2018-04-18  Martin Liska  <mliska@suse.cz>
10484         Revert
10485         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10487         PR ipa/83983
10488         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10489         arguments if they are comparable.
10491 2018-04-18  Martin Liska  <mliska@suse.cz>
10493         Revert
10494         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
10496         PR lto/84805
10497         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10498         incomplete types.
10500 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
10502         PR target/85388
10503         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10504         ENDBR after calling __morestack.
10506 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
10508         PR jit/85384
10509         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10510         by using gcc_base_ver to generate a gcc_driver_version, and use
10511         it when generating GCC_DRIVER_NAME.
10512         * configure: Regenerate.
10514 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
10516         PR target/81084
10517         * config.gcc: Obsolete powerpc*-*-*spe*.
10519 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10521         PR debug/84637
10522         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10523         (stabstr_D): Change type of unum from unsigned int to
10524         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
10525         type.
10527 2018-04-17  Jim Wilson  <jimw@sifive.com>
10529         PR 84856
10530         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10531         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10532         Set arg_pointer_offset after using pretend_args_size.
10534 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10536         PR rtl-optimization/85431
10537         * dse.c (record_store): Ignore zero width stores.
10539         PR sanitizer/85230
10540         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
10541         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10542         __builtin_stack_restore rather than after it.
10543         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10544         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10545         argument instead of virtual_dynamic_stack_rtx.
10547 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10549         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10550         New prototype.
10551         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10552         Add note to error message to explain internal mapping of overloaded
10553         built-in function name to non-overloaded built-in function name.
10554         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10555         function.
10557 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
10559         PR target/85424
10560         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10561         where the inputs overlap with the output.
10563 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10565         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10566         (=v, v) alternative and explicit "memory" attribute.
10567         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
10568         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10569         attributes.
10570         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10571         "sselog1" type instead of "sselog".
10572         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10573         "sselog".  Remove explicit "memory" attribute.
10574         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10575         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10576         attributes.
10577         (vec_extract_hi_v32hi): Merge all alternatives into one, use
10578         "sselog1" type instead of "sselog".  Remove explicit "memory"
10579         attribute.
10580         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10581         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10582         attribute.
10583         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10584         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10585         attributes.
10586         (vec_extract_hi_v64qi): Merge all alternatives into one, use
10587         "sselog1" type instead of "sselog".  Remove explicit "memory"
10588         attribute.
10589         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10590         use "sselog1" type instead of "sselog".  Remove explicit "memory"
10591         attribute.
10593         PR target/85430
10594         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10596         PR middle-end/85414
10597         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10598         on a SUBREG.
10600 2018-04-17  Martin Jambor  <mjambor@suse.cz>
10602         PR ipa/85421
10603         * ipa-cp.c (create_specialized_node): Call
10604         expand_all_artificial_thunks if necessary.
10606 2018-04-17  Martin Liska  <mliska@suse.cz>
10608         PR lto/85405
10609         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10610         in message, remote space in between '_G' and '('.
10612 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
10614         PR target/85281
10615         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10616         avx512f_vmcmp<mode>3<round_saeonly_name>,
10617         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10618         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10619         avx512f_rndscale<mode><round_saeonly_name>,
10620         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10621         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10622         Use %<iptr>2 instead of %2 for -masm=intel.
10623         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10624         avx512f_vcvttss2usi<round_saeonly_name>,
10625         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10626         -masm=intel.
10627         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10628         avx512f_vcvttsd2usi<round_saeonly_name>,
10629         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10630         Use %q1 instead of %1 for -masm=intel.
10631         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10632         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10633         of %3 for -masm=intel.
10634         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10635         -masm=intel.
10636         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10637         -masm=intel.
10638         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10639         -masm=intel.
10640         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10641         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10642         %g1.
10643         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10644         -masm=intel.
10645         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10646         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10647         %g1 and one with %0 and %1.
10648         (avx512er_vmrcp28<mode><round_saeonly_name>,
10649         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10650         %1 for -masm=intel.
10651         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10652         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10653         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10654         of %0 and %{%4%} for -masm=intel.
10655         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10656         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10657         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10658         order of %0 and %{%5%}%{z%} for -masm=intel.
10660 2018-04-17  Jan Hubicka  <jh@suse.cz>
10662         PR lto/85405
10663         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10665 2018-04-17  Martin Liska  <mliska@suse.cz>
10667         PR ipa/85329
10668         * multiple_target.c (create_dispatcher_calls): Set apostrophes
10669         for target_clone error message.  Make default implementation
10670         clone to be a local declaration.
10671         (separate_attrs): Add new argument and check for an empty
10672         string.
10673         (expand_target_clones): Handle it.
10674         (ipa_target_clone): Make redirection just for target_clones
10675         functions.
10677 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
10678             Tom de Vries  <tom@codesourcery.com>
10680         PR middle-end/84955
10681         * omp-expand.c (expand_oacc_for): Add dummy false branch for
10682         tiled basic blocks without omp continue statements.
10684 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
10686         PR target/83660
10687         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10688         vec_extract expression as having side effects to make sure it gets
10689         a cleanup point.
10691 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
10693         PR target/85403
10694         * config/i386/i386.c (get_builtin_code_for_version): Check
10695         error_mark_node.
10697 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
10699         PR target/84331
10700         * config.gcc: Support "skylake".
10701         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10702         PROCESSOR_SKYLAKE.
10703         * config/i386/i386.c (m_SKYLAKE): Define.
10704         (processor_target_table): Add "skylake".
10705         (ix86_option_override_internal): Add "skylake".
10706         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10707         PROCESSOR_CANNONLAKE.
10708         (get_builtin_code_for_version): Fix priority for
10709         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10710         PROCESSOR_SKYLAKE-AVX512.
10711         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10712         (processor_type): Add PROCESSOR_SKYLAKE.
10714 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
10715             Jason Merrill  <jason@redhat.com>
10717         PR c++/85112
10718         * convert.c (convert_to_integer_1): Use direct recursion for
10719         enumeral types and types with a precision less than the number
10720         of bits in their mode.
10722 2018-04-16  Julia Koval  <julia.koval@intel.com>
10724         PR target/84413
10725         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10726         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10728 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
10730         PR target/85293
10731         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10732         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10733         and -mno-direct-move.
10735 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
10737         PR target/83402
10738         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10739         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10740         Ensure negative shifts result in {0}.
10742 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
10744         PR rtl-optimization/79916
10745         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10746         regs (if any) to define how to gnerate SD moves when LRA is in
10747         progress.
10749 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
10751         PR rtl-optimization/85393
10752         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10753         * except.c (expand_dw2_landing_pad_for_region): Make static.
10754         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10755         a label and unconditional jump to old_bb, rather than
10756         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10757         basic block.
10759         PR rtl-optimization/85376
10760         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10761         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10762         instead of a specific value.
10764 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10765             Bin Cheng  <bin.cheng@arm.com>
10767         PR tree-optimization/82965
10768         PR tree-optimization/83991
10769         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10770         by_profile_only parameter.
10771         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10772         information if the loop was predicted to iterate too many times.
10773         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10775 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
10777         PR lto/71991
10778         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10779         always inline.
10781 2018-04-13  Martin Liska  <mliska@suse.cz>
10782             Jakub Jelinek  <jakub@redhat.com>
10784         PR middle-end/81657
10785         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10786         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10787         * builtins.c (expand_builtin_memory_copy_args): Use
10788         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10789         handle dest_addr == pc_rtx.
10791 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
10793         PR target/85291
10794         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10795         asked to not generate direct moves.
10796         (fix_trunc<mode>si2_stfiwx): Similar.
10797         (fix_trunc<mode>si2_internal): Similar.
10799 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10801         PR debug/83157
10802         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10803         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10804         lookup if dest in some wider mode is known to be const0_rtx and
10805         if so, record permanent equivalence for it to be ZERO_EXTEND of
10806         the narrower mode destination.
10808 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10810         * lto-streamer-out.c (output_function): Revert 259346.
10811         * omp-expand.c (expand_oacc_for): Likewise.
10813 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
10815         PR rtl-optimization/85354
10816         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10817         * sel-sched.c (sel_global_init): ... here.
10819 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
10821         PR target/85238
10822         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10823         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10824         mode for PE-COFF targets.
10825         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10826         (i386_pe_asm_lto_end): Likewise.
10827         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10828         (TARGET_ASM_LTO_END): Likewise.
10829         * config/i386/winnt.c (saved_debug_info_level): New static variable.
10830         (i386_pe_asm_lto_start): New function.
10831         (i386_pe_asm_lto_end): Likewise.
10833 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
10834             Richard Biener  <rguenther@suse.de>
10836         PR middle-end/84955
10837         * lto-streamer-out.c (output_function): Fix CFG loop state before
10838         streaming out.
10839         * omp-expand.c (expand_oacc_for): Handle calls to internal
10840         functions like regular functions.
10842 2018-04-12  Richard Biener  <rguenther@suse.de>
10844         PR lto/85371
10845         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10846         for the early LTO debug to properly generate references to it
10847         during DIE emission.  Do not re-use that for the skeleton for
10848         split-dwarf.
10849         (dwarf2out_early_finish): Likewise.
10851 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10853         PR target/85328
10854         * config/i386/sse.md
10855         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10856         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10857         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10858         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10859         and output is a reg, avoid creating invalid lowpart subreg, but
10860         instead split into a 512-bit move.  Don't split if not AVX512VL,
10861         input is xmm16+ reg and output is a mem.
10862         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10863         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10864         xmm16+ reg and output is a mem.
10866 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10868         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10869         also for flag_dwarf2_cfi_asm.
10871 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
10873         PR rtl-optimization/85342
10874         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10875         a bool scalar var inside of the loop instead.  Don't try to update
10876         recog_data.operand after failed apply_change_group.
10878 2018-04-12  Tom de Vries  <tom@codesourcery.com>
10880         PR target/85296
10881         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10882         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
10883         array with flexible array member as array without given dimension.
10884         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10885         argument for undefined param to true.
10887 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
10889         PR target/85321
10890         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10891         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10892         from PowerPC section.
10893         * config/rs6000/sysv4.opt (mcall-): Improve help text.
10894         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10895         help text that is too long.
10896         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10897         help text that is too long.
10898         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10899         help text that is too long.
10901 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
10903         * config/alpha/alpha.md (stack_probe_internal): Rename
10904         from "probe_stack".  Update all callers.
10906 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10908         PR rtl-optimization/84566
10909         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10910         sched_macro_fuse_insns.
10912 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10914         PR target/84301
10915         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10916         (compute_block_dependences): ... from here.
10918 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10920         PR tree-optimization/85331
10921         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10922         from int to HOST_WIDE_INT.
10924 2018-04-11  Martin Jambor  <mjambor@suse.cz>
10926         PR ipa/84149
10927         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10928         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10929         not the same as the source val.
10930         (cgraph_edge_brings_value_p): New parameter.
10931         (gather_edges_for_value): Pass destination value to
10932         cgraph_edge_brings_value_p.
10933         (perhaps_add_new_callers): Likewise.
10934         (get_info_about_necessary_edges): Likewise and exclude values brought
10935         only by self-recursive edges.
10936         (create_specialized_node): Redirect only clones of self-calling edges.
10937         (+self_recursive_pass_through_p): New function.
10938         (find_more_scalar_values_for_callers_subset): Use it.
10939         (find_aggregate_values_for_callers_subset): Likewise.
10940         (known_aggs_to_agg_replacement_list): Removed.
10941         (decide_whether_version_node): Re-calculate known constants for all
10942         remaining context clones.
10944 2018-04-11  Richard Biener  <rguenther@suse.de>
10946         PR lto/85339
10947         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10948         from early DWARF output.
10949         (dwarf2out_early_finish): Output line info unconditionally into
10950         early DWARF and add reference to it.
10952 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10954         PR target/85281
10955         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10956         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10957         other than V2DFmode using iptr mode attribute.
10958         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10960 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
10962         PR rtl-optimization/84659
10963         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10965 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
10967         PR debug/85302
10968         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10969         SIZEP is NULL.
10970         (output_loc_list): Pass address of a dummy size variable even in the
10971         locview handling loop.
10972         (index_location_lists): Add comment on why skip_loc_list_entry can't
10973         call size_of_locs.
10975 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10977         PR target/85261
10978         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10979         into register.
10981 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
10983         PR target/85321
10984         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10985         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10986         and -mstring-compare-inline-limit.
10988 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10990         PR target/85287
10991         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10992         for stack clash protection in a register whenever we need it to be in
10993         a register.
10995 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
10997         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10998         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11000 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
11002         PR target/85321
11003         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11004         the help text.
11005         (mlong-double-): Ditto.
11006         * config/rs6000/sysv4.opt (msdata=): Ditto.
11007         (mtls-size=): Ditto.
11009 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11011         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11012         erroneous entries for
11013         "vector int vec_ldl (int, long int *)", and
11014         "vector unsigned int vec_ldl (int, unsigned long int *)".
11015         Add comments and entries for
11016         "vector bool char vec_ldl (int, bool char *)",
11017         "vector bool short vec_ldl (int, bool short *)",
11018         "vector bool int vec_ldl (int, bool int *)",
11019         "vector bool long long vec_ldl (int, bool long long *)",
11020         "vector pixel vec_ldl (int, pixel *)",
11021         "vector long long vec_ldl (int, long long *)",
11022         "vector unsigned long long vec_ldl (int, unsigned long long *)".
11023         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11024         type tree bool_long_long_type_node and correct definition of
11025         bool_V2DI_type_node to make reference to this new type tree.
11026         (rs6000_mangle_type): Replace erroneous reference to
11027         bool_long_type_node with bool_long_long_type_node.
11028         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11029         comments to emphasize sign distinctions for char and int types and
11030         replace RS6000_BTI_bool_long constant with
11031         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
11032         use of RS6000_BTI_pixel.
11033         (bool_long_type_node): Remove this macro definition.
11034         (bool_long_long_type_node): New macro definition
11036 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11038         PR rtl-optimization/85300
11039         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11040         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11041         simplify_unary_operation fails.
11043 2018-04-10  Martin Liska  <mliska@suse.cz>
11045         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11046         cgraph_edge and ipa_ref.
11048 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
11050         PR target/85177
11051         PR target/85255
11052         * config/i386/sse.md
11053         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11054         computation of the VEC_MERGE selector from mask.
11055         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11056         Fix decoding of the VEC_MERGE selector into mask.
11058 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11060         PR tree-optimization/85286
11061         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11063 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
11065         * final.c (final_1): Set insn_last_address as well as
11066         insn_current_address.
11068 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11070         PR target/85173
11071         * explow.c (emit_stack_probe): Call validize_mem on memory location
11072         before passing it to gen_probe_stack.  Create address operand and
11073         legitimize it for the probe_stack_address case.
11075 2018-04-09  Jan Hubicka  <jh@suse.cz>
11077         PR lto/85078
11078         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11079         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11080         * tree.c (free_lang_data_in_type): Fix handling of binfos;
11081         walk basetypes.
11082         (free_lang_data): Rebuild type inheritance graph.
11084 2018-04-09  Martin Sebor  <msebor@redhat.com>
11086         * invoke.texi (-finline-small-functions): Mention other optimization
11087         options.
11088         (-findirect-inlining, -fpartial-inlining): Same.
11089         (-finline-functions-called-once): Same.
11090         (-freorder-blocks-and-partition): Same.
11092 2018-04-09  Jan Hubicka  <jh@suse.cz>
11094         PR rtl/84058
11095         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11096         jumps; choose last target that matches the criteria (i.e.
11097         no partition changes for non-crossing jumps).
11098         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11099         support for redirecting crossing jumps to non-crossing.
11101 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
11103         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11104         also for naked functions.
11106 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
11108         * config/arc/arc.md (add_shift): New pattern.
11109         (add_shift2): Likewise.
11110         (sub_shift): Likewise.
11111         (sub_shift_cmp0_noout): Likewise.
11112         (compare_si_ashiftsi): Likewise.
11113         (xbfu_cmp0_noout): New combine pattern.
11114         (xbfu_cmp0"): Likewise.
11115         (movsi_set_cc_insn): Place the predicable variant first.
11116         (commutative_binary_cmp0_noout): Remove clobber.
11117         (commutative_binary_cmp0): New pattern.
11118         (noncommutative_binary_cmp0): Likewise.
11119         (noncommutative_binary_cmp0_noout): Likewise.
11120         (noncommutative_binary_comparison_result_used): Removed.
11121         (rsub_cmp0): New pattern.
11122         (rsub_cmp0_noout): Likewise.
11123         (extzvsi): Changed, keep only meaningful variants.
11124         (SQH, SEZ): New iterators.
11125         (SQH_postfix): New mode attribute.
11126         (SEZ_prefix): New code attribute.
11127         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11128         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11129         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11130         of numerical value.
11131         (noncommutative_operator): Check the availability of barrel
11132         shifter option.
11134 2018-04-09  Richard Biener  <rguenther@suse.de>
11136         PR tree-optimization/85284
11137         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11138         Only use the niter constraining form of simple_iv when the exit
11139         is always executed.
11141 2018-04-09  Tom de Vries  <tom@codesourcery.com>
11143         PR target/84041
11144         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11145         (define_expand "*memory_barrier"): New define_expand.
11146         (define_insn "memory_barrier"): New insn.
11148 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11150         PR rtl-optimization/80463
11151         PR rtl-optimization/83972
11152         PR rtl-optimization/83480
11154         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11155         correct producer for the insn.
11156         (tidy_control_flow): Fixup seqnos in case of debug insns.
11158 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11160         PR rtl-optimization/83913
11162         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11163         different sched-times when merging exprs.
11165 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11167         PR rtl-optimization/83962
11169         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11170         tidy_fallthru_edge and tidy_control_flow.
11172 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
11174         PR rtl-optimization/83530
11176         * sel-sched.c (force_next_insn): New global variable.
11177         (remove_insn_for_debug): When force_next_insn is true, also leave only
11178         next insn in the ready list.
11179         (sel_sched_region): When the region wasn't scheduled, make another pass
11180         over it with force_next_insn set to 1.
11182 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11184         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11185         into tm_file.
11186         * config/nds32/constants.md (unspec_volatile_element): Add enum values
11187         for interrupt control.
11188         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11189         functions for interrupt control.
11190         * config/nds32/nds32-intrinsic.md: Likewise.
11191         * config/nds32/nds32_intrinsic.h: Likewise.
11192         * config/nds32/nds32.h (nds32_builtins): Likewise.
11194 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11196         * config/nds32/nds32.c (nds32_init_machine_status,
11197         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11198         strict_aligned_p field.
11199         (nds32_expand_to_rtl_hook): New function.
11200         (TARGET_EXPAND_TO_RTL_HOOK): Define.
11201         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11203 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11204             Chung-Ju Wu  <jasonwucj@gmail.com>
11206         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11207         * config/nds32/nds32-n7.md: New file.
11208         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11209         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11210         pipeline.
11211         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11212         * config/nds32/nds32.md (pipeline_model): Add n7.
11213         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11214         * config/nds32/pipelines.md: Include n7 settings.
11216 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11217             Chung-Ju Wu  <jasonwucj@gmail.com>
11219         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11220         * config/nds32/nds32-e8.md: New file.
11221         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11222         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11223         pipeline.
11224         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11225         * config/nds32/nds32.md (pipeline_model): Add e8.
11226         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11227         * config/nds32/pipelines.md: Include e8 settings.
11229 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11230             Chung-Ju Wu  <jasonwucj@gmail.com>
11232         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11233         * config/nds32/nds32-n8.md: New file.
11234         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11235         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11236         pipeline.
11237         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11238         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11239         * config/nds32/nds32.md (pipeline_model): Add n8.
11240         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11241         * config/nds32/pipelines.md: Include n8 settings.
11243 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
11244             Chung-Ju Wu  <jasonwucj@gmail.com>
11246         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11247         * config/nds32/nds32-n9-2r1w.md: New file.
11248         * config/nds32/nds32-n9-3r2w.md: New file.
11249         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11250         nds32_register_ports): New or modify for cpu n9.
11251         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11252         pipeline.
11253         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11254         * config/nds32/nds32-utils.c: New file.
11255         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11256         TARGET_MUL_SLOW): Define.
11257         * config/nds32/nds32.md (pipeline_model): New attribute.
11258         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11259         New options that support cpu n9.
11260         * config/nds32/pipelines.md: Include n9 settings.
11261         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11263 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
11265         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11266         information if necessary.
11267         (output_cond_branch_compare_zero): Likewise.
11268         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11269         (nds32_target_alignment): Refine for alignment.
11270         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11271         (FUNCTION_BOUNDARY): Modify.
11272         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11273         align case.
11274         * config/nds32/nds32.opt (malways-align, malign-functions): New.
11276 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
11278         * config/nds32/constants.md (unspec_volatile_element): Add values for
11279         TLB operation and data prefetch.
11280         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11281         functions for TLB operation and data prefetch.
11282         * config/nds32/nds32-intrinsic.md: Likewise.
11283         * config/nds32/nds32_intrinsic.h: Likewise.
11284         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11285         (nds32_print_operand): Likewise.
11286         * config/nds32/nds32.h (nds32_builtins): Likewise.
11288 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
11289         Andrew Pinski <pinsika@gcc.gnu.org>
11291         PR middle-end/82976
11292         * match.pd: Use constant_boolean_node of correct type instead of
11293         boolean_true_node or boolean_false_node for simplifying
11294         pointer comparisons to zero.
11296 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11298         PR tree-optimization/80021
11299         * tree.c (verify_type_variant): Make error call in verify_variant_match
11300         translatable and remove final full stop.
11302 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11304         * config/nds32/constants.md (unspec_volatile_element): Add
11305         UNSPEC_VOLATILE_EH_RETURN.
11306         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11307         nds32_output_stack_pop): Support dwarf exception handling process.
11308         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11309         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11310         exception handling process.
11311         (nds32_compute_stack_frame): Likewise.
11312         (nds32_return_addr_rtx): Likewise.
11313         (nds32_initial_elimination_offset): Likewise.
11314         (nds32_expand_prologue): Likewise.
11315         (nds32_expand_epilogue): Likewise.
11316         (nds32_dynamic_chain_address): New function.
11317         * config/nds32/nds32.h (machine_function): Add fields for dwarf
11318         exception handling.
11319         (DYNAMIC_CHAIN_ADDRESS): Define.
11320         (EH_RETURN_DATA_REGNO): Define.
11321         (EH_RETURN_STACKADJ_RTX): Define.
11322         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11323         patterns for dwarf exception handling.
11325 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11327         * config/nds32/nds32.h: Clean up obsolete macros.
11329 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11331         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11332         Add enum values for particular instructions.
11333         * config/nds32/nds32-intrinsic.c: Implementation of expanding
11334         particular intrinsic functions.
11335         * config/nds32/nds32-intrinsic.md: Likewise.
11336         * config/nds32/nds32_intrinsic.h: Likewise.
11337         * config/nds32/nds32.h (nds32_builtins): Likewise.
11338         * config/nds32/nds32.md (type): Add pbsad and pbsada.
11339         (btst, ave): New patterns for particular instructions.
11341 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11343         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11344         Add enum values for atomic load/store and memory sync.
11345         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11346         and memory sync.
11347         * config/nds32/nds32-intrinsic.md: Likewise.
11348         * config/nds32/nds32_intrinsic.h: Likewise.
11349         * config/nds32/nds32.h (nds32_builtins): Likewise.
11351 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
11353         PR tree-optimization/85257
11354         * fold-const.c (native_encode_vector): If not all elts could fit
11355         and off is -1, return 0 rather than offset.
11356         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11357         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11358         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
11359         adjust buffer in native_interpret_expr call.
11361 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11363         * config/nds32/constants.md (unspec_volatile_element): Add cache
11364         control enum values.
11365         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11366         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11367         * config/nds32/nds32.c (nds32_cctl_names): New.
11368         (nds32_print_operand): Handle cache control register names.
11369         * config/nds32/nds32.h (nds32_builtins): New enum values.
11370         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11371         macros.
11372         * config/nds32/nds32.md (type): Add mmu.
11373         * config/nds32/pipelines.md (simple_insn): Add mmu.
11375 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11377         * config/nds32/nds32.md (type): Remove call.
11378         * config/nds32/pipelines.md (simple_insn): Likewise.
11380 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11382         * config/nds32/constants.md (unspec_volatile_element): Add
11383         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11384         UNSPEC_VOLATILE_FMFCFG.
11385         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11386         description for fmfcfg and fmfcsr.
11387         (bdesc_1arg): Add fmtcsr.
11388         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11389         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11390         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11391         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11392         unspec_fmfcfg): New patterns.
11393         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11394         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11395         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11396         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11397         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11398         __nds32__fmfcfg): Define.
11400 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
11402         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11403         intrinsic register names.
11404         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11405         intrinsic register enum values and macros.
11407 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
11409         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11410         for load/store addressing form.
11411         (nds32_print_operand_address): Likewise.
11413 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
11415         PR target/85196
11416         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11417         based on LABEL_REF.  Remove useless assertion.
11418         (pic_address_needs_scratch): Fix formatting.
11419         (sparc_legitimize_pic_address): Minor tweaks.
11420         (sparc_delegitimize_address): Adjust assertion accordingly.
11421         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11422         into symbolic_operand.
11423         (movsi_high_pic_label_ref): Likewise.
11424         (movsi_lo_sum_pic_label_ref): Likewise.
11425         (movdi_pic_label_ref): Likewise.
11426         (movdi_high_pic_label_ref): Likewise.
11427         (movdi_lo_sum_pic_label_ref): Likewise.
11429 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
11431         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11432         custom LIB_SPEC setup.
11434 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
11435             Kito Cheng  <kito.cheng@gmail.com>
11437         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11438         * config/riscv/freebsd.h: New.
11440 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11442         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11443         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11444         file.
11446 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11447             Kito Cheng  <kito.cheng@gmail.com>
11449         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11450         nds32_output_call, nds32_symbol_binds_local_p): New functions.
11451         * config/nds32/nds32-protos.h (nds32_output_call,
11452         nds32_output_return): Declare.
11453         * config/nds32/nds32.md: Refine all the call and return patterns.
11455 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11457         PR debug/85252
11458         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11459         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11461         PR rtl-optimization/84872
11462         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11463         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11464         EDGE_CROSSING edge.
11466 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
11468         * expr.c (copy_blkmode_to_reg): Revert 254862.
11469         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11471 2018-04-06  Richard Biener  <rguenther@suse.de>
11473         PR middle-end/85244
11474         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11475         after seeing a component reference with an adjacent field.  Treat
11476         refs to arrays at struct end of external decls similar to
11477         refs to unconstrained commons.
11479 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
11481         PR sanitizer/85213
11482         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11483         look through SAVE_EXPRs with non-side-effects argument.  Adjust
11484         recursive calls.
11485         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11486         save_p here.
11488 2018-04-06  Richard Biener  <rguenther@suse.de>
11490         PR middle-end/85180
11491         * alias.c (find_base_term): New wrapper around find_base_term
11492         unwinding CSELIB_VAL_PTR changes.
11493         (find_base_term): Do not restore CSELIB_VAL_PTR during the
11494         recursion.
11496 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11498         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11499         instructions.
11500         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11501         constant definitions.
11502         ("nop"): lr 0,0 -> nopr r0
11503         ("nop_lr0", "nop_lr1"): New insn definitions.
11505 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
11507         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11508         NDS32_V3PUSH_AVAILABLE_P macro.
11510 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
11511             Chung-Ju Wu  <jasonwucj@gmail.com>
11513         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11514         (nds32*-*-*): Add float and fpu_config into supported_defaults.
11515         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11516         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11517         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11518         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11519         * config/nds32/constraints.md: New constraints and checking for hard
11520         float configuration.
11521         * config/nds32/iterators.md: New mode iterator and attribute for hard
11522         float configuration.
11523         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11524         patterns.
11525         * config/nds32/nds32-fpu.md: New file.
11526         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11527         deal with hard float code generation.
11528         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11529         ARCH_V3S.
11530         (abi_type, float_reg_number): New enum type.
11531         * config/nds32/nds32-predicates.c: New predicates for hard float.
11532         * config/nds32/nds32-protos.h: Declare functions for hard float.
11533         * config/nds32/nds32.c: Implementation for hard float configuration.
11534         * config/nds32/nds32.h: Definitions for hard float configuration.
11535         * config/nds32/nds32.md: Include hard float machine description and
11536         modify patterns for hard float configuration.
11537         * config/nds32/nds32.opt: New options for hard float configuration.
11538         * config/nds32/predicates.md: New predicates for hard float
11539         configuration.
11541 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11543         * common/config/nds32/nds32-common.c
11544         (nds32_option_optimization_table): Enable -mreleax-hint by default.
11546 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
11548         PR middle-end/85195
11549         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11550         CONSTRUCTOR_ELT (ctor, ...)->value.
11552 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
11554         PR target/85193
11555         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11557 2018-04-05  Tom de Vries  <tom@codesourcery.com>
11559         PR target/85204
11560         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11561         cond jump.
11563 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11564             Kito Cheng  <kito.cheng@gmail.com>
11566         * config/nds32/constraints.md (U33): Fine-tune checking condition.
11567         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11568         * config/nds32/nds32.h (nds32_16bit_address_type): Add
11569         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11571 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
11572             Kito Cheng  <kito.cheng@gmail.com>
11574         * config/nds32/constraints.md (Ufe): New memory constraint.
11575         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11576         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11577         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11578         operands.
11579         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11580         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11582 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11584         * config/nds32/nds32.md: Use optimize_size in the condition for
11585         alu-shift instructions.
11587 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11589         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11591 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11593         * config/nds32/nds32.md (negsi2): Refine pattern.
11595 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11596             Chung-Ju Wu  <jasonwucj@gmail.com>
11598         * config/nds32/iterators.md (shift_rotate): New code iterator.
11599         (shift): New code attribute.
11600         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11601         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11602         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11603         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11604         bit-wise operations.
11605         (andsi3, *andsi3): Ditto.
11606         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11607         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11608         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11609         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11610         nds32_ior_operand, nds32_xor_operand): New predicates.
11612 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11614         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11615         (addsi3, subsi3): ... this.
11617 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11619         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11621 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11623         * config/nds32/nds32.md: Adjust indention.
11625 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
11627         * config/nds32/nds32.md (feature): New attribute.
11629 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
11631         * config/nds32/nds32.md (subtype): New attribute.
11633 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11635         PR target/85203
11636         * config/arm/arm-builtins.c (arm_expand_builtin): Change
11637         expansion to perform a bitwise AND of the argument followed by a
11638         boolean negation of the result.
11640 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
11642         PR rtl-optimization/84878
11643         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11644         the basic block.  Assert the use reference is not artificial and that
11645         it has an associated insn.
11647 2018-04-04  Michael Matz  <matz@suse.de>
11649         * builtins.c (compute_objsize): Pass correct operand
11650         to array_at_struct_end_p.
11652 2018-04-04  Richard Biener  <rguenther@suse.de>
11654         PR lto/85176
11655         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11656         from contexts for DINFO_LEVEL_TERSE and below.
11658 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11660         * config/nds32/nds32-doubleword.md (move_<mode>): Require
11661         resiter_operand condition.
11662         * config/nds32/nds32.md (*move<mode>): Ditto.
11664 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11665             Monk Chiang  <sh.chiang04@gmail.com>
11667         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11669 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11671         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11673 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11674             Kito Cheng  <kito.cheng@gmail.com>
11676         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11677         nds32_cond_code_str, output_cond_branch,
11678         output_cond_branch_compare_zero, nds32_expand_cbranch,
11679         nds32_expand_cstore, nds32_expand_movcc,
11680         nds32_output_cbranchsi4_equality_zero,
11681         nds32_output_cbranchsi4_equality_reg,
11682         nds32_output_cbranchsi4_equality_reg_or_const_int,
11683         nds32_output_cbranchsi4_greater_less_zero: New functions.
11684         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11685         nds32_expand_cstore, nds32_expand_movcc,
11686         nds32_output_cbranchsi4_equality_zero,
11687         nds32_output_cbranchsi4_equality_reg,
11688         nds32_output_cbranchsi4_equality_reg_or_const_int,
11689         nds32_output_cbranchsi4_greater_less_zero): Declare.
11690         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11691         nds32_rimm11s_operand): New predicates.
11692         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11693         * config/nds32/nds32.md: Rewrite all the branch and conditional move
11694         patterns.
11696 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
11698         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11699         * config/nds32/nds32.md: Ditto.
11700         * config/nds32/pipelines.md: Ditto.
11702 2018-04-04  Richard Biener  <rguenther@suse.de>
11704         PR tree-optimization/85168
11705         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11706         propagating abnormals.
11708 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11710         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11712 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
11713             Kito Cheng  <kito.cheng@gmail.com>
11715         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11716         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11717         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11718         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11719         * config/nds32/nds32.md (sibcall_internal): New.
11720         (sibcall_register): Remove.
11721         (sibcall_immediate): Remove.
11722         (sibcall_value_internal): New.
11723         (sibcall_value_register): Remove.
11724         (sibcall_value_immediate): Remove.
11725         * config/nds32/predicates.md (nds32_general_register_operand): New.
11726         (nds32_call_address_operand): New.
11728 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11730         PR rtl-optimization/85167
11731         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11732         bb_defs if *split_p, instead preinitialize it to NULL.
11734         PR tree-optimization/85156
11735         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11736         evaluating the argument multiple times.
11738 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
11740         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11741         than vector.
11742         (_mm_cvtpd_ps): Likewise.
11743         (_mm_cvttpd_epi32): Likewise.
11744         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11745         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11746         vector, pixel, and bool following altivec.h include.
11748 2018-04-03  Martin Sebor  <msebor@redhat.com>
11750         * doc/extend.texi (Common Function Attributes): Clarify.
11751         (const attribute): Likewise.
11752         (pure attribute): Likewise.
11754 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
11756         PR target/85169
11757         * config/i386/i386.c (ix86_expand_vector_set): Use
11758         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
11760 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
11762         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11763         instructions when changing rounding bits to preserve precision bits
11764         in the x87 control word.
11766 2018-04-03  Martin Liska  <mliska@suse.cz>
11768         PR tree-optimization/82491
11769         * rtl.h (strip_offset_and_add): Replace += suboffset with
11770         poly_uint64 () + suboffset.
11772 2018-03-29  Martin Liska  <mliska@suse.cz>
11773             Martin Jambor  <mjambor@suse.cz>
11775         PR ipa/84947
11776         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11777         param_type is not an integral or pointer type.
11779 2018-04-03  Richard Biener  <rguenther@suse.de>
11781         * sese.h (recompute_all_dominators): Remove.
11783 2018-04-02  Martin Sebor  <msebor@redhat.com>
11785         * doc/invoke.texi (-Wrestrict): Fix typos.
11787 2018-04-02  Jim Wilson  <jimw@sifive.com>
11789         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11790         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11791         (<optab>di3, <optab>si3_extend): Likewise.
11792         (<optab>si3_mask, <optab>si3_mask_1): New.
11793         (<optab>di3_mask, <optab>di3_mask_1): New.
11794         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11795         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11796         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11798 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
11800         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11801         example.
11803 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
11805         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11806         (nds32_canonicalize_comparison): New function.
11808 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11809             Kito Cheng  <kito.cheng@gmail.com>
11810             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
11812         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11813         * config/nds32/constants.md (unspec_volatile_element): Add
11814         UNSPEC_VOLATILE_RELAX_GROUP.
11815         * config/nds32/nds32-relax-opt.c: New file.
11816         * config/nds32/nds32-predicates.c
11817         (nds32_symbol_load_store_p): New function.
11818         * config/nds32/nds32-protos.h
11819         (nds32_symbol_load_store_p): Declare function.
11820         (make_pass_nds32_relax_opt): Declare new rtl pass function.
11821         * config/nds32/nds32.c
11822         (nds32_register_pass): New function to register pass.
11823         (nds32_register_passes): New function to register passes.
11824         * config/nds32/nds32.md (relax_group): New pattern.
11825         * config/nds32/nds32.opt (mrelax-hint): New option.
11826         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11828 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
11830         * config/nds32/t-nds32: Modify files dependency.
11832 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11834         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11835         (PROFILE_HOOK): Define its implementation.
11837 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
11839         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11840         type and 32-bit size.
11842 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
11844         PR middle-end/85090
11845         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11846         (V_128_256): New mode iterator.
11847         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11848         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11849         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11850         of V.
11851         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11852         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11854 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
11856         PR target/83315
11857         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11858         NaN inputs correctly.
11860 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
11862         PR target/80546
11863         * config/rs6000/vsx.md (??r): New mode attribute.
11864         (*vsx_mov<mode>_64bit): Use it.
11865         (*vsx_mov<mode>_32bit): Likewise.
11867 2018-03-30  Martin Sebor  <msebor@redhat.com>
11869         PR tree-optimization/84818
11870         * builtins.c (check_access): Use warning_n.
11872 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
11874         PR target/83822
11875         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11876         condition.
11877         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11878         condition.
11880 2018-03-30  Julia Koval  <julia.koval@intel.com>
11882         PR target/84413
11883         * x86-tune.def (movx, partial_reg_dependency): Enable for
11884         m_SKYLAKE_AVX512.
11886 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
11888         PR inline-asm/84985
11889         * lra-constraints.c (process_alt_operands): Move setting
11890         this_alternative_matches below.
11892 2018-03-29  Martin Liska  <mliska@suse.cz>
11894         PR lto/84995.
11895         * doc/invoke.texi: Document how LTO works with debug info.
11896         Describe auto-load support of binutils.  Mention 'x86-64'
11897         as valid option value of -march option.
11899 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
11901         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11903         PR c/85094
11904         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11905         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11906         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11907         checking.
11909 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11911         PR target/84912
11912         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11913         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11914         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11915         for RS6000_BTM_POWERPC64.
11916         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11917         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11918         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11919         definition.
11920         (DIVDE): Use it.
11921         (DIVDEU): Likewise.
11923 2018-03-28 Carl Love  <cel@us.ibm.com>
11925         Revert
11926         2017-09-27  Carl Love  <cel@us.ibm.com>
11928         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11929         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11930         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11931         fctiw instruction.
11933 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11935         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11936         instead of __vector bool.
11937         (_mm_max_pu8): Likewise.
11938         (_mm_min_pi16): Likewise.
11940 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
11942         PR target/84912
11943         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11944         (DIVWEUO): Likewise.
11945         (DIVDEO): Likewise.
11946         (DIVDEUO): Likewise.
11947         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11948         DIVWEUO and DIVDEUO.
11949         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11950         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11951         (div_extend): Likewise.
11952         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11953         builtin function.
11954         (__builtin_divweuo): Likewise.
11955         (__builtin_divdeo): Likewise.
11956         (__builtin_divdeuo): Likewise.
11958 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11960         PR target/85095
11961         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11962         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11964         PR tree-optimization/82004
11965         * gimple-match-head.c (optimize_pow_to_exp): New function.
11966         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11967         Don't fold to exp if optimize_pow_to_exp is false.
11969 2018-03-28  Martin Liska  <mliska@suse.cz>
11971         PR other/84819
11972         * calls.c (initialize_argument_information): Fix trailing space.
11973         * common.opt: Fix typo and provide better explanation for
11974         -fsanitize-coverage option.
11975         * config/i386/i386.opt: Fix typo.
11977 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
11978             Martin Liska  <mliska@suse.cz>
11980         PR sanitizer/85081
11981         * gimplify.c (asan_poison_variable): Don't do the check for
11982         gimplify_omp_ctxp here.
11983         (gimplify_decl_expr): Do it here.
11984         (gimplify_target_expr): Likewise.
11986 2018-03-28  Martin Liska  <mliska@suse.cz>
11988         PR target/84988
11989         * config/i386/i386.c (ix86_function_arg_advance): Do not call
11990         chkp_type_bounds_count if MPX is not enabled.
11992 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11994         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11996 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
11998         PR target/84914
11999         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12000         function to create the function decl for complex long double
12001         multiply and divide for -mabi=ieeelongdouble.
12002         (init_float128_ieee): Call it.
12004 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
12006         PR target/85044
12007         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12008         -fcf-protection=branch -mibt.
12009         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12011 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12013         PR target/81863
12014         * config/arm/arm.c (arm_valid_symbolic_address): Handle
12015         arm_word_relocations.
12017 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
12019         PR target/85056
12020         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12021         extern array declarations.
12023 2018-03-27  Richard Biener  <rguenther@suse.de>
12025         PR middle-end/84067
12026         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12027         explicit single_use checks.
12029 2018-03-27  Richard Biener  <rguenther@suse.de>
12031         PR tree-optimization/85082
12032         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12033         Valueize the VUSE.
12035 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12037         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12038         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12039         Turn on fasynchronous-unwind-tables and funwind-tables.
12041 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
12043         PR target/85073
12044         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12045         (*bmi_blsr_<mode>_ccz): Ditto.
12047 2018-03-26  Tom de Vries  <tom@codesourcery.com>
12049         PR tree-optimization/85063
12050         * omp-general.c (offloading_function_p): New function.  Factor out
12051         of ...
12052         * omp-offload.c (pass_omp_target_link::gate): ... here.
12053         * omp-general.h (offloading_function_p): Declare.
12054         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12055         with attribute omp declare target for offloading functions.
12057 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
12059         PR tree-optimization/84005
12060         * tree-data-ref.h (get_base_for_alignment): Declare.
12061         * tree-data-ref.c (get_base_for_alignment_1): New function.
12062         (get_base_for_alignment): Likewise.
12063         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12064         get_base_for_alignment to find a suitable base object, instead
12065         of always using drb->base_address.
12067 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12069         PR inline-asm/85022
12070         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12071         known size by default.
12073 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
12075         PR inline-asm/85030
12076         * lra-constraints.c (process_alt_operands): Don't match BLKmode
12077         and non BLKmode operands.
12079 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12081         PR target/85026
12082         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12083         Clean up attributes.
12085 2018-03-23  Richard Biener  <rguenther@suse.de>
12087         PR debug/85020
12088         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12089         we are going to emit early debug for LTO.
12091 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
12093         PR inline-asm/85034
12094         * function.c (match_asm_constraints_1): Don't optimize if input
12095         doesn't satisfy general_operand predicate for output's mode.
12097         PR inline-asm/85022
12098         * alias.c (write_dependence_p): Don't require for x_canonicalized
12099         non-VOIDmode if x has VOIDmode.
12101         PR sanitizer/85029
12102         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12103         just don't try to optimize it rather than assert it never happens.
12105 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12107         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12108         macro expansions for definition of ST_INTERNAL_<mode> and
12109         LD_INTERNAL_<mode> builtins.
12110         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12111         Remove prototype.
12112         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12113         function.
12114         (altivec_expand_st_builtin): Likewise.
12115         (altivec_expand_builtin): Remove calls to deleted functions.
12116         (rs6000_address_for_altivec): Delete this function.
12117         * config/rs6000/vector.md: Remove expands for
12118         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12120 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
12122         PR target/84826
12123         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12124         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12125         re-computing once computed.
12126         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12127         (arm_init_machine_status): Initialize
12128         machine->static_chain_stack_bytes.
12130 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12132         PR target/84760
12133         * doc/extend.texi: Add four new prototypes for vec_ld.
12134         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12135         definitions for more logical presentation.
12136         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12137         entries for V1TI variants of __builtin_altivec_ld builtin.
12138         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12139         handling of V1TI variant of LVX icode pattern.
12140         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12141         (rs6000_gimple_fold_builtin): Likewise.
12142         (altivec_init_builtins): Add code to define
12143         __builtin_altivec_lvx_v1ti function.
12145 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12147         PR inline-asm/84941
12148         * function.c (match_asm_constraints_1): Don't do the optimization
12149         if input isn't a REG, SUBREG, MEM or constant.
12151 2018-03-22  Tom de Vries  <tom@codesourcery.com>
12153         PR tree-optimization/84956
12154         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12155         bb_has_abnormal_pred.
12157 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
12159         PR sanitizer/85018
12160         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12161         DECL_INITIAL (decl) to decl at the end.
12162         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12163         adjust the comment.
12165 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
12167         * doc/extend.texi (__builtin_tgmath): Document when complex
12168         integer types are treated as _Complex _Float64.
12170 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12172         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12174 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12176         PR tree-optimization/84960
12177         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12178         if it is ENTRY block, move them into single succ of ENTRY in that case.
12180 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
12182         PR tree-optimization/84811
12183         * poly-int.h (poly_span_traits): Remove the T3 parameter and
12184         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12185         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12186         (known_subrange_p): Update accordingly.  Cast each value involved
12187         in the size comparison, rather than casting the result of the
12188         subtraction.
12190 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12192         PR tree-optimization/84982
12193         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12194         by flipping the least significant bit rather than all bits from
12195         bitpos to bitpos + bitsize - 1.
12197 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12199         * doc/extend.texi (Deprecated Features): Remove mention of
12200         long-deleted deprecations.
12202 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12204         PR jit/84288
12205         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12206         * configure: Regenerate.
12208 2018-03-21  Tom de Vries  <tom@codesourcery.com>
12210         PR tree-optimization/83126
12211         * tree-parloops.c (num_phis): New function.
12212         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12214 2018-03-21  Nathan Sidwell  <nathan@acm.org>
12216         * doc/extend.texi (Deprecated Features): Update deprecated flags,
12217         mention anon-struct/union members and trailing attributes.
12219 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
12221         PR tree-optimization/84969
12222         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12223         builtin memset partitions if they set different rhs values.
12225 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
12227         PR rtl-optimization/84989
12228         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12229         VEC_DUPLICATE with scalar result mode.
12231 2018-03-21  Martin Liska  <mliska@suse.cz>
12233         PR ipa/84963
12234         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12235         not intended return statement.
12237 2018-03-21  Martin Liska  <mliska@suse.cz>
12239         PR target/84988
12240         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12241         (chkp_find_bound_slots_1): Limit number of iterations.
12243 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
12245         PR target/84838
12246         * Minor grammar fixes for x86 options.
12248 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12250         PR debug/84875
12251         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12252         holding REG_CFA_RESTORE notes, instead turn them into a USE.
12254 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
12256         PR target/83789
12257         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12258         (altivec_lvx_<mode>_1op): Likewise.
12259         (altivec_stvx_<mode>_2op): Likewise.
12260         (altivec_stvx_<mode>_1op): Likewise.
12261         (altivec_lvx_<VM2:mode>): New define_expand.
12262         (altivec_stvx_<VM2:mode>): Likewise.
12263         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12264         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12265         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12266         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12267         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12268         (rs6000_gen_lvx): Likewise.
12269         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12270         (altivec_expand_stv_builtin): Likewise.
12271         (altivec_expand_builtin): Likewise.
12272         * config/rs6000/vector.md: Likewise.
12274 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12276         PR target/82518
12277         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12278         BYTES_BIG_ENDIAN.
12280 2018-03-20  Richard Biener  <rguenther@suse.de>
12282         PR target/84986
12283         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12284         sign-conversions as zero, fall back to standard scalar_stmt
12285         cost for the rest.
12287 2018-03-20  Martin Liska  <mliska@suse.cz>
12289         PR ipa/84825
12290         * predict.c (rebuild_frequencies): Handle case when we have
12291         PROFILE_ABSENT, but flag_guess_branch_prob is false.
12293 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12295         PR target/84990
12296         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12297         flag_section_anchors.
12298         * varasm.c (use_blocks_for_decl_p): Remove hack for
12299         dw2_force_const_mem.
12301         PR target/84845
12302         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12303         to ...
12304         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
12305         be created, use lowpart_subreg of operands[0] rather than operands[0]
12306         itself.
12307         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12308         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12309         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12310         and n constraint instead of aarch64_shift_imm_di and Usd.
12311         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12312         (*aarch64_<optab>_reg_minus<mode>3): ... this.
12314 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
12316         PR target/82989
12317         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12318         to favor GPR over NEON registers.
12319         (<shift>di3_neon): Likewise.
12321 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12323         PR target/84952
12324         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12325         (nvptx_process_pars): Emit bar.sync asap and alap.
12327 2018-03-20  Tom de Vries  <tom@codesourcery.com>
12329         PR target/84954
12330         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12331         seen_label if seen_label is already set.
12333 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
12335         PR target/84945
12336         * config/i386/i386.c (fold_builtin_cpu): For features above 31
12337         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12338         Use 1U instead of 1.  Formatting fixes.
12340         PR c/84953
12341         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12342         instead of TREE_TYPE (s1) for the return value.
12344 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
12346         PR tree-optimization/84946
12347         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12348         bitsize + bitsize in poly_uint64 rather than poly_int64.
12350         PR sanitizer/78651
12351         * dwarf2asm.c: Include fold-const.c.
12352         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12353         of decl rather than decl itself.
12355         PR rtl-optimization/84643
12356         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12358 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
12360         PR sanitizer/78651
12361         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12362         calling assemble_variable.
12364 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
12366         PR target/81647
12367         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12368         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12370 2018-03-19  Jim Wilson  <jimw@sifive.com>
12372         PR bootstrap/84856
12373         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12374         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12375         (riscv_first_stack_step): Likewise.
12376         (riscv_option_override): Use STACK_BOUNDARY instead of
12377         MIN_STACK_BOUNDARY.
12378         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12379         MIN_STACK_BOUNDARY.
12380         (BIGGEST_ALIGNMENT): Set to 128.
12381         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12382         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12383         STACK_BOUNDARY.
12385 2018-03-19  Richard Biener  <rguenther@suse.de>
12387         PR tree-optimization/84933
12388         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12389         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12391 2018-03-19  Richard Biener  <rguenther@suse.de>
12393         PR tree-optimization/84859
12394         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12395         (cond_if_else_store_replacement): Perform sinking operation on
12396         single-store BBs regardless of MAX_STORES_TO_SINK setting.
12397         Generalize what a BB with a single eligible store is.
12399 2018-03-19  Richard Biener  <rguenther@suse.de>
12401         PR tree-optimization/84929
12402         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12403         chrec_is_positive against non-chrec arg.
12405 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
12407         PR target/84711
12408         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12410 2018-03-18  Martin Liska  <mliska@suse.cz>
12412         PR rtl-optimization/84635
12413         * regrename.c (build_def_use): Use matches_mode only when
12414         matches >= 0.
12416 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
12418         PR tree-optimization/84913
12419         * tree-vect-loop.c (vectorizable_reduction): Don't try to
12420         vectorize chains of COND_EXPRs.
12422 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12424         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12426 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12428         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12430 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
12432         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12434 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12435             Kito Cheng  <kito.cheng@gmail.com>
12437         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12438         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12439         (nds32_adjust_reg_alloc_order): New function.
12440         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12442 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
12444         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12445         nds32_print_operand, nds32_print_operand_address): Use
12446         HOST_WIDE_INT_PRINT_DEC instead.
12448 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
12450         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12452 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
12454         PR target/84902
12455         * config/i386/i386.c (initial_ix86_tune_features,
12456         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12457         unsigned long long.
12458         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12459         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12460         rather than 1u << ix86_tune.  Formatting fix.
12461         (ix86_option_override_internal): Change ix86_arch_mask from
12462         unsigned int to unsigned HOST_WIDE_INT, initialize to
12463         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12464         (ix86_function_specific_restore): Likewise.
12466 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12468         PR target/84899
12469         * postreload.c (reload_combine_recognize_pattern): Perform
12470         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12471         truncate_int_for_mode the result for the destination's mode.
12473         PR c/84909
12474         * hsa-gen.c (mem_type_for_type): Fix comment typo.
12475         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12476         Likewise.
12477         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12478         Likewise.
12480 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
12482         PR target/84876
12483         * lra-assigns.c (lra_split_hard_reg_for): Don't use
12484         regno_allocno_class_array and sorted_pseudos.
12485         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12486         insns where regno is used.
12488 2018-03-16  Martin Liska  <mliska@suse.cz>
12490         PR ipa/84833
12491         * multiple_target.c (create_dispatcher_calls): Redirect
12492         reference in the symbol table.
12494 2018-03-16  Martin Liska  <mliska@suse.cz>
12496         PR ipa/84722
12497         * multiple_target.c (create_dispatcher_calls): Redirect also
12498         an alias.
12500 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12502         PR c++/79937
12503         PR c++/82410
12504         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12505         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12506         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12508 2018-03-16  Julia Koval  <julia.koval@intel.com>
12510         * doc/invoke.texi (Skylake Server): Add CLWB.
12511         Cannonlake): Remove CLWB.
12513 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
12515         PR tree-optimization/84841
12516         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12517         1 << 3.
12518         (FLOAT_ONE_CONST_TYPE): Define.
12519         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12520         (sort_by_operand_rank): Put entries with higher constant_type last
12521         rather than first to match comments.
12523 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
12525         * config/nios2/nios2.md (movsi_internal): Fix thinko in
12526         split predicate.
12528 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12530         PR c++/79085
12531         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12532         check and use address of target always.
12534 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
12536         PR target/84574
12537         * config/i386/i386.c (indirect_thunk_needed): Update comments.
12538         (indirect_thunk_bnd_needed): Likewise.
12539         (indirect_thunks_used): Likewise.
12540         (indirect_thunks_bnd_used): Likewise.
12541         (indirect_return_needed): New.
12542         (indirect_return_bnd_needed): Likewise.
12543         (output_indirect_thunk_function): Add a bool argument for
12544         function return.
12545         (output_indirect_thunk_function): Don't generate alias for
12546         function return thunk.
12547         (ix86_code_end): Call output_indirect_thunk_function to generate
12548         function return thunks.
12549         (ix86_output_function_return): Set indirect_return_bnd_needed
12550         and indirect_return_needed instead of indirect_thunk_bnd_needed
12551         and indirect_thunk_needed.
12553 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
12555         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12556         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12557         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12559 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
12560             Paul Hua <paul.hua.gm@gmail.com>
12562         PR c/84852
12563         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12565 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
12567         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12568         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12569         resp. SFmode cases.
12571 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
12573         PR target/84711
12574         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12575         instead of GET_MODE_SIZE when comparing Units.
12577 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12579         PR target/68256
12580         * varasm.c (hash_section): Return an unchangeble hash value
12581         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12582         Return !aarch64_can_use_per_function_literal_pools_p ().
12584 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
12586         PR target/84860
12587         * optabs.c (emit_conditional_move): Pass address of cmode's copy
12588         rather than address of cmode as last argument to prepare_cmp_insn.
12590 2018-03-15  Julia Koval  <julia.koval@intel.com>
12592         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12593         F_AVX512VNNI, F_AVX512BITALG): New.
12595 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
12597         PR target/83451
12598         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
12599         insn for floating-point loads and stores.
12601 2018-03-14  Carl Love  <cel@us.ibm.com>
12603         * config/rs6000/rs6000-c.c: Add macro definitions for
12604         ALTIVEC_BUILTIN_VEC_PERMXOR.
12605         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12606         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12607         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12608         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12609         UNSPEC_VPERMXOR.
12610         * config/doc/extend.texi: Add prototypes for vec_permxor.
12612 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
12614         PR c/84852
12615         * diagnostic-show-locus.c (class layout_point): Convert m_line
12616         from int to linenum_type.
12617         (line_span::comparator): Use linenum "compare" function when
12618         comparing line numbers.
12619         (test_line_span): New function.
12620         (layout_range::contains_point): Convert param "row" from int to
12621         linenum_type.
12622         (layout_range::intersects_line_p): Likewise.
12623         (layout::will_show_line_p): Likewise.
12624         (layout::print_source_line): Likewise.
12625         (layout::should_print_annotation_line_p): Likewise.
12626         (layout::print_annotation_line): Likewise.
12627         (layout::print_leading_fixits): Likewise.
12628         (layout::annotation_line_showed_range_p): Likewise.
12629         (struct line_corrections): Likewise for field m_row.
12630         (line_corrections::line_corrections): Likewise for param "row".
12631         (layout::print_trailing_fixits): Likewise.
12632         (layout::get_state_at_point): Likewise.
12633         (layout::get_x_bound_for_row): Likewise.
12634         (layout::print_line): Likewise.
12635         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12636         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12637         * input.c (selftest::test_linenum_comparisons): New function.
12638         (selftest::input_c_tests): Call it.
12639         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12640         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12641         * selftest.h (ASSERT_GT): New macro.
12642         (ASSERT_GT_AT): New macro.
12643         (ASSERT_LT): New macro.
12644         (ASSERT_LT_AT): New macro.
12646 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
12648         PR rtl-optimization/84780
12649         * combine.c (distribute_links): Don't make a link based on pc_rtx.
12651 2018-03-14  Martin Liska  <mliska@suse.cz>
12653         * tree.c (record_node_allocation_statistics): Use
12654         get_stats_node_kind.
12655         (get_stats_node_kind): New function extracted from
12656         record_node_allocation_statistics.
12657         (free_node): Use get_stats_node_kind.
12659 2018-03-14  Richard Biener  <rguenther@suse.de>
12661         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12662         that the value-set of ANTIC_IN doesn't grow.
12664         Revert
12665         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12666         member.
12667         (BB_VISITED_WITH_VISITED_SUCCS): New define.
12668         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12670 2018-03-14  Julia Koval  <julia.koval@intel.com>
12672         * config.gcc (icelake-client, icelake-server): New.
12673         (icelake): Remove.
12674         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12675         (initial_ix86_arch_features): Ditto.
12676         (PTA_SKYLAKE): Add SGX.
12677         (PTA_ICELAKE): Remove.
12678         (PTA_ICELAKE_CLIENT): New.
12679         (PTA_ICELAKE_SERVER): New.
12680         (ix86_option_override_internal): Split up icelake on icelake client and
12681         icelake server.
12682         (get_builtin_code_for_version): Ditto.
12683         (fold_builtin_cpu): Ditto.
12684         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12685         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12686         * config/i386/i386.h (processor_type): Ditto.
12687         * doc/invoke.texi: Ditto.
12689 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
12691         PR sanitizer/83392
12692         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12693         INTEGER_CST offset, add it together with bitpos / 8 and
12694         sign extend based on POINTER_SIZE.
12696         PR target/84844
12697         Revert
12698         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
12700         PR target/78090
12701         * config/i386/constraints.md (Yc): New register constraint.
12702         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12703         Use Yc constraint for alternative 2 of operand 0.  Remove
12704         preferred_for_speed attribute.
12706 2018-03-14  Richard Biener  <rguenther@suse.de>
12708         PR tree-optimization/84830
12709         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12710         with the old one to avoid oscillations.
12712 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
12714         PR target/83712
12715         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12716         pseudos.
12717         (assign_by_spills): Return a flag of reload assignment failure.
12718         Do not process the reload assignment failures.  Do not spill other
12719         reload pseudos if they has the same reg class.  Update n if
12720         necessary.
12721         (lra_assign): Add a return arg.  Set up from the result of
12722         assign_by_spills call.
12723         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12724         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12725         usage_insns if it is not NULL.
12726         (spill_hard_reg_in_range): New function.
12727         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12728         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12729         function prototypes.
12730         (lra_assign): Change prototype.
12731         * lra.c (lra): Add code to deal with fails by splitting hard reg
12732         live ranges.
12734 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
12736         * config/riscv/riscv.opt (mrelax): New option.
12737         * config/riscv/riscv.c (riscv_file_start): Emit ".option
12738         "norelax" when riscv_mrelax is disabled.
12739         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12741 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12743         PR target/84743
12744         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12745         reassociation for int modes.
12747 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12749         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12750         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12751         for big-endian.
12752         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12753         * config/aarch64/aarch64-sve.md
12754         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12755         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12756         (*extend<mode><Vwide>2): Rename to...
12757         (aarch64_sve_extend<mode><Vwide>2): ...this.
12758         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12759         renaming the old pattern to...
12760         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
12761         unsigned packs.
12762         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12763         define_expand, renaming the old pattern to...
12764         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12765         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12766         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12767         account when deciding which SVE instruction the optab should use.
12768         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12770 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12772         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12773         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12774         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12775         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12776         (tlsdesc_small_<mode>): Turn a define_expand and use
12777         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
12778         (tlsdesc_small_advsimd_<mode>): ...this.
12779         (tlsdesc_small_sve_<mode>): New pattern.
12781 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
12783         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12784         (UNSPEC_UMUL_HIGHPART): New constants.
12785         (MUL_HIGHPART): New int iteraor.
12786         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12787         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12788         define_expand.
12789         (*<su>mul<mode>3_highpart): New define_insn.
12791 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12793         PR lto/84805
12794         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12795         incomplete types.
12797 2018-03-13  Martin Liska  <mliska@suse.cz>
12799         PR ipa/84658.
12800         * (sem_item_optimizer::sem_item_optimizer): Initialize new
12801         vector.
12802         (sem_item_optimizer::~sem_item_optimizer): Release it.
12803         (sem_item_optimizer::merge_classes): Register variable aliases.
12804         (sem_item_optimizer::fixup_pt_set): New function.
12805         (sem_item_optimizer::fixup_points_to_sets): Likewise.
12806         * ipa-icf.h: Declare new variables and functions.
12808 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
12810         PR middle-end/84834
12811         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12812         integer_pow2p@2 and test integer_pow2p in condition.
12813         (A < 0 ? C : 0): Similarly for @1.
12815         PR middle-end/84831
12816         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12817         characters starting at p contain '\0' character, don't look beyond
12818         that.
12820         PR target/84827
12821         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12822         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12824         PR target/84828
12825         * reg-stack.c (change_stack): Change update_end var from int to
12826         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12827         also call set_block_for_insn on the newly added insns and rescan.
12829         PR target/84786
12830         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12831         on the last operand.
12833         PR c++/84704
12834         * tree.c (stabilize_reference_1): Return save_expr (e) for
12835         STATEMENT_LIST even if it doesn't have side-effects.
12837 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
12839         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12841 2018-03-12  Renlin Li  <renlin.li@arm.com>
12843         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12844         aarch64_output_scalar_simd_mov_immediate.
12846 2018-03-12  Martin Sebor  <msebor@redhat.com>
12848         PR tree-optimization/83456
12849         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12850         for perfectly overlapping calls to memcpy.
12851         (gimple_fold_builtin_memory_chk): Same.
12852         (gimple_fold_builtin_strcpy): Handle no-warning.
12853         (gimple_fold_builtin_stxcpy_chk): Same.
12854         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12856 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12858         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12859         parameter.  Use it for SFmode.
12860         (rs6000_function_arg_advance_1): Adjust.
12861         (rs6000_function_arg): Adjust.
12862         (rs6000_gimplify_va_arg): Pass false for that new parameter.
12864 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
12866         PR rtl-optimization/84169
12867         PR rtl-optimization/84780
12868         * combine.c (can_combine_p): Check for a 2-insn combination whether
12869         the destination register is used between the two insns, too.
12871 2018-03-12  Richard Biener  <rguenther@suse.de>
12873         PR tree-optimization/84803
12874         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12875         for refs DR analysis didn't process.
12877 2018-03-12  Richard Biener  <rguenther@suse.de>
12879         PR tree-optimization/84777
12880         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12881         force-vectorize loops ignore whether we are optimizing for size.
12883 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12885         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12886         (TARGET_MD_ASM_ADJUST): Define.
12888 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
12889             Kito Cheng  <kito.cheng@gmail.com>
12890             Chung-Ju Wu  <jasonwucj@gmail.com>
12892         * config/nds32/nds32.c (nds32_compute_stack_frame,
12893         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12894         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12895         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12896         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12897         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12898         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12899         * config/nds32/nds32.md (prologue, epilogue): Use macro
12900         NDS32_V3PUSH_AVAILABLE_P to do checking.
12902 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
12904         PR debug/58150
12905         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12906         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12907         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
12908         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
12909         addition of most attributes on !orig_type_die or the attribute not
12910         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12912 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12913             Chung-Ju Wu  <jasonwucj@gmail.com>
12915         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12916         __NDS32_VH__ macro.
12917         * config/nds32/nds32.opt (mvh): New option.
12919 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12920             Chung-Ju Wu  <jasonwucj@gmail.com>
12922         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12923         function.
12924         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12925         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12926         definition.
12928 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
12929             Chung-Ju Wu  <jasonwucj@gmail.com>
12931         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12932         function.
12933         * config/nds32/nds32-multiple.md (strlensi): New pattern.
12934         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12936 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
12937             Kito Cheng  <kito.cheng@gmail.com>
12938             Chung-Ju Wu  <jasonwucj@gmail.com>
12940         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12941         UNSPEC_FFMISM and UNSPEC_FLMISM.
12942         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12943         for ffb, ffmism and flmism.
12944         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12945         (unspec_ffmism): Ditto.
12946         (unspec_flmism): Ditto.
12947         (nds32_expand_builtin_impl): Check if string extension is available.
12948         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12949         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12951 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
12953         Reverting patch:
12954         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
12956         PR target/83712
12957         * lra-assigns.c (assign_by_spills): Return a flag of reload
12958         assignment failure.  Do not process the reload assignment
12959         failures.  Do not spill other reload pseudos if they has the same
12960         reg class.
12961         (lra_assign): Add a return arg.  Set up from the result of
12962         assign_by_spills call.
12963         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12964         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
12965         usage_insns if it is not NULL.
12966         (spill_hard_reg_in_range): New function.
12967         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12968         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12969         function prototypes.
12970         (lra_assign): Change prototype.
12971         * lra.c (lra): Add code to deal with fails by splitting hard reg
12972         live ranges.
12974 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
12976         PR target/84807
12977         * config/i386/i386.opt: Replace Enforcment with Enforcement.
12979 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
12981         PR debug/84620
12982         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12983         (dw_val_node): Add val_symbolic_view.
12984         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12985         (symview_upper_bound): New.
12986         (new_line_info_table): Initialize symviews_since_reset.
12987         (dwarf2out_source_line): Count symviews_since_reset and set
12988         symview_upper_bound.
12989         (dw_val_equal_p): Handle symview.
12990         (add_AT_symview): New.
12991         (print_dw_val): Handle symview.
12992         (attr_checksum, attr_checksum_ordered): Likewise.
12993         (same_dw_val_p, size_of_die): Likewise.
12994         (value_format, output_die): Likewise.
12995         (add_high_low_attributes): Use add_AT_symview for entry_view.
12996         (dwarf2out_finish): Reset symview_upper_bound, clear
12997         zero_view_p.
12999 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
13001         PR target/83969
13002         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13003         Add strict argument and use it.
13004         (rs6000_split_multireg_move): Update for new strict argument.
13005         (mem_operand_gpr): Disallow all non-offsettable addresses.
13006         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13008 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
13010         PR target/84772
13011         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13012         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13013         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13015         PR c++/84767
13016         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13017         decl, use remap_type if we want to use the type.
13019 2018-03-09  Martin Sebor  <msebor@redhat.com>
13021         PR tree-optimization/84526
13022         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13023         Remove dead code.
13024         (builtin_access::generic_overlap): Be prepared to handle non-array
13025         base objects.
13027 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
13029         PR rtl-optimization/84682
13030         * lra-constraints.c (process_address_1): Check is_address flag
13031         for address constraints.
13032         (process_alt_operands): Likewise.
13033         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13034         preprocess_constraints.
13035         * recog.h (preprocess_constraints): Add oploc parameter.
13036         Adjust callers.
13037         * recog.c (preprocess_constraints): Test address_operand for
13038         CT_ADDRESS constraints.
13040 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
13042         PR target/83712
13043         * lra-assigns.c (assign_by_spills): Return a flag of reload
13044         assignment failure.  Do not process the reload assignment
13045         failures.  Do not spill other reload pseudos if they has the same
13046         reg class.
13047         (lra_assign): Add a return arg.  Set up from the result of
13048         assign_by_spills call.
13049         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13050         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
13051         usage_insns if it is not NULL.
13052         (spill_hard_reg_in_range): New function.
13053         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13054         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13055         function prototypes.
13056         (lra_assign): Change prototype.
13057         * lra.c (lra): Add code to deal with fails by splitting hard reg
13058         live ranges.
13060 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13062         PR target/83193
13063         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13064         Accept complain bool parameter.  Only emit errors if it is true.
13065         (arm_parse_cpu_option_name): Likewise.
13066         (arm_target_thumb_only): Adjust callers of the above.
13067         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13068         prototype to take a default true bool parameter.
13069         (arm_parse_arch_option_name): Likewise.
13071 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
13072             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
13074         PR jit/64089
13075         PR jit/84288
13076         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13077         * configure: Regenerate.
13078         * configure.ac ("linker --version-script option"): New.
13079         ("linker soname option"): New.
13081 2018-03-09  Richard Biener  <rguenther@suse.de>
13083         PR tree-optimization/84775
13084         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13085         immediate uses of predicate stmts and mark them modified.
13087         Revert
13088         PR tree-optimization/84178
13089         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13090         to caller.
13091         (version_loop_for_if_conversion): Delay update_ssa call.
13092         (tree_if_conversion): Delay update_ssa until after predicate
13093         insertion.
13095 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
13097         PR target/84763
13098         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13099         when the function accesses prior frames.
13101 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13103         PR debug/84456
13104         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13105         gen_llsym, otherwise call maybe_gen_llsym.
13107         PR inline-asm/84742
13108         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13109         has ',' character inside of it.
13111 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13113         PR target/84748
13114         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13115         as clobbering CC_REGNUM.
13117 2018-03-08  Richard Biener  <rguenther@suse.de>
13119         PR middle-end/84552
13120         * tree-scalar-evolution.c: Include tree-into-ssa.h.
13121         (follow_copies_to_constant): Do not follow SSA names registered
13122         for update.
13124 2018-03-08  Richard Biener  <rguenther@suse.de>
13126         PR tree-optimization/84178
13127         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13128         to caller.
13129         (version_loop_for_if_conversion): Delay update_ssa call.
13130         (tree_if_conversion): Delay update_ssa until after predicate
13131         insertion.
13133 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
13135         PR tree-optimization/84178
13136         * tree-if-conv.c (release_bb_predicate): Remove the
13137         the assertion that the stmts have NULL use_ops.
13138         Discard the statements, asserting that they haven't
13139         yet been added to a BB.
13141 2018-03-08  Richard Biener  <rguenther@suse.de>
13143         PR tree-optimization/84746
13144         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13145         (phi_translate): Pass in destination ANTIC_OUT set.
13146         (phi_translate_1): Likewise.  For a simplified result lookup
13147         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13148         (phi_translate_set): Adjust.
13149         (do_pre_regular_insertion): Likewise.
13150         (do_pre_partial_partial_insertion): Likewise.
13152 2018-03-08  Martin Liska  <mliska@suse.cz>
13154         PR gcov-profile/84735
13155         * doc/gcov.texi: Document usage of profile files.
13156         * gcov-io.h: Document changes in the format.
13158 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
13160         PR debug/84404
13161         PR debug/84408
13162         * dwarf2out.c (struct dw_line_info_table): Update comments for
13163         view == -1.
13164         (FORCE_RESET_NEXT_VIEW): New.
13165         (FORCE_RESETTING_VIEW_P): New.
13166         (RESETTING_VIEW_P): Check for -1 too.
13167         (ZERO_VIEW_P): Likewise.
13168         (new_line_info_table): Force-reset next view.
13169         (dwarf2out_begin_function): Likewise.
13170         (dwarf2out_source_line): Simplify zero_view_p initialization.
13171         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13172         view directly.  Omit view when omitting .loc at line 0.
13174 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
13176         PR tree-optimization/84740
13177         * tree-switch-conversion.c (process_switch): Call build_constructors
13178         only if info.phi_count is non-zero.
13180         PR tree-optimization/84739
13181         * tree-tailcall.c (find_tail_calls): Check call arguments against
13182         DECL_ARGUMENTS (current_function_decl) rather than
13183         DECL_ARGUMENTS (func) when checking for tail recursion.
13185 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13187         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13188         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13189         Volker Reichelt's entry and add entries for people that perform
13190         GCC fuzzy testing and report numerous bugs.
13192 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
13194         PR target/82411
13195         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13196         readonly data in sdata, if that is disabled.
13197         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13198         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13199         -mreadonly-in-sdata option.
13201 2018-03-07  Martin Sebor  <msebor@redhat.com>
13203         PR tree-optimization/84468
13204         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13205         basic block when looking for nul assignment.
13207 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
13209         PR target/84277
13210         * except.h (output_function_exception_table): Adjust prototype.
13211         * except.c (output_function_exception_table): Remove FNNAME parameter
13212         and add SECTION parameter.  Ouput one part of the table at a time.
13213         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13214         the first part of the exception table and emit unwind directives.
13215         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13216         (i386_pe_seh_cold_init): Likewise.
13217         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13218         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13219         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13220         (ix86_output_call_insn): Emit a nop in one more case for SEH.
13221         * config/i386/winnt.c: Include except.h.
13222         (struct seh_frame_state): Add reg_offset, after_prologue and
13223         in_cold_section fields.
13224         (i386_pe_seh_end_prologue): Set seh->after_prologue.
13225         (i386_pe_seh_cold_init): New function.
13226         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13227         to seh->in_cold_section.
13228         (seh_emit_push): Record the offset of the push.
13229         (seh_emit_save): Record the offet of the save.
13230         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13231         Test seh->after_prologue to disregard the epilogue.
13232         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13233         (i386_pe_end_cold_function): New function.
13235 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
13237         PR fortran/84565
13238         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13239         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13241         PR c++/84704
13242         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13243         on tmp_var.
13244         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13245         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13247         PR middle-end/84723
13248         * multiple_target.c: Include tree-inline.h and intl.h.
13249         (expand_target_clones): Diagnose and fail if node->definition and
13250         !tree_versionable_function_p (node->decl).
13252 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
13254         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13255         sprint_ul.
13256         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13257         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13258         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13260 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13262         PR target/84710
13263         * combine.c (try_combine): Use reg_or_subregno instead of handling
13264         just paradoxical SUBREGs and REGs.
13266 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
13268         * config/arc/arc.c (arc_finalize_pic): Remove function.
13269         (arc_must_save_register): We use single base PIC register, remove
13270         checks to save/restore the PIC register.
13271         (arc_expand_prologue): Likewise.
13272         * config/arc/arc-protos.h (arc_set_default_type_attributes):
13273         Remove.
13274         (arc_verify_short): Likewise.
13275         (arc_attr_type): Likewise.
13276         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13277         (walk_stores): Likewise.
13278         (arc_address_cost): Make it static.
13279         (arc_verify_short): Likewise.
13280         (branch_dest): Likewise.
13281         (arc_attr_type): Likewise.
13282         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13283         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13284         (arc_final_prescan_insn): Remove inserting the nops due to
13285         hardware hazards.  It is done in reorg step.
13286         (insn_length_variant_t): Remove.
13287         (insn_length_parameters_t): Likewise.
13288         (arc_insn_length_parameters): Likewise.
13289         (arc_get_insn_variants): Likewise.
13290         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13292 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
13294         PR inline-asm/84683
13295         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13296         assertion failure.
13298         PR tree-optimization/84687
13299         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13300         on new_node->decl.
13301         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13303 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13305         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13306         Rename to ppc_speculation_barrier.
13307         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13308         __builtin_ppc_speculation_barrier.
13310 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13312         PR target/84700
13313         * combine.c (combine_simplify_rtx): Don't try to simplify if
13314         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13315         are equal to x.
13317 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
13319         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13320         to 32 bytes when compiling for POWER9.
13322 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
13324         PR target/84564
13325         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13326         regparm >= 3 with no arg reg available also for calls with
13327         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
13329         PR target/84524
13330         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13331         orig,vex.
13332         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
13334 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
13336         PR target/84264
13337         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13339 2018-03-05  Richard Biener  <rguenther@suse.de>
13341         PR tree-optimization/84486
13342         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13343         When inserting a __builtin_assume_aligned call set the LHS
13344         SSA name alignment info accordingly.
13346 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
13348         PR tree-optimization/84114
13349         * config/aarch64/aarch64.c (aarch64_reassociation_width)
13350         Avoid reassociation of FLOAT_MODE addition.
13352 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
13354         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13355         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13356         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13357         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13358         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13359         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13360         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13361         and -mwbnoinvd.
13362         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13363         __builtin_ia32_wbinvd): New builtins.
13364         (SPECIAL_ARGS2): New.
13365         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13366         (SPECIAL_ARGS2): New.
13367         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13368         (ix86_valid_target_attribute_inner_p): Ditto.
13369         (ix86_init_mmx_sse_builtins): Add special_args2.
13370         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13371         TARGET_WBNOINVD_P): New.
13372         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13373         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13374         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13375         * config/i386/immintrin.h (_wbinvd): New intrinsic.
13376         * config/i386/pconfigintrin.h: New file.
13377         * config/i386/wbnoinvdintrin.h: Ditto.
13378         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13379         wbnoinvdintrin.h.
13380         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13382 2018-03-05  Richard Biener  <rguenther@suse.de>
13384         PR tree-optimization/84670
13385         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13386         member.
13387         (BB_VISITED_WITH_VISITED_SUCCS): New define.
13388         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13389         (compute_antic_aux): Only assert the number of values in ANTIC_IN
13390         doesn't grow if all successors (recursively) were visited at least
13391         once.
13393 2018-03-05  Richard Biener  <rguenther@suse.de>
13395         PR tree-optimization/84650
13396         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13397         if executed in the loop pipeline.
13399 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
13401         * doc/configfiles.texi (Configuration Files): Move info about
13402         conditionalizing $target-protos.h to...
13403         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
13404         differs from $target-protos.h.
13406 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
13407             Chung-Ju Wu  <jasonwucj@gmail.com>
13409         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13410         * config/nds32/nds32-multiple.md (setmemsi): Define.
13411         * config/nds32/nds32-memory-manipulation.c
13412         (nds32_gen_dup_4_byte_to_word_value): New.
13413         (emit_setmem_word_loop): New.
13414         (emit_setmem_byte_loop): New.
13415         (nds32_expand_setmem_loop): New.
13416         (nds32_expand_setmem_loop_v3m): New.
13417         (nds32_expand_setmem_unroll): New.
13418         (nds32_expand_setmem): New.
13420 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13421             Chung-Ju Wu  <jasonwucj@gmail.com>
13423         * config/nds32/nds32-memory-manipulation.c
13424         (nds32_emit_load_store): New.
13425         (nds32_emit_post_inc_load_store): New.
13426         (nds32_emit_mem_move): New.
13427         (nds32_emit_mem_move_block): New.
13428         (nds32_expand_movmemsi_loop_unknown_size): New.
13429         (nds32_expand_movmemsi_loop_known_size): New.
13430         (nds32_expand_movmemsi_loop): New.
13431         (nds32_expand_movmemsi_unroll): New.
13432         (nds32_expand_movmemqi): Rename ...
13433         (nds32_expand_movmemsi): ... to this.
13434         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13435         (movmemsi): ... to this.
13436         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13437         (nds32_expand_movmemsi): ... to this.
13439 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13440             Monk Chiang  <sh.chiang04@gmail.com>
13441             Chung-Ju Wu  <jasonwucj@gmail.com>
13443         * config/nds32/nds32-protos.h
13444         (nds32_expand_load_multiple): New arguments.
13445         (nds32_expand_store_multiple): Ditto.
13446         (nds32_valid_multiple_load_store): Rename ...
13447         (nds32_valid_multiple_load_store_p): ... to this.
13448         * config/nds32/nds32-memory-manipulation.c
13449         (nds32_expand_load_multiple): Refine implementation.
13450         (nds32_expand_store_multiple): Ditto.
13451         * config/nds32/nds32-multiple.md
13452         (load_multiple): Update nds32_expand_load_multiple interface.
13453         (store_multiple): Update nds32_expand_store_multiple interface.
13454         * config/nds32/nds32-predicates.c
13455         (nds32_valid_multiple_load_store): Rename ...
13456         (nds32_valid_multiple_load_store_p): ... to this and refine
13457         implementation.
13458         * config/nds32/predicates.md
13459         (nds32_load_multiple_and_update_address_operation): New predicate.
13460         (nds32_store_multiple_and_update_address_operation): New predicate.
13462 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
13463             Chung-Ju Wu  <jasonwucj@gmail.com>
13465         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13466         (combo): New attribute.
13467         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13469 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13471         * config/nds32/nds32.opt: Change -mcmodel= default value.
13473 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
13474             Monk Chiang  <sh.chiang04@gmail.com>
13475             Chung-Ju Wu  <jasonwucj@gmail.com>
13477         * config/nds32/constants.md (unspec_element): New enum.
13478         * config/nds32/constraints.md (Umw): New constraint.
13479         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13480         * config/nds32/nds32-intrinsic.md: Likewise.
13481         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13482         (nds32_valid_smw_lwm_base_p): New.
13483         (nds32_output_smw_single_word): New.
13484         (nds32_output_lmw_single_word): New.
13485         (nds32_expand_unaligned_load): New.
13486         (nds32_expand_unaligned_store): New.
13487         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13488         (nds32_output_smw_single_word): Declare.
13489         (nds32_output_lmw_single_word): Declare.
13490         (nds32_expand_unaligned_load): Declare.
13491         (nds32_expand_unaligned_store): Declare.
13492         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13493         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13494         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13495         NDS32_BUILTIN_UASTORE_DW.
13496         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13497         predicate.
13499 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
13500             Kito Cheng  <kito.cheng@gmail.com>
13501             Chung-Ju Wu  <jasonwucj@gmail.com>
13503         * config/nds32/nds32-intrinsic.c
13504         (nds32_expand_builtin_null_ftype_reg): Delete.
13505         (nds32_expand_builtin_reg_ftype_imm): Ditto.
13506         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13507         (nds32_read_argument): New.
13508         (nds32_legitimize_target): Ditto.
13509         (nds32_legitimize_argument): Ditto.
13510         (nds32_check_constant_argument): Ditto.
13511         (nds32_expand_unop_builtin): Ditto.
13512         (nds32_expand_unopimm_builtin): Ditto.
13513         (nds32_expand_binop_builtin): Ditto.
13514         (nds32_builtin_decl_impl): Ditto.
13515         (builtin_description): Ditto.
13516         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13517         (nds32_init_builtins_impl): Ditto.
13518         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13519         (nds32_builtin_decl): New.
13520         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13521         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13523 2018-03-02  Jeff Law  <law@redhat.com>
13525         * reorg.c (stop_search_p): Handle DEBUG_INSN.
13526         (redundant_insn, fill_simple_delay_slots): Likewise.
13527         (fill_slots_from_thread): Likewise.
13528         * resource.c (mark_referenced_resources): Likewise.
13529         (mark_set_resources, find_dead_or_set_registers): Likewise.
13531 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13533         * substring-locations.h (format_warning_va): Formatting fix for
13534         ATTRIBUTE_GCC_DIAG.
13535         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13536         argument.
13537         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13538         * substring-locations.c: Include intl.h.
13539         (format_warning_va): Turned into small wrapper around
13540         format_warning_n_va, renamed to ...
13541         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13542         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13543         use ngettext.
13544         (format_warning_at_substring_n): New function.
13545         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13546         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
13547         format_warning_at_substring with just a shorter name instead of
13548         const function pointer.
13549         (fmtwarn_n): New function.
13550         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13551         appropriate, get rid of all the fmtstr temporaries, move conditionals
13552         with G_() wrapped string literals directly into fmtwarn arguments,
13553         cast dir.len to (int), formatting fixes.
13555 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
13557         * doc/invoke.texi: Remove "Cilk Plus" references.
13559 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13560             Richard Biener  <rguenther@suse.de>
13562         PR ipa/84628
13563         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13564         for error or warning attributes if CALL_FROM_THUNK_P is set.
13565         Formatting fixes.
13567 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13569         PR target/56540
13570         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13571         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13573         PR target/56540
13574         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13575         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13577         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13578         instead of -1U in last predictors element's probability member.
13580 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
13582         PR ipa/83983
13583         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13584         arguments if they are comparable.
13586 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13588         PR tree-optimization/84634
13589         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13590         masks and masked_loop_p with a single loop_masks, making sure it's
13591         null for bb vectorization.
13593 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
13595         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13596         (vect_analyze_data_ref_access): Use loop->safe_len rather than
13597         loop->force_vectorize to check whether there is no alias.
13599 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
13601         PR target/84614
13602         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13603         prototypes.
13604         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13605         comments.
13606         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13607         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13608         instead of a loop around prev_real_insn.
13609         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13610         prev_real_insn.
13612         PR inline-asm/84625
13613         * config/i386/i386.c (ix86_print_operand): Use conditional
13614         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13615         zero vector.
13617 2018-03-02  Richard Biener  <rguenther@suse.de>
13619         PR tree-optimization/84427
13620         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13621         (bitmap_set_subtract_values): Rewrite to handle multiple
13622         exprs per value.
13623         (clean): Likewise.
13624         (prune_clobbered_mems): Likewise.
13625         (phi_translate): Take edge instead of pred/phiblock.
13626         (phi_translate_1): Likewise.
13627         (phi_translate_set): Likewise.  Insert all translated
13628         exprs for a value into the set, keeping possibly multiple
13629         expressions per value.
13630         (compute_antic_aux): Adjust for phi_translate changes.
13631         When intersecting union the expressions and prune those
13632         not in the final value set, keeping possibly multiple
13633         expressions per value.  Do not use value-insertion
13634         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13635         all expressions.  Add verification that the value-sets
13636         only shrink during iteration.
13637         (compute_partial_antic_aux): Adjust for the phi_translate changes.
13638         (do_pre_regular_insertion): Likewise.
13639         (do_pre_partial_partial_insertion): Likewise.
13641 2018-03-02  Richard Biener  <rguenther@suse.de>
13643         PR target/82005
13644         * config/darwin.c (saved_debug_info_level): New static global.
13645         (darwin_asm_lto_start): Disable debug info generation for LTO out.
13646         (darwin_asm_lto_end): Restore debug info generation settings.
13648 2018-03-01  Martin Liska  <mliska@suse.cz>
13650         PR sanitizer/82484
13651         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13652         volatile arguments.
13654 2018-03-01  Richard Biener  <rguenther@suse.de>
13656         PR debug/84645
13657         * dwarf2out.c (gen_variable_die): Properly handle late VLA
13658         type annotation with LTO when debug was disabled at compile-time.
13660 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
13662         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13663         XINT with INTVAL.
13664         (mips_final_postscan_insn): Likewise.
13666 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
13668         PR rtl-optimization/84528
13669         * alias.c (init_alias_target): Add commentary.
13670         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13671         a unique base value if the frame pointer is not eliminated
13672         to the stack pointer.
13674 2018-03-01  Tom de Vries  <tom@codesourcery.com>
13676         PR rtl-optimization/83327
13677         * lra-int.h (hard_regs_spilled_into): Declare.
13678         * lra.c (hard_regs_spilled_into): Define.
13679         (init_reg_info): Init hard_regs_spilled_into.
13680         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13681         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13682         (process_bb_lives): Handle hard_regs_spilled_into.
13683         (lra_create_live_ranges_1): Before doing liveness propagation, clear
13684         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13686 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
13688         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13689         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13690         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13691         * config/rs6000/aix72.h: New file.
13693 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
13695         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13696         instead of warning_at with conditional singular and plural messages
13697         where possible.
13699         PR target/52991
13700         * stor-layout.c (update_alignment_for_field): For
13701         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13702         && !DECL_PACKED (field), do the alignment update, just use
13703         only desired_align instead of MAX (type_align, desired_align)
13704         as the alignment.
13705         (place_field): Don't do known_align < desired_align handling
13706         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13707         is non-NULL, instead do it after rli->prev_field handling and
13708         only if not within a bitfield word.  For DECL_PACKED (field)
13709         use type_align of BITS_PER_UNIT.
13711 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
13713         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13714         superfluous parentheses and trailing spaces.
13716 2018-02-28  Richard Biener  <rguenther@suse.de>
13718         PR tree-optimization/84584
13719         * graphite-scop-detection.c (scop_detection::add_scop): Discard
13720         SCoPs with fake exit edge.
13722 2018-02-28  Martin Liska  <mliska@suse.cz>
13724         PR testsuite/84597
13725         * timevar.c (timer::print): Fix format to properly print 100%
13726         values.
13728 2018-02-28  Richard Biener  <rguenther@suse.de>
13730         PR middle-end/84607
13731         * genmatch.c (capture_info::walk_match): Do not mark
13732         captured expressions without operands as expr_p given
13733         they act more like predicates and should be subject to
13734         "lost tail" side-effect preserving.
13736 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
13738         PR rtl-optimization/81611
13739         * auto-inc-dec.c (attempt_change): Move dead note from
13740         mem_insn if it's the next use of regno
13741         (find_address): Take address use of reg holding
13742         non-incremented value.  Add parm to limit search to the named
13743         reg only.
13744         (merge_in_block): Attempt to use a mem insn that is the next
13745         use of the original regno.
13747 2018-02-27  Martin Sebor  <msebor@redhat.com>
13749         PR c++/83871
13750         * doc/invoke.texi (-Wmissing-attributes): New option.
13751         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13753 2018-02-27  Martin Sebor  <msebor@redhat.com>
13755         PR translation/84207
13756         * diagnostic-core.h (warning_n, error_n, inform_n): Change
13757         n argument to unsigned HOST_WIDE_INT.
13758         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13759         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
13760         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13761         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13763 2018-02-27  Richard Biener  <rguenther@suse.de>
13765         PR tree-optimization/84512
13766         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13767         Do not use the estimate returned from record_stmt_cost for
13768         the scalar iteration cost but sum properly using add_stmt_cost.
13770 2018-02-27  Richard Biener  <rguenther@suse.de>
13772         PR tree-optimization/84466
13773         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13774         Adjust last change to less strictly validate use operands.
13776 2018-02-27  Martin Liska  <mliska@suse.cz>
13778         PR gcov-profile/84548
13779         * gcov.c (process_file): Allow partial overlap and consider it
13780         also as group functions.
13781         (output_lines): Properly calculate range of lines for a group.
13783 2018-02-27  Martin Liska  <mliska@suse.cz>
13785         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13786         'ggc' suffixes.  Change first column width.
13787         (timer::print): Fix formatting of the column.
13789 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
13791         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13792         preserve inline entry blocks for the sake of debug inline
13793         entry point markers alone.
13794         (remove_unused_locals): Suggest in comments a better place to
13795         force the preservation of inline entry blocks that are
13796         otherwise unused, but do not preserve them.
13798 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13800         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13802 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13804         PR target/84039
13805         * config/i386/constraints.md (Bs): Replace
13806         ix86_indirect_branch_register with
13807         TARGET_INDIRECT_BRANCH_REGISTER.
13808         (Bw): Likewise.
13809         * config/i386/i386.md (indirect_jump): Likewise.
13810         (tablejump): Likewise.
13811         (*sibcall_memory): Likewise.
13812         (*sibcall_value_memory): Likewise.
13813         Peepholes of indirect call and jump via memory: Likewise.
13814         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13815         (*sibcall_value_GOT_32): Likewise.
13816         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13817         (GOT_memory_operand): Likewise.
13818         (call_insn_operand): Likewise.
13819         (sibcall_insn_operand): Likewise.
13820         (GOT32_symbol_operand): Likewise.
13821         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13823 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13825         PR rtl-optimization/83496
13826         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13827         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
13828         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13829         redundant insn, if any.
13830         (relax_delay_slots): Likewise.
13831         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13833 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
13835         PR tree-optimization/83965
13836         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13837         that grouped statements are part of a reduction chain.  Return
13838         true if the statement is not marked as a reduction itself but
13839         is part of a group.
13840         (vect_recog_dot_prod_pattern): Don't check whether the statement
13841         is part of a group here.
13842         (vect_recog_sad_pattern): Likewise.
13843         (vect_recog_widen_sum_pattern): Likewise.
13845 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
13847         PR debug/84545
13848         * final.c (rest_of_clean_state): Also look for calls inside sequences.
13850 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
13852         PR target/84530
13853         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13854         the bool argument.
13855         (ix86_output_indirect_function_return): New prototype.
13856         (ix86_split_simple_return_pop_internal): Likewise.
13857         * config/i386/i386.c (indirect_return_via_cx): New.
13858         (indirect_return_via_cx_bnd): Likewise.
13859         (indirect_thunk_name): Handle return va CX_REG.
13860         (output_indirect_thunk_function): Create alias for
13861         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13862         (ix86_output_indirect_jmp): Remove the bool argument.
13863         (ix86_output_indirect_function_return): New function.
13864         (ix86_split_simple_return_pop_internal): Likewise.
13865         * config/i386/i386.md (*indirect_jump): Don't pass false
13866         to ix86_output_indirect_jmp.
13867         (*tablejump_1): Likewise.
13868         (simple_return_pop_internal): Change it to define_insn_and_split.
13869         Call ix86_split_simple_return_pop_internal to split it for
13870         -mfunction-return=.
13871         (simple_return_indirect_internal): Call
13872         ix86_output_indirect_function_return instead of
13873         ix86_output_indirect_jmp.
13875 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
13877         PR bootstrap/84405
13878         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13879         memset and value initialization afterwards.
13881 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
13883         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13885 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13887         PR target/84521
13888         * common/config/aarch64/aarch64-common.c
13889         (aarch_option_optimization_table[]): Switch
13890         off fomit-frame-pointer
13892 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13893             Chung-Ju Wu  <jasonwucj@gmail.com>
13895         * config/nds32/nds32-multiple.md (load_multiple): Disallow
13896         volatile memory.
13897         (store_multiple): Ditto.
13899 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
13901         * config.gcc: Add --with-cpu support for nds32 target.
13902         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13903         * config/nds32/nds32.opt: Add -mcpu= option.
13905 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
13907         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13908         isel=yes): Warn for these deprecated options.
13910 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
13912         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13913         ISA_2_5_MASKS_EMBEDDED.
13915 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
13917         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13918         p->max as pointers rather than using iterative_hash_expr.
13920 2018-02-23  Carl Love  <cel@us.ibm.com>
13922         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13923         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13924         BU_P8V_OVERLOAD_2.
13925         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13926         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13927         P8V_BUILTIN_VEC_VUNSIGNED2.
13929 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
13931         PR target/81572
13932         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13933         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13934         LRA_UNKNOWN_ALT.
13935         * lra-constraints.c (curr_insn_transform): Set up
13936         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
13937         LRA_UNKNOWN_ALT.
13938         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13939         * lra-eliminations.c (spill_pseudos): Ditto.
13940         (process_insn_for_elimination): Ditto.
13941         * lra-lives.c (reg_early_clobber_p): Use the new macros.
13942         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13943         LRA_NON_CLOBBERED_ALT.
13945 2018-02-22  Martin Sebor  <msebor@redhat.com>
13947         PR tree-optimization/84480
13948         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13949         to maybe_diag_stxncpy_trunc.  Call it.
13950         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13951         from gimple_fold_builtin_strcpy.  Print inlining stack.
13952         (handle_builtin_stxncpy): Print inlining stack.
13953         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13955 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
13957         PR target/84176
13958         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13959         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13960         and -fcheck-pointer-bounds are used together.
13961         (indirect_thunk_prefix): New enum.
13962         (indirect_thunk_need_prefix): New function.
13963         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
13964         "_nt" instead of "_bnd" for NOTRACK prefix.
13965         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13966         (output_indirect_thunk_function): Likewise.
13967         (): Likewise.
13968         (ix86_code_end): Update output_indirect_thunk_function calls.
13969         (ix86_output_indirect_branch_via_reg): Replace
13970         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13971         (ix86_output_indirect_branch_via_push): Likewise.
13972         (ix86_output_function_return): Likewise.
13973         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13974         incompatible with -fcf-protection=branch and
13975         -fcheck-pointer-bounds.
13977 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13979         PR target/83335
13980         * config/aarch64/aarch64.c (aarch64_print_address_internal):
13981         Change gcc_assert call to output_operand_lossage.
13983 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
13985         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13987 2018-02-22  DJ Delorie  <dj@redhat.com>
13988             Sebastian Perta  <sebastian.perta@renesas.com>
13989             Oleg Endo  <olegendo@gcc.gnu.org>
13991         * config/rx/rx.c (rx_rtx_costs): New function.
13992         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13994 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13996         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13998 2018-02-22  Martin Liska  <mliska@suse.cz>
14000         PR driver/83193
14001         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14002         Add "native" as a possible value.
14004 2018-02-22  Martin Liska  <mliska@suse.cz>
14006         PR driver/83193
14007         * config/i386/i386.c (ix86_option_override_internal):
14008         Add "native" as a possible value for -march and -mtune.
14010 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
14012         PR target/84502
14013         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14014         to all type variants.
14016         PR tree-optimization/84503
14017         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14018         width as info->bitpos + info->bitsize - start.
14019         (merged_store_group::merge_overlapping): Simplify width computation.
14020         (check_no_overlap): New function.
14021         (imm_store_chain_info::try_coalesce_bswap): Compute expected
14022         start + width and last_order of the group, fail if check_no_overlap
14023         fails.
14024         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14025         to group if check_no_overlap fails.
14027 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14029         * config/rs6000/altivec.md: Delete contraint arguments to
14030         define_expand, define_split, and define_peephole2, and in
14031         define_insn_and_split if always unused.
14032         * config/rs6000/darwin.md: Ditto.
14033         * config/rs6000/dfp.md: Ditto.
14034         * config/rs6000/rs6000.md: Ditto.
14035         * config/rs6000/sync.md: Ditto.
14036         * config/rs6000/vector.md: Ditto.
14037         * config/rs6000/vsx.md: Ditto.
14039 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
14041         * config/rs6000/altivec.md: Write output control strings as braced
14042         blocks instead of double-quoted strings.
14043         * config/rs6000/darwin.md: Ditto.
14044         * config/rs6000/rs6000.md: Ditto.
14045         * config/rs6000/vector.md: Ditto.
14046         * config/rs6000/vsx.md: Ditto.
14048 2018-02-21  Jason Merrill  <jason@redhat.com>
14050         PR c++/84314 - ICE with templates and fastcall attribute.
14051         * attribs.c (build_type_attribute_qual_variant): Remove assert.
14053 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14055         * ipa-cp.c (determine_versionability): Fix comment typos.
14057 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
14059         PR c/84229
14060         * ipa-cp.c (determine_versionability): Do not version functions caling
14061         va_arg_pack.
14063 2018-02-21  Martin Liska  <mliska@suse.cz>
14065         PR driver/83193
14066         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14067         Add "native" as a possible value.
14068         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
14069         the macro when native cpu detection is available.
14071 2018-02-21  Martin Liska  <mliska@suse.cz>
14073         PR driver/83193
14074         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14075         Add "native" as a possible value.
14076         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14077         when native cpu detection is available.
14079 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
14080             Martin Sebor  <msebor@redhat.com>
14082         PR tree-optimization/84478
14083         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14084         false.
14085         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14086         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14087         support which is conservatively correct, for 2 only stay conservative
14088         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
14089         argument to the 2 argument get_range_strlen, adjust 6 arg
14090         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14091         false.
14092         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14093         (gimple_fold_builtin_strlen): Pass true as last argument to
14094         get_range_strlen.
14096 2018-02-20  Martin Sebor  <msebor@redhat.com>
14098         PR middle-end/84095
14099         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14100         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
14101         (builtin_memref::builtin_memref): Factor out parts into
14102         set_base_and_offset and call it.
14104 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14106         PR middle-end/84406
14107         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14108         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14109         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
14110         search at the associated MODE_INT.
14112 2018-02-20  Jeff Law  <law@redhat.com>
14114         PR middle-end/82123
14115         PR tree-optimization/81592
14116         PR middle-end/79257
14117         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14118         for range data rather than using global data.
14119         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14120         range data rather than using global data.
14121         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14122         pass it to children as needed.
14123         (struct directive::fmtresult): Similarly.
14124         (struct directive::set_width): Similarly.
14125         (struct directive::set_precision): Similarly.
14126         (format_integer, format_directive, parse_directive): Similarly.
14127         (format_none): Accept unnamed vr_values parameter.
14128         (format_percent, format_floating, format_character): Similarly.
14129         (format_string, format_plain): Similarly.
14130         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14131         the EVRP range analyzer for range data rather than using global data.
14132         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14133         gimple-ssa-evrp-analyze.h
14134         (class sprintf_dom_walker): Add after_dom_children member function.
14135         Add evrp_range_analyzer member.
14136         (sprintf_dom_walker::before_dom_children): Call into the EVRP
14137         range analyzer as needed.
14138         (sprintf_dom_walker::after_dom_children): New member function.
14139         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14140         if not optimizing.
14141         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14142         (evrp_range_analyzer::pop_to_marker): Likewise.
14144 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
14146         PR tree-optimization/84419
14147         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14148         with the required type if its current type is compatible but
14149         different.
14151 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
14153         PR middle-end/82004
14154         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14155         after vectorization.
14157 2018-02-20  Martin Liska  <mliska@suse.cz>
14159         PR driver/83193
14160         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14161         possible values if we don't have a hint.
14163 2018-02-20  Martin Liska  <mliska@suse.cz>
14165         PR c/84310
14166         PR target/79747
14167         * final.c (shorten_branches): Build align_tab array with one
14168         more element.
14169         * opts.c (finish_options): Add alignment option limit check.
14170         (MAX_CODE_ALIGN): Likewise.
14171         (MAX_CODE_ALIGN_VALUE): Likewise.
14172         * doc/invoke.texi: Document maximum allowed option value for
14173         all -falign-* options.
14175 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
14177         PR target/84146
14178         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14179         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14180         * var-tracking.c (emit_note_insn_var_location): Remove all references
14181         to NOTE_INSN_CALL_ARG_LOCATION.
14182         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14183         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14184         Use copy_rtx_if_shared.
14185         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14186         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14187         (dwarf2out_var_location): Remove handling of
14188         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14189         on call_insn.
14190         * final.c (final_scan_insn): Remove all references to
14191         NOTE_INSN_CALL_ARG_LOCATION.
14192         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
14193         before dumping final insns.
14194         * except.c (emit_note_eh_region_end): Remove all references to
14195         NOTE_INSN_CALL_ARG_LOCATION.
14196         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14197         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14198         * config/arc/arc.c (hwloop_optimize): Likewise.
14199         * config/arm/arm.c (create_fix_barrier): Likewise.
14200         * config/s390/s390.c (s390_chunkify_start): Likewise.
14201         * config/sh/sh.c (find_barrier): Likewise.
14202         * config/i386/i386.c (rest_of_insert_endbranch,
14203         ix86_seh_fixup_eh_fallthru): Likewise.
14204         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14205         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14206         * config/frv/frv.c (frv_function_prologue): Likewise.
14207         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
14208         reg note.
14209         (note_outside_basic_block_p): Remove all references to
14210         NOTE_INSN_CALL_ARG_LOCATION.
14211         * gengtype.c (adjust_field_rtx_def): Likewise.
14212         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14213         Likewise.
14214         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14215         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14217         PR c++/84444
14218         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14219         is ADDR_EXPR.
14221         PR tree-optimization/84452
14222         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14223         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14224         is NULL.
14226 2018-02-19  Martin Liska  <mliska@suse.cz>
14228         PR sanitizer/82183
14229         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14231 2018-02-19  Martin Liska  <mliska@suse.cz>
14232             Richard Sandiford  <richard.sandiford@linaro.org>
14234         PR tree-optimization/82491
14235         * gimple-fold.c (get_base_constructor): Make earlier bail out
14236         to prevent ubsan.
14238 2018-02-19  Carl Love  <cel@us.ibm.com>
14240         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14241         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14242         BU_P8V_OVERLOAD_1.
14243         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14244         P8V_BUILTIN_VEC_NEG.
14246 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
14248         * config/rl78/rl78.md (movdf): New define expand.
14250 2018-02-19  Martin Liska  <mliska@suse.cz>
14252         PR other/80589
14253         * doc/invoke.texi: Fix typo.
14254         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14256 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
14258         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14259         handle rs6000_single_float and rs6000_double_float specially for
14260         e500 family CPUs.
14262 2018-02-16  Jeff Law  <law@redhat.com>
14264         * config/rx/rx.c (add_pop_cfi_notes): New function.;
14265         (pop_regs): Use it.
14267 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14269         PR ipa/84425
14270         * ipa-inline.c (inline_small_functions): Fix a typo.
14272 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14274         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14276 2018-02-16  Carl Love  <cel@us.ibm.com>
14278         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14279         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14280         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14281         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14282         expansion to P8V_BUILTIN_VEC_FLOAT2.
14284 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
14286         PR rtl-optimization/70023
14287         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14288         src_regno into account.
14290 2018-02-16  Carl Love  <cel@us.ibm.com>
14292         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14293         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14294         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14295         * config/rs6000/rs6000.c: Remove case statements for
14296         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14297         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14298         and P9V_BUILTIN_VEC_VINSERT4B.
14299         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14300         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14301         * config/rs6000/vsx.md:
14302         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14303         vec_insert4b.
14305 2018-02-16  Carl Love  <cel@us.ibm.com>
14307         * config/rs6000/altivec.h: Add builtin names vec_extract4b
14308         vec_insert4b.
14309         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14310         definitions.
14311         * config/rs6000/rs6000-c.c: Add the definitions for
14312         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14313         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14314         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14315         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
14316         definition for insert4b and define insn *insert3b_internal.
14317         * doc/extend.texi: Add documentation for vec_extract4b.
14319 2018-02-16  Nathan Sidwell  <nathan@acm.org>
14321         * doc/extend.texi (Backwards Compatibility): Mention friend
14322         injection.  Note for-scope is deprecated.
14323         * doc/invoke.texi (-ffriend-injection): Deprecate.
14325 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
14327         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14328         that moved to I2, also allow destinations that are a paradoxical
14329         subreg (instead of a normal reg).
14331 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
14333         PR target/83831
14334         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14335         to QImode.
14337 2018-02-16  Richard Biener  <rguenther@suse.de>
14339         PR tree-optimization/84037
14340         PR tree-optimization/84016
14341         PR target/82862
14342         * config/i386/i386.c (ix86_builtin_vectorization_cost):
14343         Adjust vec_construct for the fact we need additional higher latency
14344         128bit inserts for AVX256 and AVX512 vector builds.
14345         (ix86_add_stmt_cost): Scale vector construction cost for
14346         elementwise loads.
14348 2018-02-16  Richard Biener  <rguenther@suse.de>
14350         PR tree-optimization/84417
14351         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14352         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14353         (non_rewritable_lvalue_p): Likewise, use poly-ints.
14355 2018-02-16  Martin Liska  <mliska@suse.cz>
14357         PR sanitizer/84307
14358         * internal-fn.def (ASAN_CHECK): Set proper flags.
14359         (ASAN_MARK): Likewise.
14361 2018-02-16  Julia Koval  <julia.koval@intel.com>
14363         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14364         from PTA_CANNONLAKE.
14366 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
14368         PR target/84272
14369         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14370         Use ++iter rather than iter++ for std::list iterators.
14371         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
14372         defer deleting them until all nodes in the forest are processed.  Do
14373         free even leaf nodes.  Change to_process into auto_vec.
14375         PR bootstrap/84405
14376         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14377         * vec.h (vec_default_construct): Use memset instead of placement new
14378         if BROKEN_VALUE_INITIALIZATION is defined.
14379         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14380         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14381         is defined.
14383         PR rtl-optimization/83723
14384         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14385         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
14386         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
14387         recursive calls.
14388         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14389         callers.
14390         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14392 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
14394         PR rtl-optimization/81443
14395         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14396         from inner REGs to paradoxical SUBREGs.
14398 2018-02-16  Richard Biener  <rguenther@suse.de>
14400         PR tree-optimization/84399
14401         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14402         For operands we can analyze at their definition make sure we can
14403         analyze them at each use as well.
14405 2018-02-16  Richard Biener  <rguenther@suse.de>
14407         PR tree-optimization/84190
14408         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14409         volatile accesses if the decl isn't volatile.
14411 2018-02-15  Jason Merrill  <jason@redhat.com>
14413         PR c++/84314 - ICE with templates and fastcall attribute.
14414         * attribs.c (build_type_attribute_qual_variant): Don't clobber
14415         TYPE_CANONICAL on an existing type.
14417 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
14419         PR tree-optimization/84383
14420         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14421         dstoff nor call operand_equal_p if dstbase is NULL.
14423         PR tree-optimization/84334
14424         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14425         also a CONSTANT_CLASS_P, punt.
14427 2018-02-14  Jim Wilson  <jimw@sifive.com>
14429         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14430         first SMALL_OPERAND check.  New local min_second_step.  Move assert
14431         to where locals are set.  Add TARGET_RVC support.
14432         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14434 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
14436         * doc/invoke.texi: Correct -Wformat-overflow code sample.
14438 2018-02-14  Martin Sebor  <msebor@redhat.com>
14440         PR tree-optimization/83698
14441         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14442         arrays constrain the offset range to their bounds.
14443         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14444         (builtin_access::overlap): Avoid setting the size of overlap if it's
14445         already been set.
14446         (maybe_diag_overlap): Also consider arrays when deciding what values
14447         of offsets to include in diagnostics.
14449 2018-02-14  Martin Sebor  <msebor@redhat.com>
14451         PR c/84108
14452         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14453         that correspond to the kind of a declaration.
14455 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
14457         PR target/83984
14458         * config/pa/pa.md: Load address of PIC label using the linkage table
14459         if the label is nonlocal.
14461 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14463         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14464         warning message if user requests -maltivec=be.
14465         * doc/invoke.texi: Document deprecation of -maltivec=be.
14467 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
14469         PR target/84220
14470         * config/rs6000/rs6000-c.c: Update definitions for
14471         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14472         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14474 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
14476         PR target/84239
14477         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14478         add _get_ssp intrinsics. Remove argument from
14479         __builtin_ia32_rdssp[d|q].
14480         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14481         * config/i386/i386-builtin.def: Remove argument from
14482         __builtin_ia32_rdssp[d|q].
14483         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14484         ix86_expand_special_args_builtin for _rdssp[d|q].
14485         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14486         Clear register before usage.
14487         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14488         Add documentation for new _get_ssp and _inc_ssp intrinsics.
14490 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
14492         PR tree-optimization/84357
14493         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14494         operand 1 of an ARRAY_REF too.
14496 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
14498         PR target/83831
14499         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14500         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14501         declarations.
14502         (set_of_reg): New struct.
14503         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14504         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14505         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14506         functions.
14507         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14508         Split into bitclr, bitset, bitinvert patterns if appropriate.
14509         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14510         use rx_fuse_in_memory_bitop.
14511         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14512         to named insn, correct maximum insn length.
14514 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
14516         PR target/79242
14517         * machmode.def: Define a complex mode for PARTIAL_INT.
14518         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14519         MODE_PARTIAL_INT.
14520         * doc/rtl.texi: Document CSPImode.
14521         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14522         handling.
14523         (msp430_hard_regno_nregs_with_padding): Likewise.
14525 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
14527         PR target/84279
14528         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14530 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
14532         PR rtl-optimization/84169
14533         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
14534         we generated a parallel as new i3 and we split that to new i2 and i3
14535         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
14536         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
14537         those to i2, not i1.  Partially rewrite this scan code.
14539 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14541         PR c/82210
14542         * stor-layout.c (place_field): For variable length fields, adjust
14543         offset_align afterwards not just based on the field's alignment,
14544         but also on the size.
14546         PR middle-end/84309
14547         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14548         of exps and logs in the use_exp2 case.
14550 2018-02-13  Jeff Law  <law@redhat.com>
14552         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14553         entry for "vector".
14555         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14556         ARGS as unused.
14558 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
14560         PR debug/84342
14561         PR debug/84319
14562         * common.opt (gas-loc-support, gas-locview-support): New.
14563         (ginline-points, ginternal-reset-location-views): New.
14564         * doc/invoke.texi: Document them.  Use @itemx where intended.
14565         (gvariable-location-views): Adjust.
14566         * target.def (reset_location_view): New.
14567         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14568         (TARGET_RESET_LOCATION_VIEW): New.
14569         * doc/tm.texi: Rebuilt.
14570         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14571         (dwarf2out_default_as_locview_support): New.
14572         (output_asm_line_debug_info): Use option variables.
14573         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14574         (output_loc_list): Likewise.
14575         (add_high_low_attributes): Check option variables.
14576         Don't output entry view attribute in strict mode.
14577         (gen_inlined_subroutine_die): Check option variables.
14578         (dwarf2out_inline_entry): Likewise.
14579         (init_sections_and_labels): Likewise.
14580         (dwarf2out_early_finish): Likewise.
14581         (maybe_reset_location_view): New, from...
14582         (dwarf2out_var_location): ... here.  Call it.
14583         * debug.h (dwarf2out_default_as_loc_support): Declare.
14584         (dwarf2out_default_as_locview_support): Declare.
14585         * hooks.c (hook_int_rtx_insn_0): New.
14586         * hooks.h (hook_int_rtx_insn_0): Declare.
14587         * toplev.c (process_options): Take -gas-loc-support and
14588         -gas-locview-support from dwarf2out.  Enable
14589         -gvariable-location-views by default only with locview
14590         assembler support.  Enable -ginternal-reset-location-views by
14591         default only if the target defines the corresponding hook.
14592         Enable -ginline-points by default if location views are
14593         enabled; force it disabled if statement frontiers are
14594         disabled.
14595         * tree-inline.c (expand_call_inline): Check option variables.
14596         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14598 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
14600         PR tree-optimization/84321
14601         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14602         handling.  Also check whether the anti-range contains any values
14603         that satisfy the mask; switch to a VR_RANGE if not.
14605 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
14607         PR sanitizer/84340
14608         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14610 2018-02-13  Martin Jambor  <mjambor@suse.cz>
14612         PR c++/83990
14613         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14614         of call statements, also set location of a load to a temporary.
14616 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
14618         * config/rl78/rl78.c (add_vector_labels): New function.
14619         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14620         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14621         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14622         which checks that no arguments are passed.
14623         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14624         * doc/extend.texi: Documentation for the new attribute.
14626 2018-02-13  Andreas Schwab  <schwab@suse.de>
14628         * config/riscv/linux.h (CPP_SPEC): Define.
14630 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
14632         PR target/84335
14633         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14634         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14635         OPTION_MASK_ISA_AES as first argument to def_builtin_const
14636         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14637         instead of OPTION_MASK_ISA_PCLMUL as first argument to
14638         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14639         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14640         temporarily for AES and PCLMUL builtins.
14642         PR tree-optimization/84339
14643         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14644         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14645         Formatting fixes.
14647         PR middle-end/84309
14648         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14649         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14650         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14651         inline function.
14652         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14653         inline function.
14654         * omp-simd-clone.h: New file.
14655         * omp-simd-clone.c: Include omp-simd-clone.h.
14656         (expand_simd_clones): No longer static.
14657         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14658         cgraph.h and omp-simd-clone.h.
14659         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14660         (vect_recog_widen_shift_pattern): Formatting fix.
14661         (vect_pattern_recog_1): Don't check optab for calls.
14663         PR target/84336
14664         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14665         operands[2] into a REG before using gen_lowpart on it.
14667 2018-02-12  Jeff Law  <law@redhat.com>
14669         PR target/83760
14670         * config/sh/sh.c (find_barrier): Consider a sibling call
14671         a barrier as well.
14673         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14674         successfully back substituting a reg.
14676 2018-02-12  Richard Biener  <rguenther@suse.de>
14678         PR tree-optimization/84037
14679         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14680         parameter, move visited init to caller.
14681         (vect_slp_analyze_operations): Separate cost from validity
14682         check, initialize visited once for all instances.
14683         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14684         for all instances.
14685         * tree-vect-stmts.c (vect_model_simple_cost): Make early
14686         out an assert.
14687         (vect_model_promotion_demotion_cost): Likewise.
14688         (vectorizable_bswap): Guard cost modeling with !slp_node
14689         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14690         SLP stmts.
14691         (vectorizable_call): Likewise.
14692         (vectorizable_conversion): Likewise.
14693         (vectorizable_assignment): Likewise.
14694         (vectorizable_shift): Likewise.
14695         (vectorizable_operation): Likewise.
14696         (vectorizable_store): Likewise.
14697         (vectorizable_load): Likewise.
14698         (vectorizable_condition): Likewise.
14699         (vectorizable_comparison): Likewise.
14701 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
14703         PR sanitizer/84307
14704         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14705         (ASAN_MARK): Fix fnspec to account for return value, change pointer
14706         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14708 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
14710         PR middle-end/83665
14711         * params.def (inline-min-speedup): Increase from 8 to 15.
14712         (max-inline-insns-auto): Decrease from 40 to 30.
14713         * ipa-split.c (consider_split): Add some buffer for function to
14714         be considered inlining candidate.
14715         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14716         default values.
14718 2018-02-12  Richard Biener  <rguenther@suse.de>
14720         PR tree-optimization/84037
14721         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14722         matched stmts if we cannot swap the non-matched ones.
14724 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14726         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14727         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14728         _mm_maskz_scalef_round_ss): New intrinsics.
14729         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14730         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14731         __builtin_ia32_scalefss_round): Remove.
14732         (__builtin_ia32_scalefsd_mask_round,
14733         __builtin_ia32_scalefss_mask_round): New intrinsics.
14734         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14735         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14736         ((match_operand:VF_128 2 "<round_nimm_predicate>"
14737         "<round_constraint>")): Changed to ...
14738         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14739         "<round_scalar_constraint>")): ... this.
14740         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14741         %0, %1, %2<round_op3>}"): Changed to ...
14742         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14743         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14744         %2<round_scalar_mask_op3>}"): ... this.
14745         * config/i386/subst.md (round_scalar_nimm_predicate): New.
14747 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
14749         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14750         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14751         (_mm_maskz_sqrt_round_ss): New intrinsics.
14752         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14753         (__builtin_ia32_sqrtsd_mask_round)
14754         (__builtin_ia32_sqrtss_mask_round): New builtins.
14755         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14756         (__builtin_ia32_sqrtss_round): Remove.
14757         (__builtin_ia32_sqrtsd_mask_round)
14758         (__builtin_ia32_sqrtss_mask_round): New builtins.
14759         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14760         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14761         ((match_operand:VF_128 1 "vector_operand"
14762         "xBm,<round_constraint>")): Changed to ...
14763         ((match_operand:VF_128 1 "vector_operand"
14764         "xBm,<round_scalar_constraint>")): ... this.
14765         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14766         %0, %2, %<iptr>1<round_op3>}): Changed to ...
14767         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14768         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14769         %<iptr>1<round_scalar_mask_op3>}): ... this.
14770         ((set_attr "prefix" "<round_prefix>")): Changed to ...
14771         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14773 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
14775         PR target/84266
14776         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14777         Cast vec_cmpeq result to correct type.
14778         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14779         Cast vec_cmpgt result to correct type.
14781 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
14783         * final.c (final_scan_insn_1): Renamed from...
14784         (final_scan_insn): ... this.  New wrapper, to recover
14785         seen from the outermost call in recursive ones.
14786         * config/sparc/sparc.c (output_return): Drop seen from call.
14787         (output_sibcall): Likewise.
14788         * config/visium/visium.c (output_branch): Likewise.
14790 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
14792         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14793         function label.
14795 2018-02-10  Alan Modra  <amodra@gmail.com>
14797         PR target/84300
14798         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14799         Specify LR as an input.
14801 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
14803         PR sanitizer/83987
14804         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14805         remove_member_access_dummy_vars): New functions.
14806         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14807         lower_omp_1, execute_lower_omp): Use them.
14809         PR rtl-optimization/84308
14810         * shrink-wrap.c (spread_components): Release todo vector.
14812 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
14814         PR rtl-optimization/57193
14815         * ira-color.c (struct allocno_color_data): Add member
14816         conflict_allocno_hard_prefs.
14817         (update_conflict_allocno_hard_prefs): New.
14818         (bucket_allocno_compare_func): Add a preference based on
14819         conflict_allocno_hard_prefs.
14820         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14821         (color_allocnos): Remove a dead code.  Initiate
14822         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
14824 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14826         PR target/84226
14827         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14828         constraint from =wa to wa.  Avoid a subreg on the output operand,
14829         instead use a pseudo and subreg it in a move.
14830         (p9_xxbrd_<mode>): Changed to ...
14831         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14832         (p9_xxbrd_v2df): New expander.
14833         (p9_xxbrw_<mode>): Changed to ...
14834         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14835         (p9_xxbrw_v4sf): New expander.
14837 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14839         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14841 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
14843         PR target/83926
14844         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14845         multiply in 32-bit mode.
14846         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14847         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14848         mode.
14850 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
14852         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14853         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14854         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14855         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14857 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
14859         PR lto/84213
14860         * dwarf2out.c (is_trivial_indirect_ref): New function.
14861         (dwarf2out_late_global_decl): Do not generate a location
14862         attribute for variables that have a non-trivial DECL_VALUE_EXPR
14863         and that are not defined in the current unit.
14865 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14867         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14868         instead of a libcall for UNORDERED.
14870 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
14872         PR target/82641
14873         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14874         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14876 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14878         PR target/PR84295
14879         * config/s390/s390.c (s390_set_current_function): Invoke
14880         s390_indirect_branch_settings also if fndecl didn't change.
14882 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14884         * config/rs6000/rs6000.md (blockage): Set length to zero.
14886 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
14888         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14890 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
14892         PR sanitizer/84285
14893         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14894         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14895         -static-lib*san.
14897         PR debug/84252
14898         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14899         PARALLEL incoming that failed vt_get_decl_and_offset check.
14901         PR middle-end/84237
14902         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14903         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14904         TREE_READONLY bit.
14905         (get_variable_section): For decls in named .bss* sections pass true as
14906         second argument to bss_initializer_p.
14908 2018-02-09  Marek Polacek  <polacek@redhat.com>
14909             Jakub Jelinek  <jakub@redhat.com>
14911         PR c++/83659
14912         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14913         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
14914         Sync some changes from cxx_fold_indirect_ref.
14916 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
14918         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14919         markers.
14920         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14921         (BLOCK_INLINE_ENTRY_LABEL): New.
14922         (dwarf2out_var_location): Disregard inline entry markers.
14923         (inline_entry_data): New struct.
14924         (inline_entry_data_hasher): New hashtable type.
14925         (inline_entry_data_hasher::hash): New.
14926         (inline_entry_data_hasher::equal): New.
14927         (inline_entry_data_table): New variable.
14928         (add_high_low_attributes): Add DW_AT_entry_pc and
14929         DW_AT_GNU_entry_view attributes if a pending entry is found
14930         in inline_entry_data_table.  Add old entry_pc attribute only
14931         if debug nonbinding markers are disabled.
14932         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14933         markers are enabled.
14934         (block_within_block_p, dwarf2out_inline_entry): New.
14935         (dwarf2out_finish): Check that no entries remained in
14936         inline_entry_data_table.
14937         * final.c (reemit_insn_block_notes): Handle inline entry notes.
14938         (final_scan_insn, notice_source_line): Likewise.
14939         (rest_of_clean_state): Skip inline entry markers.
14940         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14941         markers.
14942         * gimple.c (gimple_build_debug_inline_entry): New.
14943         * gimple.h (enum gimple_debug_subcode): Add
14944         GIMPLE_DEBUG_INLINE_ENTRY.
14945         (gimple_build_debug_inline_entry): Declare.
14946         (gimple_debug_inline_entry_p): New.
14947         (gimple_debug_nonbind_marker_p): Adjust.
14948         * insn-notes.def (INLINE_ENTRY): New.
14949         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14950         inline entry marker notes.
14951         (print_insn): Likewise.
14952         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14953         (INSN_DEBUG_MARKER_KIND): Likewise.
14954         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14955         * tree-inline.c (expand_call_inline): Build and insert
14956         debug_inline_entry stmt.
14957         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14958         inline entry blocks early, if nonbind markers are enabled.
14959         (dump_scope_block): Dump fragment info.
14960         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14961         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14962         (gimple_build_debug_inline_entry): New.
14963         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14964         Enable/disable inline entry points too.
14965         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14966         (DEBUG_INSN): Describe inline entry markers.
14968         * common.opt (gvariable-location-views): New.
14969         (gvariable-location-views=incompat5): New.
14970         * config.in: Rebuilt.
14971         * configure: Rebuilt.
14972         * configure.ac: Test assembler for view support.
14973         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14974         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14975         * dwarf2out.c (var_loc_view): New typedef.
14976         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14977         (dwarf2out_locviews_in_attribute): New.
14978         (dwarf2out_locviews_in_loclist): New.
14979         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14980         (enum dw_line_info_opcode): Add LI_adv_address.
14981         (struct dw_line_info_table): Add view.
14982         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14983         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14984         (zero_view_p): New variable.
14985         (ZERO_VIEW_P): New macro.
14986         (output_asm_line_debug_info): New.
14987         (struct var_loc_node): Add view.
14988         (add_AT_view_list, AT_loc_list): New.
14989         (add_var_loc_to_decl): Add view param.  Test it against last.
14990         (new_loc_list): Add view params.  Record them.
14991         (AT_loc_list_ptr): Handle loc and view lists.
14992         (view_list_to_loc_list_val_node): New.
14993         (print_dw_val): Handle dw_val_class_view_list.
14994         (size_of_die): Likewise.
14995         (value_format): Likewise.
14996         (loc_list_has_views): New.
14997         (gen_llsym): Set vl_symbol too.
14998         (maybe_gen_llsym, skip_loc_list_entry): New.
14999         (dwarf2out_maybe_output_loclist_view_pair): New.
15000         (output_loc_list): Output view list or entries too.
15001         (output_view_list_offset): New.
15002         (output_die): Handle dw_val_class_view_list.
15003         (output_dwarf_version): New.
15004         (output_compilation_unit_header): Use it.
15005         (output_skeleton_debug_sections): Likewise.
15006         (output_rnglists, output_line_info): Likewise.
15007         (output_pubnames, output_aranges): Update version comments.
15008         (output_one_line_info_table): Output view numbers in asm comments.
15009         (dw_loc_list): Determine current endview, pass it to new_loc_list.
15010         Call maybe_gen_llsym.
15011         (loc_list_from_tree_1): Adjust.
15012         (add_AT_location_description): Create view list attribute if
15013         needed, check it's absent otherwise.
15014         (convert_cfa_to_fb_loc_list): Adjust.
15015         (maybe_emit_file): Call output_asm_line_debug_info for test.
15016         (dwarf2out_var_location): Reset views as needed.  Precompute
15017         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
15018         attribute.  Set view.
15019         (new_line_info_table): Reset next view.
15020         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15021         (dwarf2out_source_line): Likewise.  Output view resets and labels to
15022         the assembler, or select appropriate line info opcodes.
15023         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15024         (optimize_string_length): Catch it.  Adjust.
15025         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
15026         dw_val_class_view_list, and remove it if no longer needed.
15027         (hash_loc_list): Hash view numbers.
15028         (loc_list_hasher::equal): Compare them.
15029         (optimize_location_lists): Check whether a view list symbol is
15030         needed, and whether the locview attribute is present, and
15031         whether they match.  Remove the locview attribute if no longer
15032         needed.
15033         (index_location_lists): Call skip_loc_list_entry for test.
15034         (dwarf2out_finish): Call output_asm_line_debug_info for test.
15035         Use output_dwarf_version.
15036         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15037         (struct dw_val_node): Add val_view_list.
15038         * final.c (SEEN_NEXT_VIEW): New.
15039         (set_next_view_needed): New.
15040         (clear_next_view_needed): New.
15041         (maybe_output_next_view): New.
15042         (final_start_function): Rename to...
15043         (final_start_function_1): ... this.  Take pointer to FIRST,
15044         add SEEN parameter.  Emit param bindings in the initial view.
15045         (final_start_function): Reintroduce SEEN-less interface.
15046         (final): Rename to...
15047         (final_1): ... this.  Take SEEN parameter.  Output final pending
15048         next view at the end.
15049         (final): Reintroduce seen-less interface.
15050         (final_scan_insn): Output pending next view before switching
15051         sections or ending a block.  Mark the next view as needed when
15052         outputting variable locations.  Notify debug backend of section
15053         changes, and of location view changes.
15054         (rest_of_handle_final): Adjust.
15055         * toplev.c (process_options): Autodetect value for debug variable
15056         location views option.  Warn on incompat5 without -gdwarf-5.
15057         * doc/invoke.texi (gvariable-location-views): New.
15058         (gvariable-location-views=incompat5): New.
15059         (gno-variable-location-views): New.
15061 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
15063         PR tree-optimization/84136
15064         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15065         that the result of find_edge is non-NULL.
15067 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15069         PR target/83008
15070         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15071         storing integer register in SImode.  Fix cost of 256 and 512
15072         byte aligned SSE register store.
15074 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
15076         * config/i386/i386.c (ix86_multiplication_cost): Fix
15077         multiplication cost for TARGET_AVX512DQ.
15079 2018-02-08  Marek Polacek  <polacek@redhat.com>
15081         PR tree-optimization/84238
15082         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15083         get_range_strlen.
15085 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15087         PR tree-optimization/84265
15088         * tree-vect-stmts.c (vectorizable_store): Don't treat
15089         VMAT_CONTIGUOUS accesses as grouped.
15090         (vectorizable_load): Likewise.
15092 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15094         PR tree-optimization/81635
15095         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15096         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15097         (test_round_for_mask): New functions.
15098         (wide_int_cc_tests): Call test_round_for_mask.
15099         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15100         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15101         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15102         range returned by get_range_info.
15104 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
15106         PR ipa/81360
15107         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15108         * symtab.c: Include builtins.h
15109         (symtab_node::output_to_lto_symbol_table_p): Move here
15110         from lto-streamer-out.c:output_symbol_p.
15111         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15112         (output_symbol_p): Move all logic to symtab.c
15113         (produce_symtab): Update.
15115 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15117         * config/s390/s390-opts.h (enum indirect_branch): Define.
15118         * config/s390/s390-protos.h (s390_return_addr_from_memory)
15119         (s390_indirect_branch_via_thunk)
15120         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15121         (enum s390_indirect_branch_type): Define.
15122         * config/s390/s390.c (struct s390_frame_layout, struct
15123         machine_function): Remove.
15124         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15125         (indirect_branch_table_label_no, indirect_branch_table_name):
15126         Define variables.
15127         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15128         (enum s390_indirect_branch_option): Define.
15129         (s390_return_addr_from_memory): New function.
15130         (s390_handle_string_attribute): New function.
15131         (s390_attribute_table): Add new attribute handler.
15132         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15133         (s390_indirect_branch_via_thunk): New function.
15134         (s390_indirect_branch_via_inline_thunk): New function.
15135         (s390_function_ok_for_sibcall): When jumping via thunk disallow
15136         sibling call optimization for non z10 compiles.
15137         (s390_emit_call): Force indirect branch target to be a single
15138         register.  Add r1 clobber for non-z10 compiles.
15139         (s390_emit_epilogue): Emit return jump via return_use expander.
15140         (s390_reorg): Handle JUMP_INSNs as execute targets.
15141         (s390_option_override_internal): Perform validity checks for the
15142         new command line options.
15143         (s390_indirect_branch_attrvalue): New function.
15144         (s390_indirect_branch_settings): New function.
15145         (s390_set_current_function): Invoke s390_indirect_branch_settings.
15146         (s390_output_indirect_thunk_function):  New function.
15147         (s390_code_end): Implement target hook.
15148         (s390_case_values_threshold): Implement target hook.
15149         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15150         macros.
15151         * config/s390/s390.h (struct s390_frame_layout)
15152         (struct machine_function): Move here from s390.c.
15153         (TARGET_INDIRECT_BRANCH_NOBP_RET)
15154         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15155         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15156         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15157         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15158         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15159         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15160         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15161         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15162         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15163         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15164         (mnemonic attribute): Add values which aren't recognized
15165         automatically.
15166         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15167         pattern for branch conversion.  Fix mnemonic attribute.
15168         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15169         indirect branch via thunk if requested.
15170         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15171         ("*indirect_jump"): Disable for branch conversion using out of
15172         line thunks.
15173         ("indirect_jump_via_thunk<mode>_z10")
15174         ("indirect_jump_via_thunk<mode>")
15175         ("indirect_jump_via_inlinethunk<mode>_z10")
15176         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15177         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15178         ("casesi_jump_via_inlinethunk<mode>_z10")
15179         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15180         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15181         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15182         ("*indirect2_jump"): Disable for branch conversion.
15183         ("casesi_jump"): Turn into expander and expand patterns for branch
15184         conversion.
15185         ("return_use"): New expander.
15186         ("*return"): Emit return via thunk and rename it to ...
15187         ("*return<mode>"): ... this one.
15188         * config/s390/s390.opt: Add new options and and enum for the
15189         option values.
15191 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
15193         * lra-constraints.c (match_reload): Unconditionally use
15194         gen_lowpart_SUBREG, rather than selecting between that
15195         and equivalent gen_rtx_SUBREG code.
15197 2018-02-08  Richard Biener  <rguenther@suse.de>
15199         PR tree-optimization/84233
15200         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15201         changed flag instead of boguously re-using phi_inserted.
15203 2018-02-08  Martin Jambor  <mjambor@suse.cz>
15205         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15206         static local variables.
15208 2018-02-08  Richard Biener  <rguenther@suse.de>
15210         PR tree-optimization/84278
15211         * tree-vect-stmts.c (vectorizable_store): When looking for
15212         smaller vector types to perform grouped strided loads/stores
15213         make sure the mode is supported by the target.
15214         (vectorizable_load): Likewise.
15216 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15218         * config/aarch64/aarch64.c (aarch64_components_for_bb):
15219         Increase LDP/STP opportunities by adding adjacent callee-saves.
15221 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
15223         PR rtl-optimization/84068
15224         PR rtl-optimization/83459
15225         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15227 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
15229         PR tree-optimization/84224
15230         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15231         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15232         non-zero arguments.
15234 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
15236         PR target/84113
15237         * config/rs6000/altivec.md (*restore_world): Remove LR use.
15238         * config/rs6000/predicates.md (restore_world_operation): Adjust op
15239         count, remove one USE.
15241 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
15243         * doc/install.texi (Configuration): Document the
15244         --with-long-double-format={ibm,ieee} PowerPC configuration
15245         options.
15247         PR target/84154
15248         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15249         Convert from define_expand to be define_insn_and_split.  Rework
15250         float/double/_Float128 conversions to QI/HI/SImode to work with
15251         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
15252         conversions to QI/HImode types did a store and then a load to
15253         truncate the value.  For conversions to VSX registers, don't split
15254         the insn, instead emit the code directly.  Use the code iterator
15255         any_fix to combine signed and unsigned conversions.
15256         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15257         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15258         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15259         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15260         (fix_<mode>di2_hw): Likewise.
15261         (fixuns_<mode>di2_hw): Likewise.
15262         (fix_<mode>si2_hw): Likewise.
15263         (fixuns_<mode>si2_hw): Likewise.
15264         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15265         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15266         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15267         fix<uns>_trunc<SFDF:mode>si2_p8.
15268         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15269         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15270         (fix<uns>_<mode>_mem): Likewise.
15271         (fctiw<u>z_<mode>_mem): Likewise.
15272         (fix<uns>_<mode>_mem): Likewise.
15273         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15274         the register allocator from doing a direct move to the GPRs to do
15275         a store, and instead use the ISA 3.0 store byte/half-word from
15276         vector register instruction.  For IEEE 128-bit floating point,
15277         also optimize stores of 32-bit ints.
15278         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15280 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
15282         * genextract.c (push_pathstr_operand): New function to support
15283         [a-zA-Z].
15284         (walk_rtx): Call push_pathstr_operand.
15285         (print_path): Support [a-zA-Z].
15287 2018-02-07  Richard Biener  <rguenther@suse.de>
15289         PR tree-optimization/84037
15290         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15291         (cse_and_gimplify_to_preheader): Declare.
15292         (vect_get_place_in_interleaving_chain): Likewise.
15293         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15294         ivexpr_map.
15295         (_loop_vec_info::~_loop_vec_info): Delete it.
15296         (cse_and_gimplify_to_preheader): New function.
15297         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15298         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15299         (vectorizable_load): Likewise.  For grouped stores always base
15300         the IV on the first element.
15301         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15302         condition before gimplifying.
15304 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15306         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15307         *DIV_EXPR and *MOD_EXPR.
15309 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
15311         PR target/84248
15312         * config/i386/i386.c (ix86_option_override_internal): Mask out
15313         the CF_SET bit when checking -fcf-protection.
15315 2018-02-07  Tom de Vries  <tom@codesourcery.com>
15317         PR libgomp/84217
15318         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15319         enough.
15321 2018-02-07  Richard Biener  <rguenther@suse.de>
15323         PR tree-optimization/84204
15324         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15325         this place.
15327         PR tree-optimization/84205
15328         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15329         special-case isl_ast_op_zdiv_r.
15331         PR tree-optimization/84223
15332         * graphite-scop-detection.c (gather_bbs::before_dom_children):
15333         Only add conditions from within the region.
15334         (gather_bbs::after_dom_children): Adjust.
15336 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
15338         PR target/84209
15339         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15340         * config/avr/avr.md: Only post-reload split REG-REG moves if
15341         either register is GENERAL_REG_P.
15343 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
15345         PR tree-optimization/84235
15346         * tree-ssa-scopedtables.c
15347         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15348         if the subtraction is performed in floating point type where NaNs are
15349         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15350         build 1.  Formatting fix.
15352 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
15354         PR target/84146
15355         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15356         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15357         and skip it regardless of bb boundaries.  Use CALL_P macro,
15358         don't test INSN_P (insn) together with CALL_P or JUMP_P check
15359         unnecessarily, formatting fix.
15361 2018-02-06  Michael Collison  <michael.collison@arm.com>
15363         * config/arm/thumb2.md:
15364         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15365         (*thumb_mov_notscc): Ditto.
15367 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
15369         PR target/84154
15370         * config/rs6000/rs6000.md (su code attribute): Use "u" for
15371         unsigned_fix, not "s".
15373 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15375         * configure.ac (gcc_fn_eh_frame_ro): New function.
15376         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15377         correct .eh_frame permissions.
15378         * configure: Regenerate.
15380 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
15382         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15383         irrelevant options.
15385 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15387         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15388         Display warning message for -mno-speculate-indirect-jumps.
15390 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
15392         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15393         Undocumented.
15394         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15396 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
15398         PR tree-optimization/84225
15399         * tree-eh.c (find_trapping_overflow): Only call
15400         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15402 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15404         PR target/84145
15405         * config/i386/i386.c: Reimplement the check of possible options
15406         -mibt/-mshstk conbination. Change error messages.
15407         * doc/invoke.texi: Fix a typo: remove extra '='.
15409 2018-02-06  Marek Polacek  <polacek@redhat.com>
15411         PR tree-optimization/84228
15412         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15414 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
15416         PR target/82641
15417         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15418         emitted arch directives.
15419         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15420         __ARM_FEATURE_COPROC before changing architectures.
15422 2018-02-06  Richard Biener  <rguenther@suse.de>
15424         * config/i386/i386.c (print_reg): Fix typo.
15425         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15427 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
15429         * configure: Regenerate.
15431 2018-02-05  Martin Sebor  <msebor@redhat.com>
15433         PR tree-optimization/83369
15434         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15435         inlining context.
15437 2018-02-05  Martin Liska  <mliska@suse.cz>
15439         * doc/invoke.texi: Cherry-pick upstream r323995.
15441 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
15443         * ira.c (ira_init_register_move_cost): Adjust comment.
15445 2018-02-05  Martin Liska  <mliska@suse.cz>
15447         PR gcov-profile/84137
15448         * doc/gcov.texi: Fix typo in documentation.
15450 2018-02-05  Martin Liska  <mliska@suse.cz>
15452         PR gcov-profile/83879
15453         * doc/gcov.texi: Document necessity of --dynamic-list-data when
15454         using dlopen functionality.
15456 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
15458         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15459         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15460         _mm_maskz_range_ss, _mm_mask_range_round_ss,
15461         _mm_maskz_range_round_ss): New intrinsics.
15462         (__builtin_ia32_rangesd128_round)
15463         (__builtin_ia32_rangess128_round): Remove.
15464         (__builtin_ia32_rangesd128_mask_round,
15465         __builtin_ia32_rangess128_mask_round): New builtins.
15466         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15467         __builtin_ia32_rangess128_round): Remove.
15468         (__builtin_ia32_rangesd128_mask_round,
15469         __builtin_ia32_rangess128_mask_round): New builtins.
15470         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15471         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15472         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15473         "<round_saeonly_constraint>")): Changed to ...
15474         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15475         "<round_saeonly_scalar_constraint>")): ... this.
15476         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15477         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15478         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15479         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15480         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15482 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
15484         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15485         options.
15486         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15487         Remove all values except native, 8540 and 8548.
15489 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
15491         * config/i386/i386.c (ix86_output_function_return): Pass
15492         INVALID_REGNUM, instead of -1, as invalid register number to
15493         indirect_thunk_name and output_indirect_thunk.
15495 2018-02-02  Julia Koval  <julia.koval@intel.com>
15497         * config.gcc: Add -march=icelake.
15498         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15499         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15500         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15501         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15502         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15503         (processor_target_table): Add icelake.
15504         (ix86_option_override_internal): Handle new PTAs.
15505         (get_builtin_code_for_version): Handle icelake.
15506         (M_INTEL_COREI7_ICELAKE): New.
15507         (fold_builtin_cpu): Handle icelake.
15508         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15509         * doc/invoke.texi: Add -march=icelake.
15511 2018-02-02  Julia Koval  <julia.koval@intel.com>
15513         * config/i386/i386.c (ix86_option_override_internal): Change flags type
15514         to wide_int_bitmask.
15515         * wide-int-bitmask.h: New.
15517 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
15519         PR target/84066
15520         * config/i386/i386.md: Replace Pmode with word_mode in
15521         builtin_setjmp_setup and builtin_longjmp to support x32.
15523 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
15525         PR target/56010
15526         PR target/83743
15527         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15528         #include "opts.h".
15529         (rs6000_supported_cpu_names): New static variable.
15530         (linux_cpu_translation_table): Likewise.
15531         (elf_platform) <cpu>: Define new static variable and use it.
15532         Translate kernel AT_PLATFORM name to canonical name if needed.
15533         Error if platform name is unknown.
15535 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
15537         PR target/84089
15538         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15540 2018-02-01  Jeff Law  <law@redhat.com>
15542         PR target/84128
15543         * config/i386/i386.c (release_scratch_register_on_entry): Add new
15544         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
15545         the scratch if RELEASE_VIA_POP is false.
15546         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15547         If we have to save a temporary register, decrement SIZE appropriately.
15548         Pass new arguments to release_scratch_register_on_entry.
15549         (ix86_adjust_stack_and_probe): Likewise.
15550         (ix86_emit_probe_stack_range): Pass new arguments to
15551         release_scratch_register_on_entry.
15553 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
15555         PR rtl-optimization/84157
15556         * combine.c (change_zero_ext): Use REG_P predicate in
15557         front of HARD_REGISTER_P predicate.
15559 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
15561         * config/avr/avr.c (avr_option_override): Move disabling of
15562         -fdelete-null-pointer-checks to...
15563         * common/config/avr/avr-common.c (avr_option_optimization_table):
15564         ...here.
15566 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15568         PR tree-optimization/81635
15569         * tree-data-ref.c (split_constant_offset_1): For types that
15570         wrap on overflow, try to use range info to prove that wrapping
15571         cannot occur.
15573 2018-02-01  Renlin Li  <renlin.li@arm.com>
15575         PR target/83370
15576         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15577         TAILCALL_ADDR_REGS.
15578         (aarch64_register_move_cost): Likewise.
15579         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15580         TAILCALL_ADDR_REGS.
15581         (REG_CLASS_NAMES): Likewise.
15582         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15583         TAILCALL_ADDR_REGS. Remove IP registers.
15584         * config/aarch64/aarch64.md (Ucs): Update register constraint.
15586 2018-02-01  Richard Biener  <rguenther@suse.de>
15588         * domwalk.h (dom_walker::dom_walker): Add additional constructor
15589         for specifying RPO order and allow NULL for that.
15590         * domwalk.c (dom_walker::dom_walker): Likewise.
15591         (dom_walker::walk): Handle NULL RPO order.
15592         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15593         in RPO order.
15594         (rewrite_update_dom_walker): Likewise.
15595         (mark_def_dom_walker): Likewise.
15597 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15599         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15600         (aarch64_maybe_expand_sve_subreg_move): Declare.
15601         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15602         * config/aarch64/predicates.md (aarch64_any_register_operand): New
15603         predicate.
15604         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15605         that are semantically a reverse operation.
15606         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15607         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15608         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15609         functions.
15610         (aarch64_can_change_mode_class): For big-endian, forbid changes
15611         between two SVE modes if they have different element sizes.
15613 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15615         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15616         the TImode handling for big-endian targets.
15618 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15620         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15621         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
15622         not just bytes.
15623         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15624         Remove BSWAP handing for big-endian targets and use the form of
15625         LD1RQ appropariate for the mode.
15627 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15629         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15630         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15631         duplicated element.
15633 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
15635         PR tearget/83845
15636         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15637         check for operands that need to go through aarch64_sve_reload_be.
15639 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
15641         PR tree-optimization/81661
15642         PR tree-optimization/84117
15643         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15644         * tree-eh.c: Include gimplify.h.
15645         (find_trapping_overflow, replace_trapping_overflow,
15646         rewrite_to_non_trapping_overflow): New functions.
15647         * tree-vect-loop.c: Include tree-eh.h.
15648         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15649         * tree-data-ref.c: Include tree-eh.h.
15650         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15652 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
15654         PR rtl-optimization/84123
15655         * combine.c (change_zero_ext): Check if hard register satisfies
15656         can_change_dest_mode before calling gen_lowpart_SUBREG.
15658 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
15660         PR target/82444
15661         * ira.c (ira_init_register_move_cost): Remove assert.
15663 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15665         PR rtl-optimization/84071
15666         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15667         * doc/tm.texi: Regenerate.
15669 2018-01-31  Richard Biener  <rguenther@suse.de>
15671         PR tree-optimization/84132
15672         * tree-data-ref.c (analyze_miv_subscript): Properly
15673         check whether evolution_function_is_affine_multivariate_p
15674         before calling gcd_of_steps_may_divide_p.
15676 2018-01-31  Julia Koval  <julia.koval@intel.com>
15678         PR target/83618
15679         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15680         * config/i386/i386.md (rdpid_rex64) New.
15681         (rdpid): Make 32bit only.
15683 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
15685         PR lto/84105
15686         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15687         an IDENTIFIER_NODE for FUNCTION_TYPE's.
15689 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15691         Revert
15692         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15694         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15696 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
15698         PR rtl-optimization/84071
15699         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15700         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15702 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15704         * config/arc/arc.c (arc_handle_aux_attribute): New function.
15705         (arc_attribute_table): Add 'aux' attribute.
15706         (arc_in_small_data_p): Consider aux like variables.
15707         (arc_is_aux_reg_p): New function.
15708         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15709         (arc_get_aux_arg): New function.
15710         (prepare_move_operands): Handle aux-register access.
15711         (arc_handle_aux_attribute): New function.
15712         * doc/extend.texi (ARC Variable attributes): Add subsection.
15714 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
15716         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15717         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15718         (arc_attribute_table): Add 'uncached' attribute.
15719         (arc_print_operand): Print '.di' flag for uncached memory
15720         accesses.
15721         (arc_in_small_data_p): Do not consider for small data the uncached
15722         types.
15723         (arc_is_uncached_mem_p): New function.
15724         * config/arc/predicates.md (compact_store_memory_operand): Check
15725         for uncached memory accesses.
15726         (nonvol_nonimm_operand): Likewise.
15727         * doc/extend.texi (ARC Type Attribute): New subsection.
15729 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
15731         PR c/84100
15732         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15733         falign-loops=): Add Optimization flag.
15735 2018-01-30  Jeff Law  <law@redhat.com>
15737         PR target/84064
15738         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15739         INT_REGISTERS_SAVED.  Check it prior to calling
15740         get_scratch_register_on_entry.
15741         (ix86_adjust_stack_and_probe): Similarly.
15742         (ix86_emit_probe_stack_range): Similarly.
15743         (ix86_expand_prologue): Corresponding changes.
15745 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15747         PR target/40411
15748         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15749         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15751 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
15753         PR target/84112
15754         * lra-constraints.c (curr_insn_transform): Process AND in the
15755         address.
15757 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
15759         PR rtl-optimization/83986
15760         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15761         dependence against last_pending_memory_flush in addition to
15762         pending_jump_insns.
15764 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
15766         PR tree-optimization/81611
15767         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15768         copies.
15770 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15772         PR target/83758
15773         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15774         a reg rtx.
15776 2018-01-30  Richard Biener  <rguenther@suse.de>
15777             Jakub Jelinek  <jakub@redhat.com>
15779         PR tree-optimization/84111
15780         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15781         inner loops added during recursion, as they don't have up-to-date
15782         SSA form.
15784 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15786         PR ipa/81360
15787         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15788         (can_inline_edge_by_limits_p): ... here.
15789         (can_early_inline_edge_p, check_callers,
15790         update_caller_keys, update_callee_keys, recursive_inlining,
15791         add_new_edges_to_heap, speculation_useful_p,
15792         inline_small_functions,
15793         inline_small_functions, flatten_function,
15794         inline_to_all_callers_1): Update.
15796 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
15798         * profile-count.c (profile_count::combine_with_ipa_count): Handle
15799         zeros correctly.
15801 2018-01-30  Richard Biener  <rguenther@suse.de>
15803         PR tree-optimization/83008
15804         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15805         invariant and constant vector uses in stmts when they need
15806         more than one stmt.
15808 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15810         PR bootstrap/84017
15811         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15812         * configure: Regenerate.
15814 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15816         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15817         pattern.
15818         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15819         Use gen_rtx_REG rather than gen_lowpart.
15821 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15823         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15824         rather than 0 when creating partial subregs.
15826 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
15828         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15829         of usage.
15831 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
15833         PR target/81550
15834         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15835         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15836         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15837         flags.  This restores the settings used before the 2017-07-24.
15838         Turning off pre increment/decrement/modify allows IVOPTS to
15839         optimize DF/SF loops where the index is an int.
15841 2018-01-29  Richard Biener  <rguenther@suse.de>
15842             Kelvin Nilsen  <kelvin@gcc.gnu.org>
15844         PR bootstrap/80867
15845         * tree-vect-stmts.c (vectorizable_call): Don't call
15846         targetm.vectorize_builtin_md_vectorized_function if callee is
15847         NULL.
15849 2018-01-22  Carl Love  <cel@us.ibm.com>
15851         * doc/extend.tex: Fix typo in second arg in
15852         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15854 2018-01-29  Richard Biener  <rguenther@suse.de>
15856         PR tree-optimization/84086
15857         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15858         (flush_ssaname_freelist): When SSA names were released reset
15859         the SCEV hash table.
15861 2018-01-29  Richard Biener  <rguenther@suse.de>
15863         PR tree-optimization/84057
15864         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15865         removed paths when removing edges.
15867 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
15869         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15870         -mfunction-return=@var{choice}.
15872 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15874         PR diagnostic/84034
15875         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15876         Handle CR like TAB.
15877         (layout::print_source_line): Likewise.
15878         (test_get_line_width_without_trailing_whitespace): Add test cases.
15880 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
15882         PR middle-end/84040
15883         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15884         debug insns.
15886 2018-01-26  Jim Wilson  <jimw@sifive.com>
15888         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15890         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15891         specified.
15893 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15895         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15896         and CMP + SUB-immediate -> SUBS.
15898 2018-01-26  Martin Sebor  <msebor@redhat.com>
15900         PR tree-optimization/83896
15901         * tree-ssa-strlen.c (get_string_len): Rename...
15902         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
15903         Avoid assuming length is constant.
15904         (handle_char_store): Use HOST_WIDE_INT for string length.
15906 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
15908         PR target/81763
15909         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15910         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15912 2018-01-26  Richard Biener  <rguenther@suse.de>
15914         PR rtl-optimization/84003
15915         * dse.c (record_store): Only record redundant stores when
15916         the earlier store aliases at least all accesses the later one does.
15918 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
15920         PR rtl-optimization/83985
15921         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15922         REG_CFA_RESTORE insns.
15923         (delete_unmarked_insns): Don't ignore separate shrink wrapping
15924         REG_CFA_RESTORE insns here.
15926         PR c/83989
15927         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15928         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15930 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15932         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15933         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15934         (arc_init): Likewise.
15935         (arc_override_options): Likewise.
15936         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15937         value.
15938         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15939         support.
15940         * config/arc/arc.h (TARGET_DBNZ): Define.
15941         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15942         properly set the tune attribute.
15943         (dbnz): Use TARGET_DBNZ guard.
15944         * config/arc/arc.opt (mtune): Add core3 option.
15946 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15948         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15949         recognize new pic like addresses.
15950         (arc_delegitimize_address): Clean up.
15952 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15954         * config/arc/arc-arches.def: Option mrf16 valid for all
15955         architectures.
15956         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15957         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15958         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15959         * config/arc/arc-tables.opt: Regenerate.
15960         * config/arc/arc.c (arc_conditional_register_usage): Handle
15961         reduced register file case.
15962         (arc_file_start): Set must have build attributes.
15963         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15964         mrf16 option value.
15965         * config/arc/arc.opt (mrf16): Add new option.
15966         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15967         * config/arc/genmultilib.awk: Handle new mrf16 option.
15968         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15969         * config/arc/t-multilib: Regenerate.
15970         * doc/invoke.texi (ARC Options): Document mrf16 option.
15972 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15974         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15975         * config/arc/arc.c (arc_handle_secure_attribute): New function.
15976         (arc_attribute_table): Add 'secure_call' attribute.
15977         (arc_print_operand): Print secure call operand.
15978         (arc_function_ok_for_sibcall): Don't optimize tail calls when
15979         secure.
15980         (arc_is_secure_call_p): New function.  * config/arc/arc.md
15981         (call_i): Add support for sjli instruction.
15982         (call_value_i): Likewise.
15983         * config/arc/constraints.md (Csc): New constraint.
15985 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
15986             John Eric Martin  <John.Martin@emmicro-us.com>
15988         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15989         * config/arc/arc.c (_arc_jli_section): New struct.
15990         (arc_jli_section): New type.
15991         (rc_jli_sections): New static variable.
15992         (arc_handle_jli_attribute): New function.
15993         (arc_attribute_table): Add jli_always and jli_fixed attribute.
15994         (arc_file_end): New function.
15995         (TARGET_ASM_FILE_END): Define.
15996         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15997         (arc_add_jli_section): New function.
15998         (jli_call_scan): Likewise.
15999         (arc_reorg): Call jli_call_scan.
16000         (arc_output_addsi): Remove 'S' from printing asm operand.
16001         (arc_is_jli_call_p): New function.
16002         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16003         operand.
16004         (movhi_insn): Likewise.
16005         (movsi_insn): Likewise.
16006         (movsi_set_cc_insn): Likewise.
16007         (loadqi_update): Likewise.
16008         (load_zeroextendqisi_update): Likewise.
16009         (load_signextendqisi_update): Likewise.
16010         (loadhi_update): Likewise.
16011         (load_zeroextendhisi_update): Likewise.
16012         (load_signextendhisi_update): Likewise.
16013         (loadsi_update): Likewise.
16014         (loadsf_update): Likewise.
16015         (movsicc_insn): Likewise.
16016         (bset_insn): Likewise.
16017         (bxor_insn): Likewise.
16018         (bclr_insn): Likewise.
16019         (bmsk_insn): Likewise.
16020         (bicsi3_insn): Likewise.
16021         (cmpsi_cc_c_insn): Likewise.
16022         (movsi_ne): Likewise.
16023         (movsi_cond_exec): Likewise.
16024         (clrsbsi2): Likewise.
16025         (norm_f): Likewise.
16026         (normw): Likewise.
16027         (swap): Likewise.
16028         (divaw): Likewise.
16029         (flag): Likewise.
16030         (sr): Likewise.
16031         (kflag): Likewise.
16032         (ffs): Likewise.
16033         (ffs_f): Likewise.
16034         (fls): Likewise.
16035         (call_i): Remove 'S' asm letter, add jli instruction.
16036         (call_value_i): Likewise.
16037         * config/arc/arc.op (mjli-always): New option.
16038         * config/arc/constraints.md (Cji): New constraint.
16039         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16040         operand.
16041         (subsf3_fpx): Likewise.
16042         (mulsf3_fpx): Likewise.
16043         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16044         asm operand.
16045         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16046         function attrbutes.
16047         * doc/invoke.texi (ARC): Document mjli-always option.
16049 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
16051         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16052         avoid addition with 0 and use incw and decw where possible.
16054 2018-01-26  Richard Biener  <rguenther@suse.de>
16056         PR tree-optimization/81082
16057         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16058         association if it requires casting to unsigned.
16059         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16060         from fold_plusminus_mult_expr to catch important cases late when
16061         range info is available.
16063 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16065         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16066         * configure.ac (hidden_linkonce): New test.
16067         * configure: Regenerate.
16068         * config.in: Regenerate.
16070 2018-01-26  Julia Koval  <julia.koval@intel.com>
16072         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16073         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16074         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16075         _mm_mask_bitshuffle_epi64_mask): Fix type.
16076         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16077         USI_FTYPE_V4DI_V4DI_USI): Remove.
16078         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16079         __builtin_ia32_vpshufbitqmb256_mask,
16080         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16081         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16082         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16084 2018-01-26  Alan Modra  <amodra@gmail.com>
16086         PR target/84033
16087         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16088         UNSPEC_VBPERMQ.  Sort other unspecs.
16090 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
16092         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16094 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
16096         PR middle-end/83055
16097         * predict.c (drop_profile): Do not push/pop cfun; update also
16098         node->count.
16099         (handle_missing_profiles): Fix logic looking for zero profiles.
16101 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
16103         PR middle-end/83977
16104         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16105         on functions with #pragma omp declare simd or functions with simd
16106         attribute.
16107         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16108         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16109         Remove trailing \n from warning_at calls.
16111 2018-01-25  Tom de Vries  <tom@codesourcery.com>
16113         PR target/84028
16114         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16115         for neutered workers.
16117 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
16119         PR target/68467
16120         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16121         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16123 2018-01-24  Jeff Law  <law@redhat.com>
16125         PR target/83994
16126         * i386.c (get_probe_interval): Move to earlier point.
16127         (ix86_compute_frame_layout): If -fstack-clash-protection and
16128         the frame is larger than the probe interval, then use pushes
16129         to save registers rather than reg->mem moves.
16130         (ix86_expand_prologue): Remove conditional for int_registers_saved
16131         assertion.
16133 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
16135         PR target/84014
16136         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16137         min/max for never referenced object.
16139 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
16141         PR middle-end/83977
16142         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16143         here.
16144         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16145         attributes from DECL_ATTRIBUTES (decl) without affecting
16146         DECL_ATTRIBUTES (current_function_decl).
16147         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16148         functions with non-NULL DECL_ABSTRACT_ORIGIN.
16150 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
16152         PR tree-optimization/83979
16153         * fold-const.c (fold_comparison): Use constant_boolean_node
16154         instead of boolean_{true,false}_node.
16156 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
16158         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16159         with zero counts.
16161 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16163         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16164         Simplify the clause that sets the length attribute.
16165         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16166         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16167         clause that sets the length attribute.
16168         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16170 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16172         PR target/83589
16173         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16174         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16175         Add strict parameter.
16176         (prevent_branch_around_nothing): Insert dummy insn between branch to
16177         label and label with no ptx insn inbetween.
16178         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16180 2018-01-24  Tom de Vries  <tom@codesourcery.com>
16182         PR target/81352
16183         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16184         for neutered threads in warp.
16185         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16187 2018-01-24  Richard Biener  <rguenther@suse.de>
16189         PR tree-optimization/83176
16190         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16191         operands.
16193 2018-01-24  Richard Biener  <rguenther@suse.de>
16195         PR tree-optimization/82819
16196         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16197         code generating pluses that are no-ops in the target precision.
16199 2018-01-24  Richard Biener  <rguenther@suse.de>
16201         PR middle-end/84000
16202         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16204 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16206         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16207         to merge probabilities.
16208         * predict.c (probably_never_executed): Also mark as cold functions
16209         with global 0 profile and guessed local profile.
16210         * profile-count.c (profile_probability::combine_with_count): New
16211         member function.
16212         * profile-count.h (profile_probability::operator*,
16213         profile_probability::operator*=, profile_probability::operator/,
16214         profile_probability::operator/=): Reduce precision to adjusted
16215         and set value to guessed on contradictory divisions.
16216         (profile_probability::combine_with_freq): Remove.
16217         (profile_probability::combine_wiht_count): Declare.
16218         (profile_count::force_nonzero):: Set to adjusted.
16219         (profile_count::probability_in):: Set quality to adjusted.
16220         * tree-ssa-tail-merge.c (replace_block_by): Use
16221         combine_with_count.
16223 2018-01-23  Andrew Waterman  <andrew@sifive.com>
16224             Jim Wilson  <jimw@sifive.com>
16226         * config/riscv/riscv.c (riscv_stack_boundary): New.
16227         (riscv_option_override): Set riscv_stack_boundary.  Handle
16228         riscv_preferred_stack_boundary_arg.
16229         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16230         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16231         (STACK_BOUNDARY): Set to riscv_stack_boundary.
16232         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16233         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16234         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16236 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
16238         PR target/83905
16239         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16240         of struct ix86_frame.
16241         (ix86_expand_epilogue): Likewise.  Add a local variable for
16242         the reg_save_offset field in struct ix86_frame.
16244 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
16246         PR tree-optimization/82604
16247         * tree-loop-distribution.c (enum partition_kind): New enum item
16248         PKIND_PARTIAL_MEMSET.
16249         (partition_builtin_p): Support above new enum item.
16250         (generate_code_for_partition): Ditto.
16251         (compute_access_range): Differentiate cases that equality can be
16252         proven at all loops, the innermost loops or no loops.
16253         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16254         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
16255         (finalize_partitions, distribute_loop): Don't fuse partition of
16256         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16257         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16258         parloop is enabled.
16260 2018-01-23  Martin Liska  <mliska@suse.cz>
16262         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16263         order to ignore the predictor.
16264         (PRED_POLYMORPHIC_CALL): Likewise.
16265         (PRED_RECURSIVE_CALL): Likewise.
16267 2018-01-23  Martin Liska  <mliska@suse.cz>
16269         * tree-profile.c (tree_profiling): Print function header to
16270         aware reader which function we are working on.
16271         * value-prof.c (gimple_find_values_to_profile): Do not print
16272         not interesting value histograms.
16274 2018-01-23  Martin Liska  <mliska@suse.cz>
16276         * profile-count.h (enum profile_quality): Add
16277         profile_uninitialized as the first value. Do not number values
16278         as they are zero based.
16279         (profile_count::verify): Update sanity check.
16280         (profile_probability::verify): Likewise.
16282 2018-01-23  Nathan Sidwell  <nathan@acm.org>
16284         * doc/invoke.texi (ffor-scope): Deprecate.
16286 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16288         PR tree-optimization/83510
16289         * domwalk.c (set_all_edges_as_executable): New function.
16290         (dom_walker::dom_walker): Convert bool param
16291         "skip_unreachable_blocks" to enum reachability.  Move setup of
16292         edge flags to set_all_edges_as_executable and only do it when
16293         reachability is REACHABLE_BLOCKS.
16294         * domwalk.h (enum dom_walker::reachability): New enum.
16295         (dom_walker::dom_walker): Convert bool param
16296         "skip_unreachable_blocks" to enum reachability.
16297         (set_all_edges_as_executable): New decl.
16298         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
16299         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16300         "reachability".
16301         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16302         but converting true to REACHABLE_BLOCKS.
16303         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16304         * tree-vrp.c
16305         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16306         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16307         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16308         REACHABLE_BLOCKS.
16309         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16310         if check_all_array_refs will be called.
16312 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16314         * tree.c (selftest::test_location_wrappers): Add more test
16315         coverage.
16317 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
16319         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16320         (selftest::test_bit_in_range): Likewise.
16322 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16324         PR testsuite/83888
16325         * doc/sourcebuild.texi (vect_float): Say that the selector
16326         only describes the situation when -funsafe-math-optimizations is on.
16327         (vect_float_strict): Document.
16329 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
16331         PR tree-optimization/83965
16332         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16333         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16334         instead of checking only for a reduction.
16335         (vect_recog_widen_sum_pattern): Likewise.
16337 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16339         * predict.c (probably_never_executed): Only use precise profile info.
16340         (compute_function_frequency): Skip after inlining hack since we now
16341         have quality checking.
16343 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
16345         * profile-count.h (profile_probability::very_unlikely,
16346         profile_probability::unlikely, profile_probability::even): Set
16347         precision to guessed.
16349 2018-01-23  Richard Biener  <rguenther@suse.de>
16351         PR tree-optimization/83963
16352         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16353         Properly terminate dominator walk when crossing the exit edge not
16354         when visiting its source block.
16356 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
16358         PR c++/83918
16359         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16360         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16362 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
16364         PR tree-optimization/83957
16365         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
16366         semicolon after for body surrounded by braces.
16368         PR tree-optimization/83081
16369         * profile-count.h (profile_probability::split): New method.
16370         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16371         Use profile_probability::split.
16372         (do_compare_rtx_and_jump): Fix adjustment of probabilities
16373         when splitting a single conditional jump into 2.
16375 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
16377         PR tree-optimization/69452
16378         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16379         decl.
16381 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16383         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16384         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16385         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16387 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16389         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16390         declaration.
16391         * config/rl78/rl78.md (movdi): New define_expand.
16392         * config/rl78/rl78.c (rl78_split_movdi): New function.
16394 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
16396         PR target/83862
16397         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16398         no longer used.
16399         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16400         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16401         128-bit to produce an UNSPEC move to get the double word with the
16402         signbit and then a shift directly to do signbit.
16403         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16404         implementation with a new version that just does either a direct
16405         move or a regular move.  Move memory interface to separate insns.
16406         Move insns so they are next to the expander.
16407         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16408         with signbit move.  Split big and little endian case.
16409         (signbit<mode>2_dm_mem_le): Likewise.
16410         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16411         (signbit<mode>2_dm2): Likewise.
16413 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16415         * config/rl78/rl78.md (anddi3): New define_expand.
16417 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16419         * config/rl78/rl78.md (umindi3): New define_expand.
16421 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16423         * config/rl78/rl78.md (smindi3): New define_expand.
16425 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16427         * config/rl78/rl78.md (smaxdi3): New define_expand.
16429 2018-01-22  Carl Love  <cel@us.ibm.com>
16431         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16432         LVX_V1TI): Add macro expansion.
16433         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16434         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16435         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16436         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16437         Change check to determine if the instruction is a byte reversing
16438         entry.  Fix typo in comment.
16439         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16440         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16441         Add def_builtin calls for new builtins.
16442         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16443         Add define_insn expansion.
16445 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16447         * config/rl78/rl78.md (umaxdi3): New define_expand.
16449 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
16451         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16452         for non-QImode registers.
16454 2018-01-22  Richard Biener  <rguenther@suse.de>
16456         PR tree-optimization/83963
16457         * graphite-scop-detection.c (scop_detection::get_sese): Delay
16458         including the loop exit block.
16459         (scop_detection::merge_sese): Likewise.
16460         (scop_detection::add_scop): Do it here instead.
16462 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16464         * doc/sourcebuild.texi (arm_softfloat): Document.
16466 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
16468         PR gcc/77734
16469         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16470         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16471         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16473 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16474             David Edelsohn  <dje.gcc@gmail.com>
16476         PR target/83946
16477         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16478         Change "crset eq" to "crset 2".
16479         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16480         (*call_indirect_aix<mode>_nospec): Likewise.
16481         (*call_value_indirect_aix<mode>_nospec): Likewise.
16482         (*call_indirect_elfv2<mode>_nospec): Likewise.
16483         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16484         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16485         change assembly output from . to $.
16486         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16487         (indirect_jump<mode>_nospec): Change assembly output from . to $.
16488         (*tablejump<mode>_internal1_nospec): Likewise.
16490 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
16492         PR target/80870
16493         * config/sh/sh_optimize_sett_clrt.cc:
16494         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16496 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
16498         PR tree-optimization/83940
16499         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16500         offset_dt to vect_constant_def rather than vect_unknown_def_type.
16501         (vect_check_load_store_mask): Add a mask_dt_out parameter and
16502         use it to pass back the definition type.
16503         (vect_check_store_rhs): Likewise rhs_dt_out.
16504         (vect_build_gather_load_calls): Add a mask_dt argument and use
16505         it instead of a call to vect_is_simple_use.
16506         (vectorizable_store): Update calls to vect_check_load_store_mask
16507         and vect_check_store_rhs.  Use the dt returned by the latter instead
16508         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
16509         instead of calls to vect_is_simple_use.  Pass the scalar rather
16510         than the vector operand to vect_is_simple_use when handling
16511         second and subsequent copies of an rhs value.
16512         (vectorizable_load): Update calls to vect_check_load_store_mask
16513         and vect_build_gather_load_calls.  Use the cached mask_dt and
16514         gs_info.offset_dt instead of calls to vect_is_simple_use.
16516 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
16518         PR middle-end/83945
16519         * tree-emutls.c: Include gimplify.h.
16520         (lower_emutls_2): New function.
16521         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16522         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16523         it before further processing.
16525         PR target/83930
16526         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16527         UINTVAL (trueop1) instead of INTVAL (op1).
16529 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
16531         PR debug/81570
16532         PR debug/83728
16533         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16534         INCOMING_FRAME_SP_OFFSET if not defined.
16535         (scan_trace): Add ENTRY argument.  If true and
16536         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16537         emit a note to adjust the CFA offset.
16538         (create_cfi_notes): Adjust scan_trace callers.
16539         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16540         INCOMING_FRAME_SP_OFFSET in the CIE.
16541         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16542         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16543         Likewise.
16544         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16545         * doc/tm.texi: Regenerated.
16547 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16549         PR rtl-optimization/83147
16550         * lra-constraints.c (remove_inheritance_pseudos): Use
16551         lra_substitute_pseudo_within_insn.
16553 2018-01-19  Tom de Vries  <tom@codesourcery.com>
16554             Cesar Philippidis  <cesar@codesourcery.com>
16556         PR target/83920
16557         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16559 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
16561         PR target/83790
16562         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16563         spaces for function labels.
16565 2018-01-19  Martin Liska  <mliska@suse.cz>
16567         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16568         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16569         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16570         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16571         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16572         (PRED_CONST_RETURN): Change from 69 to 65.
16573         (PRED_NULL_RETURN): Change from 91 to 71.
16574         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16575         (PRED_LOOP_GUARD): Change from 66 to 73.
16577 2018-01-19  Martin Liska  <mliska@suse.cz>
16579         * predict.c (predict_insn_def): Add new assert.
16580         (struct branch_predictor): Change type to signed integer.
16581         (test_prediction_value_range): Amend test to cover
16582         PROB_UNINITIALIZED.
16583         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16584         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16585         (PRED_LOOP_ITERATIONS_MAX): Likewise.
16586         (PRED_LOOP_IV_COMPARE): Likewise.
16587         * predict.h (PROB_UNINITIALIZED): Define new constant.
16589 2018-01-19  Martin Liska  <mliska@suse.cz>
16591         * predict.c (dump_prediction): Add new format for
16592         analyze_brprob.py script which is enabled with -details
16593         suboption.
16594         * profile-count.h (precise_p): New function.
16596 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16598         PR tree-optimization/83922
16599         * tree-vect-loop.c (vect_verify_full_masking): Return false if
16600         there are no statements that need masking.
16601         (vect_active_double_reduction_p): New function.
16602         (vect_analyze_loop_operations): Use it when handling phis that
16603         are not in the loop header.
16605 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
16607         PR tree-optimization/83914
16608         * tree-vect-loop.c (vectorizable_induction): Don't convert
16609         init_expr or apply the peeling adjustment for inductions
16610         that are nested within the vectorized loop.
16612 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16614         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16615         instead of NEG.
16617 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16619         PR sanitizer/81715
16620         PR testsuite/83882
16621         * function.h (gimplify_parameters): Add gimple_seq * argument.
16622         * function.c: Include gimple.h and options.h.
16623         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16624         for the added local temporaries if needed.
16625         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16626         if there are any parameter cleanups, wrap whole body into a
16627         try/finally with the cleanups.
16629 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
16631         PR target/82964
16632         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16633         Use GET_MODE_CLASS for scalar floating point.
16635 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16637         PR ipa/82256
16638         patch by PaX Team
16639         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16640         Fix call of call_cgraph_insertion_hooks.
16642 2018-01-18  Martin Sebor  <msebor@redhat.com>
16644         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16646 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
16648         PR ipa/83619
16649         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16650         frequencies.
16652 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
16654         PR other/70268
16655         * common.opt: (-ffile-prefix-map): New option.
16656         * opts.c (common_handle_option): Defer it.
16657         * opts-global.c (handle_common_deferred_options): Handle it.
16658         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16659         * file-prefix-map.h: New file.
16660         (remap_debug_filename, add_debug_prefix_map): ...here.
16661         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16662         * final.c (debug_prefix_map, add_debug_prefix_map
16663         remap_debug_filename): Move to...
16664         * file-prefix-map.c: New file.
16665         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16666         generalize, get rid of alloca(), use strrchr() instead of strchr().
16667         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16668         Implement in terms of add_prefix_map().
16669         (remap_macro_filename, remap_debug_filename): Implement in term of
16670         remap_filename().
16671         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16672         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16673         * dbxout.c: Include file-prefix-map.h.
16674         * varasm.c: Likewise.
16675         * vmsdbgout.c: Likewise.
16676         * xcoffout.c: Likewise.
16677         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16678         * doc/cppopts.texi (-fmacro-prefix-map): Document.
16679         * doc/invoke.texi (-ffile-prefix-map): Document.
16680         (-fdebug-prefix-map): Update description.
16682 2018-01-18  Martin Liska  <mliska@suse.cz>
16684         * config/i386/i386.c (indirect_thunk_name): Document that also
16685         lfence is emitted.
16686         (output_indirect_thunk): Document why both instructions
16687         (pause and lfence) are generated.
16689 2018-01-18  Richard Biener  <rguenther@suse.de>
16691         PR tree-optimization/83887
16692         * graphite-scop-detection.c
16693         (scop_detection::get_nearest_dom_with_single_entry): Remove.
16694         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16695         (scop_detection::merge_sese): Re-implement with a flood-fill
16696         algorithm that properly finds a SESE region if it exists.
16698 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
16700         PR c/61240
16701         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16702         pointer_diff optimizations use view_convert instead of convert.
16704 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16706         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16707         Generate different code for -mno-speculate-indirect-jumps.
16708         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16709         (*call_indirect_aix<mode>): Disable for
16710         -mno-speculate-indirect-jumps.
16711         (*call_indirect_aix<mode>_nospec): New define_insn.
16712         (*call_value_indirect_aix<mode>): Disable for
16713         -mno-speculate-indirect-jumps.
16714         (*call_value_indirect_aix<mode>_nospec): New define_insn.
16715         (*sibcall_nonlocal_sysv<mode>): Generate different code for
16716         -mno-speculate-indirect-jumps.
16717         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16719 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
16721         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16722         long double type, set the flags for noting the default long double
16723         type, even if we don't pass or return a long double type.
16725 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
16727         PR ipa/83051
16728         * ipa-inline.c (flatten_function): Do not overwrite final inlining
16729         failure.
16731 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
16733         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16734         support for merge[hl].
16735         (fold_mergehl_helper): New helper function.
16736         (tree-vector-builder.h): New #include for tree_vector_builder usage.
16737         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16738         (altivec_vmrglw_direct): Add xxmrglw insn.
16740 2018-01-17  Andrew Waterman  <andrew@sifive.com>
16742         * config/riscv/riscv.c (riscv_conditional_register_usage): If
16743         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16745 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
16747         PR lto/83121
16748         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16749         call the lto_location_cache before reading the
16750         DECL_SOURCE_LOCATION of the types.
16752 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
16753             Richard Sandiford  <richard.sandiford@linaro.org>
16755         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16756         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16757         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16758         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16759         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16760         Add declaration.
16761         * config/aarch64/constraints.md (aarch64_movti_operand):
16762         Limit immediates.
16763         * config/aarch64/predicates.md (Uti): Add new constraint.
16765 2018-01-17 Carl Love  <cel@us.ibm.com>
16767         * config/rs6000/vsx.md (define_expand xl_len_r,
16768         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16769         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16770         lxvll.
16771         (define_expand, define_insn): Move the shift left from  the
16772         define_insn to the define_expand for lxvl and stxvl instructions.
16773         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16774         and XL_LEN_R definitions to PURE.
16776 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
16778         * config/i386/i386.c (indirect_thunk_name): Declare regno
16779         as unsigned int.  Compare regno with INVALID_REGNUM.
16780         (output_indirect_thunk): Ditto.
16781         (output_indirect_thunk_function): Ditto.
16782         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
16783         in the call to output_indirect_thunk_function.
16785 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
16787         PR middle-end/83884
16788         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16789         rather than the size of inner_type to determine the stack slot size
16790         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16792 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
16794         PR target/83546
16795         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16796         to PTA_SILVERMONT.
16798 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
16800         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16801         endian Linux systems to optionally enable multilibs for selecting
16802         the long double type if the user configured an explicit type.
16803         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16804         have no long double multilibs if not defined.
16805         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16806         warn if the user used -mabi={ieee,ibm}longdouble and we built
16807         multilibs for long double.
16808         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16809         appropriate multilib option.
16810         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16811         multilib options.
16812         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16813         for building long double multilibs.
16814         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16816 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
16818         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16819         copies.
16821         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16822         64 bits.
16823         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16824         128 bits.
16826         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16827         variables.
16829         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16830         return value.
16832 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16834         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16835         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16837 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16839         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16840         different rtl trees depending on TARGET_64BIT.
16841         (rs6000_gen_lvx): Likewise.
16843 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
16845         * config/visium/visium.md (nop): Tweak comment.
16846         (hazard_nop): Likewise.
16848 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16850         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16851         -mspeculate-indirect-jumps.
16852         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16853         for -mno-speculate-indirect-jumps.
16854         (*call_indirect_elfv2<mode>_nospec): New define_insn.
16855         (*call_value_indirect_elfv2<mode>): Disable for
16856         -mno-speculate-indirect-jumps.
16857         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16858         (indirect_jump): Emit different RTL for
16859         -mno-speculate-indirect-jumps.
16860         (*indirect_jump<mode>): Disable for
16861         -mno-speculate-indirect-jumps.
16862         (*indirect_jump<mode>_nospec): New define_insn.
16863         (tablejump): Emit different RTL for
16864         -mno-speculate-indirect-jumps.
16865         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16866         (tablejumpsi_nospec): New define_expand.
16867         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16868         (tablejumpdi_nospec): New define_expand.
16869         (*tablejump<mode>_internal1): Disable for
16870         -mno-speculate-indirect-jumps.
16871         (*tablejump<mode>_internal1_nospec): New define_insn.
16872         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16873         option.
16875 2018-01-16  Artyom Skrobov tyomitch@gmail.com
16877         * caller-save.c (insert_save): Drop unnecessary parameter.  All
16878         callers updated.
16880 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16881             Richard Biener  <rguenth@suse.de>
16883         PR libgomp/83590
16884         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16885         return early, inline manually is_gimple_sizepos.  Make sure if we
16886         call gimplify_expr we don't end up with a gimple constant.
16887         * tree.c (variably_modified_type_p): Don't return true for
16888         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
16889         * gimplify.h (is_gimple_sizepos): Remove.
16891 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16893         PR tree-optimization/83857
16894         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16895         vectorizable_live_operation for pure SLP statements.
16896         (vectorizable_live_operation): Handle PHIs.
16898 2018-01-16  Richard Biener  <rguenther@suse.de>
16900         PR tree-optimization/83867
16901         * tree-vect-stmts.c (vect_transform_stmt): Precompute
16902         nested_in_vect_loop_p since the scalar stmt may get invalidated.
16904 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16906         PR c/83844
16907         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16908         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16909         If off is not INTEGER_CST, issue a may not be aligned warning
16910         rather than isn't aligned.  Use isn%'t rather than isn't.
16911         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16912         into MULT_EXPR.
16913         <case MULT_EXPR>: Improve the case when bottom and one of the
16914         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16915         operand, in that case check if the other operand is multiple of
16916         bottom divided by the INTEGER_CST operand.
16918 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16920         PR target/83858
16921         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16922         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16923         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16924         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16925         * config/pa/pa.c (pa_function_arg_advance): Likewise.
16926         (pa_function_arg, pa_arg_partial_bytes): Likewise.
16927         (pa_function_arg_size): New function.
16929 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16931         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16932         in a separate statement.
16934 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
16936         PR tree-optimization/83847
16937         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16938         group gathers and scatters.
16940 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
16942         PR rtl-optimization/86620
16943         * params.def (max-sched-ready-insns): Bump minimum value to 1.
16945         PR rtl-optimization/83213
16946         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16947         to last if both are JUMP_INSNs.
16949         PR tree-optimization/83843
16950         * gimple-ssa-store-merging.c
16951         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16952         store_immediate_info for bswap/nop orig_stores.
16954 2018-01-15  Andrew Waterman  <andrew@sifive.com>
16956         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16957         !TARGET_MUL.
16958         <UDIV>: Increase cost if !TARGET_DIV.
16960 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
16962         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16963         (define_attr "cr_logical_3op"): New.
16964         (cceq_ior_compare): Adjust.
16965         (cceq_ior_compare_complement): Adjust.
16966         (*cceq_rev_compare): Adjust.
16967         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16968         (is_cracked_insn): Adjust.
16969         (insn_must_be_first_in_group): Adjust.
16970         * config/rs6000/40x.md: Adjust.
16971         * config/rs6000/440.md: Adjust.
16972         * config/rs6000/476.md: Adjust.
16973         * config/rs6000/601.md: Adjust.
16974         * config/rs6000/603.md: Adjust.
16975         * config/rs6000/6xx.md: Adjust.
16976         * config/rs6000/7450.md: Adjust.
16977         * config/rs6000/7xx.md: Adjust.
16978         * config/rs6000/8540.md: Adjust.
16979         * config/rs6000/cell.md: Adjust.
16980         * config/rs6000/e300c2c3.md: Adjust.
16981         * config/rs6000/e500mc.md: Adjust.
16982         * config/rs6000/e500mc64.md: Adjust.
16983         * config/rs6000/e5500.md: Adjust.
16984         * config/rs6000/e6500.md: Adjust.
16985         * config/rs6000/mpc.md: Adjust.
16986         * config/rs6000/power4.md: Adjust.
16987         * config/rs6000/power5.md: Adjust.
16988         * config/rs6000/power6.md: Adjust.
16989         * config/rs6000/power7.md: Adjust.
16990         * config/rs6000/power8.md: Adjust.
16991         * config/rs6000/power9.md: Adjust.
16992         * config/rs6000/rs64.md: Adjust.
16993         * config/rs6000/titan.md: Adjust.
16995 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
16997         * config/i386/predicates.md (indirect_branch_operand): Rewrite
16998         ix86_indirect_branch_register logic.
17000 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17002         * config/i386/constraints.md (Bs): Update
17003         ix86_indirect_branch_register check.  Don't check
17004         ix86_indirect_branch_register with GOT_memory_operand.
17005         (Bw): Likewise.
17006         * config/i386/predicates.md (GOT_memory_operand): Don't check
17007         ix86_indirect_branch_register here.
17008         (GOT32_symbol_operand): Likewise.
17010 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17012         * config/i386/predicates.md (constant_call_address_operand):
17013         Rewrite ix86_indirect_branch_register logic.
17014         (sibcall_insn_operand): Likewise.
17016 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17018         * config/i386/constraints.md (Bs): Replace
17019         ix86_indirect_branch_thunk_register with
17020         ix86_indirect_branch_register.
17021         (Bw): Likewise.
17022         * config/i386/i386.md (indirect_jump): Likewise.
17023         (tablejump): Likewise.
17024         (*sibcall_memory): Likewise.
17025         (*sibcall_value_memory): Likewise.
17026         Peepholes of indirect call and jump via memory: Likewise.
17027         * config/i386/i386.opt: Likewise.
17028         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17029         (GOT_memory_operand): Likewise.
17030         (call_insn_operand): Likewise.
17031         (sibcall_insn_operand): Likewise.
17032         (GOT32_symbol_operand): Likewise.
17034 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17036         PR middle-end/83837
17037         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17038         type rather than type addr's type points to.
17039         (expand_omp_atomic_mutex): Likewise.
17040         (expand_omp_atomic): Likewise.
17042 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
17044         PR target/83839
17045         * config/i386/i386.c (output_indirect_thunk_function): Use
17046         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17047         for  __x86_return_thunk.
17049 2018-01-15  Richard Biener  <rguenther@suse.de>
17051         PR middle-end/83850
17052         * expmed.c (extract_bit_field_1): Fix typo.
17054 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17056         PR target/83687
17057         * config/arm/iterators.md (VF): New mode iterator.
17058         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17059         Remove integer-related logic from pattern.
17060         (neon_vabd<mode>_3): Likewise.
17062 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
17064         PR middle-end/82694
17065         * common.opt (fstrict-overflow): No longer an alias.
17066         (fwrapv-pointer): New option.
17067         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17068         also for pointer types based on flag_wrapv_pointer.
17069         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17070         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17071         opts->x_flag_wrapv got set.
17072         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17073         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17074         POINTER_TYPE_OVERFLOW_UNDEFINED.
17075         * match.pd: Likewise in address comparison pattern.
17076         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17078 2018-01-15  Richard Biener  <rguenther@suse.de>
17080         PR lto/83804
17081         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17082         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
17083         Reset type names to their identifier if their TYPE_DECL doesn't
17084         have linkage (and thus is used for ODR and devirt).
17085         (save_debug_info_for_decl): Remove.
17086         (save_debug_info_for_type): Likewise.
17087         (add_tree_to_fld_list): Adjust.
17088         * tree-pretty-print.c (dump_generic_node): Make dumping of
17089         type names more robust.
17091 2018-01-15  Richard Biener  <rguenther@suse.de>
17093         * BASE-VER: Bump to 8.0.1.
17095 2018-01-14  Martin Sebor  <msebor@redhat.com>
17097         PR other/83508
17098         * builtins.c (check_access): Avoid warning when the no-warning bit
17099         is set.
17101 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
17103         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17104         * ira-color (allocno_hard_regs_compare): Likewise.
17106 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
17108         PR target/83013
17109         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17110         Use .pushsection/.popsection.
17112 2018-01-14  Martin Sebor  <msebor@redhat.com>
17114         PR c++/81327
17115         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17117 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
17119         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17120         entry from extra_headers.
17121         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17122         extra_headers, make the list bitwise identical to the i?86-*-* one.
17124 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17126         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17127         -mcmodel=large with -mindirect-branch=thunk,
17128         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17129         -mfunction-return=thunk-extern.
17130         * doc/invoke.texi: Document -mcmodel=large is incompatible with
17131         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17132         -mfunction-return=thunk and -mfunction-return=thunk-extern.
17134 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17136         * config/i386/i386.c (print_reg): Print the name of the full
17137         integer register without '%'.
17138         (ix86_print_operand): Handle 'V'.
17139         * doc/extend.texi: Document 'V' modifier.
17141 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17143         * config/i386/constraints.md (Bs): Disallow memory operand for
17144         -mindirect-branch-register.
17145         (Bw): Likewise.
17146         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17147         (GOT_memory_operand): Likewise.
17148         (call_insn_operand): Likewise.
17149         (sibcall_insn_operand): Likewise.
17150         (GOT32_symbol_operand): Likewise.
17151         * config/i386/i386.md (indirect_jump): Call convert_memory_address
17152         for -mindirect-branch-register.
17153         (tablejump): Likewise.
17154         (*sibcall_memory): Likewise.
17155         (*sibcall_value_memory): Likewise.
17156         Disallow peepholes of indirect call and jump via memory for
17157         -mindirect-branch-register.
17158         (*call_pop): Replace m with Bw.
17159         (*call_value_pop): Likewise.
17160         (*sibcall_pop_memory): Replace m with Bs.
17161         * config/i386/i386.opt (mindirect-branch-register): New option.
17162         * doc/invoke.texi: Document -mindirect-branch-register option.
17164 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17166         * config/i386/i386-protos.h (ix86_output_function_return): New.
17167         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17168         set function_return_type.
17169         (indirect_thunk_name): Add ret_p to indicate thunk for function
17170         return.
17171         (output_indirect_thunk_function): Pass false to
17172         indirect_thunk_name.
17173         (ix86_output_indirect_branch_via_reg): Likewise.
17174         (ix86_output_indirect_branch_via_push): Likewise.
17175         (output_indirect_thunk_function): Create alias for function
17176         return thunk if regno < 0.
17177         (ix86_output_function_return): New function.
17178         (ix86_handle_fndecl_attribute): Handle function_return.
17179         (ix86_attribute_table): Add function_return.
17180         * config/i386/i386.h (machine_function): Add
17181         function_return_type.
17182         * config/i386/i386.md (simple_return_internal): Use
17183         ix86_output_function_return.
17184         (simple_return_internal_long): Likewise.
17185         * config/i386/i386.opt (mfunction-return=): New option.
17186         (indirect_branch): Mention -mfunction-return=.
17187         * doc/extend.texi: Document function_return function attribute.
17188         * doc/invoke.texi: Document -mfunction-return= option.
17190 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
17192         * config/i386/i386-opts.h (indirect_branch): New.
17193         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17194         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17195         with local indirect jump when converting indirect call and jump.
17196         (ix86_set_indirect_branch_type): New.
17197         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17198         (indirectlabelno): New.
17199         (indirect_thunk_needed): Likewise.
17200         (indirect_thunk_bnd_needed): Likewise.
17201         (indirect_thunks_used): Likewise.
17202         (indirect_thunks_bnd_used): Likewise.
17203         (INDIRECT_LABEL): Likewise.
17204         (indirect_thunk_name): Likewise.
17205         (output_indirect_thunk): Likewise.
17206         (output_indirect_thunk_function): Likewise.
17207         (ix86_output_indirect_branch_via_reg): Likewise.
17208         (ix86_output_indirect_branch_via_push): Likewise.
17209         (ix86_output_indirect_branch): Likewise.
17210         (ix86_output_indirect_jmp): Likewise.
17211         (ix86_code_end): Call output_indirect_thunk_function if needed.
17212         (ix86_output_call_insn): Call ix86_output_indirect_branch if
17213         needed.
17214         (ix86_handle_fndecl_attribute): Handle indirect_branch.
17215         (ix86_attribute_table): Add indirect_branch.
17216         * config/i386/i386.h (machine_function): Add indirect_branch_type
17217         and has_local_indirect_jump.
17218         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17219         to true.
17220         (tablejump): Likewise.
17221         (*indirect_jump): Use ix86_output_indirect_jmp.
17222         (*tablejump_1): Likewise.
17223         (simple_return_indirect_internal): Likewise.
17224         * config/i386/i386.opt (mindirect-branch=): New option.
17225         (indirect_branch): New.
17226         (keep): Likewise.
17227         (thunk): Likewise.
17228         (thunk-inline): Likewise.
17229         (thunk-extern): Likewise.
17230         * doc/extend.texi: Document indirect_branch function attribute.
17231         * doc/invoke.texi: Document -mindirect-branch= option.
17233 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
17235         PR ipa/83051
17236         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17238 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
17240         * ipa-inline.c (want_inline_small_function_p): Return false if
17241         inlining has already failed with CIF_FINAL_ERROR.
17242         (update_caller_keys): Call want_inline_small_function_p before
17243         can_inline_edge_p.
17244         (update_callee_keys): Likewise.
17246 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17248         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17249         New function.
17250         (rs6000_quadword_masked_address_p): Likewise.
17251         (quad_aligned_load_p): Likewise.
17252         (quad_aligned_store_p): Likewise.
17253         (const_load_sequence_p): Add comment to describe the outer-most loop.
17254         (mimic_memory_attributes_and_flags): New function.
17255         (rs6000_gen_stvx): Likewise.
17256         (replace_swapped_aligned_store): Likewise.
17257         (rs6000_gen_lvx): Likewise.
17258         (replace_swapped_aligned_load): Likewise.
17259         (replace_swapped_load_constant): Capitalize argument name in
17260         comment describing this function.
17261         (rs6000_analyze_swaps): Add a third pass to search for vector loads
17262         and stores that access quad-word aligned addresses and replace
17263         with stvx or lvx instructions when appropriate.
17264         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17265         New function prototype.
17266         (rs6000_quadword_masked_address_p): Likewise.
17267         (rs6000_gen_lvx): Likewise.
17268         (rs6000_gen_stvx): Likewise.
17269         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17270         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17271         when memory address is aligned.
17272         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17273         this split to select lvx instruction when memory address is aligned.
17274         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17275         instruction when memory address is aligned.
17276         (*vsx_le_perm_load_v16qi): Likewise.
17277         (four unnamed splitters): Modify to select the stvx instruction
17278         when memory is aligned.
17280 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
17282         * predict.c (determine_unlikely_bbs): Handle correctly BBs
17283         which appears in the queue multiple times.
17285 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17286             Alan Hayward  <alan.hayward@arm.com>
17287             David Sherwood  <david.sherwood@arm.com>
17289         * tree-vectorizer.h (vec_lower_bound): New structure.
17290         (_loop_vec_info): Add check_nonzero and lower_bounds.
17291         (LOOP_VINFO_CHECK_NONZERO): New macro.
17292         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17293         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17294         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17295         fields.  Make seg_len the distance travelled, not including the
17296         access size.
17297         (dr_direction_indicator): Declare.
17298         (dr_zero_step_indicator): Likewise.
17299         (dr_known_forward_stride_p): Likewise.
17300         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17301         tree-ssanames.h.
17302         (runtime_alias_check_p): Allow runtime alias checks with
17303         variable strides.
17304         (operator ==): Compare access_size and align.
17305         (prune_runtime_alias_test_list): Rework for new distinction between
17306         the access_size and seg_len.
17307         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
17308         segment lengths.
17309         (get_segment_min_max): New function.
17310         (create_intersect_range_checks): Use it.
17311         (dr_step_indicator): New function.
17312         (dr_direction_indicator): Likewise.
17313         (dr_zero_step_indicator): Likewise.
17314         (dr_known_forward_stride_p): Likewise.
17315         * tree-loop-distribution.c (data_ref_segment_size): Return
17316         DR_STEP * (niters - 1).
17317         (compute_alias_check_pairs): Update call to the dr_with_seg_len
17318         constructor.
17319         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17320         (vect_preserves_scalar_order_p): New function, split out from...
17321         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
17322         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17323         (vect_vfa_access_size): New function.
17324         (vect_vfa_align): Likewise.
17325         (vect_compile_time_alias): Take access_size_a and access_b arguments.
17326         (dump_lower_bound): New function.
17327         (vect_check_lower_bound): Likewise.
17328         (vect_small_gap_p): Likewise.
17329         (vectorizable_with_step_bound_p): Likewise.
17330         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17331         depencies if the vectorization factor is 1.  Convert the checks
17332         for nonzero steps into checks on the bounds of DR_STEP.  Try using
17333         a bunds check for variable steps if the minimum required step is
17334         relatively small. Update calls to the dr_with_seg_len
17335         constructor and to vect_compile_time_alias.
17336         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17337         function.
17338         (vect_loop_versioning): Call it.
17339         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17340         when retrying.
17341         (vect_estimate_min_profitable_iters): Account for any bounds checks.
17343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17344             Alan Hayward  <alan.hayward@arm.com>
17345             David Sherwood  <david.sherwood@arm.com>
17347         * doc/sourcebuild.texi (vect_scatter_store): Document.
17348         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17349         optabs.
17350         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17351         Document.
17352         * genopinit.c (main): Add supports_vec_scatter_store and
17353         supports_vec_scatter_store_cached to target_optabs.
17354         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17355         IFN_MASK_SCATTER_STORE.
17356         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17357         functions.
17358         * internal-fn.h (internal_store_fn_p): Declare.
17359         (internal_fn_stored_value_index): Likewise.
17360         * internal-fn.c (scatter_store_direct): New macro.
17361         (expand_scatter_store_optab_fn): New function.
17362         (direct_scatter_store_optab_supported_p): New macro.
17363         (internal_store_fn_p): New function.
17364         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17365         IFN_MASK_SCATTER_STORE.
17366         (internal_fn_mask_index): Likewise.
17367         (internal_fn_stored_value_index): New function.
17368         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17369         for scatter stores.
17370         * optabs-query.h (supports_vec_scatter_store_p): Declare.
17371         * optabs-query.c (supports_vec_scatter_store_p): New function.
17372         * tree-vectorizer.h (vect_get_store_rhs): Declare.
17373         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17374         true for scatter stores.
17375         (vect_gather_scatter_fn_p): Handle scatter stores too.
17376         (vect_check_gather_scatter): Consider using scatter stores if
17377         supports_vec_scatter_store_p.
17378         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17379         scatter stores too.
17380         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17381         internal_fn_stored_value_index.
17382         (check_load_store_masking): Handle scatter stores too.
17383         (vect_get_store_rhs): Make public.
17384         (vectorizable_call): Use internal_store_fn_p.
17385         (vectorizable_store): Handle scatter store internal functions.
17386         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17387         when deciding whether the end of the group has been reached.
17388         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17389         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17390         (mask_scatter_store<mode>): New insns.
17392 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17393             Alan Hayward  <alan.hayward@arm.com>
17394             David Sherwood  <david.sherwood@arm.com>
17396         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17397         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17398         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17399         function.
17400         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17401         Use vect_truncate_gather_scatter_offset if we can't treat the
17402         operation as a normal gather load or scatter store.
17403         (get_group_load_store_type): Take the gather_scatter_info
17404         as argument.  Try using a gather load or scatter store for
17405         single-element groups.
17406         (get_load_store_type): Update calls to get_group_load_store_type
17407         and vect_use_strided_gather_scatters_p.
17409 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17410             Alan Hayward  <alan.hayward@arm.com>
17411             David Sherwood  <david.sherwood@arm.com>
17413         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17414         optional tree argument.
17415         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17416         null target hooks.
17417         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17418         but continue to use the current value as a fallback.
17419         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17420         to compare the updates.
17421         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17422         (get_load_store_type): Use it when handling a strided access.
17423         (vect_get_strided_load_store_ops): New function.
17424         (vect_get_data_ptr_increment): Likewise.
17425         (vectorizable_load): Handle strided gather loads.  Always pass
17426         a step to vect_create_data_ref_ptr and bump_vector_ptr.
17428 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17429             Alan Hayward  <alan.hayward@arm.com>
17430             David Sherwood  <david.sherwood@arm.com>
17432         * doc/md.texi (gather_load@var{m}): Document.
17433         (mask_gather_load@var{m}): Likewise.
17434         * genopinit.c (main): Add supports_vec_gather_load and
17435         supports_vec_gather_load_cached to target_optabs.
17436         * optabs-tree.c (init_tree_optimization_optabs): Use
17437         ggc_cleared_alloc to allocate target_optabs.
17438         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17439         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17440         functions.
17441         * internal-fn.h (internal_load_fn_p): Declare.
17442         (internal_gather_scatter_fn_p): Likewise.
17443         (internal_fn_mask_index): Likewise.
17444         (internal_gather_scatter_fn_supported_p): Likewise.
17445         * internal-fn.c (gather_load_direct): New macro.
17446         (expand_gather_load_optab_fn): New function.
17447         (direct_gather_load_optab_supported_p): New macro.
17448         (direct_internal_fn_optab): New function.
17449         (internal_load_fn_p): Likewise.
17450         (internal_gather_scatter_fn_p): Likewise.
17451         (internal_fn_mask_index): Likewise.
17452         (internal_gather_scatter_fn_supported_p): Likewise.
17453         * optabs-query.c (supports_at_least_one_mode_p): New function.
17454         (supports_vec_gather_load_p): Likewise.
17455         * optabs-query.h (supports_vec_gather_load_p): Declare.
17456         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17457         and memory_type field.
17458         (NUM_PATTERNS): Bump to 15.
17459         * tree-vect-data-refs.c: Include internal-fn.h.
17460         (vect_gather_scatter_fn_p): New function.
17461         (vect_describe_gather_scatter_call): Likewise.
17462         (vect_check_gather_scatter): Try using internal functions for
17463         gather loads.  Recognize existing calls to a gather load function.
17464         (vect_analyze_data_refs): Consider using gather loads if
17465         supports_vec_gather_load_p.
17466         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17467         (vect_get_gather_scatter_offset_type): Likewise.
17468         (vect_convert_mask_for_vectype): Likewise.
17469         (vect_add_conversion_to_patterm): Likewise.
17470         (vect_try_gather_scatter_pattern): Likewise.
17471         (vect_recog_gather_scatter_pattern): New pattern recognizer.
17472         (vect_vect_recog_func_ptrs): Add it.
17473         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17474         internal_fn_mask_index and internal_gather_scatter_fn_p.
17475         (check_load_store_masking): Take the gather_scatter_info as an
17476         argument and handle gather loads.
17477         (vect_get_gather_scatter_ops): New function.
17478         (vectorizable_call): Check internal_load_fn_p.
17479         (vectorizable_load): Likewise.  Handle gather load internal
17480         functions.
17481         (vectorizable_store): Update call to check_load_store_masking.
17482         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17483         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17484         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17485         (aarch64_gather_scale_operand_d): New predicates.
17486         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17487         (mask_gather_load<mode>): New insns.
17489 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17490             Alan Hayward  <alan.hayward@arm.com>
17491             David Sherwood  <david.sherwood@arm.com>
17493         * optabs.def (fold_left_plus_optab): New optab.
17494         * doc/md.texi (fold_left_plus_@var{m}): Document.
17495         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17496         * internal-fn.c (fold_left_direct): Define.
17497         (expand_fold_left_optab_fn): Likewise.
17498         (direct_fold_left_optab_supported_p): Likewise.
17499         * fold-const-call.c (fold_const_fold_left): New function.
17500         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17501         * tree-parloops.c (valid_reduction_p): New function.
17502         (gather_scalar_reductions): Use it.
17503         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17504         (vect_finish_replace_stmt): Declare.
17505         * tree-vect-loop.c (fold_left_reduction_fn): New function.
17506         (needs_fold_left_reduction_p): New function, split out from...
17507         (vect_is_simple_reduction): ...here.  Accept reductions that
17508         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17509         (vect_force_simple_reduction): Also store the reduction type in
17510         the assignment's STMT_VINFO_REDUC_TYPE.
17511         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17512         (merge_with_identity): New function.
17513         (vect_expand_fold_left): Likewise.
17514         (vectorize_fold_left_reduction): Likewise.
17515         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
17516         scalar phi in place for it.  Check for target support and reject
17517         cases that would reassociate the operation.  Defer the transform
17518         phase to vectorize_fold_left_reduction.
17519         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17520         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17521         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17525         * tree-if-conv.c (predicate_mem_writes): Remove redundant
17526         call to ifc_temp_var.
17528 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17529             Alan Hayward  <alan.hayward@arm.com>
17530             David Sherwood  <david.sherwood@arm.com>
17532         * target.def (legitimize_address_displacement): Take the original
17533         offset as a poly_int.
17534         * targhooks.h (default_legitimize_address_displacement): Update
17535         accordingly.
17536         * targhooks.c (default_legitimize_address_displacement): Likewise.
17537         * doc/tm.texi: Regenerate.
17538         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17539         as an argument, moving assert of ad->disp == ad->disp_term to...
17540         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
17541         Try calling targetm.legitimize_address_displacement before expanding
17542         the address rather than afterwards, and adjust for the new interface.
17543         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17544         Match the new hook interface.  Handle SVE addresses.
17545         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17546         new hook interface.
17548 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17550         * Makefile.in (OBJS): Add early-remat.o.
17551         * target.def (select_early_remat_modes): New hook.
17552         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17553         * doc/tm.texi: Regenerate.
17554         * targhooks.h (default_select_early_remat_modes): Declare.
17555         * targhooks.c (default_select_early_remat_modes): New function.
17556         * timevar.def (TV_EARLY_REMAT): New timevar.
17557         * passes.def (pass_early_remat): New pass.
17558         * tree-pass.h (make_pass_early_remat): Declare.
17559         * early-remat.c: New file.
17560         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17561         function.
17562         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17564 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17565             Alan Hayward  <alan.hayward@arm.com>
17566             David Sherwood  <david.sherwood@arm.com>
17568         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17569         vfm1 with a bound_epilog parameter.
17570         (vect_do_peeling): Update calls accordingly, and move the prologue
17571         call earlier in the function.  Treat the base bound_epilog as 0 for
17572         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
17573         this base when peeling for gaps.
17574         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17575         with fully-masked loops.
17576         (vect_estimate_min_profitable_iters): Handle the single peeled
17577         iteration in that case.
17579 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17580             Alan Hayward  <alan.hayward@arm.com>
17581             David Sherwood  <david.sherwood@arm.com>
17583         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17584         single-element interleaving even if the size is not a power of 2.
17585         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17586         accesses for single-element interleaving if the group size is
17587         not a power of 2.
17589 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17590             Alan Hayward  <alan.hayward@arm.com>
17591             David Sherwood  <david.sherwood@arm.com>
17593         * doc/md.texi (fold_extract_last_@var{m}): Document.
17594         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17595         * optabs.def (fold_extract_last_optab): New optab.
17596         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17597         * internal-fn.c (fold_extract_direct): New macro.
17598         (expand_fold_extract_optab_fn): Likewise.
17599         (direct_fold_extract_optab_supported_p): Likewise.
17600         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17601         * tree-vect-loop.c (vect_model_reduction_cost): Handle
17602         EXTRACT_LAST_REDUCTION.
17603         (get_initial_def_for_reduction): Do not create an initial vector
17604         for EXTRACT_LAST_REDUCTION reductions.
17605         (vectorizable_reduction): Leave the scalar phi in place for
17606         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
17607         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
17608         epilogue code for EXTRACT_LAST_REDUCTION and defer the
17609         transform phase to vectorizable_condition.
17610         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17611         split out from...
17612         (vect_finish_stmt_generation): ...here.
17613         (vect_finish_replace_stmt): New function.
17614         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17615         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17616         pattern.
17617         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17619 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17620             Alan Hayward  <alan.hayward@arm.com>
17621             David Sherwood  <david.sherwood@arm.com>
17623         * doc/md.texi (extract_last_@var{m}): Document.
17624         * optabs.def (extract_last_optab): New optab.
17625         * internal-fn.def (EXTRACT_LAST): New internal function.
17626         * internal-fn.c (cond_unary_direct): New macro.
17627         (expand_cond_unary_optab_fn): Likewise.
17628         (direct_cond_unary_optab_supported_p): Likewise.
17629         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17630         loops using EXTRACT_LAST.
17631         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17632         (extract_last_<mode>): ...this optab.
17633         (vec_extract<mode><Vel>): Update accordingly.
17635 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17636             Alan Hayward  <alan.hayward@arm.com>
17637             David Sherwood  <david.sherwood@arm.com>
17639         * target.def (empty_mask_is_expensive): New hook.
17640         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17641         * doc/tm.texi: Regenerate.
17642         * targhooks.h (default_empty_mask_is_expensive): Declare.
17643         * targhooks.c (default_empty_mask_is_expensive): New function.
17644         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17645         if the target says that empty masks are expensive.
17646         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17647         New function.
17648         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17650 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17651             Alan Hayward  <alan.hayward@arm.com>
17652             David Sherwood  <david.sherwood@arm.com>
17654         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17655         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17656         (vect_use_loop_mask_for_alignment_p): New function.
17657         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17658         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17659         niters_skip argument.  Make sure that the first niters_skip elements
17660         of the first iteration are inactive.
17661         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17662         Update call to vect_set_loop_masks_directly.
17663         (get_misalign_in_elems): New function, split out from...
17664         (vect_gen_prolog_loop_niters): ...here.
17665         (vect_update_init_of_dr): Take a code argument that specifies whether
17666         the adjustment should be added or subtracted.
17667         (vect_update_init_of_drs): Likewise.
17668         (vect_prepare_for_masked_peels): New function.
17669         (vect_do_peeling): Skip prologue peeling if we're using a mask
17670         instead.  Update call to vect_update_inits_of_drs.
17671         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17672         mask_skip_niters.
17673         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17674         alignment.  Do not include the number of peeled iterations in
17675         the minimum threshold in that case.
17676         (vectorizable_induction): Adjust the start value down by
17677         LOOP_VINFO_MASK_SKIP_NITERS iterations.
17678         (vect_transform_loop): Call vect_prepare_for_masked_peels.
17679         Take the number of skipped iterations into account when calculating
17680         the loop bounds.
17681         * tree-vect-stmts.c (vect_gen_while_not): New function.
17683 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17684             Alan Hayward  <alan.hayward@arm.com>
17685             David Sherwood  <david.sherwood@arm.com>
17687         * doc/sourcebuild.texi (vect_fully_masked): Document.
17688         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17689         default value to 0.
17690         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17691         split out from...
17692         (vect_analyze_loop_2): ...here. Don't check the vectorization
17693         factor against the number of loop iterations if the loop is
17694         fully-masked.
17696 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17697             Alan Hayward  <alan.hayward@arm.com>
17698             David Sherwood  <david.sherwood@arm.com>
17700         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17701         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17702         (dump_groups): Update accordingly.
17703         (iv_use::mem_type): New member variable.
17704         (address_p): New function.
17705         (record_use): Add a mem_type argument and initialize the new
17706         mem_type field.
17707         (record_group_use): Add a mem_type argument.  Use address_p.
17708         Remove obsolete null checks of base_object.  Update call to record_use.
17709         (find_interesting_uses_op): Update call to record_group_use.
17710         (find_interesting_uses_cond): Likewise.
17711         (find_interesting_uses_address): Likewise.
17712         (get_mem_type_for_internal_fn): New function.
17713         (find_address_like_use): Likewise.
17714         (find_interesting_uses_stmt): Try find_address_like_use before
17715         calling find_interesting_uses_op.
17716         (addr_offset_valid_p): Use the iv mem_type field as the type
17717         of the addressed memory.
17718         (add_autoinc_candidates): Likewise.
17719         (get_address_cost): Likewise.
17720         (split_small_address_groups_p): Use address_p.
17721         (split_address_groups): Likewise.
17722         (add_iv_candidate_for_use): Likewise.
17723         (autoinc_possible_for_pair): Likewise.
17724         (rewrite_groups): Likewise.
17725         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17726         (determine_group_iv_cost): Update after split of USE_ADDRESS.
17727         (get_alias_ptr_type_for_ptr_address): New function.
17728         (rewrite_use_address): Rewrite address uses in calls that were
17729         identified by find_address_like_use.
17731 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17732             Alan Hayward  <alan.hayward@arm.com>
17733             David Sherwood  <david.sherwood@arm.com>
17735         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17736         TARGET_MEM_REFs.
17737         * gimple-expr.h (is_gimple_addressable: Likewise.
17738         * gimple-expr.c (is_gimple_address): Likewise.
17739         * internal-fn.c (expand_call_mem_ref): New function.
17740         (expand_mask_load_optab_fn): Use it.
17741         (expand_mask_store_optab_fn): Likewise.
17743 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17744             Alan Hayward  <alan.hayward@arm.com>
17745             David Sherwood  <david.sherwood@arm.com>
17747         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17748         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17749         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17750         (cond_umax@var{mode}): Document.
17751         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17752         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17753         (cond_umin_optab, cond_umax_optab): New optabs.
17754         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17755         (COND_IOR, COND_XOR): New internal functions.
17756         * internal-fn.h (get_conditional_internal_fn): Declare.
17757         * internal-fn.c (cond_binary_direct): New macro.
17758         (expand_cond_binary_optab_fn): Likewise.
17759         (direct_cond_binary_optab_supported_p): Likewise.
17760         (get_conditional_internal_fn): New function.
17761         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17762         Cope with reduction statements that are vectorized as calls rather
17763         than assignments.
17764         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17765         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17766         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17767         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17768         (UNSPEC_COND_EOR): New unspecs.
17769         (optab): Add mappings for them.
17770         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17771         (sve_int_op, sve_fp_op): New int attributes.
17773 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17774             Alan Hayward  <alan.hayward@arm.com>
17775             David Sherwood  <david.sherwood@arm.com>
17777         * optabs.def (while_ult_optab): New optab.
17778         * doc/md.texi (while_ult@var{m}@var{n}): Document.
17779         * internal-fn.def (WHILE_ULT): New internal function.
17780         * internal-fn.h (direct_internal_fn_supported_p): New override
17781         that takes two types as argument.
17782         * internal-fn.c (while_direct): New macro.
17783         (expand_while_optab_fn): New function.
17784         (convert_optab_supported_p): Likewise.
17785         (direct_while_optab_supported_p): New macro.
17786         * wide-int.h (wi::udiv_ceil): New function.
17787         * tree-vectorizer.h (rgroup_masks): New structure.
17788         (vec_loop_masks): New typedef.
17789         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17790         and fully_masked_p.
17791         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17792         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17793         (vect_max_vf): New function.
17794         (slpeel_make_loop_iterate_ntimes): Delete.
17795         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17796         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17797         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17798         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17799         internal-fn.h, stor-layout.h and optabs-query.h.
17800         (vect_set_loop_mask): New function.
17801         (add_preheader_seq): Likewise.
17802         (add_header_seq): Likewise.
17803         (interleave_supported_p): Likewise.
17804         (vect_maybe_permute_loop_masks): Likewise.
17805         (vect_set_loop_masks_directly): Likewise.
17806         (vect_set_loop_condition_masked): Likewise.
17807         (vect_set_loop_condition_unmasked): New function, split out from
17808         slpeel_make_loop_iterate_ntimes.
17809         (slpeel_make_loop_iterate_ntimes): Rename to..
17810         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
17811         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17812         (vect_do_peeling): Update call accordingly.
17813         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17814         loops.
17815         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17816         mask_compare_type, can_fully_mask_p and fully_masked_p.
17817         (release_vec_loop_masks): New function.
17818         (_loop_vec_info): Use it to free the loop masks.
17819         (can_produce_all_loop_masks_p): New function.
17820         (vect_get_max_nscalars_per_iter): Likewise.
17821         (vect_verify_full_masking): Likewise.
17822         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17823         retries, and free the mask rgroups before retrying.  Check loop-wide
17824         reasons for disallowing fully-masked loops.  Make the final decision
17825         about whether use a fully-masked loop or not.
17826         (vect_estimate_min_profitable_iters): Do not assume that peeling
17827         for the number of iterations will be needed for fully-masked loops.
17828         (vectorizable_reduction): Disable fully-masked loops.
17829         (vectorizable_live_operation): Likewise.
17830         (vect_halve_mask_nunits): New function.
17831         (vect_double_mask_nunits): Likewise.
17832         (vect_record_loop_mask): Likewise.
17833         (vect_get_loop_mask): Likewise.
17834         (vect_transform_loop): Handle the case in which the final loop
17835         iteration might handle a partial vector.  Call vect_set_loop_condition
17836         instead of slpeel_make_loop_iterate_ntimes.
17837         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17838         (check_load_store_masking): New function.
17839         (prepare_load_store_mask): Likewise.
17840         (vectorizable_store): Handle fully-masked loops.
17841         (vectorizable_load): Likewise.
17842         (supportable_widening_operation): Use vect_halve_mask_nunits for
17843         booleans.
17844         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17845         (vect_gen_while): New function.
17846         * config/aarch64/aarch64.md (umax<mode>3): New expander.
17847         (aarch64_uqdec<mode>): New insn.
17849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17850             Alan Hayward  <alan.hayward@arm.com>
17851             David Sherwood  <david.sherwood@arm.com>
17853         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17854         (reduc_xor_scal_optab): New optabs.
17855         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17856         (reduc_xor_scal_@var{m}): Document.
17857         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17858         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17859         internal functions.
17860         * fold-const-call.c (fold_const_call): Handle them.
17861         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17862         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17863         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17864         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17865         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17866         (UNSPEC_XORV): New unspecs.
17867         (optab): Add entries for them.
17868         (BITWISEV): New int iterator.
17869         (bit_reduc_op): New int attributes.
17871 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17872             Alan Hayward  <alan.hayward@arm.com>
17873             David Sherwood  <david.sherwood@arm.com>
17875         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17876         * internal-fn.def (VEC_SHL_INSERT): New internal function.
17877         * optabs.def (vec_shl_insert_optab): New optab.
17878         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17879         (duplicate_and_interleave): Likewise.
17880         * tree-vect-loop.c: Include internal-fn.h.
17881         (neutral_op_for_slp_reduction): New function, split out from
17882         get_initial_defs_for_reduction.
17883         (get_initial_def_for_reduction): Handle option 2 for variable-length
17884         vectors by loading the neutral value into a vector and then shifting
17885         the initial value into element 0.
17886         (get_initial_defs_for_reduction): Replace the code argument with
17887         the neutral value calculated by neutral_op_for_slp_reduction.
17888         Use gimple_build_vector for constant-length vectors.
17889         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17890         but the first group_size elements have a neutral value.
17891         Use duplicate_and_interleave otherwise.
17892         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17893         Update call to get_initial_defs_for_reduction.  Handle SLP
17894         reductions for variable-length vectors by creating one vector
17895         result for each scalar result, with the elements associated
17896         with other scalar results stubbed out with the neutral value.
17897         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17898         Require IFN_VEC_SHL_INSERT for double reductions on
17899         variable-length vectors, or SLP reductions that have
17900         a neutral value.  Require can_duplicate_and_interleave_p
17901         support for variable-length unchained SLP reductions if there
17902         is no neutral value, such as for MIN/MAX reductions.  Also require
17903         the number of vector elements to be a multiple of the number of
17904         SLP statements when doing variable-length unchained SLP reductions.
17905         Update call to vect_create_epilog_for_reduction.
17906         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17907         and remove initial values.
17908         (duplicate_and_interleave): Make public.
17909         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17910         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17912 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17913             Alan Hayward  <alan.hayward@arm.com>
17914             David Sherwood  <david.sherwood@arm.com>
17916         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17917         (can_duplicate_and_interleave_p): New function.
17918         (vect_get_and_check_slp_defs): Take the vector of statements
17919         rather than just the current one.  Remove excess parentheses.
17920         Restriction rejectinon of vect_constant_def and vect_external_def
17921         for variable-length vectors to boolean types, or types for which
17922         can_duplicate_and_interleave_p is false.
17923         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17924         (duplicate_and_interleave): New function.
17925         (vect_get_constant_vectors): Use gimple_build_vector for
17926         constant-length vectors and suitable variable-length constant
17927         vectors.  Use duplicate_and_interleave for other variable-length
17928         vectors.  Don't defer the update when inserting new statements.
17930 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17931             Alan Hayward  <alan.hayward@arm.com>
17932             David Sherwood  <david.sherwood@arm.com>
17934         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17935         min_profitable_iters doesn't go negative.
17937 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17938             Alan Hayward  <alan.hayward@arm.com>
17939             David Sherwood  <david.sherwood@arm.com>
17941         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17942         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17943         * optabs.def (vec_mask_load_lanes_optab): New optab.
17944         (vec_mask_store_lanes_optab): Likewise.
17945         * internal-fn.def (MASK_LOAD_LANES): New internal function.
17946         (MASK_STORE_LANES): Likewise.
17947         * internal-fn.c (mask_load_lanes_direct): New macro.
17948         (mask_store_lanes_direct): Likewise.
17949         (expand_mask_load_optab_fn): Handle masked operations.
17950         (expand_mask_load_lanes_optab_fn): New macro.
17951         (expand_mask_store_optab_fn): Handle masked operations.
17952         (expand_mask_store_lanes_optab_fn): New macro.
17953         (direct_mask_load_lanes_optab_supported_p): Likewise.
17954         (direct_mask_store_lanes_optab_supported_p): Likewise.
17955         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17956         parameter.
17957         (vect_load_lanes_supported): Likewise.
17958         * tree-vect-data-refs.c (strip_conversion): New function.
17959         (can_group_stmts_p): Likewise.
17960         (vect_analyze_data_ref_accesses): Use it instead of checking
17961         for a pair of assignments.
17962         (vect_store_lanes_supported): Take a masked_p parameter.
17963         (vect_load_lanes_supported): Likewise.
17964         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17965         vect_store_lanes_supported and vect_load_lanes_supported.
17966         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17967         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17968         parameter.  Don't allow gaps for masked accesses.
17969         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
17970         and vect_load_lanes_supported.
17971         (get_load_store_type): Take a masked_p parameter and update
17972         call to get_group_load_store_type.
17973         (vectorizable_store): Update call to get_load_store_type.
17974         Handle IFN_MASK_STORE_LANES.
17975         (vectorizable_load): Update call to get_load_store_type.
17976         Handle IFN_MASK_LOAD_LANES.
17978 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
17979             Alan Hayward  <alan.hayward@arm.com>
17980             David Sherwood  <david.sherwood@arm.com>
17982         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17983         modes for SVE.
17984         * config/aarch64/aarch64-protos.h
17985         (aarch64_sve_struct_memory_operand_p): Declare.
17986         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17987         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17988         (VPRED, vpred): Handle SVE structure modes.
17989         * config/aarch64/constraints.md (Utx): New constraint.
17990         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17991         (aarch64_sve_struct_nonimmediate_operand): New predicates.
17992         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17993         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17994         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17995         structure modes.  Split into pieces after RA.
17996         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17997         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17998         New patterns.
17999         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18000         SVE structure modes.
18001         (aarch64_classify_address): Likewise.
18002         (sizetochar): Move earlier in file.
18003         (aarch64_print_operand): Handle SVE register lists.
18004         (aarch64_array_mode): New function.
18005         (aarch64_sve_struct_memory_operand_p): Likewise.
18006         (TARGET_ARRAY_MODE): Redefine.
18008 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18009             Alan Hayward  <alan.hayward@arm.com>
18010             David Sherwood  <david.sherwood@arm.com>
18012         * target.def (array_mode): New target hook.
18013         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18014         * doc/tm.texi: Regenerate.
18015         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18016         * hooks.c (hook_optmode_mode_uhwi_none): New function.
18017         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18018         targetm.array_mode.
18019         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
18020         type sizes.
18022 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18023             Alan Hayward  <alan.hayward@arm.com>
18024             David Sherwood  <david.sherwood@arm.com>
18026         * fold-const.c (fold_binary_loc): Check the argument types
18027         rather than the result type when testing for a vector operation.
18029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18031         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18032         * doc/tm.texi: Regenerate.
18034 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18035             Alan Hayward  <alan.hayward@arm.com>
18036             David Sherwood  <david.sherwood@arm.com>
18038         * doc/invoke.texi (-msve-vector-bits=): Document new option.
18039         (sve): Document new AArch64 extension.
18040         * doc/md.texi (w): Extend the description of the AArch64
18041         constraint to include SVE vectors.
18042         (Upl, Upa): Document new AArch64 predicate constraints.
18043         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18044         enum.
18045         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18046         (msve-vector-bits=): New option.
18047         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18048         SVE when these are disabled.
18049         (sve): New extension.
18050         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18051         modes.  Adjust their number of units based on aarch64_sve_vg.
18052         (MAX_BITSIZE_MODE_ANY_MODE): Define.
18053         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18054         aarch64_addr_query_type.
18055         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18056         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18057         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18058         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18059         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18060         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18061         (aarch64_simd_imm_zero_p): Delete.
18062         (aarch64_check_zero_based_sve_index_immediate): Declare.
18063         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18064         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18065         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18066         (aarch64_sve_float_mul_immediate_p): Likewise.
18067         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18068         rather than an rtx.
18069         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18070         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18071         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18072         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18073         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18074         (aarch64_regmode_natural_size): Likewise.
18075         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18076         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18077         left one place.
18078         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18079         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18080         for VG and the SVE predicate registers.
18081         (V_ALIASES): Add a "z"-prefixed alias.
18082         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18083         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18084         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18085         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18086         (REG_CLASS_NAMES): Add entries for them.
18087         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
18088         and the predicate registers.
18089         (aarch64_sve_vg): Declare.
18090         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18091         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18092         (REGMODE_NATURAL_SIZE): Define.
18093         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18094         SVE macros.
18095         * config/aarch64/aarch64.c: Include cfgrtl.h.
18096         (simd_immediate_info): Add a constructor for series vectors,
18097         and an associated step field.
18098         (aarch64_sve_vg): New variable.
18099         (aarch64_dbx_register_number): Handle VG and the predicate registers.
18100         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18101         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18102         (VEC_ANY_DATA, VEC_STRUCT): New constants.
18103         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18104         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18105         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18106         (aarch64_get_mask_mode): New functions.
18107         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18108         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18109         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
18110         predicate modes and predicate registers.  Explicitly restrict
18111         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
18112         to store a vector mode if it is recognized by
18113         aarch64_classify_vector_mode.
18114         (aarch64_regmode_natural_size): New function.
18115         (aarch64_hard_regno_caller_save_mode): Return the original mode
18116         for predicates.
18117         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18118         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18119         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18120         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18121         functions.
18122         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
18123         does not overlap dest if the function is frame-related.  Handle
18124         SVE constants.
18125         (aarch64_split_add_offset): New function.
18126         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18127         them aarch64_add_offset.
18128         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18129         and update call to aarch64_sub_sp.
18130         (aarch64_add_cfa_expression): New function.
18131         (aarch64_expand_prologue): Pass extra temporary registers to the
18132         functions above.  Handle the case in which we need to emit new
18133         DW_CFA_expressions for registers that were originally saved
18134         relative to the stack pointer, but now have to be expressed
18135         relative to the frame pointer.
18136         (aarch64_output_mi_thunk): Pass extra temporary registers to the
18137         functions above.
18138         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
18139         IP0 and IP1 values for SVE frames.
18140         (aarch64_expand_vec_series): New function.
18141         (aarch64_expand_sve_widened_duplicate): Likewise.
18142         (aarch64_expand_sve_const_vector): Likewise.
18143         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18144         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
18145         into the register, rather than emitting a SET directly.
18146         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18147         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18148         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18149         (offset_9bit_signed_scaled_p): New functions.
18150         (aarch64_replicate_bitmask_imm): New function.
18151         (aarch64_bitmask_imm): Use it.
18152         (aarch64_cannot_force_const_mem): Reject expressions involving
18153         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
18154         (aarch64_classify_index): Handle SVE indices, by requiring
18155         a plain register index with a scale that matches the element size.
18156         (aarch64_classify_address): Handle SVE addresses.  Assert that
18157         the mode of the address is VOIDmode or an integer mode.
18158         Update call to aarch64_classify_symbol.
18159         (aarch64_classify_symbolic_expression): Update call to
18160         aarch64_classify_symbol.
18161         (aarch64_const_vec_all_in_range_p): New function.
18162         (aarch64_print_vector_float_operand): Likewise.
18163         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
18164         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
18165         and the FP immediates 1.0 and 0.5.
18166         (aarch64_print_address_internal): Handle SVE addresses.
18167         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18168         (aarch64_regno_regclass): Handle predicate registers.
18169         (aarch64_secondary_reload): Handle big-endian reloads of SVE
18170         data modes.
18171         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18172         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18173         (aarch64_convert_sve_vector_bits): New function.
18174         (aarch64_override_options): Use it to handle -msve-vector-bits=.
18175         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18176         rather than an rtx.
18177         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18178         Handle SVE vector and predicate modes.  Accept VL-based constants
18179         that need only one temporary register, and VL offsets that require
18180         no temporary registers.
18181         (aarch64_conditional_register_usage): Mark the predicate registers
18182         as fixed if SVE isn't available.
18183         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18184         Return true for SVE vector and predicate modes.
18185         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18186         rather than an unsigned int.  Handle SVE modes.
18187         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
18188         SVE modes.
18189         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18190         if SVE is enabled.
18191         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18192         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18193         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18194         (aarch64_sve_float_mul_immediate_p): New functions.
18195         (aarch64_sve_valid_immediate): New function.
18196         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18197         Explicitly reject structure modes.  Check for INDEX constants.
18198         Handle PTRUE and PFALSE constants.
18199         (aarch64_check_zero_based_sve_index_immediate): New function.
18200         (aarch64_simd_imm_zero_p): Delete.
18201         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18202         vector modes.  Accept constants in the range of CNT[BHWD].
18203         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18204         ask for an Advanced SIMD mode.
18205         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18206         (aarch64_simd_vector_alignment): Handle SVE predicates.
18207         (aarch64_vectorize_preferred_vector_alignment): New function.
18208         (aarch64_simd_vector_alignment_reachable): Use it instead of
18209         the vector size.
18210         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18211         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18212         functions.
18213         (MAX_VECT_LEN): Delete.
18214         (expand_vec_perm_d): Add a vec_flags field.
18215         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18216         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18217         (aarch64_evpc_ext): Don't apply a big-endian lane correction
18218         for SVE modes.
18219         (aarch64_evpc_rev): Rename to...
18220         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
18221         (aarch64_evpc_rev_global): New function.
18222         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18223         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18224         MAX_VECT_LEN.
18225         (aarch64_evpc_sve_tbl): New function.
18226         (aarch64_expand_vec_perm_const_1): Update after rename of
18227         aarch64_evpc_rev.  Handle SVE permutes too, trying
18228         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18229         than aarch64_evpc_tbl.
18230         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18231         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18232         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18233         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18234         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18235         (aarch64_expand_sve_vcond): New functions.
18236         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18237         of aarch64_vector_mode_p.
18238         (aarch64_dwarf_poly_indeterminate_value): New function.
18239         (aarch64_compute_pressure_classes): Likewise.
18240         (aarch64_can_change_mode_class): Likewise.
18241         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18242         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18243         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18244         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18245         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18246         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18247         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18248         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18249         constraints.
18250         (Dn, Dl, Dr): Accept const as well as const_vector.
18251         (Dz): Likewise.  Compare against CONST0_RTX.
18252         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18253         of "vector" where appropriate.
18254         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18255         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18256         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18257         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18258         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18259         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18260         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18261         (v_int_equiv): Extend to SVE modes.
18262         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18263         mode attributes.
18264         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18265         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18266         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18267         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18268         (SVE_COND_FP_CMP): New int iterators.
18269         (perm_hilo): Handle the new unpack unspecs.
18270         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18271         attributes.
18272         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18273         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18274         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18275         (aarch64_equality_operator, aarch64_constant_vector_operand)
18276         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18277         (aarch64_sve_nonimmediate_operand): Likewise.
18278         (aarch64_sve_general_operand): Likewise.
18279         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18280         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18281         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18282         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18283         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18284         (aarch64_sve_float_arith_immediate): Likewise.
18285         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18286         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18287         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18288         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18289         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18290         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18291         (aarch64_sve_float_arith_operand): Likewise.
18292         (aarch64_sve_float_arith_with_sub_operand): Likewise.
18293         (aarch64_sve_float_mul_operand): Likewise.
18294         (aarch64_sve_vec_perm_operand): Likewise.
18295         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18296         (aarch64_mov_operand): Accept const_poly_int and const_vector.
18297         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18298         as well as const_vector.
18299         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18300         in file.  Use CONST0_RTX and CONSTM1_RTX.
18301         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
18302         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18303         Use aarch64_simd_imm_zero.
18304         * config/aarch64/aarch64-sve.md: New file.
18305         * config/aarch64/aarch64.md: Include it.
18306         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18307         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18308         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18309         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18310         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18311         (sve): New attribute.
18312         (enabled): Disable instructions with the sve attribute unless
18313         TARGET_SVE.
18314         (movqi, movhi): Pass CONST_POLY_INT operaneds through
18315         aarch64_expand_mov_immediate.
18316         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18317         CNT[BHSD] immediates.
18318         (movti): Split CONST_POLY_INT moves into two halves.
18319         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18320         Split additions that need a temporary here if the destination
18321         is the stack pointer.
18322         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18323         (*add<mode>3_poly_1): New instruction.
18324         (set_clobber_cc): New expander.
18326 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18328         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18329         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
18330         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18331         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18332         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
18333         Change innermode from fixed_mode_size to machine_mode.
18334         (simplify_subreg): Update call accordingly.  Handle a constant-sized
18335         subreg of a variable-length CONST_VECTOR.
18337 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
18338             Alan Hayward  <alan.hayward@arm.com>
18339             David Sherwood  <david.sherwood@arm.com>
18341         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18342         (add_offset_to_base): New function, split out from...
18343         (create_mem_ref): ...here.  When handling a scale other than 1,
18344         check first whether the address is valid without the offset.
18345         Add it into the base if so, leaving the index and scale as-is.
18347 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18349         PR c++/83778
18350         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18351         fold_for_warn before checking if arg2 is INTEGER_CST.
18353 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
18355         * config/rs6000/predicates.md (load_multiple_operation): Delete.
18356         (store_multiple_operation): Delete.
18357         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18358         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18359         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18360         guarded by TARGET_STRING.
18361         (rs6000_output_load_multiple): Delete.
18362         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18363         OPTION_MASK_STRING / TARGET_STRING handling.
18364         (print_operand) <'N', 'O'>: Add comment that these are unused now.
18365         (const rs6000_opt_masks) <"string">: Change mask to 0.
18366         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18367         (MASK_STRING): Delete.
18368         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18369         parts.  Simplify.
18370         (load_multiple): Delete.
18371         (*ldmsi8): Delete.
18372         (*ldmsi7): Delete.
18373         (*ldmsi6): Delete.
18374         (*ldmsi5): Delete.
18375         (*ldmsi4): Delete.
18376         (*ldmsi3): Delete.
18377         (store_multiple): Delete.
18378         (*stmsi8): Delete.
18379         (*stmsi7): Delete.
18380         (*stmsi6): Delete.
18381         (*stmsi5): Delete.
18382         (*stmsi4): Delete.
18383         (*stmsi3): Delete.
18384         (movmemsi_8reg): Delete.
18385         (corresponding unnamed define_insn): Delete.
18386         (movmemsi_6reg): Delete.
18387         (corresponding unnamed define_insn): Delete.
18388         (movmemsi_4reg): Delete.
18389         (corresponding unnamed define_insn): Delete.
18390         (movmemsi_2reg): Delete.
18391         (corresponding unnamed define_insn): Delete.
18392         (movmemsi_1reg): Delete.
18393         (corresponding unnamed define_insn): Delete.
18394         * config/rs6000/rs6000.opt (mno-string): New.
18395         (mstring): Replace by deprecation warning stub.
18396         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18398 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
18400         * regrename.c (regrename_do_replace): If replacing the same
18401         reg multiple times, try to reuse last created gen_raw_REG.
18403         PR debug/81155
18404         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18405         main to workaround a bug in GDB.
18407 2018-01-12  Tom de Vries  <tom@codesourcery.com>
18409         PR target/83737
18410         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18412 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
18414         PR rtl-optimization/80481
18415         * ira-color.c (get_cap_member): New function.
18416         (allocnos_conflict_by_live_ranges_p): Use it.
18417         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18418         (setup_slot_coalesced_allocno_live_ranges): Ditto.
18420 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
18422         PR target/83628
18423         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18424         (*saddl_se_1): Ditto.
18425         (*ssubsi_1): Ditto.
18426         (*ssubl_se_1): Ditto.
18428 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18430         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18431         rather than wi::to_widest for DR_INITs.
18432         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18433         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18434         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18435         INTEGER_CSTs.
18436         (vect_analyze_group_access_1): Note that here.
18438 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18440         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18441         polynomial type sizes.
18443 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
18445         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18446         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18447         (gimple_add_tmp_var): Likewise.
18449 2018-01-12  Martin Liska  <mliska@suse.cz>
18451         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18452         (gimple_alloc_sizes): Likewise.
18453         (dump_gimple_statistics): Use PRIu64 in printf format.
18454         * gimple.h: Change uint64_t to int.
18456 2018-01-12  Martin Liska  <mliska@suse.cz>
18458         * tree-core.h: Use uint64_t instead of int.
18459         * tree.c (tree_node_counts): Likewise.
18460         (tree_node_sizes): Likewise.
18461         (dump_tree_statistics): Use PRIu64 in printf format.
18463 2018-01-12  Martin Liska  <mliska@suse.cz>
18465         * Makefile.in: As qsort_chk is implemented in vec.c, add
18466         vec.o to linkage of gencfn-macros.
18467         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18468         passing the info to record_node_allocation_statistics.
18469         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18470         and pass the info.
18471         * ggc-common.c (struct ggc_usage): Add operator== and use
18472         it in operator< and compare function.
18473         * mem-stats.h (struct mem_usage): Likewise.
18474         * vec.c (struct vec_usage): Remove operator< and compare
18475         function. Can be simply inherited.
18477 2018-01-12  Martin Jambor  <mjambor@suse.cz>
18479         PR target/81616
18480         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18481         * tree-ssa-math-opts.c: Include domwalk.h.
18482         (convert_mult_to_fma_1): New function.
18483         (fma_transformation_info): New type.
18484         (fma_deferring_state): Likewise.
18485         (cancel_fma_deferring): New function.
18486         (result_of_phi): Likewise.
18487         (last_fma_candidate_feeds_initial_phi): Likewise.
18488         (convert_mult_to_fma): Added deferring logic, split actual
18489         transformation to convert_mult_to_fma_1.
18490         (math_opts_dom_walker): New type.
18491         (math_opts_dom_walker::after_dom_children): New method, body moved
18492         here from pass_optimize_widening_mul::execute, added deferring logic
18493         bits.
18494         (pass_optimize_widening_mul::execute): Moved most of code to
18495         math_opts_dom_walker::after_dom_children.
18496         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18497         * config/i386/i386.c (ix86_option_override_internal): Added
18498         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18500 2018-01-12  Richard Biener  <rguenther@suse.de>
18502         PR debug/83157
18503         * dwarf2out.c (gen_variable_die): Do not reset old_die for
18504         inline instance vars.
18506 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
18508         PR target/81819
18509         * config/rx/rx.c (rx_is_restricted_memory_address):
18510         Handle SUBREG case.
18512 2018-01-12  Richard Biener  <rguenther@suse.de>
18514         PR tree-optimization/80846
18515         * target.def (split_reduction): New target hook.
18516         * targhooks.c (default_split_reduction): New function.
18517         * targhooks.h (default_split_reduction): Declare.
18518         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18519         target requests first reduce vectors by combining low and high
18520         parts.
18521         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18522         (get_vectype_for_scalar_type_and_size): Export.
18523         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18524         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18525         * doc/tm.texi: Regenerate.
18526         * config/i386/i386.c (ix86_split_reduction): Implement
18527         TARGET_VECTORIZE_SPLIT_REDUCTION.
18529 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18531         PR target/83368
18532         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18533         in PIC mode except for TARGET_VXWORKS_RTP.
18534         * config/sparc/sparc.c: Include cfgrtl.h.
18535         (TARGET_INIT_PIC_REG): Define.
18536         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18537         (sparc_pic_register_p): New predicate.
18538         (sparc_legitimate_address_p): Use it.
18539         (sparc_legitimize_pic_address): Likewise.
18540         (sparc_delegitimize_address): Likewise.
18541         (sparc_mode_dependent_address_p): Likewise.
18542         (gen_load_pcrel_sym): Remove 4th parameter.
18543         (load_got_register): Adjust call to above.  Remove obsolete stuff.
18544         (sparc_expand_prologue): Do not call load_got_register here.
18545         (sparc_flat_expand_prologue): Likewise.
18546         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18547         (sparc_use_pseudo_pic_reg): New function.
18548         (sparc_init_pic_reg): Likewise.
18549         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18550         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18552 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
18554         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18555         Add item for branch_cost.
18557 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
18559         PR rtl-optimization/83565
18560         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18561         not extend the result to a larger mode for rotate operations.
18562         (num_sign_bit_copies1): Likewise.
18564 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18566         PR target/40411
18567         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18568         -symbolic.
18569         Use values-Xc.o for -pedantic.
18570         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18572 2018-01-12  Martin Liska  <mliska@suse.cz>
18574         PR ipa/83054
18575         * ipa-devirt.c (final_warning_record::grow_type_warnings):
18576         New function.
18577         (possible_polymorphic_call_targets): Use it.
18578         (ipa_devirt): Likewise.
18580 2018-01-12  Martin Liska  <mliska@suse.cz>
18582         * profile-count.h (enum profile_quality): Use 0 as invalid
18583         enum value of profile_quality.
18585 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
18587         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18588         -mext-string options.
18590 2018-01-12  Richard Biener  <rguenther@suse.de>
18592         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18593         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18594         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18595         Likewise.
18596         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18598 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18600         * configure.ac (--with-long-double-format): Add support for the
18601         configuration option to change the default long double format on
18602         PowerPC systems.
18603         * config.gcc (powerpc*-linux*-*): Likewise.
18604         * configure: Regenerate.
18605         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18606         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18607         used without modification.
18609 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18611         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18612         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18613         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18614         MISC_BUILTIN_SPEC_BARRIER.
18615         (rs6000_init_builtins): Likewise.
18616         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18617         enum value.
18618         (speculation_barrier): New define_insn.
18619         * doc/extend.texi: Document __builtin_speculation_barrier.
18621 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18623         PR target/83203
18624         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18625         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18626         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18627         iterators.
18628         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
18629         integral modes instead of "ss" and "sd".
18630         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18631         vectors with 32-bit and 64-bit elements.
18632         (vecdupssescalarmodesuffix): New mode attribute.
18633         (vec_dup<mode>): Use it.
18635 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
18637         PR target/83330
18638         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18639         frame if argument is passed on stack.
18641 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
18643         PR target/82682
18644         * ree.c (combine_reaching_defs): Optimize also
18645         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18646         reg2=any_extend(exp); reg1=reg2;, formatting fix.
18648 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18650         PR middle-end/83189
18651         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18653 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
18655         PR middle-end/83718
18656         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18657         after they are computed.
18659 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
18661         PR tree-optimization/83695
18662         * gimple-loop-linterchange.cc
18663         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18664         reset cached scev information after interchange.
18665         (pass_linterchange::execute): Remove call to scev_reset_htab.
18667 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18669         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18670         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18671         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18672         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18673         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18674         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18675         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18676         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18677         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18678         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18679         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18680         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18681         (V_lane_reg): Likewise.
18682         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18683         New define_expand.
18684         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18685         (vfmal_lane_low<mode>_intrinsic,
18686         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18687         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18688         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18689         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18690         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18691         vfmsl_lane_high<mode>_intrinsic): New define_insns.
18693 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18695         * config/arm/arm-cpus.in (fp16fml): New feature.
18696         (ALL_SIMD): Add fp16fml.
18697         (armv8.2-a): Add fp16fml as an option.
18698         (armv8.3-a): Likewise.
18699         (armv8.4-a): Add fp16fml as part of fp16.
18700         * config/arm/arm.h (TARGET_FP16FML): Define.
18701         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18702         when appropriate.
18703         * config/arm/arm-modes.def (V2HF): Define.
18704         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18705         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18706         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18707         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18708         vfmsl_low, vfmsl_high): New set of builtins.
18709         * config/arm/iterators.md (PLUSMINUS): New code iterator.
18710         (vfml_op): New code attribute.
18711         (VFMLHALVES): New int iterator.
18712         (VFML, VFMLSEL): New mode attributes.
18713         (V_reg): Define mapping for V2HF.
18714         (V_hi, V_lo): New mode attributes.
18715         (VF_constraint): Likewise.
18716         (vfml_half, vfml_half_selector): New int attributes.
18717         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18718         define_expand.
18719         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18720         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18721         New define_insn.
18722         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18723         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18724         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18725         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
18726         documentation.
18727         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18728         Document new effective target and option set.
18730 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18732         * config/arm/arm-cpus.in (armv8_4): New feature.
18733         (ARMv8_4a): New fgroup.
18734         (armv8.4-a): New arch.
18735         * config/arm/arm-tables.opt: Regenerate.
18736         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18737         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18738         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18739         Add matching rules for -march=armv8.4-a and extensions.
18740         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18742 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
18744         PR target/81821
18745         * config/rx/rx.md (BW): New mode attribute.
18746         (sync_lock_test_and_setsi): Add mode suffix to insn output.
18748 2018-01-11  Richard Biener  <rguenther@suse.de>
18750         PR tree-optimization/83435
18751         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18752         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18753         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18755 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18756             Alan Hayward  <alan.hayward@arm.com>
18757             David Sherwood  <david.sherwood@arm.com>
18759         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18760         field.
18761         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
18762         (aarch64_print_address_internal): Use it to check for a zero offset.
18764 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18765             Alan Hayward  <alan.hayward@arm.com>
18766             David Sherwood  <david.sherwood@arm.com>
18768         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18769         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18770         Return a poly_int64 rather than a HOST_WIDE_INT.
18771         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18772         rather than a HOST_WIDE_INT.
18773         * config/aarch64/aarch64.h (aarch64_frame): Protect with
18774         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
18775         hard_fp_offset, frame_size, initial_adjust, callee_offset and
18776         final_offset from HOST_WIDE_INT to poly_int64.
18777         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18778         to_constant when getting the number of units in an Advanced SIMD
18779         mode.
18780         (aarch64_builtin_vectorized_function): Check for a constant number
18781         of units.
18782         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18783         GET_MODE_SIZE.
18784         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18785         attribute instead of GET_MODE_NUNITS.
18786         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18787         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18788         GET_MODE_SIZE for fixed-size registers.
18789         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18790         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18791         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18792         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18793         (aarch64_print_operand, aarch64_print_address_internal)
18794         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18795         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18796         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18797         Handle polynomial GET_MODE_SIZE.
18798         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
18799         wider than SImode without modification.
18800         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18801         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18802         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18803         passing and returning SVE modes.
18804         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18805         rather than GEN_INT.
18806         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18807         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18808         (aarch64_allocate_and_probe_stack_space): Likewise.
18809         (aarch64_layout_frame): Cope with polynomial offsets.
18810         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18811         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
18812         polynomial offsets.
18813         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18814         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18815         poly_int64 rather than a HOST_WIDE_INT.
18816         (aarch64_get_separate_components, aarch64_process_components)
18817         (aarch64_expand_prologue, aarch64_expand_epilogue)
18818         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18819         (aarch64_anchor_offset): New function, split out from...
18820         (aarch64_legitimize_address): ...here.
18821         (aarch64_builtin_vectorization_cost): Handle polynomial
18822         TYPE_VECTOR_SUBPARTS.
18823         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18824         GET_MODE_NUNITS.
18825         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18826         number of elements from the PARALLEL rather than the mode.
18827         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18828         rather than GET_MODE_BITSIZE.
18829         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18830         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18831         (aarch64_expand_vec_perm_const_1): Handle polynomial
18832         d->perm.length () and d->perm elements.
18833         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
18834         Apply to_constant to d->perm elements.
18835         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18836         polynomial CONST_VECTOR_NUNITS.
18837         (aarch64_move_pointer): Take amount as a poly_int64 rather
18838         than an int.
18839         (aarch64_progress_pointer): Avoid temporary variable.
18840         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18841         the mode attribute instead of GET_MODE.
18843 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18844             Alan Hayward  <alan.hayward@arm.com>
18845             David Sherwood  <david.sherwood@arm.com>
18847         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18848         x exists before using it.
18849         (aarch64_add_constant_internal): Rename to...
18850         (aarch64_add_offset_1): ...this.  Replace regnum with separate
18851         src and dest rtxes.  Handle the case in which they're different,
18852         including when the offset is zero.  Replace scratchreg with an rtx.
18853         Use 2 additions if there is no spare register into which we can
18854         move a 16-bit constant.
18855         (aarch64_add_constant): Delete.
18856         (aarch64_add_offset): Replace reg with separate src and dest
18857         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
18858         Use aarch64_add_offset_1.
18859         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18860         an rtx rather than an int.  Take the delta as a poly_int64
18861         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
18862         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18863         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18864         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18865         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18866         and aarch64_add_sp.
18867         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18868         aarch64_add_constant.
18870 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18872         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18873         Use scalar_float_mode.
18875 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18877         * config/aarch64/aarch64-simd.md
18878         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18879         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18880         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18881         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18882         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18883         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18884         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18885         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18886         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18887         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18889 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18891         PR target/83514
18892         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18893         targ_options->x_arm_arch_string is non NULL.
18895 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
18897         * config/aarch64/aarch64.h
18898         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
18900 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
18902         PR target/82096
18903         * expmed.c (emit_store_flag_force): Swap if const op0
18904         and change VOIDmode to mode of op0.
18906 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
18908         PR rtl-optimization/83761
18909         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18910         than bytes to mode_for_size.
18912 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18914         PR middle-end/83189
18915         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18916         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18917         profile.
18919 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
18921         PR middle-end/83575
18922         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18923         when in layout mode.
18924         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18925         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18926         partition fixup.
18928 2018-01-10  Michael Collison  <michael.collison@arm.com>
18930         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18931         * config/aarch64/aarch64-option-extension.def: Add
18932         AARCH64_OPT_EXTENSION of 'fp16fml'.
18933         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18934         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18935         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18936         * config/aarch64/constraints.md (Ui7): New constraint.
18937         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18938         (VFMLA_SEL_W): Ditto.
18939         (f16quad): Ditto.
18940         (f16mac1): Ditto.
18941         (VFMLA16_LOW): New int iterator.
18942         (VFMLA16_HIGH): Ditto.
18943         (UNSPEC_FMLAL): New unspec.
18944         (UNSPEC_FMLSL): Ditto.
18945         (UNSPEC_FMLAL2): Ditto.
18946         (UNSPEC_FMLSL2): Ditto.
18947         (f16mac): New code attribute.
18948         * config/aarch64/aarch64-simd-builtins.def
18949         (aarch64_fmlal_lowv2sf): Ditto.
18950         (aarch64_fmlsl_lowv2sf): Ditto.
18951         (aarch64_fmlalq_lowv4sf): Ditto.
18952         (aarch64_fmlslq_lowv4sf): Ditto.
18953         (aarch64_fmlal_highv2sf): Ditto.
18954         (aarch64_fmlsl_highv2sf): Ditto.
18955         (aarch64_fmlalq_highv4sf): Ditto.
18956         (aarch64_fmlslq_highv4sf): Ditto.
18957         (aarch64_fmlal_lane_lowv2sf): Ditto.
18958         (aarch64_fmlsl_lane_lowv2sf): Ditto.
18959         (aarch64_fmlal_laneq_lowv2sf): Ditto.
18960         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18961         (aarch64_fmlalq_lane_lowv4sf): Ditto.
18962         (aarch64_fmlsl_lane_lowv4sf): Ditto.
18963         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18964         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18965         (aarch64_fmlal_lane_highv2sf): Ditto.
18966         (aarch64_fmlsl_lane_highv2sf): Ditto.
18967         (aarch64_fmlal_laneq_highv2sf): Ditto.
18968         (aarch64_fmlsl_laneq_highv2sf): Ditto.
18969         (aarch64_fmlalq_lane_highv4sf): Ditto.
18970         (aarch64_fmlsl_lane_highv4sf): Ditto.
18971         (aarch64_fmlalq_laneq_highv4sf): Ditto.
18972         (aarch64_fmlsl_laneq_highv4sf): Ditto.
18973         * config/aarch64/aarch64-simd.md:
18974         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18975         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18976         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18977         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18978         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18979         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18980         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18981         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18982         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18983         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18984         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18985         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18986         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18987         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18988         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18989         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18990         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18991         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18992         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18993         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18994         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18995         (vfmlsl_low_u32): Ditto.
18996         (vfmlalq_low_u32): Ditto.
18997         (vfmlslq_low_u32): Ditto.
18998         (vfmlal_high_u32): Ditto.
18999         (vfmlsl_high_u32): Ditto.
19000         (vfmlalq_high_u32): Ditto.
19001         (vfmlslq_high_u32): Ditto.
19002         (vfmlal_lane_low_u32): Ditto.
19003         (vfmlsl_lane_low_u32): Ditto.
19004         (vfmlal_laneq_low_u32): Ditto.
19005         (vfmlsl_laneq_low_u32): Ditto.
19006         (vfmlalq_lane_low_u32): Ditto.
19007         (vfmlslq_lane_low_u32): Ditto.
19008         (vfmlalq_laneq_low_u32): Ditto.
19009         (vfmlslq_laneq_low_u32): Ditto.
19010         (vfmlal_lane_high_u32): Ditto.
19011         (vfmlsl_lane_high_u32): Ditto.
19012         (vfmlal_laneq_high_u32): Ditto.
19013         (vfmlsl_laneq_high_u32): Ditto.
19014         (vfmlalq_lane_high_u32): Ditto.
19015         (vfmlslq_lane_high_u32): Ditto.
19016         (vfmlalq_laneq_high_u32): Ditto.
19017         (vfmlslq_laneq_high_u32): Ditto.
19018         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19019         (AARCH64_FL_FOR_ARCH8_4): New.
19020         (AARCH64_ISA_F16FML): New ISA flag.
19021         (TARGET_F16FML): New feature flag for fp16fml.
19022         (doc/invoke.texi): Document new fp16fml option.
19024 2018-01-10  Michael Collison  <michael.collison@arm.com>
19026         * config/aarch64/aarch64-builtins.c:
19027         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19028         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19029         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19030         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19031         (AARCH64_ISA_SHA3): New ISA flag.
19032         (TARGET_SHA3): New feature flag for sha3.
19033         * config/aarch64/iterators.md (sha512_op): New int attribute.
19034         (CRYPTO_SHA512): New int iterator.
19035         (UNSPEC_SHA512H): New unspec.
19036         (UNSPEC_SHA512H2): Ditto.
19037         (UNSPEC_SHA512SU0): Ditto.
19038         (UNSPEC_SHA512SU1): Ditto.
19039         * config/aarch64/aarch64-simd-builtins.def
19040         (aarch64_crypto_sha512hqv2di): New builtin.
19041         (aarch64_crypto_sha512h2qv2di): Ditto.
19042         (aarch64_crypto_sha512su0qv2di): Ditto.
19043         (aarch64_crypto_sha512su1qv2di): Ditto.
19044         (aarch64_eor3qv8hi): Ditto.
19045         (aarch64_rax1qv2di): Ditto.
19046         (aarch64_xarqv2di): Ditto.
19047         (aarch64_bcaxqv8hi): Ditto.
19048         * config/aarch64/aarch64-simd.md:
19049         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19050         (aarch64_crypto_sha512su0qv2di): Ditto.
19051         (aarch64_crypto_sha512su1qv2di): Ditto.
19052         (aarch64_eor3qv8hi): Ditto.
19053         (aarch64_rax1qv2di): Ditto.
19054         (aarch64_xarqv2di): Ditto.
19055         (aarch64_bcaxqv8hi): Ditto.
19056         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19057         (vsha512h2q_u64): Ditto.
19058         (vsha512su0q_u64): Ditto.
19059         (vsha512su1q_u64): Ditto.
19060         (veor3q_u16): Ditto.
19061         (vrax1q_u64): Ditto.
19062         (vxarq_u64): Ditto.
19063         (vbcaxq_u16): Ditto.
19064         * config/arm/types.md (crypto_sha512): New type attribute.
19065         (crypto_sha3): Ditto.
19066         (doc/invoke.texi): Document new sha3 option.
19068 2018-01-10  Michael Collison  <michael.collison@arm.com>
19070         * config/aarch64/aarch64-builtins.c:
19071         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19072         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19073         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19074         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19075         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19076         (AARCH64_ISA_SM4): New ISA flag.
19077         (TARGET_SM4): New feature flag for sm4.
19078         * config/aarch64/aarch64-simd-builtins.def
19079         (aarch64_sm3ss1qv4si): Ditto.
19080         (aarch64_sm3tt1aq4si): Ditto.
19081         (aarch64_sm3tt1bq4si): Ditto.
19082         (aarch64_sm3tt2aq4si): Ditto.
19083         (aarch64_sm3tt2bq4si): Ditto.
19084         (aarch64_sm3partw1qv4si): Ditto.
19085         (aarch64_sm3partw2qv4si): Ditto.
19086         (aarch64_sm4eqv4si): Ditto.
19087         (aarch64_sm4ekeyqv4si): Ditto.
19088         * config/aarch64/aarch64-simd.md:
19089         (aarch64_sm3ss1qv4si): Ditto.
19090         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19091         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19092         (aarch64_sm4eqv4si): Ditto.
19093         (aarch64_sm4ekeyqv4si): Ditto.
19094         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19095         (sm3part_op): Ditto.
19096         (CRYPTO_SM3TT): Ditto.
19097         (CRYPTO_SM3PART): Ditto.
19098         (UNSPEC_SM3SS1): New unspec.
19099         (UNSPEC_SM3TT1A): Ditto.
19100         (UNSPEC_SM3TT1B): Ditto.
19101         (UNSPEC_SM3TT2A): Ditto.
19102         (UNSPEC_SM3TT2B): Ditto.
19103         (UNSPEC_SM3PARTW1): Ditto.
19104         (UNSPEC_SM3PARTW2): Ditto.
19105         (UNSPEC_SM4E): Ditto.
19106         (UNSPEC_SM4EKEY): Ditto.
19107         * config/aarch64/constraints.md (Ui2): New constraint.
19108         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19109         * config/arm/types.md (crypto_sm3): New type attribute.
19110         (crypto_sm4): Ditto.
19111         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19112         (vsm3tt1aq_u32): Ditto.
19113         (vsm3tt1bq_u32): Ditto.
19114         (vsm3tt2aq_u32): Ditto.
19115         (vsm3tt2bq_u32): Ditto.
19116         (vsm3partw1q_u32): Ditto.
19117         (vsm3partw2q_u32): Ditto.
19118         (vsm4eq_u32): Ditto.
19119         (vsm4ekeyq_u32): Ditto.
19120         (doc/invoke.texi): Document new sm4 option.
19122 2018-01-10  Michael Collison  <michael.collison@arm.com>
19124         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19125         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19126         (AARCH64_FL_FOR_ARCH8_4): New.
19127         (AARCH64_FL_V8_4): New flag.
19128         (doc/invoke.texi): Document new armv8.4-a option.
19130 2018-01-10  Michael Collison  <michael.collison@arm.com>
19132         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19133         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19134         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19135         * config/aarch64/aarch64-option-extension.def: Add
19136         AARCH64_OPT_EXTENSION of 'sha2'.
19137         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19138         (crypto): Disable sha2 and aes if crypto disabled.
19139         (crypto): Enable aes and sha2 if enabled.
19140         (simd): Disable sha2 and aes if simd disabled.
19141         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19142         New flags.
19143         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19144         (TARGET_SHA2): New feature flag for sha2.
19145         (TARGET_AES): New feature flag for aes.
19146         * config/aarch64/aarch64-simd.md:
19147         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19148         conditional on TARGET_AES.
19149         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19150         (aarch64_crypto_sha1hsi): Make pattern conditional
19151         on TARGET_SHA2.
19152         (aarch64_crypto_sha1hv4si): Ditto.
19153         (aarch64_be_crypto_sha1hv4si): Ditto.
19154         (aarch64_crypto_sha1su1v4si): Ditto.
19155         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19156         (aarch64_crypto_sha1su0v4si): Ditto.
19157         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19158         (aarch64_crypto_sha256su0v4si): Ditto.
19159         (aarch64_crypto_sha256su1v4si): Ditto.
19160         (doc/invoke.texi): Document new aes and sha2 options.
19162 2018-01-10  Martin Sebor  <msebor@redhat.com>
19164         PR tree-optimization/83781
19165         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19166         as string arrays.
19168 2018-01-11  Martin Sebor  <msebor@gmail.com>
19169             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19171         PR tree-optimization/83501
19172         PR tree-optimization/81703
19174         * tree-ssa-strlen.c (get_string_cst): Rename...
19175         (get_string_len): ...to this.  Handle global constants.
19176         (handle_char_store): Adjust.
19178 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
19179             Jim Wilson  <jimw@sifive.com>
19181         * config/riscv/riscv-protos.h (riscv_output_return): New.
19182         * config/riscv/riscv.c (struct machine_function): New naked_p field.
19183         (riscv_attribute_table, riscv_output_return),
19184         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19185         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19186         (riscv_compute_frame_info): Only compute frame->mask if not a naked
19187         function.
19188         (riscv_expand_prologue): Add early return for naked function.
19189         (riscv_expand_epilogue): Likewise.
19190         (riscv_function_ok_for_sibcall): Return false for naked function.
19191         (riscv_set_current_function): New.
19192         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19193         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19194         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19195         * doc/extend.texi (RISC-V Function Attributes): New.
19197 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19199         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19200         check for 128-bit long double before checking TCmode.
19201         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19202         128-bit long doubles before checking TFmode or TCmode.
19203         (FLOAT128_IBM_P): Likewise.
19205 2018-01-10  Martin Sebor  <msebor@redhat.com>
19207         PR tree-optimization/83671
19208         * builtins.c (c_strlen): Unconditionally return zero for the empty
19209         string.
19210         Use -Warray-bounds for warnings.
19211         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19212         for non-constant array indices with COMPONENT_REF, arrays of
19213         arrays, and pointers to arrays.
19214         (gimple_fold_builtin_strlen): Determine and set length range for
19215         non-constant character arrays.
19217 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
19219         PR middle-end/81897
19220         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19221         empty blocks.
19223 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
19225         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19227 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19229         PR target/83399
19230         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19231         VECTOR_MEM_ALTIVEC_OR_VSX_P.
19232         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19233         indexed_or_indirect_operand predicate.
19234         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19235         (*vsx_le_perm_load_v8hi): Likewise.
19236         (*vsx_le_perm_load_v16qi): Likewise.
19237         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19238         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19239         (*vsx_le_perm_store_v8hi): Likewise.
19240         (*vsx_le_perm_store_v16qi): Likewise.
19241         (eight unnamed splitters): Likewise.
19243 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
19245         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19246         * config/rs6000/emmintrin.h: Likewise.
19247         * config/rs6000/mmintrin.h: Likewise.
19248         * config/rs6000/xmmintrin.h: Likewise.
19250 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
19252         PR c++/43486
19253         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19254         "public_flag".
19255         * tree.c (tree_nop_conversion): Return true for location wrapper
19256         nodes.
19257         (maybe_wrap_with_location): New function.
19258         (selftest::check_strip_nops): New function.
19259         (selftest::test_location_wrappers): New function.
19260         (selftest::tree_c_tests): Call it.
19261         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19262         (maybe_wrap_with_location): New decl.
19263         (EXPR_LOCATION_WRAPPER_P): New macro.
19264         (location_wrapper_p): New inline function.
19265         (tree_strip_any_location_wrapper): New inline function.
19267 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
19269         PR target/83735
19270         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19271         stack_realign_offset for the largest alignment of stack slot
19272         actually used.
19273         (ix86_find_max_used_stack_alignment): New function.
19274         (ix86_finalize_stack_frame_flags): Use it.  Set
19275         max_used_stack_alignment if we don't realign stack.
19276         * config/i386/i386.h (machine_function): Add
19277         max_used_stack_alignment.
19279 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
19281         * config/arm/arm.opt (-mbranch-cost): New option.
19282         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19283         account.
19285 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
19287         PR target/83629
19288         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19289         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19291 2018-01-10  Richard Biener  <rguenther@suse.de>
19293         PR debug/83765
19294         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19295         early out so it also covers the case where we have a non-NULL
19296         origin.
19298 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19300         PR tree-optimization/83753
19301         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19302         for non-strided grouped accesses if the number of elements is 1.
19304 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
19306         PR target/81616
19307         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19308         * i386.h (TARGET_USE_GATHER): Define.
19309         * x86-tune.def (X86_TUNE_USE_GATHER): New.
19311 2018-01-10  Martin Liska  <mliska@suse.cz>
19313         PR bootstrap/82831
19314         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19315         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19316         partitioning.
19317         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19318         CLEANUP_NO_PARTITIONING is not set.
19320 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
19322         * doc/rtl.texi: Remove documentation of (const ...) wrappers
19323         for vectors, as a partial revert of r254296.
19324         * rtl.h (const_vec_p): Delete.
19325         (const_vec_duplicate_p): Don't test for vector CONSTs.
19326         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19327         * expmed.c (make_tree): Likewise.
19329         Revert:
19330         * common.md (E, F): Use CONSTANT_P instead of checking for
19331         CONST_VECTOR.
19332         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19333         checking for CONST_VECTOR.
19335 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19337         PR middle-end/83575
19338         * predict.c (force_edge_cold): Handle in more sane way edges
19339         with no prediction.
19341 2018-01-09  Carl Love  <cel@us.ibm.com>
19343         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19344         V4SI, V4SF types.
19345         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19346         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19347         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19348         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
19349         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19350         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
19351         * config/rs6000/rs6000-protos.h: Add extern defition for
19352         rs6000_generate_float2_double_code.
19353         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19354         function.
19355         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19356         (float2_v2df): Add define_expand.
19358 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
19360         PR target/83628
19361         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19362         op_mode in the force_to_mode call.
19364 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19366         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19367         instead of checking each element individually.
19368         (aarch64_evpc_uzp): Likewise.
19369         (aarch64_evpc_zip): Likewise.
19370         (aarch64_evpc_ext): Likewise.
19371         (aarch64_evpc_rev): Likewise.
19372         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19373         instead of checking each element individually.  Return true without
19374         generating rtl if
19375         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19376         whether all selected elements come from the same input, instead of
19377         checking each element individually.  Remove calls to gen_rtx_REG,
19378         start_sequence and end_sequence and instead assert that no rtl is
19379         generated.
19381 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19383         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19384         order of HIGH and CONST checks.
19386 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
19388         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19389         if the destination isn't an SSA_NAME.
19391 2018-01-09  Richard Biener  <rguenther@suse.de>
19393         PR tree-optimization/83668
19394         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19395         move prologue...
19396         (canonicalize_loop_form): ... here, renamed from ...
19397         (canonicalize_loop_closed_ssa_form): ... this and amended to
19398         swap successor edges for loop exit blocks to make us use
19399         the RPO order we need for initial schedule generation.
19401 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
19403         PR tree-optimization/64811
19404         * match.pd: When optimizing comparisons with Inf, avoid
19405         introducing or losing exceptions from comparisons with NaN.
19407 2018-01-09  Martin Liska  <mliska@suse.cz>
19409         PR sanitizer/82517
19410         * asan.c (shadow_mem_size): Add gcc_assert.
19412 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
19414         Don't save registers in main().
19416         PR target/83738
19417         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19418         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19419         * config/avr/avr.c (avr_set_current_function): Don't error if
19420         naked, OS_task or OS_main are specified at the same time.
19421         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19422         OS_main.
19423         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19424         attribute.
19425         * common/config/avr/avr-common.c (avr_option_optimization_table):
19426         Switch on -mmain-is-OS_task for optimizing compilations.
19428 2018-01-09  Richard Biener  <rguenther@suse.de>
19430         PR tree-optimization/83572
19431         * graphite.c: Include cfganal.h.
19432         (graphite_transform_loops): Connect infinite loops to exit
19433         and remove fake edges at the end.
19435 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19437         * ipa-inline.c (edge_badness): Revert accidental checkin.
19439 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
19441         PR ipa/80763
19442         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19443         symbols; not inline clones.
19445 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
19447         PR target/83507
19448         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19449         hard registers.  Formatting fixes.
19451         PR preprocessor/83722
19452         * gcc.c (try_generate_repro): Pass
19453         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19454         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19455         do_report_bug.
19457 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
19458             Kito Cheng  <kito.cheng@gmail.com>
19460         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19461         (riscv_leaf_function_p): Delete.
19462         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19464 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19466         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19467         function.
19468         (do_ifelse): New function.
19469         (do_isel): New function.
19470         (do_sub3): New function.
19471         (do_add3): New function.
19472         (do_load_mask_compare): New function.
19473         (do_overlap_load_compare): New function.
19474         (expand_compare_loop): New function.
19475         (expand_block_compare): Call expand_compare_loop() when appropriate.
19476         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19477         option description.
19478         (-mblock-compare-inline-loop-limit): New option.
19480 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19482         PR target/83677
19483         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19484         Reverse order of second and third operands in first alternative.
19485         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19486         of first and second elements in UNSPEC_VPERMR vector.
19487         (altivec_expand_vec_perm_le): Likewise.
19489 2018-01-08  Jeff Law  <law@redhat.com>
19491         PR rtl-optimizatin/81308
19492         * tree-switch-conversion.c (cfg_altered): New file scoped static.
19493         (process_switch): If group_case_labels makes a change, then set
19494         cfg_altered.
19495         (pass_convert_switch::execute): If a switch is converted, then
19496         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
19498         PR rtl-optimization/81308
19499         * recog.c (split_all_insns): Conditionally cleanup the CFG after
19500         splitting insns.
19502 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
19504         PR target/83663 - Revert r255946
19505         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19506         generation for cases where splatting a value is not useful.
19507         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19508         across a vec_duplicate and a paradoxical subreg forming a vector
19509         mode to a vec_concat.
19511 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19513         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19514         -march=armv8.3-a variants.
19515         * config/arm/t-multilib: Likewise.
19516         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
19518 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19520         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19521         to generate rtl.
19522         (cceq_ior_compare_complement): Give it a name so I can use it, and
19523         change boolean_or_operator predicate to boolean_operator so it can
19524         be used to generate a crand.
19525         (eqne): New code iterator.
19526         (bd/bd_neg): New code_attrs.
19527         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19528         a single define_insn.
19529         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19530         decrement (bdnzt/bdnzf/bdzt/bdzf).
19531         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19532         with the new names of the branch decrement patterns, and added the
19533         names of the branch decrement conditional patterns.
19535 2018-01-08  Richard Biener  <rguenther@suse.de>
19537         PR tree-optimization/83563
19538         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19539         cache.
19541 2018-01-08  Richard Biener  <rguenther@suse.de>
19543         PR middle-end/83713
19544         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19546 2018-01-08  Richard Biener  <rguenther@suse.de>
19548         PR tree-optimization/83685
19549         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19550         references to abnormals.
19552 2018-01-08  Richard Biener  <rguenther@suse.de>
19554         PR lto/83719
19555         * dwarf2out.c (output_indirect_strings): Handle empty
19556         skeleton_debug_str_hash.
19557         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19559 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19561         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19562         (emit_store_direct): Likewise.
19563         (arc_trampoline_adjust_address): Likewise.
19564         (arc_asm_trampoline_template): New function.
19565         (arc_initialize_trampoline): Use asm_trampoline_template.
19566         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19567         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19568         * config/arc/arc.md (flush_icache): Delete pattern.
19570 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
19572         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19573         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19574         munaligned-access.
19576 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19578         PR target/83681
19579         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19580         by not USED_FOR_TARGET.
19581         (make_pass_resolve_sw_modes): Likewise.
19583 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19585         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19586         USED_FOR_TARGET.
19588 2018-01-08  Richard Biener  <rguenther@suse.de>
19590         PR middle-end/83580
19591         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19593 2018-01-08  Richard Biener  <rguenther@suse.de>
19595         PR middle-end/83517
19596         * match.pd ((t * 2) / 2) -> t): Add missing :c.
19598 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
19600         PR middle-end/81897
19601         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19602         basic blocks with a small number of successors.
19603         (convert_control_dep_chain_into_preds): Improve handling of
19604         forwarder blocks.
19605         (dump_predicates): Split apart into...
19606         (dump_pred_chain): ...here...
19607         (dump_pred_info): ...and here.
19608         (can_one_predicate_be_invalidated_p): Add debugging printfs.
19609         (can_chain_union_be_invalidated_p): Improve check for invalidation
19610         of paths.
19611         (uninit_uses_cannot_happen): Avoid unnecessary if
19612         convert_control_dep_chain_into_preds yielded nothing.
19614 2018-01-06  Martin Sebor  <msebor@redhat.com>
19616         PR tree-optimization/83640
19617         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19618         subtracting negative offset from size.
19619         (builtin_access::overlap): Adjust offset bounds of the access to fall
19620         within the size of the object if possible.
19622 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
19624         PR rtl-optimization/83699
19625         * expmed.c (extract_bit_field_1): Restrict the vector usage of
19626         extract_bit_field_as_subreg to cases in which the extracted
19627         value is also a vector.
19629         * lra-constraints.c (process_alt_operands): Test for the equivalence
19630         substitutions when detecting a possible reload cycle.
19632 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
19634         PR debug/83480
19635         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19636         by default if flag_selective_schedling{,2}.  Formatting fixes.
19638         PR rtl-optimization/83682
19639         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19640         if it has non-VECTOR_MODE element mode.
19641         (vec_duplicate_p): Likewise.
19643         PR middle-end/83694
19644         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19645         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19647 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19649         PR target/83604
19650         * config/i386/i386-builtin.def
19651         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19652         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19653         Require also OPTION_MASK_ISA_AVX512F in addition to
19654         OPTION_MASK_ISA_GFNI.
19655         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19656         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19657         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19658         to OPTION_MASK_ISA_GFNI.
19659         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19660         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19661         OPTION_MASK_ISA_AVX512BW.
19662         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19663         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19664         addition to OPTION_MASK_ISA_GFNI.
19665         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19666         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19667         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19668         to OPTION_MASK_ISA_GFNI.
19669         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19670         a requirement for all ISAs rather than any of them with a few
19671         exceptions.
19672         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19673         processing.
19674         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19675         bitmasks to be enabled with 3 exceptions, instead of requiring any
19676         enabled ISA with lots of exceptions.
19677         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19678         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19679         Change avx512bw in isa attribute to avx512f.
19680         * config/i386/sgxintrin.h: Add license boilerplate.
19681         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
19682         to __AVX512F__ and __AVX512VL to __AVX512VL__.
19683         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19684         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19685         defined.
19686         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19687         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19688         temporarily sse2 rather than sse if not enabled already.
19690         PR target/83604
19691         * config/i386/sse.md (VI248_VLBW): Rename to ...
19692         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
19693         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19694         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19695         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19696         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19697         mode iterator instead of VI248_VLBW.
19699 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
19701         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19702         (record_modified): Skip clobbers; add debug output.
19703         (param_change_prob): Use sreal frequencies.
19705 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19707         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19708         punt for user-aligned variables.
19710 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
19712         * tree-chrec.c (chrec_contains_symbols): Return true for
19713         POLY_INT_CST.
19715 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
19717         PR target/82439
19718         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19719         of (x|y) == x for BICS pattern.
19721 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
19723         PR tree-optimization/83605
19724         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19725         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19726         can throw.
19728 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19730         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19731         * config/epiphany/rtems.h: New file.
19733 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19734             Uros Bizjak  <ubizjak@gmail.com>
19736         PR target/83554
19737         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19738         QIreg_operand instead of register_operand predicate.
19739         * config/i386/i386.c (ix86_rop_should_change_byte_p,
19740         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19741         comments instead of -fmitigate[-_]rop.
19743 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19745         PR bootstrap/81926
19746         * cgraphunit.c (symbol_table::compile): Switch to text_section
19747         before calling assembly_start debug hook.
19748         * run-rtl-passes.c (run_rtl_passes): Likewise.
19749         Include output.h.
19751 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19753         * tree-vrp.c (extract_range_from_binary_expr_1): Check
19754         range_int_cst_p rather than !symbolic_range_p before calling
19755         extract_range_from_multiplicative_op_1.
19757 2018-01-04  Jeff Law  <law@redhat.com>
19759         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19760         redundant test in assertion.
19762 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19764         * doc/rtl.texi: Document machine_mode wrapper classes.
19766 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19768         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19769         using tree_to_uhwi.
19771 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19773         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19774         the VEC_PERM_EXPR fold to fail.
19776 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19778         PR debug/83585
19779         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19780         to switched_sections.
19782 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19784         PR target/83680
19785         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19786         test for d.testing.
19788 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
19790         PR target/83387
19791         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19792         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19794 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19796         PR debug/83666
19797         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19798         is BLKmode and bitpos not zero or mode change is needed.
19800 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
19802         PR target/83675
19803         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19804         TARGET_VIS2.
19806 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
19808         PR target/83628
19809         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19810         instead of MULT rtx.  Update all corresponding splitters.
19811         (*saddl_se): Ditto.
19812         (*ssub<modesuffix>): Ditto.
19813         (*ssubl_se): Ditto.
19814         (*cmp_sadd_di): Update split patterns.
19815         (*cmp_sadd_si): Ditto.
19816         (*cmp_sadd_sidi): Ditto.
19817         (*cmp_ssub_di): Ditto.
19818         (*cmp_ssub_si): Ditto.
19819         (*cmp_ssub_sidi): Ditto.
19820         * config/alpha/predicates.md (const23_operand): New predicate.
19821         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19822         Look for ASHIFT, not MULT inner operand.
19823         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19825 2018-01-04  Martin Liska  <mliska@suse.cz>
19827         PR gcov-profile/83669
19828         * gcov.c (output_intermediate_file): Add version to intermediate
19829         gcov file.
19830         * doc/gcov.texi: Document new field 'version' in intermediate
19831         file format. Fix location of '-k' option of gcov command.
19833 2018-01-04  Martin Liska  <mliska@suse.cz>
19835         PR ipa/82352
19836         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19838 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
19840         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19842 2018-01-03  Martin Sebor  <msebor@redhat.com>
19844         PR tree-optimization/83655
19845         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19846         checking calls with invalid arguments.
19848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19850         * tree-vect-stmts.c (vect_get_store_rhs): New function.
19851         (vectorizable_mask_load_store): Delete.
19852         (vectorizable_call): Return false for masked loads and stores.
19853         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
19854         instead of gimple_assign_rhs1.
19855         (vectorizable_load): Handle IFN_MASK_LOAD.
19856         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19858 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19860         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19861         split out from..,
19862         (vectorizable_mask_load_store): ...here.
19863         (vectorizable_load): ...and here.
19865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19867         * tree-vect-stmts.c (vect_build_all_ones_mask)
19868         (vect_build_zero_merge_argument): New functions, split out from...
19869         (vectorizable_load): ...here.
19871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19873         * tree-vect-stmts.c (vect_check_store_rhs): New function,
19874         split out from...
19875         (vectorizable_mask_load_store): ...here.
19876         (vectorizable_store): ...and here.
19878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19880         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19881         split out from...
19882         (vectorizable_mask_load_store): ...here.
19884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19886         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19887         (vect_model_store_cost): Take a vec_load_store_type instead of a
19888         vect_def_type.
19889         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19890         (vect_model_store_cost): Take a vec_load_store_type instead of a
19891         vect_def_type.
19892         (vectorizable_mask_load_store): Update accordingly.
19893         (vectorizable_store): Likewise.
19894         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19898         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19899         IFN_MASK_LOAD calls here rather than...
19900         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19903             Alan Hayward  <alan.hayward@arm.com>
19904             David Sherwood  <david.sherwood@arm.com>
19906         * expmed.c (extract_bit_field_1): For vector extracts,
19907         fall back to extract_bit_field_as_subreg if vec_extract
19908         isn't available.
19910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19911             Alan Hayward  <alan.hayward@arm.com>
19912             David Sherwood  <david.sherwood@arm.com>
19914         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19915         they are variable or constant sized.
19916         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19917         slots for constant-sized data.
19919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19920             Alan Hayward  <alan.hayward@arm.com>
19921             David Sherwood  <david.sherwood@arm.com>
19923         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19924         handling COND_EXPRs with boolean comparisons, try to find a better
19925         basis for the mask type than the boolean itself.
19927 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19929         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19930         is calculated and how it can be overridden.
19931         * genmodes.c (max_bitsize_mode_any_mode): New variable.
19932         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19933         if defined.
19934         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19935         if nonzero.
19937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19938             Alan Hayward  <alan.hayward@arm.com>
19939             David Sherwood  <david.sherwood@arm.com>
19941         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19942         Remove the mode argument.
19943         (aarch64_simd_valid_immediate): Remove the mode and inverse
19944         arguments.
19945         * config/aarch64/iterators.md (bitsize): New iterator.
19946         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19947         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19948         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19949         aarch64_simd_valid_immediate.
19950         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19951         (aarch64_reg_or_bic_imm): Likewise.
19952         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19953         with an insn_type enum and msl with a modifier_type enum.
19954         Replace element_width with a scalar_mode.  Change the shift
19955         to unsigned int.  Add constructors for scalar_float_mode and
19956         scalar_int_mode elements.
19957         (aarch64_vect_float_const_representable_p): Delete.
19958         (aarch64_can_const_movi_rtx_p)
19959         (aarch64_simd_scalar_immediate_valid_for_move)
19960         (aarch64_simd_make_constant): Update call to
19961         aarch64_simd_valid_immediate.
19962         (aarch64_advsimd_valid_immediate_hs): New function.
19963         (aarch64_advsimd_valid_immediate): Likewise.
19964         (aarch64_simd_valid_immediate): Remove mode and inverse
19965         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
19966         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19967         and aarch64_float_const_representable_p on the result.
19968         (aarch64_output_simd_mov_immediate): Remove mode argument.
19969         Update call to aarch64_simd_valid_immediate and use of
19970         simd_immediate_info.
19971         (aarch64_output_scalar_simd_mov_immediate): Update call
19972         accordingly.
19974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
19975             Alan Hayward  <alan.hayward@arm.com>
19976             David Sherwood  <david.sherwood@arm.com>
19978         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19979         (mode_nunits): Likewise CONST_MODE_NUNITS.
19980         * machmode.def (ADJUST_NUNITS): Document.
19981         * genmodes.c (mode_data::need_nunits_adj): New field.
19982         (blank_mode): Update accordingly.
19983         (adj_nunits): New variable.
19984         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19985         parameter.
19986         (emit_mode_size_inline): Set need_bytesize_adj for all modes
19987         listed in adj_nunits.
19988         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19989         listed in adj_nunits.  Don't emit case statements for such modes.
19990         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19991         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
19992         nothing if adj_nunits is nonnull.
19993         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19994         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19995         (emit_mode_fbit): Update use of print_maybe_const_decl.
19996         (emit_move_size): Likewise.  Treat the array as non-const
19997         if adj_nunits.
19998         (emit_mode_adjustments): Handle adj_nunits.
20000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20002         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20003         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20004         (VECTOR_MODES): Use it.
20005         (make_vector_modes): Take the prefix as an argument.
20007 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20008             Alan Hayward  <alan.hayward@arm.com>
20009             David Sherwood  <david.sherwood@arm.com>
20011         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20012         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20013         for MODE_VECTOR_BOOL.
20014         * machmode.def (VECTOR_BOOL_MODE): Document.
20015         * genmodes.c (VECTOR_BOOL_MODE): New macro.
20016         (make_vector_bool_mode): New function.
20017         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20018         MODE_VECTOR_BOOL.
20019         * lto-streamer-in.c (lto_input_mode_table): Likewise.
20020         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20021         Likewise.
20022         * stor-layout.c (int_mode_for_mode): Likewise.
20023         * tree.c (build_vector_type_for_mode): Likewise.
20024         * varasm.c (output_constant_pool_2): Likewise.
20025         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20026         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
20027         for MODE_VECTOR_BOOL.
20028         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20029         of mode class checks.
20030         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20031         instead of a list of mode class checks.
20032         (expand_vector_scalar_condition): Likewise.
20033         (type_for_widest_vector_mode): Handle BImode as an inner mode.
20035 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20036             Alan Hayward  <alan.hayward@arm.com>
20037             David Sherwood  <david.sherwood@arm.com>
20039         * machmode.h (mode_size): Change from unsigned short to
20040         poly_uint16_pod.
20041         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20042         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20043         or if measurement_type is not polynomial.
20044         (fixed_size_mode::includes_p): Check for constant-sized modes.
20045         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20046         return a poly_uint16 rather than an unsigned short.
20047         (emit_mode_size): Change the type of mode_size from unsigned short
20048         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
20049         (emit_mode_adjustments): Cope with polynomial vector sizes.
20050         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20051         for GET_MODE_SIZE.
20052         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20053         for GET_MODE_SIZE.
20054         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20055         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20056         * caller-save.c (setup_save_areas): Likewise.
20057         (replace_reg_with_saved_mem): Likewise.
20058         * calls.c (emit_library_call_value_1): Likewise.
20059         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20060         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20061         (gen_lowpart_for_combine): Likewise.
20062         * convert.c (convert_to_integer_1): Likewise.
20063         * cse.c (equiv_constant, cse_insn): Likewise.
20064         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20065         (cselib_subst_to_values): Likewise.
20066         * dce.c (word_dce_process_block): Likewise.
20067         * df-problems.c (df_word_lr_mark_ref): Likewise.
20068         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20069         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20070         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20071         (rtl_for_decl_location): Likewise.
20072         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20073         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20074         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20075         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20076         (expand_expr_real_1): Likewise.
20077         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20078         (pad_below): Likewise.
20079         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20080         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20081         * ira.c (get_subreg_tracking_sizes): Likewise.
20082         * ira-build.c (ira_create_allocno_objects): Likewise.
20083         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20084         (ira_sort_regnos_for_alter_reg): Likewise.
20085         * ira-costs.c (record_operand_costs): Likewise.
20086         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20087         (resolve_simple_move): Likewise.
20088         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20089         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20090         (lra_constraints): Likewise.
20091         (CONST_POOL_OK_P): Reject variable-sized modes.
20092         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20093         (add_pseudo_to_slot, lra_spill): Likewise.
20094         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20095         * optabs-query.c (get_best_extraction_insn): Likewise.
20096         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20097         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20098         (expand_mult_highpart, valid_multiword_target_p): Likewise.
20099         * recog.c (offsettable_address_addr_space_p): Likewise.
20100         * regcprop.c (maybe_mode_change): Likewise.
20101         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20102         * regrename.c (build_def_use): Likewise.
20103         * regstat.c (dump_reg_info): Likewise.
20104         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20105         (find_reloads, find_reloads_subreg_address): Likewise.
20106         * reload1.c (eliminate_regs_1): Likewise.
20107         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20108         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20109         (simplify_binary_operation_1, simplify_subreg): Likewise.
20110         * targhooks.c (default_function_arg_padding): Likewise.
20111         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20112         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20113         (verify_gimple_assign_ternary): Likewise.
20114         * tree-inline.c (estimate_move_cost): Likewise.
20115         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20116         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20117         (get_address_cost_ainc): Likewise.
20118         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20119         (vect_supportable_dr_alignment): Likewise.
20120         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20121         (vectorizable_reduction): Likewise.
20122         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20123         (vectorizable_operation, vectorizable_load): Likewise.
20124         * tree.c (build_same_sized_truth_vector_type): Likewise.
20125         * valtrack.c (cleanup_auto_inc_dec): Likewise.
20126         * var-tracking.c (emit_note_insn_var_location): Likewise.
20127         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20128         (ADDR_VEC_ALIGN): Likewise.
20130 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20131             Alan Hayward  <alan.hayward@arm.com>
20132             David Sherwood  <david.sherwood@arm.com>
20134         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20135         unsigned short.
20136         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20137         or if measurement_type is polynomial.
20138         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20139         * combine.c (make_extraction): Likewise.
20140         * dse.c (find_shift_sequence): Likewise.
20141         * dwarf2out.c (mem_loc_descriptor): Likewise.
20142         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20143         (extract_bit_field, extract_low_bits): Likewise.
20144         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20145         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20146         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20147         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20148         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20149         * reload.c (find_reloads): Likewise.
20150         * reload1.c (alter_reg): Likewise.
20151         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20152         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20153         * tree-if-conv.c (predicate_mem_writes): Likewise.
20154         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20155         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20156         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20157         * valtrack.c (dead_debug_insert_temp): Likewise.
20158         * varasm.c (mergeable_constant_section): Likewise.
20159         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20161 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20162             Alan Hayward  <alan.hayward@arm.com>
20163             David Sherwood  <david.sherwood@arm.com>
20165         * expr.c (expand_assignment): Cope with polynomial mode sizes
20166         when assigning to a CONCAT.
20168 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20169             Alan Hayward  <alan.hayward@arm.com>
20170             David Sherwood  <david.sherwood@arm.com>
20172         * machmode.h (mode_precision): Change from unsigned short to
20173         poly_uint16_pod.
20174         (mode_to_precision): Return a poly_uint16 rather than an unsigned
20175         short.
20176         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20177         or if measurement_type is not polynomial.
20178         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
20179         in which the mode is already known to be a scalar_int_mode.
20180         * genmodes.c (emit_mode_precision): Change the type of mode_precision
20181         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
20182         initializer.
20183         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20184         for GET_MODE_PRECISION.
20185         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20186         for GET_MODE_PRECISION.
20187         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20188         as polynomial.
20189         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20190         (expand_field_assignment, make_extraction): Likewise.
20191         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20192         (get_last_value): Likewise.
20193         * convert.c (convert_to_integer_1): Likewise.
20194         * cse.c (cse_insn): Likewise.
20195         * expr.c (expand_expr_real_1): Likewise.
20196         * lra-constraints.c (simplify_operand_subreg): Likewise.
20197         * optabs-query.c (can_atomic_load_p): Likewise.
20198         * optabs.c (expand_atomic_load): Likewise.
20199         (expand_atomic_store): Likewise.
20200         * ree.c (combine_reaching_defs): Likewise.
20201         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20202         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20203         * tree.h (type_has_mode_precision_p): Likewise.
20204         * ubsan.c (instrument_si_overflow): Likewise.
20206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20207             Alan Hayward  <alan.hayward@arm.com>
20208             David Sherwood  <david.sherwood@arm.com>
20210         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20211         polynomial numbers of units.
20212         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20213         (valid_vector_subparts_p): New function.
20214         (build_vector_type): Remove temporary shim and take the number
20215         of units as a poly_uint64 rather than an int.
20216         (build_opaque_vector_type): Take the number of units as a
20217         poly_uint64 rather than an int.
20218         * tree.c (build_vector_from_ctor): Handle polynomial
20219         TYPE_VECTOR_SUBPARTS.
20220         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20221         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20222         (build_vector_from_val): If the number of units is variable,
20223         use build_vec_duplicate_cst for constant operands and
20224         VEC_DUPLICATE_EXPR otherwise.
20225         (make_vector_type): Remove temporary is_constant ().
20226         (build_vector_type, build_opaque_vector_type): Take the number of
20227         units as a poly_uint64 rather than an int.
20228         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20229         VECTOR_CST_NELTS.
20230         * cfgexpand.c (expand_debug_expr): Likewise.
20231         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20232         (store_constructor, expand_expr_real_1): Likewise.
20233         (const_scalar_mask_from_tree): Likewise.
20234         * fold-const-call.c (fold_const_reduction): Likewise.
20235         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20236         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20237         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20238         (fold_relational_const): Likewise.
20239         (native_interpret_vector): Likewise.  Change the size from an
20240         int to an unsigned int.
20241         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20242         TYPE_VECTOR_SUBPARTS.
20243         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20244         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20245         duplicating a non-constant operand into a variable-length vector.
20246         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20247         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20248         * ipa-icf.c (sem_variable::equals): Likewise.
20249         * match.pd: Likewise.
20250         * omp-simd-clone.c (simd_clone_subparts): Likewise.
20251         * print-tree.c (print_node): Likewise.
20252         * stor-layout.c (layout_type): Likewise.
20253         * targhooks.c (default_builtin_vectorization_cost): Likewise.
20254         * tree-cfg.c (verify_gimple_comparison): Likewise.
20255         (verify_gimple_assign_binary): Likewise.
20256         (verify_gimple_assign_ternary): Likewise.
20257         (verify_gimple_assign_single): Likewise.
20258         * tree-pretty-print.c (dump_generic_node): Likewise.
20259         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20260         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20261         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20262         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20263         (vect_shift_permute_load_chain): Likewise.
20264         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20265         (expand_vector_condition, optimize_vector_constructor): Likewise.
20266         (lower_vec_perm, get_compute_type): Likewise.
20267         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20268         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20269         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20270         (vect_recog_mask_conversion_pattern): Likewise.
20271         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20272         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20273         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20274         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20275         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20276         (vectorizable_shift, vectorizable_operation, vectorizable_store)
20277         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20278         (supportable_widening_operation): Likewise.
20279         (supportable_narrowing_operation): Likewise.
20280         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20281         Likewise.
20282         * varasm.c (output_constant): Likewise.
20284 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20285             Alan Hayward  <alan.hayward@arm.com>
20286             David Sherwood  <david.sherwood@arm.com>
20288         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20289         so that both the length == 3 and length != 3 cases set up their
20290         own permute vectors.  Add comments explaining why we know the
20291         number of elements is constant.
20292         (vect_permute_load_chain): Likewise.
20294 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20295             Alan Hayward  <alan.hayward@arm.com>
20296             David Sherwood  <david.sherwood@arm.com>
20298         * machmode.h (mode_nunits): Change from unsigned char to
20299         poly_uint16_pod.
20300         (ONLY_FIXED_SIZE_MODES): New macro.
20301         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20302         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20303         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20304         New typedefs.
20305         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20306         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20307         or if measurement_type is not polynomial.
20308         * genmodes.c (ZERO_COEFFS): New macro.
20309         (emit_mode_nunits_inline): Make mode_nunits_inline return a
20310         poly_uint16.
20311         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20312         Use ZERO_COEFFS when emitting initializers.
20313         * data-streamer.h (bp_pack_poly_value): New function.
20314         (bp_unpack_poly_value): Likewise.
20315         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20316         for GET_MODE_NUNITS.
20317         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20318         for GET_MODE_NUNITS.
20319         * tree.c (make_vector_type): Remove temporary shim and make
20320         the real function take the number of units as a poly_uint64
20321         rather than an int.
20322         (build_vector_type_for_mode): Handle polynomial nunits.
20323         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20324         * emit-rtl.c (const_vec_series_p_1): Likewise.
20325         (gen_rtx_CONST_VECTOR): Likewise.
20326         * fold-const.c (test_vec_duplicate_folding): Likewise.
20327         * genrecog.c (validate_pattern): Likewise.
20328         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20329         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20330         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20331         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20332         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20333         * rtlanal.c (subreg_get_info): Likewise.
20334         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20335         (vect_grouped_load_supported): Likewise.
20336         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20337         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20338         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20339         (simplify_const_unary_operation, simplify_binary_operation_1)
20340         (simplify_const_binary_operation, simplify_ternary_operation)
20341         (test_vector_ops_duplicate, test_vector_ops): Likewise.
20342         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20343         instead of CONST_VECTOR_NUNITS.
20344         * varasm.c (output_constant_pool_2): Likewise.
20345         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20346         explicit-encoded elements in the XVEC for variable-length vectors.
20348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20350         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20353             Alan Hayward  <alan.hayward@arm.com>
20354             David Sherwood  <david.sherwood@arm.com>
20356         * coretypes.h (fixed_size_mode): Declare.
20357         (fixed_size_mode_pod): New typedef.
20358         * builtins.h (target_builtins::x_apply_args_mode)
20359         (target_builtins::x_apply_result_mode): Change type to
20360         fixed_size_mode_pod.
20361         * builtins.c (apply_args_size, apply_result_size, result_vector)
20362         (expand_builtin_apply_args_1, expand_builtin_apply)
20363         (expand_builtin_return): Update accordingly.
20365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20367         * cse.c (hash_rtx_cb): Hash only the encoded elements.
20368         * cselib.c (cselib_hash_rtx): Likewise.
20369         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20370         CONST_VECTOR encoding.
20372 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20373             Jeff Law  <law@redhat.com>
20375         PR target/83641
20376         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20377         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20378         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20379         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20381         PR target/83641
20382         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20383         explicitly probe *sp in a noreturn function if there were any callee
20384         register saves or frame pointer is needed.
20386 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20388         PR debug/83621
20389         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20390         BLKmode for ternary, binary or unary expressions.
20392         PR debug/83645
20393         * var-tracking.c (delete_vta_debug_insn): New inline function.
20394         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20395         insns from get_insns () to NULL instead of each bb separately.
20396         Use delete_vta_debug_insn.  No longer static.
20397         (vt_debug_insns_local, variable_tracking_main_1): Adjust
20398         delete_vta_debug_insns callers.
20399         * rtl.h (delete_vta_debug_insns): Declare.
20400         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20401         instead of variable_tracking_main.
20403 2018-01-03  Martin Sebor  <msebor@redhat.com>
20405         PR tree-optimization/83603
20406         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20407         arguments past the endof the argument list in functions declared
20408         without a prototype.
20409         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20410         Avoid checking when arguments are null.
20412 2018-01-03  Martin Sebor  <msebor@redhat.com>
20414         PR c/83559
20415         * doc/extend.texi (attribute const): Fix a typo.
20416         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20417         issuing -Wsuggest-attribute for void functions.
20419 2018-01-03  Martin Sebor  <msebor@redhat.com>
20421         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20422         offset_int::from instead of wide_int::to_shwi.
20423         (maybe_diag_overlap): Remove assertion.
20424         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20425         * gimple-ssa-sprintf.c (format_directive): Same.
20426         (parse_directive): Same.
20427         (sprintf_dom_walker::compute_format_length): Same.
20428         (try_substitute_return_value): Same.
20430 2018-01-03  Jeff Law  <law@redhat.com>
20432         PR middle-end/83654
20433         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20434         non-constant residual for zero at runtime and avoid probing in
20435         that case.  Reorganize code for trailing problem to mirror handling
20436         of the residual.
20438 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20440         PR tree-optimization/83501
20441         * tree-ssa-strlen.c (get_string_cst): New.
20442         (handle_char_store): Call get_string_cst.
20444 2018-01-03  Martin Liska  <mliska@suse.cz>
20446         PR tree-optimization/83593
20447         * tree-ssa-strlen.c: Include tree-cfg.h.
20448         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20449         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20450         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20451         to false.
20452         (strlen_dom_walker::before_dom_children): Call
20453         gimple_purge_dead_eh_edges. Dump tranformation with details
20454         dump flags.
20455         (strlen_dom_walker::before_dom_children): Update call by adding
20456         new argument cleanup_eh.
20457         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20459 2018-01-03  Martin Liska  <mliska@suse.cz>
20461         PR ipa/83549
20462         * cif-code.def (VARIADIC_THUNK): New enum value.
20463         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20464         thunks.
20466 2018-01-03  Jan Beulich  <jbeulich@suse.com>
20468         * sse.md (mov<mode>_internal): Tighten condition for when to use
20469         vmovdqu<ssescalarsize> for TI and OI modes.
20471 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20473         Update copyright years.
20475 2018-01-03  Martin Liska  <mliska@suse.cz>
20477         PR ipa/83594
20478         * ipa-visibility.c (function_and_variable_visibility): Skip
20479         functions with noipa attribure.
20481 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
20483         * gcc.c (process_command): Update copyright notice dates.
20484         * gcov-dump.c (print_version): Ditto.
20485         * gcov.c (print_version): Ditto.
20486         * gcov-tool.c (print_version): Ditto.
20487         * gengtype.c (create_file): Ditto.
20488         * doc/cpp.texi: Bump @copying's copyright year.
20489         * doc/cppinternals.texi: Ditto.
20490         * doc/gcc.texi: Ditto.
20491         * doc/gccint.texi: Ditto.
20492         * doc/gcov.texi: Ditto.
20493         * doc/install.texi: Ditto.
20494         * doc/invoke.texi: Ditto.
20496 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20498         * vector-builder.h (vector_builder::m_full_nelts): Change from
20499         unsigned int to poly_uint64.
20500         (vector_builder::full_nelts): Update prototype accordingly.
20501         (vector_builder::new_vector): Likewise.
20502         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20503         (vector_builder::operator ==): Likewise.
20504         (vector_builder::finalize): Likewise.
20505         * int-vector-builder.h (int_vector_builder::int_vector_builder):
20506         Take the number of elements as a poly_uint64 rather than an
20507         unsigned int.
20508         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20509         from unsigned int to poly_uint64.
20510         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20511         (vec_perm_indices::new_vector): Likewise.
20512         (vec_perm_indices::length): Likewise.
20513         (vec_perm_indices::nelts_per_input): Likewise.
20514         (vec_perm_indices::input_nelts): Likewise.
20515         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20516         number of elements per input as a poly_uint64 rather than an
20517         unsigned int.  Use the original encoding for variable-length
20518         vectors, rather than clamping each individual element.
20519         For the second and subsequent elements in each pattern,
20520         clamp the step and base before clamping their sum.
20521         (vec_perm_indices::series_p): Handle polynomial element counts.
20522         (vec_perm_indices::all_in_range_p): Likewise.
20523         (vec_perm_indices_to_tree): Likewise.
20524         (vec_perm_indices_to_rtx): Likewise.
20525         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20526         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20527         (tree_vector_builder::new_binary_operation): Handle polynomial
20528         element counts.  Return false if we need to know the number
20529         of elements at compile time.
20530         * fold-const.c (fold_vec_perm): Punt if the number of elements
20531         isn't known at compile time.
20533 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20535         * vec-perm-indices.h (vec_perm_builder): Change element type
20536         from HOST_WIDE_INT to poly_int64.
20537         (vec_perm_indices::element_type): Update accordingly.
20538         (vec_perm_indices::clamp): Handle polynomial element_types.
20539         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20540         (vec_perm_indices::all_in_range_p): Likewise.
20541         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20542         than shwi trees.
20543         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20544         polynomial vec_perm_indices element types.
20545         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20546         * fold-const.c (fold_vec_perm): Likewise.
20547         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20548         * tree-vect-generic.c (lower_vec_perm): Likewise.
20549         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20550         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20551         element type to HOST_WIDE_INT.
20553 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20554             Alan Hayward  <alan.hayward@arm.com>
20555             David Sherwood  <david.sherwood@arm.com>
20557         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20558         rather than an int.  Use plus_constant.
20559         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20560         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20563             Alan Hayward  <alan.hayward@arm.com>
20564             David Sherwood  <david.sherwood@arm.com>
20566         * calls.c (emit_call_1, expand_call): Change struct_value_size from
20567         a HOST_WIDE_INT to a poly_int64.
20569 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20570             Alan Hayward  <alan.hayward@arm.com>
20571             David Sherwood  <david.sherwood@arm.com>
20573         * calls.c (load_register_parameters): Cope with polynomial
20574         mode sizes.  Require a constant size for BLKmode parameters
20575         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
20576         forces a parameter to be padded at the lsb end in order to
20577         fill a complete number of words, require the parameter size
20578         to be ordered wrt UNITS_PER_WORD.
20580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20581             Alan Hayward  <alan.hayward@arm.com>
20582             David Sherwood  <david.sherwood@arm.com>
20584         * reload1.c (spill_stack_slot_width): Change element type
20585         from unsigned int to poly_uint64_pod.
20586         (alter_reg): Treat mode sizes as polynomial.
20588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20589             Alan Hayward  <alan.hayward@arm.com>
20590             David Sherwood  <david.sherwood@arm.com>
20592         * reload.c (complex_word_subreg_p): New function.
20593         (reload_inner_reg_of_subreg, push_reload): Use it.
20595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20596             Alan Hayward  <alan.hayward@arm.com>
20597             David Sherwood  <david.sherwood@arm.com>
20599         * lra-constraints.c (process_alt_operands): Reject matched
20600         operands whose sizes aren't ordered.
20601         (match_reload): Refer to this check here.
20603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20604             Alan Hayward  <alan.hayward@arm.com>
20605             David Sherwood  <david.sherwood@arm.com>
20607         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20608         that the mode size is in the set {1, 2, 4, 8, 16}.
20610 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20611             Alan Hayward  <alan.hayward@arm.com>
20612             David Sherwood  <david.sherwood@arm.com>
20614         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20615         Use plus_constant instead of gen_rtx_PLUS.
20617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20618             Alan Hayward  <alan.hayward@arm.com>
20619             David Sherwood  <david.sherwood@arm.com>
20621         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20622         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20623         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20624         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20625         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20626         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20627         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20628         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20629         * config/i386/i386.c (ix86_push_rounding): ...this new function.
20630         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20631         a poly_int64.
20632         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20633         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20634         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20635         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20636         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20637         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20638         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20639         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20640         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20641         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20642         function.
20643         * expr.c (emit_move_resolve_push): Treat the input and result
20644         of PUSH_ROUNDING as a poly_int64.
20645         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20646         (emit_push_insn): Likewise.
20647         * lra-eliminations.c (mark_not_eliminable): Likewise.
20648         * recog.c (push_operand): Likewise.
20649         * reload1.c (elimination_effects): Likewise.
20650         * rtlanal.c (nonzero_bits1): Likewise.
20651         * calls.c (store_one_arg): Likewise.  Require the padding to be
20652         known at compile time.
20654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20655             Alan Hayward  <alan.hayward@arm.com>
20656             David Sherwood  <david.sherwood@arm.com>
20658         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20659         Use plus_constant instead of gen_rtx_PLUS.
20661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20662             Alan Hayward  <alan.hayward@arm.com>
20663             David Sherwood  <david.sherwood@arm.com>
20665         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20666         rather than an int.
20668 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20669             Alan Hayward  <alan.hayward@arm.com>
20670             David Sherwood  <david.sherwood@arm.com>
20672         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20673         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20674         via stack temporaries.  Treat the mode size as polynomial too.
20676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20677             Alan Hayward  <alan.hayward@arm.com>
20678             David Sherwood  <david.sherwood@arm.com>
20680         * expr.c (expand_expr_real_2): When handling conversions involving
20681         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20682         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
20683         as a poly_uint64 too.
20685 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20686             Alan Hayward  <alan.hayward@arm.com>
20687             David Sherwood  <david.sherwood@arm.com>
20689         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20692             Alan Hayward  <alan.hayward@arm.com>
20693             David Sherwood  <david.sherwood@arm.com>
20695         * combine.c (can_change_dest_mode): Handle polynomial
20696         REGMODE_NATURAL_SIZE.
20697         * expmed.c (store_bit_field_1): Likewise.
20698         * expr.c (store_constructor): Likewise.
20699         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20700         and polynomial REGMODE_NATURAL_SIZE.
20701         (gen_lowpart_common): Likewise.
20702         * reginfo.c (record_subregs_of_mode): Likewise.
20703         * rtlanal.c (read_modify_subreg_p): Likewise.
20705 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20706             Alan Hayward  <alan.hayward@arm.com>
20707             David Sherwood  <david.sherwood@arm.com>
20709         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20710         numbers of elements.
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         * match.pd: Cope with polynomial numbers of vector elements.
20718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20719             Alan Hayward  <alan.hayward@arm.com>
20720             David Sherwood  <david.sherwood@arm.com>
20722         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20723         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
20730         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20731         (ipa_simd_modify_function_body): Likewise.
20733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20734             Alan Hayward  <alan.hayward@arm.com>
20735             David Sherwood  <david.sherwood@arm.com>
20737         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20738         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20739         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20740         (expand_vector_condition, vector_element): Likewise.
20741         (subparts_gt): New function.
20742         (get_compute_type): Use subparts_gt.
20743         (count_type_subparts): Delete.
20744         (expand_vector_operations_1): Use subparts_gt instead of
20745         count_type_subparts.
20747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20748             Alan Hayward  <alan.hayward@arm.com>
20749             David Sherwood  <david.sherwood@arm.com>
20751         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20752         (vect_compile_time_alias): ...this new function.  Do the calculation
20753         on poly_ints rather than trees.
20754         (vect_prune_runtime_alias_test_list): Update call accordingly.
20756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20757             Alan Hayward  <alan.hayward@arm.com>
20758             David Sherwood  <david.sherwood@arm.com>
20760         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20761         numbers of units.
20762         (vect_schedule_slp_instance): Likewise.
20764 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20765             Alan Hayward  <alan.hayward@arm.com>
20766             David Sherwood  <david.sherwood@arm.com>
20768         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20769         constant and extern definitions for variable-length vectors.
20770         (vect_get_constant_vectors): Note that the number of units
20771         is known to be constant.
20773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20774             Alan Hayward  <alan.hayward@arm.com>
20775             David Sherwood  <david.sherwood@arm.com>
20777         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20778         of units as polynomial.  Choose between WIDE and NARROW based
20779         on multiple_p.
20781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20782             Alan Hayward  <alan.hayward@arm.com>
20783             David Sherwood  <david.sherwood@arm.com>
20785         * tree-vect-stmts.c (simd_clone_subparts): New function.
20786         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20788 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20789             Alan Hayward  <alan.hayward@arm.com>
20790             David Sherwood  <david.sherwood@arm.com>
20792         * tree-vect-stmts.c (vectorizable_call): Treat the number of
20793         vectors as polynomial.  Use build_index_vector for
20794         IFN_GOMP_SIMD_LANE.
20796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20797             Alan Hayward  <alan.hayward@arm.com>
20798             David Sherwood  <david.sherwood@arm.com>
20800         * tree-vect-stmts.c (get_load_store_type): Treat the number of
20801         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20802         for variable-length vectors.
20803         (vectorizable_mask_load_store): Treat the number of units as
20804         polynomial, asserting that it is constant if the condition has
20805         already been enforced.
20806         (vectorizable_store, vectorizable_load): Likewise.
20808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20809             Alan Hayward  <alan.hayward@arm.com>
20810             David Sherwood  <david.sherwood@arm.com>
20812         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20813         of units as polynomial.  Punt if we can't tell at compile time
20814         which vector contains the final result.
20816 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20817             Alan Hayward  <alan.hayward@arm.com>
20818             David Sherwood  <david.sherwood@arm.com>
20820         * tree-vect-loop.c (vectorizable_induction): Treat the number
20821         of units as polynomial.  Punt on SLP inductions.  Use an integer
20822         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
20823         cast of such a series for variable-length floating-point
20824         reductions.
20826 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20827             Alan Hayward  <alan.hayward@arm.com>
20828             David Sherwood  <david.sherwood@arm.com>
20830         * tree.h (build_index_vector): Declare.
20831         * tree.c (build_index_vector): New function.
20832         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20833         of units as polynomial, forcibly converting it to a constant if
20834         vectorizable_reduction has already enforced the condition.
20835         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
20836         to create a {1,2,3,...} vector.
20837         (vectorizable_reduction): Treat the number of units as polynomial.
20838         Choose vectype_in based on the largest scalar element size rather
20839         than the smallest number of units.  Enforce the restrictions
20840         relied on above.
20842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20843             Alan Hayward  <alan.hayward@arm.com>
20844             David Sherwood  <david.sherwood@arm.com>
20846         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20847         number of units as polynomial.
20849 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20850             Alan Hayward  <alan.hayward@arm.com>
20851             David Sherwood  <david.sherwood@arm.com>
20853         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20854         * target.def (autovectorize_vector_sizes): Return the vector sizes
20855         by pointer, using vector_sizes rather than a bitmask.
20856         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20857         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20858         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20859         Likewise.
20860         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20861         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20862         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20863         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20864         * omp-general.c (omp_max_vf): Likewise.
20865         * omp-low.c (omp_clause_aligned_alignment): Likewise.
20866         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20867         * tree-vect-loop.c (vect_analyze_loop): Likewise.
20868         * tree-vect-slp.c (vect_slp_bb): Likewise.
20869         * doc/tm.texi: Regenerate.
20870         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20871         to a poly_uint64.
20872         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20873         the vector size as a poly_uint64 rather than an unsigned int.
20874         (current_vector_size): Change from an unsigned int to a poly_uint64.
20875         (get_vectype_for_scalar_type): Update accordingly.
20876         * tree.h (build_truth_vector_type): Take the size and number of
20877         units as a poly_uint64 rather than an unsigned int.
20878         (build_vector_type): Add a temporary overload that takes
20879         the number of units as a poly_uint64 rather than an unsigned int.
20880         * tree.c (make_vector_type): Likewise.
20881         (build_truth_vector_type): Take the number of units as a poly_uint64
20882         rather than an unsigned int.
20884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20885             Alan Hayward  <alan.hayward@arm.com>
20886             David Sherwood  <david.sherwood@arm.com>
20888         * target.def (get_mask_mode): Take the number of units and length
20889         as poly_uint64s rather than unsigned ints.
20890         * targhooks.h (default_get_mask_mode): Update accordingly.
20891         * targhooks.c (default_get_mask_mode): Likewise.
20892         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20893         * doc/tm.texi: Regenerate.
20895 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20896             Alan Hayward  <alan.hayward@arm.com>
20897             David Sherwood  <david.sherwood@arm.com>
20899         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20900         * omp-general.c (omp_max_vf): Likewise.
20901         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20902         (expand_omp_simd): Handle polynomial safelen.
20903         * omp-low.c (omplow_simd_context): Add a default constructor.
20904         (omplow_simd_context::max_vf): Change from int to poly_uint64.
20905         (lower_rec_simd_input_clauses): Update accordingly.
20906         (lower_rec_input_clauses): Likewise.
20908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20909             Alan Hayward  <alan.hayward@arm.com>
20910             David Sherwood  <david.sherwood@arm.com>
20912         * tree-vectorizer.h (vect_nunits_for_cost): New function.
20913         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20914         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20915         (vect_analyze_slp_cost): Likewise.
20916         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20917         (vect_model_load_cost): Likewise.
20919 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20920             Alan Hayward  <alan.hayward@arm.com>
20921             David Sherwood  <david.sherwood@arm.com>
20923         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20924         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20925         from an unsigned int * to a poly_uint64_pod *.
20926         (calculate_unrolling_factor): New function.
20927         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
20929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20930             Alan Hayward  <alan.hayward@arm.com>
20931             David Sherwood  <david.sherwood@arm.com>
20933         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20934         from an unsigned int to a poly_uint64.
20935         (_loop_vec_info::slp_unrolling_factor): Likewise.
20936         (_loop_vec_info::vectorization_factor): Change from an int
20937         to a poly_uint64.
20938         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20939         (vect_get_num_vectors): New function.
20940         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20941         (vect_get_num_copies): Use vect_get_num_vectors.
20942         (vect_analyze_data_ref_dependences): Change max_vf from an int *
20943         to an unsigned int *.
20944         (vect_analyze_data_refs): Change min_vf from an int * to a
20945         poly_uint64 *.
20946         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20947         than an unsigned HOST_WIDE_INT.
20948         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20949         (vect_analyze_data_ref_dependence): Change max_vf from an int *
20950         to an unsigned int *.
20951         (vect_analyze_data_ref_dependences): Likewise.
20952         (vect_compute_data_ref_alignment): Handle polynomial vf.
20953         (vect_enhance_data_refs_alignment): Likewise.
20954         (vect_prune_runtime_alias_test_list): Likewise.
20955         (vect_shift_permute_load_chain): Likewise.
20956         (vect_supportable_dr_alignment): Likewise.
20957         (dependence_distance_ge_vf): Take the vectorization factor as a
20958         poly_uint64 rather than an unsigned HOST_WIDE_INT.
20959         (vect_analyze_data_refs): Change min_vf from an int * to a
20960         poly_uint64 *.
20961         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20962         vfm1 as a poly_uint64 rather than an int.  Make the same change
20963         for the returned bound_scalar.
20964         (vect_gen_vector_loop_niters): Handle polynomial vf.
20965         (vect_do_peeling): Likewise.  Update call to
20966         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20967         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20968         be constant.
20969         * tree-vect-loop.c (vect_determine_vectorization_factor)
20970         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20971         (vect_get_known_peeling_cost): Likewise.
20972         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20973         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20974         (vect_transform_loop): Likewise.  Use the lowest possible VF when
20975         updating the upper bounds of the loop.
20976         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
20977         rather than an int.
20978         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20979         polynomial unroll factors.
20980         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20981         (vect_make_slp_decision): Likewise.
20982         (vect_supported_load_permutation_p): Likewise, and polynomial
20983         vf too.
20984         (vect_analyze_slp_cost): Handle polynomial vf.
20985         (vect_slp_analyze_node_operations): Likewise.
20986         (vect_slp_analyze_bb_1): Likewise.
20987         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20988         than an unsigned HOST_WIDE_INT.
20989         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20990         (vectorizable_load): Handle polynomial vf.
20991         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20992         a poly_uint64.
20993         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
20996             Alan Hayward  <alan.hayward@arm.com>
20997             David Sherwood  <david.sherwood@arm.com>
20999         * match.pd: Handle bit operations involving three constants
21000         and try to fold one pair.
21002 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21004         * tree-vect-loop-manip.c: Include gimple-fold.h.
21005         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21006         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
21007         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21008         Add a path that uses a step of VF instead of 1, but disable it
21009         for now.
21010         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21011         and niters_no_overflow parameters.  Update calls to
21012         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21013         Create a new SSA name if the latter choses to use a ste other
21014         than zero, and return it via niters_vector_mult_vf_var.
21015         * tree-vect-loop.c (vect_transform_loop): Update calls to
21016         vect_do_peeling, vect_gen_vector_loop_niters and
21017         slpeel_make_loop_iterate_ntimes.
21018         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21019         (vect_gen_vector_loop_niters): Update declarations after above changes.
21021 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
21023         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21024         128-bit round to integer instructions.
21025         (ceil<mode>2): Likewise.
21026         (btrunc<mode>2): Likewise.
21027         (round<mode>2): Likewise.
21029 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21031         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21032         unaligned VSX load/store on P8/P9.
21033         (expand_block_clear): Allow the use of unaligned VSX
21034         load/store on P8/P9.
21036 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21038         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21039         New function.
21040         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21041         swap associated with both a load and a store.
21043 2018-01-02  Andrew Waterman  <andrew@sifive.com>
21045         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21046         * config/riscv/riscv.md (clear_cache): Use it.
21048 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
21050         * web.c: Remove out-of-date comment.
21052 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21054         * expr.c (fixup_args_size_notes): Check that any existing
21055         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21056         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21057         (emit_single_push_insn): ...here.
21059 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21061         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21062         (const_vector_encoded_nelts): New function.
21063         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21064         (const_vector_int_elt, const_vector_elt): Declare.
21065         * emit-rtl.c (const_vector_int_elt_1): New function.
21066         (const_vector_elt): Likewise.
21067         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21068         of CONST_VECTOR_ELT.
21070 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21072         * expr.c: Include rtx-vector-builder.h.
21073         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21074         directly on the tree encoding.
21075         (const_vector_from_tree): Likewise.
21076         * optabs.c: Include rtx-vector-builder.h.
21077         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21078         sequence of "u" values.
21079         * vec-perm-indices.c: Include rtx-vector-builder.h.
21080         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21081         directly on the vec_perm_indices encoding.
21083 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21085         * doc/rtl.texi (const_vector): Describe new encoding scheme.
21086         * Makefile.in (OBJS): Add rtx-vector-builder.o.
21087         * rtx-vector-builder.h: New file.
21088         * rtx-vector-builder.c: Likewise.
21089         * rtl.h (rtx_def::u2): Add a const_vector field.
21090         (CONST_VECTOR_NPATTERNS): New macro.
21091         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21092         (CONST_VECTOR_DUPLICATE_P): Likewise.
21093         (CONST_VECTOR_STEPPED_P): Likewise.
21094         (CONST_VECTOR_ENCODED_ELT): Likewise.
21095         (const_vec_duplicate_p): Check for a duplicated vector encoding.
21096         (unwrap_const_vec_duplicate): Likewise.
21097         (const_vec_series_p): Check for a non-duplicated vector encoding.
21098         Say that the function only returns true for integer vectors.
21099         * emit-rtl.c: Include rtx-vector-builder.h.
21100         (gen_const_vec_duplicate_1): Delete.
21101         (gen_const_vector): Call gen_const_vec_duplicate instead of
21102         gen_const_vec_duplicate_1.
21103         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21104         (gen_const_vec_duplicate): Use rtx_vector_builder.
21105         (gen_const_vec_series): Likewise.
21106         (gen_rtx_CONST_VECTOR): Likewise.
21107         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21108         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21109         Build a new vector rather than modifying a CONST_VECTOR in-place.
21110         (handle_special_swappables): Update call accordingly.
21111         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21112         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21113         Build a new vector rather than modifying a CONST_VECTOR in-place.
21114         (handle_special_swappables): Update call accordingly.
21116 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21118         * simplify-rtx.c (simplify_const_binary_operation): Use
21119         CONST_VECTOR_ELT instead of XVECEXP.
21121 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21123         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21124         the selector elements to be different from the data elements
21125         if the selector is a VECTOR_CST.
21126         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21127         ssizetype for the selector.
21129 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21131         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21132         before testing each element individually.
21133         * tree-vect-generic.c (lower_vec_perm): Likewise.
21135 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21137         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21138         * selftest-run-tests.c (selftest::run_tests): Call it.
21139         * vector-builder.h (vector_builder::operator ==): New function.
21140         (vector_builder::operator !=): Likewise.
21141         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21142         (vec_perm_indices::all_from_input_p): New function.
21143         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21144         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21145         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21146         instead of reading the VECTOR_CST directly.  Detect whether both
21147         vector inputs are the same before constructing the vec_perm_indices,
21148         and update the number of inputs argument accordingly.  Use the
21149         utility functions added above.  Only construct sel2 if we need to.
21151 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21153         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21154         the broadcast of the low byte.
21155         (expand_mult_highpart): Use an explicit encoding for the permutes.
21156         * optabs-query.c (can_mult_highpart_p): Likewise.
21157         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21158         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21159         (vectorizable_bswap): Likewise.
21160         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21161         explicit encoding for the power-of-2 permutes.
21162         (vect_permute_store_chain): Likewise.
21163         (vect_grouped_load_supported): Likewise.
21164         (vect_permute_load_chain): Likewise.
21166 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21168         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21169         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21170         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21171         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21172         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21173         (vect_gen_perm_mask_any): Likewise.
21175 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21177         * int-vector-builder.h: New file.
21178         * vec-perm-indices.h: Include int-vector-builder.h.
21179         (vec_perm_indices): Redefine as an int_vector_builder.
21180         (auto_vec_perm_indices): Delete.
21181         (vec_perm_builder): Redefine as a stand-alone class.
21182         (vec_perm_indices::vec_perm_indices): New function.
21183         (vec_perm_indices::clamp): Likewise.
21184         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21185         (vec_perm_indices::new_vector): New function.
21186         (vec_perm_indices::new_expanded_vector): Update for new
21187         vec_perm_indices class.
21188         (vec_perm_indices::rotate_inputs): New function.
21189         (vec_perm_indices::all_in_range_p): Operate directly on the
21190         encoded form, without computing elided elements.
21191         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21192         encoding.  Update for new vec_perm_indices class.
21193         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21194         the given vec_perm_builder.
21195         (expand_vec_perm_var): Update vec_perm_builder constructor.
21196         (expand_mult_highpart): Use vec_perm_builder instead of
21197         auto_vec_perm_indices.
21198         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21199         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
21200         or double series encoding as appropriate.
21201         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21202         vec_perm_indices instead of auto_vec_perm_indices.
21203         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21204         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21205         (vect_permute_store_chain): Likewise.
21206         (vect_grouped_load_supported): Likewise.
21207         (vect_permute_load_chain): Likewise.
21208         (vect_shift_permute_load_chain): Likewise.
21209         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21210         (vect_transform_slp_perm_load): Likewise.
21211         (vect_schedule_slp_instance): Likewise.
21212         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21213         (vectorizable_mask_load_store): Likewise.
21214         (vectorizable_bswap): Likewise.
21215         (vectorizable_store): Likewise.
21216         (vectorizable_load): Likewise.
21217         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21218         vec_perm_indices instead of auto_vec_perm_indices.  Use
21219         tree_to_vec_perm_builder to read the vector from a tree.
21220         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21221         vec_perm_builder instead of a vec_perm_indices.
21222         (have_whole_vector_shift): Use vec_perm_builder and
21223         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
21224         truncation to calc_vec_perm_mask_for_shift.
21225         (vect_create_epilog_for_reduction): Likewise.
21226         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21227         from auto_vec_perm_indices to vec_perm_indices.
21228         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21229         instead of changing individual elements.
21230         (aarch64_vectorize_vec_perm_const): Use new_vector to install
21231         the vector in d.perm.
21232         * config/arm/arm.c (expand_vec_perm_d::perm): Change
21233         from auto_vec_perm_indices to vec_perm_indices.
21234         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21235         instead of changing individual elements.
21236         (arm_vectorize_vec_perm_const): Use new_vector to install
21237         the vector in d.perm.
21238         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21239         Update vec_perm_builder constructor.
21240         (rs6000_expand_interleave): Likewise.
21241         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21242         (rs6000_expand_interleave): Likewise.
21244 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21246         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21247         to qimode could truncate the indices.
21248         * optabs.c (expand_vec_perm_var): Likewise.
21250 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21252         * Makefile.in (OBJS): Add vec-perm-indices.o.
21253         * vec-perm-indices.h: New file.
21254         * vec-perm-indices.c: Likewise.
21255         * target.h (vec_perm_indices): Replace with a forward class
21256         declaration.
21257         (auto_vec_perm_indices): Move to vec-perm-indices.h.
21258         * optabs.h: Include vec-perm-indices.h.
21259         (expand_vec_perm): Delete.
21260         (selector_fits_mode_p, expand_vec_perm_var): Declare.
21261         (expand_vec_perm_const): Declare.
21262         * target.def (vec_perm_const_ok): Replace with...
21263         (vec_perm_const): ...this new hook.
21264         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21265         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21266         * doc/tm.texi: Regenerate.
21267         * optabs.def (vec_perm_const): Delete.
21268         * doc/md.texi (vec_perm_const): Likewise.
21269         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21270         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21271         expand_vec_perm for constant permutation vectors.  Assert that
21272         the mode of variable permutation vectors is the integer equivalent
21273         of the mode that is being permuted.
21274         * optabs-query.h (selector_fits_mode_p): Declare.
21275         * optabs-query.c: Include vec-perm-indices.h.
21276         (selector_fits_mode_p): New function.
21277         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21278         is defined, instead of checking whether the vec_perm_const_optab
21279         exists.  Use targetm.vectorize.vec_perm_const instead of
21280         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
21281         fit in the vector mode before using a variable permute.
21282         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21283         vec_perm_indices instead of an rtx.
21284         (expand_vec_perm): Replace with...
21285         (expand_vec_perm_const): ...this new function.  Take the selector
21286         as a vec_perm_indices rather than an rtx.  Also take the mode of
21287         the selector.  Update call to shift_amt_for_vec_perm_mask.
21288         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21289         Use vec_perm_indices::new_expanded_vector to expand the original
21290         selector into bytes.  Check whether the indices fit in the vector
21291         mode before using a variable permute.
21292         (expand_vec_perm_var): Make global.
21293         (expand_mult_highpart): Use expand_vec_perm_const.
21294         * fold-const.c: Includes vec-perm-indices.h.
21295         * tree-ssa-forwprop.c: Likewise.
21296         * tree-vect-data-refs.c: Likewise.
21297         * tree-vect-generic.c: Likewise.
21298         * tree-vect-loop.c: Likewise.
21299         * tree-vect-slp.c: Likewise.
21300         * tree-vect-stmts.c: Likewise.
21301         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21302         Delete.
21303         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21304         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21305         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21306         (aarch64_vectorize_vec_perm_const): ...this new function.
21307         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21308         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21309         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21310         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21311         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21312         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21313         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21314         into...
21315         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
21316         check for NEON modes.
21317         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21318         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21319         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21320         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21321         into...
21322         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
21323         the old VEC_PERM_CONST conditions.
21324         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21325         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21326         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21327         (ia64_vectorize_vec_perm_const_ok): Merge into...
21328         (ia64_vectorize_vec_perm_const): ...this new function.
21329         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21330         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21331         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21332         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21333         * config/mips/mips.c (mips_expand_vec_perm_const)
21334         (mips_vectorize_vec_perm_const_ok): Merge into...
21335         (mips_vectorize_vec_perm_const): ...this new function.
21336         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21337         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21338         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21339         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21340         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21341         (rs6000_expand_vec_perm_const): Delete.
21342         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21343         Delete.
21344         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21345         (altivec_expand_vec_perm_const_le): Take each operand individually.
21346         Operate on constant selectors rather than rtxes.
21347         (altivec_expand_vec_perm_const): Likewise.  Update call to
21348         altivec_expand_vec_perm_const_le.
21349         (rs6000_expand_vec_perm_const): Delete.
21350         (rs6000_vectorize_vec_perm_const_ok): Delete.
21351         (rs6000_vectorize_vec_perm_const): New function.
21352         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21353         an element count and rtx array.
21354         (rs6000_expand_extract_even): Update call accordingly.
21355         (rs6000_expand_interleave): Likewise.
21356         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21357         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21358         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21359         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21360         (rs6000_expand_vec_perm_const): Delete.
21361         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21362         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21363         (altivec_expand_vec_perm_const_le): Take each operand individually.
21364         Operate on constant selectors rather than rtxes.
21365         (altivec_expand_vec_perm_const): Likewise.  Update call to
21366         altivec_expand_vec_perm_const_le.
21367         (rs6000_expand_vec_perm_const): Delete.
21368         (rs6000_vectorize_vec_perm_const_ok): Delete.
21369         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
21370         reference to the SPE evmerge intructions.
21371         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21372         an element count and rtx array.
21373         (rs6000_expand_extract_even): Update call accordingly.
21374         (rs6000_expand_interleave): Likewise.
21375         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21376         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21377         new function.
21378         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21380 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21382         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21383         vector mode and that that mode matches the mode of the data
21384         being permuted.
21385         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21386         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
21387         directly using expand_vec_perm_1 when forcing selectors into
21388         registers.
21389         (expand_vec_perm_var): New function, split out from expand_vec_perm.
21391 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21393         * optabs-query.h (can_vec_perm_p): Delete.
21394         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21395         * optabs-query.c (can_vec_perm_p): Split into...
21396         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21397         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21398         particular selector is valid.
21399         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21400         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21401         (vect_grouped_load_supported): Likewise.
21402         (vect_shift_permute_load_chain): Likewise.
21403         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21404         (vect_transform_slp_perm_load): Likewise.
21405         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21406         (vectorizable_bswap): Likewise.
21407         (vect_gen_perm_mask_checked): Likewise.
21408         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
21409         implementations of variable permutation vectors into account
21410         when deciding which selector to use.
21411         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21412         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21413         with a false third argument.
21414         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21415         to test whether the constant selector is valid and can_vec_perm_var_p
21416         to test whether a variable selector is valid.
21418 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21420         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21421         * optabs-query.c (can_vec_perm_p): Likewise.
21422         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21423         instead of vec_perm_indices.
21424         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21425         (vect_gen_perm_mask_checked): Likewise,
21426         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21427         (vect_gen_perm_mask_checked): Likewise,
21429 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
21431         * optabs-query.h (qimode_for_vec_perm): Declare.
21432         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21433         (qimode_for_vec_perm): ...this new function.
21434         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21436 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21438         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21439         does not have a conditional at the top.
21441 2018-01-02  Richard Biener  <rguenther@suse.de>
21443         * ipa-inline.c (big_speedup_p): Fix expression.
21445 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21447         PR target/81616
21448         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21449         for generic 4->6.
21451 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
21453         PR target/81616
21454         Generic tuning.
21455         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21456         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21457         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21458         cond_taken_branch_cost 3->4.
21460 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
21462         PR tree-optimization/83581
21463         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21464         TODO_cleanup_cfg if any changes have been made.
21466         PR middle-end/83608
21467         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21468         convert_modes if target mode has the right side, but different mode
21469         class.
21471         PR middle-end/83609
21472         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21473         last argument when extracting from CONCAT.  If either from_real or
21474         from_imag is NULL, use expansion through memory.  If result is not
21475         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21476         the parts directly to inner mode, if even that fails, use expansion
21477         through memory.
21479         PR middle-end/83623
21480         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21481         check for bswap in mode rather than HImode and use that in expand_unop
21482         too.
21484 Copyright (C) 2018 Free Software Foundation, Inc.
21486 Copying and distribution of this file, with or without modification,
21487 are permitted in any medium without royalty provided the copyright
21488 notice and this notice are preserved.