1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
5 a vect_def_type for the first argument.
6 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
7 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8 operand if it isn't defined by a vectorized statement.
9 (vect_build_gather_load_calls): Remove the mask_dt argument and
10 update calls to vect_get_vec_def_for_stmt_copy.
11 (vectorizable_bswap): Likewise the dt argument.
12 (vectorizable_call): Update calls to vectorizable_bswap and
13 vect_get_vec_def_for_stmt_copy.
14 (vectorizable_simd_clone_call, vectorizable_assignment)
15 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
16 (vectorizable_comparison): Update calls to
17 vect_get_vec_def_for_stmt_copy.
18 (vectorizable_store): Likewise. Remove now-unnecessary calls to
20 (vect_get_loop_based_defs): Remove dt argument and update call
21 to vect_get_vec_def_for_stmt_copy.
22 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
23 and vect_get_vec_def_for_stmt_copy.
24 (vectorizable_load): Update calls to vect_build_gather_load_calls
25 and vect_get_vec_def_for_stmt_copy.
26 * tree-vect-loop.c (vect_create_epilog_for_reduction)
27 (vectorizable_reduction, vectorizable_live_operation): Update calls
28 to vect_get_vec_def_for_stmt_copy.
30 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
32 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
33 and gimple stmt arguments with a stmt_vec_info.
34 (vect_record_base_alignments): Update calls accordingly.
35 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
36 and gimple stmt arguments with a stmt_vec_info.
37 (vect_build_slp_tree_1): Remove vinfo argument and update call
38 to vect_record_max_nunits.
39 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
40 and vect_record_max_nunits.
42 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
44 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
45 file and take a stmt_vec_info instead of a gimple stmt.
46 (supportable_widening_operation, vect_finish_replace_stmt)
47 (vect_finish_stmt_generation, vect_get_store_rhs)
48 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
49 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
50 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
51 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
52 (vect_create_data_ref_ptr, bump_vector_ptr)
53 (vect_permute_store_chain, vect_setup_realignment)
54 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
55 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
56 (vectorizable_reduction, vectorizable_induction)
57 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
58 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
59 than gimple stmts as arguments.
60 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
61 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
62 (can_group_stmts_p, vect_check_gather_scatter)
63 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
64 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
65 (vect_permute_load_chain, vect_shift_permute_load_chain)
66 (vect_transform_grouped_load)
67 (vect_record_grouped_load_vectors): Likewise.
68 * tree-vect-loop.c (vect_fixup_reduc_chain)
69 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
70 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
71 (vectorizable_reduction, vectorizable_induction)
72 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
73 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
74 (vect_get_load_store_mask): Likewise.
75 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
76 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
77 * tree-vect-stmts.c (vect_mark_relevant)
78 (is_simple_and_all_uses_invariant)
79 (exist_non_indexing_operands_for_use_p, process_use)
80 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
81 (vect_get_vec_def_for_operand, vect_get_vec_defs)
82 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
83 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
84 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
85 (get_negative_load_store_type, get_load_store_type)
86 (vect_check_load_store_mask, vect_check_store_rhs)
87 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
88 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
89 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
90 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
91 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
92 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
93 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
94 (supportable_widening_operation): Likewise.
96 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
98 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
99 a stmt_vec_info instead of a gcall.
100 (vect_check_gather_scatter): Update call accordingly.
101 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
103 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
104 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
105 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
106 instead of a gimple stmt.
107 (vect_transform_loop): Update calls accordingly.
108 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
109 stmt_vec_infos instead of gimple stmts.
110 (vect_analyze_slp_instance): Update use accordingly.
111 * tree-vect-stmts.c (read_vector_array, write_vector_array)
112 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
113 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
114 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
115 (vect_gen_widened_results_half, vect_get_loop_based_defs)
116 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
117 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
120 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
122 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
123 of the worklist from a vector of gimple stmts to a vector of
125 * tree-vect-stmts.c (vect_mark_relevant, process_use)
126 (vect_mark_stmts_to_be_vectorized): Likewise
128 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
130 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
131 statement before passing it to vect_analyze_stmt.
132 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
133 the chain of phi vector definitions. Track the exit phi via its
135 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
136 STMT_VINFO_REDUC_DEF.
137 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
138 stmt_vec_infos to handle the statement chains.
139 (vect_get_slp_defs): Record the first statement in the node
140 using a stmt_vec_info.
141 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
142 statements here and pass their stmt_vec_info down to subroutines.
143 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
144 down to vect_finish_stmt_generation.
145 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
146 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
147 stmt_vec_infos to subroutines.
148 (vect_remove_stores): Use stmt_vec_infos to handle the statement
151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
153 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
154 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
155 (vect_permute_store_chain, vect_setup_realignment)
156 (vect_permute_load_chain, vect_shift_permute_load_chain)
157 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
158 stmts internally, and when passing values to other vectorizer routines.
159 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
160 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
161 (vect_analyze_loop_operations, get_initial_def_for_reduction)
162 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
163 (vectorizable_reduction, vectorizable_induction)
164 (vectorizable_live_operation, vect_transform_loop_stmt)
165 (vect_transform_loop): Likewise.
166 * tree-vect-patterns.c (vect_reassociating_reduction_p)
167 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
168 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
169 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
170 (vect_slp_analyze_node_operations_1): Likewise.
171 * tree-vect-stmts.c (vect_mark_relevant, process_use)
172 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
173 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
174 (vect_finish_stmt_generation_1, get_group_load_store_type)
175 (get_load_store_type, vect_build_gather_load_calls)
176 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
177 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
178 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
179 (vectorizable_store, vectorizable_load, vectorizable_condition)
180 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
181 (supportable_widening_operation): Likewise.
182 (vect_get_vector_types_for_stmt): Likewise.
183 * tree-vectorizer.h (vect_dr_behavior): Likewise.
185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
187 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
188 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
189 (vect_permute_store_chain, vect_permute_load_chain)
190 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
191 repeated stmt_vec_info lookups.
192 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
193 (vect_update_ivs_after_vectorizer): Likewise.
194 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
195 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
196 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
197 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
198 (vect_bb_slp_scalar_cost): Likewise.
199 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
203 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
204 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
205 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
206 to get gassigns and gcalls, rather than operating on generc gimple
208 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
209 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
210 (vectorizable_load, vect_analyze_stmt): Likewise.
211 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
213 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
215 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
216 return stmt_vec_infos rather than gimple stmts. Do not accept
218 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
220 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
221 Update use of get_later_stmt.
222 (vect_get_constant_vectors): Update call accordingly.
223 (vect_schedule_slp_instance): Likewise
224 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
225 (vect_slp_analyze_instance_dependence): Likewise.
226 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
230 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
231 (stmt_info_for_cost::stmt_info): ...this new field.
232 (add_stmt_costs): Update accordingly.
233 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
234 (vect_get_known_peeling_cost): Likewise.
235 (vect_estimate_min_profitable_iters): Likewise.
236 * tree-vect-stmts.c (record_stmt_cost): Likewise.
238 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
240 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
241 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
242 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
244 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
246 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
248 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
249 a gimple stmt to a stmt_vec_info.
250 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
254 * tree-vectorizer.h (vec_info::grouped_stores): Change from
255 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
256 (_loop_vec_info::reduction_chains): Likewise.
257 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
259 * tree-vect-slp.c (vect_analyze_slp): Likewise.
261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
263 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
264 a gimple stmt to a stmt_vec_info.
265 (_stmt_vec_info::next_element): Likewise.
266 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
267 (vect_slp_analyze_and_verify_node_alignment)
268 (vect_analyze_group_access_1, vect_analyze_group_access)
269 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
270 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
271 (vect_supportable_dr_alignment): Update accordingly.
272 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
273 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
274 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
275 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
276 * tree-vect-slp.c (vect_build_slp_tree_1)
277 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
278 (vect_split_slp_store_group, vect_analyze_slp_instance)
279 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
280 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
281 (get_group_load_store_type, get_load_store_type)
282 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
283 (vect_transform_stmt, vect_remove_stores): Likewise.
285 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
287 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
289 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
290 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
291 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
292 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
293 (vector_alignment_reachable_p, vect_get_data_access_cost)
294 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
295 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
296 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
297 (vect_analyze_group_access_1, vect_analyze_group_access)
298 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
299 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
300 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
301 result of vect_dr_stmt and use the stmt_vec_info instead of
302 the associated gimple stmt.
303 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
304 (vect_gen_prolog_loop_niters): Likewise.
305 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
307 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
309 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
310 to a vec<stmt_vec_info>.
311 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
312 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
314 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
315 to a vec<stmt_vec_info>.
316 (bst_traits::value_type, bst_traits::value_type): Likewise.
317 (bst_traits::hash): Update accordingly.
318 (vect_get_and_check_slp_defs): Change the stmts parameter from
319 a vec<gimple *> to a vec<stmt_vec_info>.
320 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
321 (vect_build_slp_tree): Likewise.
322 (vect_build_slp_tree_2): Likewise. Update uses of
323 SLP_TREE_SCALAR_STMTS.
324 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
325 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
326 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
327 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
328 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
329 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
330 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
331 (vect_get_constant_vectors, vect_get_slp_defs)
332 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
333 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
334 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
335 instead of gimple stmts.
336 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
337 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
338 (vect_slp_analyze_instance_dependence): Update uses of
339 SLP_TREE_SCALAR_STMTS.
340 (vect_slp_analyze_and_verify_node_alignment): Likewise.
341 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
342 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
343 (get_initial_defs_for_reduction): Likewise.
344 (vect_create_epilog_for_reduction): Likewise.
345 (vectorize_fold_left_reduction): Likewise.
346 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
347 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
348 (can_vectorize_live_stmts): Likewise.
350 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
352 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
353 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
354 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
356 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
358 (gather_scalar_reductions): Update after above interface changes.
359 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
360 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
362 (vect_force_simple_reduction): Likewise.
363 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
364 LOOP_VINFO_REDUCTIONS.
365 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
367 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
369 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
370 a gimple stmt to a stmt_vec_info.
371 * tree-vect-loop.c (vect_active_double_reduction_p)
372 (vect_force_simple_reduction, vectorizable_reduction): Update
375 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
377 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
378 vec<gimple *> to a vec<stmt_vec_info>.
379 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
380 the reduction_phis argument from a vec<gimple *> to a
382 (vectorizable_reduction): Likewise the phis local variable that
383 is passed to vect_create_epilog_for_reduction. Update for new type
384 of SLP_TREE_VEC_STMTS.
385 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
386 (vectorizable_live_operation): Likewise.
387 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
388 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
390 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
392 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
393 a gimple stmt to a stmt_vec_info.
394 (vectorizable_condition, vectorizable_live_operation)
395 (vectorizable_reduction, vectorizable_induction): Pass back the
396 vectorized statement as a stmt_vec_info.
397 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
398 use of STMT_VINFO_VEC_STMT.
399 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
400 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
401 as stmt_vec_infos rather than gimple stmts.
402 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
404 (vectorizable_live_operation): Likewise.
405 (vectorizable_reduction, vectorizable_induction): Likewise,
406 updating use of STMT_VINFO_VEC_STMT.
407 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
408 of STMT_VINFO_VEC_STMT.
409 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
410 (vectorizable_simd_clone_call, vectorizable_conversion)
411 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
412 (vectorizable_store, vectorizable_load, vectorizable_condition)
413 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
414 from a gimple stmt to a stmt_vec_info.
415 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
416 pointer to a stmt_vec_info to the vectorizable_* routines.
418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
420 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
421 a gimple stmt to a stmt_vec_info.
422 (is_pattern_stmt_p): Update accordingly.
423 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
424 (vect_record_grouped_load_vectors): Likewise.
425 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
426 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
427 (vect_model_reduction_cost): Likewise.
428 (vect_create_epilog_for_reduction): Likewise.
429 (vectorizable_reduction, vectorizable_induction): Likewise.
430 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
431 Return the stmt_vec_info for the pattern statement.
432 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
433 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
434 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
435 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
436 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
437 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
438 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
439 (free_stmt_vec_info, vect_is_simple_use): Likewise.
441 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
443 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
444 (vect_finish_stmt_generation): Likewise.
445 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
446 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
447 (vect_build_gather_load_calls): Use the return value of the above
448 functions instead of a separate call to vinfo_for_stmt. Use narrow
449 scopes for the input gimple stmt and wider scopes for the associated
450 stmt_vec_info. Use vec_info::lookup_def when setting these
451 stmt_vec_infos from an SSA_NAME definition.
452 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
453 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
454 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
455 (vectorizable_store, vectorizable_load, vectorizable_condition)
456 (vectorizable_comparison): Likewise.
457 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
458 (vectorizable_reduction): Likewise.
460 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
462 * tree-vectorizer.h (vect_is_simple_use): Add an optional
463 stmt_vec_info * parameter before the optional gimple **.
464 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
465 (process_use, vect_get_vec_def_for_operand_1): Update callers.
466 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
467 * tree-vect-loop.c (vectorizable_reduction): Likewise.
468 (vectorizable_live_operation): Likewise.
469 * tree-vect-patterns.c (type_conversion_p): Likewise.
470 (vect_look_through_possible_promotion): Likewise.
471 (vect_recog_rotate_pattern): Likewise.
472 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
474 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
476 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
477 a typedef to a wrapper class.
478 (NULL_STMT_VEC_INFO): New macro.
479 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
480 (stmt_vec_info::operator*): New function.
481 (stmt_vec_info::operator gimple *): Likewise.
482 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
483 (add_stmt_costs): Likewise.
484 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
485 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
486 (vect_get_known_peeling_cost): Likewise.
487 (vect_estimate_min_profitable_iters): Likewise.
488 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
489 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
490 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
491 (vectorizable_store, free_stmt_vec_infos): Likewise.
492 (new_stmt_vec_info): Change return type of xcalloc to
495 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
497 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
498 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
499 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
500 a single_imm_use-based sequence.
501 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
503 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
505 * tree-vectorizer.h (vec_info::lookup_def): Declare.
506 * tree-vectorizer.c (vec_info::lookup_def): New function.
507 * tree-vect-patterns.c (vect_get_internal_def): Use it.
508 (vect_widened_op_tree): Likewise.
509 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
510 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
511 (vectorizable_reduction): Likewise.
512 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
514 (vect_is_slp_reduction): Update calls accordingly. Use
515 vec_info::lookup_def.
516 (vect_is_simple_reduction): Likewise
517 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
519 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
521 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
522 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
523 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
525 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
526 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
527 (vect_update_vf_for_slp, vect_analyze_loop_operations)
528 (vect_is_slp_reduction, vectorizable_induction)
529 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
530 * tree-vect-patterns.c (vect_init_pattern_stmt):
531 (vect_determine_min_output_precision_1, vect_determine_precisions)
532 (vect_pattern_recog): Likewise.
533 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
534 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
535 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
536 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
537 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
538 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
539 info field from a loop to a loop_vec_info.
541 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
543 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
544 (vec_info::add_stmt): Declare.
545 * tree-vectorizer.c (vec_info::add_stmt): New function.
546 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
547 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
548 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
549 (vectorizable_induction): Likewise.
550 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
551 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
552 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
553 (vectorizable_load): Likewise.
554 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
555 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
556 (vect_recog_gather_scatter_pattern): Likewise.
557 (append_pattern_def_seq): Likewise. Remove a check that is
558 performed by add_stmt itself.
560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
562 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
563 which make_ssa_name was called with new_stmt before new_stmt
566 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
568 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
570 (vect_is_slp_reduction): ...here...
571 (vect_is_simple_reduction): ...and here. Remove repetition of tests
572 that are already known to be false.
574 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
576 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
577 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
578 STMT_VINFO_NUM_SLP_USES when it's true.
579 (vect_free_slp_instance): Add a final_p parameter and pass it to
581 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
582 (vect_analyze_slp_instance): Likewise.
583 (vect_slp_analyze_operations): Likewise.
584 (vect_slp_analyze_bb_1): Likewise.
585 * tree-vectorizer.c (vec_info): Likewise.
586 * tree-vect-loop.c (vect_transform_loop): Likewise.
588 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
590 * tree-vect-loop.c (vectorizable_reduction): Assert that the
591 function is not called for second and subsequent members of
594 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
596 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
597 cases for nested loops from here to ...
598 (vect_create_epilog_for_reduction): ...here. Only call
599 vect_is_simple_use for inner-loop reductions.
601 2018-07-31 Martin Liska <mliska@suse.cz>
603 PR gcov-profile/85338
604 PR gcov-profile/85350
605 PR gcov-profile/85372
606 * profile.c (struct location_triplet): New.
607 (struct location_triplet_hash): Likewise.
608 (output_location): Do not output a BB that
609 is already recorded for a line.
610 (branch_prob): Use streamed_locations.
612 2018-07-31 Martin Liska <mliska@suse.cz>
614 PR gcov-profile/85370
615 * coverage.c (coverage_begin_function): Do not mark target
616 clones as artificial functions.
618 2018-07-31 Martin Liska <mliska@suse.cz>
620 PR gcov-profile/83813
621 PR gcov-profile/84758
622 PR gcov-profile/85217
623 PR gcov-profile/85332
624 * profile.c (branch_prob): Do not record GOTO expressions
625 for GIMPLE statements which locations are already streamed.
627 2018-07-31 Olivier Hainque <hainque@adacore.com>
629 * gcc.c (handle_spec_function): Accept a soft_matched_part
630 argument, as do_spec_1. Pass it down to ...
631 (eval_spec_function): Accept a soft_matched_part argument,
632 and pass it down to ...
633 (do_spec_2): Accept a soft_matched_part argument, and pass
634 it down to do_spec_1.
635 (do_spec_1): Pass soft_matched_part to handle_spec_function.
636 (handle_braces): Update call to handle_spec_function.
637 (driver::set_up_specs): Update calls to do_spec_2.
638 (compare_debug_dump_opt_spec_function): Likewise.
639 (compare_debug_self_opt_spec_function): Likewise.
641 2018-07-31 Olivier Hainque <hainque@adacore.com>
643 * common.opt (nolibc): New option.
644 * doc/invoke.texi (Link Options): Document it.
645 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
646 * config/alpha/linux.h: Likewise.
647 * config/arc/elf.h: Likewise.
648 * config/arm/uclinux-elf.h: Likewise.
649 * config/arm/unknown-elf.h: Likewise.
650 * config/avr/avrlibc.h: Likewise.
651 * config/bfin/bfin.h: Likewise.
652 * config/bfin/linux.h: Likewise.
653 * config/bfin/uclinux.h: Likewise.
654 * config/darwin.h: Likewise.
655 * config/darwin10.h: Likewise.
656 * config/darwin12.h: Likewise.
657 * config/gnu-user.h: Likewise.
658 * config/lm32/uclinux-elf.h: Likewise.
659 * config/pa/pa-hpux11.h: Likewise.
660 * config/pa/pa64-hpux.h: Likewise.
661 * config/sparc/sparc.h: Likewise.
663 2018-07-31 Olivier Hainque <hainque@adacore.com>
665 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
668 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
671 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
674 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
676 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
677 terminated string literal.
679 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
681 PR rtl-optimization/85160
682 * combine.c (is_just_move): New function.
683 (try_combine): Allow combining two instructions into two if neither of
684 the original instructions was a move.
686 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
689 * doc/extend.texi (Global Register Variables): Discourage use of type
691 (Local Register Variables): Likewise.
693 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
695 PR tree-optimization/86506
696 * hwint.h (ceil_log2): Resync with hwint.c implementation.
698 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
701 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
702 hard_regno, make sure no insn between `from` and `to` clobbers it.
704 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
705 Tom de Vries <tdevries@suse.de>
707 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
708 (PTX_DEFAULT_RUNTIME_DIM): ... this.
709 (nvptx_goacc_validate_dims): Set default worker and gang dims to
710 PTX_DEFAULT_RUNTIME_DIM.
711 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
713 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
715 * config/pa/pa.c (pa_output_addr_vec): Align address table.
716 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
717 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
719 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
721 * config/rs6000/constraints.md (wG constraint): Delete, no longer
723 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
724 predicate to reflect toc fusion has been deleted.
725 (toc_fusion_mem_raw): Delete, no longer used.
726 (toc_fusion_mem_wrapped): Likewise.
727 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
729 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
730 Delete, no longer used.
731 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
732 meant to be used for toc fusion.
733 (rs6000_debug_print_mode): Delete toc fusion debugging.
734 (rs6000_debug_reg_global): Likewise.
735 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
736 fusion and secondary reload support that were never used.
737 (rs6000_option_override_internal): Delete TOC fusion, that was only
738 partially defined, and it did not work unless you also used the
740 (rs6000_legitimate_address_p): Delete TOC fusion support.
741 (rs6000_opt_masks): Likewise.
742 (fusion_wrap_memory_address): Delete function, no longer used.
743 (fusion_split_address); Delete TOC fusion support.
744 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
745 longer used with toc fusion being deleted.
746 (TARGET_TOC_FUSION_FP): Likewise.
747 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
749 (toc fusion spliter): Delete TOC fusion support.
750 (toc_fusionload_<mode>): Likewise.
751 (toc_fusionload_di): Likewise.
752 (fusion_gpr_load_<mode>): Delete generator function, this insn no
753 longer needs to be named. Rename predicate to delete TOC fusion.
754 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
755 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
756 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
757 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
758 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
760 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
762 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
763 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
764 __int128 in built-in function prototypes.
765 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
766 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
768 2018-07-27 Martin Sebor <msebor@redhat.com>
770 PR tree-optimization/86696
771 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
772 types, including enums.
773 (handle_char_store): Be prepared for the above function to fail.
775 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
777 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
778 when optimization level is lower than 2 or optimize for size.
780 2018-07-26 Martin Sebor <msebor@redhat.com>
782 PR tree-optimization/86043
783 PR tree-optimization/86042
784 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
785 (get_string_cst_length): Rename...
786 (get_min_string_length): ...to this. Add argument.
787 (handle_char_store): Extend to handle multi-character stores by
789 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
790 * tree.h (initializer_zerop): Add argument.
792 2018-07-26 Jakub Jelinek <jakub@redhat.com>
795 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
796 declare target to variables if they have always,{to,from,tofrom} map
799 2018-07-26 Martin Liska <mliska@suse.cz>
802 * lto-wrapper.c: Add linker_output as prefix
803 for ltrans_output_file.
805 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
807 PR rtl-optimization/85805
808 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
809 value for hard registers if that was written in the same mode.
811 2018-07-26 Martin Liska <mliska@suse.cz>
813 PR gcov-profile/86536
814 * gcov.c (format_gcov): Use printf format %.*f directly
815 and do not handle special values.
817 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
819 * common/config/arc/arc-common.c (arc_option_optimization_table):
820 Update default optimizations for size.
822 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
824 * config/arc/arc.md (movsf_insn): Add short instruction selection.
825 * config/arc/constraints.md (CfZ): New constraint.
826 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
827 (subsf3_fpu): Likewise.
828 (cmpsf_fpu): Likewise.
829 (cmpsf_fpu_uneq): Likewise.
831 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
833 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
835 (arc_is_uncached_mem_p): uncached applies to both the variable and
838 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
840 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
843 2018-07-25 David Malcolm <dmalcolm@redhat.com>
845 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
846 field "m_scopes" from vec to auto_vec.
848 2018-07-25 Martin Liska <mliska@suse.cz>
850 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
853 2018-07-25 Richard Biener <rguenther@suse.de>
856 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
857 special wrt context_die late.
858 (gen_subprogram_die): Re-use DIEs in local scope.
860 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
862 PR tree-optimization/86644
863 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
865 2018-07-25 Martin Liska <mliska@suse.cz>
868 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
869 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
871 2018-07-25 Martin Liska <mliska@suse.cz>
874 * params.def: Explain ASan abbreviation and provide
875 a documentation link.
877 2018-07-24 Martin Sebor <msebor@redhat.com>
879 PR tree-optimization/86622
880 PR tree-optimization/86532
881 * builtins.h (string_length): Declare.
882 * builtins.c (c_strlen): Correct handling of non-constant offsets.
883 (check_access): Be prepared for non-constant length ranges.
884 (string_length): Make extern.
885 * expr.c (string_constant): Only handle the minor non-constant
886 array index. Use string_constant to compute the length of
887 a generic string constant.
889 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
891 PR tree-optimization/86618
892 * tree-vect-stmts.c (vectorizable_call): Don't take the address
893 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
895 2018-07-24 David Malcolm <dmalcolm@redhat.com>
897 PR tree-optimization/86636
898 * json.cc (json::object::set): Fix comment. Add assertions.
899 (json::array::append): Move here from json.h. Add comment and an
901 (json::string::string): Likewise.
902 * json.h (json::array::append): Move to json.cc.
903 (json::string::string): Likewise.
904 * optinfo-emit-json.cc
905 (optrecord_json_writer::impl_location_to_json): Assert that we
906 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
907 wrapper around it. Expand the location once, rather than three
909 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
910 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
912 (optrecord_json_writer::optinfo_to_json): Likewise, in four
913 places. Fix some overlong lines.
915 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
917 * config/aarch64/aarch64-simd.md
918 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
919 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
920 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
921 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
922 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
923 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
924 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
925 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
926 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
928 2018-07-24 Jakub Jelinek <jakub@redhat.com>
931 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
932 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
933 and abs_d == d, do the power of two handling if profitable.
935 2018-07-24 Richard Biener <rguenther@suse.de>
937 * match.pd: Add BIT_FIELD_REF canonicalizations.
939 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
942 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
944 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
946 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
947 terminated STRING_CST object.
949 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
951 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
953 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
955 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
956 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
957 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
958 the elements into a register.
959 (rs6000_split_v4si_init_di_reg): Delete.
960 (rs6000_split_v4si_init): Delete.
961 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
962 (vsx_init_v4si): Rewrite as a define_expand.
964 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
966 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
967 zero_extend argument from memory): New.
969 2018-07-22 Martin Sebor <msebor@redhat.com>
972 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
973 diagnosing calls with unknown arguments unless -Walloca-larger-than
974 is restricted to less than PTRDIFF_MAX bytes.
976 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
978 * doc/gcov.texi (Invoking Gcov): Editorial changes.
980 2018-07-20 David Malcolm <dmalcolm@redhat.com>
982 * pretty-print.c (text_info::set_location): Remove redundant
983 "line_table" parameter from call to rich_location::set_range.
985 2018-07-20 Martin Sebor <msebor@redhat.com>
988 * builtins.c (expand_builtin_alloca): Adjust.
989 * calls.c (alloc_max_size): Simplify.
990 * cgraphunit.c (cgraph_node::expand): Adjust.
991 * common.opt (larger_than_size, warn_frame_larger_than): Remove
993 (frame_larger_than_size): Same.
994 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
995 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
997 * doc/invoke.texi (GCC Command Options): Document option arguments.
998 Explain byte-size arguments and suffixes.
999 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1000 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1001 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1002 * doc/options.texi (UInteger): Expand.
1003 (Host_Wide_Int, ByteSize): Document new properties.
1004 * final.c (final_start_function_1): Include sizes in an error message.
1005 * function.c (frame_offset_overflow): Same.
1006 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1007 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1008 Diagnose unbounded alloca calls only for limits of less than
1010 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1011 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1013 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1014 only for limits of less than PTRDIFF_MAX.
1015 * langhooks-def.h (lhd_handle_option): Change function argument
1017 * langhooks.c (lhd_handle_option): Same.
1018 * langhooks.h (handle_option): Same.
1019 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1021 (var_type, var_type_struct): Same.
1022 (var_set): Handle ByteSize flag.
1023 * optc-gen.awk: Add comments to output to ease debugging. Make
1024 use of HOST_WIDE_INT where appropriate.
1025 * opts-gen-save.awk: Use %lx to format unsigned long.
1026 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1027 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1028 arguments. Parse bytes-size suffixes.
1029 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1030 (enum_value_to_arg): Same.
1031 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1032 (handle_option): Adjust.
1033 (generate_option): Change function argument to HOST_WIDE_INT.
1034 (cmdline_handle_error): Adjust.
1035 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1036 (set_option): Change function argument to HOST_WIDE_INT.
1037 (option_enabled): Handle cl_host_wide_int.
1038 (get_option_state): Handle CLVC_SIZE.
1039 (control_warning_option): Same.
1040 * opts.c (common_handle_option): Change function argument to
1041 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1042 OPT_Wvla_larger_than_.
1043 * opts.h (enum cl_var_type): Add an enumerator.
1044 * stor-layout.c (layout_decl): Print a more meaningful warning.
1045 * toplev.c (output_stack_usage): Adjust.
1047 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1049 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1050 call to inline_expand_builtin_string_cmp.
1051 (expand_builtin_strcmp): Likewise.
1052 (expand_builtin_strncmp): Likewise.
1053 (inline_string_cmp): Delete the last parameter, change char_type_node
1054 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1056 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1057 the inlining expansion on target where the type of the call has same or
1058 narrower precision than unsigned char.
1060 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1062 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1063 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1064 * common.opt (fsave-optimization-record): New option.
1065 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1066 * doc/invoke.texi (-fsave-optimization-record): New option.
1067 * dumpfile.c: Include "optinfo-emit-json.h".
1068 (struct kv_pair): Move to coretypes.h.
1069 (optgroup_options): Make non-static.
1070 (dump_context::end_scope): Call
1071 optimization_records_maybe_pop_dump_scope.
1072 * dumpfile.h (optgroup_options): New decl.
1073 * json.cc: New file.
1075 * optinfo-emit-json.cc: New file.
1076 * optinfo-emit-json.h: New file.
1077 * optinfo.cc: Include "optinfo-emit-json.h".
1078 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1079 (optinfo_enabled_p): Check optimization_records_enabled_p.
1080 (optinfo_wants_inlining_info_p): Likewise.
1081 * optinfo.h: Update comment.
1082 * profile-count.c (profile_quality_as_string): New function.
1083 * profile-count.h (profile_quality_as_string): New decl.
1084 (profile_count::quality): New accessor.
1085 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1086 and optinfo_emit_json_cc_tests.
1087 * selftest.h (selftest::json_cc_tests): New decl.
1088 (selftest::optinfo_emit_json_cc_tests): New decl.
1089 * toplev.c: Include "optinfo-emit-json.h".
1090 (compile_file): Call optimization_records_finish.
1091 (do_compile): Call optimization_records_start.
1092 * tree-ssa-live.c: Include optinfo.h.
1093 (remove_unused_scope_block_p): Retain inlining information if
1094 optinfo_wants_inlining_info_p returns true.
1096 2018-07-20 Richard Biener <rguenther@suse.de>
1099 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1100 to cover -flto-partition=none.
1102 2018-07-20 Martin Liska <mliska@suse.cz>
1104 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1105 (get_decl_source_range): Remove unused function.
1107 2018-07-20 Richard Biener <rguenther@suse.de>
1109 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1110 (struct vn_phi_s): Likewise.
1111 (struct vn_reference_s): Likewise.
1112 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1113 for searching the slot of an entry known to be in the hash itself.
1114 (vn_phi_hasher::equal): Likewise.
1115 (vn_reference_hasher::equal): Likewise.
1116 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1118 (optimistic_info, current_info): Remove, keeping only valid_info.
1119 (vn_reference_lookup_1): Remove fallback lookup.
1120 (vn_reference_lookup_2): Likewise.
1121 (vn_nary_op_lookup_1): Likewise.
1122 (vn_phi_lookup): Likewise.
1123 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1125 (vn_reference_insert): Adjust, chain the inserted hash element
1126 at last_inserted_ref.
1127 (vn_reference_insert_pieces): Likewise.
1128 (visit_reference_op_call): Likewise.
1129 (vn_nary_op_insert_into): Chain the inserted hash element at
1131 (vn_nary_op_insert_pieces): Adjust.
1132 (vn_nary_op_insert): Likewise.
1133 (vn_nary_op_insert_stmt): Likewise.
1134 (vn_phi_insert): Adjust, chain the inserted hash element at
1136 (process_scc): Remove clearing and copying the optimistic
1137 table. Instead remove elements inserted during an optimistic
1138 iteration from the single table we maintain.
1139 (init_scc_vn): Adjust.
1140 (free_scc_vn): Likewise.
1141 (sccvn_dom_walker::record_cond): Likewise.
1142 (sccvn_dom_walker::after_dom_children): Likewise.
1144 2018-07-19 Martin Sebor <msebor@redhat.com>
1146 PR tree-optimization/84047
1147 PR tree-optimization/83776
1148 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1149 (check_array_bounds): Call it.
1151 2018-07-19 Martin Sebor <msebor@redhat.com>
1153 * align.h (align_flags): Use member initialization.
1155 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1157 * Makefile.in (OBJS): Add optinfo.o.
1158 * coretypes.h (class symtab_node): New forward decl.
1159 (struct cgraph_node): New forward decl.
1160 (class varpool_node): New forward decl.
1161 * dump-context.h: New file.
1162 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1164 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1165 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1166 (set_alt_dump_file): Likewise.
1167 (dump_context::~dump_context): New dtor.
1168 (dump_gimple_stmt): Move implementation to...
1169 (dump_context::dump_gimple_stmt): ...this new member function.
1170 Add the stmt to any pending optinfo, creating one if need be.
1171 (dump_gimple_stmt_loc): Move implementation to...
1172 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1173 Start a new optinfo and add the stmt to it.
1174 (dump_gimple_expr): Move implementation to...
1175 (dump_context::dump_gimple_expr): ...this new member function.
1176 Add the stmt to any pending optinfo, creating one if need be.
1177 (dump_gimple_expr_loc): Move implementation to...
1178 (dump_context::dump_gimple_expr_loc): ...this new member function.
1179 Start a new optinfo and add the stmt to it.
1180 (dump_generic_expr): Move implementation to...
1181 (dump_context::dump_generic_expr): ...this new member function.
1182 Add the tree to any pending optinfo, creating one if need be.
1183 (dump_generic_expr_loc): Move implementation to...
1184 (dump_context::dump_generic_expr_loc): ...this new member
1185 function. Add the tree to any pending optinfo, creating one if
1187 (dump_printf): Move implementation to...
1188 (dump_context::dump_printf_va): ...this new member function. Add
1189 the text to any pending optinfo, creating one if need be.
1190 (dump_printf_loc): Move implementation to...
1191 (dump_context::dump_printf_loc_va): ...this new member function.
1192 Start a new optinfo and add the stmt to it.
1193 (dump_dec): Move implementation to...
1194 (dump_context::dump_dec): ...this new member function. Add the
1195 value to any pending optinfo, creating one if need be.
1196 (dump_context::dump_symtab_node): New member function.
1197 (dump_context::get_scope_depth): New member function.
1198 (dump_context::begin_scope): New member function.
1199 (dump_context::end_scope): New member function.
1200 (dump_context::ensure_pending_optinfo): New member function.
1201 (dump_context::begin_next_optinfo): New member function.
1202 (dump_context::end_any_optinfo): New member function.
1203 (dump_context::s_current): New global.
1204 (dump_context::s_default): New global.
1205 (dump_scope_depth): Delete global.
1206 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1207 (dump_symtab_node): New function.
1208 (get_dump_scope_depth): Reimplement in terms of dump_context.
1209 (dump_begin_scope): Likewise.
1210 (dump_end_scope): Likewise.
1211 (selftest::temp_dump_context::temp_dump_context): New ctor.
1212 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1213 (selftest::verify_item): New function.
1214 (ASSERT_IS_TEXT): New macro.
1215 (ASSERT_IS_TREE): New macro.
1216 (ASSERT_IS_GIMPLE): New macro.
1217 (selftest::test_capture_of_dump_calls): New test.
1218 (selftest::dumpfile_c_tests): Call it.
1219 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1220 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1221 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1222 descriptive comment.
1223 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1224 (dump_node, dump_bb): Move these unrelated decls.
1225 (class dump_manager): Add leading comment.
1226 * optinfo.cc: New file.
1227 * optinfo.h: New file.
1229 2018-07-19 Michael Collison <michael.collison@arm.com>
1230 Richard Henderson <rth@redhat.com>
1232 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1233 (subti): Handle op1 zero.
1234 (subvti4, usub4ti4): New.
1235 (*sub<GPI>3_compare1_imm): New.
1236 (sub<GPI>3_carryinCV): New.
1237 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1238 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1240 2018-07-19 Michael Collison <michael.collison@arm.com>
1241 Richard Henderson <rth@redhat.com>
1243 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1244 (addti3): Create simpler code if low part is already known to be 0.
1245 (addvti4, uaddvti4): New.
1246 (*add<GPI>3_compareC_cconly_imm): New.
1247 (*add<GPI>3_compareC_cconly): New.
1248 (*add<GPI>3_compareC_imm): New.
1249 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1250 handle constants within this pattern..
1251 (*add<GPI>3_compareV_cconly_imm): New.
1252 (*add<GPI>3_compareV_cconly): New.
1253 (*add<GPI>3_compareV_imm): New.
1254 (add<GPI>3_compareV): New.
1255 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1256 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1257 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1258 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1259 with 'comparison' operator.
1260 (*add<GPI>3_compareV_cconly_imm): Ditto.
1261 (*add<GPI>3_compareV_cconly): Ditto.
1262 (*add<GPI>3_compareV_imm): Ditto.
1263 (add<GPI>3_compareV): Ditto.
1264 (add<mode>3_carryinC): Ditto.
1265 (*add<mode>3_carryinC_zero): Ditto.
1266 (*add<mode>3_carryinC): Ditto.
1267 (add<mode>3_carryinV): Ditto.
1268 (*add<mode>3_carryinV_zero): Ditto.
1269 (*add<mode>3_carryinV): Ditto.
1271 2018-07-19 Michael Collison <michael.collison@arm.com>
1272 Richard Henderson <rth@redhat.com>
1274 * config/aarch64/aarch64-modes.def (CC_V): New.
1275 * config/aarch64/aarch64-protos.h
1276 (aarch64_addti_scratch_regs): Declare
1277 (aarch64_subvti_scratch_regs): Declare.
1278 (aarch64_expand_subvti): Declare.
1279 (aarch64_gen_unlikely_cbranch): Declare
1280 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1281 for signed overflow using CC_Vmode.
1282 (aarch64_get_condition_code_1): Handle CC_Vmode.
1283 (aarch64_gen_unlikely_cbranch): New function.
1284 (aarch64_addti_scratch_regs): New function.
1285 (aarch64_subvti_scratch_regs): New function.
1286 (aarch64_expand_subvti): New function.
1288 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1290 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1292 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1293 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1296 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1299 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1300 address check not strict.
1302 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1304 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1306 (store_pair_lanes<mode>): Likewise.
1307 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1308 enum value 'ADDR_QUERY_LDP_STP_N'.
1309 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1310 (aarch64_print_address_internal): Add declaration.
1311 (aarch64_print_ldpstp_address): Remove.
1312 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1313 (aarch64_print_operand): Change printing of 'y'.
1314 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1315 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1316 'true' rather than '1'.
1317 * config/aarch64/constraints.md (Uml): Likewise.
1318 (Uml): Rename to Umn.
1321 2018-07-19 Richard Biener <rguenther@suse.de>
1323 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1325 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1326 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1327 (vn_reference_hasher): Likewise.
1328 (struct vn_tables_s): Remove obstack and alloc-pool members.
1329 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1330 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1331 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1332 (vn_reference_insert_pieces): Likewise.
1333 (alloc_vn_nary_op_noinit): Adjust.
1334 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1335 (vn_phi_eq): Adjust.
1336 (shared_lookup_phiargs): Remove.
1337 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1338 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1339 (visit_reference_op_call): Likewise.
1340 (copy_nary, copy_phi, copy_reference): Remove.
1341 (process_scc): Rewind the obstack when iterating. Do not
1342 copy the elements to valid_info but just move them from one
1343 hashtable to the other.
1344 (allocate_vn_table): Adjust.
1345 (free_vn_table): Likewise.
1346 (init_scc_vn): Likewise.
1347 (free_scc_vn): Likewise.
1349 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1352 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1353 indirect_return as function type attribute.
1354 (ix86_attribute_table): Change indirect_return to function
1356 * doc/extend.texi: Update indirect_return attribute.
1358 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1360 * wide-int.h (widest2_int): New.
1361 * gimple-fold.c (arith_overflowed_p): Use it.
1362 * tree.h (widest2_int_cst): New.
1363 * tree-vrp.c (wide_int_binop_overflow): Rename from
1364 vrp_int_const_binop.
1365 Rewrite to work on trees.
1366 (extract_range_from_multiplicative_op_1): Abstract code to...
1367 (wide_int_range_min_max): ...here.
1368 (wide_int_range_cross_product): ...and here.
1369 (extract_range_from_binary_expr_1): Abstract overflow code to...
1370 (wide_int_range_mult_wrapping): ...here.
1371 * tree-vrp.h (wide_int_range_cross_product): New.
1372 (wide_int_range_mult_wrapping): New.
1374 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1375 Julia Koval <julia.koval@intel.com>
1377 * config/i386/x86-tune-costs.h (skylake_memcpy,
1378 skylake_memset): Replace rep_prefix with unrolling for size 512.
1380 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1383 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1386 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1388 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1389 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1390 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1391 previously known as "PowerPC AltiVec Built-in Functions". Move
1392 some material to new subsubsections "PowerPC AltiVec Built-in
1393 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1395 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1396 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1397 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1398 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1400 2018-07-18 Richard Biener <rguenther@suse.de>
1402 PR tree-optimization/86557
1403 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1406 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1408 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1410 2018-07-17 Jeff Law <law@redhat.com>
1412 * config/arm/arm.c (get_label_padding): Update for recent
1413 changes to label_to_alignment.
1415 PR tree-optimization/86010
1416 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1418 * config/mips/mips.c (vr4130_align_insns): Update for recent
1419 changes to label_to_alignment.
1421 * config/frv/frv.c (frv_label_align): Update for recent changes
1422 to label_to_alignment.
1424 * config/nios2/nios2.c (nios2_label_align): Update for recent
1425 changes which dropped ALIGN_LABELS_LOG.
1427 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1429 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1430 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1432 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1434 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1435 deprecated align_labels_log.
1437 2018-07-17 Richard Biener <rguenther@suse.de>
1440 * dwarf2out.c (init_sections_and_labels): Always generate
1441 a debug_line_str_section for early LTO debug.
1442 (dwarf2out_finish): Reset debug_line_str_hash output early.
1443 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1445 (dwarf2out_early_finish): Output debug_line_str.
1447 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1449 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1450 index register on z196 or later.
1452 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1454 * config/s390/s390.c (s390_default_align): Set default function
1456 (s390_override_options_after_change): Call s390_default align.
1457 (s390_option_override_internal): Call s390_default_align.
1458 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1460 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1463 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1464 to _looptemp_ clauses, other than the first two.
1466 2018-07-17 Martin Liska <mliska@suse.cz>
1468 * opts.c: Do not enable OPT_falign_* for -Os.
1470 2018-07-17 Martin Liska <mliska@suse.cz>
1472 * align.h (MAX_CODE_ALIGN): New.
1473 (MAX_CODE_ALIGN_VALUE): New.
1474 * common/config/i386/i386-common.c (ix86_handle_option):
1475 (MAX_CODE_ALIGN): Moved to align.h.
1476 * final.c (MAX_CODE_ALIGN): Likewise.
1477 * opts.c (parse_and_check_align_values):
1478 (MAX_CODE_ALIGN): Likewise.
1479 (MAX_CODE_ALIGN_VALUE): Likewise.
1481 2018-07-17 Martin Liska <mliska@suse.cz>
1483 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1484 in order to fulfil coding style.
1485 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1486 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1487 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1488 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1489 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1490 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1491 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1492 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1493 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1495 2018-07-17 Martin Liska <mliska@suse.cz>
1497 * align.h: New file.
1498 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1499 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1500 align_flags of label_to_alignment.
1501 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1503 * config/m68k/m68k.c: Do not use removed align_labels_value and
1505 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1506 (LOOP_ALIGN): Likewise.
1507 (LABEL_ALIGN): Likewise.
1508 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1509 Remove not used macro.
1510 (rs6000_loop_align): Change return type to align_flags.
1511 (rs6000_loop_align_max_skip): Remove.
1512 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1513 Change return type to align_flags.
1514 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1515 Remove not used macro.
1516 (rs6000_loop_align): Change return type to align_flags.
1517 (rs6000_loop_align_max_skip): Remove.
1518 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1519 * config/rx/rx-protos.h (rx_align_for_label): Make it
1521 * config/rx/rx.c (rx_align_for_label): Change return type
1523 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1525 into align_flags class.
1526 (LABEL_ALIGN): Likewise.
1527 (LOOP_ALIGN): Likewise.
1528 * config/s390/s390.c (s390_label_align): Use align_flags
1530 (s390_asm_output_function_label): Likewise.
1531 * config/sh/sh.c (sh_override_options_after_change):
1532 Use align_flags class directly without macros.
1533 (find_barrier): Likewise.
1534 (barrier_align): Likewise.
1535 (sh_loop_align): Likewise.
1536 * config/spu/spu.c (spu_option_override):
1537 Use align_flags_tuple::get_value instead of removed macros.
1538 (spu_sched_init): Likewise.
1539 * config/spu/spu.h (GTY): Likewise.
1540 * config/visium/visium.c (visium_option_override):
1541 Set "8" as default secondary alignment.
1542 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1543 in order to guarantee secondary alignment of 8.
1544 * coretypes.h: Include align.h header file.
1545 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1546 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1547 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1548 * doc/tm.texi.in: Likewise.
1549 * final.c (struct label_alignment): Remove not used structure.
1550 (LABEL_ALIGN): Change type to align_flags.
1551 (LOOP_ALIGN): Likewise.
1552 (JUMP_ALIGN): Likewise.
1553 (default_loop_align_max_skip): Remove.
1554 (default_label_align_max_skip): Likewise.
1555 (default_jump_align_max_skip): Likewise.
1556 (default_label_align_after_barrier_max_skip):
1557 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1558 (LABEL_TO_MAX_SKIP): Remove.
1559 (label_to_alignment): Return align_flags type instead of integer.
1560 (label_to_max_skip): Remove.
1561 (align_fuzz): Use align_flags type.
1562 (compute_alignments): Use align_flags type and use align_flags::max
1563 to combine multiple alignments.
1564 (grow_label_align): Grow vec instead of C array.
1565 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1566 (shorten_branches): Use align_flags type and use align_flags::max
1567 to combine multiple alignments.
1568 (final_scan_insn_1): Remove usage of secondary alignment that comes
1569 from label alignment, but instead use proper secondary alignment
1570 which is computed in grow_label_align.
1571 * flags.h (struct align_flags_tuple): Move to align.h.
1572 (struct align_flags): Likewise.
1573 (state_align_loops): Rename to align_loops.
1574 (state_align_jumps): Rename to align_jumps.
1575 (state_align_labels): Rename to align_labels.
1576 (state_align_functions): Rename to align_functions.
1577 (align_loops_log): Remove.
1578 (align_jumps_log): Remove.
1579 (align_labels_log): Remove.
1580 (align_functions_log): Remove.
1581 (align_loops_max_skip): Remove.
1582 (align_jumps_max_skip): Remove.
1583 (align_labels_max_skip): Remove.
1584 (align_functions_max_skip): Remove.
1585 (align_loops_value): Remove.
1586 (align_jumps_value): Remove.
1587 (align_labels_value): Remove.
1588 (align_functions_value): Remove.
1589 * output.h (label_to_alignment): Change return type to align_flags.
1590 (label_to_max_skip): Remove.
1591 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1592 jump_align_max_skip macros.
1593 * targhooks.h (default_loop_align_max_skip): Remove.
1594 (default_label_align_max_skip): Likewise.
1595 (default_jump_align_max_skip): Likewise.
1596 (default_label_align_after_barrier_max_skip): Remove.
1597 * toplev.c (read_log_maxskip): Use ::normalize function.
1598 (parse_N_M): Remove not used argument and also call ::normalize.
1599 (parse_alignment_opts): Do not pass unused arguments.
1600 * varasm.c (assemble_start_function): Use directly align_functions
1601 instead of removed macros.
1602 * system.h: Do not poison removed macros.
1604 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1607 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1608 and cond temporaries don't have reference type if iterator has
1609 pointer type. For init use &for_pre_body instead of pre_p if
1610 for_pre_body is non-empty.
1612 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1614 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1615 double-double modes to SFmode directly directly.
1616 (trunc<mode>sf2_fprs): Delete.
1618 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1620 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1621 for conversions between IFmode and the decimal floating point modes.
1622 (init_float128_ieee): Use the correct names for conversions between
1623 KFmode and the decimal floating point modes.
1625 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1627 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1628 for the conversions between TDmode and IFmode.
1629 (init_float128_ieee): Use more correct names for the conversions
1630 between TDmode and KFmode.
1632 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1634 PR tree-optimization/86526
1635 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1636 (inline_expand_builtin_string_cmp): Likewise.
1637 (inline_string_cmp): Likewise. Use c_readstr instead of
1638 builtin_memcpy_read_str. Add unit_mode temporary.
1640 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1643 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1644 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1646 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1648 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1649 Alphabetize prototypes of built-in functions, separating out
1650 built-in functions that are listed in this section but should be
1651 described elsewhere.
1653 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1656 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1657 conditional move when trapping comparison was split to a
1658 non-trapping one (and vice versa).
1660 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1662 * config/s390/s390.c (s390_function_profiler): Generate nops
1663 instead of profiler call sequences.
1664 * config/s390/s390.opt: Add the new option.
1666 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1668 * config/s390/s390.c (s390_function_profiler): Generate
1669 __mcount_loc section.
1670 * config/s390/s390.opt: Add the new option.
1672 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1674 * common.opt: Add the new warning.
1675 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1676 %r0,__fentry__" when -mfentry is specified.
1677 (s390_option_override_internal): Disallow -mfentry for 31-bit
1679 * config/s390/s390.opt: Add the new option.
1681 2018-07-16 Richard Biener <rguenther@suse.de>
1684 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1685 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1687 2018-07-16 Martin Liska <mliska@suse.cz>
1690 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1693 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1695 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1697 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1699 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1701 * config/arc/arc-cpus.def (hs4x): New cpu.
1703 * config/arc/arc-tables.opt: Regenerate.
1704 * config/arc/arc.c (arc_sched_issue_rate): New function.
1705 (TARGET_SCHED_ISSUE_RATE): Define.
1706 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1707 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1709 (attr tune): Add ARCHS4x tune values.
1710 (attr tune_dspmpy): Define.
1711 (*tst): Correct instruction type.
1712 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1713 * config/arc/arcHS4x.md: New file.
1714 * config/arc/fpu.md: Update instruction type attributes.
1715 * config/arc/t-multilib: Regenerate.
1717 2018-07-16 Tom de Vries <tdevries@suse.de>
1720 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1722 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1724 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1727 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1729 PR tree-optimization/86514
1730 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1731 conversion to a boolean type from a type with greater precision.
1733 2018-07-16 Tom de Vries <tdevries@suse.de>
1735 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1736 dump_flags request TDF_SLIM.
1738 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1740 * fold-const.c (int_const_binop_1): Abstract...
1741 (wide_int_binop): ...wide int code here.
1742 (poly_int_binop): ...poly int code here.
1743 Abstract the rest of int_const_binop_1 into int_const_binop.
1744 * fold-const.h (wide_int_binop): New.
1745 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1746 Remove useless PLUS/MINUS_EXPR case.
1747 (zero_nonzero_bits_from_vr): Move wide int code...
1748 (zero_nonzero_bits_from_bounds): ...here.
1749 (extract_range_from_binary_expr_1): Move mask optimization code...
1750 (range_easy_mask_min_max): ...here.
1751 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1752 (range_easy_mask_min_max): New.
1754 2018-07-15 Jeff Law <law@redhat.com>
1757 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1760 2018-07-14 Jim Wilson <jimw@sifive.com>
1762 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1764 2018-07-14 Paul Koning <ni1d@arrl.net>
1766 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1768 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1770 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1773 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1774 Steve Munroe <munroesj52@gmail.com>
1776 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1777 (_mm_andnot_si128): Likewise.
1778 (_mm_or_si128): Likewise.
1779 (_mm_xor_si128): Likewise.
1781 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1784 * builtins.c (expand_builtin_memcmp): Inline the calls first
1785 when result_eq is false.
1786 (expand_builtin_strcmp): Inline the calls first.
1787 (expand_builtin_strncmp): Likewise.
1788 (inline_string_cmp): New routine. Expand a string compare
1789 call by using a sequence of char comparison.
1790 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1791 a call to str(n)cmp/memcmp.
1792 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1794 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1796 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1798 * config/arm/driver-arm.c: Include arm-native.h.
1799 (host_detect_local_cpu): Use auto-generated data tables.
1800 (vendors, arm_cpu_table): Delete. Move part information to ...
1801 * config/arm/arm-cpus.in: ... here.
1802 * config/arm/parsecpu.awk (gen_native): New function.
1803 (vendor, part): New CPU fields.
1804 (END): Add support for building the native CPU detection tables.
1805 * config/arm/t-arm (arm-native.h): Add build rule.
1806 (driver-arm.o): Add dependency on arm-native.h.
1808 2018-07-13 Richard Biener <rguenther@suse.de>
1811 * match.pd (addr1 - addr2): Allow either of the operand to
1814 2018-07-13 Tom de Vries <tdevries@suse.de>
1816 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1819 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
1821 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1822 arrays instead of numbered variables.
1824 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1826 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1827 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1829 2018-07-13 Richard Biener <rguenther@suse.de>
1832 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1833 instead of get_context_die.
1835 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1836 Richard Biener <rguenther@suse.de>
1839 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1840 that the loop latch destination where phi is defined.
1842 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
1844 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1845 (riscv_expand_epilogue): Add assertion to check interrupt mode.
1846 (riscv_set_current_function): Extract getting interrupt type to new
1848 (riscv_get_interrupt_type): New function.
1849 (riscv_merge_decl_attributes): New function, checking interrupt type is
1851 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1853 2018-07-12 Paul Koning <ni1d@arrl.net>
1855 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1858 2018-07-12 Paul Koning <ni1d@arrl.net>
1860 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1861 zero reference, add doloop_end instead.
1862 * doc/md.texi (decrement_and_branch_until_zero): Remove.
1863 (Looping patterns): Remove decrement_and_branch_until_zero. Add
1864 detail for doloop_end.
1866 2018-07-12 Martin Sebor <msebor@redhat.com>
1869 * attribs.c (decl_attributes): Reject conflicting attributes before
1870 calling attribute handlers.
1872 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1874 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1876 (gcc::dump_manager::get_dump_file_name): likewise.
1877 (dump_begin): Likewise.
1878 * dumpfile.h (dump_begin): Update prototype.
1879 (gcc::dump_manager::get_dump_file_name,
1880 gcc::dump_manager::get_dump_file_name): Update prototype.
1882 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1884 * internal-fn.h (vectorizable_internal_fn_p): New function.
1885 * tree-vect-slp.c (compatible_calls_p): Likewise.
1886 (vect_build_slp_tree_1): Remove nops argument. Handle calls
1887 to internal functions.
1888 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1890 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1892 * fold-const.h (inverse_conditions_p): Declare.
1893 * fold-const.c (inverse_conditions_p): New function.
1894 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1895 that test the inverse condition of a conditional internal function.
1896 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1897 * internal-fn.c (internal_fn_mask_index): Handle conditional
1899 (vectorized_internal_fn_supported_p): New function.
1900 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1901 (any_pred_load_store): Replace with...
1902 (need_to_predicate): ...this new variable.
1903 (redundant_ssa_names): New variable.
1904 (ifcvt_can_use_mask_load_store): Move initial checks to...
1905 (ifcvt_can_predicate): ...this new function. Handle tree codes
1906 for which a conditional internal function exists.
1907 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1908 instead of ifcvt_can_use_mask_load_store. Update after variable
1910 (predicate_load_or_store): New function, split out from
1911 predicate_mem_writes.
1912 (check_redundant_cond_expr): New function.
1913 (value_available_p): Likewise.
1914 (predicate_rhs_code): Likewise.
1915 (predicate_mem_writes): Rename to...
1916 (predicate_statements): ...this. Use predicate_load_or_store
1917 and predicate_rhs_code.
1918 (combine_blocks, tree_if_conversion): Update after above name changes.
1919 (ifcvt_local_dce): Handle redundant_ssa_names.
1920 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1921 general conditional functions.
1922 * tree-vect-stmts.c (vectorizable_call): Likewise.
1924 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1925 Alan Hayward <alan.hayward@arm.com>
1926 David Sherwood <david.sherwood@arm.com>
1928 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1929 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1930 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1931 plus and minus and convert them into IFN_COND_FMA-based sequences.
1932 (convert_mult_to_fma): Handle conditional plus and minus.
1934 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1936 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1937 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1938 (cond_fnms_optab): New optabs.
1939 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1941 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1942 * internal-fn.h (get_conditional_internal_fn): Declare.
1943 (get_unconditional_internal_fn): Likewise.
1944 * internal-fn.c (cond_ternary_direct): New macro.
1945 (expand_cond_ternary_optab_fn): Likewise.
1946 (direct_cond_ternary_optab_supported_p): Likewise.
1947 (FOR_EACH_COND_FN_PAIR): Likewise.
1948 (get_conditional_internal_fn): New function.
1949 (get_unconditional_internal_fn): Likewise.
1950 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1951 (gimple_match_op::gimple_match_op): Add a new overload for 5
1953 (gimple_match_op::set_op): Likewise.
1954 (gimple_resimplify5): Declare.
1955 * genmatch.c (decision_tree::gen): Generate simplifications for
1957 * gimple-match-head.c (gimple_simplify): Define an overload for
1958 5 operands. Handle calls with 5 arguments in the top-level overload.
1959 (convert_conditional_op): Handle conversions from unconditional
1960 internal functions to conditional ones.
1961 (gimple_resimplify5): New function.
1962 (build_call_internal): Pass a fifth operand.
1963 (maybe_push_res_to_seq): Likewise.
1964 (try_conditional_simplification): Try converting conditional
1965 internal functions to unconditional internal functions.
1966 Handle 3-operand unconditional forms.
1967 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1968 Define ternary equivalents of the current rules for binary conditional
1970 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1972 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1973 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1974 (optab): Handle them.
1975 (SVE_COND_FP_TERNARY): New int iterator.
1976 (sve_fmla_op, sve_fmad_op): New int attributes.
1977 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1978 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1979 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1981 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1983 * target.def (preferred_else_value): New target hook.
1984 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1985 * doc/tm.texi: Regenerate.
1986 * targhooks.h (default_preferred_else_value): Declare.
1987 * targhooks.c (default_preferred_else_value): New function.
1988 * internal-fn.h (conditional_internal_fn_code): Declare.
1989 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1990 (get_conditional_internal_fn): Use it.
1991 (conditional_internal_fn_code): New function.
1992 * gimple-match.h (gimple_match_cond): New struct.
1993 (gimple_match_op): Add a cond member function.
1994 (gimple_match_op::gimple_match_op): Update all forms to take a
1996 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1997 for the suboperation, but don't specify a particular else_value.
1998 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1999 (visit_nary_op, visit_reference_op_load): Pass
2000 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2001 * gimple-match-head.c: Include tree-eh.h
2002 (convert_conditional_op): New function.
2003 (maybe_resimplify_conditional_op): Likewise.
2004 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2005 (gimple_resimplify2): Likewise.
2006 (gimple_resimplify3): Likewise.
2007 (gimple_resimplify4): Likewise.
2008 (maybe_push_res_to_seq): Return null for conditional operations.
2009 (try_conditional_simplification): New function.
2010 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2012 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2014 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2016 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2018 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2020 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2022 (hash_tree): Do not hash DECL_FCONTEXT
2023 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2024 Do not stream DECL_FCONTEXT.
2025 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2026 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2028 2018-07-12 Richard Biener <rguenther@suse.de>
2031 * dwarf2out.c (gen_block_die): Only output blocks when they have
2032 at least one !DECL_IGNORED_P variable.
2034 2018-07-12 Richard Biener <rguenther@suse.de>
2037 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2038 Remove -mieee-fp handling.
2040 2018-07-12 Richard Biener <rguenther@suse.de>
2042 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2043 left-over from last patch.
2045 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2047 PR tree-optimization/86492
2048 * gimple-ssa-store-merging.c
2049 (imm_store_chain_info::coalesce_immediate_stores): Call
2050 check_no_overlap even for the merge_overlapping case. Formatting fix.
2052 2018-07-12 Richard Biener <rguenther@suse.de>
2055 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2056 move possibly trapping operations into the conditional.
2058 2018-07-12 Richard Biener <rguenther@suse.de>
2060 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2061 (vn_lookup_simplify_result): Remove recursion limit applied
2063 (vn_nary_build_or_lookup_1): Adjust.
2064 (try_to_simplify): Likewise.
2065 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2067 (gimple_resimplify2): Likewise.
2068 (gimple_resimplify3): Likewise.
2069 (gimple_resimplify4): Likewise.
2071 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2073 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2074 Use __mmask64 type instead of __mmask8 for __M argument.
2075 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2076 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2078 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2079 __mmask16 for __M argument.
2080 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2081 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2082 to __mmask16 instead of __mmask8.
2083 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2084 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2085 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2086 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2087 instead of __mmask16 for __U argument.
2088 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2089 __mmask16 instead of __mmask8 for __U argument.
2090 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2092 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2094 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2096 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2098 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2100 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2102 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2104 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2106 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2108 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2110 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2111 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2112 return type as well as __M argument type and all casts from __mmask8
2114 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2115 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2116 return type as well as __M argument type and all casts from __mmask8
2118 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2119 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2120 return type as well as __M argument type and all casts from __mmask8
2122 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2123 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2124 return type as well as __M argument type and all casts from __mmask8
2126 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2127 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2130 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2132 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2133 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2136 2018-07-11 Paul Koning <ni1d@arrl.net>
2138 * doc/md.texi (define_subst): Document how multiple occurrences of
2139 the same argument in the replacement pattern are handled.
2141 2018-07-11 Paul Koning <ni1d@arrl.net>
2143 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2145 (Common Type Attributes): Add "mode" attribute.
2147 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2149 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2150 stream DECL_ORIGINAL_TYPE.
2151 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2152 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2153 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2154 Do not walk original type.
2155 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2157 (write_ts_decl_non_common_tree_pointers): Do not stream
2159 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2160 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2162 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2164 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2165 thread twice from the same starting edge.
2167 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2169 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2170 * gimple.c (gimple_call_nonnull_result_p): ...here...
2171 (gimple_call_nonnull_arg): ...and here.
2172 * gimple.h (gimple_call_nonnull_result_p): New.
2173 (gimple_call_nonnull_arg): New.
2175 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2177 * config/arm/arm-cpus.in: Move information from fpu field of each
2178 cpu definition to the isa field.
2179 * config/arm/parsecpu.awk (fpu): Delete match rule.
2180 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2182 2018-07-11 Richard Biener <rguenther@suse.de>
2185 * dwarf2out.c (init_sections_and_labels): Use
2186 output_asm_line_debug_info consistently.
2187 (dwarf2out_early_finish): Likewise.
2188 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2191 2018-07-11 Richard Biener <rguenther@suse.de>
2193 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2194 Rework father_bb setting in a way to avoid propagating constants
2195 multiple times on a loop body.
2197 2018-07-10 Mark Wielaard <mark@klomp.org>
2200 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2202 2018-07-10 Richard Biener <rguenther@suse.de>
2204 * hash-map.h (hash_map::iterator::operator*): Return
2205 references to key and value.
2207 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2210 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2211 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2212 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2213 (gimplify_omp_for): For composite loops, move outer
2214 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2215 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2216 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2217 TREE_LIST for both the original class iterator and the "last" helper
2218 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2219 loop, remember has_decl_expr from outer composite loops for the
2220 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2222 2018-07-09 Martin Sebor <msebor@redhat.com>
2226 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2227 accessing implicitly initialized array elements.
2228 * expr.c (string_constant): Handle string initializers of
2229 character arrays within aggregates.
2230 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2231 Store element offset. As a special case, handle zero size.
2232 (fold_nonarray_ctor_reference): Same.
2233 (fold_ctor_reference): Add argument. Store subobject offset.
2234 * gimple-fold.h (fold_ctor_reference): Add argument.
2236 2018-07-09 Paul Koning <ni1d@arrl.net>
2238 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2239 (pdp11_insn_cost): New function.
2240 (pdp11_md_asm_adjust): New function.
2241 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2242 (pdp11_rtx_costs): Update to match machine better.
2243 (output_addr_const_pdp11): Correct format mismatch warnings.
2244 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2245 * config/pdp11/pdp11.md: General change to add base_cost and/or
2246 length attributes for use by new pdp11_insn_cost function.
2247 (MIN_BRANCH): Correct definition.
2249 (doloop_end): Use standard pattern name for looping pattern.
2250 (doloop_end_nocc): New.
2251 (movsf): Add another constraint alternative.
2252 (zero_extendqihi2): Add constraint alternatives for not in place
2254 (zero_extendhisi2): Remove.
2255 (shift patterns): Add CC handling variants.
2259 (define_peephole2): New peephole to recognize mov that sets CC for
2262 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2264 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2265 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2268 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2271 * real.c (real_nextafter): Return true if result is denormal.
2273 2018-07-09 Martin Liska <mliska@suse.cz>
2275 * common.opt: Add back wrongly removed attribute.
2277 2018-07-09 Richard Biener <rguenther@suse.de>
2280 * dwarf2out.c (gen_block_die): For an early generated DIE
2281 always output high/low PC attributes.
2283 2018-07-09 Tom de Vries <tdevries@suse.de>
2285 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2286 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2287 onto VAR_DECL with abstract origin.
2289 2018-07-07 Jim Wilson <jimw@sifive.com>
2291 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2293 2018-07-07 Tom de Vries <tdevries@suse.de>
2295 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2297 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2299 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2301 (combine_bound): Use wide-int overflow calculation instead of
2303 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2305 * fold-const.c (int_const_binop_2): Same.
2306 (extract_muldiv_1): Same.
2307 (fold_div_compare): Same.
2308 (fold_abs_const): Same.
2310 * poly-int.h (add): Same.
2314 * predict.c (predict_iv_comparison): Same.
2315 * profile-count.c (slow_safe_scale_64bit): Same.
2316 * simplify-rtx.c (simplify_const_binary_operation): Same.
2317 * tree-chrec.c (tree_fold_binomial): Same.
2318 * tree-data-ref.c (split_constant_offset_1): Same.
2319 * tree-if-conv.c (idx_within_array_bound): Same.
2320 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2321 * tree-ssa-phiopt.c (minmax_replacement): Same.
2322 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2323 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2324 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2325 * wide-int.cc (wi::add_large): Same.
2326 (wi::mul_internal): Same.
2327 (wi::sub_large): Same.
2328 (wi::divmod_internal): Same.
2329 * wide-int.h: Change overflow type to overflow_type for neg, add,
2330 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2331 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2332 mul_internal, divmod_internal.
2333 (overflow_type): New enum.
2334 (accumulate_overflow): New.
2336 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2338 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2339 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2341 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2343 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2344 argument is checked for zero before entering loop, avoid checking again.
2346 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2348 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2349 * gimplify.h (generic_expr_could_trap_p): Likwise.
2350 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2352 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2354 PR tree-optimization/86401
2355 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2356 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2357 (fold_bit_and_mask): ... here. New helper function for match.pd.
2358 * fold-const.h (fold_bit_and_mask): Declare.
2359 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2361 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2364 * target.def (translate_mode_attribute): New hook.
2365 * targhooks.h (default_translate_mode_attribute): Declare.
2366 * targhooks.c (default_translate_mode_attribute): New function.
2367 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2368 * doc/tm.texi: Regenerate.
2369 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2370 (rs6000_translate_mode_attribute): New function.
2372 2018-07-06 Paul Koning <ni1d@arrl.net>
2374 * doc/md.texi (define_split): Document DONE and FAIL.
2375 (define_peephole2): Ditto.
2377 2018-07-05 Jeff Law <law@redhat.com>
2379 PR tree-optimization/86010
2380 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2381 both the head and tail of mem* and str* calls.
2383 2018-07-05 Jim Wilson <jimw@sifive.com>
2385 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2387 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2389 * config/aarch64/aarch64-simd.md: correct flags text for
2390 MIN_EXPR replacement.
2392 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2394 * configure: Regenerated.
2396 2018-07-05 Carl Love <cel@us.ibm.com>
2398 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2399 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2400 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2401 VSX_BUILTIN_DOUBLEL_V4SF.
2403 2018-07-05 Martin Sebor <msebor@redhat.com>
2406 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2407 than its domain to compute its the upper bound of a char array.
2409 2018-07-05 Nathan Sidwell <nathan@acm.org>
2411 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2412 * doc/cpp.texi: Update comment.
2413 * doc/tm.texi: Rebuilt.
2414 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2415 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2416 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2417 headers affected by extern "C".
2418 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2419 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2420 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2421 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2422 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2423 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2424 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2425 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2426 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2427 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2428 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2429 config/sparc/sp64-elf.h, config/spu/spu.h,
2430 config/stormy16/stormy16.h, config/v850/v850.h,
2431 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2432 define NO_IMPLICIT_EXTERN_C.
2433 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2435 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2438 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2439 instead of GET_MODE_SIZE when comparing Units.
2441 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2444 * rtlanal.c (set_noop_p): Constrain on mode change,
2445 include hard-reg-set.h
2447 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2449 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2451 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2454 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2457 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2459 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2461 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2464 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2466 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2468 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2471 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2473 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2475 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2476 neg_*_op* variables.
2478 2018-07-04 Martin Liska <mliska@suse.cz>
2480 * tree-switch-conversion.c: Define
2481 max_ratio_for_speed and max_ratio_for_size constants.
2483 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2484 Martin Liska <mliska@suse.cz>
2489 * common.opt: Rename align options with 'str_' prefix.
2490 * common/config/i386/i386-common.c (set_malign_value): New
2492 (ix86_handle_option): Use it to set -falign-* options/
2493 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2494 type from int to string.
2495 * config/aarch64/aarch64.c: Update default values from int
2497 * config/alpha/alpha.c (alpha_override_options_after_change):
2499 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2500 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2501 max skip conditionally.
2502 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2503 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2504 max skip conditionally.
2505 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2506 max skip conditionally.
2507 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2508 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2509 max skip conditionally.
2510 * config/i386/i386.c (struct ptt): Change type from int to
2512 (ix86_default_align): Set default values.
2513 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2514 max skip conditionally.
2515 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2516 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2517 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2518 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2519 max skip conditionally.
2520 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2521 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2522 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2523 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2524 max skip conditionally.
2525 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2526 * config/ia64/ia64.c (ia64_option_override): Set default values
2527 for alignment options.
2528 * config/m68k/m68k.c: Handle new str_align_* options.
2529 * config/mips/mips.c (mips_set_compression_mode): Change
2531 (mips_option_override): Set default values for options.
2532 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2534 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2536 * config/rx/rx.c (rx_option_override): Likewise.
2537 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2538 (LABEL_ALIGN): Use align_labels_log.
2539 (LOOP_ALIGN): Use align_loops_align.
2540 * config/s390/s390.c (s390_asm_output_function_label): Use new
2542 * config/sh/sh.c (sh_override_options_after_change):
2543 Change type of constants.
2544 * config/spu/spu.c (spu_sched_init): Likewise.
2545 * config/sparc/sparc.c (sparc_option_override): Set default
2547 * config/visium/visium.c (visium_option_override): Likewise.
2548 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2549 emit p2align format with last argument if it's not needed.
2550 * doc/invoke.texi: Document extended format of -falign-*.
2551 * final.c: Use align_labels alignment.
2552 * flags.h (struct target_flag_state): Change type to use
2554 (struct align_flags_tuple): New.
2555 (struct align_flags): Likewise.
2556 (align_loops_log): Redefine macro to use new types.
2557 (align_loops_max_skip): Redefine macro to use new types.
2558 (align_jumps_log): Redefine macro to use new types.
2559 (align_jumps_max_skip): Redefine macro to use new types.
2560 (align_labels_log): Redefine macro to use new types.
2561 (align_labels_max_skip): Redefine macro to use new types.
2562 (align_functions_log): Redefine macro to use new types.
2563 (align_loops): Redefine macro to use new types.
2564 (align_jumps): Redefine macro to use new types.
2565 (align_labels): Redefine macro to use new types.
2566 (align_functions): Redefine macro to use new types.
2567 (align_functions_max_skip): Redefine macro to use new types.
2568 (align_loops_value): New macro.
2569 (align_jumps_value): New macro.
2570 (align_labels_value): New macro.
2571 (align_functions_value): New macro.
2572 * function.c (invoke_set_current_function_hook): Propagate
2573 alignment values from flags to global variables default in
2575 * ipa-icf.c (sem_function::equals_wpa): Use
2576 cl_optimization_option_eq instead of memcmp.
2577 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2579 (cl_optimization_stream_in): Likewise.
2580 * optc-save-gen.awk: Support strings in cl_optimization.
2581 * opth-gen.awk: Likewise.
2582 * opts.c (finish_options): Remove error checking of invalid
2584 (MAX_CODE_ALIGN): Remove.
2585 (MAX_CODE_ALIGN_VALUE): Likewise.
2586 (parse_and_check_align_values): New function.
2587 (check_alignment_argument): Likewise.
2588 (common_handle_option): Use check_alignment_argument.
2589 * opts.h (parse_and_check_align_values): Declare.
2590 * toplev.c (init_alignments): Remove.
2591 (read_log_maxskip): New.
2592 (parse_N_M): Likewise.
2593 (parse_alignment_opts): Likewise.
2594 (backend_init_target): Remove usage of init_alignments.
2595 * toplev.h (parse_alignment_opts): Declare.
2596 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2598 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2599 * tree.c (cl_option_hasher::equal): New.
2600 * varasm.c: Use new global macros.
2602 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2604 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2605 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2606 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2607 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2608 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2609 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2610 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2611 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2612 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2613 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2614 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2615 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2616 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2618 2018-07-04 Martin Liska <mliska@suse.cz>
2619 Jonathan Wakely <jwakely@redhat.com>
2621 * coverage.c: Use correct type.
2622 * doc/invoke.texi: Language correction.
2624 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2627 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2628 ENDBRANCH for non-tail call which may return via indirect branch.
2629 * doc/extend.texi: Document indirect_return attribute.
2631 2018-07-03 Martin Sebor <msebor@redhat.com>
2633 PR tree-optimization/86274
2634 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2636 (format_floating): Correct handling of infinities and NaNs.
2638 2018-07-03 Martin Sebor <msebor@redhat.com>
2640 * print-tree.c (print_real_cst): New function.
2641 (print_node_brief): Call it.
2642 (print_node): Ditto.
2644 2018-07-03 Jeff Law <law@redhat.com>
2646 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2647 into a single pattern.
2649 * config/h8300/h8300.md (ors code_iterator): New.
2650 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2651 a single pattern and single splitter.
2652 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2653 (iorqi3_1, xorqi3_1): Likewise.
2654 (iorqi3, xorqi3 expanders): Similarly.
2656 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2657 (movmd_internal) into a single pattern using the P mode iterator.
2658 (movmd splitters): Similarly.
2659 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2660 (movsd splitters): Similarly.
2662 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2663 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2664 right table based on the size of the operand.
2665 * config/h8300/h8300.md (length_table): Corresponding changes. All
2666 references to "addb", "addw" and "addl" changed to "add".
2667 (btst patterns): Merge two variants into a single pattern.
2668 (tstqi, tsthi): Likewise.
2669 (addhi3_incdec, addsi3_incdec): Likewise.
2670 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2671 (mulhi3, mulsi3): Likewise.
2672 (udivhi3, udivsi3): Likewise.
2673 (divhi3, divsi3): Likewise.
2674 (andorqi3, andorhi3, andorsi3): Likewise.
2676 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2679 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2680 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2682 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2684 PR tree-optimization/85694
2685 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2686 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2688 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2689 (<u>avg<mode>3_ceil): New patterns.
2691 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2693 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2694 scan-tree-dump directive.
2695 * gcc.dg/vect/slp-perm-2.c: Likewise.
2696 * gcc.dg/vect/slp-perm-3.c: Likewise.
2697 * gcc.dg/vect/slp-perm-5.c: Likewise.
2698 * gcc.dg/vect/slp-perm-6.c: Likewise.
2699 * gcc.dg/vect/slp-perm-7.c: Likewise.
2700 * gcc.dg/vect/slp-perm-8.c: Likewise.
2702 2018-07-03 Marek Polacek <polacek@redhat.com>
2705 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2707 2018-07-03 Richard Biener <rguenther@suse.de>
2710 * tree-ssa-structalias.c (find_func_clobbers): Properly
2711 handle indirect calls.
2713 2018-07-03 Jeff Law <law@redhat.com>
2715 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2716 (shifts): New code iterator.
2717 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2718 expander. Fix HImode handling on H8/SX.
2719 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2720 (subqi3, subhi3, subsi3 expanders): Likewise.
2721 (andqi3, andhi3, andsi3 expanders): Likewise.
2722 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2723 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2724 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2725 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2726 (zero_extendqihi2, zero_extendqisi2): Likewise.
2727 (extendqihi2, extendqisi2): Likewise.
2728 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2729 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2730 (rotlqi3_1, rotlhi3_1): Likewise.
2731 (logicalhi3_sn, logicalsi3_sn): Likewise.
2732 (logicalhi3, logicalsi3): Likewise.
2734 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2736 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2737 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2738 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2739 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2740 type to append_pattern_def_seq instead of creating a stmt_vec_info
2742 (build_mask_conversion): Likewise. Remove vinfo argument.
2743 (vect_add_conversion_to_patterm): Likewise, renaming to...
2744 (vect_add_conversion_to_pattern): ...this.
2745 (vect_recog_mask_conversion_pattern): Update call to
2746 build_mask_conversion. Pass the vector type to
2747 append_pattern_def_seq here too.
2748 (vect_recog_gather_scatter_pattern): Update call to
2749 vect_add_conversion_to_pattern.
2751 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2753 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2754 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2755 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2756 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2757 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2758 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2759 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2760 append_pattern_def_seq instead of new_pattern_def_seq.
2761 (vect_recog_divmod_pattern): Do both of the above.
2762 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2765 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2767 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2768 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2769 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2770 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2771 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2772 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2773 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2774 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2775 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2776 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2777 parameter with a single stmt_vec_info.
2778 (vect_recog_func_ptr): Likewise.
2779 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2780 (vect_try_gather_scatter_pattern): ...this.
2781 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2782 the stmt_vec_info of the statement to be matched. Don't clear
2783 STMT_VINFO_RELATED_STMT.
2784 (vect_pattern_recog): Update call accordingly.
2786 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2788 PR tree-optimization/85694
2789 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2790 (uavgM3_ceil): Document new optabs.
2791 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2792 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2794 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2795 (savg_ceil_optab): New optabs.
2796 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2797 (vect_vect_recog_func_ptrs): Add it.
2798 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2799 constant directly from the associated lhs.
2801 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2803 * tree-vect-patterns.c (vect_split_statement): New function.
2804 (vect_convert_input): Use it to try to split an existing cast.
2806 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2808 * poly-int.h (print_hex): New function.
2809 * dumpfile.h (dump_dec, dump_hex): Declare.
2810 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2811 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2812 min_input_precision, operation_precision and operation_sign.
2813 * tree-vect-patterns.c (vect_get_range_info): New function.
2814 (vect_same_loop_or_bb_p, vect_single_imm_use)
2815 (vect_operation_fits_smaller_type): Delete.
2816 (vect_look_through_possible_promotion): Add an optional
2817 single_use_p parameter.
2818 (vect_recog_over_widening_pattern): Rewrite to use new
2819 stmt_vec_info infomration. Handle one operation at a time.
2820 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2821 (vect_truncatable_operation_p, vect_set_operation_type)
2822 (vect_set_min_input_precision): New functions.
2823 (vect_determine_min_output_precision_1): Likewise.
2824 (vect_determine_min_output_precision): Likewise.
2825 (vect_determine_precisions_from_range): Likewise.
2826 (vect_determine_precisions_from_users): Likewise.
2827 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2828 (vect_vect_recog_func_ptrs): Put over_widening first.
2830 (vect_pattern_recog): Call vect_determine_precisions.
2832 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2834 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2835 statements that have been replaced by further pattern statements.
2836 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2838 2018-07-03 Richard Biener <rguenther@suse.de>
2840 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2841 always set *dt. Dump vectype in vectype overload.
2842 * dumpfile.h (dump_gimple_expr): New function.
2843 (dump_gimple_expr_loc): Likewise.
2844 * dumpfile.c (dump_gimple_expr): New function.
2845 (dump_gimple_expr_loc): Likewise.
2847 2018-07-02 Jeff Law <law@redhat.com>
2849 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2850 the H8/300, H8/300H and H8/S variants into a single pattern.
2851 (movhi_h8300, movqi_h8300hs): Similarly.
2852 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2853 (QHI mode iterator): New.
2855 * config/h8300/h8300.md: Remove trailing whitespace.
2857 2018-07-02 Jim Wilson <jimw@sifive.com>
2859 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2860 instead of emit_insn for interrupt returns.
2861 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2862 (riscv_sret, riscv_uret): Likewise.
2864 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2866 * pretty-print.c (selftest::test_pp_format): Move save and restore
2867 of quotes to class auto_fix_quotes, and add an instance.
2868 * selftest.c: Include "intl.h".
2869 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2870 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2871 * selftest.h (selftest::auto_fix_quotes): New class.
2873 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
2875 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2876 (aarch64_sve_prepare_conditional_op): Remove.
2877 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2878 Allow aarch64_simd_reg_or_zero as select operand; remove
2879 the aarch64_sve_prepare_conditional_op call.
2880 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2881 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2882 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2883 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2884 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2885 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2886 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2887 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2888 and a splitters to match all of the *_any patterns.
2889 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2891 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2892 (SVE_COND_FP_BINARY_REV): Remove.
2893 (sve_int_op_rev, sve_fp_op_rev): New.
2894 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2895 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2896 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2897 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2898 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2899 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2900 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2901 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2902 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2904 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2905 Remove match_dup 1 from the inner unspec.
2906 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2908 * config/aarch64/aarch64.md (movprfx): New attr.
2909 (length): Default movprfx to 8.
2910 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2911 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2912 (*<su>mul<SVE_I>3_highpart): Likewise.
2913 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2914 (*v<ASHIFT><SVE_I>3): Likewise.
2915 (*<su><MAXMIN><SVE_I>3): Likewise.
2916 (*<su><MAXMIN><SVE_F>3): Likewise.
2917 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2918 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2919 (*div<SVE_F>4): Likewise.
2921 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2923 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2926 2018-07-02 Richard Biener <rguenther@suse.de>
2928 PR tree-optimization/86363
2929 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2930 memset argument refers to a non-variable address.
2932 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2934 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2935 {PLUS,MINUS}_EXPR code to...
2936 (adjust_symbolic_bound): ...here,
2937 (combine_bound): ...here,
2938 (set_value_range_with_overflow): ...and here.
2940 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2942 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2944 (extract_range_from_abs_expr): ...here.
2946 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2948 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2949 -fno-omit-frame-pointer when not optimizing.
2951 2018-07-02 Martin Liska <mliska@suse.cz>
2954 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2955 (propagate_nothrow): Likewise.
2957 2018-07-02 Martin Liska <mliska@suse.cz>
2960 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2962 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2964 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2965 function in r262149, changing "loc" param from source_location to
2966 const dump_location_t &.
2967 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2968 declaration, as above.
2970 2018-07-01 Paul Koning <ni1d@arrl.net>
2972 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2973 -munit-asm, -mgnu-asm, -mdec-asm.
2974 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2975 (pdp11_output_labelref): New.
2976 (pdp11_output_def): New.
2977 (pdp11_output_addr_vec_elt): New.
2978 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2979 %# and %@ format codes.
2980 (pdp11_option_override): New.
2981 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2982 (pdp11_output_ident): New.
2983 (pdp11_asm_named_section): New.
2984 (pdp11_asm_init_sections): New.
2985 (pdp11_file_start): New.
2986 (pdp11_file_end): New.
2987 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2988 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2989 %o, like %c but octal.
2990 (pdp11_option_override): New.
2991 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2993 (DATA_SECTION_ASM_OP): Ditto.
2994 (READONLY_DATA_SECTION_ASM_OP): New.
2995 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2996 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2997 (ASM_OUTPUT_LABELREF): Ditto.
2998 (ASM_OUTPUT_DEF): Ditto.
2999 (ASM_OUTPUT_EXTERNAL): New.
3000 (ASM_OUTPUT_SOURCE_FILENAME): New.
3001 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3002 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3003 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3004 %# and %@ format codes.
3005 * config/pdp11/pdp11.opt (mgnu-asm): New.
3006 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3007 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3008 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3010 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3012 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3013 dereferencing path[] beyond its length.
3015 (debug_all_paths): New.
3016 (rewire_first_differing_edge): New.
3017 (adjust_paths_after_duplication): New.
3018 (duplicate_thread_path): Call adjust_paths_after_duplication.
3020 (thread_through_all_blocks): Add new argument to
3021 duplicate_thread_path.
3023 2018-06-30 Jim Wilson <jimw@sifive.com>
3025 * config/riscv/predicates.md (p2m1_shift_operand): New.
3026 (high_mask_shift_operand): New.
3027 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3028 pattern using p2m1_shift_operand.
3029 (lshsi3_zero_extend_3+2): New combiner pattern using
3030 high_mask_shift_operand.
3032 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3034 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3036 (vect_recog_rotate_pattern): ...here.
3037 (vect_convert_input): Try to insert casts of invariants in the
3039 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3040 preheader to be empty.
3042 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3044 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3045 vector type. If given, install it in the new statement's
3047 (vect_element_precision): New function.
3048 (vect_unpromoted_value): New struct.
3049 (vect_unpromoted_value::vect_unpromoted_value): New function.
3050 (vect_unpromoted_value::set_op): Likewise.
3051 (vect_look_through_possible_promotion): Likewise.
3052 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3053 (vect_widened_op_tree, vect_convert_input): Likewise.
3054 (vect_convert_inputs, vect_convert_output): Likewise.
3055 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3056 to handle the optional cast of the multiplication result and
3057 vect_widened_op_tree to detect the widened multiplication itself.
3058 Do not require the input and output of promotion casts to have
3059 the same sign, but base the signedness of the operation on the
3060 input rather than the result. If the pattern includes two
3061 promotions, check that those promotions have the same sign.
3062 Do not restrict the MULT_EXPR handling to a double-width result;
3063 handle quadruple-width results and wider. Use vect_convert_inputs
3064 to convert the inputs to the common type.
3065 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3066 to handle the optional cast of the ABS result. Also allow a sign
3067 change or a sign extension between the ABS and MINUS.
3068 Use vect_widened_op_tree to detect the widened subtraction and use
3069 vect_convert_inputs to convert the inputs to the common type.
3070 (vect_handle_widen_op_by_const): Delete.
3071 (vect_recog_widen_op_pattern): New function.
3072 (vect_recog_widen_mult_pattern): Use it.
3073 (vect_recog_widen_shift_pattern): Likewise.
3074 (vect_recog_widen_sum_pattern): Use
3075 vect_look_through_possible_promotion to handle the promoted
3078 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3080 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3081 the containing gimple_seq *.
3082 * gimple-iterator.h (gsi_for_stmt): Declare it.
3083 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3084 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3085 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3086 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3087 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3089 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3091 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3092 statement being replaced is part of an existing pattern
3093 definition sequence, inserting the new pattern statements before
3095 (vect_pattern_recog_1): Don't return a bool. If the statement
3096 is already part of a pattern, instead apply pattern matching
3097 to the pattern definition statements. Don't clear the
3098 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3099 (vect_pattern_recog): Don't break after the first match;
3100 continue processing the pattern definition statements instead.
3101 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3103 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3105 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3106 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3107 (vect_recog_widen_sum_pattern): Use it.
3109 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3111 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3112 phi is not a pattern statement and has not been replaced by
3113 a pattern statement.
3114 * tree-vect-patterns.c (type_conversion_p): Don't check
3115 STMT_VINFO_IN_PATTERN_P.
3116 (vect_recog_vector_vector_shift_pattern): Likewise.
3117 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3118 the pattern statement rather than the original statement; check
3119 directly for a WIDEN_MULT_EXPR here.
3120 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3121 vect_is_simple_use to return the pattern statement rather
3122 than the original statement; use is_pattern_stmt_p to check
3123 for such a pattern statement.
3124 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3125 to return the pattern statement rather than the original statement;
3126 don't do the same transformation here.
3127 (vect_is_simple_use): If the defining statement has been replaced
3128 by a pattern statement, return the pattern statement instead.
3129 Remove the corresponding (local) transformation from the vectype
3132 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3134 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3135 end and default to null.
3136 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3137 (vectorizable_reduction): Update calls accordingly, dropping the
3138 gimple ** argument if the passed-back statement isn't needed.
3139 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3140 (vect_recog_rotate_pattern): Likewise.
3141 (vect_recog_mask_conversion_pattern): Likewise.
3142 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3143 (vect_mask_constant_operand_p): Likewise.
3144 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3145 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3146 (get_group_load_store_type, get_load_store_type): Likewise.
3147 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3148 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3149 (vectorizable_conversion, vectorizable_assignment): Likewise.
3150 (vectorizable_shift, vectorizable_operation): Likewise.
3151 (vectorizable_store, vect_is_simple_cond): Likewise.
3152 (vectorizable_condition, vectorizable_comparison): Likewise.
3153 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3154 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3155 and move it to the end. Cope with null def_stmt_outs.
3157 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3159 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3161 2018-06-29 Jeff Law <law@redhat.com>
3163 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3164 displacements for TARGET_V850E2V3 and newer.
3165 (TARGET_LRA_P): Remove. Defaults to LRA now.
3166 * config/v850/v850.md (sign23byte_load): Remove.
3167 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3168 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3170 2018-06-29 Martin Liska <mliska@suse.cz>
3173 * coverage.c (coverage_init): Mangle full path name.
3174 * doc/invoke.texi: Document the change.
3175 * gcov-io.c (mangle_path): New.
3176 * gcov-io.h (mangle_path): Likewise.
3177 * gcov.c (mangle_name): Use mangle_path for path mangling.
3179 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3181 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3182 if starting source register is not even.
3184 2018-06-29 Martin Liska <mliska@suse.cz>
3186 PR tree-optimization/86263
3187 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3188 Make edge redirection.
3190 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3192 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3193 (dump_scope_depth): New variable.
3194 (get_dump_scope_depth): New function.
3195 (dump_begin_scope): New function.
3196 (dump_end_scope): New function.
3197 * dumpfile.h (get_dump_scope_depth): New declaration.
3198 (dump_begin_scope): New declaration.
3199 (dump_end_scope): New declaration.
3200 (class auto_dump_scope): New class.
3201 (AUTO_DUMP_SCOPE): New macro.
3202 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3205 2018-06-29 Richard Biener <rguenther@suse.de>
3207 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3208 compute_all_dependences succeeds.
3209 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3210 exceed --param loop-max-datarefs-for-datadeps.
3212 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3214 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3216 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3219 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3220 alternative 0 in preferred_for_speed attribute.
3222 2018-06-28 Paul Koning <ni1d@arrl.net>
3224 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3225 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3226 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3227 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3228 for shift insn patterns.
3230 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3232 * cgraph.c (cgraph_node::get_body): Replace assignments to
3233 "dump_file" with calls to set_dump_file.
3234 * dumpfile.c (alt_dump_file): Make static, and group with...
3235 (alt_flags): ...this definition.
3236 (dumps_are_enabled): New variable.
3237 (refresh_dumps_are_enabled): New function.
3238 (set_dump_file): New function.
3239 (set_alt_dump_file): New function.
3240 (gcc::dump_manager::dump_start): Replace assignments to
3241 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3243 (gcc::dump_manager::dump_finish): Likewise.
3244 * dumpfile.h (alt_dump_file): Delete decl.
3245 (dumps_are_enabled): New variable decl.
3246 (set_dump_file): New function decl.
3247 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3249 * tree-nested.c (lower_nested_functions): Replace assignments to
3250 "dump_file" with calls to set_dump_file.
3252 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3254 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3255 goto_locus of each outgoing edge of each basic block.
3257 2018-06-28 Richard Biener <rguenther@suse.de>
3259 * dwarf2out.c (decl_scope_table): Remove.
3260 (push_decl_scope): Likewise.
3261 (pop_decl_scope): Likewise.
3262 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3263 (gen_struct_or_union_type_die): Likewise.
3264 (gen_tagged_type_die): Likewise.
3265 (dwarf2out_init): Do not initialize decl_scope_table.
3266 (dwarf2out_c_finalize): Do not free it.
3268 2018-06-28 Richard Biener <rguenther@suse.de>
3270 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3271 deciding whether to not re-use a DIE.
3273 2018-06-28 Richard Biener <rguenther@suse.de>
3275 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3276 DW_AT_abstract_origin attribute.
3278 2018-06-28 Martin Liska <mliska@suse.cz>
3280 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3281 Use newly introduced constants.
3282 * tree-switch-conversion.h (struct jump_table_cluster):
3283 Define max_ratio_for_size and max_ratio_for_speed.
3285 2018-06-28 Martin Liska <mliska@suse.cz>
3287 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3288 Add new checking assert to catch invalid state.
3289 (jump_table_cluster::can_be_handled): Handle single case
3291 (jump_table_cluster::is_beneficial): Bail out for such case.
3292 (bit_test_cluster::find_bit_tests):
3293 Add new checking assert to catch invalid state.
3294 (bit_test_cluster::can_be_handled): Handle single case
3296 (bit_test_cluster::is_beneficial): Bail out for such case.
3297 (switch_decision_tree::analyze_switch_statement):
3300 2018-06-28 Martin Liska <mliska@suse.cz>
3302 * common.opt: Introduce -completion option.
3303 * gcc.c (driver_handle_option): Handle it.
3304 (driver::main): Print completions if completion
3306 * opt-suggestions.c (option_proposer::get_completions):
3308 (option_proposer::suggest_completion): Likewise.
3309 (option_proposer::find_param_completions): Likewise.
3310 (verify_autocompletions): Likewise.
3311 (test_completion_valid_options): Likewise.
3312 (test_completion_valid_params): Likewise.
3313 (in_completion_p): Likewise.
3314 (empty_completion_p): Likewise.
3315 (test_completion_partial_match): Likewise.
3316 (test_completion_garbage): Likewise.
3317 (opt_proposer_c_tests): Likewise.
3318 * opt-suggestions.h: Declare new functions.
3319 * opts.c (common_handle_option): Handle OPT__completion_.
3320 * selftest-run-tests.c (selftest::run_tests): Add
3321 opt_proposer_c_tests.
3322 * selftest.c (assert_str_startswith): New.
3323 * selftest.h (assert_str_startswith): Likewise.
3324 (opt_proposer_c_tests): New.
3325 (ASSERT_STR_STARTSWITH): Likewise.
3327 2018-06-28 Martin Liska <mliska@suse.cz>
3329 * Makefile.in: Add opt-suggestions.o.
3330 * gcc-main.c: Include opt-suggestions.h.
3331 * gcc.c (driver::driver): Likewise.
3332 (driver::~driver): Remove m_option_suggestions.
3333 (driver::build_option_suggestions): Moved to option_proposer.
3334 (driver::suggest_option): Likewise.
3335 (driver::handle_unrecognized_options): Use option_proposer.
3336 * gcc.h (class driver): Add new memver m_option_proposer.
3337 * opt-suggestions.c: New file.
3338 * opt-suggestions.h: New file.
3340 2018-06-28 Martin Liska <mliska@suse.cz>
3342 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3343 (auto_string_vec::~auto_string_vec): Likewise.
3345 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3347 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3348 prevent_decl_creation_for_types fields up and add reset_location field.
3349 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3350 statement if id->reset_location is true.
3351 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3352 id->reset_location is true.
3353 (copy_phis_for_bb): Force input_location on the arguments if
3354 id->reset_location is true.
3355 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3356 is set on the function to be inlined.
3358 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3360 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3362 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3364 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3365 registers for Pmode.
3366 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3367 hard registers for the clobbered pseudo.
3369 2018-06-27 Paul Koning <ni1d@arrl.net>
3371 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3372 mutually exclusive options.
3373 * config/pdp11/constraints.md (h): New constraint.
3374 (O): Update definition to match shift code generation.
3375 (D): New constraint.
3376 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3378 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3380 (output_jump): Change arguments.
3381 (pdp11_fixed_cc_regs): New function.
3382 (pdp11_cc_mode): Ditto.
3383 (pdp11_expand_shift): Ditto.
3384 (pdp11_assemble_shift): Ditto.
3385 (pdp11_small_shift): Ditto.
3386 (pdp11_branch_cost): Remove.
3387 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3389 (pdp11_register_move_cost): Update for CC registers.
3390 (pdp11_rtx_costs): Add case for LSHIFTRT.
3391 (pdp11_output_jump): Add CCNZ mode conditional branches.
3392 (notice_update_cc_on_set): Remove.
3393 (pdp11_cc_mode): New function.
3394 (simple_memory_operand): Correct pre/post decrement case.
3395 (no_side_effect_operand): New function.
3396 (pdp11_regno_reg_class): Add CC_REGS class.
3397 (pdp11_fixed_cc_regs): New function.
3398 (pdp11_small_shift): New function.
3399 (pdp11_expand_shift): New function to expand shift insns.
3400 (pdp11_assemble_shift): New function to output shifts.
3401 (pdp11_branch_cost): Remove.
3402 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3403 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3404 (WCHAR_TYPE): Ditto.
3405 (PTRDIFF_TYPE): Ditto.
3406 (ADJUST_INSN_LENGTH): New macro.
3407 (FIXED_REGISTERS): Add CC registers.
3408 (CALL_USED_REGISTERS): Ditto.
3410 (REG_CLASS_NAMES): Ditto.
3411 (REG_CLASS_CONTENTS): Ditto.
3412 (SELECT_CC_MODE): Use new function.
3413 (TARGET_FLAGS_REGNUM): New macro.
3414 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3415 (cc0_reg_rtx): Remove.
3416 (CC_STATUS_MDEP): Remove.
3417 (CC_STATUS_MDEFP_INIT): Remove.
3418 (CC_IN_FPU): Remove.
3419 (NOTICE_UPDATE_CC): Remove.
3420 (REGISTER_NAMES): Add CC registers.
3421 (BRANCH_COST): Change to constant 1.
3422 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3424 * config/pdp11/pdp11.opt (mbcopy): Remove.
3425 (mbcopy-builtin): Remove.
3426 (mbranch-cheap): Remove.
3427 (mbranch-expensive): Remove.
3428 * config/pdp11/predicates.md (expand_shift_operand): Update to
3429 match shift code generation.
3430 (ccnz_operator): New predicate.
3431 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3432 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3433 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3435 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3436 description of O constraint.
3438 2018-06-27 Jeff Law <law@redhat.com>
3439 Austin Law <austinklaw@gmail.com>
3441 * config/v850/v850.md (addsi3_set_flags): New pattern.
3442 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3443 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3444 (zero_extendhisi2_v850_set_flags): Likewise.
3445 (zero_extendqisi2_v850_set_flags): Likewise.
3446 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3447 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3448 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3450 * config/v850/v850-protos.h (notice_update_cc): Remove.
3451 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3452 (v850_print_operand): Handle 'D' and "d".
3453 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3454 Add handling of arithmetic/logical operations compared against zero.
3455 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3456 Do not look at v850_compare_op, instead get mode from last argument.
3457 (v850_gen_compare): Remove
3458 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3459 after reload for prologue insns.
3460 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3462 (construct_save_jarl): Likewise.
3463 (TARGET_FLAGS_REGNUM): Define.
3464 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3465 (NOTICE_UPDATE_CC): Remove.
3466 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3467 than cc0. Conditionalize on reload_completed.
3468 (cmpsi_insn, setfcc_insn): Likewise.
3469 (tst1 splitter): Turn into define_and_split which sets the flags
3471 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3472 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3473 (cstoresf4, cstoredf4): Clobber the flags.
3474 (cmpsi, cmpsf, cmpdf): Remove expanders.
3475 (setf_insn): Remove pattern.
3476 (addsi3): Turn into define_and_split which clobbers the flags after
3477 reload and a suitable pattern (addsi3_clobber_flags) for use after
3479 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3480 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3481 (ashrsi3, ashrsi3_v850e2): Likewise.
3482 (bins): Clobber the flags.
3483 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3484 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3485 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3486 (call_value_internal_short, call_value_internal_long): Likewise.
3487 (callt_save_interrupt, callt_return_interrupt): Likewise.
3488 (save_interrupt, return_interrupt): Likewise.
3489 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3490 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3491 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3492 (All FP comparisons): Only allow after reload has completed.
3494 (divh, divhu): Tweak output template.
3495 (branch_z_normal, branch_z_invert): Remove
3496 (branch_nz_normal, branch_nz_invert): Likewise.
3497 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3499 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3500 * config/v850/v850.c (notice_update_cc): Remove.
3501 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3502 (CC_NO_CARRY): Likewise.
3503 (NOTICE_UPDATE_CC): Define to nothing.
3504 * config/v850/v850.md: Remove block comment on cc0 handling
3505 Remove "cc" attribute from all patterns. Remove cc_status handling
3506 from all patterns. Minor formatting fixes.
3508 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3510 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3511 (cortex-a76.cortex-a55): Likewise.
3512 * config/aarch64/aarch64-tune.md: Regenerate.
3513 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3514 cortex-a76.cortex-a55.
3516 2018-06-27 Jeff Law <law@redhat.com>
3518 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3519 (MULTILIB_DIRNAMES): Similarly.
3521 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3523 * gimple.h (gimple_return_retbnd): Delete.
3524 (gimple_return_set_retbnd): Likewise.
3525 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3526 gimple_return_set_retbnd.
3527 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3528 gimple_return_retbnd and adjust.
3529 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3530 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3531 Explicitly return NULL in a couple more cases. Move assertion
3532 on debug statements and remove unreachable code.
3533 (reset_debug_binding): Do not test id->retbnd.
3534 (expand_call_inline): Do not set it.
3536 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3538 * configure.ac: Add --disable-gcov option.
3539 * configure: Regenerate.
3540 * Makefile.in: Honour @enable_gcov@.
3541 * doc/install.texi: Document --disable-gcov.
3543 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3545 * config/arm/arm-cpus.in (cortex-a76): New entry.
3546 (cortex-a76.cortex-a55): Likewise.
3547 * config/arm/arm-tables.opt: Regenerate.
3548 * config/arm/arm-tune.md: Likewise.
3549 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3550 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3551 cortex-a76.cortex-a55.
3553 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3556 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3558 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3560 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3562 (EPILOGUE_USES): Likewise.
3564 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3566 * tree-inline.c (remap_location): New function extracted from...
3567 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3568 (copy_phis_for_bb): ...here. Call remap_location.
3569 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3571 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3573 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3574 unaligned vsx for 16B memset.
3576 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3579 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3580 ieee128_float_type_node to long_double_type_node unless
3581 TARGET_LONG_DOUBLE_128 is set.
3583 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3585 * cfgloop.c (get_loop_location): Convert return type from
3586 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3587 by implicit construction from rtx_insn *, and using
3588 dump_user_location_t::from_function_decl for the fallback case.
3589 * cfgloop.h (get_loop_location): Convert return type from
3590 location_t to dump_user_location_t.
3591 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3592 dump_printf_loc to pass in a dump_location_t rather than a
3593 location_t, via the gimple stmt.
3594 * coverage.c (get_coverage_counts): Update calls to
3595 dump_printf_loc to pass in dump_location_t rather than a
3597 * doc/optinfo.texi (Dump types): Convert example of
3598 dump_printf_loc from taking "locus" to taking "insn". Update
3599 description of the "_loc" calls to cover dump_location_t.
3600 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3602 (dump_user_location_t::dump_user_location_t): New constructors,
3603 from gimple *stmt and rtx_insn *.
3604 (dump_user_location_t::from_function_decl): New function.
3605 (dump_loc): Make static.
3606 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3607 const dump_location_t &.
3608 (dump_generic_expr_loc): Delete.
3609 (dump_printf_loc): Convert param "loc" from location_t to
3610 const dump_location_t &.
3611 (selftest::test_impl_location): New function.
3612 (selftest::dumpfile_c_tests): New function.
3613 * dumpfile.h: Include "profile-count.h".
3614 (class dump_user_location_t): New class.
3615 (struct dump_impl_location_t): New struct.
3616 (class dump_location_t): New class.
3617 (dump_printf_loc): Convert 2nd param from source_location to
3618 const dump_location_t &.
3619 (dump_generic_expr_loc): Delete.
3620 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3621 const dump_location_t &.
3622 * gimple-fold.c (fold_gimple_assign): Update call to
3623 dump_printf_loc to pass in a dump_location_t rather than a
3624 location_t, via the gimple stmt.
3625 (gimple_fold_call): Likewise.
3626 * gimple-loop-interchange.cc
3627 (loop_cand::analyze_iloop_reduction_var): Update for change to
3628 check_reduction_path.
3629 (tree_loop_interchange::interchange): Update for change to
3631 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3632 change in return-type of find_loop_location.
3633 (graphite_regenerate_ast_isl): Likewise.
3634 * graphite-optimize-isl.c (optimize_isl): Likewise.
3635 * graphite.c (graphite_transform_loops): Likewise.
3636 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3637 pass in a dump_location_t rather than a location_t, via the
3639 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3640 * ipa.c (walk_polymorphic_call_targets): Likewise.
3641 * loop-unroll.c (report_unroll): Convert "locus" param from
3642 location_t to dump_location_t.
3643 (decide_unrolling): Update for change to get_loop_location's
3645 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3646 location_t to dump_user_location_t.
3647 (grid_find_single_omp_among_assignments_1): Updates calls to
3648 dump_printf_loc to pass in a dump_location_t rather than a
3649 location_t, via the gimple stmt.
3650 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3651 location_t to dump_location_t. Updates calls to dump_printf_loc
3652 to pass in a dump_location_t rather than a location_t, via the
3654 (grid_inner_loop_gridifiable_p): Likewise.
3655 (grid_dist_follows_simple_pattern): Likewise.
3656 (grid_gfor_follows_tiling_pattern): Likewise.
3657 (grid_target_follows_gridifiable_pattern): Likewise.
3658 (grid_attempt_target_gridification): Convert initialization
3659 of local "grid" from memset to zero-initialization; FIXME: does
3660 this require C++11? Update call to dump_printf_loc to pass in a
3661 optinfo_location rather than a location_t, via the gimple stmt.
3662 * profile.c (read_profile_edge_counts): Updates call to
3663 dump_printf_loc to pass in a dump_location_t rather than a
3665 (compute_branch_probabilities): Likewise.
3666 * selftest-run-tests.c (selftest::run_tests): Call
3668 * selftest.h (dumpfile_c_tests): New decl.
3669 * tree-loop-distribution.c (pass_loop_distribution::execute):
3670 Update for change in return type of find_loop_location.
3671 * tree-parloops.c (parallelize_loops): Likewise.
3672 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3673 "locus" from location_t to dump_user_location_t.
3674 (canonicalize_loop_induction_variables): Likewise.
3675 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3676 for change in return type of find_loop_location.
3677 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3678 to dump_printf_loc to pass in a dump_location_t rather than a
3679 location_t, via the stmt.
3680 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3682 * tree-vect-loop-manip.c (find_loop_location): Convert return
3683 type from source_location to dump_user_location_t.
3684 (vect_do_peeling): Update for above change.
3685 (vect_loop_versioning): Update for change in type of
3687 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3688 from location_t to dump_user_location_t.
3689 (vect_estimate_min_profitable_iters): Update for change in type
3691 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3692 location_t to dump_location_t.
3693 (vect_slp_bb): Update for change in type of vect_location.
3694 * tree-vectorizer.c (vect_location): Convert from source_location
3695 to dump_user_location_t.
3696 (try_vectorize_loop_1): Update for change in vect_location's type.
3697 (vectorize_loops): Likewise.
3698 (increase_alignment): Likewise.
3699 * tree-vectorizer.h (vect_location): Convert from source_location
3700 to dump_user_location_t.
3701 (find_loop_location): Convert return type from source_location to
3702 dump_user_location_t.
3703 (check_reduction_path): Convert 1st param from location_t to
3704 dump_user_location_t.
3705 * value-prof.c (check_counter): Update call to dump_printf_loc to
3706 pass in a dump_user_location_t rather than a location_t; update
3707 call to error_at for change in type of "locus".
3708 (check_ic_target): Update call to dump_printf_loc to
3709 pass in a dump_user_location_t rather than a location_t, via the
3712 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3714 * config/s390/s390.h (enum processor_flags): Do not use
3715 default tune parameter when -march was specified.
3717 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3720 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3721 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3724 2018-06-26 Richard Biener <rguenther@suse.de>
3726 PR tree-optimization/86287
3728 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3729 (vect_analyze_loop): Initialize n_stmts.
3731 2018-06-26 Richard Biener <rguenther@suse.de>
3734 * fold-const.c (fold_convertible_p): Pointer extension
3737 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3740 * dwarf2out.c (loc_list_has_views): Adjust comments.
3741 (dw_loc_list): Split single cross-partition range with
3744 2018-06-25 Jeff Law <law@redhat.com>
3746 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3747 on -mbig-switch by default.
3749 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3751 (const_float_0_operand): Remove unused predicate.
3752 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3753 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3754 (recipsf2): New expander. Original pattern now called
3756 (recipdf2, recipdf2_insn): Similarly.
3757 (rsqrtsf2, rsqrtsf2_insn): Similarly
3758 (rsqrtdf2, rsqrtdf2_insn): Similarly
3760 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3762 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3763 Simplify logic for FreeBSD (twice).
3765 2018-06-25 Martin Sebor <msebor@redhat.com>
3767 PR tree-optimization/86204
3768 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3769 a strnlen result if it's less than the length of the string.
3771 2018-06-25 Martin Sebor <msebor@redhat.com>
3773 PR tree-optimization/85700
3774 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3775 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3776 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3778 2018-06-25 Martin Sebor <msebor@redhat.com>
3780 * doc/extend.texi (Zero-length arrays): Update and clarify.
3782 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3784 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3785 added IEEE/IBM long double multilib support on PowerPC little
3786 endian Linux systems.
3787 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3788 (MULTILIB_DEFAULTS): Likewise.
3789 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3791 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3792 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3793 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3795 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3798 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3799 (REORDER_45): Likewise.
3801 2018-06-25 Jeff Law <law@redhat.com>
3803 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3804 dividend to 32 bits. Adjust length.
3805 (udivmodhi4): Cleanup output template. Fix length.
3807 2018-06-25 Carl Love <cel@us.ibm.com>
3809 * config/rs6000/vsx.md: Change word selector to prefered location.
3811 2018-06-25 Richard Biener <rguenther@suse.de>
3813 PR tree-optimization/86304
3814 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3815 epilogue-if-converted loops as well.
3817 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
3819 * lto-section-out.c (lto_begin_section): Do not print section
3820 name for noaddr and unnumbered dumps.
3822 2018-06-25 Richard Biener <rguenther@suse.de>
3824 * tree-vectorizer.h (struct vec_info_shared): New structure
3825 with parts split out from struct vec_info and loop_nest from
3826 struct _loop_vec_info.
3827 (struct vec_info): Adjust accordingly.
3828 (struct _loop_vec_info): Likewise.
3829 (LOOP_VINFO_LOOP_NEST): Adjust.
3830 (LOOP_VINFO_DATAREFS): Likewise.
3831 (LOOP_VINFO_DDRS): Likewise.
3832 (struct _bb_vec_info): Likewise.
3833 (BB_VINFO_DATAREFS): Likewise.
3834 (BB_VINFO_DDRS): Likewise.
3835 (struct _stmt_vec_info): Add dr_aux member.
3836 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3837 (DR_MISALIGNMENT_UNINITIALIZED): New.
3838 (set_dr_misalignment): Adjust.
3839 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3840 (vect_analyze_loop): Adjust prototype.
3841 (vect_analyze_loop_form): Likewise.
3842 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3843 Compute dependences lazily.
3844 (vect_record_base_alignments): Use shared datarefs/ddrs.
3845 (vect_verify_datarefs_alignment): Likewise.
3846 (vect_analyze_data_refs_alignment): Likewise.
3847 (vect_analyze_data_ref_accesses): Likewise.
3848 (vect_analyze_data_refs): Likewise.
3849 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3850 constructor parameter for shared part.
3851 (vect_analyze_loop_form): Pass in shared part and adjust.
3852 (vect_analyze_loop_2): Pass in storage for the number of
3853 stmts. Move loop nest finding to the caller. Compute
3855 (vect_analyze_loop): Pass in shared part.
3856 (vect_transform_loop): Verify shared datarefs are unchanged.
3857 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3858 constructor parameter for shared part.
3859 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3860 (vect_slp_bb): Verify shared datarefs are unchanged before
3862 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3864 (new_stmt_vec_info): Initialize DR_AUX misalignment to
3865 DR_MISALIGNMENT_UNINITIALIZED.
3866 * tree-vectorizer.c (vec_info::vec_info): Add constructor
3867 parameter for shared part.
3868 (vec_info::~vec_info): Adjust.
3869 (vec_info_shared::vec_info_shared): New.
3870 (vec_info_shared::~vec_info_shared): Likewise.
3871 (vec_info_shared::save_datarefs): Likewise.
3872 (vec_info_shared::check_datarefs): Likewise.
3873 (try_vectorize_loop_1): Construct shared part live for analyses
3874 of a single loop for multiple vector sizes.
3875 * tree-parloops.c (gather_scalar_reductions): Adjust.
3877 2018-06-25 Richard Biener <rguenther@suse.de>
3879 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3880 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3881 (vect_analyze_data_refs): Remove similar code from here and
3882 simplify accordingly.
3884 2018-06-25 Richard Biener <rguenther@suse.de>
3886 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3887 for reverse storage order accesses rather than asserting
3888 they cannot happen here.
3890 2018-06-25 Tom de Vries <tdevries@suse.de>
3893 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3894 Use data16 instead of .byte for insn prefix.
3896 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3899 * parser.c (make_char_string_pack): Pass this literal chars
3900 through cpp_interpret_string.
3901 (cp_parser_userdef_numeric_literal): Check the result of
3902 make_char_string_pack.
3904 2018-06-24 Maya Rashish <coypu@sdf.org>
3906 * ginclude/stddef.h: Simplify conditions around avoiding
3907 re-definition of __size_t.
3909 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3911 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3912 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3914 2018-06-22 Maya Rashish <coypu@sdf.org>
3916 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3917 made to OpenBSD and NetBSD through the years.
3919 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3921 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3922 behavior of vec_pack (vector double, vector double) to match
3923 behavior of vec_float2 (vector double, vector double).
3925 2018-06-22 Olivier Hainque <hainque@adacore.com>
3927 * gimplify.c (gimplify_function_tree): Prevent creation
3928 of a trampoline for the address of the current function
3929 passed to entry/exit instrumentation hooks.
3931 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3934 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3937 2018-06-22 Martin Liska <mliska@suse.cz>
3939 PR tree-optimization/86263
3940 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3941 Bail out if is_enabled is false.
3942 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3944 (jump_table_cluster::is_enabled): New function.
3946 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3948 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3949 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3950 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3951 (lto_input_ts_binfo_tree_pointers): Likewise.
3952 * tree-streamer-out.c (streamer_write_tree_bitfields,
3953 write_ts_binfo_tree_pointers): Likewise.
3954 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3956 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3958 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3960 2018-06-22 Martin Liska <mliska@suse.cz>
3962 * symbol-summary.h (get): Make it pure and inline move
3963 functionality from ::get function.
3964 (get): Remove and inline into ::get and ::get_create.
3965 (get_create): Move code from ::get function.
3967 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3970 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3971 -x assembler-with-cpp.
3973 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3975 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3976 _FILE_OFFSET_BITS=64 for C++.
3978 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3980 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3981 conversion insn that shows up when pr85657-3.c is compiled using
3982 IEEE 128-bit long double.
3983 (neg<mode>2_internal): Use the correct mode to check whether the
3984 mode is IBM extended.
3985 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3986 multiply and divide external functions from being created more
3989 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3991 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3993 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3994 the edge can be forwarded.
3995 (cfg_layout_merge_blocks): Likewise.
3997 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3999 * except.c (finish_eh_generation): Commit edge insertions only after
4000 the EH edges have been redirected from post-landing to landing pads.
4002 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4004 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4005 create_tmp_var_for to create the FRAME decl.
4006 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4008 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4010 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4011 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4012 debug statement when resetting its value.
4013 (expand_call_inline): Copy the locus of the call onto the assignment
4014 of the return value, if any. Use local variable in more cases.
4016 2018-06-21 Martin Liska <mliska@suse.cz>
4018 * ipa-pure-const.c (propagate_nothrow): Use
4019 funct_state_summaries->get.
4020 (dump_malloc_lattice): Likewise.
4021 (propagate_malloc): Likewise.
4023 2018-06-21 Richard Biener <rguenther@suse.de>
4025 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4026 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4027 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4029 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4030 BLOCK_ABSTRACT_ORIGIN unconditionally.
4032 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4034 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4036 * ipa-reference.c (ipa_reference_c_finalize): Delete
4037 ipa_ref_opt_sum_summaries and set it to NULL.
4039 2018-06-21 Tom de Vries <tdevries@suse.de>
4041 PR tree-optimization/85859
4042 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4043 test with comment from bb_no_side_effects_p.
4045 2018-06-21 Richard Biener <rguenther@suse.de>
4047 PR tree-optimization/86232
4048 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4049 max for constant niter.
4051 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4053 * config/aarch64/aarch64-simd.md
4054 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4056 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4058 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4059 Make opernads of the unspec commutative.
4061 2018-06-21 Richard Biener <rguenther@suse.de>
4063 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4064 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4065 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4066 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4068 (vect_record_base_alignments): Do not record base alignment
4069 for gathers or scatters.
4070 (vect_compute_data_ref_alignment): Drop return value that is always
4071 true. Bail out early for gathers or scatters.
4072 (vect_enhance_data_refs_alignment): Bail out early for gathers
4074 (vect_find_same_alignment_drs): Likewise.
4075 (vect_analyze_data_refs_alignment): Remove dead code.
4076 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4077 (vect_analyze_data_refs): For possible gathers or scatters do
4078 not create an alternate DR, just check their possible validity
4079 and mark them. Adjust DECL_NONALIASED handling to not rely
4081 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4082 update inits of gathers or scatters.
4083 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4084 Also copy gather/scatter flag to pattern vinfo.
4086 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4088 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4089 behavior of vec_packsu (vector unsigned long long, vector unsigned
4090 long long) to match behavior of vec_packs with same signature.
4092 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4093 Thomas Schwinge <thomas@codesourcery.com>
4094 Cesar Philippidis <cesar@codesourcery.com>
4096 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4097 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4098 (gimplify_adjust_omp_clauses): Likewise.
4099 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4100 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4101 (gimplify_omp_target_update): Update handling of acc update and
4103 * omp-low.c (install_var_field): Remove unused parameter
4104 base_pointers_restrict.
4105 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4106 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4108 (omp_target_base_pointers_restrict_p): Delete.
4109 (scan_omp_target): Update call to scan_sharing_clauses.
4110 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4112 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4113 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4114 (convert_local_omp_clauses): Likewise.
4115 * tree-pretty-print.c (dump_omp_clause): Likewise.
4116 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4118 (omp_clause_code_name): Likewise.
4120 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4123 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4126 PR tree-optimization/86231
4127 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4128 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4130 2018-06-20 Tom de Vries <tdevries@suse.de>
4132 PR tree-optimization/86097
4133 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4134 iv type if signedness of iv type is not the same as that of *nit.
4136 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4138 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4139 EDGE_EH edges, verify they are all EDGE_EH.
4141 2018-06-20 Maya Rashish <coypu@sdf.org>
4143 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4145 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4147 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4148 * config/aarch64/aarch64.c (xgene1_tunings): Add
4149 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4150 (aarch64_mode_valid_for_sched_fusion_p):
4151 Allow 16-byte modes.
4152 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4153 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4155 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4157 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4158 * config/aarch64/iterators.md (VQ2): New mode iterator.
4160 2018-06-20 Martin Liska <mliska@suse.cz>
4162 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4163 Change default ratio from 10 to 8.
4165 2018-06-20 Martin Liska <mliska@suse.cz>
4167 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4169 (bit_test_cluster::find_bit_tests): Likewise.
4170 (switch_decision_tree::analyze_switch_statement): Find clusters.
4171 * tree-switch-conversion.h (struct jump_table_cluster): Document
4174 2018-06-20 Martin Liska <mliska@suse.cz>
4176 * tree-switch-conversion.c (switch_conversion::collect):
4177 Record m_uniq property.
4178 (switch_conversion::expand): Bail out for special conditions.
4179 (group_cluster::~group_cluster): New.
4180 (group_cluster::group_cluster): Likewise.
4181 (group_cluster::dump): Likewise.
4182 (jump_table_cluster::emit): New.
4183 (switch_decision_tree::fix_phi_operands_for_edges): New.
4184 (struct case_node): Remove struct.
4185 (jump_table_cluster::can_be_handled): New.
4186 (case_values_threshold): Moved to header.
4187 (reset_out_edges_aux): Likewise.
4188 (jump_table_cluster::is_beneficial): New.
4189 (bit_test_cluster::can_be_handled): Likewise.
4190 (add_case_node): Remove.
4191 (bit_test_cluster::is_beneficial): New.
4192 (case_bit_test::cmp): New.
4193 (bit_test_cluster::emit): New.
4194 (expand_switch_as_decision_tree_p): Remove.
4195 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4196 (fix_phi_operands_for_edge): Likewise.
4197 (switch_decision_tree::analyze_switch_statement): New.
4198 (compute_cases_per_edge): Move ...
4199 (switch_decision_tree::compute_cases_per_edge): ... here.
4200 (try_switch_expansion): Likewise.
4201 (switch_decision_tree::try_switch_expansion): Likewise.
4202 (record_phi_operand_mapping): Likewise.
4203 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4204 (emit_case_decision_tree): Likewise.
4205 (switch_decision_tree::emit): Likewise.
4206 (balance_case_nodes): Likewise.
4207 (switch_decision_tree::balance_case_nodes): Likewise.
4208 (dump_case_nodes): Likewise.
4209 (switch_decision_tree::dump_case_nodes): Likewise.
4210 (emit_jump): Likewise.
4211 (switch_decision_tree::emit_jump): Likewise.
4212 (emit_cmp_and_jump_insns): Likewise.
4213 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4214 (emit_case_nodes): Likewise.
4215 (switch_decision_tree::emit_case_nodes): Likewise.
4216 (conditional_probability): Remove.
4217 * tree-switch-conversion.h (enum cluster_type): New.
4219 (struct cluster): Likewise.
4220 (cluster::cluster): Likewise.
4221 (struct simple_cluster): Likewise.
4222 (simple_cluster::simple_cluster): Likewise.
4223 (struct group_cluster): Likewise.
4224 (struct jump_table_cluster): Likewise.
4225 (struct bit_test_cluster): Likewise.
4226 (struct min_cluster_item): Likewise.
4227 (struct case_tree_node): Likewise.
4228 (case_tree_node::case_tree_node): Likewise.
4229 (jump_table_cluster::case_values_threshold): Likewise.
4230 (struct case_bit_test): Likewise.
4231 (struct switch_decision_tree): Likewise.
4232 (struct switch_conversion): Likewise.
4233 (switch_decision_tree::reset_out_edges_aux): Likewise.
4235 2018-06-20 Martin Liska <mliska@suse.cz>
4237 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4238 (hoist_edge_and_branch_if_true): Likewise.
4239 (expand_switch_using_bit_tests_p): Likewise.
4240 (struct case_bit_test): Likewise.
4241 (case_bit_test_cmp): Likewise.
4242 (emit_case_bit_tests): Likewise.
4243 (switch_conversion::switch_conversion): New class.
4244 (struct switch_conv_info): Remove old struct.
4245 (collect_switch_conv_info): More to ...
4246 (switch_conversion::collect): ... this.
4247 (check_range): Likewise.
4248 (switch_conversion::check_range): Likewise.
4249 (check_all_empty_except_final): Likewise.
4250 (switch_conversion::check_all_empty_except_final): Likewise.
4251 (check_final_bb): Likewise.
4252 (switch_conversion::check_final_bb): Likewise.
4253 (create_temp_arrays): Likewise.
4254 (switch_conversion::create_temp_arrays): Likewise.
4255 (free_temp_arrays): Likewise.
4256 (gather_default_values): Likewise.
4257 (switch_conversion::gather_default_values): Likewise.
4258 (build_constructors): Likewise.
4259 (switch_conversion::build_constructors): Likewise.
4260 (constructor_contains_same_values_p): Likewise.
4261 (switch_conversion::contains_same_values_p): Likewise.
4262 (array_value_type): Likewise.
4263 (switch_conversion::array_value_type): Likewise.
4264 (build_one_array): Likewise.
4265 (switch_conversion::build_one_array): Likewise.
4266 (build_arrays): Likewise.
4267 (switch_conversion::build_arrays): Likewise.
4268 (gen_def_assigns): Likewise.
4269 (switch_conversion::gen_def_assigns): Likewise.
4270 (prune_bbs): Likewise.
4271 (switch_conversion::prune_bbs): Likewise.
4272 (fix_phi_nodes): Likewise.
4273 (switch_conversion::fix_phi_nodes): Likewise.
4274 (gen_inbound_check): Likewise.
4275 (switch_conversion::gen_inbound_check): Likewise.
4276 (process_switch): Use the newly created class.
4277 (switch_conversion::expand): New.
4278 (switch_conversion::~switch_conversion): New.
4279 * tree-switch-conversion.h: New file.
4281 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4283 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4284 tree-vect-patterns.c.
4285 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4286 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4287 (vect_recog_sad_pattern): Likewise.
4288 (vect_recog_widen_sum_pattern): Likewise.
4289 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4290 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4291 (vect_recog_rotate_pattern): Likewise.
4292 (vect_recog_mult_pattern): Likewise.
4293 (vect_recog_vector_vector_shift_pattern): Likewise.
4294 (vect_recog_divmod_pattern): Likewise.
4295 (vect_recog_mixed_size_cond_pattern): Likewise.
4296 (vect_recog_bool_pattern): Likewise.
4297 (vect_recog_mask_conversion_pattern): Likewise.
4298 (vect_try_gather_scatter_pattern): Likewise.
4299 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4300 (vect_recog_over_widening_pattern): Likewise.
4301 (vect_recog_gather_scatter_pattern): Likewise.
4302 (vect_recog_func_ptr): Move from tree-vectorizer.h
4303 (vect_vect_recog_func_ptrs): Move further down the file.
4304 (vect_recog_func): Likewise. Remove the third argument.
4305 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4306 (vect_pattern_recog_1): Expect the pattern function to do any
4307 necessary target tests. Also expect it to provide a vector type.
4308 Remove the type_in handling.
4310 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4312 * tree-vect-patterns.c (vect_pattern_detected): New function.
4313 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4314 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4315 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4316 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4317 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4318 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4319 (vect_recog_mask_conversion_pattern)
4320 (vect_try_gather_scatter_pattern): Likewise.
4322 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4324 * tree-vect-patterns.c (vect_get_internal_def): New function.
4325 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4326 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4327 (search_type_for_mask_1): Use it.
4329 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4331 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4332 redundant WIDEN_SUM_EXPR handling.
4333 (vect_recog_sad_pattern): Likewise.
4335 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4337 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4338 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4339 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4340 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4341 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4343 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4345 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4346 use the stmt_vec_info of the original bb statement for the
4347 new zero assignment, even if the call is part of a pattern.
4349 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4351 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4352 that the sequence is attached to the original statement rather
4353 than the pattern statement.
4354 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4355 PATTERN_DEF_SEQ from the original statement rather than
4356 the main pattern statement.
4357 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4358 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4359 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4361 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4363 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4364 definition statements before the early exit for statements that aren't
4366 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4368 (vect_transform_loop): ...here. Process pattern definition
4369 statements without first checking whether the main pattern
4370 statement is live or relevant.
4372 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4374 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4375 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4377 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4379 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4380 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4381 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4382 (expand_block_compare): Change select_block_compare_mode call.
4383 (expand_strncmp_align_check): Use new functions, fix comment.
4384 (emit_final_str_compare_gpr): New function.
4385 (expand_strn_compare): Refactor and clean up code.
4386 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4388 2018-06-19 Tony Reix <tony.reix@atos.com>
4389 Damien Bergamini <damien.bergamini@atos.com>
4390 David Edelsohn <dje.gcc@gmail.com>
4392 * collect2.c (static_obj): New variable.
4393 (static_libs): New variable.
4394 (is_in_list): Uncomment declaration.
4395 (main): Track AIX libraries linked statically.
4396 (is_in_list): Uncomment definition.
4397 (scan_prog_file): Don't add AIX shared libraries initializer
4398 to constructor list if linking statically.
4400 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4402 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4404 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4406 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4408 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4411 2018-06-19 Martin Liska <mliska@suse.cz>
4413 * config/i386/i386.c (ix86_can_inline_p): Do not use
4414 ipa_fn_summaries::get_create.
4415 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4417 (devirtualization_time_bonus): Likewise.
4418 (ipcp_propagate_stage): Likewise.
4419 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4420 (edge_set_predicate): Likewise.
4421 (evaluate_conditions_for_known_args): Likewise.
4422 (evaluate_properties_for_edge): Likewise.
4423 (ipa_call_summary::reset): Tranform to ...
4424 (ipa_call_summary::~ipa_call_summary): ... this.
4425 (ipa_fn_summary::reset): Transform to ...
4426 (ipa_fn_summary::~ipa_fn_summary): ... this.
4427 (ipa_fn_summary_t::remove): Rename to ...
4428 (ipa_fn_summary_t::remove_callees): ... this.
4429 (ipa_fn_summary_t::duplicate): Use placement new
4430 instead of memory copy.
4431 (ipa_call_summary_t::duplicate): Likewise.
4432 (ipa_call_summary_t::remove): Remove.
4433 (dump_ipa_call_summary): Change get_create to get.
4434 (ipa_dump_fn_summary): Dump only when summary exists.
4435 (analyze_function_body): Use symbol_summary::get instead
4437 (compute_fn_summary): Likewise.
4438 (estimate_edge_devirt_benefit): Likewise.
4439 (estimate_edge_size_and_time): Likewise.
4440 (inline_update_callee_summaries): Likewise.
4441 (remap_edge_change_prob): Likewise.
4442 (remap_edge_summaries): Likewise.
4443 (ipa_merge_fn_summary_after_inlining): Likewise.
4444 (write_ipa_call_summary): Likewise.
4445 (ipa_fn_summary_write): Likewise.
4446 (ipa_free_fn_summary): Likewise.
4447 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4448 (struct ipa_call_summary): Likewise.
4449 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4451 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4452 (estimate_size_after_inlining): Likewise.
4453 (estimate_growth): Likewise.
4454 (growth_likely_positive): Likewise.
4455 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4456 (inline_call): Likewise.
4457 * ipa-inline.c (caller_growth_limits): Likewise.
4458 (can_inline_edge_p): Likewise.
4459 (can_inline_edge_by_limits_p): Likewise.
4460 (compute_uninlined_call_time): Likewise.
4461 (compute_inlined_call_time): Likewise.
4462 (want_inline_small_function_p): Likewise.
4463 (edge_badness): Likewise.
4464 (update_caller_keys): Likewise.
4465 (update_callee_keys): Likewise.
4466 (inline_small_functions): Likewise.
4467 (inline_to_all_callers_1): Likewise.
4468 (dump_overall_stats): Likewise.
4469 (early_inline_small_functions): Likewise.
4470 (early_inliner): Likewise.
4471 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4472 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4473 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4474 * ipa-split.c (execute_split_functions): Likewise.
4475 * symbol-summary.h: Likewise.
4476 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4478 2018-06-19 Richard Biener <rguenther@suse.de>
4480 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4481 (vectorize_loops): ... here. Fix dbgcnt handling.
4482 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4484 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4487 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4488 ieee128 argument takes up only one (vector) register, not two (floating
4491 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4493 * gimplify.c (gimplify_init_constructor): Really never clear for an
4494 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4496 2018-06-19 Richard Biener <rguenther@suse.de>
4498 PR tree-optimization/86179
4499 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4500 after failed recognition.
4502 2018-06-18 Martin Sebor <msebor@redhat.com>
4505 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4506 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4507 Handle integer subtraction.
4508 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4509 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4511 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4513 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4514 param from rtx to rtx_insn *.
4515 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4517 (frv_ifcvt_modify_insn): Likwise.
4518 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4519 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4520 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4521 as_a <rtx_insn *> cast to local "unprotected_region" once
4522 it's been established that it's not NULL or pc_rtx.
4523 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4524 param "sethi" from rtx to rtx_insn *.
4525 (nds32_group_float_insns): Likewise for param "insn".
4526 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4528 (vax_output_int_subtract): Likewise.
4529 * config/vax/vax.c (vax_output_int_add): Likewise for param
4531 (vax_output_int_subtract): Likewise.
4532 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4533 (emit_pattern_after): Likewise for param "after".
4534 (emit_insn_after): Likewise.
4535 (emit_jump_insn_after): Likewise.
4536 (emit_call_insn_after): Likewise.
4537 (emit_debug_insn_after): Likewise.
4538 (emit_pattern_before): Likewise for param "before".
4539 (emit_insn_before): Likewise.
4540 (emit_jump_insn_before): Likewise.
4541 * final.c (get_insn_template): Likewise for param "insn", removing
4543 * output.h (get_insn_template): Likewise for 2nd param.
4544 * rtl.h (emit_insn_before): Likewise.
4545 (emit_jump_insn_before): Likewise.
4546 (emit_debug_insn_before_noloc): Likewise.
4547 (emit_insn_after): Likewise.
4548 (emit_jump_insn_after): Likewise.
4549 (emit_call_insn_after): Likewise.
4550 (emit_debug_insn_after): Likewise.
4551 (set_insn_deleted): Likewise for param.
4553 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4556 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4557 floating point modes, so that IFmode is numerically greater than
4558 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4559 to declare the ordering. This prevents IFmode from being
4560 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4561 machine. Include rs6000-modes.h to share the fractional values
4562 between genmodes* and the rest of the compiler.
4566 * config/rs6000/rs6000-modes.h: New file.
4567 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4568 meaning of rs6000_long_double_size so that 126..128 selects an
4569 appropriate 128-bit floating point type.
4570 (rs6000_option_override_internal): Likewise.
4571 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4572 (TARGET_LONG_DOUBLE_128): Change the meaning of
4573 rs6000_long_double_size so that 126..128 selects an appropriate
4574 128-bit floating point type.
4575 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4576 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4577 source and destination to match the standard usage.
4578 (truncifkf2): Likewise.
4579 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4580 ISA 2.07 to use an explicit clobber, instead of passing in a
4582 (copysign<mode>3_soft): Likewise.
4584 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4586 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4587 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4588 (vect_slp_analyze_instance_dependence): Likewise.
4589 (vect_enhance_data_refs_alignment): Likewise.
4590 (vect_analyze_data_refs_alignment): Likewise.
4591 (vect_slp_analyze_and_verify_instance_alignment
4592 (vect_analyze_data_ref_accesses): Likewise.
4593 (vect_prune_runtime_alias_test_list): Likewise.
4594 (vect_analyze_data_refs): Likewise.
4595 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4596 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4597 (vect_analyze_scalar_cycles_1): Likewise.
4598 (vect_get_loop_niters): Likewise.
4599 (vect_analyze_loop_form_1): Likewise.
4600 (vect_update_vf_for_slp): Likewise.
4601 (vect_analyze_loop_operations): Likewise.
4602 (vect_analyze_loop): Likewise.
4603 (vectorizable_induction): Likewise.
4604 (vect_transform_loop): Likewise.
4605 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4606 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4607 (vect_make_slp_decision): Likewise.
4608 (vect_detect_hybrid_slp): Likewise.
4609 (vect_slp_analyze_operations): Likewise.
4610 (vect_slp_bb): Likewise.
4611 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4612 (vectorizable_bswap): Likewise.
4613 (vectorizable_call): Likewise.
4614 (vectorizable_simd_clone_call): Likewise.
4615 (vectorizable_conversion): Likewise.
4616 (vectorizable_assignment): Likewise.
4617 (vectorizable_shift): Likewise.
4618 (vectorizable_operation): Likewise.
4619 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4621 2018-06-18 Martin Sebor <msebor@redhat.com>
4623 PR tree-optimization/81384
4624 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4625 * builtins.c (expand_builtin_strnlen): New function.
4626 (expand_builtin): Call it.
4627 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4628 * builtins.def (BUILT_IN_STRNLEN): New.
4629 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4630 Warn for bounds in excess of maximum object size.
4631 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4632 single-value ranges. Handle strnlen.
4633 (handle_builtin_strlen): Handle strnlen.
4634 (strlen_check_and_optimize_stmt): Same.
4635 * doc/extend.texi (Other Builtins): Document strnlen.
4637 2018-06-18 Maya Rashish <coypu@sdf.org>
4639 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4640 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4641 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4643 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4645 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4647 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4649 * tree.c (escaped_string::escape): Replace cast to char * by
4650 const_cast<char *> (unescaped).
4652 2018-06-18 Nick Clifton <nickc@redhat.com>
4655 * tree.c (escaped_string): New class. Converts an unescaped
4656 string into its escaped equivalent.
4657 (warn_deprecated_use): Use the new class to convert the
4658 deprecation message, if present.
4659 (test_escaped_strings): New self test.
4660 (test_c_tests): Add test_escaped_strings.
4661 * doc/extend.texi (deprecated): Add a note that the
4662 deprecation message is affected by the -fmessage-length
4663 option, and that control characters will be escaped.
4664 (#pragma GCC error): Document this pragma.
4665 (#pragma GCC warning): Likewise.
4666 * doc/invoke.texi (-fmessage-length): Document this option's
4667 effect on the #warning and #error preprocessor directives and
4668 the deprecated attribute.
4670 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4672 * tree.c (decl_value_expr_lookup): Revert latest change.
4673 (decl_value_expr_insert): Likewise.
4675 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4677 * gimplify.c (nonlocal_vlas): Delete.
4678 (nonlocal_vla_vars): Likewise.
4679 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4681 (gimplify_body): Do not create and destroy nonlocal_vlas.
4682 * tree-nested.c: Include diagnostic.h.
4683 (use_pointer_in_frame): Tweak.
4684 (lookup_field_for_decl): Add assertion and declare the transformation.
4685 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4686 internal error when the reference is in a wrong context. Do not
4687 create a debug decl by default.
4688 (note_nonlocal_block_vlas): Delete.
4689 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4690 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4691 create a debug decl by default.
4692 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4693 call is in a wrong context.
4694 (fixup_vla_decls): New function.
4695 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4696 debug variables were created.
4697 * tree.c (decl_value_expr_lookup): Add checking assertion.
4698 (decl_value_expr_insert): Likewise.
4700 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4703 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4704 * tree-scalar-evolution.c (interpret_expr): Likewise.
4705 (expression_expensive_p): Likewise.
4706 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4707 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4708 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4709 (ssa_defined_by_minus_one_stmt_p): New.
4711 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4714 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4715 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4716 * dojump.c (do_jump): Likewise.
4717 * expr.c (expand_expr_real_2): Check operand type's sign.
4718 * fold-const.c (const_unop): Handle ABSU_EXPR.
4719 (fold_abs_const): Likewise.
4720 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4721 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4722 (strip_sign_op_1): Likesise.
4723 * match.pd: Add new pattern to generate ABSU_EXPR.
4724 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4725 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4726 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4727 * tree-inline.c (estimate_operator_cost): Likewise.
4728 * tree-pretty-print.c (dump_generic_node): Likewise.
4729 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4730 * tree.def (ABSU_EXPR): New.
4732 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4735 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4736 documented as preserved for backward compatibility only.
4737 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4739 PR rtl-optimization/86108
4740 * bb-reorder.c (create_forwarder_block): Renamed to ...
4741 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4742 jump from new landing pad to the second part.
4743 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4746 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4749 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4750 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4751 Only call store_expr for halves if the mode is the same.
4754 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4755 Fix up comment formatting.
4757 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4759 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4760 (typed_splay_tree::closure,
4761 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4762 (typed_splay_tree::typed_splay_tree,
4763 typed_splay_tree::operator =): Declared private.
4764 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4765 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4766 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4767 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4768 typed_splay_tree::splay_tree_splay,
4769 typed_splay_tree::splay_tree_foreach_helper,
4770 typed_splay_tree::splay_tree_insert,
4771 typed_splay_tree::splay_tree_remove,
4772 typed_splay_tree::splay_tree_lookup,
4773 typed_splay_tree::splay_tree_predecessor,
4774 typed_splay_tree::splay_tree_successor,
4775 typed_splay_tree::splay_tree_min,
4776 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4777 (typed_splay_tree::root, typed_splay_tree::comp,
4778 typed_splay_tree::delete_key,
4779 typed_splay_tree::delete_value): New data members.
4780 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4781 typed_splay_tree::remove.
4783 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4785 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4786 -mginv and -mno-ginv to the assembler.
4787 * config/mips/mips.opt (-mcrc): New option.
4789 * doc/invoke.text (-mcrc): Document.
4792 2018-06-15 Nick Clifton <nickc@redhat.com>
4795 * tree.c (escaped_string): New class. Converts an unescaped
4796 string into its escaped equivalent.
4797 (warn_deprecated_use): Use the new class to convert the
4798 deprecation message, if present.
4799 (test_escaped_strings): New self test.
4800 (test_c_tests): Add test_escaped_strings.
4801 * doc/extend.texi (deprecated): Add a note that the
4802 deprecation message is affected by the -fmessage-length
4803 option, and that control characters will be escaped.
4804 (#pragma GCC error): Document this pragma.
4805 (#pragma GCC warning): Likewise.
4806 * doc/invoke.texi (-fmessage-length): Document this option's
4807 effect on the #warning and #error preprocessor directives and
4808 the deprecated attribute.
4810 2018-06-15 Richard Biener <rguenther@suse.de>
4812 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4813 here, also noting vector size used.
4814 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
4815 size used in MSG_OPTIMIZED_LOCATIONS dump.
4816 (pass_slp_vectorize::execute): Adjust.
4818 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
4821 * config/arc/arc.c (arc_return_address_register): Fix
4824 2018-06-15 Richard Biener <rguenther@suse.de>
4827 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4828 leave useless conversion stripping to force_gimple_operand_gsi.
4829 (gimplify_build2): Likewise.
4830 (gimplify_build1): Likewise.
4832 2018-06-15 Richard Biener <rguenther@suse.de>
4835 * tree-cfg.c (move_stmt_op): unshare invariant addresses
4836 before adjusting their block.
4838 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4840 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4841 multilibs for *-*-rtems*.
4842 * config/riscv/t-rtems: New file.
4844 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4847 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4848 unsigned_type_for returns NULL.
4851 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4852 subregs of multi-word pseudos unless the float mode has word size.
4854 2018-06-14 Richard Biener <rguenther@suse.de>
4857 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4858 duplicate and harmful type_hash_canon.
4859 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4861 2018-06-14 Richard Biener <rguenther@suse.de>
4864 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4867 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4869 * config/rtems.h (STDINT_LONG32): Define.
4871 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
4872 Prachi Godbole <prachi.godbole@imgtec.com>
4874 * config/mips/mips-cpus.def: Define P6600.
4875 * config/mips/mips-tables.opt: Regenerate.
4876 * config/mips/mips.c (mips_ucbranch_type): New enum.
4877 (mips_rtx_cost_data): Add support for P6600.
4878 (mips_issue_rate): Likewise.
4879 (mips_multipass_dfa_lookahead): Likewise.
4880 (mips_avoid_hazard): Likewise.
4881 (mips_reorg_process_insns): Likewise.
4882 (mips_classify_branch_p6600): New function.
4883 * config/mips/mips.h (TUNE_P6600): New define.
4884 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4885 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4886 * config/mips/mips.md: Include p6600.md.
4887 (processor): Add p6600.
4888 * config/mips/p6600.md: New file.
4889 * doc/invoke.texi: Add p6600 to supported architectures.
4891 2018-06-13 Martin Sebor <msebor@redhat.com>
4893 PR tree-optimization/86114
4894 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4896 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4898 2018-06-13 Richard Biener <rguenther@suse.de>
4900 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4901 Properly set vector type of the intermediate stmt.
4902 * tree-vect-stmts.c (vectorizable_operation): The destination
4903 var always has vectype_out type.
4905 2018-06-13 Jeff Law <law@redhat.com>
4907 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4908 integer 0 for argument to print_rtl_with_bb.
4909 (rl78_reorg): Likewise.
4911 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4913 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4914 from rtx to rtx_insn *.
4915 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4917 (add_sched_insns_for_speculation): Likewise for local "target",
4918 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4919 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4920 from rtx_insn ** to rtx_code_label **.
4921 (reorg_emit_nops): Likewise.
4922 (c6x_reorg): Likewise for local "call_labels".
4923 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4925 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4926 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4927 the loops over LABEL_REFS.
4928 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4930 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4931 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4932 (split_branches): Strengthen local "olabel" from rtx to
4933 rtx_insn *, adding a safe_as_a cast.
4934 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4936 (add_insn_after): Likewise for first two params.
4937 (add_insn_before): Likewise.
4938 (remove_insn): Likewise for param.
4939 (emit_pattern_before_noloc): Likewise for second and third params.
4940 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4941 (emit_call_insn_before_noloc): Likewise.
4942 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4944 (emit_barrier_before): Likewise.
4945 (emit_label_before): Strengthen "label" param from "rtx" to
4946 "rtx_code_label *". Strengthen "before" param from "rtx" to
4948 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4950 (emit_pattern_after_noloc): Likewise.
4951 (emit_insn_after_noloc): Likewise.
4952 (emit_jump_insn_after_noloc): Likewise.
4953 (emit_call_insn_after_noloc): Likewise.
4954 (emit_debug_insn_after_noloc): Likewise.
4955 (emit_barrier_after): Likewise.
4956 (emit_label_after): Likewise for both params.
4957 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4958 "loc" param from "int" to "location_t".
4959 (emit_insn_after_setloc): Likewise.
4960 (emit_jump_insn_after_setloc): Likewise.
4961 (emit_call_insn_after_setloc): Likewise.
4962 (emit_debug_insn_after_setloc): Likewise.
4963 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4964 "loc" param from "int" to "location_t".
4965 (emit_pattern_before): Convert NULL_RTX to NULL.
4966 (emit_insn_before_setloc): Convert "loc" param from "int" to
4968 (emit_jump_insn_before_setloc): Likewise.
4969 (emit_call_insn_before_setloc): Likewise.
4970 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4971 rtx_insn *. Convert "loc" param from "int" to "location_t".
4972 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4973 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4974 Convert 3rd param from "int" to "location_t".
4975 (emit_barrier_before, emit_barrier_after, next_real_insn):
4976 Strengthen param from rtx to rtx_insn *.
4977 (emit_label_before): Strengthen 1st param from "rtx" to
4978 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4980 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4981 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4982 Strengthen 2nd param from "rtx" to "rtx_insn *".
4983 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4984 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4985 Likewise. Convert 3rd param from "int" to "location_t".
4986 (emit_label_after): Strengthen 1st param from "rtx" to
4988 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4990 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4991 from "rtx" to "rtx_insn *".
4993 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4995 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4996 bodies streamed in with -Q.
4997 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4998 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4999 * gimple-streamer-out.c: Include gimple-pretty-print.h
5000 (output_bb): Dump stmts streamed.
5001 * lto-section-out.c: Include print-tree.h
5002 (lto_begin_section): Dump sections created.
5003 (lto_output_decl_index): Dump decl encoded.
5004 * lto-streamer-out.c: Include print-tree.h
5005 (create_output_block): Dump output block created.
5006 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5007 (output_function): Dump function output.
5008 (output_constructor): Dump constructor streamed.
5009 (write_global_stream): Output indexes encoded.
5010 (produce_asm_for_decls): Dump streams encoded.
5011 * lto-streamer.c (streamer_dump_file): New global var.
5012 * lto-streamer.h (streamer_dump_file): Declare.
5013 * passes.c (ipa_write_summaries): Initialize streamer dump.
5014 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5017 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5020 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5021 offsets for register save directives. Emit a second batch of save
5022 directives, if need be, when the function accesses prior frames.
5024 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5026 * config/arc/fpu.md (fmasf4): Force operand to register.
5027 (fnmasf4): Likewise.
5029 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5031 * config/arc/arc-protos.h (arc_pad_return): Remove.
5032 * config/arc/arc.c (machine_function): Remove force_short_suffix
5034 (arc_print_operand): Adjust printing of '&'.
5035 (arc_verify_short): Remove conditional printing of short suffix.
5036 (arc_final_prescan_insn): Remove reference to size_reason.
5037 (pad_return): New function.
5038 (arc_reorg): Call pad_return.
5039 (arc_pad_return): Remove.
5040 (arc_init_machine_status): Remove reference to force_short_suffix.
5041 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5042 (attr length): When attribute iscompact is true force to 2
5043 regardless; in the case of maybe check if we want to force the
5044 instruction to have 4 bytes length.
5045 (nopv): Change it to generate 4 byte long nop as well.
5046 (blockage): New pattern.
5047 (simple_return): Remove call to arc_pad_return.
5048 (p_return_i): Likewise.
5050 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5052 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5054 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5056 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5059 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5061 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5062 for ARC700 and ARCv2.
5064 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5067 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5068 operands[2] instead of operands[1].
5071 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5073 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5074 case, check whether the outer register overlaps an unallocatable
5075 register, not just whether it fits the required class.
5077 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5079 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5081 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5082 (memrefs_conflict_p): Likewise.
5083 (init_alias_analysis): Likewise.
5084 * cfgexpand.c (expand_debug_expr): Likewise.
5085 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5086 * cse.c (fold_rtx): Likewise.
5087 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5088 * expr.c (emit_block_move_hints): Likewise.
5089 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5090 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5091 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5092 (emit_group_store): Likewise.
5093 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5094 to read the PRE/POST_MODIFY increment.
5095 * calls.c (store_one_arg): Use strip_offset.
5096 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5098 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5100 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5101 (simplify_binary_operation_1): Extend CONST_INT handling to
5103 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5104 than a HOST_WIDE_INT.
5105 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5107 (adjust_mems, add_stores): Update accodingly.
5108 (vt_canonicalize_addr): Track polynomial offsets.
5109 (emit_note_insn_var_location): Likewise.
5110 (vt_add_function_parameter): Likewise.
5111 (vt_initialize): Likewise.
5113 2018-06-12 Jeff Law <law@redhat.com>
5115 * config.gcc (alpha*-*-freebsd*): Remove.
5116 * config/alpha/freebsd.h: Remove.
5118 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5121 * spellcheck-tree.c (levenshtein_distance): Rename to...
5122 (get_edit_distance): ...this, and update for underlying renaming.
5123 * spellcheck-tree.h (levenshtein_distance): Rename to...
5124 (get_edit_distance): ...this.
5125 * spellcheck.c (levenshtein_distance): Rename to...
5126 (get_edit_distance): ...this. Convert from Levenshtein distance
5127 to Damerau-Levenshtein distance by supporting transpositions of
5128 adjacent characters. Rename "v1" to "v_next" and "v0" to
5130 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5131 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5132 update for underlying renaming.
5133 (selftest::levenshtein_distance_unit_test): Rename to...
5134 (selftest::test_get_edit_distance_unit): ...this, and update for
5135 underlying renaming.
5136 (selftest::test_find_closest_string): Add example from PR 69968
5137 where transposition helps
5138 (selftest::test_metric_conditions): Update for renaming.
5139 (selftest::test_metric_conditions): Likewise.
5140 (selftest::spellcheck_c_tests): Likewise.
5141 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5142 (get_edit_distance): ...this.
5143 (best_match::consider): Update for renaming.
5145 2018-06-12 Martin Sebor <msebor@redhat.com>
5147 PR tree-optimization/85259
5148 * builtins.c (compute_objsize): Handle constant offsets.
5149 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5150 true iff a warning has been issued.
5151 * gimple.h (gimple_nonartificial_location): New function.
5152 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5153 gimple_nonartificial_location and handle -Wno-system-headers.
5154 (handle_builtin_stxncpy): Same.
5156 2018-06-12 Martin Sebor <msebor@redhat.com>
5159 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5161 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5163 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5164 BUILTIN_VEC_XST entries for pointer to double and long long.
5166 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5169 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5171 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5174 2018-06-12 Martin Liska <mliska@suse.cz>
5176 * doc/options.texi: Document IntegerRange.
5178 2018-06-12 Martin Liska <mliska@suse.cz>
5180 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5181 * opt-functions.awk: Handle Deprecated flag.
5182 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5184 (read_cmdline_option): Report warning for a deprecated option.
5185 * opts.h (struct cl_option): Add new field cl_deprecated.
5186 (CL_ERR_DEPRECATED): New.
5188 2018-06-12 Martin Liska <mliska@suse.cz>
5190 * doc/options.texi: Document Deprecated option flag.
5192 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5194 * config/arc/arc-arch.h (arc_extras): New enum.
5195 (arc_cpu_t):Add field extra.
5196 (arc_cpu_types): Consider the extras.
5197 * config/arc/arc-cpus.def: Add extras info.
5198 * config/arc/arc-opts.h (processor_type): Consider extra field.
5199 * config/arc/arc.c (arc_override_options): Handle extra field.
5201 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5203 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5204 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5206 * config/arc/arc.c (arc_init): Update pic warning.
5207 (irq_range): Update irq range parsing warnings.
5208 (arc_override_options): Update various warning messages.
5209 (arc_handle_aux_attribute): Likewise.
5211 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5213 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5215 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5217 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5218 compiler messages directives.
5220 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5222 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5223 * config/mips/mips-tables.opt: Regenerate.
5224 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5226 * doc/invoke.texi: Document -march=i6500.
5228 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5230 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5231 (i6400_gpmul): Add cpu_unit.
5232 (i6400_gpdiv): Likewise.
5233 (i6400_msa_add_d): Update reservations.
5234 (i6400_msa_int_add) Likewise.
5235 (i6400_msa_short_logic3) Likewise.
5236 (i6400_msa_short_logic2) Likewise.
5237 (i6400_msa_short_logic) Likewise.
5238 (i6400_msa_move) Likewise.
5239 (i6400_msa_cmp) Likewise.
5240 (i6400_msa_short_float2) Likewise.
5241 (i6400_msa_div_d) Likewise.
5242 (i6400_msa_long_logic1) Likewise.
5243 (i6400_msa_long_logic2) Likewise.
5244 (i6400_msa_mult) Likewise.
5245 (i6400_msa_long_float2) Likewise.
5246 (i6400_msa_long_float4) Likewise.
5247 (i6400_msa_long_float5) Likewise.
5248 (i6400_msa_long_float8) Likewise.
5249 (i6400_fpu_fadd): Include frint type.
5250 (i6400_fpu_store): New define_insn_reservation.
5251 (i6400_fpu_load): Likewise.
5252 (i6400_fpu_move): Likewise.
5253 (i6400_fpu_fcmp): Likewise.
5254 (i6400_fpu_fmadd): Likewise.
5255 (i6400_int_mult): Include imul3nc type and update reservation.
5256 (i6400_int_div): Include idiv3 type and update reservation.
5257 (i6400_int_load): Update to check type not move_type.
5258 (i6400_int_store): Likewise.
5259 (i6400_int_prefetch): Set zero latency.
5261 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5263 * gcc.c: Document new %@{...} sequence.
5264 (LINK_COMMAND_SPEC): Use it for the -L switches.
5265 (cpp_unique_options): Use it for the -I switches.
5266 (at_file_argbuf): New global variable.
5267 (in_at_file): Likewise.
5268 (alloc_args): Create at_file_argbuf.
5269 (clear_args): Truncate at_file_argbuf.
5270 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5271 (open_at_file): New function.
5272 (close_at_file): Likewise.
5273 (create_at_file): Delete.
5274 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5277 (validate_switches_from_spec): Deal with %@{...} sequence.
5278 (validate_switches): Likewise.
5279 (driver::finalize): Call clear_args.
5281 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5283 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5285 2018-06-11 Martin Sebor <msebor@redhat.com>
5287 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5288 (Wno-class-memaccess): Add @opindex.
5289 (Wno-templates, Wno-multiple-inheritance): Same.
5290 (Wno-virtual-inheritance, Wno-namespaces): Same.
5291 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5292 (Wno-format-overflow, Wno-format-truncation): Same.
5293 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5294 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5295 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5296 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5297 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5298 (Wno-misspelled-isr): Same.
5300 2018-06-11 Martin Sebor <msebor@redhat.com>
5302 * PR tree-optimization/86083
5303 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5305 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5307 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5309 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5312 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5313 on the correct operand.
5314 (*movdi_internal64): Ditto.
5316 2018-06-11 Martin Liska <mliska@suse.cz>
5318 PR tree-optimization/86089
5319 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5321 2018-06-11 Julia Koval <julia.koval@intel.com>
5323 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5324 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5325 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5327 2018-06-11 Olivier Hainque <hainque@adacore.com>
5329 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5330 for Ada with strict dwarf2.
5332 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5335 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5338 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5340 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5342 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5344 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5347 2018-06-08 Martin Liska <mliska@suse.cz>
5349 * tree-cfg.h (debug_function): Fix argument type to match
5352 2018-06-08 Martin Liska <mliska@suse.cz>
5354 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5355 Remove usage of MPX-related (and removed) fields.
5356 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5358 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5360 * cfg.c (debug): Use TDF_NONE rather than 0.
5361 * cfghooks.c (debug): Likewise.
5362 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5363 (struct dump_option_value_info): Convert to...
5364 (struct kv_pair): ...this template type.
5365 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5367 (optinfo_verbosity_options): Likewise.
5368 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5370 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5371 than int for "optgroup_flags" param.
5372 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5374 (dump_dec): Likewise.
5375 (dump_finish): Use TDF_NONE rather than 0.
5376 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5377 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5378 than 0. Update for change to option_ptr.
5379 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5380 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5381 0. Update for changes to optinfo_verbosity_options and
5383 (opt_info_switch_p): Convert optgroup_flags from int to
5385 (dump_basic_block): Use dump_flags_t rather than int
5386 for "dump_kind" param.
5387 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5388 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5389 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5390 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5391 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5392 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5393 TDF_NONE): Convert from macros to...
5394 (enum dump_flag): ...this new enum.
5395 (dump_flags_t): Update to use enum.
5396 (operator|, operator&, operator~, operator|=, operator&=):
5397 Implement for dump_flags_t.
5398 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5399 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5400 Convert from macros to...
5401 (enum optgroup_flag): ...this new enum.
5402 (optgroup_flags_t): New typedef.
5403 (operator|, operator|=): Implement for optgroup_flags_t.
5404 (struct dump_file_info): Convert field "alt_flags" to
5405 dump_flags_t. Convert field "optgroup_flags" to
5407 (dump_basic_block): Use dump_flags_t rather than int for param.
5408 (dump_generic_expr_loc): Likewise.
5409 (dump_dec): Likewise.
5410 (dump_register): Convert param "optgroup_flags" to
5412 (opt_info_enable_passes): Likewise.
5413 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5415 * gimple-pretty-print.c (debug): Likewise.
5416 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5417 (merged_store_group::apply_stores): Likewise.
5418 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5419 * gimple.c (verify_gimple_pp): Likewise.
5420 * graphite-poly.c (print_pbb_body): Likewise.
5421 * passes.c (pass_manager::register_one_dump_file): Convert
5422 local "optgroup_flags" to optgroup_flags_t.
5423 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5425 (debug_body): Likewise.
5426 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5427 to optgroup_flags_t.
5428 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5430 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5431 (convert_mult_to_fma): Likewise.
5432 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5433 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5434 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5435 "dump_kind" to dump_flags_t.
5437 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5439 * config/rs6000/rs6000.c (min, max): Delete.
5441 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5443 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5444 -mabi=spe and -mabi=no-spe.
5446 2018-06-08 Martin Liska <mliska@suse.cz>
5448 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5449 where we expect an existing summary.
5451 2018-06-08 Martin Liska <mliska@suse.cz>
5453 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5454 * ipa-inline.h (estimate_edge_growth): Likewise.
5456 2018-06-08 Martin Liska <mliska@suse.cz>
5458 * cgraph.c (function_version_hasher::hash): Use
5459 cgraph_node::get_uid ().
5460 (function_version_hasher::equal):
5461 * cgraph.h (cgraph_node::get_uid): New method.
5462 * ipa-inline.c (update_caller_keys): Use
5463 cgraph_node::get_uid ().
5464 (update_callee_keys): Likewise.
5465 * ipa-utils.c (searchc): Likewise.
5466 (ipa_reduced_postorder): Likewise.
5467 * lto-cgraph.c (input_node): Likewise.
5468 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5469 * symbol-summary.h (symtab_insertion): Likewise.
5470 (symtab_removal): Likewise.
5471 (symtab_duplication): Likewise.
5472 * tree-pretty-print.c (dump_function_header): Likewise.
5473 * tree-sra.c (convert_callers_for_node): Likewise.
5475 2018-06-08 Martin Liska <mliska@suse.cz>
5477 * cgraph.c (symbol_table::create_edge): Always assign a new
5479 (symbol_table::free_edge): Do not recycle numbers.
5480 * cgraph.h (cgraph_edge::get): New method.
5481 * symbol-summary.h (symtab_removal): Use it.
5482 (symtab_duplication): Likewise.
5483 (call_summary::hashable_uid): Remove.
5485 2018-06-08 Martin Liska <mliska@suse.cz>
5487 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5488 (initialize_growth_caches): Remove.
5489 (free_growth_caches): Likewise.
5490 (do_estimate_edge_time): Use edge_growth_cache.
5491 (do_estimate_edge_size): Likewise.
5492 (do_estimate_edge_hints): Likewise.
5493 * ipa-inline.c (reset_edge_caches): Likewise.
5494 (recursive_inlining): Likewise.
5495 (inline_small_functions): Likewise.
5496 * ipa-inline.h (initialize_growth_caches): Remove.
5497 (estimate_edge_size): Likewise.
5498 (estimate_edge_time): Likewise.
5499 (estimate_edge_hints): Likewise.
5500 (reset_edge_growth_cache): Likewise.
5501 * symbol-summary.h (call_summary::remove): New method.
5503 2018-06-08 Martin Liska <mliska@suse.cz>
5505 * ipa-cp.c (class edge_clone_summary): New summary.
5506 (grow_edge_clone_vectors): Remove.
5507 (ipcp_edge_duplication_hook): Remove.
5508 (class edge_clone_summary_t): New call_summary class.
5509 (ipcp_edge_removal_hook): Remove.
5510 (edge_clone_summary_t::duplicate): New function.
5511 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5512 (create_specialized_node): Likewise.
5513 (ipcp_driver): Initialize edge_clone_summaries and do not
5516 2018-06-08 Martin Liska <mliska@suse.cz>
5518 * symbol-summary.h (get): New function.
5519 (call_summary::m_initialize_when_cloning): New class member.
5521 2018-06-08 Martin Liska <mliska@suse.cz>
5523 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5524 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5525 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5526 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5527 (remove_cgraph_node_from_order): Use the removed_nodes set.
5528 (do_per_function_toporder): Likwise.
5529 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5530 instead of summary_uid.
5531 (symtab_removal): Likewise.
5532 (symtab_duplication): Likewise.
5534 2018-06-08 Martin Liska <mliska@suse.cz>
5536 * ipa-cp.c (ipcp_store_bits_results): Use
5537 ipcp_transformation_sum.
5538 (ipcp_store_vr_results): Likewise.
5539 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5541 (ipcp_transformation_initialize): ... this.
5542 (ipa_set_node_agg_value_chain):
5543 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5544 (write_ipcp_transformation_info): Likewise.
5545 (read_ipcp_transformation_info): Likewise.
5546 (ipcp_update_bits): Likewise.
5547 (ipcp_update_vr): Likewise.
5548 (ipcp_transform_function): Likewise.
5549 * ipa-prop.h: Rename ipcp_transformation_summary to
5550 ipcp_transformation.
5551 (class ipcp_transformation_t): New function summary.
5552 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5553 (ipa_get_agg_replacements_for_node): Likewise.
5555 2018-06-08 Martin Liska <mliska@suse.cz>
5557 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5559 (class funct_state_summary_t): New function_summary class.
5560 (has_function_state): Remove.
5561 (get_function_state): Likewise.
5562 (set_function_state): Likewise.
5563 (add_new_function): Likewise.
5564 (funct_state_summary_t::insert): New function.
5565 (duplicate_node_data): Remove.
5566 (remove_node_data): Remove.
5567 (funct_state_summary_t::duplicate): New function.
5568 (register_hooks): Create new funct_state_summaries.
5569 (pure_const_generate_summary): Use it.
5570 (pure_const_write_summary): Likewise.
5571 (pure_const_read_summary): Likewise.
5572 (propagate_pure_const): Likewise.
5573 (propagate_nothrow): Likewise.
5574 (dump_malloc_lattice): Likewise.
5575 (propagate_malloc): Likewise.
5576 (execute): Do not register hooks, just remove summary
5578 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5581 2018-06-08 Martin Liska <mliska@suse.cz>
5583 * ipa-reference.c (remove_node_data): Remove.
5584 (duplicate_node_data): Likewise.
5585 (class ipa_ref_var_info_summary_t): New class.
5586 (class ipa_ref_opt_summary_t): Likewise.
5587 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5588 (get_reference_optimization_summary): Use
5589 ipa_ref_opt_sum_summaries.
5590 (set_reference_vars_info): Remove.
5591 (set_reference_optimization_summary): Likewise.
5592 (ipa_init): Create summaries.
5593 (init_function_info): Use function summary.
5594 (ipa_ref_opt_summary_t::duplicate): New function.
5595 (ipa_ref_opt_summary_t::remove): New function.
5596 (get_read_write_all_from_node): Fix GNU coding style.
5597 (propagate): Use function summary.
5598 (write_node_summary_p): Fix GNU coding style.
5599 (stream_out_bitmap): Likewise.
5600 (ipa_reference_read_optimization_summary): Use function summary.
5601 (ipa_reference_c_finalize): Do not release hooks.
5603 2018-06-08 Martin Liska <mliska@suse.cz>
5605 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5606 (analyze_function_body): Extract multiple calls of get_create.
5607 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5608 * ipa-inline.c (recursive_inlining): Use ::get method.
5609 * ipa-inline.h (estimate_edge_growth): Likewise.
5611 2018-06-08 Martin Liska <mliska@suse.cz>
5613 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5615 (hsa_function_summary::hsa_function_summary): Use the new enum
5617 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5618 * hsa-gen.c (hsa_get_host_function): Likewise.
5619 (get_brig_function_name): Likewise.
5620 * ipa-hsa.c (process_hsa_functions): Likewise.
5621 (ipa_hsa_write_summary): Likewise.
5622 * symbol-summary.h (symtab_duplication): Use ::get function/
5623 (get): New function.
5625 2018-06-08 Martin Liska <mliska@suse.cz>
5627 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5629 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5630 (hsa_register_kernel): Likewise.
5631 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5632 * hsa-gen.c (hsa_get_host_function): Likewise.
5633 (get_brig_function_name): Likewise.
5634 (generate_hsa): Likewise.
5635 (pass_gen_hsail::execute): Likewise.
5636 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5637 (devirtualization_time_bonus): Likewise.
5638 (ipcp_propagate_stage): Likewise.
5639 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5640 (edge_set_predicate): Likewise.
5641 (evaluate_conditions_for_known_args): Likewise.
5642 (evaluate_properties_for_edge): Likewise.
5643 (ipa_fn_summary::reset): Likewise.
5644 (ipa_fn_summary_t::duplicate): Likewise.
5645 (dump_ipa_call_summary): Likewise.
5646 (ipa_dump_fn_summary): Likewise.
5647 (analyze_function_body): Likewise.
5648 (compute_fn_summary): Likewise.
5649 (estimate_edge_devirt_benefit): Likewise.
5650 (estimate_edge_size_and_time): Likewise.
5651 (estimate_calls_size_and_time): Likewise.
5652 (estimate_node_size_and_time): Likewise.
5653 (inline_update_callee_summaries): Likewise.
5654 (remap_edge_change_prob): Likewise.
5655 (remap_edge_summaries): Likewise.
5656 (ipa_merge_fn_summary_after_inlining): Likewise.
5657 (ipa_update_overall_fn_summary): Likewise.
5658 (read_ipa_call_summary): Likewise.
5659 (inline_read_section): Likewise.
5660 (write_ipa_call_summary): Likewise.
5661 (ipa_fn_summary_write): Likewise.
5662 (ipa_free_fn_summary): Likewise.
5663 * ipa-hsa.c (process_hsa_functions): Likewise.
5664 (ipa_hsa_write_summary): Likewise.
5665 (ipa_hsa_read_section): Likewise.
5666 * ipa-icf.c (sem_function::merge): Likewise.
5667 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5668 (do_estimate_edge_time): Likewise.
5669 (estimate_size_after_inlining): Likewise.
5670 (estimate_growth): Likewise.
5671 (growth_likely_positive): Likewise.
5672 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5673 (inline_call): Likewise.
5674 * ipa-inline.c (caller_growth_limits): Likewise.
5675 (can_inline_edge_p): Likewise.
5676 (can_inline_edge_by_limits_p): Likewise.
5677 (compute_uninlined_call_time): Likewise.
5678 (compute_inlined_call_time): Likewise.
5679 (want_inline_small_function_p): Likewise.
5680 (edge_badness): Likewise.
5681 (update_caller_keys): Likewise.
5682 (update_callee_keys): Likewise.
5683 (recursive_inlining): Likewise.
5684 (inline_small_functions): Likewise.
5685 (inline_to_all_callers_1): Likewise.
5686 (dump_overall_stats): Likewise.
5687 (early_inline_small_functions): Likewise.
5688 (early_inliner): Likewise.
5689 * ipa-inline.h (estimate_edge_growth): Likewise.
5690 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5691 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5692 * ipa-prop.h (IPA_NODE_REF): Likewise.
5693 (IPA_EDGE_REF): Likewise.
5694 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5695 (propagate_malloc): Likewise.
5696 * ipa-split.c (execute_split_functions): Likewise.
5697 * symbol-summary.h: Rename get to get_create.
5699 (get_create): Likewise.
5700 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5702 2018-06-08 Martin Liska <mliska@suse.cz>
5704 * symbol-summary.h (release): Move definition out of class
5706 (symtab_removal): Likewise.
5707 (symtab_duplication): Likewise.
5709 2018-06-08 Martin Liska <mliska@suse.cz>
5711 * symbol-summary.h (function_summary): Move constructor
5712 implementation out of class declaration.
5713 (release): Likewise.
5714 (symtab_insertion): Likewise.
5715 (symtab_removal): Likewise.
5716 (symtab_duplication): Likewise.
5719 2018-06-08 Martin Liska <mliska@suse.cz>
5721 * Makefile.in: Remove support for MPX (macros, related functions,
5722 fields in cgraph_node, ...).
5723 * builtin-types.def (BT_BND): Likewise.
5724 (BT_FN_BND_CONST_PTR): Likewise.
5725 (BT_FN_CONST_PTR_BND): Likewise.
5726 (BT_FN_VOID_PTR_BND): Likewise.
5727 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5728 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5729 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5730 (expand_builtin_mempcpy_with_bounds): Likewise.
5731 (expand_builtin_memset_with_bounds): Likewise.
5732 (expand_builtin_memset_args): Likewise.
5733 (std_expand_builtin_va_start): Likewise.
5734 (expand_builtin): Likewise.
5735 (expand_builtin_with_bounds): Likewise.
5736 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5737 (DEF_LIB_BUILTIN_CHKP): Likewise.
5738 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5739 (DEF_CHKP_BUILTIN): Likewise.
5740 (BUILT_IN_MEMCPY): Likewise.
5741 (BUILT_IN_MEMMOVE): Likewise.
5742 (BUILT_IN_MEMPCPY): Likewise.
5743 (BUILT_IN_MEMSET): Likewise.
5744 (BUILT_IN_STPCPY): Likewise.
5745 (BUILT_IN_STRCAT): Likewise.
5746 (BUILT_IN_STRCHR): Likewise.
5747 (BUILT_IN_STRCPY): Likewise.
5748 (BUILT_IN_STRLEN): Likewise.
5749 (BUILT_IN_MEMCPY_CHK): Likewise.
5750 (BUILT_IN_MEMMOVE_CHK): Likewise.
5751 (BUILT_IN_MEMPCPY_CHK): Likewise.
5752 (BUILT_IN_MEMSET_CHK): Likewise.
5753 (BUILT_IN_STPCPY_CHK): Likewise.
5754 (BUILT_IN_STRCAT_CHK): Likewise.
5755 (BUILT_IN_STRCPY_CHK): Likewise.
5756 * calls.c (store_bounds): Likewise.
5757 (emit_call_1): Likewise.
5758 (special_function_p): Likewise.
5759 (maybe_warn_nonstring_arg): Likewise.
5760 (initialize_argument_information): Likewise.
5761 (finalize_must_preallocate): Likewise.
5762 (compute_argument_addresses): Likewise.
5763 (expand_call): Likewise.
5764 * cfgexpand.c (expand_call_stmt): Likewise.
5765 (expand_return): Likewise.
5766 (expand_gimple_stmt_1): Likewise.
5767 (pass_expand::execute): Likewise.
5768 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5769 (cgraph_node::remove): Likewise.
5770 (cgraph_node::dump): Likewise.
5771 (cgraph_node::verify_node): Likewise.
5772 * cgraph.h (chkp_function_instrumented_p): Likewise.
5773 (symtab_node::get_alias_target): Likewise.
5774 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5775 (cgraph_local_p): Likewise.
5776 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5777 (cgraph_edge::rebuild_references): Likewise.
5778 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5779 (walk_polymorphic_call_targets): Likewise.
5780 (cgraph_node::expand_thunk): Likewise.
5781 (symbol_table::output_weakrefs): Likewise.
5782 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5783 (ix86_handle_option): Likewise.
5784 * config/i386/constraints.md: Likewise.
5785 * config/i386/i386-builtin-types.def (BND): Likewise.
5789 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5790 (BDESC_FIRST): Likewise.
5792 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5793 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5794 * config/i386/i386.c (enum reg_class): Likewise.
5795 (ix86_target_string): Likewise.
5796 (ix86_option_override_internal): Likewise.
5797 (ix86_conditional_register_usage): Likewise.
5798 (ix86_valid_target_attribute_inner_p): Likewise.
5799 (ix86_set_indirect_branch_type): Likewise.
5800 (ix86_set_current_function): Likewise.
5801 (ix86_function_arg_regno_p): Likewise.
5802 (init_cumulative_args): Likewise.
5803 (ix86_function_arg_advance): Likewise.
5804 (ix86_function_arg): Likewise.
5805 (ix86_pass_by_reference): Likewise.
5806 (ix86_function_value_regno_p): Likewise.
5807 (ix86_function_value_1): Likewise.
5808 (ix86_function_value_bounds): Likewise.
5809 (ix86_return_in_memory): Likewise.
5810 (ix86_setup_incoming_vararg_bounds): Likewise.
5811 (ix86_va_start): Likewise.
5812 (indirect_thunk_need_prefix): Likewise.
5813 (print_reg): Likewise.
5814 (ix86_print_operand): Likewise.
5815 (ix86_expand_call): Likewise.
5816 (ix86_output_function_return): Likewise.
5817 (reg_encoded_number): Likewise.
5818 (BDESC_VERIFYS): Likewise.
5819 (ix86_init_mpx_builtins): Likewise.
5820 (ix86_init_builtins): Likewise.
5821 (ix86_emit_cmove): Likewise.
5822 (ix86_emit_move_max): Likewise.
5823 (ix86_expand_builtin): Likewise.
5824 (ix86_builtin_mpx_function): Likewise.
5825 (ix86_get_arg_address_for_bt): Likewise.
5826 (ix86_load_bounds): Likewise.
5827 (ix86_store_bounds): Likewise.
5828 (ix86_load_returned_bounds): Likewise.
5829 (ix86_store_returned_bounds): Likewise.
5830 (ix86_class_likely_spilled_p): Likewise.
5831 (ix86_hard_regno_mode_ok): Likewise.
5832 (x86_order_regs_for_local_alloc): Likewise.
5833 (ix86_mitigate_rop): Likewise.
5834 (ix86_bnd_prefixed_insn_p): Likewise.
5835 (ix86_mpx_bound_mode): Likewise.
5836 (ix86_make_bounds_constant): Likewise.
5837 (ix86_initialize_bounds): Likewise.
5838 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5839 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5840 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5841 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5842 (TARGET_CHKP_BOUND_MODE): Likewise.
5843 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5844 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5845 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5846 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5847 * config/i386/i386.h (TARGET_MPX): Likewise.
5848 (TARGET_MPX_P): Likewise.
5849 (VALID_BND_REG_MODE): Likewise.
5850 (FIRST_BND_REG): Likewise.
5851 (LAST_BND_REG): Likewise.
5852 (enum reg_class): Likewise.
5853 (BND_REG_P): Likewise.
5854 (BND_REGNO_P): Likewise.
5855 (BNDmode): Likewise.
5856 (ADJUST_INSN_LENGTH): Likewise.
5857 * config/i386/i386.md: Likewise.
5858 * config/i386/i386.opt: Likewise.
5859 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5860 (defined): Likewise.
5861 (LINK_MPX): Likewise.
5862 (MPX_SPEC): Likewise.
5863 (LIBMPX_SPEC): Likewise.
5864 (LIBMPXWRAPPERS_SPEC): Likewise.
5865 (CHKP_SPEC): Likewise.
5866 * config/i386/predicates.md: Likewise.
5867 * dbxout.c (dbxout_type): Likewise.
5868 * doc/extend.texi: Likewise.
5869 * doc/invoke.texi: Likewise.
5870 * doc/md.texi: Likewise.
5871 * doc/tm.texi: Likewise.
5872 * doc/tm.texi.in: Likewise.
5873 * dwarf2out.c (is_base_type): Likewise.
5874 (gen_formal_types_die): Likewise.
5875 (gen_subprogram_die): Likewise.
5876 (gen_type_die_with_usage): Likewise.
5877 (gen_decl_die): Likewise.
5878 (dwarf2out_late_global_decl): Likewise.
5879 * expr.c (expand_assignment): Likewise.
5880 (emit_storent_insn): Likewise.
5881 (store_expr_with_bounds): Likewise.
5882 (store_expr): Likewise.
5883 (expand_expr_real_1): Likewise.
5884 * expr.h (store_expr_with_bounds): Likewise.
5885 * function.c (use_register_for_decl): Likewise.
5886 (struct bounds_parm_data): Likewise.
5887 (assign_parms_augmented_arg_list): Likewise.
5888 (assign_parm_find_entry_rtl): Likewise.
5889 (assign_parm_is_stack_parm): Likewise.
5890 (assign_parm_load_bounds): Likewise.
5891 (assign_bounds): Likewise.
5892 (assign_parms): Likewise.
5893 (expand_function_start): Likewise.
5894 * gcc.c (CHKP_SPEC): Likewise.
5895 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5896 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5897 (wrestrict_dom_walker::check_call): Likewise.
5898 * gimple.c (gimple_build_call_from_tree): Likewise.
5899 * gimple.h (enum gf_mask): Likewise.
5900 (gimple_call_with_bounds_p): Likewise.
5901 (gimple_call_set_with_bounds): Likewise.
5902 * gimplify.c (gimplify_init_constructor): Likewise.
5903 * ipa-cp.c (initialize_node_lattices): Likewise.
5904 (propagate_constants_across_call): Likewise.
5905 (find_more_scalar_values_for_callers_subset): Likewise.
5906 * ipa-hsa.c (process_hsa_functions): Likewise.
5907 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5908 * ipa-icf.c (sem_function::merge): Likewise.
5909 * ipa-inline.c (early_inliner): Likewise.
5910 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5911 (warn_function_cold): Likewise.
5912 (propagate_pure_const): Likewise.
5913 * ipa-ref.h (enum GTY): Likewise.
5914 * ipa-split.c (find_retbnd): Likewise.
5915 (consider_split): Likewise.
5916 (split_function): Likewise.
5917 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5918 * ipa.c (walk_polymorphic_call_targets): Likewise.
5919 (symbol_table::remove_unreachable_nodes): Likewise.
5920 (process_references): Likewise.
5921 (cgraph_build_static_cdtor_1): Likewise.
5922 * lto-cgraph.c (lto_output_node): Likewise.
5923 (output_refs): Likewise.
5924 (compute_ltrans_boundary): Likewise.
5925 (input_overwrite_node): Likewise.
5926 (input_node): Likewise.
5927 (input_cgraph_1): Likewise.
5928 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5929 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5930 (class pass_chkp_instrumentation_passes): Likewise.
5931 (make_pass_chkp_instrumentation_passes): Likewise.
5932 * passes.def: Likewise.
5933 * rtl.h (struct GTY): Likewise.
5934 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5935 * stor-layout.c (layout_type): Likewise.
5936 * symtab.c: Likewise.
5937 * target.def: Likewise.
5938 * targhooks.c (default_chkp_bound_type): Likewise.
5939 (default_chkp_bound_mode): Likewise.
5940 (default_builtin_chkp_function): Likewise.
5941 (default_chkp_function_value_bounds): Likewise.
5942 (default_chkp_make_bounds_constant): Likewise.
5943 (default_chkp_initialize_bounds): Likewise.
5944 * targhooks.h (default_chkp_bound_type): Likewise.
5945 (default_chkp_bound_mode): Likewise.
5946 (default_builtin_chkp_function): Likewise.
5947 (default_chkp_function_value_bounds): Likewise.
5948 (default_chkp_make_bounds_constant): Likewise.
5949 (default_chkp_initialize_bounds): Likewise.
5950 * toplev.c (compile_file): Likewise.
5951 (process_options): Likewise.
5952 * tree-core.h (DEF_BUILTIN): Likewise.
5953 (DEF_BUILTIN_CHKP): Likewise.
5954 * tree-inline.c (declare_return_variable): Likewise.
5955 (remap_gimple_stmt): Likewise.
5956 (copy_bb): Likewise.
5957 (initialize_inlined_parameters): Likewise.
5958 (expand_call_inline): Likewise.
5959 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5960 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5961 (make_pass_ipa_chkp_produce_thunks): Likewise.
5962 (make_pass_chkp): Likewise.
5963 (make_pass_chkp_opt): Likewise.
5964 (make_pass_chkp_instrumentation_passes): Likewise.
5965 * tree-pretty-print.c (dump_generic_node): Likewise.
5966 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5967 * tree-ssa-dce.c (propagate_necessity): Likewise.
5968 (eliminate_unnecessary_stmts): Likewise.
5969 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5970 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5971 * tree-ssa-sccvn.h: Likewise.
5972 * tree-ssa-strlen.c (get_string_length): Likewise.
5973 (valid_builtin_call): Likewise.
5974 (adjust_last_stmt): Likewise.
5975 (handle_builtin_strchr): Likewise.
5976 (handle_builtin_strcpy): Likewise.
5977 (handle_builtin_stxncpy): Likewise.
5978 (handle_builtin_memcpy): Likewise.
5979 (handle_builtin_strcat): Likewise.
5980 (strlen_check_and_optimize_stmt): Likewise.
5981 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5982 * tree-streamer-in.c: Likewise.
5983 * tree-streamer.c (record_common_node): Likewise.
5984 * tree.c (tree_code_size): Likewise.
5985 (wide_int_to_tree_1): Likewise.
5986 (type_contains_placeholder_1): Likewise.
5987 (build_common_tree_nodes): Likewise.
5988 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5989 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5990 (POINTER_BOUNDS_P): Likewise.
5991 (BOUNDED_TYPE_P): Likewise.
5992 (BOUNDED_P): Likewise.
5993 (CALL_WITH_BOUNDS_P): Likewise.
5994 (pointer_bounds_type_node): Likewise.
5995 * value-prof.c (gimple_ic): Likewise.
5996 * var-tracking.c (vt_add_function_parameters): Likewise.
5997 * varasm.c (make_decl_rtl): Likewise.
5998 (assemble_start_function): Likewise.
5999 (output_constant): Likewise.
6000 (maybe_assemble_visibility): Likewise.
6001 * varpool.c (ctor_for_folding): Likewise.
6002 * chkp-builtins.def: Remove.
6003 * ipa-chkp.c: Remove.
6004 * ipa-chkp.h: Remove.
6005 * rtl-chkp.c: Remove.
6006 * rtl-chkp.h: Remove.
6007 * tree-chkp-opt.c: Remove.
6008 * tree-chkp.c: Remove.
6009 * tree-chkp.h: Remove.
6011 2018-06-07 Carl Love <cel@us.ibm.com>
6013 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6014 vextract_fp_from_shortl): Add BE support.
6016 2018-06-07 Paul Koning <ni1d@arrl.net>
6018 * compare-elim.c (try_merge_compare): Don't merge compare if
6019 address contains a side effect.
6020 (try_eliminate_compare): Likewise.
6022 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6024 * config.gcc: Support "tremont".
6025 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6026 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6028 * config/i386/i386.c (m_TREMONT): Define.
6029 (processor_target_table): Add "tremont".
6030 (PTA_TREMONT): Define.
6031 (ix86_lea_outperforms): Add TARGET_TREMONT.
6032 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6033 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6034 and M_INTEL_GOLDMONT_PLUS.
6035 (fold_builtin_cpu): Add "tremont".
6036 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6037 (ix86_option_override_internal): Add "tremont".
6038 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6039 (processor_type): Add PROCESSOR_TREMONT.
6040 * config/i386/x86-tune.def: Add m_TREMONT.
6041 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6043 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6045 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6046 symbol defined for msp430i* devices to be lower case.
6048 2018-06-07 Richard Biener <rguenther@suse.de>
6050 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6051 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6052 Properly wrap signed arithmetic if overflow wraps.
6054 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6056 PR tree-optimization/69615
6057 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6058 of a cast from a same precision integral SSA_NAME in a bb dominated
6059 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6060 cast to utype if rhs2 has already a compatible type.
6062 2018-06-07 Richard Biener <rguenther@suse.de>
6064 PR tree-optimization/85935
6065 * graphite-scop-detection.c (find_params_in_bb): Analyze
6066 condition operands with respect to the correct loop. Assert
6067 the analysis doesn't fail.
6069 2018-06-04 Carl Love <cel@us.ibm.com>
6071 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6072 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6073 as it is slightly cheaper.
6074 (first_match_or_eos_index_<mode>):
6075 Calculate index using natural element order.
6076 (first_match_index_<mode>):
6077 Calculate index using natural element order.
6078 (first_match_or_eos_index_<mode>):
6079 Calculate index using natural order.
6080 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6081 for BE and LE modes.
6082 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6083 P9V_BUILTIN_VCLZLSBB_V16QI.
6084 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6087 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6089 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6090 indentation and line wrap for many prototypes. Add missing
6091 @smallexample directives around block of prototypes for vec_xl and
6094 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6096 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6097 track if we pass or return IEEE 128-bit floating point.
6098 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6099 C++ mangling that is compatible with GCC 8.1.
6100 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6101 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6102 floating point types.
6103 (rs6000_function_arg_advance_1): Likewise.
6104 (rs6000_mangle_type): Optionally generate mangled names that match
6105 what GCC 8.1 generated for IEEE 128-bit floating point types.
6106 (rs6000_globalize_decl_name): If we have an external function that
6107 passes or returns IEEE 128-bit types, generate a weak reference
6108 from the mangled name used in GCC 8.1 to the current mangled
6110 (rs6000_init_builtins): Make __ibm128 use the long double type if
6111 long double is IBM extended double. Make __float128 use the long
6112 double type if long double is IEEE 128-bit.
6115 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6116 macro for __ibm128 built-in functions.
6117 (PACK_IF): Add __ibm128 pack/unpack functions.
6118 (UNPACK_IF): Likewise.
6119 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6120 enable long double built-in functions if long double is IEEE
6121 128-bit floating point.
6122 (rs6000_invalid_builtin): Update long double built-in function
6124 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6125 functions, adjust the built-in function to use the long double
6126 built-in function if __ibm128 and long double are the same type.
6127 * doc/extend.texi (PowerPC builtins): Update documention for
6128 __builtin_{,un}pack_longdouble. Add documentation for
6129 __builtin_{,un}pack_ibm128.
6131 2018-06-06 Jim Wilson <jimw@sifive.com>
6133 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6134 (struct machine_function): New field interrupt_mode.
6135 (riscv_handle_type_attribute): New function. Add forward declaration.
6136 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6137 (riscv_expand_epilogue): Check interrupt_mode field.
6138 (riscv_set_current_function): Check interrupt attribute args and
6139 set interrupt_mode field.
6140 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6141 (riscv_sret, riscv_uret): New.
6142 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6143 new arguments to interrupt attribute.
6145 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6148 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6149 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6151 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6153 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6154 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6155 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6156 several redundant entries.
6158 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6160 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6161 type from "rtx" to "rtx_insn *".
6162 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6163 for local "call_insn", removing cast.
6164 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6166 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6168 PR tree-optimization/86066
6169 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6170 for BIT_INSERT_EXPR stores.
6172 2018-06-06 Richard Biener <rguenther@suse.de>
6174 PR tree-optimization/86062
6175 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6176 component refs ontop
6177 of to be offsetted base.
6179 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6181 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6182 to be static and remove check on interrupt attribute name.
6184 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6186 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6187 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6189 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6192 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6194 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6195 Remove second argument, change how error is called.
6196 (aarch64_layout_arg): Remove second argument from
6197 aarch64_err_no_fpadvsimd call.
6198 (aarch64_init_cumulative_args): Ditto.
6199 (aarch64_gimplify_va_arg_expr): Ditto.
6200 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6202 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6204 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6205 (*simple_return_indirect_internal<mode>): Rename from
6206 simple_return_indirect_internal. Use W mode iterator.
6207 (rstorssp): New expander.
6208 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6209 (clrssbsy): New expander.
6210 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6212 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6214 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6216 (cmse_check_pointed_object): Likewise.
6218 2018-06-05 Martin Liska <mliska@suse.cz>
6220 PR gcov-profile/47618
6221 * doc/invoke.texi: Document how -fprofile-dir format
6224 2018-06-05 Richard Biener <rguenther@suse.de>
6226 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6227 removal pretend DOM info isn't available so we do not update
6228 it and only remove edges, not dominated blocks. Actually free
6229 DOM info in case we removed something. Remove unreachable blocks.
6230 (mfb_keep_latches): Work with either DOM info or marked backedges.
6231 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6232 first. Mark backedges if DOM info isn't available.
6233 (Re-)compute DOM info after cleanup_control_flow_pre.
6235 2018-06-05 Richard Biener <rguenther@suse.de>
6237 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6238 (locus_discrim_hasher::hash): Adjust.
6239 (locus_discrim_hasher::equal): Likewise.
6240 (next_discriminator_for_locus): Work on line directly.
6241 (same_line_p): Pass in expanded locus1 as well.
6242 (assign_discriminators): Avoid redundant location expansions.
6244 2018-06-05 Richard Biener <rguenther@suse.de>
6246 PR tree-optimization/86046
6247 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6248 if required after clearing TREE_ADDRESSABLE.
6250 2018-06-05 Richard Biener <rguenther@suse.de>
6252 PR tree-optimization/86047
6253 * tree-ssa-loop.c (for_each_index): Glob handling of all
6254 decls and constants and really handle all of them.
6256 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6259 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6260 qualifier_void_pointer and qualifier_const_void_pointer.
6261 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6262 (arm_init_builtins): Handle the above.
6263 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6264 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6265 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6268 2018-06-05 Martin Liska <mliska@suse.cz>
6270 * auto-profile.c (read_autofdo_file): Do not use
6271 gcov_ctr_summary struct.
6272 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6273 * coverage.c (struct counts_entry): Likewise.
6274 (read_counts_file): Read just single summary entry.
6275 (get_coverage_counts): Use gcov_summary struct.
6276 * coverage.h (get_coverage_counts): Likewise.
6277 * gcov-dump.c (dump_working_sets): Likewise.
6278 (tag_summary): Dump just single summary.
6279 * gcov-io.c (gcov_write_summary): Write just histogram
6281 (gcov_read_summary): Read just single summary.
6282 (compute_working_sets): Use gcov_summary struct.
6283 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6284 of GCOV_COUNTERS_SUMMABLE.
6285 (GCOV_COUNTERS_SUMMABLE): Remove.
6286 (GCOV_FIRST_VALUE_COUNTER): Replace with
6287 GCOV_COUNTER_V_INTERVAL.
6288 (struct gcov_ctr_summary): Remove.
6289 (struct gcov_summary): Directly use fields of former
6291 (compute_working_sets): Use gcov_summary struct.
6292 * gcov.c (read_count_file): Do not use ctrs fields.
6293 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6295 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6297 * profile.c: Likewise.
6298 * profile.h: Likewise.
6300 2018-06-05 Martin Liska <mliska@suse.cz>
6302 PR gcov-profile/84846
6303 * gcov.c (output_lines): Print working directory only
6304 in intermediate format.
6306 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6308 * config/s390/s390-builtin-types.def: Add void function type.
6309 * config/s390/s390-builtins.def: Use the function type for the
6312 2018-06-04 Jim Wilson <jimw@sifive.com>
6314 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6316 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6317 and maybe_eh_return. Change regno to unsigned int. Use new args to
6318 handle EH_RETURN_DATA_REGNO registers properly.
6319 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6320 (riscv_expand_epilogue): Update comment. Change argument name and
6321 type. Update code to use new name and type. Pass new args to
6322 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6324 * config/riscv/riscv.md (NORMAL_RETURN): New.
6325 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6326 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6327 (eh_return): Call gen_eh_return_internal and emit barrier.
6328 (eh_return_internal): Call riscv_expand_epilogue.
6330 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6332 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6333 bit_insertion field and declare can_be_merged_into method.
6334 (merged_store_group::can_be_merged_into): New method.
6335 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6336 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6337 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6339 2018-06-04 Richard Biener <rguenther@suse.de>
6341 PR tree-optimization/85955
6342 * builtins.c (fold_builtin_sincos): Convert pointers to
6343 destination to appropriate type before dereferencing.
6345 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6347 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6349 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6351 * expr.c (expand_expr_real_1): Force the operand into memory if
6352 its TYPE_MODE is BLKmode and if there is no integer mode for
6353 the number of bits being extracted.
6355 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6359 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6360 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6362 2018-06-04 Richard Biener <rguenther@suse.de>
6364 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6365 (cleanup_tree_cfg_noloop): ... single caller. Do
6366 start_recording_case_labels later.
6368 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6370 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6371 to _IMMINTRIN_H_INCLUDED.
6372 * config/i386/pconfigintrin.h: Ditto.
6373 * config/i386/waitpkgintrin.h: Ditto.
6374 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6375 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6376 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6377 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6378 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6379 waitpkgintrin.h and cldemoteintrin.h.
6381 2018-06-04 Richard Biener <rguenther@suse.de>
6383 PR tree-optimization/86038
6384 * tracer.c (find_best_successor): Check probability for
6385 being initialized, bail out if not.
6387 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6390 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6391 of bits to ignore when comparing architectures.
6393 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6395 PR tree-optimization/69615
6396 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6397 maximum or minimum of the type, try to merge it also as if
6398 range1 is + [-, x - 1] or + [x + 1, -].
6401 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6403 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6405 PR tree-optimization/86034
6406 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6407 the unsigned bitfield type in a bit insertion sequence if it does not
6408 have a larger precision than the bitfield size.
6409 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6411 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6413 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6415 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6417 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6418 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6419 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6420 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6422 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6424 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6425 Disable -fdelete-null-pointer-checks for ELF toolchain.
6427 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6428 Kito Cheng <kito.cheng@gmail.com>
6430 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6431 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6432 (nds32*-*-*): Add glibc and uclibc conditions.
6433 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6434 (TARGET_EXCEPT_UNWIND_INFO): Define.
6435 * config/nds32/elf.h: New file.
6436 * config/nds32/linux.h: New file.
6437 * config/nds32/nds32-elf.opt: New file.
6438 * config/nds32/nds32-linux.opt: New file.
6439 * config/nds32/nds32-fp-as-gp.c
6440 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6441 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6443 (nds32_asm_file_end): Ditto.
6444 (nds32_print_operand): Ditto.
6445 (nds32_insert_attributes): Ditto.
6446 (nds32_init_libfuncs): New function.
6447 (TARGET_HAVE_TLS): Define.
6448 (TARGET_INIT_LIBFUNCS): Define.
6449 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6451 (TARGET_ELF): Apply different mcmodel setting.
6452 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6453 been migrated into elf.h and linux.h files.
6454 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6455 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6456 (mcmodel): The content has been migrated into nds32-elf.opt and
6457 nds32-linux.opt files.
6458 * config/nds32/t-elf: New file.
6459 * config/nds32/t-linux: New file.
6461 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6462 Shiva Chen <shiva0217@gmail.com>
6464 * config/nds32/constants.md (unspec_volatile_element): Add
6465 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6466 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6468 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6469 (make_pass_nds32_fp_as_gp): Declare.
6470 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6472 (nds32_asm_function_end_prologue): Remove unused asm output.
6473 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6474 (nds32_asm_file_start): Output necessary fp_as_gp information.
6475 (nds32_option_override): Adjust register usage.
6476 (nds32_expand_prologue): Consider fp_as_gp situation.
6477 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6478 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6481 (simple_return): Ditto.
6482 (omit_fp_begin): Output special directive for fp_as_gp.
6483 (omit_fp_end): Output special directive for fp_as_gp.
6484 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6485 mforbid-fp-as-gp): New options.
6487 2018-06-01 Mark Wielaard <mark@klomp.org>
6489 * dwarf2out.c (dwarf2out_finish): Remove generation of
6490 DW_AT_loclists_base.
6492 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6494 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6495 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6496 (struct merged_store_group): Add bit_insertion field.
6497 (dump_char_array): Use standard hexadecimal format.
6498 (merged_store_group::merged_store_group): Set bit_insertion to false.
6499 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6500 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6501 also print the mask in the dump file.
6502 (pass_store_merging::gate): Minor tweak.
6503 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6504 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6505 stores with INTEGER_CST stores.
6506 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6507 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6508 and use it throughout. Generate bit insertion sequences if need be.
6509 (pass_store_merging::process_store): Remove redundant condition.
6510 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6512 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6514 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6515 the 128-bit floating point types. Fix function comment.
6517 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6519 * config/aarch64/aarch64-simd.md
6520 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6522 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6525 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6527 PR tree-optimization/85989
6528 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6530 (backprop::intersect_uses): Check it when deciding whether this
6531 is a backedge reference.
6532 (backprop::process_block): Add each phi to m_visited_phis
6533 after visiting it, then clear it at the end.
6535 2018-06-01 Richard Biener <rguenther@suse.de>
6537 * tree-vectorizer.h (vect_dr_stmt): New function.
6538 (vect_get_load_cost): Adjust.
6539 (vect_get_store_cost): Likewise.
6540 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6541 Use vect_dr_stmt instead of DR_SMTT.
6542 (vect_record_base_alignments): Likewise.
6543 (vect_calculate_target_alignment): Likewise.
6544 (vect_compute_data_ref_alignment): Likewise and make static.
6545 (vect_update_misalignment_for_peel): Likewise.
6546 (vect_verify_datarefs_alignment): Likewise.
6547 (vector_alignment_reachable_p): Likewise.
6548 (vect_get_data_access_cost): Likewise. Pass down
6549 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6550 (vect_get_peeling_costs_all_drs): Likewise.
6551 (vect_peeling_hash_get_lowest_cost): Likewise.
6552 (vect_enhance_data_refs_alignment): Likewise.
6553 (vect_find_same_alignment_drs): Likewise.
6554 (vect_analyze_data_refs_alignment): Likewise.
6555 (vect_analyze_group_access_1): Likewise.
6556 (vect_analyze_group_access): Likewise.
6557 (vect_analyze_data_ref_access): Likewise.
6558 (vect_analyze_data_ref_accesses): Likewise.
6559 (vect_vfa_segment_size): Likewise.
6560 (vect_small_gap_p): Likewise.
6561 (vectorizable_with_step_bound_p): Likewise.
6562 (vect_prune_runtime_alias_test_list): Likewise.
6563 (vect_analyze_data_refs): Likewise.
6564 (vect_supportable_dr_alignment): Likewise.
6565 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6566 (vect_gen_prolog_loop_niters): Likewise.
6567 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6568 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6570 (vect_recog_mask_conversion_pattern): Likewise.
6571 (vect_try_gather_scatter_pattern): Likewise.
6572 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6573 to vect_get_store_cost.
6574 (vect_get_store_cost): Get stmt_info instead of DR.
6575 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6576 (vect_get_load_cost): Get stmt_info instead of DR.
6578 2018-06-01 Richard Biener <rguenther@suse.de>
6581 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6582 vars wrapped in MEM_REFs.
6584 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6586 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6587 Fix subreg tests so that we only return a choice between
6588 GENERAL_REGS and FP_REGS if the original classes included both.
6590 2018-06-01 Richard Biener <rguenther@suse.de>
6593 * tree-ssa-structalias.c (get_function_part_constraint):
6594 Handle NULL fi->decl.
6595 (find_func_aliases_for_call): Properly handle indirect
6596 fi from direct call.
6597 (find_func_clobbers): Likewise.
6598 (ipa_pta_execute): Likewise.
6599 (create_variable_info_for): For functions that are ifunc_resolver
6600 resolve to a varinfo that contains the result of the resolver call.
6601 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6604 2018-05-31 Michael Collison <michael.collison@arm.com>
6606 * config/aarch64/aarch64.md:
6607 (*fix_to_zero_extenddfdi2): New pattern.
6608 * gcc.target/aarch64/fix_extend1.c: New testcase.
6610 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6614 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6615 and BUILT_IN_STRNCMP_EQ.
6616 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6617 BUILT_IN_STRNCMP_EQ.
6618 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6619 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6620 (gimple_fold_builtin): Likewise.
6621 * tree-ssa-strlen.c (compute_string_length): New function.
6622 (determine_min_obsize): New function.
6623 (handle_builtin_string_cmp): New function to handle calls to
6624 string compare functions.
6625 (strlen_optimize_stmt): Add handling to builtin string compare
6627 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6628 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6629 * tree.c (build_common_builtin_nodes): Add new defines of
6630 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6632 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6635 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6636 functions with naked attribute.
6638 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6640 * config/i386/sse.md (avx_vec_concat<mode>):
6641 Substitute concat_tg_mode mode attribute with xtg_mode.
6642 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6643 (concat_tg_mode): Remove mode attribute.
6645 2018-05-31 Martin Sebor <msebor@redhat.com>
6648 * calls.c (alloc_max_size): Correct a logic error/typo.
6649 Treat excessive arguments as infinite. Warn for invalid arguments.
6650 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6652 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6655 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6656 and movx for Haswell.
6658 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6659 Cesar Philippidis <cesar@codesourcery.com>
6662 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6663 when emitting error on private/firstprivate reductions.
6664 * omp-low.c (lower_omp_target): Avoid reference-type processing
6665 on pointers for firstprivate clause.
6667 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6669 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6672 * config/aarch64/aarch64-simd.md
6673 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6674 (aarch64_ld1_x3_<mode>): Likewise
6675 (aarch64_st1x2<VALLDIF:mode>): Likewise
6676 (aarch64_st1_x2_<mode>): Likewise
6677 (aarch64_st1x3<VALLDIF:mode>): Likewise
6678 (aarch64_st1_x3_<mode>): Likewise
6679 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6680 (vld1_s8_x3): Likewise.
6681 (vld1_u16_x3): Likewise.
6682 (vld1_s16_x3): Likewise.
6683 (vld1_u32_x3): Likewise.
6684 (vld1_s32_x3): Likewise.
6685 (vld1_u64_x3): Likewise.
6686 (vld1_s64_x3): Likewise.
6687 (vld1_f16_x3): Likewise.
6688 (vld1_f32_x3): Likewise.
6689 (vld1_f64_x3): Likewise.
6690 (vld1_p8_x3): Likewise.
6691 (vld1_p16_x3): Likewise.
6692 (vld1_p64_x3): Likewise.
6693 (vld1q_u8_x3): Likewise.
6694 (vld1q_s8_x3): Likewise.
6695 (vld1q_u16_x3): Likewise.
6696 (vld1q_s16_x3): Likewise.
6697 (vld1q_u32_x3): Likewise.
6698 (vld1q_s32_x3): Likewise.
6699 (vld1q_u64_x3): Likewise.
6700 (vld1q_s64_x3): Likewise.
6701 (vld1q_f16_x3): Likewise.
6702 (vld1q_f32_x3): Likewise.
6703 (vld1q_f64_x3): Likewise.
6704 (vld1q_p8_x3): Likewise.
6705 (vld1q_p16_x3): Likewise.
6706 (vld1q_p64_x3): Likewise.
6707 (vst1_s64_x2): Likewise.
6708 (vst1_u64_x2): Likewise.
6709 (vst1_f64_x2): Likewise.
6710 (vst1_s8_x2): Likewise.
6711 (vst1_p8_x2): Likewise.
6712 (vst1_s16_x2): Likewise.
6713 (vst1_p16_x2): Likewise.
6714 (vst1_s32_x2): Likewise.
6715 (vst1_u8_x2): Likewise.
6716 (vst1_u16_x2): Likewise.
6717 (vst1_u32_x2): Likewise.
6718 (vst1_f16_x2): Likewise.
6719 (vst1_f32_x2): Likewise.
6720 (vst1_p64_x2): Likewise.
6721 (vst1q_s8_x2): Likewise.
6722 (vst1q_p8_x2): Likewise.
6723 (vst1q_s16_x2): Likewise.
6724 (vst1q_p16_x2): Likewise.
6725 (vst1q_s32_x2): Likewise.
6726 (vst1q_s64_x2): Likewise.
6727 (vst1q_u8_x2): Likewise.
6728 (vst1q_u16_x2): Likewise.
6729 (vst1q_u32_x2): Likewise.
6730 (vst1q_u64_x2): Likewise.
6731 (vst1q_f16_x2): Likewise.
6732 (vst1q_f32_x2): Likewise.
6733 (vst1q_f64_x2): Likewise.
6734 (vst1q_p64_x2): Likewise.
6735 (vst1_s64_x3): Likewise.
6736 (vst1_u64_x3): Likewise.
6737 (vst1_f64_x3): Likewise.
6738 (vst1_s8_x3): Likewise.
6739 (vst1_p8_x3): Likewise.
6740 (vst1_s16_x3): Likewise.
6741 (vst1_p16_x3): Likewise.
6742 (vst1_s32_x3): Likewise.
6743 (vst1_u8_x3): Likewise.
6744 (vst1_u16_x3): Likewise.
6745 (vst1_u32_x3): Likewise.
6746 (vst1_f16_x3): Likewise.
6747 (vst1_f32_x3): Likewise.
6748 (vst1_p64_x3): Likewise.
6749 (vst1q_s8_x3): Likewise.
6750 (vst1q_p8_x3): Likewise.
6751 (vst1q_s16_x3): Likewise.
6752 (vst1q_p16_x3): Likewise.
6753 (vst1q_s32_x3): Likewise.
6754 (vst1q_s64_x3): Likewise.
6755 (vst1q_u8_x3): Likewise.
6756 (vst1q_u16_x3): Likewise.
6757 (vst1q_u32_x3): Likewise.
6758 (vst1q_u64_x3): Likewise.
6759 (vst1q_f16_x3): Likewise.
6760 (vst1q_f32_x3): Likewise.
6761 (vst1q_f64_x3): Likewise.
6762 (vst1q_p64_x3): Likewise.
6764 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6766 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6767 user_label_prefix to name.
6769 * tree-core.h: Update comment about the format of NAME string
6770 passed to handler in attribute_spec.
6772 * config/msp430/msp430.md: Remove erroneous subreg expression from
6773 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6774 zero_extend{q,h}isi2.
6776 2018-05-30 Borislav Petkov <bp@suse.de>
6778 * doc/extend.texi: Document some architecture specific
6779 constraints and sort entries.
6781 2018-05-30 Martin Sebor <msebor@redhat.com>
6784 * builtins.c (expand_builtin_stpcpy_1): New function.
6785 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6786 only if the former succeeds.
6788 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6790 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6793 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6795 * doc/invoke.texi (-flinker-output): Document
6797 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6799 * passes.c (ipa_write_summaries): Only modify statements if body
6801 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6802 incrementally linking.
6803 (ipa_passes): Likewise.
6804 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6805 pass down resolution info.
6806 * common.opt (flag_incremental_link): Update info.
6807 * gcc.c (plugin specs): Turn flinker-output=* to
6808 -plugin-opt=-linker-output-known
6809 * toplev.c (compile_file): Also cut compilation when doing incremental
6811 * flag-types. (enum lto_partition_model): Add
6812 LTO_LINKER_OUTPUT_NOLTOREL.
6813 (invoke.texi): Add -flinker-output docs.
6814 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6815 link same way as WPA; do not stream in dead initializers.
6817 * dwarf2out.c (dwarf2out_die_ref_for_decl,
6818 darf2out_register_external_decl): Support incremental link.
6820 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6822 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6824 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6826 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6827 it down to simple_object_copy_lto_debug_sections.
6828 (run_gcc): Determine incremental LTO link time and configure
6829 lto1 into non-wpa mode, disable renaming of debug sections.
6831 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
6833 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6834 descriptions of various incorrectly documented functions.
6836 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
6839 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6840 address check not strict.
6842 2018-05-30 Richard Biener <rguenther@suse.de>
6844 PR tree-optimization/85964
6845 * tracer.c (better_p): Drop initialized count check, we only
6846 call the function with initialized counts now.
6847 (find_best_successor): Do find a best edge if one
6848 has uninitialized count.
6849 (find_best_predecessor): Likewise. Do BB frequency check only
6850 if count is initialized.
6852 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
6854 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6855 (aarch64_ldrstr_offset_compare): New.
6856 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6857 load/store orderings.
6858 (aarch64_gen_adjusted_ldpstp): Likewise.
6860 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
6862 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6863 Check for subset of GENERAL_REGS and FP_REGS.
6864 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6867 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
6869 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6870 and wi::to_poly_offset. Add the current offset and then check
6871 whether the sum fits, rather than using an unchecked addition of
6872 a checked term. Check for a shwi rather than a uhwi.
6873 * expr.c (get_bit_range): Use tree_to_poly_uint64.
6874 (store_constructor): Use poly_int_tree_p.
6875 (expand_expr_real_1): Likewise.
6876 * function.c (assign_temp): Likewise.
6877 * fold-const.c (const_binop): Use poly_int_tree_p and
6879 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
6881 * ipa-icf-gimple.c (func_checker::compare_operand): Use
6882 to_poly_offset for MEM offsets.
6883 * ipa-icf.c (sem_variable::equals): Likewise.
6884 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6885 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6886 wi::to_poly_offset for BIT_FIELD_REF offsets.
6887 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6889 * var-tracking.c (emit_note_insn_var_location): Use
6890 tree_to_poly_uint64.
6892 2018-05-29 Jim Wilson <jimw@sifive.com>
6894 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6896 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6899 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6900 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6902 (sse4_1_round<mode>2): Use nonimmediate_operand
6903 for operand 1 predicate.
6905 2018-05-29 Martin Sebor <msebor@redhat.com>
6906 Richard Biener <rguenther@suse.de>
6909 * calls.c (get_size_range): Call determine_value_range instead
6910 of get_value_range..
6911 * tree-vrp.h (determine_value_range): Declared new function.
6912 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6914 2018-05-29 Richard Biener <rguenther@suse.de>
6916 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6917 sure to use non-pattern stmts for get_earlier_stmt arguments.
6918 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6919 called on pattern stmts.
6920 (get_later_stmt): Likewise.
6922 2018-05-29 Martin Liska <mliska@suse.cz>
6924 PR gcov-profile/85759
6925 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6928 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6930 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6932 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6936 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6937 VEC_PACK_FLOAT_EXPR): New tree codes.
6938 * tree-pretty-print.c (op_code_prio): Handle
6939 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6940 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6941 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6942 * tree-inline.c (estimate_operator_cost): Likewise.
6943 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6944 * fold-const.c (const_binop): Likewise.
6945 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6946 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6947 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6948 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6949 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6950 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6951 * expr.c (expand_expr_real_2): Likewise.
6952 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6953 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6954 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6956 * optabs.c (expand_widen_pattern_expr): For
6957 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6958 sign from result type rather than operand's type.
6959 (expand_binop_directly): For vec_packu_float_optab and
6960 vec_packs_float_optab allow result type to be different from operand's
6962 * optabs-tree.c (optab_for_tree_code): Handle
6963 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6964 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6965 * tree-vect-generic.c (expand_vector_operations_1): Handle
6966 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6967 VEC_PACK_FLOAT_EXPR.
6968 * tree-vect-stmts.c (supportable_widening_operation): Handle
6970 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6971 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6972 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6973 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6974 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6976 (vec_pack<floatprefix>_float_<mode>): New expander.
6977 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6979 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6980 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6981 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6982 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6983 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6985 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6986 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6987 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6988 VEC_PACK_FLOAT_EXPR): Document.
6990 2018-05-29 Richard Biener <rguenther@suse.de>
6992 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6994 (stmt_vec_info_vec): Make pointer.
6995 (init_stmt_vec_info_vec): Remove.
6996 (free_stmt_vec_info_vec): Likewise.
6997 (set_stmt_vec_info_vec): New function.
6998 (free_stmt_vec_infos): Likewise.
6999 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7000 (set_vinfo_for_stmt): Likewise.
7001 (get_earlier_stmt): Likewise.
7002 (get_later_stmt): Likewise.
7003 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7004 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7005 (vec_info::~vec_info): Free stmt_vec_infos.
7006 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7007 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7008 (pass_slp_vectorize::execute): Likewise.
7009 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7010 (free_stmt_vec_info_vec): Likewise.
7011 (set_stmt_vec_info_vec): New function.
7012 (free_stmt_vec_infos): Likewise.
7013 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7014 the global stmt_vec_info_vec.
7015 * tree-parloops.c (gather_scalar_reductions): Use
7016 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7019 2018-05-29 Richard Biener <rguenther@suse.de>
7021 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7023 2018-05-29 Martin Liska <mliska@suse.cz>
7024 David Malcolm <dmalcolm@redhat.com>
7026 * vec.c (test_reverse): New.
7027 (vec_c_tests): Add new test.
7028 * vec.h (vl_ptr>::reverse): New function.
7030 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7032 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7034 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7037 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7039 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7041 2018-05-28 Richard Biener <rguenther@suse.de>
7043 PR tree-optimization/85933
7044 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7045 look at stmts marked as vectorizable.
7047 2018-05-28 Richard Biener <rguenther@suse.de>
7049 PR tree-optimization/85934
7050 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7051 vector boolean check before scalar optimization.
7053 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7055 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7058 2018-05-28 Mark Wielaard <mark@klomp.org>
7060 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7061 if it is an expression containing a minus sign.
7063 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7065 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7067 2018-05-27 Paul Koning <ni1d@arrl.net>
7069 * config/pdp11/pdp11.md (truncsihi2): Remove.
7071 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7072 Chung-Ju Wu <jasonwucj@gmail.com>
7074 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7076 (unaligned_store_dw): Ditto.
7077 * config/nds32/nds32-memory-manipulation.c
7078 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7079 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7080 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7081 (emit_setmem_word_loop): Rename to ...
7082 (emit_setmem_doubleword_loop): ... this.
7083 (nds32_gen_dup_4_byte_to_word_value): New function.
7084 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7085 (nds32_expand_setmem_loop): Refine implementation.
7086 (nds32_expand_setmem_loop_v3m): Ditto.
7087 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7090 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7092 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7094 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7096 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7097 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7098 machine->attr_no_prologue_p.
7099 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7100 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7101 (nds32_expand_epilogue): Consider attr_naked_p.
7102 (nds32_expand_epilogue_v3pop): Likewise.
7103 (nds32_can_use_return_insn): Likewise.
7104 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7105 attr_no_prologue_p fields.
7106 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7108 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7111 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7113 * config/i386/sse.md
7114 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7116 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7118 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7120 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7122 (*<floatsuffix>floatv2div2sf2): Rename to ...
7123 (*float<floatunssuffix>v2div2sf2): ... this.
7124 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7125 (float<floatunssuffix>v2div2sf2_mask): ... this.
7126 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7127 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7128 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7130 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7132 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7134 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7136 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7138 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7140 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7141 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7142 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7143 gen_ufix_truncv8dfv8si2.
7144 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7145 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7146 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7147 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7148 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7149 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7150 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7151 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7153 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7157 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7159 2018-05-25 Jim Wilson <jimw@sifive.com>
7161 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7162 * config/riscv/riscv.c (struct machine_function): Add
7163 interrupt_handler_p and attribute_checked_p fields.
7164 (riscv_attribute_table): Add interrupt.
7165 (riscv_interrupt_type_p): New.
7166 (riscv_save_reg_p): Save extra regs for interrupt handler.
7167 (riscv_use_save_libcall): Return false for interrupt handler.
7168 (riscv_first_stack_step): Add forward declaration.
7169 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7170 for interrupt handler with large frame. Use it for saved reg list.
7171 (riscv_expand_prologue): Move flag_stack_usage_info support to
7172 eliminate duplication.
7173 (riscv_expand_epilogue): Generate mret for interrupt handler.
7174 (riscv_epilogue_uses): New.
7175 (riscv_can_use_return_insn): Return false for interrupt handler.
7176 (riscv_function_ok_for_sibcall): Likewise.
7177 (riscv_set_current_function): Add interrupt handler support.
7178 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7179 * config/riscv/riscv.md (UNSPECV_MRET): New.
7181 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7183 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7185 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7187 PR tree-optimization/85712
7188 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7189 this candidate has already been replaced in-situ by a copy.
7191 2018-05-25 Jason Merrill <jason@redhat.com>
7193 PR c++/80485 - inline function non-zero address.
7194 * symtab.c (nonzero_address): Check DECL_COMDAT.
7196 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7199 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7200 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7201 extension of SImode operation. Use const123_operand predicate.
7202 (*saddsi_1): Remove.
7203 (*saddl_se_1): Ditto.
7205 (*ssubl_se_1): Ditto.
7206 * config/alpha/predicates.md (const123_operand): New predicate.
7207 * config/alpha/constraints.md (P): Use IN_RANGE.
7209 2018-05-25 Richard Biener <rguenther@suse.de>
7211 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7213 (ref_maybe_used_by_stmt_p): Likewise.
7214 (stmt_may_clobber_ref_p): Likewise.
7215 (stmt_may_clobber_ref_p_1): Likewise.
7216 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7218 (ref_maybe_used_by_stmt_p): Likewise.
7219 (stmt_may_clobber_ref_p): Likewise.
7220 (stmt_may_clobber_ref_p_1): Likewise.
7221 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7222 the alias oracle to disambiguate DRs with stmts DR analysis
7224 (vect_analyze_data_refs): Do not give up on not analyzable
7225 DRs for BB vectorization. Remove code truncating the dataref
7228 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7231 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7232 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7233 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7235 2018-05-25 Richard Biener <rguenther@suse.de>
7237 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7238 function, combining stmt data ref gathering and fatal analysis
7240 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7241 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7242 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7243 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7244 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7246 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7248 PR tree-optimization/85720
7249 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7250 SCC if all partitions are builtins.
7251 (version_loop_by_alias_check): New parameter. Generate cancelable
7252 runtime alias check if all partitions are builtins.
7253 (distribute_loop): Update call to above function.
7255 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7257 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7258 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7259 (parm_default_def_partition_arg): Ditto.
7260 (set_parm_default_def_partition): Ditto.
7261 (get_parm_default_def_partitions): Ditto and make it static.
7262 (get_undefined_value_partitions): Ditto and make it static.
7263 (remove_ssa_form): Refactor call to init_var_map here.
7264 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7265 computation for loop region.
7266 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7267 (register_default_def): Delete.
7268 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7269 (parm_default_def_partition_arg): Ditto.
7270 (set_parm_default_def_partition): Ditto.
7271 (get_parm_default_def_partitions): Ditto and make it static.
7272 (get_undefined_value_partitions): Ditto and make it static.
7273 (coalesce_with_default, coalesce_with_default): Update comment.
7274 (create_coalesce_list_for_region): New func factored out from
7275 create_outofssa_var_map.
7276 (populate_coalesce_list_for_outofssa): New func factored out from
7277 create_outofssa_var_map and coalesce_ssa_name.
7278 (create_outofssa_var_map): Delete.
7279 (coalesce_ssa_name): Refactor to support live range computation.
7280 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7281 (get_parm_default_def_partitions): Delete.
7282 (get_undefined_value_partitions): Ditto.
7283 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7284 computation for loop region.
7285 (new_tree_live_info, loe_visit_block): Ditto.
7286 (live_worklist, set_var_live_on_entry): Ditto.
7287 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7288 * tree-ssa-live.h (struct _var_map): New fields.
7289 (init_var_map): Change decl.
7290 (region_contains_p): New.
7292 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7294 * tree-ssa-live.h (live_merge_and_clear): Delete.
7296 2018-05-25 Richard Biener <rguenther@suse.de>
7299 * tree-dump.c (dequeue_and_dump): Remove access to removed
7300 operand 2 of a SWITCH_EXPR.
7302 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7304 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7305 multiplication and division.
7306 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7307 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7308 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7309 (cond_udiv_optab, cond_umod_optab): New optabs.
7310 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7311 (IFN_COND_RDIV): New internal functions.
7312 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7313 TRUNC_MOD_EXPR and RDIV_EXPR.
7314 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7315 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7317 (SVE_INT_BINARY): Include mult.
7318 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7319 (optab, sve_int_op): Handle mult.
7320 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7322 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7323 for SVE_INT_BINARY_SD.
7325 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7327 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7328 (optab, sve_int_op): Handle div and udiv.
7329 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7330 for SVE_INT_BINARY_SD.
7331 (*<optab><mode>3): New insn for the same.
7333 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7335 * tree-vect-patterns.c: Include predict.h.
7336 (vect_recog_divmod_pattern): Restrict check for division support
7337 to when optimizing for size.
7339 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7341 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7342 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7343 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7344 (gimple_match_op::set_op): Likewise.
7345 (gimple_resimplify4): Declare.
7346 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7347 (expr::gen_transform): Likewise.
7348 (decision_tree::gen): Generate a simplification routine for 4 operands.
7349 * gimple-match-head.c (gimple_simplify): Add an overload for
7350 4 operands. In the top-level function, handle up to 4 call
7351 arguments and call gimple_resimplify4.
7352 (gimple_resimplify4): New function.
7353 (build_call_internal): Pass a fourth operand.
7354 (maybe_push_to_seq): Likewise.
7355 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7356 Fold VEC_COND_EXPRs of an operation and a default value into
7357 an IFN_COND_* function if possible.
7358 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7360 (SVE_COND_FP_BINARY): Include them.
7361 (optab, sve_fp_op): Handle them.
7362 (SVE_INT_BINARY_REV): New code iterator.
7363 (SVE_COND_FP_BINARY_REV): New int iterator.
7364 (commutative): New int attribute.
7365 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7367 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7369 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7370 (*cond_<optab><mode>): New patterns for reversed operands.
7372 2018-05-25 Richard Biener <rguenther@suse.de>
7374 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7375 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7376 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7377 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7378 * tree-vect-data-refs.c (everywhere): Adjust users.
7379 * tree-vect-loop.c (everywhere): Likewise.
7380 * tree-vect-slp.c (everywhere): Likewise.
7381 * tree-vect-stmts.c (everywhere): Likewise.
7382 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7384 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7386 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7388 (gcc_cv_as_section_exclude): ... this.
7389 Try Solaris as #exclude syntax.
7390 * configure: Regenerate.
7391 * config.in: Regenerate.
7392 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7394 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7395 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7397 * varasm.c (default_elf_asm_named_section): Don't check if
7398 HAVE_GAS_SECTION_EXCLUDE is defined.
7400 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7402 * doc/md.texi: Update the documentation of the cond_* optabs
7403 to mention the new final operand. Fix GET_MODE_NUNITS call.
7404 Describe the scalar case too.
7405 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7406 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7408 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7409 (get_conditional_internal_fn): Update comment.
7410 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7411 accumulator value as a final argument to conditional functions.
7412 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7413 a define_expand and add an "else" operand. Assert for now that
7414 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7415 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7416 (*cond_<optab><mode>): New patterns.
7417 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7418 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7419 (UNSPEC_COND_EOR): Delete.
7420 (optab): Remove associated mappings.
7421 (SVE_INT_BINARY): New code iterator.
7422 (sve_int_op): Remove int attribute and add "minus" to the code
7424 (SVE_COND_INT_OP): Delete.
7425 (SVE_COND_FP_OP): Rename to...
7426 (SVE_COND_FP_BINARY): ...this.
7428 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7430 * optabs.c (can_reuse_operands_p): New function.
7431 (maybe_legitimize_operands): Try to reuse the results for
7434 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7436 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7437 Add {q} suffix to insn mnemonic.
7439 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7441 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7442 (msp430_warn_func_return): New.
7444 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7446 * fold-const.c (tree_nonzero_bits): New function.
7447 * fold-const.h (tree_nonzero_bits): Likewise.
7448 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7449 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7451 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7455 * varasm.c (assemble_alias): Check ifunc_resolver only on
7458 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7461 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7462 when memory input operand is handled.
7464 2018-05-24 Luis Machado <luis.machado@linaro.org>
7466 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7468 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7470 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7472 * match.pd: Delay FMA folds until after vectorization.
7474 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7477 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7478 address check not strict.
7480 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7482 * gimple-match.h (gimple_match_op): New class.
7483 (mprts_hook): Replace parameters with a gimple_match_op *.
7484 (maybe_build_generic_op): Likewise.
7485 (gimple_simplified_result_is_gimple_val): Replace parameters with
7486 a const gimple_match_op *.
7487 (gimple_simplify): Replace code_helper * and tree * parameters with
7488 a gimple_match_op * parameter.
7489 (gimple_resimplify1): Replace code_helper *, tree and tree *
7490 parameters with a gimple_match_op * parameter.
7491 (gimple_resimplify2): Likewise.
7492 (gimple_resimplify3): Likewise.
7493 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7494 parameters with a gimple_match_op * parameter.
7495 * gimple-match-head.c (gimple_simplify): Change prototypes of
7496 auto-generated functions to take a gimple_match_op * instead of
7497 separate code_helper * and tree * parameters. Make the same
7498 change in the top-level overload and update calls to the
7499 gimple_resimplify routines. Update calls to the auto-generated
7500 functions and to maybe_push_res_to_seq in the publicly-facing
7501 operation-specific gimple_simplify overloads.
7502 (gimple_match_op::MAX_NUM_OPS): Define.
7503 (gimple_resimplify1): Replace rcode and ops with a single res_op
7504 parameter. Update call to gimple_simplify.
7505 (gimple_resimplify2): Likewise.
7506 (gimple_resimplify3): Likewise.
7507 (mprts_hook): Replace parameters with a gimple_match_op *.
7508 (maybe_build_generic_op): Likewise.
7509 (build_call_internal): Replace type, nargs and ops with
7510 a gimple_match_op *.
7511 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7512 with a single gimple_match_op *. Update calls to mprts_hook,
7513 build_call_internal and gimple_simplified_result_is_gimple_val.
7514 Factor out code that is common to the tree_code and combined_fn cases.
7515 * genmatch.c (expr::gen_transform): Replace tem_code and
7516 tem_ops with a gimple_match_op called tem_op. Update calls
7517 to the gimple_resimplify functions and maybe_push_res_to_seq.
7518 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7519 res_ops. Update call to the gimple_resimplify functions.
7520 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7521 (decision_tree::gen): Make the functions take a gimple_match_op *
7522 called res_op instead of separate res_code and res_ops parameters.
7523 Update call accordingly.
7524 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7525 and ops with a single res_op parameter. Update calls to
7526 maybe_build_generic_op and maybe_push_res_to_seq.
7527 (fold_stmt_1): Update calls to gimple_simplify and
7528 replace_stmt_with_simplification.
7529 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7530 and gimple_simplified_result_is_gimple_val.
7531 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7533 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7534 with a gimple_match_op *.
7535 (vn_nary_build_or_lookup): Likewise. Update call to
7536 vn_nary_build_or_lookup_1.
7537 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7538 gimple_match_op *. Update calls to the gimple_resimplify routines
7539 and to gimple_simplified_result_is_gimple_val.
7540 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7541 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7542 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7543 (visit_nary_op): Likewise.
7544 (visit_reference_op_load): Likewise.
7546 2018-05-23 Luis Machado <luis.machado@linaro.org>
7548 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7549 modifier for printing the step amount.
7551 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7554 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7557 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7559 * doc/sourcebuild.texi (Endianness): New subsubsection.
7561 2018-05-23 Luis Machado <luis.machado@linaro.org>
7563 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7564 <prefetch_dynamic_strides>: New const bool field.
7565 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7566 prefetch_dynamic_strides.
7567 (exynosm1_prefetch_tune): Likewise.
7568 (thunderxt88_prefetch_tune): Likewise.
7569 (thunderx_prefetch_tune): Likewise.
7570 (thunderx2t99_prefetch_tune): Likewise.
7571 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7573 (aarch64_override_options_internal): Update to set
7574 PARAM_PREFETCH_DYNAMIC_STRIDES.
7575 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7576 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7577 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7578 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7579 prefetch-dynamic-strides setting.
7581 2018-05-23 Luis Machado <luis.machado@linaro.org>
7583 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7584 <minimum_stride>: New const int field.
7585 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7586 minimum_stride field defaulting to -1.
7587 (exynosm1_prefetch_tune): Likewise.
7588 (thunderxt88_prefetch_tune): Likewise.
7589 (thunderx_prefetch_tune): Likewise.
7590 (thunderx2t99_prefetch_tune): Likewise.
7591 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7592 <default_opt_level>: Set to 3.
7593 (aarch64_override_options_internal): Update to set
7594 PARAM_PREFETCH_MINIMUM_STRIDE.
7595 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7596 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7597 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7598 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7599 stride is constant and is below the minimum stride threshold.
7601 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7603 * config/arm/arm-cpus.in (mode26): Delete.
7604 (armv4): Delete mode26 reference.
7605 * config/arm/arm.c (arm_configure_build_target): Delete use of
7608 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7610 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7612 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7613 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7615 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7616 (floatunsdidf2): Ditto.
7618 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7620 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7621 (fixuns_trunc<mode>si2_avx512f): Ditto.
7622 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7623 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7624 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7626 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7628 PR rtl-optimization/79985
7629 * df-scan.c (df_insn_refs_collect): Remove special case for
7630 global registers and asm statements.
7632 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7634 * extend.texi (Global Register Variables): Rewrite the bullet list.
7635 Note that the register is available for allocation. Note that access
7636 via inline asm must use constraints. Add note about async-signal
7637 handlers. Remove paragraph about automagic register selection.
7639 2018-05-23 Richard Biener <rguenther@suse.de>
7641 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7642 of fixed offset from memset VN.
7644 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7646 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7648 (alloc_cand_and_find_basis): Initialize first_interp field.
7649 (slsr_process_mul): Modify first_interp field.
7650 (slsr_process_add): Likewise.
7651 (slsr_process_cast): Modify first_interp field for each new
7653 (slsr_process_copy): Likewise.
7654 (dump_candidate): Dump first_interp field.
7655 (replace_mult_candidate): Process all interpretations, not just
7657 (replace_rhs_if_not_dup): Likewise.
7658 (replace_one_candidate): Likewise.
7660 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7662 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7664 (aarch64_needs_frame_chain): New function.
7665 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7667 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7670 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7671 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7672 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7673 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7674 as true for strict-align.
7675 (aarch64_can_inline_p): Perform checks even when callee has no
7676 attributes to check for strict alignment.
7677 * doc/extend.texi (AArch64 Function Attributes): Document
7679 * doc/invoke.texi: (AArch64 Options): Likewise.
7681 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7683 PR tree-optimization/85853
7684 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7685 the handling of the root of the node to...
7686 (vect_slp_analyze_node_operations_1): ...this new function,
7687 and run the whole thing with the child nodes' def types
7688 set according to their SLP node's def type.
7690 2018-05-23 Richard Biener <rguenther@suse.de>
7693 * tree-data-ref.c (create_runtime_alias_checks): Defer
7694 and ignore overflow warnings.
7696 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7698 PR tree-optimization/85822
7699 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7702 2018-05-23 Richard Biener <rguenther@suse.de>
7704 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7705 memset constants via native_interpret_expr.
7707 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7710 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7712 (cgraph_node::create_alias): Likewise.
7713 (cgraph_node::get_availability): Check ifunc_resolver instead
7714 of looking up ifunc attribute.
7715 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7716 * varasm.c (do_assemble_alias): Likewise.
7717 (assemble_alias): Likewise.
7718 (default_binds_local_p_3): Likewise.
7719 * cgraph.h (cgraph_node): Add ifunc_resolver.
7720 (cgraph_node::only_called_directly_or_aliased_p): Return false
7722 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7724 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7725 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7726 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7727 instead of looking up ifunc attribute.
7729 2018-05-22 Luis Machado <luis.machado@linaro.org>
7731 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7733 2018-05-22 Martin Sebor <msebor@redhat.com>
7736 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7737 only when expasion succeeds.
7738 (expand_builtin_strcmp): Same.
7739 (expand_builtin_strncmp): Same.
7741 2018-05-22 Martin Sebor <msebor@redhat.com>
7743 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7745 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7746 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7748 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7749 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7751 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7752 Add check for legitimate_address.
7753 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7754 (aarch64_swap_ldrstr_operands): New.
7755 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7758 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7759 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7761 * config/aarch64/aarch64.md: New patterns to generate stp
7763 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7764 single words and double words.
7765 (load_pair_sw, load_pair_dw): Likewise.
7766 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7768 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7770 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7771 for different mode ldpstp and add peephole for merged zero stores.
7773 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7775 (aarch64_gen_store_pair): Rename calls to match new patterns.
7776 (aarch64_gen_load_pair): Rename calls to match new patterns.
7777 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7778 (load_pair<DREG:mode><DREG2:mode>): ... This.
7779 (store_pair<mode>): Rename to...
7780 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7781 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7783 (V_INT_EQUIV): Handle SImode.
7784 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7787 2018-05-22 Martin Sebor <msebor@redhat.com>
7790 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7791 or ajust the presumed bound on an operation to avoid unnecessary
7794 2018-05-22 Martin Sebor <msebor@redhat.com>
7796 PR tree-optimization/85826
7797 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7798 assuming that a DECL necesarily has a constant size.
7800 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7803 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7805 2018-05-22 Richard Biener <rguenther@suse.de>
7807 PR tree-optimization/85834
7808 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7809 non-constant and non-zero memset arguments.
7811 2018-05-22 Martin Liska <mliska@suse.cz>
7814 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7816 2018-05-22 Richard Biener <rguenther@suse.de>
7818 PR tree-optimization/85863
7819 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7820 comparisons when vectype is specified.
7821 (vectorizable_condition): Do not specify vectype for
7822 vect_is_simple_cond when SLP vectorizing.
7824 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
7827 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7828 define __ibm128 as long double.
7829 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7830 as a distinct type when IEEE 128-bit support is enabled.
7831 (init_float128_ieee): Fix up conversions between IFmode and IEEE
7832 128-bit types to use the correct functions.
7833 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7834 convert between 128-bit floating point types that have different
7835 modes but the same representation, instead of using gen_lowpart to
7837 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7839 (IFKF_reg): New attributes to give the register constraints for
7841 (extend<mode>tf2_internal): New insns to mark an explicit
7842 conversion between 128-bit floating point types that have a
7843 different mode but share the same representation.
7845 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
7847 PR tree-optimization/85814
7848 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7849 a null return from get_strinfo when unsharing the next
7850 strinfo in the chain.
7852 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7855 * varasm.c (weak_finish): Clean up weak_decls.
7857 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7859 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7860 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7861 UNSPEC_UADALP values.
7862 * config/aarch64/iterators.md (ABAL): New int iterator.
7865 (sur): Add mappings for the above.
7866 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7868 (aarch64_<sur>abal<mode>_4): Likewise.
7869 (aarch64_<sur>adalp<mode>_3): Likewise.
7870 (<sur>sadv16qi): New define_expand.
7872 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
7874 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7875 (*movdf_internal): Ditto.
7876 (*rcpsf2_sse): Ditto.
7877 (*rsqrtsf2_sse): Ditto.
7878 (*sqrt<mode>2_sse): Ditto.
7880 2018-05-21 Tamar Christina <tamar.christina@arm.com>
7882 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7884 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7885 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7886 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7887 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7889 * config/aarch64/arm_neon.h: Likewise.
7890 * config/aarch64/iterators.md (VQ_I): New.
7892 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7894 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7896 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7899 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7901 * config/nds32/constraints.md (S): New constraint.
7902 * config/nds32/nds32.md (call_internal): Use constraint S.
7903 (call_value_internal): Likewise.
7904 (sibcall_internal): Likewise.
7905 (sibcall_value_internal): Likewise.
7907 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7908 Chung-Ju Wu <jasonwucj@gmail.com>
7910 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7913 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7914 Chung-Ju Wu <jasonwucj@gmail.com>
7916 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7917 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7918 (nds32_rtx_costs_impl): Simplify.
7919 (nds32_address_cost_impl): Simplify.
7920 (nds32_init_rtx_costs): New function.
7921 (nds32_rtx_costs_speed_prefer): Likewise.
7922 (nds32_rtx_costs_size_prefer): Likewise.
7923 (nds32_address_cost_speed_prefer): Likewise.
7924 (nds32_address_cost_speed_fwprop): Likewise.
7925 (nds32_address_cost_size_prefer): Likewise.
7926 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7927 * config/nds32/nds32.c (nds32_option_override): Use
7928 nds32_init_rtx_costs function.
7930 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7932 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7933 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7934 (TARGET_PIPELINE_N8): Likewise.
7935 (TARGET_PIPELINE_N10): Likewise.
7936 (TARGET_PIPELINE_N13): Likewise.
7937 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7939 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7941 * config/nds32/nds32-fpu.md: Update copyright year.
7943 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7945 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7947 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7949 * config/nds32/nds32.c
7950 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7951 * config/nds32/nds32.opt (minline-asm-r15): New option.
7953 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7955 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7957 * config/nds32/nds32.md (abssi2): New pattern.
7959 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7961 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7962 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7963 Merge insn pattern from sse_cvtsi2ss<round_name> and
7964 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7965 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7966 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7967 using SWI48 mode iterator.
7968 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7969 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7970 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7971 pattern from sse_cvttss2si<round_saeonly_name>
7972 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7973 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7974 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7975 using SWI48 mode iterator.
7976 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7977 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7978 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7979 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7980 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7981 using SWI48 mode iterator.
7982 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7983 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7984 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7985 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7986 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7987 SWI48 mode iterator.
7988 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7989 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7990 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7991 pattern from sse_cvttsd2si<round_saeonly_name>
7992 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7994 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7996 * config/nds32/nds32-md-auxiliary.c
7997 (nds32_valid_smw_lwm_base_p): Refine.
7998 (nds32_output_smw_single_word): Refine.
7999 (nds32_output_smw_double_word): New.
8000 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8002 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8004 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8005 (nds32_output_stack_pop): Refine.
8006 (nds32_expand_unaligned_load): Refine.
8007 (nds32_expand_unaligned_store): Refine.
8009 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8010 Chung-Ju Wu <jasonwucj@gmail.com>
8012 * config/nds32/constants.md: Add TP_REGNUM constant.
8013 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8014 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8016 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8017 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8018 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8019 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8020 and PIC code generation.
8021 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8023 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8025 * config/nds32/nds32.md: Support TLS and PIC.
8026 * config/nds32/nds32.c: Support TLS and PIC.
8027 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8028 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8031 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8033 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8034 mode with E_ prefix.
8036 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8037 Chung-Ju Wu <jasonwucj@gmail.com>
8039 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8040 * config/nds32/nds32-md-auxiliary.c
8041 (symbolic_reference_mentioned_p): New.
8042 (nds32_legitimize_ict_address): New.
8043 (nds32_expand_ict_move): New.
8044 (nds32_indirect_call_referenced_p): New.
8045 (nds32_symbol_binds_local_p): Delete.
8046 (nds32_long_call_p): Modify.
8047 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8048 * config/nds32/nds32-protos.h
8049 (symbolic_reference_mentioned_p): Declare.
8050 (nds32_legitimize_ict_address): Declare.
8051 (nds32_expand_ict_move): Declare.
8052 (nds32_indirect_call_referenced_p): Declare.
8053 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8054 (nds32_relax_group): Use nds32_ict_const_p as condition.
8055 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8056 (nds32_asm_file_start): Output ict_model directive in asm code.
8057 (nds32_legitimate_address_p): Consider indirect call.
8058 (nds32_print_operand): Consider indirect call.
8059 (nds32_print_operand_address): Consider indirect call.
8060 (nds32_insert_attributes): Handle "indirect_call" attribute.
8061 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8062 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8063 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8064 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8065 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8066 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8067 (TARGET_ICT_MODEL_SMALL): Define.
8068 (TARGET_ICT_MODEL_LARGE): Define.
8069 * config/nds32/nds32.md (movsi): Consider ict model.
8070 (call, call_value): Consider ict model.
8071 (sibcall, sibcall_value): Consider ict model.
8072 * config/nds32/nds32.opt (mict-model): New option.
8073 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8076 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8077 Monk Chiang <sh.chiang04@gmail.com>
8078 Jim Wilson <jimw@sifive.com>
8080 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8081 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8082 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8083 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8084 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8085 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8086 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8087 compute save_libcall_adjustment properly.
8088 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8089 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8090 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8091 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8092 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8093 (ABI_SPEC): Handle mabi=ilp32e.
8094 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8095 (RVE): Add RVE mask.
8096 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8097 <-march>: Add rv32e as an example.
8099 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8102 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8103 (intra_create_variable_infos): Handle C++ constructors.
8105 2018-05-18 Martin Liska <mliska@suse.cz>
8107 * passes.def: Remove a redundant pass.
8109 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8112 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8114 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8116 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8118 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8120 (armv2, armv2a, armv3, armv3m): Delete architectures.
8121 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8122 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8123 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8125 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8126 (*mulsidi3adddi): Likewise.
8127 (mulsidi3): Likewise.
8128 (*mulsidi3_nov6): Likewise.
8129 (umulsidi3): Likewise.
8130 (umulsidi3_nov6): Likewise.
8131 (umaddsidi4): Likewise.
8132 (*umulsidi3adddi): Likewise.
8133 (smulsi3_highpart): Likewise.
8134 (*smulsi3_highpart_nov6): Likewise.
8135 (umulsi3_highpart): Likewise.
8136 (*umulsi3_highpart_nov6): Likewise.
8137 * config/arm/arm.h (arm_arch3m): Delete.
8138 * config/arm/arm.c (arm_arch3m): Delete.
8139 (arm_option_override_internal): Update armv3-related comment.
8140 (arm_configure_build_target): Delete use of isa_bit_mode32.
8141 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8142 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8143 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8145 (mulusa3): Likewise.
8146 * config/arm/arm-protos.h (arm_arch3m): Delete.
8147 * config/arm/arm-tables.opt: Regenerate.
8148 * config/arm/arm-tune.md: Likewise.
8149 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8150 deleted architectures.
8152 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8154 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8155 (armv5t, armv5te): New features.
8156 (ARMv5, ARMv5e): Delete fgroups.
8157 (ARMv5t, ARMv5te): Adjust for above changes.
8159 (armv5, armv5e): Delete arches.
8160 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8162 (*call_reg_arm): Likewise.
8163 (*call_value_reg_armv5): Likewise.
8164 (*call_value_reg_arm): Likewise.
8165 (*call_symbol): Likewise.
8166 (*call_value_symbol): Likewise.
8167 (*sibcall_insn): Likewise.
8168 (*sibcall_value_insn): Likewise.
8170 (prefetch): Likewise.
8171 (define_split and define_peephole2 dependent on arm_arch5):
8173 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8175 (TARGET_ARM_QBIT): Likewise.
8176 (TARGET_DSP_MULTIPLY): Likewise.
8177 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8178 (arm_arch5, arm_arch5e): Delete.
8179 (arm_arch5t, arm_arch5te): Declare.
8180 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8181 (arm_arch5t): Declare.
8182 (arm_option_reconfigure_globals): Update for the above.
8183 (arm_options_perform_arch_sanity_checks): Update comment, replace
8184 use of arm_arch5 with arm_arch5t.
8185 (use_return_insn): Likewise.
8186 (arm_emit_call_insn): Likewise.
8187 (output_return_instruction): Likewise.
8188 (arm_final_prescan_insn): Likewise.
8189 (arm_coproc_builtin_available): Likewise.
8190 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8191 arm_arch5e with arm_arch5t and arm_arch5te.
8192 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8193 (arm_arch5t, arm_arch5te): Declare.
8194 * config/arm/arm-tables.opt: Regenerate.
8195 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8196 * config/arm/t-multilib: Likewise.
8197 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8198 instead of arm_arch5.
8199 (*call_reg_thumb1): Likewise.
8200 (*call_value_reg_thumb1_v5): Likewise.
8201 (*call_value_reg_thumb1): Likewise.
8202 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8204 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8206 2018-05-18 Martin Liska <mliska@suse.cz>
8208 PR gcov-profile/84846
8209 * doc/gcov.texi: Document -t option of gcov tool.
8211 2018-05-18 Martin Liska <mliska@suse.cz>
8213 PR gcov-profile/84846
8214 * gcov.c (print_usage): Add new -t option.
8215 (process_args): Handle the option.
8216 (generate_results): Use stdout as output when requested by
8219 2018-05-18 Martin Liska <mliska@suse.cz>
8221 PR gcov-profile/84846
8222 * coverage.c (coverage_init): Write PWD to .gcno file.
8223 * doc/gcov.texi: Document how working directory is printed.
8224 * gcov-dump.c (dump_gcov_file): Print PWD.
8225 * gcov.c (output_intermediate_file): Likewise.
8226 (read_graph_file): Read PWD string.
8227 (output_lines): Print PWD.
8229 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8232 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8233 for retval and return false if all args to phi are zero.
8235 2018-05-18 Richard Biener <rguenther@suse.de>
8237 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8239 (evrp_dom_walker::before_dom_children): Call it.
8241 2018-05-18 Richard Biener <rguenther@suse.de>
8243 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8244 results when processing array refs with variable index.
8246 2018-05-18 Toon Moene <toon@moene.org>
8248 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8249 directly after that of -floop-interchange. Indicate that both
8250 options are enabled by default when specifying -O3.
8252 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8254 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8255 iterator. Delete separate integer-mode vec_set<mode> expander.
8256 (aarch64_simd_vec_setv2di): Delete.
8257 (vec_setv2di): Delete.
8258 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8259 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8260 the "w, r" alternative.
8262 2018-05-18 Martin Liska <mliska@suse.cz>
8264 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8265 * tree-pass.h (make_pass_lower_switch_O0): New function.
8266 * tree-switch-conversion.c (node_has_low_bound): Remove.
8267 (node_has_high_bound): Likewise.
8268 (node_is_bounded): Likewise.
8269 (class pass_lower_switch): Make it a template type and create
8271 (pass_lower_switch::execute): Add template argument.
8272 (make_pass_lower_switch): New function.
8273 (make_pass_lower_switch_O0): New function.
8274 (do_jump_if_equal): Remove.
8275 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8276 all the hard work to tree optimization passes.
8278 2018-05-18 Martin Liska <mliska@suse.cz>
8280 * dbgcnt.c (limit_low): Renamed from limit.
8281 (limit_high): New variable.
8282 (dbg_cnt_is_enabled): Check for upper limit.
8283 (dbg_cnt): Adjust dumping.
8284 (dbg_cnt_set_limit_by_index): Add new argument for high
8286 (dbg_cnt_set_limit_by_name): Likewise.
8287 (dbg_cnt_process_single_pair): Parse new format.
8288 (dbg_cnt_process_opt): Use strtok.
8289 (dbg_cnt_list_all_counters): Remove 'value' and add
8291 * doc/invoke.texi: Document changes.
8293 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8295 * doc/sourcebuild.texi (scalar_all_fma): Document.
8296 * tree.def (FMA_EXPR): Delete.
8297 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8298 * internal-fn.c (ternary_direct): New macro.
8299 (expand_ternary_optab_fn): Likewise.
8300 (direct_ternary_optab_supported_p): Likewise.
8301 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8302 * builtins.c (fold_builtin_fma): Delete.
8303 (fold_builtin_3): Don't call it.
8304 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8305 * expr.c (expand_expr_real_2): Likewise.
8306 * fold-const.c (operand_equal_p): Likewise.
8307 (fold_ternary_loc): Likewise.
8308 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8309 * gimple.c (DEFTREECODE): Likewise.
8310 * gimplify.c (gimplify_expr): Likewise.
8311 * optabs-tree.c (optab_for_tree_code): Likewise.
8312 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8313 * tree-eh.c (operation_could_trap_p): Likewise.
8314 (stmt_could_throw_1_p): Likewise.
8315 * tree-inline.c (estimate_operator_cost): Likewise.
8316 * tree-pretty-print.c (dump_generic_node): Likewise.
8317 (op_code_prio): Likewise.
8318 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8319 * tree-ssa-operands.c (get_expr_operands): Likewise.
8320 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8321 * fold-const-call.h (fold_fma): Delete.
8322 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8323 CFN_FNMA and CFN_FNMS.
8325 * genmatch.c (combined_fn): New enum.
8326 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8327 (commutative_op): New function.
8328 (commutate): Use it. Handle more than 2 operands.
8329 (dt_operand::gen_gimple_expr): Use commutative_op.
8330 (parser::parse_expr): Allow :c to be used with non-binary
8331 operators if the commutative operand is known.
8332 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8333 CFN_FMS, CFN_FNMA and CFN_FNMS.
8334 (backprop::process_assign_use): Remove FMA_EXPR handling.
8335 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8336 (gen_hsa_fma): New function.
8337 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8338 IFN_FNMA and IFN_FNMS.
8339 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8340 * gimple-fold.h (follow_all_ssa_edges): Declare.
8341 * gimple-fold.c (follow_all_ssa_edges): New function.
8342 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8343 gimple_build interface and use follow_all_ssa_edges to fold the result.
8344 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8345 instead of checking for optabs directly.
8346 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8347 rather than FMA_EXPRs.
8348 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8349 call to IFN_FMA instead of an FMA_EXPR.
8351 2018-05-17 Jim Wilson <jimw@sifive.com>
8353 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8354 sign extended promoted subreg, and the range does not have the sign bit
8355 set, then do a sign extend.
8357 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8358 test, check for sign extended subreg and/or constant operands, and
8359 do a sign extend in that case.
8361 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8363 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8364 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8366 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8367 Change logics_shift_reg to logics_shift_imm.
8368 (thunderx2t99_fp_loadpair_basic): Delete.
8369 (thunderx2t99_fp_storepair_basic): Delete.
8370 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8371 (thunderx2t99_asimd_polynomial): Delete.
8372 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8373 and neon_fp_mul_d_scalar_q.
8374 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8375 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8376 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8377 (thunderx2t99_asimd_lut): Add missing tbl types.
8378 (thunderx2t99_asimd_ext): Delete.
8379 (thunderx2t99_asimd_load1_1_mult): Delete.
8380 (thunderx2t99_asimd_load1_2_mult): Delete.
8381 (thunderx2t99_asimd_load1_ldp): New.
8382 (thunderx2t99_asimd_load1): New.
8383 (thunderx2t99_asimd_load2): Add missing *load2* types.
8384 (thunderx2t99_asimd_load3): New.
8385 (thunderx2t99_asimd_load4): New.
8386 (thunderx2t99_asimd_store1_1_mult): Delete.
8387 (thunderx2t99_asimd_store1_2_mult): Delete.
8388 (thunderx2t99_asimd_store2_mult): Delete.
8389 (thunderx2t99_asimd_store2_onelane): Delete.
8390 (thunderx2t99_asimd_store_stp): New.
8391 (thunderx2t99_asimd_store1): New.
8392 (thunderx2t99_asimd_store2): New.
8393 (thunderx2t99_asimd_store3): New.
8394 (thunderx2t99_asimd_store4): New.
8396 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8398 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8399 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8401 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8402 Segher Boessenkool <segher@kernel.crashing.org>
8405 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8408 2018-05-17 Richard Biener <rguenther@suse.de>
8410 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8411 for pruning loop and prune defs feeding only already visited PHIs.
8413 2018-05-17 Richard Biener <rguenther@suse.de>
8415 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8417 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8418 Richard Biener <rguenther@suse.de>
8420 PR tree-optimization/85793
8421 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8422 for VMAT_ELEMENTWISE.
8424 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8426 * internal-fn.h (lookup_internal_fn): Declare
8427 * internal-fn.c (lookup_internal_fn): New function.
8428 * gimple.c (gimple_build_call_from_tree): Handle calls to
8430 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8431 internal function names.
8432 * tree-pretty-print.c (dump_generic_node): Likewise.
8433 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8435 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8437 * gimple-fold.h (gimple_build): Make the function forms take
8438 combined_fn rather than built_in_function.
8439 (gimple_simplify): Likewise.
8440 * gimple-match-head.c (gimple_simplify): Likewise.
8441 * gimple-fold.c (gimple_build): Likewise.
8442 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8443 rather than gimple_build_call_internal.
8444 (get_initial_defs_for_reduction): Likewise.
8445 (vect_create_epilog_for_reduction): Likewise.
8446 (vectorizable_live_operation): Likewise.
8448 2018-05-17 Martin Liska <mliska@suse.cz>
8450 * gimple-ssa-sprintf.c (format_directive): Do not use
8451 space in between 'G_' and '('.
8453 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8456 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8457 even if the mask is not all ones.
8460 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8462 (ix86_gimple_fold_builtin): Likewise.
8465 * config/i386/i386.c: Include tree-vector-builder.h.
8466 (ix86_vector_shift_count): New function.
8467 (ix86_fold_builtin): Fold shift builtins by scalar count.
8468 (ix86_gimple_fold_builtin): Likewise.
8470 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8471 _mm512_setzero): New intrinsics.
8473 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8474 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8476 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8477 code generation for cases where splatting a value is not useful.
8478 * simplify-rtx.c (simplify_ternary_operation): Simplify
8479 vec_merge across a vec_duplicate and a paradoxical subreg forming
8480 a vector mode to a vec_concat.
8482 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8484 * config.gcc: Support "goldmont-plus".
8485 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8487 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8488 PROCESSOR_GOLDMONT_PLUS.
8489 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8490 (processor_target_table): Add "goldmont-plus".
8491 (PTA_GOLDMONT_PLUS): Define.
8492 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8493 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8494 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8495 (fold_builtin_cpu): Add "goldmont-plus".
8496 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8497 (ix86_option_override_internal): Add "goldmont-plus".
8498 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8499 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8500 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8501 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8503 2018-05-17 Richard Biener <rguenther@suse.de>
8505 PR tree-optimization/85757
8506 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8507 remove defs that only feed that PHI from further processing.
8509 2018-05-16 Jim Wilson <jimw@sifive.com>
8511 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8513 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8515 2018-05-16 Mark Wielaard <mark@klomp.org>
8517 * dwarf2out.c (count_index_strings): New function.
8518 (output_indirect_strings): Call count_index_strings and generate
8519 header for dwarf_version >= 5.
8521 2018-05-16 Mark Wielaard <mark@klomp.org>
8523 * dwarf2out.c (dwarf_FORM): New function.
8524 (set_indirect_string): Use dwarf_FORM.
8525 (reset_indirect_string): Likewise.
8526 (size_of_die): Likewise.
8527 (value_format): Likewise.
8528 (output_die): Likewise.
8529 (add_skeleton_AT_string): Likewise.
8530 (output_macinfo_op): Likewise.
8531 (index_string): Likewise.
8532 (output_index_string_offset): Likewise.
8533 (output_index_string): Likewise.
8534 (count_index_strings): Likewise.
8536 2018-05-16 Carl Love <cel@us.ibm.com>
8538 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8539 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8541 2018-05-16 Martin Jambor <mjambor@suse.cz>
8543 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8544 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8546 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8548 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8549 (fnma<mode>4): Likewise.
8550 (fms<mode>4): Likewise.
8551 (fnms<mode>4): Likewise.
8552 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8553 (aarch64_fnma<mode>4): Likewise.
8554 (aarch64_fms<mode>4): Likewise.
8555 (aarch64_fnms<mode>4): Likewise.
8556 (aarch64_fnmadd<mode>4): Likewise.
8558 2018-05-16 Jason Merrill <jason@redhat.com>
8560 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8562 2018-05-16 Richard Biener <rguenther@suse.de>
8564 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8565 (dump_stmt_cost): Declare.
8566 (add_stmt_cost): Dump cost we add.
8567 (add_stmt_costs): New function.
8568 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8570 (vect_analyze_stmt): Adjust prototype.
8571 (vectorizable_condition): Likewise.
8572 (vectorizable_live_operation): Likewise.
8573 (vectorizable_reduction): Likewise.
8574 (vectorizable_induction): Likewise.
8575 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8576 cost vector to pass to vectorizable_ and record afterwards.
8577 (vect_model_reduction_cost): Take cost vector argument and adjust.
8578 (vect_model_induction_cost): Likewise.
8579 (vectorizable_reduction): Likewise.
8580 (vectorizable_induction): Likewise.
8581 (vectorizable_live_operation): Likewise.
8582 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8583 SLP_TREE_NUMBER_OF_VEC_STMTS.
8584 (vect_analyze_slp_cost_1): Remove.
8585 (vect_analyze_slp_cost): Likewise.
8586 (vect_slp_analyze_node_operations): Take visited args and
8587 a target cost vector. Avoid processing already visited stmt sets.
8588 (vect_slp_analyze_operations): Use a local cost vector to gather
8589 costs and register those of non-discarded instances.
8590 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8591 (vect_schedule_slp_instance): Remove copying of
8592 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8594 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8595 adding cost. Record cost entry location.
8596 (vect_prologue_cost_for_slp_op): Function to compute cost of
8597 a constant or invariant generated for SLP vect in the prologue,
8598 split out from vect_analyze_slp_cost_1.
8599 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8600 (vect_model_promotion_demotion_cost): Likewise.
8601 (vect_model_store_cost): Likewise, make static.
8602 (vect_model_load_cost): Likewise.
8603 (vectorizable_bswap): Add cost vector arg and adjust.
8604 (vectorizable_call): Likewise.
8605 (vectorizable_simd_clone_call): Likewise.
8606 (vectorizable_conversion): Likewise.
8607 (vectorizable_assignment): Likewise.
8608 (vectorizable_shift): Likewise.
8609 (vectorizable_operation): Likewise.
8610 (vectorizable_store): Likewise.
8611 (vectorizable_load): Likewise.
8612 (vectorizable_condition): Likewise.
8613 (vectorizable_comparison): Likewise.
8614 (can_vectorize_live_stmts): Likewise.
8615 (vect_analyze_stmt): Likewise.
8616 (vect_transform_stmt): Adjust calls to vectorizable_*.
8617 * tree-vectorizer.c: Include gimple-pretty-print.h.
8618 (dump_stmt_cost): New function.
8620 2018-05-16 Richard Biener <rguenther@suse.de>
8622 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8623 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8624 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8625 (check_name): New callback.
8626 (dse_classify_store): Track cycles via a visited bitmap of PHI
8627 defs and simplify handling of in-loop and across loop dead stores
8628 and properly fail for loop-variant refs. Handle byte-tracking with
8629 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8632 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8634 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8635 (vect_get_mask_type_for_stmt): Likewise.
8636 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8638 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8639 to determine the statement's vector type and the vector type that
8640 should be used for calculating nunits. Deal with cases in which
8641 the type has to be deferred.
8642 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8643 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8644 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8645 (vect_determine_vf_for_stmt): New functions, split out from...
8646 (vect_determine_vectorization_factor): ...here.
8647 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8648 (vect_get_mask_type_for_stmt): New functions, split out from
8649 vect_determine_vectorization_factor.
8651 2018-05-16 Richard Biener <rguenther@suse.de>
8653 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8654 verify the [VEC_]COND_EXPR embedded comparison.
8656 2018-05-15 Martin Sebor <msebor@redhat.com>
8658 PR tree-optimization/85753
8659 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8660 RECORD_TYPE in addition to ARRAY_TYPE.
8662 2018-05-15 Martin Sebor <msebor@redhat.com>
8665 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8667 2018-05-15 Richard Biener <rguenther@suse.de>
8669 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8670 add by_clobber_p one. Change algorithm to collect all defs
8671 representing uses we need to walk and try reducing them to
8672 a single one before failing.
8673 (dse_dom_walker::dse_optimize_stmt): Adjust.
8675 2018-05-13 Mark Wielaard <mark@klomp.org>
8677 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8678 (size_of_loc_descr): Likewise.
8679 (output_loc_operands): Likewise.
8680 (output_loc_operands_raw): Likewise.
8681 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8682 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8683 (hash_loc_operands): Likewise.
8684 (compare_loc_operands): Likewise.
8686 2018-05-14 Mark Wielaard <mark@klomp.org>
8688 * dwarf2out.c (count_index_addrs): New function.
8689 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8691 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8693 PR tree-optimization/83648
8694 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8695 return value as malloc candidate.
8697 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8700 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8701 param as true in call to suggest_attribute.
8703 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8705 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8706 -mreadonly-in-sdata.
8708 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8710 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8712 (aarch64_crypto_aesd_fused): Likewise.
8714 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8716 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8717 (movsi_aarch64): Likewise.
8718 (load_pairsi): Likewise.
8719 (load_pairdi): Likewise.
8720 (store_pairsi): Likewise.
8721 (store_pairdi): Likewise.
8722 (load_pairsf): Likewise.
8723 (load_pairdf): Likewise.
8724 (store_pairsf): Likewise.
8725 (store_pairdf): Likewise.
8726 (zero_extend): Likewise.
8727 (trunc): Swap alternatives.
8728 (fcvt_target): Add '?' to prefer w over r.
8730 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8733 * config/i386/i386.md: Disallow non-commutative arithmetics in
8734 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8735 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8736 in the peephole2 before it.
8738 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8740 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8741 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8742 (ix86_handle_option): Handle -mcldemote.
8743 * config.gcc: New header.
8744 * config/i386/cldemoteintrin.h: New file.
8745 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8746 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8748 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8749 OPTION_MASK_ISA_CLDEMOTE.
8750 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8751 (ix86_valid_target_attribute_inner_p): Ditto.
8752 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8753 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8754 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8755 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8756 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8758 * config/i386/i386.opt: Add -mcldemote.
8759 * config/i386/x86intrin.h: New header.
8760 * doc/invoke.texi: Add -mcldemote.
8762 2018-05-14 Richard Biener <rguenther@suse.de>
8764 * doc/match-and-simplify.texi: Adjust :s documentation.
8766 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8768 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8769 intended memcpy size.
8770 (REORDER_45): Likewise.
8772 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8774 * sort.cc: New file.
8775 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8776 * vec.c (qsort_chk): Use gcc_qsort.
8777 * Makefile.in (OBJS-libcommon): Add sort.o.
8778 (build/sort.o): New target. Use it...
8779 (BUILD_RTL): ... here, and...
8780 (build/gencfn-macros): ... here, and...
8781 (build/genmatch): ... here.
8783 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8784 Chung-Ju Wu <jasonwucj@gmail.com>
8786 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8787 * config/nds32/nds32-graywolf.md: New file.
8788 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8789 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8791 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8792 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8793 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8794 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8795 * config/nds32/pipelines.md: Include n15 settings.
8797 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8798 Chung-Ju Wu <jasonwucj@gmail.com>
8800 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8801 * config/nds32/nds32-n13.md: New file.
8802 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8803 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8805 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8806 * config/nds32/nds32.md (pipeline_model): Add n13.
8807 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8808 * config/nds32/pipelines.md: Include n13 settings.
8810 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8811 Chung-Ju Wu <jasonwucj@gmail.com>
8813 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8814 * config/nds32/nds32-n10.md: New file.
8815 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8816 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8818 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8819 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8820 * config/nds32/nds32.md (pipeline_model): Add n10.
8821 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8822 * config/nds32/pipelines.md: Include n10 settings.
8824 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
8825 Kito Cheng <kito.cheng@gmail.com>
8826 Chung-Ju Wu <jasonwucj@gmail.com>
8828 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8829 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8830 Add enum values for DSP extension instructions.
8831 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8833 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8834 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8836 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8837 * config/nds32/nds32-dspext.md: New file for DSP implementation.
8838 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8839 * config/nds32/nds32-intrinsic.md: Likewise.
8840 * config/nds32/nds32_intrinsic.h: Likewise.
8841 * config/nds32/nds32-md-auxiliary.c: Likewise.
8842 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8843 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8844 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8845 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8846 * config/nds32/nds32-protos.h: New declarations for DSP extension.
8847 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8848 TYPE_DMAC in switch statement.
8849 * config/nds32/nds32.c: New checking and implementation for DSP
8850 extension instructions.
8851 * config/nds32/nds32.h: Likewise.
8852 * config/nds32/nds32.md: Likewise.
8853 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8854 * config/nds32/predicates.md: Implement new predicates for DSP
8857 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8859 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8860 Reformat alternatives and attributes so it is easier to identify
8861 which constraints/attributes go with which instruction.
8862 (mov<mode>_hardfloat32, FMOVE64): Likewise.
8863 (mov<mode>_softfloat32, FMOVE64): Likewise.
8864 (mov<mode>_hardfloat64, FMOVE64): Likewise.
8865 (mov<mode>_softfloat64, FMOVE64): Likewise.
8867 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
8869 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8871 (Basic PowerPC Built-in Functions): The new name of the
8872 subsection previously known as "PowerPC Built-in Functions".
8873 (Basic PowerPC Built-in Functions Available on all Configurations):
8875 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8876 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8877 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8878 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8880 2018-05-11 Martin Jambor <mjambor@suse.cz>
8883 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8886 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8889 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8891 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8893 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8894 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8895 (ix86_handle_option): Handle -mwaitpkg.
8896 * config.gcc: New header.
8897 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8898 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8899 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8901 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8902 OPTION_MASK_ISA_WAITPKG.
8903 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8904 (ix86_option_override_internal): Add PTA_WAITPKG.
8905 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8906 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8907 IX86_BUILTIN_TPAUSE.
8908 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8909 __builtin_ia32_umwait and __builtin_ia32_tpause.
8910 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8911 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8912 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8913 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8914 UNSPECV_TPAUSE): New.
8915 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8916 * config/i386/i386.opt: Add -mwaitpkg.
8917 * config/i386/waitpkgintrin.h: New file.
8918 * config/i386/x86intrin.h: New header.
8919 * doc/invoke.texi: Add -mwaitpkg.
8921 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8924 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8926 (cortex-m0): Use armv6s-m isa.
8927 (cortex-m0plus): Likewise.
8928 (cortex-m1): Likewise.
8929 (cortex-m0.small-multiply): Likewise.
8930 (cortex-m0plus.small-multiply): Likewise.
8931 (cortex-m1.small-multiply): Likewise.
8933 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8934 Jakub Jelinek <jakub@redhat.com>
8936 PR tree-optimization/85692
8937 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8938 source permute as well.
8940 2018-05-11 Martin Liska <mliska@suse.cz>
8943 * doc/extend.texi: Document LLVM style format for no_sanitize
8946 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8948 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8949 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8950 (mode_supports_vsx_dform_quad): Likewise.
8951 (mode_supports_vmx_dform): Move these functions to be next to the
8952 other mode_supports functions.
8953 (mode_supports_dq_form): Likewise.
8954 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8955 mode_supports_dq_form.
8956 (reg_offset_addressing_ok_p): Likewise.
8957 (offsettable_ok_by_alignment): Likewise.
8958 (rs6000_legitimate_offset_address_p): Likewise.
8959 (legitimate_lo_sum_address_p): Likewise.
8960 (rs6000_legitimize_address): Likewise.
8961 (rs6000_legitimize_reload_address): Likewise.
8962 (rs6000_secondary_reload_inner): Likewise.
8963 (rs6000_preferred_reload_class): Likewise.
8964 (rs6000_output_move_128bit): Likewise.
8966 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8968 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8969 Generate SImode target register for null target.
8970 <case IX86_BUILTIN_XGETBV>: Ditto.
8971 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8972 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8974 2018-05-10 Carl Love <cel@us.ibm.com>
8976 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8977 dcbtt and dcbtstt if operands[2] is 0.
8979 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8982 * config/i386/sse.md (usadv64qi): New expander.
8984 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8986 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8987 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8988 -maltivec=be support.
8989 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8990 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8991 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8992 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8993 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8994 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8995 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8996 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8997 altivec_vsumsws): Adjust.
8998 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8999 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9000 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9002 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9003 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9004 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9005 (altivec_lve<VI_char>x): Delete expand.
9006 (*altivec_lve<VI_char>x_internal): Rename to...
9007 (altivec_lve<VI_char>x): ... this.
9008 (altivec_lvxl_<mode>): Delete expand.
9009 (*altivec_lvxl_<mode>_internal): Rename to ...
9010 (altivec_lvxl_<mode>): ... this.
9011 (altivec_stvxl_<mode>): Delete expand.
9012 (*altivec_stvxl_<mode>_internal): Rename to ...
9013 (altivec_stvxl_<mode>): ... this.
9014 (altivec_stve<VI_char>x): Delete expand.
9015 (*altivec_stve<VI_char>x_internal): Rename to ...
9016 (altivec_stve<VI_char>x): ... this.
9017 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9018 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9019 reduc_plus_scal_<mode>): Adjust.
9020 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9022 (rs6000_cpu_cpp_builtins): Adjust.
9023 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9024 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9025 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9026 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9027 -maltivec=be support.
9028 (rs6000_split_vec_extract_var): Adjust.
9029 (rs6000_split_v4si_init): Adjust.
9030 (swap_selector_for_mode): Delete.
9031 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9032 altivec_expand_stvex_be): Delete.
9033 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9034 -maltivec=be support.
9035 (rs6000_gimple_fold_builtin): Ditto.
9036 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9038 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9039 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9040 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9041 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9042 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9043 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9044 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9045 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9046 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9047 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9048 anonymous split): Adjust.
9049 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9050 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9052 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9054 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9055 when --with-gxx-include-dir is also specified.
9056 * configure: Regenerate.
9058 2018-05-09 Jim Wilson <jimw@sifive.com>
9061 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9062 * config/riscv/t-withmultilib: New.
9063 * config/riscv/withmultilib.h: New.
9064 * doc/install.texi: Document RISC-V --with-multilib-list support.
9066 2018-05-09 Richard Biener <rguenther@suse.de>
9068 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9070 (vect_bb_vectorization_profitable_p): Adjust. Compute
9071 actual scalar cost using the cost vector and the add_stmt_cost
9074 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9076 PR rtl-optimization/85645
9077 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9078 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9080 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9082 PR rtl-optimization/85645
9083 * shrink-wrap.c (spread_components): Return a boolean saying if
9084 anything was changed.
9085 (try_shrink_wrapping_separate): Iterate spread_components until
9086 nothing changes anymore.
9088 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9090 PR rtl-optimization/85645
9091 * regrename.c (build_def_use): Also kill the chains that include the
9092 destination of a REG_CFA_REGISTER note.
9094 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9096 PR rtl-optimization/85645
9097 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9098 insn that has a REG_CFA_REGISTER note.
9100 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9102 * cfgexpand.c (expand_clobber): New function.
9103 (expand_gimple_stmt_1): Use it.
9104 * tree-vect-stmts.c (vect_clobber_variable): New function,
9106 (vectorizable_simd_clone_call): ...here.
9107 (vectorizable_store): Emit a clobber either side of an
9108 IFN_STORE_LANES sequence.
9109 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9111 2018-05-09 Tom de Vries <tom@codesourcery.com>
9114 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9115 (define_insn "trap_if_false"): Add exit after trap.
9117 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9119 PR rtl-optimization/85638
9120 * bb-reorder.c: Include common/common-target.h.
9121 (create_forwarder_block): New function extracted from...
9122 (fix_up_crossing_landing_pad): ...here. Rename into...
9123 (dw2_fix_up_crossing_landing_pad): ...this.
9124 (sjlj_fix_up_crossing_landing_pad): New function.
9125 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9126 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9127 from both partitions and exit the loop after one iteration.
9129 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9132 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9134 (Basic PowerPC Built-in Functions): The new name of the
9135 subsection previously known as "PowerPC Built-in Functions".
9136 (Basic PowerPC Built-in Functions Available on all Configurations):
9138 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9140 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9142 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9144 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9147 2018-05-08 Jim Wilson <jimw@sifive.com>
9149 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9150 (LD_EMUL_SUFFIX): New.
9151 (LINK_SPEC): Use it.
9153 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9155 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9157 (Basic PowerPC Built-in Functions): The new name of the
9158 subsection previously known as "PowerPC Built-in Functions".
9159 (Basic PowerPC Built-in Functions Available on all Configurations):
9161 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9163 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9165 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9167 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9170 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9173 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9174 after cmpelim optimization.
9176 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9178 * config.gcc: Support "goldmont".
9179 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9180 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9182 * config/i386/i386.c (m_GOLDMONT): Define.
9183 (processor_target_table): Add "goldmont".
9184 (PTA_GOLDMONT): Define.
9185 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9186 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9187 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9188 (fold_builtin_cpu): Add "goldmont".
9189 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9190 (ix86_option_override_internal): Add "goldmont".
9191 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9192 (processor_type): Add PROCESSOR_GOLDMONT.
9193 * config/i386/i386.md: Add CPU "glm".
9194 * config/i386/glm.md: New file.
9195 * config/i386/x86-tune.def: Add m_GOLDMONT.
9196 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9198 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9201 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9203 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9204 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9205 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9208 * config/i386/i386.c (ix86_fold_builtin): Handle
9209 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9212 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9213 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9215 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9218 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9219 (check_arch): Likewise.
9220 (check_fpu): Return the result rather than printing it.
9221 (end arch): Fix operator precedence.
9222 (end cpu): Likewise.
9223 (END): Print the result from check_fpu.
9225 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9226 Alan Hayward <alan.hayward@arm.com>
9227 David Sherwood <david.sherwood@arm.com>
9229 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9230 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9231 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9232 (*fcmuo<mode>_and): New patterns.
9234 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9236 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9237 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9238 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9239 (cmp_op, sve_imm_con): New code attributes.
9240 (SVE_COND_INT_CMP, imm_con): Delete.
9241 (cmp_op): Remove above unspecs from int attribute.
9242 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9244 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9245 comparison-specific unspecs.
9246 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9247 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9248 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9249 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9250 (*vec_fcm<cmp_op><mode>): Rename to...
9251 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9252 (*vec_fcmuo<mode>): Rename to...
9253 (*fcmuo<mode>): ...this and adjust likewise.
9254 (*pred_fcm<cmp_op><mode>): New pattern.
9255 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9256 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9258 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9260 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9261 (aarch64_emit_sve_predicated_cond): New function.
9262 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9263 (aarch64_emit_unspec_cond_or): Replace with...
9264 (aarch64_emit_sve_or_conds): ...this new function. Use
9265 aarch64_emit_sve_ptrue_op for the individual comparisons and
9266 aarch64_emit_binop to OR them together.
9267 (aarch64_emit_inverted_unspec_cond): Replace with...
9268 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9269 aarch64_emit_sve_ptrue_op for the comparison and
9270 aarch64_emit_unop to invert the result.
9271 (aarch64_expand_sve_vec_cmp_float): Update after the above
9272 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9274 2018-05-07 Nathan Sidwell <nathan@acm.org>
9276 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9277 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9278 (Backwards Compatibility): Likewise.
9280 2018-05-07 Luis Machado <luis.machado@linaro.org>
9284 2018-05-07 Luis Machado <luis.machado@linaro.org>
9286 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9287 <prefetch_dynamic_strides>: New const bool field.
9288 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9289 prefetch_dynamic_strides.
9290 (exynosm1_prefetch_tune): Likewise.
9291 (thunderxt88_prefetch_tune): Likewise.
9292 (thunderx_prefetch_tune): Likewise.
9293 (thunderx2t99_prefetch_tune): Likewise.
9294 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9296 (aarch64_override_options_internal): Update to set
9297 PARAM_PREFETCH_DYNAMIC_STRIDES.
9298 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9299 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9300 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9301 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9302 prefetch-dynamic-strides setting.
9304 2018-05-07 Luis Machado <luis.machado@linaro.org>
9306 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9307 <minimum_stride>: New const int field.
9308 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9309 minimum_stride field.
9310 (exynosm1_prefetch_tune): Likewise.
9311 (thunderxt88_prefetch_tune): Likewise.
9312 (thunderx_prefetch_tune): Likewise.
9313 (thunderx2t99_prefetch_tune): Likewise.
9314 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9315 (aarch64_override_options_internal): Update to set
9316 PARAM_PREFETCH_MINIMUM_STRIDE.
9317 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9318 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9319 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9320 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9321 stride is constant and is below the minimum stride threshold.
9323 2018-05-07 Luis Machado <luis.machado@linaro.org>
9325 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9328 2018-05-07 Luis Machado <luis.machado@linaro.org>
9330 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9331 <prefetch_dynamic_strides>: New const bool field.
9332 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9333 prefetch_dynamic_strides.
9334 (exynosm1_prefetch_tune): Likewise.
9335 (thunderxt88_prefetch_tune): Likewise.
9336 (thunderx_prefetch_tune): Likewise.
9337 (thunderx2t99_prefetch_tune): Likewise.
9338 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9340 (aarch64_override_options_internal): Update to set
9341 PARAM_PREFETCH_DYNAMIC_STRIDES.
9342 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9343 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9344 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9345 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9346 prefetch-dynamic-strides setting.
9348 2018-05-07 Luis Machado <luis.machado@linaro.org>
9350 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9351 <minimum_stride>: New const int field.
9352 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9353 minimum_stride field.
9354 (exynosm1_prefetch_tune): Likewise.
9355 (thunderxt88_prefetch_tune): Likewise.
9356 (thunderx_prefetch_tune): Likewise.
9357 (thunderx2t99_prefetch_tune): Likewise.
9358 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9359 (aarch64_override_options_internal): Update to set
9360 PARAM_PREFETCH_MINIMUM_STRIDE.
9361 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9362 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9363 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9364 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9365 stride is constant and is below the minimum stride threshold.
9367 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9370 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9371 the type is addressable. Don't force op into register if it has
9374 2018-05-05 Roland McGrath <mcgrathr@google.com>
9377 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9378 any section for which we don't know a specific type it should have,
9379 regardless of name. Previously this was done only for the exact
9380 names ".init_array", ".fini_array", and ".preinit_array".
9381 (default_elf_asm_named_section): Add comment about
9382 relationship with default_section_type_flags and SECTION_NOTYPE.
9383 (get_section): Don't consider it a type conflict if one side has
9384 SECTION_NOTYPE and the other doesn't, as long as neither has the
9385 SECTION_BSS et al used in the default_section_type_flags logic.
9387 2018-05-05 Tom de Vries <tom@codesourcery.com>
9390 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9391 (workaround_barsyncs): New function.
9392 (nvptx_reorg): Use workaround_barsyncs.
9393 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9394 (define_expand "nvptx_membar_cta"): New define_expand.
9395 (define_insn "*nvptx_membar_cta"): New insn.
9397 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9399 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9400 To improve optimization opportunities.
9401 * builtin-types.def: The new needed builtin types for the above.
9403 2018-05-04 Richard Biener <rguenther@suse.de>
9405 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9406 * gimple-ssa-store-merging.c
9407 (imm_store_chain_info::output_merged_store): Remove redundant create,
9408 release split_store vector contents on failure.
9409 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9410 scalar stmt vector on cache hit.
9412 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9414 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9416 * config.gcc (powerpc-xilinx-eabi*): Remove.
9417 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9419 (fusion_addis_mem_combo_load): Ditto.
9420 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9422 (rs6000_cpu_cpp_builtins): Ditto.
9423 * config/rs6000/rs6000-linux.c
9424 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9425 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9426 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9428 (rs6000_setup_reg_addr_masks): Ditto.
9429 (rs6000_init_hard_regno_mode_ok): Ditto.
9430 (rs6000_option_override_internal): Ditto.
9431 (legitimate_lo_sum_address_p): Ditto.
9432 (rs6000_legitimize_address): Ditto.
9433 (rs6000_legitimize_reload_address): Ditto.
9434 (rs6000_legitimate_address_p): Ditto.
9435 (abi_v4_pass_in_fpr): Ditto.
9436 (setup_incoming_varargs): Ditto.
9437 (rs6000_gimplify_va_arg): Ditto.
9438 (rs6000_split_multireg_move): Ditto.
9439 (rs6000_savres_strategy): Ditto.
9440 (rs6000_emit_prologue_components): Ditto.
9441 (rs6000_emit_epilogue_components): Ditto.
9442 (rs6000_emit_prologue): Ditto.
9443 (rs6000_emit_epilogue): Ditto.
9444 (rs6000_elf_file_end): Ditto.
9445 (rs6000_function_value): Ditto.
9446 (rs6000_libcall_value): Ditto.
9447 * config/rs6000/rs6000.h: Ditto.
9448 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9449 (TARGET_MINMAX): ... this. New.
9450 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9451 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9452 (*movsi_internal1_single): Delete.
9453 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9454 mfpu=, mxilinx-fpu): Delete.
9455 * config/rs6000/singlefp.h: Delete.
9456 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9457 * config/rs6000/t-rs6000: Ditto.
9458 * config/rs6000/t-xilinx: Delete.
9459 * config/rs6000/titan.md: Adjust for fp_type removal.
9460 * config/rs6000/vsx.md: Remove Xilinx FP support.
9461 (VStype_simple): Delete.
9462 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9463 * config/rs6000/xfpu.h: Delete.
9464 * config/rs6000/xfpu.md: Delete.
9465 * config/rs6000/xilinx.h: Delete.
9466 * config/rs6000/xilinx.opt: Delete.
9467 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9468 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9470 2018-05-04 Tom de Vries <tom@codesourcery.com>
9473 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9476 2018-05-04 Richard Biener <rguenther@suse.de>
9479 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9480 (expand_complex_div_wide): Likewise.
9481 (expand_complex_operations_1): Likewise.
9482 (expand_complex_libcall): Preserve EH info of the original stmt.
9483 (tree_lower_complex): Handle removed blocks.
9484 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9485 on complex multiplication and division libcall builtins.
9487 2018-05-04 Richard Biener <rguenther@suse.de>
9490 * fold-const.c (negate_expr_p): Restrict negation of operand
9491 zero of a division to when we know that can happen without
9493 (fold_negate_expr_1): Likewise.
9495 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9498 * real.h (real_nextafter): Declare.
9499 * real.c (real_nextafter): New function.
9500 * fold-const-call.c (fold_const_nextafter): New function.
9501 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9502 CASE_CFN_NEXTTOWARD.
9503 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9504 even when arg1_mode is different from arg0_mode.
9506 2018-05-03 Nathan Sidwell <nathan@acm.org>
9508 * doc/extend.texi (Deprecated Features): Remove
9510 (Backwards Compatibility): Likewise.
9511 * doc/invoke.texi (C++ Language Options): Likewise.
9512 (C++ Dialect Options): Likewise.
9514 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9517 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9518 _mm512_mask_mullox_epi64): New intrinsics.
9520 2018-05-03 Tom de Vries <tom@codesourcery.com>
9523 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9524 dump files): Add offload-tree.
9526 2018-05-03 Richard Biener <rguenther@suse.de>
9528 PR tree-optimization/85615
9529 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9530 to loops not nested in BBs loop father to avoid creating multi-entry
9533 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9535 PR tree-optimization/70291
9536 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9537 arguments. Change return type to tree. Emit libcall as a new
9538 statement rather than replacing existing one when inplace_p is true.
9539 (expand_complex_multiplication_components): New function.
9540 (expand_complex_multiplication): Expand floating-point complex
9541 multiplication using the above.
9542 (expand_complex_division): Rename inner_type parameter to type.
9543 Update expand_complex_libcall call-site.
9544 (expand_complex_operations_1): Update expand_complex_multiplication
9545 and expand_complex_division call-sites.
9547 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9550 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9551 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9552 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9553 the highest significant bit of the shift count mask is clear. In
9554 check whether and[sq]i3 is needed verify that all significant bits
9555 of the shift count other than the highest are set.
9557 2018-05-02 Tom de Vries <tom@codesourcery.com>
9560 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9561 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9562 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9563 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9564 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9565 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9566 __builtin_goacc_parlevel_size.
9568 2018-05-02 Richard Biener <rguenther@suse.de>
9570 PR tree-optimization/85597
9571 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9572 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9575 2018-05-02 Tom de Vries <tom@codesourcery.com>
9578 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9579 dump files): Add ltrans-tree.
9581 2018-05-02 Tom de Vries <tom@codesourcery.com>
9584 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9585 dump files): Add wpa-ipa.
9587 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9589 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9590 powerpc*-*-linux*paired* target.
9591 * config/rs6000/750cl.h: Delete.
9592 * config/rs6000/paired.h: Delete.
9593 * config/rs6000/paired.md: Delete.
9594 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9596 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9597 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9598 comment. Remove paired float support.
9599 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9600 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9602 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9603 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9605 * config/rs6000/rs6000.c: Remove paired float support.
9606 (paired_expand_vector_init, paired_expand_vector_move,
9607 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9608 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9609 paired_expand_builtin, paired_expand_predicate_builtin,
9610 paired_init_builtins): Delete.
9611 * config/rs6000/rs6000.h: Remove paired float support.
9612 * config/rs6000/rs6000.md: Remove paired float support.
9613 (move_from_CR_ov_bit): Delete.
9614 * config/rs6000/rs6000.opt (mpaired): Delete.
9615 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9616 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9618 2018-05-02 Richard Biener <rguenther@suse.de>
9621 * gimplify.c (gimplify_save_expr): When in SSA form allow
9622 SAVE_EXPRs to compute to SSA vars.
9624 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9627 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9628 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9629 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9630 clobber operands[2], instead use a new pseudo. Formatting fixes.
9632 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9634 PR tree-optimization/85586
9635 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9636 exit early for statements in the same group if the accesses are
9639 2018-05-02 Tom de Vries <tom@codesourcery.com>
9642 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9645 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9647 PR tree-optimization/85143
9648 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9650 2018-05-01 Tom de Vries <tom@codesourcery.com>
9653 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9654 not found" error message.
9656 2018-05-01 Tom de Vries <tom@codesourcery.com>
9659 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9660 * vec.c (test_ordered_remove_if): New function.
9661 (vec_c_tests): Call test_ordered_remove_if.
9662 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9663 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9664 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9665 VEC_ORDERED_REMOVE_IF.
9667 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9669 PR tree-optimization/82665
9670 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9671 pointer subtraction where arguments come from a memchr call.
9673 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9675 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9676 --push-state --as-needed and --pop-state instead of --as-needed and
9677 --no-as-needed if ld supports it.
9678 * configure: Regenerated.
9681 * doc/install.texi2html: Replace _002d with - and _002a with * in
9682 generated html files using sed.
9684 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9687 * gcc-rich-location.c (blank_line_before_p): New function.
9688 (use_new_line): New function.
9689 (gcc_rich_location::add_fixit_insert_formatted): New function.
9690 * gcc-rich-location.h
9691 (gcc_rich_location::add_fixit_insert_formatted): New function.
9693 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9695 * selftest.c (assert_streq): Rename "expected" and "actual" to
9696 "val1" and "val2". Extend NULL-handling to cover both inputs
9697 symmetrically, while still requiring both to be non-NULL for a pass.
9698 * selftest.h (assert_streq): Rename "expected" and "actual" to
9700 (ASSERT_EQ): Likewise.
9701 (ASSERT_EQ_AT): Likewise.
9702 (ASSERT_KNOWN_EQ): Likewise.
9703 (ASSERT_KNOWN_EQ_AT): Likewise.
9704 (ASSERT_NE): Likewise.
9705 (ASSERT_MAYBE_NE): Likewise.
9706 (ASSERT_MAYBE_NE_AT): Likewise.
9707 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9708 the assertion to pass.
9709 (ASSERT_STREQ_AT): Likewise.
9711 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9713 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9714 interaction with -pie.
9716 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9718 * selftest.h: Fix alphabetization of per-source-file selftest
9721 2018-04-30 Jason Merrill <jason@redhat.com>
9723 PR c++/61982 - dead stores to destroyed objects.
9724 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9727 2018-04-30 Jason Merrill <jason@redhat.com>
9729 * tree.c (build_clobber): New.
9730 * tree.h: Declare it.
9731 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9733 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9735 * diagnostic-show-locus.c (layout::layout): Update for
9736 location_get_source_line returning a char_span.
9737 (struct char_span): Move to input.h.
9738 (struct correction): Update for fields in char_span becoming
9740 (struct source_line): Update for location_get_source_line
9741 returning a char_span.
9742 (layout::print_line): Likewise.
9743 * edit-context.c (edited_file::print_content): Likewise.
9744 (edited_file::print_diff_hunk): Likewise.
9745 (edited_file::print_run_of_changed_lines): Likewise.
9746 (edited_file::get_num_lines): Likewise.
9747 (edited_line::edited_line): Likewise.
9748 * final.c (asm_show_source): Likewise.
9749 * input.c (location_get_source_line): Convert return type
9750 from const char * to char_span, losing the final "line_len"
9752 (dump_location_info): Update for the above.
9753 (get_substring_ranges_for_loc): Likewise. Use a char_span
9754 when handling the literal within the line.
9755 (test_reading_source_line): Update for location_get_source_line
9756 returning a char_span.
9757 * input.h (class char_span): Move here from
9758 diagnostic-show-locus.c, converting from a struct to a class.
9759 Make data members private.
9760 (char_span::operator bool): New.
9761 (char_span::length): New.
9762 (char_span::get_buffer): New.
9763 (char_span::operator[]): New.
9764 (char_span::subspan): Make const.
9765 (char_span::xstrdup): New.
9766 (location_get_source_line): Convert return type from const char *
9767 to char_span, losing the final "line_size" param.
9769 2018-04-30 Jan Hubicka <jh@suse.cz>
9771 * lto-wrapper.c (ltrans_priorities): New static var.
9772 (cmp_priority): New.
9773 (run_gcc): Read priorities and if doing parallel build order
9774 the Makefile by them.
9776 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9778 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9780 2018-04-30 Richard Biener <rguenther@suse.de>
9782 * tree-cfg.c (verify_address): Remove base argument, add
9783 flag whether to check TREE_ADDRESSABLE and do that.
9784 (verify_expr): Remove.
9785 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9786 (verify_gimple_assign_single): Likewise.
9787 (verify_gimple_switch): Likewise.
9788 (verify_expr_location_1): Dereference tp once. Add (disabled)
9789 piece from verify_expr.
9790 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9792 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9794 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9796 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9798 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9799 (small_data_pattern): Likewise.
9800 (arc_rewrite_small_data): Likewise.
9801 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9802 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9803 (get_symbol_alignment): New function.
9804 (legitimate_small_data_address_p): Likewise.
9805 (legitimate_scaled_address): Update, call
9806 legitimate_small_data_address_p.
9807 (output_sdata): New static variable.
9808 (arc_print_operand): Update how we handle small data operands.
9809 (arc_print_operand_address): Likewise.
9810 (arc_legitimate_address_p): Update, use
9811 legitimate_small_data_address_p.
9812 (arc_rewrite_small_data_p): Remove.
9813 (arc_rewrite_small_data_1): Likewise.
9814 (arc_rewrite_small_data): Likewise.
9815 (small_data_pattern): Likewise.
9816 (compact_sda_memory_operand): Update to use
9817 legitimate_small_data_address_p and get_symbol_alignment.
9818 (prepare_move_operands): Don't rewite sdata pattern.
9819 (prepare_extend_operands): Remove.
9820 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9822 (zero_extendqisi2): Likewise.
9823 (zero_extendhisi2): Likewise.
9824 (extendqihi2): Likewise.
9825 (extendqisi2): Likewise.
9826 (extendhisi2): Likewise.
9830 * config/arc/constraints.md (Usd): Change it to memory constraint.
9832 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9834 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9835 as source of std instructions.
9836 * config/arc/arc.md (movsi_insn): Update pattern predicate to
9837 allow 6-bit constants as source for store instructions.
9838 (movdi_insn): Update instruction pattern to allow 6-bit constants
9839 as source for store instructions.
9841 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9843 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9845 2018-04-30 Nathan Sidwell <nathan@acm.org>
9846 Sandra Loosemore <sandra@codesourcery.com>
9848 * dumpfile.c (dump_open): Allow '-' for stdout.
9849 * doc/invoke.texi (Developer Options): Document dump filename
9850 determination early. Document stdin/stdout selection.
9852 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
9854 Microblaze Target: PIC data text relative
9856 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9857 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9859 * config/microblaze/microblaze.h (microblaze_constant_address_p):
9860 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9861 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9862 New addressing mode for data-text relative position indepenedent code.
9863 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9864 'ADDRESS_SYMBOLIC_TXT_REL'.
9865 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9866 (microblaze_legitimate_pic_operand): Exclude function calls from
9867 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9868 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9870 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9871 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9872 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9873 for 'address + offset'.
9874 (microblaze_expand_prologue): Add new function prologue call for
9876 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9877 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9878 table in case of TARGET_PIC_DATA_TEXT_REL.
9879 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9880 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9881 Add new macros 'UNSPEC_TEXT',
9882 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9883 + exclude function calls from 'UNSPEC_PLT' in case of data text
9885 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9886 new target hook for generating address diff vector tables in case of
9888 * doc/tm.texi : Regenerate.
9889 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9890 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9891 of addr diff vector generation.
9892 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9893 target hook definition.
9894 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9895 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9896 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9897 option for data text relative.
9899 2018-04-30 Richard Biener <rguenther@suse.de>
9901 * tree-chrec.h (evolution_function_is_constant_p): Remove
9903 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9905 2018-04-30 Richard Biener <rguenther@suse.de>
9908 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9910 2018-04-30 Richard Biener <rguenther@suse.de>
9912 PR tree-optimization/28364
9913 PR tree-optimization/85275
9914 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9915 copying first exit test.
9917 2018-04-28 Mark Wielaard <mark@klomp.org>
9919 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9921 (dwarf_AT): Handle DW_AT_addr_base.
9922 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9924 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9927 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9928 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9929 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9930 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9932 2018-04-28 Richard Biener <rguenther@suse.de>
9934 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9935 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9936 to reflect use. Only add interesting stmts.
9938 2018-04-27 Martin Jambor <mjambor@suse.cz>
9941 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9942 the jump function allows for passing through aggregate values.
9944 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9946 * input.h (in_system_header_at): Convert from macro to inline
9948 (from_macro_expansion_at): Likewise.
9949 (from_macro_definition_at): Likewise.
9951 2018-04-27 Jeff Law <law@redhat.com>
9953 * config.gcc: Mark tile* targets as deprecated/obsolete.
9955 2018-04-27 Richard Biener <rguenther@suse.de>
9957 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9960 2018-04-27 Richard Biener <rguenther@suse.de>
9962 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9964 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9966 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9967 with Yd constraint. Set "preferred_for_speed" attribute from
9968 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9970 (*movdi_internal): Ditto.
9971 (movti_interunit splitters): Remove
9972 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9973 (movdi_interunit splitters): Ditto.
9974 * config/i386/constraints.md (Ye): Remove.
9975 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9977 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9980 * config/aarch64/constraints.md (Usg): Limit to 31.
9983 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9985 PR tree-optimization/85529
9986 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9987 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9988 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9989 zero extension or masking of the MSB bit.
9990 (optimize_range_tests): Add FIRST_BB argument, pass it through
9991 to optimize_range_tests_var_bound.
9992 (maybe_optimize_range_tests, reassociate_bb): Adjust
9993 optimize_range_tests callers.
9995 2018-04-26 Richard Biener <rguenther@suse.de>
9996 Jakub Jelinek <jakub@redhat.com>
9998 * cgraph.h (symbol_table): Just declare debug method here.
9999 * symtab.c (symbol_table::debug): Define.
10001 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10003 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10005 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10007 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10008 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10009 (*movdi_internal): Substitute Yi and Yj constraint with x
10010 and Ym and Yn constraint with y constraint. Update "isa"
10011 attribute and set "preferred_for_speed" attribute from
10012 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10013 (*movsi_internal): Ditto.
10014 (*movdf_internal): Ditto.
10015 (*movsf_internal): Ditto.
10016 (*zero_extendsidi2): Ditto.
10017 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10018 (sse2_loadld): Ditto.
10019 (*vec_extract<ssevecmodelower>_0): Ditto.
10020 (*vec_extractv4si_0_zext_sse4): Ditto.
10021 (vec_concatv2di): Ditto.
10022 (*vec_dup<mode>): Ditto.
10023 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10024 * config/i386/constraints.md (Yi): Remove.
10029 2018-04-26 Nathan Sidwell <nathan@acm.org>
10031 * dumpfile.c (dump_open): New.
10032 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10033 (dump_finish): Detect stdio/stderr by value not name.
10035 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10037 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10039 2018-04-26 Tom de Vries <tom@codesourcery.com>
10042 * config/nvptx/nvptx.c (verify_neutering_jumps)
10043 (verify_neutering_labels): New function
10044 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10046 2018-04-26 Tom de Vries <tom@codesourcery.com>
10049 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10050 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10053 2018-04-26 Richard Biener <rguenther@suse.de>
10054 Tom de Vries <tom@codesourcery.com>
10057 * lto-streamer-out.c (output_function): Fixup loops if required to match
10058 discovery done in the reader.
10060 2018-04-26 Richard Biener <rguenther@suse.de>
10062 PR tree-optimization/85116
10063 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10064 have a loop exit from the single latch predecessor. Remove
10065 case of header with just condition.
10066 (ch_base::copy_headers): Exclude infinite loops from any
10068 (pass_ch::execute): Record exits.
10070 2018-04-26 Richard Biener <rguenther@suse.de>
10072 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10073 prologue cost vector and pass it to vect_get_load_cost.
10074 (vect_get_peeling_costs_all_drs): Likewise.
10075 (vect_peeling_hash_get_lowest_cost): Likewise.
10076 (vect_enhance_data_refs_alignment): Likewise.
10078 2018-04-26 Richard Biener <rguenther@suse.de>
10080 PR middle-end/85450
10081 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10082 checking of integer<->pointer conversions.
10083 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10084 sign-/zero-extending pointer types.
10085 (expand_omp_for_static_chunk): Likewise.
10087 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10088 Jean Lee <xiaoyur347@gmail.com>
10090 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10091 (TARGET_ASAN_SHADOW_OFFSET): Define.
10092 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10093 true for -fsanitize=address.
10095 2018-04-25 Mark Wielaard <mark@klomp.org>
10097 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10100 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10102 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10103 than "alu", remove explicit "memory" and "imm_disp" attributes.
10104 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10106 PR middle-end/85414
10107 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10108 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10109 gen_lowpart_no_emit.
10111 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10114 * config/i386/i386.c (ix86_expand_builtin): Change memory
10115 operand to XI, extend p0 to Pmode.
10116 * config/i386/i386.md: Change unspec volatile and operand
10117 1 mode to XI, change operand 0 mode to P.
10119 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10121 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10122 GET_MODE_MASK before any checking.
10123 (nds32_can_use_bset_p): Likewise.
10124 (nds32_can_use_btgl_p): Likewise.
10126 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10128 * config/nds32/nds32-doubleword.md: New define_split pattern for
10129 illegal register number.
10131 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10133 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10135 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10137 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10139 2018-04-25 Richard Biener <rguenther@suse.de>
10141 * lto-streamer.h (LTO_major_version): Bump to 8.
10143 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10145 * BASE-VER: Set to 9.0.0.
10147 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10149 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10150 in __abskf2 and __powikf2.
10152 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10155 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10156 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10157 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10158 Use the above on operand 2. Reindent.
10159 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10161 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10164 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10166 * config/i386/i386.opt (mcet): Removed.
10167 * doc/install.texi: Remove -mcet documentation.
10168 * doc/invoke.texi: Likewise.
10170 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10173 * doc/install.texi: Remove -mcet from bootstrap-cet.
10175 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10178 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10179 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10183 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10184 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10185 containing a CONST_VECTOR.
10187 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10189 * doc/install.texi: Update newlib dependency for nvptx.
10191 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10194 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10195 instead of INTVAL when shifting x left.
10197 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10199 PR tree-optimization/85478
10200 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10201 vect_grouped_store_supported for single element vectors.
10203 2018-04-24 Richard Biener <rguenther@suse.de>
10206 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10207 load cost increase to the case of non-constant step.
10209 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10212 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10213 destination if any_malformed_asm.
10215 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10217 PR middle-end/85496
10218 * expr.c (store_field): In the bitfield case, if the value comes from
10219 a function call and is returned in registers by means of a PARALLEL,
10220 do not change the mode of the temporary unless BLKmode and VOIDmode.
10222 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10224 PR rtl-optimization/85423
10225 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10226 dependencies to debug insns when the previous insn is non-debug.
10228 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10230 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10231 enums into a single definition.
10232 (fls): Fix predicates and printing.
10235 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10237 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10238 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10239 and short u6 immediate.
10240 (check_if_valid_sleep_operand): Remove.
10241 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10243 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10245 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10246 flag_always_save_lp condition.
10247 * config/nds32/nds32.opt (malways-save-lp): New option.
10249 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10251 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10252 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10253 * config/nds32/nds32.h
10254 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10255 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10257 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10259 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10260 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10262 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10263 Chung-Ju Wu <jasonwucj@gmail.com>
10265 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10267 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10268 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10270 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10272 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10274 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10276 * config/nds32/nds32-protos.h (nds32_data_alignment,
10277 nds32_local_alignment): Declare.
10278 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10279 nds32_local_alignment): New functions.
10280 (TARGET_CONSTANT_ALIGNMENT): Define.
10281 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10283 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10285 * config/nds32/nds32.c
10286 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10287 (TARGET_MODES_TIEABLE_P): Likewise.
10289 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10291 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10292 level Ofast and Og.
10294 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10295 Chung-Ju Wu <jasonwucj@gmail.com>
10297 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10298 for unaligned access.
10299 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10301 * config/nds32/nds32-intrinsic.md: Likewise.
10302 * config/nds32/nds32_intrinsic.h: Likewise.
10303 * config/nds32/nds32.h (nds32_builtins): Likewise.
10304 * config/nds32/nds32.opt (munaligned-access): New option.
10305 * config/nds32/nds32.c (nds32_asm_file_start): Display
10306 flag_unaligned_access status.
10308 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10310 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10311 -mno-relax is present.
10312 * config/riscv/linux.h (LINK_SPEC): Ditto.
10314 2018-04-20 Martin Sebor <msebor@redhat.com>
10317 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10319 (gimple_fold_builtin_stxcpy_chk): Same.
10320 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10322 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10325 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10326 __powikf2 when long double is IEEE 128-bit.
10328 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10330 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10331 step to make sure stack always aligned.
10333 2018-04-20 Carl Love <cel@us.ibm.com>
10336 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10337 size check for arg0.
10339 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10340 Tom de Vries <tom@codesourcery.com>
10343 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10344 Emit insns for calls too.
10345 (nvptx_find_par): Always look for worker-level predecessor insn.
10346 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10348 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10349 (nvptx_process_pars): Propagate frames for calls.
10351 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10354 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10356 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10357 (ix86_handle_option): Don't handle OPT_mibt.
10358 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10360 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10362 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10363 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10364 (ix86_target_macros): Define __CET__ with flag_cf_protection
10365 for -fcf-protection.
10366 * config/i386/i386.c (isa2_opts): Remove -mibt.
10367 * config/i386/i386.h (TARGET_IBT): Removed.
10368 (TARGET_IBT_P): Likewise.
10369 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10370 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10371 * config/i386/i386.opt (mcet): Update help message.
10372 (mshstk): Likewise.
10374 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10375 -mcet as an alias for -mshstk.
10377 2018-04-20 Richard Biener <rguenther@suse.de>
10379 PR middle-end/85475
10380 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10381 complexity by forcing a single use of the multiply operand.
10383 2018-04-20 Martin Jambor <mjambor@suse.cz>
10386 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10387 recursion dependency to only apply to non-clones.
10389 2018-04-20 Martin Jambor <mjambor@suse.cz>
10392 * ipa-cp.c (create_specialized_node): Check that clones of
10393 self-recursive edges exist during IPA-CP.
10395 2018-04-19 Toon Moene <toon@moene.org>
10397 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10400 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10402 PR tree-optimization/85467
10403 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10404 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10405 VECTOR_CST element to type.
10407 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10410 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10411 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10412 (builtin_longjmp): Likewise.
10413 (save_stack_nonlocal): New pattern.
10414 (restore_stack_nonlocal): Likewise.
10416 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10419 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10420 Replace ASM_OUTPUT_LABEL with fprintf.
10422 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10425 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10426 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10427 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10428 define __IBT__ and __SHSTK__ for -fcf-protection.
10429 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10431 (ix86_trampoline_init): Likewise.
10432 (x86_output_mi_thunk): Likewise.
10433 (ix86_notrack_prefixed_insn_p): Likewise.
10434 (ix86_option_override_internal): Don't disallow -fcf-protection.
10435 * config/i386/i386.md (rdssp<mode>): Also enable for
10437 (incssp<mode>): Likewise.
10438 (nop_endbr): Likewise.
10439 * config/i386/i386.opt (mcet): Change help message to built-in
10442 (mshstk): Likewise.
10443 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10444 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10445 enable CET built-in functions.
10447 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10449 * common/config/i386/i386-common.c
10450 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10451 OPTION_MASK_ISA_MOVDIRI_UNSET,
10452 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10453 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10454 * config.gcc (movdirintrin.h): New header.
10455 * config/i386/cpuid.h (bit_MOVDIRI,
10456 bit_MOVDIR64B): New bits.
10457 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10459 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10460 (VOID, PVOID, PCVOID)): New function types.
10461 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10462 __builtin_ia32_directstoreu_u64,
10463 __builtin_ia32_movdir64b): New builtins.
10464 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10465 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10467 (ix86_valid_target_attribute_inner_p): Ditto.
10468 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10469 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10470 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10471 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10472 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10473 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10474 (movdiri<mode>, movdir64b_<mode>): New.
10475 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10476 * config/i386/immintrin.h: Include movdirintrin.h.
10477 * config/i386/movdirintrin.h: New file.
10478 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10480 2018-04-19 Richard Biener <rguenther@suse.de>
10482 PR middle-end/85455
10483 * cfg.c (clear_bb_flags): When loop state says we have
10484 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10486 2018-04-19 Richard Biener <rguenther@suse.de>
10488 PR tree-optimization/84737
10489 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10490 copying restrict info.
10491 (vect_setup_realignment): Use it.
10492 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10493 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10494 the first DR to all generated stores.
10495 (vectorizable_load): Likewise for loads.
10497 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10499 PR tree-optimization/85446
10500 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10501 the integral and pointer types to have the same precision.
10503 * doc/install.texi: Document --disable-cet being the default and
10506 2018-04-18 Martin Liska <mliska@suse.cz>
10508 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10511 2018-04-18 Martin Liska <mliska@suse.cz>
10514 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10517 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10518 arguments if they are comparable.
10520 2018-04-18 Martin Liska <mliska@suse.cz>
10523 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10526 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10529 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10532 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10533 ENDBR after calling __morestack.
10535 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10538 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10539 by using gcc_base_ver to generate a gcc_driver_version, and use
10540 it when generating GCC_DRIVER_NAME.
10541 * configure: Regenerate.
10543 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10546 * config.gcc: Obsolete powerpc*-*-*spe*.
10548 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10551 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10552 (stabstr_D): Change type of unum from unsigned int to
10553 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10556 2018-04-17 Jim Wilson <jimw@sifive.com>
10559 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10560 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10561 Set arg_pointer_offset after using pretend_args_size.
10563 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10565 PR rtl-optimization/85431
10566 * dse.c (record_store): Ignore zero width stores.
10569 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10570 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10571 __builtin_stack_restore rather than after it.
10572 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10573 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10574 argument instead of virtual_dynamic_stack_rtx.
10576 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10578 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10580 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10581 Add note to error message to explain internal mapping of overloaded
10582 built-in function name to non-overloaded built-in function name.
10583 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10586 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10589 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10590 where the inputs overlap with the output.
10592 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10594 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10595 (=v, v) alternative and explicit "memory" attribute.
10596 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10597 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10599 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10600 "sselog1" type instead of "sselog".
10601 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10602 "sselog". Remove explicit "memory" attribute.
10603 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10604 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10606 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10607 "sselog1" type instead of "sselog". Remove explicit "memory"
10609 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10610 use "sselog1" type instead of "sselog". Remove explicit "memory"
10612 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10613 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10615 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10616 "sselog1" type instead of "sselog". Remove explicit "memory"
10618 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10619 use "sselog1" type instead of "sselog". Remove explicit "memory"
10623 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10625 PR middle-end/85414
10626 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10629 2018-04-17 Martin Jambor <mjambor@suse.cz>
10632 * ipa-cp.c (create_specialized_node): Call
10633 expand_all_artificial_thunks if necessary.
10635 2018-04-17 Martin Liska <mliska@suse.cz>
10638 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10639 in message, remote space in between '_G' and '('.
10641 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10644 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10645 avx512f_vmcmp<mode>3<round_saeonly_name>,
10646 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10647 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10648 avx512f_rndscale<mode><round_saeonly_name>,
10649 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10650 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10651 Use %<iptr>2 instead of %2 for -masm=intel.
10652 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10653 avx512f_vcvttss2usi<round_saeonly_name>,
10654 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10656 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10657 avx512f_vcvttsd2usi<round_saeonly_name>,
10658 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10659 Use %q1 instead of %1 for -masm=intel.
10660 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10661 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10662 of %3 for -masm=intel.
10663 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10665 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10667 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10669 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10670 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10672 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10674 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10675 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10676 %g1 and one with %0 and %1.
10677 (avx512er_vmrcp28<mode><round_saeonly_name>,
10678 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10679 %1 for -masm=intel.
10680 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10681 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10682 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10683 of %0 and %{%4%} for -masm=intel.
10684 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10685 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10686 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10687 order of %0 and %{%5%}%{z%} for -masm=intel.
10689 2018-04-17 Jan Hubicka <jh@suse.cz>
10692 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10694 2018-04-17 Martin Liska <mliska@suse.cz>
10697 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10698 for target_clone error message. Make default implementation
10699 clone to be a local declaration.
10700 (separate_attrs): Add new argument and check for an empty
10702 (expand_target_clones): Handle it.
10703 (ipa_target_clone): Make redirection just for target_clones
10706 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10707 Tom de Vries <tom@codesourcery.com>
10709 PR middle-end/84955
10710 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10711 tiled basic blocks without omp continue statements.
10713 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10716 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10717 vec_extract expression as having side effects to make sure it gets
10720 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10723 * config/i386/i386.c (get_builtin_code_for_version): Check
10726 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10729 * config.gcc: Support "skylake".
10730 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10732 * config/i386/i386.c (m_SKYLAKE): Define.
10733 (processor_target_table): Add "skylake".
10734 (ix86_option_override_internal): Add "skylake".
10735 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10736 PROCESSOR_CANNONLAKE.
10737 (get_builtin_code_for_version): Fix priority for
10738 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10739 PROCESSOR_SKYLAKE-AVX512.
10740 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10741 (processor_type): Add PROCESSOR_SKYLAKE.
10743 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10744 Jason Merrill <jason@redhat.com>
10747 * convert.c (convert_to_integer_1): Use direct recursion for
10748 enumeral types and types with a precision less than the number
10749 of bits in their mode.
10751 2018-04-16 Julia Koval <julia.koval@intel.com>
10754 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10755 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10757 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10760 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10761 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10762 and -mno-direct-move.
10764 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10767 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10768 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10769 Ensure negative shifts result in {0}.
10771 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10773 PR rtl-optimization/79916
10774 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10775 regs (if any) to define how to gnerate SD moves when LRA is in
10778 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10780 PR rtl-optimization/85393
10781 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10782 * except.c (expand_dw2_landing_pad_for_region): Make static.
10783 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10784 a label and unconditional jump to old_bb, rather than
10785 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10788 PR rtl-optimization/85376
10789 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10790 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10791 instead of a specific value.
10793 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10794 Bin Cheng <bin.cheng@arm.com>
10796 PR tree-optimization/82965
10797 PR tree-optimization/83991
10798 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10799 by_profile_only parameter.
10800 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10801 information if the loop was predicted to iterate too many times.
10802 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10804 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10807 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10810 2018-04-13 Martin Liska <mliska@suse.cz>
10811 Jakub Jelinek <jakub@redhat.com>
10813 PR middle-end/81657
10814 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10815 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10816 * builtins.c (expand_builtin_memory_copy_args): Use
10817 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10818 handle dest_addr == pc_rtx.
10820 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
10823 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10824 asked to not generate direct moves.
10825 (fix_trunc<mode>si2_stfiwx): Similar.
10826 (fix_trunc<mode>si2_internal): Similar.
10828 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10831 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10832 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10833 lookup if dest in some wider mode is known to be const0_rtx and
10834 if so, record permanent equivalence for it to be ZERO_EXTEND of
10835 the narrower mode destination.
10837 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10839 * lto-streamer-out.c (output_function): Revert 259346.
10840 * omp-expand.c (expand_oacc_for): Likewise.
10842 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
10844 PR rtl-optimization/85354
10845 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10846 * sel-sched.c (sel_global_init): ... here.
10848 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
10851 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10852 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10853 mode for PE-COFF targets.
10854 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10855 (i386_pe_asm_lto_end): Likewise.
10856 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10857 (TARGET_ASM_LTO_END): Likewise.
10858 * config/i386/winnt.c (saved_debug_info_level): New static variable.
10859 (i386_pe_asm_lto_start): New function.
10860 (i386_pe_asm_lto_end): Likewise.
10862 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10863 Richard Biener <rguenther@suse.de>
10865 PR middle-end/84955
10866 * lto-streamer-out.c (output_function): Fix CFG loop state before
10868 * omp-expand.c (expand_oacc_for): Handle calls to internal
10869 functions like regular functions.
10871 2018-04-12 Richard Biener <rguenther@suse.de>
10874 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10875 for the early LTO debug to properly generate references to it
10876 during DIE emission. Do not re-use that for the skeleton for
10878 (dwarf2out_early_finish): Likewise.
10880 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10883 * config/i386/sse.md
10884 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10885 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10886 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10887 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10888 and output is a reg, avoid creating invalid lowpart subreg, but
10889 instead split into a 512-bit move. Don't split if not AVX512VL,
10890 input is xmm16+ reg and output is a mem.
10891 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10892 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10893 xmm16+ reg and output is a mem.
10895 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10897 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10898 also for flag_dwarf2_cfi_asm.
10900 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10902 PR rtl-optimization/85342
10903 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10904 a bool scalar var inside of the loop instead. Don't try to update
10905 recog_data.operand after failed apply_change_group.
10907 2018-04-12 Tom de Vries <tom@codesourcery.com>
10910 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10911 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10912 array with flexible array member as array without given dimension.
10913 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10914 argument for undefined param to true.
10916 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10919 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10920 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10921 from PowerPC section.
10922 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10923 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10924 help text that is too long.
10925 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10926 help text that is too long.
10927 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10928 help text that is too long.
10930 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10932 * config/alpha/alpha.md (stack_probe_internal): Rename
10933 from "probe_stack". Update all callers.
10935 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10937 PR rtl-optimization/84566
10938 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10939 sched_macro_fuse_insns.
10941 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10944 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10945 (compute_block_dependences): ... from here.
10947 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10949 PR tree-optimization/85331
10950 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10951 from int to HOST_WIDE_INT.
10953 2018-04-11 Martin Jambor <mjambor@suse.cz>
10956 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10957 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10958 not the same as the source val.
10959 (cgraph_edge_brings_value_p): New parameter.
10960 (gather_edges_for_value): Pass destination value to
10961 cgraph_edge_brings_value_p.
10962 (perhaps_add_new_callers): Likewise.
10963 (get_info_about_necessary_edges): Likewise and exclude values brought
10964 only by self-recursive edges.
10965 (create_specialized_node): Redirect only clones of self-calling edges.
10966 (+self_recursive_pass_through_p): New function.
10967 (find_more_scalar_values_for_callers_subset): Use it.
10968 (find_aggregate_values_for_callers_subset): Likewise.
10969 (known_aggs_to_agg_replacement_list): Removed.
10970 (decide_whether_version_node): Re-calculate known constants for all
10971 remaining context clones.
10973 2018-04-11 Richard Biener <rguenther@suse.de>
10976 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10977 from early DWARF output.
10978 (dwarf2out_early_finish): Output line info unconditionally into
10979 early DWARF and add reference to it.
10981 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10984 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10985 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10986 other than V2DFmode using iptr mode attribute.
10987 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10989 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10991 PR rtl-optimization/84659
10992 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10994 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10997 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10999 (output_loc_list): Pass address of a dummy size variable even in the
11000 locview handling loop.
11001 (index_location_lists): Add comment on why skip_loc_list_entry can't
11004 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11007 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11010 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11013 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11014 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11015 and -mstring-compare-inline-limit.
11017 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11020 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11021 for stack clash protection in a register whenever we need it to be in
11024 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11026 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11027 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11029 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11032 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11034 (mlong-double-): Ditto.
11035 * config/rs6000/sysv4.opt (msdata=): Ditto.
11036 (mtls-size=): Ditto.
11038 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11040 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11041 erroneous entries for
11042 "vector int vec_ldl (int, long int *)", and
11043 "vector unsigned int vec_ldl (int, unsigned long int *)".
11044 Add comments and entries for
11045 "vector bool char vec_ldl (int, bool char *)",
11046 "vector bool short vec_ldl (int, bool short *)",
11047 "vector bool int vec_ldl (int, bool int *)",
11048 "vector bool long long vec_ldl (int, bool long long *)",
11049 "vector pixel vec_ldl (int, pixel *)",
11050 "vector long long vec_ldl (int, long long *)",
11051 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11052 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11053 type tree bool_long_long_type_node and correct definition of
11054 bool_V2DI_type_node to make reference to this new type tree.
11055 (rs6000_mangle_type): Replace erroneous reference to
11056 bool_long_type_node with bool_long_long_type_node.
11057 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11058 comments to emphasize sign distinctions for char and int types and
11059 replace RS6000_BTI_bool_long constant with
11060 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11061 use of RS6000_BTI_pixel.
11062 (bool_long_type_node): Remove this macro definition.
11063 (bool_long_long_type_node): New macro definition
11065 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11067 PR rtl-optimization/85300
11068 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11069 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11070 simplify_unary_operation fails.
11072 2018-04-10 Martin Liska <mliska@suse.cz>
11074 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11075 cgraph_edge and ipa_ref.
11077 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11081 * config/i386/sse.md
11082 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11083 computation of the VEC_MERGE selector from mask.
11084 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11085 Fix decoding of the VEC_MERGE selector into mask.
11087 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11089 PR tree-optimization/85286
11090 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11092 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11094 * final.c (final_1): Set insn_last_address as well as
11095 insn_current_address.
11097 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11100 * explow.c (emit_stack_probe): Call validize_mem on memory location
11101 before passing it to gen_probe_stack. Create address operand and
11102 legitimize it for the probe_stack_address case.
11104 2018-04-09 Jan Hubicka <jh@suse.cz>
11107 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11108 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11109 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11111 (free_lang_data): Rebuild type inheritance graph.
11113 2018-04-09 Martin Sebor <msebor@redhat.com>
11115 * invoke.texi (-finline-small-functions): Mention other optimization
11117 (-findirect-inlining, -fpartial-inlining): Same.
11118 (-finline-functions-called-once): Same.
11119 (-freorder-blocks-and-partition): Same.
11121 2018-04-09 Jan Hubicka <jh@suse.cz>
11124 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11125 jumps; choose last target that matches the criteria (i.e.
11126 no partition changes for non-crossing jumps).
11127 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11128 support for redirecting crossing jumps to non-crossing.
11130 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11132 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11133 also for naked functions.
11135 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11137 * config/arc/arc.md (add_shift): New pattern.
11138 (add_shift2): Likewise.
11139 (sub_shift): Likewise.
11140 (sub_shift_cmp0_noout): Likewise.
11141 (compare_si_ashiftsi): Likewise.
11142 (xbfu_cmp0_noout): New combine pattern.
11143 (xbfu_cmp0"): Likewise.
11144 (movsi_set_cc_insn): Place the predicable variant first.
11145 (commutative_binary_cmp0_noout): Remove clobber.
11146 (commutative_binary_cmp0): New pattern.
11147 (noncommutative_binary_cmp0): Likewise.
11148 (noncommutative_binary_cmp0_noout): Likewise.
11149 (noncommutative_binary_comparison_result_used): Removed.
11150 (rsub_cmp0): New pattern.
11151 (rsub_cmp0_noout): Likewise.
11152 (extzvsi): Changed, keep only meaningful variants.
11153 (SQH, SEZ): New iterators.
11154 (SQH_postfix): New mode attribute.
11155 (SEZ_prefix): New code attribute.
11156 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11157 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11158 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11159 of numerical value.
11160 (noncommutative_operator): Check the availability of barrel
11163 2018-04-09 Richard Biener <rguenther@suse.de>
11165 PR tree-optimization/85284
11166 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11167 Only use the niter constraining form of simple_iv when the exit
11168 is always executed.
11170 2018-04-09 Tom de Vries <tom@codesourcery.com>
11173 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11174 (define_expand "*memory_barrier"): New define_expand.
11175 (define_insn "memory_barrier"): New insn.
11177 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11179 PR rtl-optimization/80463
11180 PR rtl-optimization/83972
11181 PR rtl-optimization/83480
11183 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11184 correct producer for the insn.
11185 (tidy_control_flow): Fixup seqnos in case of debug insns.
11187 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11189 PR rtl-optimization/83913
11191 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11192 different sched-times when merging exprs.
11194 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11196 PR rtl-optimization/83962
11198 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11199 tidy_fallthru_edge and tidy_control_flow.
11201 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11203 PR rtl-optimization/83530
11205 * sel-sched.c (force_next_insn): New global variable.
11206 (remove_insn_for_debug): When force_next_insn is true, also leave only
11207 next insn in the ready list.
11208 (sel_sched_region): When the region wasn't scheduled, make another pass
11209 over it with force_next_insn set to 1.
11211 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11213 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11215 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11216 for interrupt control.
11217 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11218 functions for interrupt control.
11219 * config/nds32/nds32-intrinsic.md: Likewise.
11220 * config/nds32/nds32_intrinsic.h: Likewise.
11221 * config/nds32/nds32.h (nds32_builtins): Likewise.
11223 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11225 * config/nds32/nds32.c (nds32_init_machine_status,
11226 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11227 strict_aligned_p field.
11228 (nds32_expand_to_rtl_hook): New function.
11229 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11230 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11232 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11233 Chung-Ju Wu <jasonwucj@gmail.com>
11235 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11236 * config/nds32/nds32-n7.md: New file.
11237 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11238 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11240 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11241 * config/nds32/nds32.md (pipeline_model): Add n7.
11242 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11243 * config/nds32/pipelines.md: Include n7 settings.
11245 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11246 Chung-Ju Wu <jasonwucj@gmail.com>
11248 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11249 * config/nds32/nds32-e8.md: New file.
11250 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11251 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11253 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11254 * config/nds32/nds32.md (pipeline_model): Add e8.
11255 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11256 * config/nds32/pipelines.md: Include e8 settings.
11258 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11259 Chung-Ju Wu <jasonwucj@gmail.com>
11261 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11262 * config/nds32/nds32-n8.md: New file.
11263 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11264 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11266 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11267 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11268 * config/nds32/nds32.md (pipeline_model): Add n8.
11269 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11270 * config/nds32/pipelines.md: Include n8 settings.
11272 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11273 Chung-Ju Wu <jasonwucj@gmail.com>
11275 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11276 * config/nds32/nds32-n9-2r1w.md: New file.
11277 * config/nds32/nds32-n9-3r2w.md: New file.
11278 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11279 nds32_register_ports): New or modify for cpu n9.
11280 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11282 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11283 * config/nds32/nds32-utils.c: New file.
11284 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11285 TARGET_MUL_SLOW): Define.
11286 * config/nds32/nds32.md (pipeline_model): New attribute.
11287 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11288 New options that support cpu n9.
11289 * config/nds32/pipelines.md: Include n9 settings.
11290 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11292 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11294 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11295 information if necessary.
11296 (output_cond_branch_compare_zero): Likewise.
11297 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11298 (nds32_target_alignment): Refine for alignment.
11299 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11300 (FUNCTION_BOUNDARY): Modify.
11301 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11303 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11305 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11307 * config/nds32/constants.md (unspec_volatile_element): Add values for
11308 TLB operation and data prefetch.
11309 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11310 functions for TLB operation and data prefetch.
11311 * config/nds32/nds32-intrinsic.md: Likewise.
11312 * config/nds32/nds32_intrinsic.h: Likewise.
11313 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11314 (nds32_print_operand): Likewise.
11315 * config/nds32/nds32.h (nds32_builtins): Likewise.
11317 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11318 Andrew Pinski <pinsika@gcc.gnu.org>
11320 PR middle-end/82976
11321 * match.pd: Use constant_boolean_node of correct type instead of
11322 boolean_true_node or boolean_false_node for simplifying
11323 pointer comparisons to zero.
11325 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11327 PR tree-optimization/80021
11328 * tree.c (verify_type_variant): Make error call in verify_variant_match
11329 translatable and remove final full stop.
11331 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11333 * config/nds32/constants.md (unspec_volatile_element): Add
11334 UNSPEC_VOLATILE_EH_RETURN.
11335 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11336 nds32_output_stack_pop): Support dwarf exception handling process.
11337 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11338 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11339 exception handling process.
11340 (nds32_compute_stack_frame): Likewise.
11341 (nds32_return_addr_rtx): Likewise.
11342 (nds32_initial_elimination_offset): Likewise.
11343 (nds32_expand_prologue): Likewise.
11344 (nds32_expand_epilogue): Likewise.
11345 (nds32_dynamic_chain_address): New function.
11346 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11347 exception handling.
11348 (DYNAMIC_CHAIN_ADDRESS): Define.
11349 (EH_RETURN_DATA_REGNO): Define.
11350 (EH_RETURN_STACKADJ_RTX): Define.
11351 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11352 patterns for dwarf exception handling.
11354 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11356 * config/nds32/nds32.h: Clean up obsolete macros.
11358 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11360 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11361 Add enum values for particular instructions.
11362 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11363 particular intrinsic functions.
11364 * config/nds32/nds32-intrinsic.md: Likewise.
11365 * config/nds32/nds32_intrinsic.h: Likewise.
11366 * config/nds32/nds32.h (nds32_builtins): Likewise.
11367 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11368 (btst, ave): New patterns for particular instructions.
11370 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11372 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11373 Add enum values for atomic load/store and memory sync.
11374 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11376 * config/nds32/nds32-intrinsic.md: Likewise.
11377 * config/nds32/nds32_intrinsic.h: Likewise.
11378 * config/nds32/nds32.h (nds32_builtins): Likewise.
11380 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11382 PR tree-optimization/85257
11383 * fold-const.c (native_encode_vector): If not all elts could fit
11384 and off is -1, return 0 rather than offset.
11385 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11386 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11387 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11388 adjust buffer in native_interpret_expr call.
11390 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11392 * config/nds32/constants.md (unspec_volatile_element): Add cache
11393 control enum values.
11394 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11395 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11396 * config/nds32/nds32.c (nds32_cctl_names): New.
11397 (nds32_print_operand): Handle cache control register names.
11398 * config/nds32/nds32.h (nds32_builtins): New enum values.
11399 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11401 * config/nds32/nds32.md (type): Add mmu.
11402 * config/nds32/pipelines.md (simple_insn): Add mmu.
11404 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11406 * config/nds32/nds32.md (type): Remove call.
11407 * config/nds32/pipelines.md (simple_insn): Likewise.
11409 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11411 * config/nds32/constants.md (unspec_volatile_element): Add
11412 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11413 UNSPEC_VOLATILE_FMFCFG.
11414 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11415 description for fmfcfg and fmfcsr.
11416 (bdesc_1arg): Add fmtcsr.
11417 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11418 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11419 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11420 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11421 unspec_fmfcfg): New patterns.
11422 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11423 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11424 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11425 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11426 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11427 __nds32__fmfcfg): Define.
11429 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11431 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11432 intrinsic register names.
11433 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11434 intrinsic register enum values and macros.
11436 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11438 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11439 for load/store addressing form.
11440 (nds32_print_operand_address): Likewise.
11442 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11445 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11446 based on LABEL_REF. Remove useless assertion.
11447 (pic_address_needs_scratch): Fix formatting.
11448 (sparc_legitimize_pic_address): Minor tweaks.
11449 (sparc_delegitimize_address): Adjust assertion accordingly.
11450 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11451 into symbolic_operand.
11452 (movsi_high_pic_label_ref): Likewise.
11453 (movsi_lo_sum_pic_label_ref): Likewise.
11454 (movdi_pic_label_ref): Likewise.
11455 (movdi_high_pic_label_ref): Likewise.
11456 (movdi_lo_sum_pic_label_ref): Likewise.
11458 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11460 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11461 custom LIB_SPEC setup.
11463 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11464 Kito Cheng <kito.cheng@gmail.com>
11466 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11467 * config/riscv/freebsd.h: New.
11469 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11471 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11472 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11475 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11476 Kito Cheng <kito.cheng@gmail.com>
11478 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11479 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11480 * config/nds32/nds32-protos.h (nds32_output_call,
11481 nds32_output_return): Declare.
11482 * config/nds32/nds32.md: Refine all the call and return patterns.
11484 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11487 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11488 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11490 PR rtl-optimization/84872
11491 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11492 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11493 EDGE_CROSSING edge.
11495 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11497 * expr.c (copy_blkmode_to_reg): Revert 254862.
11498 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11500 2018-04-06 Richard Biener <rguenther@suse.de>
11502 PR middle-end/85244
11503 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11504 after seeing a component reference with an adjacent field. Treat
11505 refs to arrays at struct end of external decls similar to
11506 refs to unconstrained commons.
11508 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11511 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11512 look through SAVE_EXPRs with non-side-effects argument. Adjust
11514 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11517 2018-04-06 Richard Biener <rguenther@suse.de>
11519 PR middle-end/85180
11520 * alias.c (find_base_term): New wrapper around find_base_term
11521 unwinding CSELIB_VAL_PTR changes.
11522 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11525 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11527 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11529 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11530 constant definitions.
11531 ("nop"): lr 0,0 -> nopr r0
11532 ("nop_lr0", "nop_lr1"): New insn definitions.
11534 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11536 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11537 NDS32_V3PUSH_AVAILABLE_P macro.
11539 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11540 Chung-Ju Wu <jasonwucj@gmail.com>
11542 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11543 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11544 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11545 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11546 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11547 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11548 * config/nds32/constraints.md: New constraints and checking for hard
11549 float configuration.
11550 * config/nds32/iterators.md: New mode iterator and attribute for hard
11551 float configuration.
11552 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11554 * config/nds32/nds32-fpu.md: New file.
11555 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11556 deal with hard float code generation.
11557 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11559 (abi_type, float_reg_number): New enum type.
11560 * config/nds32/nds32-predicates.c: New predicates for hard float.
11561 * config/nds32/nds32-protos.h: Declare functions for hard float.
11562 * config/nds32/nds32.c: Implementation for hard float configuration.
11563 * config/nds32/nds32.h: Definitions for hard float configuration.
11564 * config/nds32/nds32.md: Include hard float machine description and
11565 modify patterns for hard float configuration.
11566 * config/nds32/nds32.opt: New options for hard float configuration.
11567 * config/nds32/predicates.md: New predicates for hard float
11570 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11572 * common/config/nds32/nds32-common.c
11573 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11575 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11577 PR middle-end/85195
11578 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11579 CONSTRUCTOR_ELT (ctor, ...)->value.
11581 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11584 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11586 2018-04-05 Tom de Vries <tom@codesourcery.com>
11589 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11592 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11593 Kito Cheng <kito.cheng@gmail.com>
11595 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11596 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11597 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11598 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11600 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11601 Kito Cheng <kito.cheng@gmail.com>
11603 * config/nds32/constraints.md (Ufe): New memory constraint.
11604 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11605 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11606 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11608 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11609 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11611 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11613 * config/nds32/nds32.md: Use optimize_size in the condition for
11614 alu-shift instructions.
11616 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11618 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11620 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11622 * config/nds32/nds32.md (negsi2): Refine pattern.
11624 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11625 Chung-Ju Wu <jasonwucj@gmail.com>
11627 * config/nds32/iterators.md (shift_rotate): New code iterator.
11628 (shift): New code attribute.
11629 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11630 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11631 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11632 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11633 bit-wise operations.
11634 (andsi3, *andsi3): Ditto.
11635 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11636 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11637 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11638 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11639 nds32_ior_operand, nds32_xor_operand): New predicates.
11641 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11643 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11644 (addsi3, subsi3): ... this.
11646 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11648 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11650 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11652 * config/nds32/nds32.md: Adjust indention.
11654 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11656 * config/nds32/nds32.md (feature): New attribute.
11658 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11660 * config/nds32/nds32.md (subtype): New attribute.
11662 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11665 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11666 expansion to perform a bitwise AND of the argument followed by a
11667 boolean negation of the result.
11669 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11671 PR rtl-optimization/84878
11672 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11673 the basic block. Assert the use reference is not artificial and that
11674 it has an associated insn.
11676 2018-04-04 Michael Matz <matz@suse.de>
11678 * builtins.c (compute_objsize): Pass correct operand
11679 to array_at_struct_end_p.
11681 2018-04-04 Richard Biener <rguenther@suse.de>
11684 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11685 from contexts for DINFO_LEVEL_TERSE and below.
11687 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11689 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11690 resiter_operand condition.
11691 * config/nds32/nds32.md (*move<mode>): Ditto.
11693 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11694 Monk Chiang <sh.chiang04@gmail.com>
11696 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11698 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11700 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11702 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11703 Kito Cheng <kito.cheng@gmail.com>
11705 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11706 nds32_cond_code_str, output_cond_branch,
11707 output_cond_branch_compare_zero, nds32_expand_cbranch,
11708 nds32_expand_cstore, nds32_expand_movcc,
11709 nds32_output_cbranchsi4_equality_zero,
11710 nds32_output_cbranchsi4_equality_reg,
11711 nds32_output_cbranchsi4_equality_reg_or_const_int,
11712 nds32_output_cbranchsi4_greater_less_zero: New functions.
11713 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11714 nds32_expand_cstore, nds32_expand_movcc,
11715 nds32_output_cbranchsi4_equality_zero,
11716 nds32_output_cbranchsi4_equality_reg,
11717 nds32_output_cbranchsi4_equality_reg_or_const_int,
11718 nds32_output_cbranchsi4_greater_less_zero): Declare.
11719 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11720 nds32_rimm11s_operand): New predicates.
11721 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11722 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11725 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11727 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11728 * config/nds32/nds32.md: Ditto.
11729 * config/nds32/pipelines.md: Ditto.
11731 2018-04-04 Richard Biener <rguenther@suse.de>
11733 PR tree-optimization/85168
11734 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11735 propagating abnormals.
11737 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11739 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11741 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11742 Kito Cheng <kito.cheng@gmail.com>
11744 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11745 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11746 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11747 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11748 * config/nds32/nds32.md (sibcall_internal): New.
11749 (sibcall_register): Remove.
11750 (sibcall_immediate): Remove.
11751 (sibcall_value_internal): New.
11752 (sibcall_value_register): Remove.
11753 (sibcall_value_immediate): Remove.
11754 * config/nds32/predicates.md (nds32_general_register_operand): New.
11755 (nds32_call_address_operand): New.
11757 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11759 PR rtl-optimization/85167
11760 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11761 bb_defs if *split_p, instead preinitialize it to NULL.
11763 PR tree-optimization/85156
11764 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11765 evaluating the argument multiple times.
11767 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11769 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11771 (_mm_cvtpd_ps): Likewise.
11772 (_mm_cvttpd_epi32): Likewise.
11773 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11774 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11775 vector, pixel, and bool following altivec.h include.
11777 2018-04-03 Martin Sebor <msebor@redhat.com>
11779 * doc/extend.texi (Common Function Attributes): Clarify.
11780 (const attribute): Likewise.
11781 (pure attribute): Likewise.
11783 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11786 * config/i386/i386.c (ix86_expand_vector_set): Use
11787 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11789 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11791 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11792 instructions when changing rounding bits to preserve precision bits
11793 in the x87 control word.
11795 2018-04-03 Martin Liska <mliska@suse.cz>
11797 PR tree-optimization/82491
11798 * rtl.h (strip_offset_and_add): Replace += suboffset with
11799 poly_uint64 () + suboffset.
11801 2018-03-29 Martin Liska <mliska@suse.cz>
11802 Martin Jambor <mjambor@suse.cz>
11805 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11806 param_type is not an integral or pointer type.
11808 2018-04-03 Richard Biener <rguenther@suse.de>
11810 * sese.h (recompute_all_dominators): Remove.
11812 2018-04-02 Martin Sebor <msebor@redhat.com>
11814 * doc/invoke.texi (-Wrestrict): Fix typos.
11816 2018-04-02 Jim Wilson <jimw@sifive.com>
11818 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11819 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11820 (<optab>di3, <optab>si3_extend): Likewise.
11821 (<optab>si3_mask, <optab>si3_mask_1): New.
11822 (<optab>di3_mask, <optab>di3_mask_1): New.
11823 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11824 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11825 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11827 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
11829 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11832 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
11834 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11835 (nds32_canonicalize_comparison): New function.
11837 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11838 Kito Cheng <kito.cheng@gmail.com>
11839 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11841 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11842 * config/nds32/constants.md (unspec_volatile_element): Add
11843 UNSPEC_VOLATILE_RELAX_GROUP.
11844 * config/nds32/nds32-relax-opt.c: New file.
11845 * config/nds32/nds32-predicates.c
11846 (nds32_symbol_load_store_p): New function.
11847 * config/nds32/nds32-protos.h
11848 (nds32_symbol_load_store_p): Declare function.
11849 (make_pass_nds32_relax_opt): Declare new rtl pass function.
11850 * config/nds32/nds32.c
11851 (nds32_register_pass): New function to register pass.
11852 (nds32_register_passes): New function to register passes.
11853 * config/nds32/nds32.md (relax_group): New pattern.
11854 * config/nds32/nds32.opt (mrelax-hint): New option.
11855 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11857 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
11859 * config/nds32/t-nds32: Modify files dependency.
11861 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11863 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11864 (PROFILE_HOOK): Define its implementation.
11866 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11868 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11869 type and 32-bit size.
11871 2018-04-01 Jakub Jelinek <jakub@redhat.com>
11873 PR middle-end/85090
11874 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11875 (V_128_256): New mode iterator.
11876 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11877 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11878 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11880 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11881 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11883 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
11886 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11887 NaN inputs correctly.
11889 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11892 * config/rs6000/vsx.md (??r): New mode attribute.
11893 (*vsx_mov<mode>_64bit): Use it.
11894 (*vsx_mov<mode>_32bit): Likewise.
11896 2018-03-30 Martin Sebor <msebor@redhat.com>
11898 PR tree-optimization/84818
11899 * builtins.c (check_access): Use warning_n.
11901 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11904 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11906 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11909 2018-03-30 Julia Koval <julia.koval@intel.com>
11912 * x86-tune.def (movx, partial_reg_dependency): Enable for
11915 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11917 PR inline-asm/84985
11918 * lra-constraints.c (process_alt_operands): Move setting
11919 this_alternative_matches below.
11921 2018-03-29 Martin Liska <mliska@suse.cz>
11924 * doc/invoke.texi: Document how LTO works with debug info.
11925 Describe auto-load support of binutils. Mention 'x86-64'
11926 as valid option value of -march option.
11928 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11930 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11933 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11934 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11935 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11938 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11941 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11942 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11943 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11944 for RS6000_BTM_POWERPC64.
11945 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11946 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11947 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11950 (DIVDEU): Likewise.
11952 2018-03-28 Carl Love <cel@us.ibm.com>
11955 2017-09-27 Carl Love <cel@us.ibm.com>
11957 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11958 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11959 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11962 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11964 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11965 instead of __vector bool.
11966 (_mm_max_pu8): Likewise.
11967 (_mm_min_pi16): Likewise.
11969 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11972 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11973 (DIVWEUO): Likewise.
11974 (DIVDEO): Likewise.
11975 (DIVDEUO): Likewise.
11976 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11977 DIVWEUO and DIVDEUO.
11978 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11979 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11980 (div_extend): Likewise.
11981 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11983 (__builtin_divweuo): Likewise.
11984 (__builtin_divdeo): Likewise.
11985 (__builtin_divdeuo): Likewise.
11987 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11990 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11991 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11993 PR tree-optimization/82004
11994 * gimple-match-head.c (optimize_pow_to_exp): New function.
11995 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11996 Don't fold to exp if optimize_pow_to_exp is false.
11998 2018-03-28 Martin Liska <mliska@suse.cz>
12001 * calls.c (initialize_argument_information): Fix trailing space.
12002 * common.opt: Fix typo and provide better explanation for
12003 -fsanitize-coverage option.
12004 * config/i386/i386.opt: Fix typo.
12006 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12007 Martin Liska <mliska@suse.cz>
12010 * gimplify.c (asan_poison_variable): Don't do the check for
12011 gimplify_omp_ctxp here.
12012 (gimplify_decl_expr): Do it here.
12013 (gimplify_target_expr): Likewise.
12015 2018-03-28 Martin Liska <mliska@suse.cz>
12018 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12019 chkp_type_bounds_count if MPX is not enabled.
12021 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12023 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12025 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12028 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12029 function to create the function decl for complex long double
12030 multiply and divide for -mabi=ieeelongdouble.
12031 (init_float128_ieee): Call it.
12033 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12036 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12037 -fcf-protection=branch -mibt.
12038 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12040 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12043 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12044 arm_word_relocations.
12046 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12049 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12050 extern array declarations.
12052 2018-03-27 Richard Biener <rguenther@suse.de>
12054 PR middle-end/84067
12055 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12056 explicit single_use checks.
12058 2018-03-27 Richard Biener <rguenther@suse.de>
12060 PR tree-optimization/85082
12061 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12064 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12066 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12067 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12068 Turn on fasynchronous-unwind-tables and funwind-tables.
12070 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12073 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12074 (*bmi_blsr_<mode>_ccz): Ditto.
12076 2018-03-26 Tom de Vries <tom@codesourcery.com>
12078 PR tree-optimization/85063
12079 * omp-general.c (offloading_function_p): New function. Factor out
12081 * omp-offload.c (pass_omp_target_link::gate): ... here.
12082 * omp-general.h (offloading_function_p): Declare.
12083 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12084 with attribute omp declare target for offloading functions.
12086 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12088 PR tree-optimization/84005
12089 * tree-data-ref.h (get_base_for_alignment): Declare.
12090 * tree-data-ref.c (get_base_for_alignment_1): New function.
12091 (get_base_for_alignment): Likewise.
12092 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12093 get_base_for_alignment to find a suitable base object, instead
12094 of always using drb->base_address.
12096 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12098 PR inline-asm/85022
12099 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12100 known size by default.
12102 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12104 PR inline-asm/85030
12105 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12106 and non BLKmode operands.
12108 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12111 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12112 Clean up attributes.
12114 2018-03-23 Richard Biener <rguenther@suse.de>
12117 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12118 we are going to emit early debug for LTO.
12120 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12122 PR inline-asm/85034
12123 * function.c (match_asm_constraints_1): Don't optimize if input
12124 doesn't satisfy general_operand predicate for output's mode.
12126 PR inline-asm/85022
12127 * alias.c (write_dependence_p): Don't require for x_canonicalized
12128 non-VOIDmode if x has VOIDmode.
12131 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12132 just don't try to optimize it rather than assert it never happens.
12134 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12136 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12137 macro expansions for definition of ST_INTERNAL_<mode> and
12138 LD_INTERNAL_<mode> builtins.
12139 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12141 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12143 (altivec_expand_st_builtin): Likewise.
12144 (altivec_expand_builtin): Remove calls to deleted functions.
12145 (rs6000_address_for_altivec): Delete this function.
12146 * config/rs6000/vector.md: Remove expands for
12147 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12149 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12152 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12153 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12154 re-computing once computed.
12155 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12156 (arm_init_machine_status): Initialize
12157 machine->static_chain_stack_bytes.
12159 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12162 * doc/extend.texi: Add four new prototypes for vec_ld.
12163 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12164 definitions for more logical presentation.
12165 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12166 entries for V1TI variants of __builtin_altivec_ld builtin.
12167 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12168 handling of V1TI variant of LVX icode pattern.
12169 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12170 (rs6000_gimple_fold_builtin): Likewise.
12171 (altivec_init_builtins): Add code to define
12172 __builtin_altivec_lvx_v1ti function.
12174 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12176 PR inline-asm/84941
12177 * function.c (match_asm_constraints_1): Don't do the optimization
12178 if input isn't a REG, SUBREG, MEM or constant.
12180 2018-03-22 Tom de Vries <tom@codesourcery.com>
12182 PR tree-optimization/84956
12183 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12184 bb_has_abnormal_pred.
12186 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12189 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12190 DECL_INITIAL (decl) to decl at the end.
12191 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12192 adjust the comment.
12194 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12196 * doc/extend.texi (__builtin_tgmath): Document when complex
12197 integer types are treated as _Complex _Float64.
12199 2018-03-21 Tom de Vries <tom@codesourcery.com>
12201 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12203 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12205 PR tree-optimization/84960
12206 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12207 if it is ENTRY block, move them into single succ of ENTRY in that case.
12209 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12211 PR tree-optimization/84811
12212 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12213 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12214 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12215 (known_subrange_p): Update accordingly. Cast each value involved
12216 in the size comparison, rather than casting the result of the
12219 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12221 PR tree-optimization/84982
12222 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12223 by flipping the least significant bit rather than all bits from
12224 bitpos to bitpos + bitsize - 1.
12226 2018-03-21 Nathan Sidwell <nathan@acm.org>
12228 * doc/extend.texi (Deprecated Features): Remove mention of
12229 long-deleted deprecations.
12231 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12234 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12235 * configure: Regenerate.
12237 2018-03-21 Tom de Vries <tom@codesourcery.com>
12239 PR tree-optimization/83126
12240 * tree-parloops.c (num_phis): New function.
12241 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12243 2018-03-21 Nathan Sidwell <nathan@acm.org>
12245 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12246 mention anon-struct/union members and trailing attributes.
12248 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12250 PR tree-optimization/84969
12251 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12252 builtin memset partitions if they set different rhs values.
12254 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12256 PR rtl-optimization/84989
12257 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12258 VEC_DUPLICATE with scalar result mode.
12260 2018-03-21 Martin Liska <mliska@suse.cz>
12263 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12264 not intended return statement.
12266 2018-03-21 Martin Liska <mliska@suse.cz>
12269 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12270 (chkp_find_bound_slots_1): Limit number of iterations.
12272 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12275 * Minor grammar fixes for x86 options.
12277 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12280 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12281 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12283 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12286 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12287 (altivec_lvx_<mode>_1op): Likewise.
12288 (altivec_stvx_<mode>_2op): Likewise.
12289 (altivec_stvx_<mode>_1op): Likewise.
12290 (altivec_lvx_<VM2:mode>): New define_expand.
12291 (altivec_stvx_<VM2:mode>): Likewise.
12292 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12293 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12294 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12295 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12296 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12297 (rs6000_gen_lvx): Likewise.
12298 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12299 (altivec_expand_stv_builtin): Likewise.
12300 (altivec_expand_builtin): Likewise.
12301 * config/rs6000/vector.md: Likewise.
12303 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12306 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12309 2018-03-20 Richard Biener <rguenther@suse.de>
12312 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12313 sign-conversions as zero, fall back to standard scalar_stmt
12316 2018-03-20 Martin Liska <mliska@suse.cz>
12319 * predict.c (rebuild_frequencies): Handle case when we have
12320 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12322 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12325 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12326 flag_section_anchors.
12327 * varasm.c (use_blocks_for_decl_p): Remove hack for
12328 dw2_force_const_mem.
12331 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12333 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12334 be created, use lowpart_subreg of operands[0] rather than operands[0]
12336 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12337 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12338 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12339 and n constraint instead of aarch64_shift_imm_di and Usd.
12340 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12341 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12343 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12346 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12347 to favor GPR over NEON registers.
12348 (<shift>di3_neon): Likewise.
12350 2018-03-20 Tom de Vries <tom@codesourcery.com>
12353 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12354 (nvptx_process_pars): Emit bar.sync asap and alap.
12356 2018-03-20 Tom de Vries <tom@codesourcery.com>
12359 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12360 seen_label if seen_label is already set.
12362 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12365 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12366 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12367 Use 1U instead of 1. Formatting fixes.
12370 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12371 instead of TREE_TYPE (s1) for the return value.
12373 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12375 PR tree-optimization/84946
12376 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12377 bitsize + bitsize in poly_uint64 rather than poly_int64.
12380 * dwarf2asm.c: Include fold-const.c.
12381 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12382 of decl rather than decl itself.
12384 PR rtl-optimization/84643
12385 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12387 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12390 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12391 calling assemble_variable.
12393 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12396 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12397 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12399 2018-03-19 Jim Wilson <jimw@sifive.com>
12402 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12403 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12404 (riscv_first_stack_step): Likewise.
12405 (riscv_option_override): Use STACK_BOUNDARY instead of
12406 MIN_STACK_BOUNDARY.
12407 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12408 MIN_STACK_BOUNDARY.
12409 (BIGGEST_ALIGNMENT): Set to 128.
12410 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12411 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12414 2018-03-19 Richard Biener <rguenther@suse.de>
12416 PR tree-optimization/84933
12417 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12418 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12420 2018-03-19 Richard Biener <rguenther@suse.de>
12422 PR tree-optimization/84859
12423 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12424 (cond_if_else_store_replacement): Perform sinking operation on
12425 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12426 Generalize what a BB with a single eligible store is.
12428 2018-03-19 Richard Biener <rguenther@suse.de>
12430 PR tree-optimization/84929
12431 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12432 chrec_is_positive against non-chrec arg.
12434 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12437 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12439 2018-03-18 Martin Liska <mliska@suse.cz>
12441 PR rtl-optimization/84635
12442 * regrename.c (build_def_use): Use matches_mode only when
12445 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12447 PR tree-optimization/84913
12448 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12449 vectorize chains of COND_EXPRs.
12451 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12453 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12455 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12457 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12459 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12461 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12463 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12464 Kito Cheng <kito.cheng@gmail.com>
12466 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12467 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12468 (nds32_adjust_reg_alloc_order): New function.
12469 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12471 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12473 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12474 nds32_print_operand, nds32_print_operand_address): Use
12475 HOST_WIDE_INT_PRINT_DEC instead.
12477 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12479 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12481 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12484 * config/i386/i386.c (initial_ix86_tune_features,
12485 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12486 unsigned long long.
12487 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12488 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12489 rather than 1u << ix86_tune. Formatting fix.
12490 (ix86_option_override_internal): Change ix86_arch_mask from
12491 unsigned int to unsigned HOST_WIDE_INT, initialize to
12492 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12493 (ix86_function_specific_restore): Likewise.
12495 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12498 * postreload.c (reload_combine_recognize_pattern): Perform
12499 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12500 truncate_int_for_mode the result for the destination's mode.
12503 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12504 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12506 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12509 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12512 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12513 regno_allocno_class_array and sorted_pseudos.
12514 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12515 insns where regno is used.
12517 2018-03-16 Martin Liska <mliska@suse.cz>
12520 * multiple_target.c (create_dispatcher_calls): Redirect
12521 reference in the symbol table.
12523 2018-03-16 Martin Liska <mliska@suse.cz>
12526 * multiple_target.c (create_dispatcher_calls): Redirect also
12529 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12533 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12534 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12535 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12537 2018-03-16 Julia Koval <julia.koval@intel.com>
12539 * doc/invoke.texi (Skylake Server): Add CLWB.
12540 Cannonlake): Remove CLWB.
12542 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12544 PR tree-optimization/84841
12545 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12547 (FLOAT_ONE_CONST_TYPE): Define.
12548 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12549 (sort_by_operand_rank): Put entries with higher constant_type last
12550 rather than first to match comments.
12552 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12554 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12557 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12560 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12561 check and use address of target always.
12563 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12566 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12567 (indirect_thunk_bnd_needed): Likewise.
12568 (indirect_thunks_used): Likewise.
12569 (indirect_thunks_bnd_used): Likewise.
12570 (indirect_return_needed): New.
12571 (indirect_return_bnd_needed): Likewise.
12572 (output_indirect_thunk_function): Add a bool argument for
12574 (output_indirect_thunk_function): Don't generate alias for
12575 function return thunk.
12576 (ix86_code_end): Call output_indirect_thunk_function to generate
12577 function return thunks.
12578 (ix86_output_function_return): Set indirect_return_bnd_needed
12579 and indirect_return_needed instead of indirect_thunk_bnd_needed
12580 and indirect_thunk_needed.
12582 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12584 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12585 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12586 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12588 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12589 Paul Hua <paul.hua.gm@gmail.com>
12592 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12594 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12596 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12597 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12598 resp. SFmode cases.
12600 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12603 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12604 instead of GET_MODE_SIZE when comparing Units.
12606 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12609 * varasm.c (hash_section): Return an unchangeble hash value
12610 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12611 Return !aarch64_can_use_per_function_literal_pools_p ().
12613 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12616 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12617 rather than address of cmode as last argument to prepare_cmp_insn.
12619 2018-03-15 Julia Koval <julia.koval@intel.com>
12621 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12622 F_AVX512VNNI, F_AVX512BITALG): New.
12624 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12627 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12628 insn for floating-point loads and stores.
12630 2018-03-14 Carl Love <cel@us.ibm.com>
12632 * config/rs6000/rs6000-c.c: Add macro definitions for
12633 ALTIVEC_BUILTIN_VEC_PERMXOR.
12634 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12635 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12636 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12637 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12639 * config/doc/extend.texi: Add prototypes for vec_permxor.
12641 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12644 * diagnostic-show-locus.c (class layout_point): Convert m_line
12645 from int to linenum_type.
12646 (line_span::comparator): Use linenum "compare" function when
12647 comparing line numbers.
12648 (test_line_span): New function.
12649 (layout_range::contains_point): Convert param "row" from int to
12651 (layout_range::intersects_line_p): Likewise.
12652 (layout::will_show_line_p): Likewise.
12653 (layout::print_source_line): Likewise.
12654 (layout::should_print_annotation_line_p): Likewise.
12655 (layout::print_annotation_line): Likewise.
12656 (layout::print_leading_fixits): Likewise.
12657 (layout::annotation_line_showed_range_p): Likewise.
12658 (struct line_corrections): Likewise for field m_row.
12659 (line_corrections::line_corrections): Likewise for param "row".
12660 (layout::print_trailing_fixits): Likewise.
12661 (layout::get_state_at_point): Likewise.
12662 (layout::get_x_bound_for_row): Likewise.
12663 (layout::print_line): Likewise.
12664 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12665 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12666 * input.c (selftest::test_linenum_comparisons): New function.
12667 (selftest::input_c_tests): Call it.
12668 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12669 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12670 * selftest.h (ASSERT_GT): New macro.
12671 (ASSERT_GT_AT): New macro.
12672 (ASSERT_LT): New macro.
12673 (ASSERT_LT_AT): New macro.
12675 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12677 PR rtl-optimization/84780
12678 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12680 2018-03-14 Martin Liska <mliska@suse.cz>
12682 * tree.c (record_node_allocation_statistics): Use
12683 get_stats_node_kind.
12684 (get_stats_node_kind): New function extracted from
12685 record_node_allocation_statistics.
12686 (free_node): Use get_stats_node_kind.
12688 2018-03-14 Richard Biener <rguenther@suse.de>
12690 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12691 that the value-set of ANTIC_IN doesn't grow.
12694 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12696 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12697 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12699 2018-03-14 Julia Koval <julia.koval@intel.com>
12701 * config.gcc (icelake-client, icelake-server): New.
12703 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12704 (initial_ix86_arch_features): Ditto.
12705 (PTA_SKYLAKE): Add SGX.
12706 (PTA_ICELAKE): Remove.
12707 (PTA_ICELAKE_CLIENT): New.
12708 (PTA_ICELAKE_SERVER): New.
12709 (ix86_option_override_internal): Split up icelake on icelake client and
12711 (get_builtin_code_for_version): Ditto.
12712 (fold_builtin_cpu): Ditto.
12713 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12714 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12715 * config/i386/i386.h (processor_type): Ditto.
12716 * doc/invoke.texi: Ditto.
12718 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12721 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12722 INTEGER_CST offset, add it together with bitpos / 8 and
12723 sign extend based on POINTER_SIZE.
12727 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12730 * config/i386/constraints.md (Yc): New register constraint.
12731 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12732 Use Yc constraint for alternative 2 of operand 0. Remove
12733 preferred_for_speed attribute.
12735 2018-03-14 Richard Biener <rguenther@suse.de>
12737 PR tree-optimization/84830
12738 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12739 with the old one to avoid oscillations.
12741 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12744 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12746 (assign_by_spills): Return a flag of reload assignment failure.
12747 Do not process the reload assignment failures. Do not spill other
12748 reload pseudos if they has the same reg class. Update n if
12750 (lra_assign): Add a return arg. Set up from the result of
12751 assign_by_spills call.
12752 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12753 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12754 usage_insns if it is not NULL.
12755 (spill_hard_reg_in_range): New function.
12756 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12757 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12758 function prototypes.
12759 (lra_assign): Change prototype.
12760 * lra.c (lra): Add code to deal with fails by splitting hard reg
12763 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12765 * config/riscv/riscv.opt (mrelax): New option.
12766 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12767 "norelax" when riscv_mrelax is disabled.
12768 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12770 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12773 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12774 reassociation for int modes.
12776 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12778 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12779 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12781 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12782 * config/aarch64/aarch64-sve.md
12783 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12784 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12785 (*extend<mode><Vwide>2): Rename to...
12786 (aarch64_sve_extend<mode><Vwide>2): ...this.
12787 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12788 renaming the old pattern to...
12789 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12791 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12792 define_expand, renaming the old pattern to...
12793 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12794 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12795 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12796 account when deciding which SVE instruction the optab should use.
12797 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12799 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12801 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12802 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12803 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12804 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12805 (tlsdesc_small_<mode>): Turn a define_expand and use
12806 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12807 (tlsdesc_small_advsimd_<mode>): ...this.
12808 (tlsdesc_small_sve_<mode>): New pattern.
12810 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12812 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12813 (UNSPEC_UMUL_HIGHPART): New constants.
12814 (MUL_HIGHPART): New int iteraor.
12815 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12816 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12818 (*<su>mul<mode>3_highpart): New define_insn.
12820 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12823 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12826 2018-03-13 Martin Liska <mliska@suse.cz>
12829 * (sem_item_optimizer::sem_item_optimizer): Initialize new
12831 (sem_item_optimizer::~sem_item_optimizer): Release it.
12832 (sem_item_optimizer::merge_classes): Register variable aliases.
12833 (sem_item_optimizer::fixup_pt_set): New function.
12834 (sem_item_optimizer::fixup_points_to_sets): Likewise.
12835 * ipa-icf.h: Declare new variables and functions.
12837 2018-03-13 Jakub Jelinek <jakub@redhat.com>
12839 PR middle-end/84834
12840 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12841 integer_pow2p@2 and test integer_pow2p in condition.
12842 (A < 0 ? C : 0): Similarly for @1.
12844 PR middle-end/84831
12845 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12846 characters starting at p contain '\0' character, don't look beyond
12850 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12851 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12854 * reg-stack.c (change_stack): Change update_end var from int to
12855 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12856 also call set_block_for_insn on the newly added insns and rescan.
12859 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12860 on the last operand.
12863 * tree.c (stabilize_reference_1): Return save_expr (e) for
12864 STATEMENT_LIST even if it doesn't have side-effects.
12866 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
12868 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12870 2018-03-12 Renlin Li <renlin.li@arm.com>
12872 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12873 aarch64_output_scalar_simd_mov_immediate.
12875 2018-03-12 Martin Sebor <msebor@redhat.com>
12877 PR tree-optimization/83456
12878 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12879 for perfectly overlapping calls to memcpy.
12880 (gimple_fold_builtin_memory_chk): Same.
12881 (gimple_fold_builtin_strcpy): Handle no-warning.
12882 (gimple_fold_builtin_stxcpy_chk): Same.
12883 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12885 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12887 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12888 parameter. Use it for SFmode.
12889 (rs6000_function_arg_advance_1): Adjust.
12890 (rs6000_function_arg): Adjust.
12891 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12893 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12895 PR rtl-optimization/84169
12896 PR rtl-optimization/84780
12897 * combine.c (can_combine_p): Check for a 2-insn combination whether
12898 the destination register is used between the two insns, too.
12900 2018-03-12 Richard Biener <rguenther@suse.de>
12902 PR tree-optimization/84803
12903 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12904 for refs DR analysis didn't process.
12906 2018-03-12 Richard Biener <rguenther@suse.de>
12908 PR tree-optimization/84777
12909 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12910 force-vectorize loops ignore whether we are optimizing for size.
12912 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12914 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12915 (TARGET_MD_ASM_ADJUST): Define.
12917 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12918 Kito Cheng <kito.cheng@gmail.com>
12919 Chung-Ju Wu <jasonwucj@gmail.com>
12921 * config/nds32/nds32.c (nds32_compute_stack_frame,
12922 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12923 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12924 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12925 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12926 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12927 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12928 * config/nds32/nds32.md (prologue, epilogue): Use macro
12929 NDS32_V3PUSH_AVAILABLE_P to do checking.
12931 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12934 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12935 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12936 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12937 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12938 addition of most attributes on !orig_type_die or the attribute not
12939 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12941 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12942 Chung-Ju Wu <jasonwucj@gmail.com>
12944 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12945 __NDS32_VH__ macro.
12946 * config/nds32/nds32.opt (mvh): New option.
12948 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12949 Chung-Ju Wu <jasonwucj@gmail.com>
12951 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12953 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12954 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12957 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12958 Chung-Ju Wu <jasonwucj@gmail.com>
12960 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12962 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12963 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12965 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12966 Kito Cheng <kito.cheng@gmail.com>
12967 Chung-Ju Wu <jasonwucj@gmail.com>
12969 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12970 UNSPEC_FFMISM and UNSPEC_FLMISM.
12971 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12972 for ffb, ffmism and flmism.
12973 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12974 (unspec_ffmism): Ditto.
12975 (unspec_flmism): Ditto.
12976 (nds32_expand_builtin_impl): Check if string extension is available.
12977 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12978 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12980 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12983 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12986 * lra-assigns.c (assign_by_spills): Return a flag of reload
12987 assignment failure. Do not process the reload assignment
12988 failures. Do not spill other reload pseudos if they has the same
12990 (lra_assign): Add a return arg. Set up from the result of
12991 assign_by_spills call.
12992 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12993 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12994 usage_insns if it is not NULL.
12995 (spill_hard_reg_in_range): New function.
12996 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12997 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12998 function prototypes.
12999 (lra_assign): Change prototype.
13000 * lra.c (lra): Add code to deal with fails by splitting hard reg
13003 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13006 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13008 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13011 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13012 (dw_val_node): Add val_symbolic_view.
13013 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13014 (symview_upper_bound): New.
13015 (new_line_info_table): Initialize symviews_since_reset.
13016 (dwarf2out_source_line): Count symviews_since_reset and set
13017 symview_upper_bound.
13018 (dw_val_equal_p): Handle symview.
13019 (add_AT_symview): New.
13020 (print_dw_val): Handle symview.
13021 (attr_checksum, attr_checksum_ordered): Likewise.
13022 (same_dw_val_p, size_of_die): Likewise.
13023 (value_format, output_die): Likewise.
13024 (add_high_low_attributes): Use add_AT_symview for entry_view.
13025 (dwarf2out_finish): Reset symview_upper_bound, clear
13028 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13031 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13032 Add strict argument and use it.
13033 (rs6000_split_multireg_move): Update for new strict argument.
13034 (mem_operand_gpr): Disallow all non-offsettable addresses.
13035 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13037 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13040 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13041 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13042 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13045 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13046 decl, use remap_type if we want to use the type.
13048 2018-03-09 Martin Sebor <msebor@redhat.com>
13050 PR tree-optimization/84526
13051 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13053 (builtin_access::generic_overlap): Be prepared to handle non-array
13056 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13058 PR rtl-optimization/84682
13059 * lra-constraints.c (process_address_1): Check is_address flag
13060 for address constraints.
13061 (process_alt_operands): Likewise.
13062 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13063 preprocess_constraints.
13064 * recog.h (preprocess_constraints): Add oploc parameter.
13066 * recog.c (preprocess_constraints): Test address_operand for
13067 CT_ADDRESS constraints.
13069 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13072 * lra-assigns.c (assign_by_spills): Return a flag of reload
13073 assignment failure. Do not process the reload assignment
13074 failures. Do not spill other reload pseudos if they has the same
13076 (lra_assign): Add a return arg. Set up from the result of
13077 assign_by_spills call.
13078 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13079 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13080 usage_insns if it is not NULL.
13081 (spill_hard_reg_in_range): New function.
13082 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13083 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13084 function prototypes.
13085 (lra_assign): Change prototype.
13086 * lra.c (lra): Add code to deal with fails by splitting hard reg
13089 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13092 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13093 Accept complain bool parameter. Only emit errors if it is true.
13094 (arm_parse_cpu_option_name): Likewise.
13095 (arm_target_thumb_only): Adjust callers of the above.
13096 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13097 prototype to take a default true bool parameter.
13098 (arm_parse_arch_option_name): Likewise.
13100 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13101 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13105 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13106 * configure: Regenerate.
13107 * configure.ac ("linker --version-script option"): New.
13108 ("linker soname option"): New.
13110 2018-03-09 Richard Biener <rguenther@suse.de>
13112 PR tree-optimization/84775
13113 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13114 immediate uses of predicate stmts and mark them modified.
13117 PR tree-optimization/84178
13118 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13120 (version_loop_for_if_conversion): Delay update_ssa call.
13121 (tree_if_conversion): Delay update_ssa until after predicate
13124 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13127 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13128 when the function accesses prior frames.
13130 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13133 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13134 gen_llsym, otherwise call maybe_gen_llsym.
13136 PR inline-asm/84742
13137 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13138 has ',' character inside of it.
13140 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13143 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13144 as clobbering CC_REGNUM.
13146 2018-03-08 Richard Biener <rguenther@suse.de>
13148 PR middle-end/84552
13149 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13150 (follow_copies_to_constant): Do not follow SSA names registered
13153 2018-03-08 Richard Biener <rguenther@suse.de>
13155 PR tree-optimization/84178
13156 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13158 (version_loop_for_if_conversion): Delay update_ssa call.
13159 (tree_if_conversion): Delay update_ssa until after predicate
13162 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13164 PR tree-optimization/84178
13165 * tree-if-conv.c (release_bb_predicate): Remove the
13166 the assertion that the stmts have NULL use_ops.
13167 Discard the statements, asserting that they haven't
13168 yet been added to a BB.
13170 2018-03-08 Richard Biener <rguenther@suse.de>
13172 PR tree-optimization/84746
13173 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13174 (phi_translate): Pass in destination ANTIC_OUT set.
13175 (phi_translate_1): Likewise. For a simplified result lookup
13176 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13177 (phi_translate_set): Adjust.
13178 (do_pre_regular_insertion): Likewise.
13179 (do_pre_partial_partial_insertion): Likewise.
13181 2018-03-08 Martin Liska <mliska@suse.cz>
13183 PR gcov-profile/84735
13184 * doc/gcov.texi: Document usage of profile files.
13185 * gcov-io.h: Document changes in the format.
13187 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13191 * dwarf2out.c (struct dw_line_info_table): Update comments for
13193 (FORCE_RESET_NEXT_VIEW): New.
13194 (FORCE_RESETTING_VIEW_P): New.
13195 (RESETTING_VIEW_P): Check for -1 too.
13196 (ZERO_VIEW_P): Likewise.
13197 (new_line_info_table): Force-reset next view.
13198 (dwarf2out_begin_function): Likewise.
13199 (dwarf2out_source_line): Simplify zero_view_p initialization.
13200 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13201 view directly. Omit view when omitting .loc at line 0.
13203 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13205 PR tree-optimization/84740
13206 * tree-switch-conversion.c (process_switch): Call build_constructors
13207 only if info.phi_count is non-zero.
13209 PR tree-optimization/84739
13210 * tree-tailcall.c (find_tail_calls): Check call arguments against
13211 DECL_ARGUMENTS (current_function_decl) rather than
13212 DECL_ARGUMENTS (func) when checking for tail recursion.
13214 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13216 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13217 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13218 Volker Reichelt's entry and add entries for people that perform
13219 GCC fuzzy testing and report numerous bugs.
13221 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13224 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13225 readonly data in sdata, if that is disabled.
13226 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13227 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13228 -mreadonly-in-sdata option.
13230 2018-03-07 Martin Sebor <msebor@redhat.com>
13232 PR tree-optimization/84468
13233 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13234 basic block when looking for nul assignment.
13236 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13239 * except.h (output_function_exception_table): Adjust prototype.
13240 * except.c (output_function_exception_table): Remove FNNAME parameter
13241 and add SECTION parameter. Ouput one part of the table at a time.
13242 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13243 the first part of the exception table and emit unwind directives.
13244 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13245 (i386_pe_seh_cold_init): Likewise.
13246 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13247 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13248 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13249 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13250 * config/i386/winnt.c: Include except.h.
13251 (struct seh_frame_state): Add reg_offset, after_prologue and
13252 in_cold_section fields.
13253 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13254 (i386_pe_seh_cold_init): New function.
13255 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13256 to seh->in_cold_section.
13257 (seh_emit_push): Record the offset of the push.
13258 (seh_emit_save): Record the offet of the save.
13259 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13260 Test seh->after_prologue to disregard the epilogue.
13261 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13262 (i386_pe_end_cold_function): New function.
13264 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13267 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13268 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13271 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13273 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13274 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13276 PR middle-end/84723
13277 * multiple_target.c: Include tree-inline.h and intl.h.
13278 (expand_target_clones): Diagnose and fail if node->definition and
13279 !tree_versionable_function_p (node->decl).
13281 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13283 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13285 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13286 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13287 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13289 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13292 * combine.c (try_combine): Use reg_or_subregno instead of handling
13293 just paradoxical SUBREGs and REGs.
13295 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13297 * config/arc/arc.c (arc_finalize_pic): Remove function.
13298 (arc_must_save_register): We use single base PIC register, remove
13299 checks to save/restore the PIC register.
13300 (arc_expand_prologue): Likewise.
13301 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13303 (arc_verify_short): Likewise.
13304 (arc_attr_type): Likewise.
13305 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13306 (walk_stores): Likewise.
13307 (arc_address_cost): Make it static.
13308 (arc_verify_short): Likewise.
13309 (branch_dest): Likewise.
13310 (arc_attr_type): Likewise.
13311 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13312 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13313 (arc_final_prescan_insn): Remove inserting the nops due to
13314 hardware hazards. It is done in reorg step.
13315 (insn_length_variant_t): Remove.
13316 (insn_length_parameters_t): Likewise.
13317 (arc_insn_length_parameters): Likewise.
13318 (arc_get_insn_variants): Likewise.
13319 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13321 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13323 PR inline-asm/84683
13324 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13327 PR tree-optimization/84687
13328 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13330 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13332 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13334 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13335 Rename to ppc_speculation_barrier.
13336 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13337 __builtin_ppc_speculation_barrier.
13339 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13342 * combine.c (combine_simplify_rtx): Don't try to simplify if
13343 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13346 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13348 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13349 to 32 bytes when compiling for POWER9.
13351 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13354 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13355 regparm >= 3 with no arg reg available also for calls with
13356 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13359 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13361 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13363 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13366 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13368 2018-03-05 Richard Biener <rguenther@suse.de>
13370 PR tree-optimization/84486
13371 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13372 When inserting a __builtin_assume_aligned call set the LHS
13373 SSA name alignment info accordingly.
13375 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13377 PR tree-optimization/84114
13378 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13379 Avoid reassociation of FLOAT_MODE addition.
13381 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13383 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13384 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13385 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13386 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13387 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13388 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13389 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13391 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13392 __builtin_ia32_wbinvd): New builtins.
13393 (SPECIAL_ARGS2): New.
13394 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13395 (SPECIAL_ARGS2): New.
13396 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13397 (ix86_valid_target_attribute_inner_p): Ditto.
13398 (ix86_init_mmx_sse_builtins): Add special_args2.
13399 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13400 TARGET_WBNOINVD_P): New.
13401 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13402 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13403 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13404 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13405 * config/i386/pconfigintrin.h: New file.
13406 * config/i386/wbnoinvdintrin.h: Ditto.
13407 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13409 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13411 2018-03-05 Richard Biener <rguenther@suse.de>
13413 PR tree-optimization/84670
13414 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13416 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13417 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13418 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13419 doesn't grow if all successors (recursively) were visited at least
13422 2018-03-05 Richard Biener <rguenther@suse.de>
13424 PR tree-optimization/84650
13425 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13426 if executed in the loop pipeline.
13428 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13430 * doc/configfiles.texi (Configuration Files): Move info about
13431 conditionalizing $target-protos.h to...
13432 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13433 differs from $target-protos.h.
13435 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13436 Chung-Ju Wu <jasonwucj@gmail.com>
13438 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13439 * config/nds32/nds32-multiple.md (setmemsi): Define.
13440 * config/nds32/nds32-memory-manipulation.c
13441 (nds32_gen_dup_4_byte_to_word_value): New.
13442 (emit_setmem_word_loop): New.
13443 (emit_setmem_byte_loop): New.
13444 (nds32_expand_setmem_loop): New.
13445 (nds32_expand_setmem_loop_v3m): New.
13446 (nds32_expand_setmem_unroll): New.
13447 (nds32_expand_setmem): New.
13449 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13450 Chung-Ju Wu <jasonwucj@gmail.com>
13452 * config/nds32/nds32-memory-manipulation.c
13453 (nds32_emit_load_store): New.
13454 (nds32_emit_post_inc_load_store): New.
13455 (nds32_emit_mem_move): New.
13456 (nds32_emit_mem_move_block): New.
13457 (nds32_expand_movmemsi_loop_unknown_size): New.
13458 (nds32_expand_movmemsi_loop_known_size): New.
13459 (nds32_expand_movmemsi_loop): New.
13460 (nds32_expand_movmemsi_unroll): New.
13461 (nds32_expand_movmemqi): Rename ...
13462 (nds32_expand_movmemsi): ... to this.
13463 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13464 (movmemsi): ... to this.
13465 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13466 (nds32_expand_movmemsi): ... to this.
13468 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13469 Monk Chiang <sh.chiang04@gmail.com>
13470 Chung-Ju Wu <jasonwucj@gmail.com>
13472 * config/nds32/nds32-protos.h
13473 (nds32_expand_load_multiple): New arguments.
13474 (nds32_expand_store_multiple): Ditto.
13475 (nds32_valid_multiple_load_store): Rename ...
13476 (nds32_valid_multiple_load_store_p): ... to this.
13477 * config/nds32/nds32-memory-manipulation.c
13478 (nds32_expand_load_multiple): Refine implementation.
13479 (nds32_expand_store_multiple): Ditto.
13480 * config/nds32/nds32-multiple.md
13481 (load_multiple): Update nds32_expand_load_multiple interface.
13482 (store_multiple): Update nds32_expand_store_multiple interface.
13483 * config/nds32/nds32-predicates.c
13484 (nds32_valid_multiple_load_store): Rename ...
13485 (nds32_valid_multiple_load_store_p): ... to this and refine
13487 * config/nds32/predicates.md
13488 (nds32_load_multiple_and_update_address_operation): New predicate.
13489 (nds32_store_multiple_and_update_address_operation): New predicate.
13491 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13492 Chung-Ju Wu <jasonwucj@gmail.com>
13494 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13495 (combo): New attribute.
13496 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13498 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13500 * config/nds32/nds32.opt: Change -mcmodel= default value.
13502 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13503 Monk Chiang <sh.chiang04@gmail.com>
13504 Chung-Ju Wu <jasonwucj@gmail.com>
13506 * config/nds32/constants.md (unspec_element): New enum.
13507 * config/nds32/constraints.md (Umw): New constraint.
13508 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13509 * config/nds32/nds32-intrinsic.md: Likewise.
13510 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13511 (nds32_valid_smw_lwm_base_p): New.
13512 (nds32_output_smw_single_word): New.
13513 (nds32_output_lmw_single_word): New.
13514 (nds32_expand_unaligned_load): New.
13515 (nds32_expand_unaligned_store): New.
13516 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13517 (nds32_output_smw_single_word): Declare.
13518 (nds32_output_lmw_single_word): Declare.
13519 (nds32_expand_unaligned_load): Declare.
13520 (nds32_expand_unaligned_store): Declare.
13521 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13522 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13523 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13524 NDS32_BUILTIN_UASTORE_DW.
13525 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13528 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13529 Kito Cheng <kito.cheng@gmail.com>
13530 Chung-Ju Wu <jasonwucj@gmail.com>
13532 * config/nds32/nds32-intrinsic.c
13533 (nds32_expand_builtin_null_ftype_reg): Delete.
13534 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13535 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13536 (nds32_read_argument): New.
13537 (nds32_legitimize_target): Ditto.
13538 (nds32_legitimize_argument): Ditto.
13539 (nds32_check_constant_argument): Ditto.
13540 (nds32_expand_unop_builtin): Ditto.
13541 (nds32_expand_unopimm_builtin): Ditto.
13542 (nds32_expand_binop_builtin): Ditto.
13543 (nds32_builtin_decl_impl): Ditto.
13544 (builtin_description): Ditto.
13545 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13546 (nds32_init_builtins_impl): Ditto.
13547 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13548 (nds32_builtin_decl): New.
13549 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13550 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13552 2018-03-02 Jeff Law <law@redhat.com>
13554 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13555 (redundant_insn, fill_simple_delay_slots): Likewise.
13556 (fill_slots_from_thread): Likewise.
13557 * resource.c (mark_referenced_resources): Likewise.
13558 (mark_set_resources, find_dead_or_set_registers): Likewise.
13560 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13562 * substring-locations.h (format_warning_va): Formatting fix for
13563 ATTRIBUTE_GCC_DIAG.
13564 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13566 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13567 * substring-locations.c: Include intl.h.
13568 (format_warning_va): Turned into small wrapper around
13569 format_warning_n_va, renamed to ...
13570 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13571 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13573 (format_warning_at_substring_n): New function.
13574 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13575 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13576 format_warning_at_substring with just a shorter name instead of
13577 const function pointer.
13578 (fmtwarn_n): New function.
13579 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13580 appropriate, get rid of all the fmtstr temporaries, move conditionals
13581 with G_() wrapped string literals directly into fmtwarn arguments,
13582 cast dir.len to (int), formatting fixes.
13584 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13586 * doc/invoke.texi: Remove "Cilk Plus" references.
13588 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13589 Richard Biener <rguenther@suse.de>
13592 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13593 for error or warning attributes if CALL_FROM_THUNK_P is set.
13596 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13599 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13600 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13603 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13604 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13606 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13607 instead of -1U in last predictors element's probability member.
13609 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13612 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13613 arguments if they are comparable.
13615 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13617 PR tree-optimization/84634
13618 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13619 masks and masked_loop_p with a single loop_masks, making sure it's
13620 null for bb vectorization.
13622 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13624 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13625 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13626 loop->force_vectorize to check whether there is no alias.
13628 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13631 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13633 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13635 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13636 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13637 instead of a loop around prev_real_insn.
13638 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13641 PR inline-asm/84625
13642 * config/i386/i386.c (ix86_print_operand): Use conditional
13643 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13646 2018-03-02 Richard Biener <rguenther@suse.de>
13648 PR tree-optimization/84427
13649 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13650 (bitmap_set_subtract_values): Rewrite to handle multiple
13653 (prune_clobbered_mems): Likewise.
13654 (phi_translate): Take edge instead of pred/phiblock.
13655 (phi_translate_1): Likewise.
13656 (phi_translate_set): Likewise. Insert all translated
13657 exprs for a value into the set, keeping possibly multiple
13658 expressions per value.
13659 (compute_antic_aux): Adjust for phi_translate changes.
13660 When intersecting union the expressions and prune those
13661 not in the final value set, keeping possibly multiple
13662 expressions per value. Do not use value-insertion
13663 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13664 all expressions. Add verification that the value-sets
13665 only shrink during iteration.
13666 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13667 (do_pre_regular_insertion): Likewise.
13668 (do_pre_partial_partial_insertion): Likewise.
13670 2018-03-02 Richard Biener <rguenther@suse.de>
13673 * config/darwin.c (saved_debug_info_level): New static global.
13674 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13675 (darwin_asm_lto_end): Restore debug info generation settings.
13677 2018-03-01 Martin Liska <mliska@suse.cz>
13680 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13681 volatile arguments.
13683 2018-03-01 Richard Biener <rguenther@suse.de>
13686 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13687 type annotation with LTO when debug was disabled at compile-time.
13689 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13691 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13693 (mips_final_postscan_insn): Likewise.
13695 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13697 PR rtl-optimization/84528
13698 * alias.c (init_alias_target): Add commentary.
13699 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13700 a unique base value if the frame pointer is not eliminated
13701 to the stack pointer.
13703 2018-03-01 Tom de Vries <tom@codesourcery.com>
13705 PR rtl-optimization/83327
13706 * lra-int.h (hard_regs_spilled_into): Declare.
13707 * lra.c (hard_regs_spilled_into): Define.
13708 (init_reg_info): Init hard_regs_spilled_into.
13709 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13710 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13711 (process_bb_lives): Handle hard_regs_spilled_into.
13712 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13713 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13715 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13717 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13718 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13719 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13720 * config/rs6000/aix72.h: New file.
13722 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13724 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13725 instead of warning_at with conditional singular and plural messages
13729 * stor-layout.c (update_alignment_for_field): For
13730 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13731 && !DECL_PACKED (field), do the alignment update, just use
13732 only desired_align instead of MAX (type_align, desired_align)
13734 (place_field): Don't do known_align < desired_align handling
13735 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13736 is non-NULL, instead do it after rli->prev_field handling and
13737 only if not within a bitfield word. For DECL_PACKED (field)
13738 use type_align of BITS_PER_UNIT.
13740 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13742 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13743 superfluous parentheses and trailing spaces.
13745 2018-02-28 Richard Biener <rguenther@suse.de>
13747 PR tree-optimization/84584
13748 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13749 SCoPs with fake exit edge.
13751 2018-02-28 Martin Liska <mliska@suse.cz>
13754 * timevar.c (timer::print): Fix format to properly print 100%
13757 2018-02-28 Richard Biener <rguenther@suse.de>
13759 PR middle-end/84607
13760 * genmatch.c (capture_info::walk_match): Do not mark
13761 captured expressions without operands as expr_p given
13762 they act more like predicates and should be subject to
13763 "lost tail" side-effect preserving.
13765 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13767 PR rtl-optimization/81611
13768 * auto-inc-dec.c (attempt_change): Move dead note from
13769 mem_insn if it's the next use of regno
13770 (find_address): Take address use of reg holding
13771 non-incremented value. Add parm to limit search to the named
13773 (merge_in_block): Attempt to use a mem insn that is the next
13774 use of the original regno.
13776 2018-02-27 Martin Sebor <msebor@redhat.com>
13779 * doc/invoke.texi (-Wmissing-attributes): New option.
13780 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13782 2018-02-27 Martin Sebor <msebor@redhat.com>
13784 PR translation/84207
13785 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13786 n argument to unsigned HOST_WIDE_INT.
13787 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13788 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13789 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13790 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13792 2018-02-27 Richard Biener <rguenther@suse.de>
13794 PR tree-optimization/84512
13795 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13796 Do not use the estimate returned from record_stmt_cost for
13797 the scalar iteration cost but sum properly using add_stmt_cost.
13799 2018-02-27 Richard Biener <rguenther@suse.de>
13801 PR tree-optimization/84466
13802 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13803 Adjust last change to less strictly validate use operands.
13805 2018-02-27 Martin Liska <mliska@suse.cz>
13807 PR gcov-profile/84548
13808 * gcov.c (process_file): Allow partial overlap and consider it
13809 also as group functions.
13810 (output_lines): Properly calculate range of lines for a group.
13812 2018-02-27 Martin Liska <mliska@suse.cz>
13814 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13815 'ggc' suffixes. Change first column width.
13816 (timer::print): Fix formatting of the column.
13818 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
13820 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13821 preserve inline entry blocks for the sake of debug inline
13822 entry point markers alone.
13823 (remove_unused_locals): Suggest in comments a better place to
13824 force the preservation of inline entry blocks that are
13825 otherwise unused, but do not preserve them.
13827 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13829 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13831 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13834 * config/i386/constraints.md (Bs): Replace
13835 ix86_indirect_branch_register with
13836 TARGET_INDIRECT_BRANCH_REGISTER.
13838 * config/i386/i386.md (indirect_jump): Likewise.
13839 (tablejump): Likewise.
13840 (*sibcall_memory): Likewise.
13841 (*sibcall_value_memory): Likewise.
13842 Peepholes of indirect call and jump via memory: Likewise.
13843 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13844 (*sibcall_value_GOT_32): Likewise.
13845 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13846 (GOT_memory_operand): Likewise.
13847 (call_insn_operand): Likewise.
13848 (sibcall_insn_operand): Likewise.
13849 (GOT32_symbol_operand): Likewise.
13850 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13852 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13854 PR rtl-optimization/83496
13855 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13856 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
13857 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13858 redundant insn, if any.
13859 (relax_delay_slots): Likewise.
13860 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13862 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
13864 PR tree-optimization/83965
13865 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13866 that grouped statements are part of a reduction chain. Return
13867 true if the statement is not marked as a reduction itself but
13868 is part of a group.
13869 (vect_recog_dot_prod_pattern): Don't check whether the statement
13870 is part of a group here.
13871 (vect_recog_sad_pattern): Likewise.
13872 (vect_recog_widen_sum_pattern): Likewise.
13874 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13877 * final.c (rest_of_clean_state): Also look for calls inside sequences.
13879 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13882 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13884 (ix86_output_indirect_function_return): New prototype.
13885 (ix86_split_simple_return_pop_internal): Likewise.
13886 * config/i386/i386.c (indirect_return_via_cx): New.
13887 (indirect_return_via_cx_bnd): Likewise.
13888 (indirect_thunk_name): Handle return va CX_REG.
13889 (output_indirect_thunk_function): Create alias for
13890 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13891 (ix86_output_indirect_jmp): Remove the bool argument.
13892 (ix86_output_indirect_function_return): New function.
13893 (ix86_split_simple_return_pop_internal): Likewise.
13894 * config/i386/i386.md (*indirect_jump): Don't pass false
13895 to ix86_output_indirect_jmp.
13896 (*tablejump_1): Likewise.
13897 (simple_return_pop_internal): Change it to define_insn_and_split.
13898 Call ix86_split_simple_return_pop_internal to split it for
13899 -mfunction-return=.
13900 (simple_return_indirect_internal): Call
13901 ix86_output_indirect_function_return instead of
13902 ix86_output_indirect_jmp.
13904 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13907 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13908 memset and value initialization afterwards.
13910 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13912 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13914 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13917 * common/config/aarch64/aarch64-common.c
13918 (aarch_option_optimization_table[]): Switch
13919 off fomit-frame-pointer
13921 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13922 Chung-Ju Wu <jasonwucj@gmail.com>
13924 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13926 (store_multiple): Ditto.
13928 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13930 * config.gcc: Add --with-cpu support for nds32 target.
13931 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13932 * config/nds32/nds32.opt: Add -mcpu= option.
13934 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13936 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13937 isel=yes): Warn for these deprecated options.
13939 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13941 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13942 ISA_2_5_MASKS_EMBEDDED.
13944 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13946 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13947 p->max as pointers rather than using iterative_hash_expr.
13949 2018-02-23 Carl Love <cel@us.ibm.com>
13951 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13952 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13954 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13955 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13956 P8V_BUILTIN_VEC_VUNSIGNED2.
13958 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13961 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13962 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13964 * lra-constraints.c (curr_insn_transform): Set up
13965 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13967 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13968 * lra-eliminations.c (spill_pseudos): Ditto.
13969 (process_insn_for_elimination): Ditto.
13970 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13971 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13972 LRA_NON_CLOBBERED_ALT.
13974 2018-02-22 Martin Sebor <msebor@redhat.com>
13976 PR tree-optimization/84480
13977 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13978 to maybe_diag_stxncpy_trunc. Call it.
13979 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13980 from gimple_fold_builtin_strcpy. Print inlining stack.
13981 (handle_builtin_stxncpy): Print inlining stack.
13982 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13984 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13987 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13988 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13989 and -fcheck-pointer-bounds are used together.
13990 (indirect_thunk_prefix): New enum.
13991 (indirect_thunk_need_prefix): New function.
13992 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13993 "_nt" instead of "_bnd" for NOTRACK prefix.
13994 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13995 (output_indirect_thunk_function): Likewise.
13997 (ix86_code_end): Update output_indirect_thunk_function calls.
13998 (ix86_output_indirect_branch_via_reg): Replace
13999 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14000 (ix86_output_indirect_branch_via_push): Likewise.
14001 (ix86_output_function_return): Likewise.
14002 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14003 incompatible with -fcf-protection=branch and
14004 -fcheck-pointer-bounds.
14006 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14009 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14010 Change gcc_assert call to output_operand_lossage.
14012 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14014 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14016 2018-02-22 DJ Delorie <dj@redhat.com>
14017 Sebastian Perta <sebastian.perta@renesas.com>
14018 Oleg Endo <olegendo@gcc.gnu.org>
14020 * config/rx/rx.c (rx_rtx_costs): New function.
14021 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14023 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14025 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14027 2018-02-22 Martin Liska <mliska@suse.cz>
14030 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14031 Add "native" as a possible value.
14033 2018-02-22 Martin Liska <mliska@suse.cz>
14036 * config/i386/i386.c (ix86_option_override_internal):
14037 Add "native" as a possible value for -march and -mtune.
14039 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14042 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14043 to all type variants.
14045 PR tree-optimization/84503
14046 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14047 width as info->bitpos + info->bitsize - start.
14048 (merged_store_group::merge_overlapping): Simplify width computation.
14049 (check_no_overlap): New function.
14050 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14051 start + width and last_order of the group, fail if check_no_overlap
14053 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14054 to group if check_no_overlap fails.
14056 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14058 * config/rs6000/altivec.md: Delete contraint arguments to
14059 define_expand, define_split, and define_peephole2, and in
14060 define_insn_and_split if always unused.
14061 * config/rs6000/darwin.md: Ditto.
14062 * config/rs6000/dfp.md: Ditto.
14063 * config/rs6000/rs6000.md: Ditto.
14064 * config/rs6000/sync.md: Ditto.
14065 * config/rs6000/vector.md: Ditto.
14066 * config/rs6000/vsx.md: Ditto.
14068 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14070 * config/rs6000/altivec.md: Write output control strings as braced
14071 blocks instead of double-quoted strings.
14072 * config/rs6000/darwin.md: Ditto.
14073 * config/rs6000/rs6000.md: Ditto.
14074 * config/rs6000/vector.md: Ditto.
14075 * config/rs6000/vsx.md: Ditto.
14077 2018-02-21 Jason Merrill <jason@redhat.com>
14079 PR c++/84314 - ICE with templates and fastcall attribute.
14080 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14082 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14084 * ipa-cp.c (determine_versionability): Fix comment typos.
14086 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14089 * ipa-cp.c (determine_versionability): Do not version functions caling
14092 2018-02-21 Martin Liska <mliska@suse.cz>
14095 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14096 Add "native" as a possible value.
14097 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14098 the macro when native cpu detection is available.
14100 2018-02-21 Martin Liska <mliska@suse.cz>
14103 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14104 Add "native" as a possible value.
14105 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14106 when native cpu detection is available.
14108 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14109 Martin Sebor <msebor@redhat.com>
14111 PR tree-optimization/84478
14112 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14114 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14115 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14116 support which is conservatively correct, for 2 only stay conservative
14117 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14118 argument to the 2 argument get_range_strlen, adjust 6 arg
14119 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14121 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14122 (gimple_fold_builtin_strlen): Pass true as last argument to
14125 2018-02-20 Martin Sebor <msebor@redhat.com>
14127 PR middle-end/84095
14128 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14129 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14130 (builtin_memref::builtin_memref): Factor out parts into
14131 set_base_and_offset and call it.
14133 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14135 PR middle-end/84406
14136 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14137 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14138 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14139 search at the associated MODE_INT.
14141 2018-02-20 Jeff Law <law@redhat.com>
14143 PR middle-end/82123
14144 PR tree-optimization/81592
14145 PR middle-end/79257
14146 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14147 for range data rather than using global data.
14148 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14149 range data rather than using global data.
14150 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14151 pass it to children as needed.
14152 (struct directive::fmtresult): Similarly.
14153 (struct directive::set_width): Similarly.
14154 (struct directive::set_precision): Similarly.
14155 (format_integer, format_directive, parse_directive): Similarly.
14156 (format_none): Accept unnamed vr_values parameter.
14157 (format_percent, format_floating, format_character): Similarly.
14158 (format_string, format_plain): Similarly.
14159 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14160 the EVRP range analyzer for range data rather than using global data.
14161 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14162 gimple-ssa-evrp-analyze.h
14163 (class sprintf_dom_walker): Add after_dom_children member function.
14164 Add evrp_range_analyzer member.
14165 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14166 range analyzer as needed.
14167 (sprintf_dom_walker::after_dom_children): New member function.
14168 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14170 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14171 (evrp_range_analyzer::pop_to_marker): Likewise.
14173 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14175 PR tree-optimization/84419
14176 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14177 with the required type if its current type is compatible but
14180 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14182 PR middle-end/82004
14183 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14184 after vectorization.
14186 2018-02-20 Martin Liska <mliska@suse.cz>
14189 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14190 possible values if we don't have a hint.
14192 2018-02-20 Martin Liska <mliska@suse.cz>
14196 * final.c (shorten_branches): Build align_tab array with one
14198 * opts.c (finish_options): Add alignment option limit check.
14199 (MAX_CODE_ALIGN): Likewise.
14200 (MAX_CODE_ALIGN_VALUE): Likewise.
14201 * doc/invoke.texi: Document maximum allowed option value for
14202 all -falign-* options.
14204 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14207 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14208 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14209 * var-tracking.c (emit_note_insn_var_location): Remove all references
14210 to NOTE_INSN_CALL_ARG_LOCATION.
14211 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14212 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14213 Use copy_rtx_if_shared.
14214 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14215 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14216 (dwarf2out_var_location): Remove handling of
14217 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14219 * final.c (final_scan_insn): Remove all references to
14220 NOTE_INSN_CALL_ARG_LOCATION.
14221 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14222 before dumping final insns.
14223 * except.c (emit_note_eh_region_end): Remove all references to
14224 NOTE_INSN_CALL_ARG_LOCATION.
14225 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14226 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14227 * config/arc/arc.c (hwloop_optimize): Likewise.
14228 * config/arm/arm.c (create_fix_barrier): Likewise.
14229 * config/s390/s390.c (s390_chunkify_start): Likewise.
14230 * config/sh/sh.c (find_barrier): Likewise.
14231 * config/i386/i386.c (rest_of_insert_endbranch,
14232 ix86_seh_fixup_eh_fallthru): Likewise.
14233 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14234 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14235 * config/frv/frv.c (frv_function_prologue): Likewise.
14236 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14238 (note_outside_basic_block_p): Remove all references to
14239 NOTE_INSN_CALL_ARG_LOCATION.
14240 * gengtype.c (adjust_field_rtx_def): Likewise.
14241 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14243 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14244 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14247 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14250 PR tree-optimization/84452
14251 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14252 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14255 2018-02-19 Martin Liska <mliska@suse.cz>
14258 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14260 2018-02-19 Martin Liska <mliska@suse.cz>
14261 Richard Sandiford <richard.sandiford@linaro.org>
14263 PR tree-optimization/82491
14264 * gimple-fold.c (get_base_constructor): Make earlier bail out
14267 2018-02-19 Carl Love <cel@us.ibm.com>
14269 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14270 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14272 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14273 P8V_BUILTIN_VEC_NEG.
14275 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14277 * config/rl78/rl78.md (movdf): New define expand.
14279 2018-02-19 Martin Liska <mliska@suse.cz>
14282 * doc/invoke.texi: Fix typo.
14283 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14285 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14287 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14288 handle rs6000_single_float and rs6000_double_float specially for
14291 2018-02-16 Jeff Law <law@redhat.com>
14293 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14294 (pop_regs): Use it.
14296 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14299 * ipa-inline.c (inline_small_functions): Fix a typo.
14301 2018-02-16 Nathan Sidwell <nathan@acm.org>
14303 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14305 2018-02-16 Carl Love <cel@us.ibm.com>
14307 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14308 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14309 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14310 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14311 expansion to P8V_BUILTIN_VEC_FLOAT2.
14313 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14315 PR rtl-optimization/70023
14316 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14317 src_regno into account.
14319 2018-02-16 Carl Love <cel@us.ibm.com>
14321 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14322 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14323 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14324 * config/rs6000/rs6000.c: Remove case statements for
14325 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14326 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14327 and P9V_BUILTIN_VEC_VINSERT4B.
14328 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14329 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14330 * config/rs6000/vsx.md:
14331 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14334 2018-02-16 Carl Love <cel@us.ibm.com>
14336 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14338 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14340 * config/rs6000/rs6000-c.c: Add the definitions for
14341 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14342 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14343 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14344 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14345 definition for insert4b and define insn *insert3b_internal.
14346 * doc/extend.texi: Add documentation for vec_extract4b.
14348 2018-02-16 Nathan Sidwell <nathan@acm.org>
14350 * doc/extend.texi (Backwards Compatibility): Mention friend
14351 injection. Note for-scope is deprecated.
14352 * doc/invoke.texi (-ffriend-injection): Deprecate.
14354 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14356 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14357 that moved to I2, also allow destinations that are a paradoxical
14358 subreg (instead of a normal reg).
14360 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14363 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14366 2018-02-16 Richard Biener <rguenther@suse.de>
14368 PR tree-optimization/84037
14369 PR tree-optimization/84016
14371 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14372 Adjust vec_construct for the fact we need additional higher latency
14373 128bit inserts for AVX256 and AVX512 vector builds.
14374 (ix86_add_stmt_cost): Scale vector construction cost for
14377 2018-02-16 Richard Biener <rguenther@suse.de>
14379 PR tree-optimization/84417
14380 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14381 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14382 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14384 2018-02-16 Martin Liska <mliska@suse.cz>
14387 * internal-fn.def (ASAN_CHECK): Set proper flags.
14388 (ASAN_MARK): Likewise.
14390 2018-02-16 Julia Koval <julia.koval@intel.com>
14392 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14393 from PTA_CANNONLAKE.
14395 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14398 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14399 Use ++iter rather than iter++ for std::list iterators.
14400 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14401 defer deleting them until all nodes in the forest are processed. Do
14402 free even leaf nodes. Change to_process into auto_vec.
14405 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14406 * vec.h (vec_default_construct): Use memset instead of placement new
14407 if BROKEN_VALUE_INITIALIZATION is defined.
14408 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14409 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14412 PR rtl-optimization/83723
14413 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14414 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14415 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14417 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14419 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14421 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14423 PR rtl-optimization/81443
14424 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14425 from inner REGs to paradoxical SUBREGs.
14427 2018-02-16 Richard Biener <rguenther@suse.de>
14429 PR tree-optimization/84399
14430 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14431 For operands we can analyze at their definition make sure we can
14432 analyze them at each use as well.
14434 2018-02-16 Richard Biener <rguenther@suse.de>
14436 PR tree-optimization/84190
14437 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14438 volatile accesses if the decl isn't volatile.
14440 2018-02-15 Jason Merrill <jason@redhat.com>
14442 PR c++/84314 - ICE with templates and fastcall attribute.
14443 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14444 TYPE_CANONICAL on an existing type.
14446 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14448 PR tree-optimization/84383
14449 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14450 dstoff nor call operand_equal_p if dstbase is NULL.
14452 PR tree-optimization/84334
14453 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14454 also a CONSTANT_CLASS_P, punt.
14456 2018-02-14 Jim Wilson <jimw@sifive.com>
14458 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14459 first SMALL_OPERAND check. New local min_second_step. Move assert
14460 to where locals are set. Add TARGET_RVC support.
14461 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14463 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14465 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14467 2018-02-14 Martin Sebor <msebor@redhat.com>
14469 PR tree-optimization/83698
14470 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14471 arrays constrain the offset range to their bounds.
14472 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14473 (builtin_access::overlap): Avoid setting the size of overlap if it's
14475 (maybe_diag_overlap): Also consider arrays when deciding what values
14476 of offsets to include in diagnostics.
14478 2018-02-14 Martin Sebor <msebor@redhat.com>
14481 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14482 that correspond to the kind of a declaration.
14484 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14487 * config/pa/pa.md: Load address of PIC label using the linkage table
14488 if the label is nonlocal.
14490 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14492 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14493 warning message if user requests -maltivec=be.
14494 * doc/invoke.texi: Document deprecation of -maltivec=be.
14496 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14499 * config/rs6000/rs6000-c.c: Update definitions for
14500 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14501 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14503 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14506 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14507 add _get_ssp intrinsics. Remove argument from
14508 __builtin_ia32_rdssp[d|q].
14509 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14510 * config/i386/i386-builtin.def: Remove argument from
14511 __builtin_ia32_rdssp[d|q].
14512 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14513 ix86_expand_special_args_builtin for _rdssp[d|q].
14514 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14515 Clear register before usage.
14516 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14517 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14519 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14521 PR tree-optimization/84357
14522 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14523 operand 1 of an ARRAY_REF too.
14525 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14528 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14529 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14531 (set_of_reg): New struct.
14532 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14533 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14534 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14536 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14537 Split into bitclr, bitset, bitinvert patterns if appropriate.
14538 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14539 use rx_fuse_in_memory_bitop.
14540 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14541 to named insn, correct maximum insn length.
14543 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14546 * machmode.def: Define a complex mode for PARTIAL_INT.
14547 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14549 * doc/rtl.texi: Document CSPImode.
14550 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14552 (msp430_hard_regno_nregs_with_padding): Likewise.
14554 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14557 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14559 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14561 PR rtl-optimization/84169
14562 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14563 we generated a parallel as new i3 and we split that to new i2 and i3
14564 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14565 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14566 those to i2, not i1. Partially rewrite this scan code.
14568 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14571 * stor-layout.c (place_field): For variable length fields, adjust
14572 offset_align afterwards not just based on the field's alignment,
14573 but also on the size.
14575 PR middle-end/84309
14576 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14577 of exps and logs in the use_exp2 case.
14579 2018-02-13 Jeff Law <law@redhat.com>
14581 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14582 entry for "vector".
14584 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14587 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14591 * common.opt (gas-loc-support, gas-locview-support): New.
14592 (ginline-points, ginternal-reset-location-views): New.
14593 * doc/invoke.texi: Document them. Use @itemx where intended.
14594 (gvariable-location-views): Adjust.
14595 * target.def (reset_location_view): New.
14596 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14597 (TARGET_RESET_LOCATION_VIEW): New.
14598 * doc/tm.texi: Rebuilt.
14599 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14600 (dwarf2out_default_as_locview_support): New.
14601 (output_asm_line_debug_info): Use option variables.
14602 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14603 (output_loc_list): Likewise.
14604 (add_high_low_attributes): Check option variables.
14605 Don't output entry view attribute in strict mode.
14606 (gen_inlined_subroutine_die): Check option variables.
14607 (dwarf2out_inline_entry): Likewise.
14608 (init_sections_and_labels): Likewise.
14609 (dwarf2out_early_finish): Likewise.
14610 (maybe_reset_location_view): New, from...
14611 (dwarf2out_var_location): ... here. Call it.
14612 * debug.h (dwarf2out_default_as_loc_support): Declare.
14613 (dwarf2out_default_as_locview_support): Declare.
14614 * hooks.c (hook_int_rtx_insn_0): New.
14615 * hooks.h (hook_int_rtx_insn_0): Declare.
14616 * toplev.c (process_options): Take -gas-loc-support and
14617 -gas-locview-support from dwarf2out. Enable
14618 -gvariable-location-views by default only with locview
14619 assembler support. Enable -ginternal-reset-location-views by
14620 default only if the target defines the corresponding hook.
14621 Enable -ginline-points by default if location views are
14622 enabled; force it disabled if statement frontiers are
14624 * tree-inline.c (expand_call_inline): Check option variables.
14625 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14627 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14629 PR tree-optimization/84321
14630 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14631 handling. Also check whether the anti-range contains any values
14632 that satisfy the mask; switch to a VR_RANGE if not.
14634 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14637 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14639 2018-02-13 Martin Jambor <mjambor@suse.cz>
14642 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14643 of call statements, also set location of a load to a temporary.
14645 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14647 * config/rl78/rl78.c (add_vector_labels): New function.
14648 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14649 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14650 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14651 which checks that no arguments are passed.
14652 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14653 * doc/extend.texi: Documentation for the new attribute.
14655 2018-02-13 Andreas Schwab <schwab@suse.de>
14657 * config/riscv/linux.h (CPP_SPEC): Define.
14659 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14662 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14663 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14664 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14665 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14666 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14667 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14668 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14669 temporarily for AES and PCLMUL builtins.
14671 PR tree-optimization/84339
14672 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14673 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14676 PR middle-end/84309
14677 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14678 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14679 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14681 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14683 * omp-simd-clone.h: New file.
14684 * omp-simd-clone.c: Include omp-simd-clone.h.
14685 (expand_simd_clones): No longer static.
14686 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14687 cgraph.h and omp-simd-clone.h.
14688 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14689 (vect_recog_widen_shift_pattern): Formatting fix.
14690 (vect_pattern_recog_1): Don't check optab for calls.
14693 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14694 operands[2] into a REG before using gen_lowpart on it.
14696 2018-02-12 Jeff Law <law@redhat.com>
14699 * config/sh/sh.c (find_barrier): Consider a sibling call
14702 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14703 successfully back substituting a reg.
14705 2018-02-12 Richard Biener <rguenther@suse.de>
14707 PR tree-optimization/84037
14708 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14709 parameter, move visited init to caller.
14710 (vect_slp_analyze_operations): Separate cost from validity
14711 check, initialize visited once for all instances.
14712 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14714 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14716 (vect_model_promotion_demotion_cost): Likewise.
14717 (vectorizable_bswap): Guard cost modeling with !slp_node
14718 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14720 (vectorizable_call): Likewise.
14721 (vectorizable_conversion): Likewise.
14722 (vectorizable_assignment): Likewise.
14723 (vectorizable_shift): Likewise.
14724 (vectorizable_operation): Likewise.
14725 (vectorizable_store): Likewise.
14726 (vectorizable_load): Likewise.
14727 (vectorizable_condition): Likewise.
14728 (vectorizable_comparison): Likewise.
14730 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14733 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14734 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14735 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14737 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14739 PR middle-end/83665
14740 * params.def (inline-min-speedup): Increase from 8 to 15.
14741 (max-inline-insns-auto): Decrease from 40 to 30.
14742 * ipa-split.c (consider_split): Add some buffer for function to
14743 be considered inlining candidate.
14744 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14747 2018-02-12 Richard Biener <rguenther@suse.de>
14749 PR tree-optimization/84037
14750 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14751 matched stmts if we cannot swap the non-matched ones.
14753 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14755 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14756 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14757 _mm_maskz_scalef_round_ss): New intrinsics.
14758 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14759 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14760 __builtin_ia32_scalefss_round): Remove.
14761 (__builtin_ia32_scalefsd_mask_round,
14762 __builtin_ia32_scalefss_mask_round): New intrinsics.
14763 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14764 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14765 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14766 "<round_constraint>")): Changed to ...
14767 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14768 "<round_scalar_constraint>")): ... this.
14769 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14770 %0, %1, %2<round_op3>}"): Changed to ...
14771 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14772 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14773 %2<round_scalar_mask_op3>}"): ... this.
14774 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14776 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14778 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14779 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14780 (_mm_maskz_sqrt_round_ss): New intrinsics.
14781 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14782 (__builtin_ia32_sqrtsd_mask_round)
14783 (__builtin_ia32_sqrtss_mask_round): New builtins.
14784 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14785 (__builtin_ia32_sqrtss_round): Remove.
14786 (__builtin_ia32_sqrtsd_mask_round)
14787 (__builtin_ia32_sqrtss_mask_round): New builtins.
14788 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14789 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14790 ((match_operand:VF_128 1 "vector_operand"
14791 "xBm,<round_constraint>")): Changed to ...
14792 ((match_operand:VF_128 1 "vector_operand"
14793 "xBm,<round_scalar_constraint>")): ... this.
14794 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14795 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14796 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14797 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14798 %<iptr>1<round_scalar_mask_op3>}): ... this.
14799 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14800 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14802 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14805 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14806 Cast vec_cmpeq result to correct type.
14807 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14808 Cast vec_cmpgt result to correct type.
14810 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
14812 * final.c (final_scan_insn_1): Renamed from...
14813 (final_scan_insn): ... this. New wrapper, to recover
14814 seen from the outermost call in recursive ones.
14815 * config/sparc/sparc.c (output_return): Drop seen from call.
14816 (output_sibcall): Likewise.
14817 * config/visium/visium.c (output_branch): Likewise.
14819 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
14821 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14824 2018-02-10 Alan Modra <amodra@gmail.com>
14827 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14828 Specify LR as an input.
14830 2018-02-10 Jakub Jelinek <jakub@redhat.com>
14833 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14834 remove_member_access_dummy_vars): New functions.
14835 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14836 lower_omp_1, execute_lower_omp): Use them.
14838 PR rtl-optimization/84308
14839 * shrink-wrap.c (spread_components): Release todo vector.
14841 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
14843 PR rtl-optimization/57193
14844 * ira-color.c (struct allocno_color_data): Add member
14845 conflict_allocno_hard_prefs.
14846 (update_conflict_allocno_hard_prefs): New.
14847 (bucket_allocno_compare_func): Add a preference based on
14848 conflict_allocno_hard_prefs.
14849 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14850 (color_allocnos): Remove a dead code. Initiate
14851 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
14853 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14856 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14857 constraint from =wa to wa. Avoid a subreg on the output operand,
14858 instead use a pseudo and subreg it in a move.
14859 (p9_xxbrd_<mode>): Changed to ...
14860 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14861 (p9_xxbrd_v2df): New expander.
14862 (p9_xxbrw_<mode>): Changed to ...
14863 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14864 (p9_xxbrw_v4sf): New expander.
14866 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14868 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14870 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
14873 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14874 multiply in 32-bit mode.
14875 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14876 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14879 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14881 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14882 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14883 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14884 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14886 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14889 * dwarf2out.c (is_trivial_indirect_ref): New function.
14890 (dwarf2out_late_global_decl): Do not generate a location
14891 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14892 and that are not defined in the current unit.
14894 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14896 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14897 instead of a libcall for UNORDERED.
14899 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14902 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14903 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14905 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14908 * config/s390/s390.c (s390_set_current_function): Invoke
14909 s390_indirect_branch_settings also if fndecl didn't change.
14911 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14913 * config/rs6000/rs6000.md (blockage): Set length to zero.
14915 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14917 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14919 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14922 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14923 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14927 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14928 PARALLEL incoming that failed vt_get_decl_and_offset check.
14930 PR middle-end/84237
14931 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14932 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14934 (get_variable_section): For decls in named .bss* sections pass true as
14935 second argument to bss_initializer_p.
14937 2018-02-09 Marek Polacek <polacek@redhat.com>
14938 Jakub Jelinek <jakub@redhat.com>
14941 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14942 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14943 Sync some changes from cxx_fold_indirect_ref.
14945 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14947 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14949 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14950 (BLOCK_INLINE_ENTRY_LABEL): New.
14951 (dwarf2out_var_location): Disregard inline entry markers.
14952 (inline_entry_data): New struct.
14953 (inline_entry_data_hasher): New hashtable type.
14954 (inline_entry_data_hasher::hash): New.
14955 (inline_entry_data_hasher::equal): New.
14956 (inline_entry_data_table): New variable.
14957 (add_high_low_attributes): Add DW_AT_entry_pc and
14958 DW_AT_GNU_entry_view attributes if a pending entry is found
14959 in inline_entry_data_table. Add old entry_pc attribute only
14960 if debug nonbinding markers are disabled.
14961 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14962 markers are enabled.
14963 (block_within_block_p, dwarf2out_inline_entry): New.
14964 (dwarf2out_finish): Check that no entries remained in
14965 inline_entry_data_table.
14966 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14967 (final_scan_insn, notice_source_line): Likewise.
14968 (rest_of_clean_state): Skip inline entry markers.
14969 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14971 * gimple.c (gimple_build_debug_inline_entry): New.
14972 * gimple.h (enum gimple_debug_subcode): Add
14973 GIMPLE_DEBUG_INLINE_ENTRY.
14974 (gimple_build_debug_inline_entry): Declare.
14975 (gimple_debug_inline_entry_p): New.
14976 (gimple_debug_nonbind_marker_p): Adjust.
14977 * insn-notes.def (INLINE_ENTRY): New.
14978 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14979 inline entry marker notes.
14980 (print_insn): Likewise.
14981 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14982 (INSN_DEBUG_MARKER_KIND): Likewise.
14983 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14984 * tree-inline.c (expand_call_inline): Build and insert
14985 debug_inline_entry stmt.
14986 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14987 inline entry blocks early, if nonbind markers are enabled.
14988 (dump_scope_block): Dump fragment info.
14989 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14990 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14991 (gimple_build_debug_inline_entry): New.
14992 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14993 Enable/disable inline entry points too.
14994 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14995 (DEBUG_INSN): Describe inline entry markers.
14997 * common.opt (gvariable-location-views): New.
14998 (gvariable-location-views=incompat5): New.
14999 * config.in: Rebuilt.
15000 * configure: Rebuilt.
15001 * configure.ac: Test assembler for view support.
15002 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15003 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15004 * dwarf2out.c (var_loc_view): New typedef.
15005 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15006 (dwarf2out_locviews_in_attribute): New.
15007 (dwarf2out_locviews_in_loclist): New.
15008 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15009 (enum dw_line_info_opcode): Add LI_adv_address.
15010 (struct dw_line_info_table): Add view.
15011 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15012 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15013 (zero_view_p): New variable.
15014 (ZERO_VIEW_P): New macro.
15015 (output_asm_line_debug_info): New.
15016 (struct var_loc_node): Add view.
15017 (add_AT_view_list, AT_loc_list): New.
15018 (add_var_loc_to_decl): Add view param. Test it against last.
15019 (new_loc_list): Add view params. Record them.
15020 (AT_loc_list_ptr): Handle loc and view lists.
15021 (view_list_to_loc_list_val_node): New.
15022 (print_dw_val): Handle dw_val_class_view_list.
15023 (size_of_die): Likewise.
15024 (value_format): Likewise.
15025 (loc_list_has_views): New.
15026 (gen_llsym): Set vl_symbol too.
15027 (maybe_gen_llsym, skip_loc_list_entry): New.
15028 (dwarf2out_maybe_output_loclist_view_pair): New.
15029 (output_loc_list): Output view list or entries too.
15030 (output_view_list_offset): New.
15031 (output_die): Handle dw_val_class_view_list.
15032 (output_dwarf_version): New.
15033 (output_compilation_unit_header): Use it.
15034 (output_skeleton_debug_sections): Likewise.
15035 (output_rnglists, output_line_info): Likewise.
15036 (output_pubnames, output_aranges): Update version comments.
15037 (output_one_line_info_table): Output view numbers in asm comments.
15038 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15039 Call maybe_gen_llsym.
15040 (loc_list_from_tree_1): Adjust.
15041 (add_AT_location_description): Create view list attribute if
15042 needed, check it's absent otherwise.
15043 (convert_cfa_to_fb_loc_list): Adjust.
15044 (maybe_emit_file): Call output_asm_line_debug_info for test.
15045 (dwarf2out_var_location): Reset views as needed. Precompute
15046 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15047 attribute. Set view.
15048 (new_line_info_table): Reset next view.
15049 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15050 (dwarf2out_source_line): Likewise. Output view resets and labels to
15051 the assembler, or select appropriate line info opcodes.
15052 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15053 (optimize_string_length): Catch it. Adjust.
15054 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15055 dw_val_class_view_list, and remove it if no longer needed.
15056 (hash_loc_list): Hash view numbers.
15057 (loc_list_hasher::equal): Compare them.
15058 (optimize_location_lists): Check whether a view list symbol is
15059 needed, and whether the locview attribute is present, and
15060 whether they match. Remove the locview attribute if no longer
15062 (index_location_lists): Call skip_loc_list_entry for test.
15063 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15064 Use output_dwarf_version.
15065 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15066 (struct dw_val_node): Add val_view_list.
15067 * final.c (SEEN_NEXT_VIEW): New.
15068 (set_next_view_needed): New.
15069 (clear_next_view_needed): New.
15070 (maybe_output_next_view): New.
15071 (final_start_function): Rename to...
15072 (final_start_function_1): ... this. Take pointer to FIRST,
15073 add SEEN parameter. Emit param bindings in the initial view.
15074 (final_start_function): Reintroduce SEEN-less interface.
15075 (final): Rename to...
15076 (final_1): ... this. Take SEEN parameter. Output final pending
15077 next view at the end.
15078 (final): Reintroduce seen-less interface.
15079 (final_scan_insn): Output pending next view before switching
15080 sections or ending a block. Mark the next view as needed when
15081 outputting variable locations. Notify debug backend of section
15082 changes, and of location view changes.
15083 (rest_of_handle_final): Adjust.
15084 * toplev.c (process_options): Autodetect value for debug variable
15085 location views option. Warn on incompat5 without -gdwarf-5.
15086 * doc/invoke.texi (gvariable-location-views): New.
15087 (gvariable-location-views=incompat5): New.
15088 (gno-variable-location-views): New.
15090 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15092 PR tree-optimization/84136
15093 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15094 that the result of find_edge is non-NULL.
15096 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15099 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15100 storing integer register in SImode. Fix cost of 256 and 512
15101 byte aligned SSE register store.
15103 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15105 * config/i386/i386.c (ix86_multiplication_cost): Fix
15106 multiplication cost for TARGET_AVX512DQ.
15108 2018-02-08 Marek Polacek <polacek@redhat.com>
15110 PR tree-optimization/84238
15111 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15114 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15116 PR tree-optimization/84265
15117 * tree-vect-stmts.c (vectorizable_store): Don't treat
15118 VMAT_CONTIGUOUS accesses as grouped.
15119 (vectorizable_load): Likewise.
15121 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15123 PR tree-optimization/81635
15124 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15125 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15126 (test_round_for_mask): New functions.
15127 (wide_int_cc_tests): Call test_round_for_mask.
15128 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15129 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15130 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15131 range returned by get_range_info.
15133 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15136 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15137 * symtab.c: Include builtins.h
15138 (symtab_node::output_to_lto_symbol_table_p): Move here
15139 from lto-streamer-out.c:output_symbol_p.
15140 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15141 (output_symbol_p): Move all logic to symtab.c
15142 (produce_symtab): Update.
15144 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15146 * config/s390/s390-opts.h (enum indirect_branch): Define.
15147 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15148 (s390_indirect_branch_via_thunk)
15149 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15150 (enum s390_indirect_branch_type): Define.
15151 * config/s390/s390.c (struct s390_frame_layout, struct
15152 machine_function): Remove.
15153 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15154 (indirect_branch_table_label_no, indirect_branch_table_name):
15156 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15157 (enum s390_indirect_branch_option): Define.
15158 (s390_return_addr_from_memory): New function.
15159 (s390_handle_string_attribute): New function.
15160 (s390_attribute_table): Add new attribute handler.
15161 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15162 (s390_indirect_branch_via_thunk): New function.
15163 (s390_indirect_branch_via_inline_thunk): New function.
15164 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15165 sibling call optimization for non z10 compiles.
15166 (s390_emit_call): Force indirect branch target to be a single
15167 register. Add r1 clobber for non-z10 compiles.
15168 (s390_emit_epilogue): Emit return jump via return_use expander.
15169 (s390_reorg): Handle JUMP_INSNs as execute targets.
15170 (s390_option_override_internal): Perform validity checks for the
15171 new command line options.
15172 (s390_indirect_branch_attrvalue): New function.
15173 (s390_indirect_branch_settings): New function.
15174 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15175 (s390_output_indirect_thunk_function): New function.
15176 (s390_code_end): Implement target hook.
15177 (s390_case_values_threshold): Implement target hook.
15178 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15180 * config/s390/s390.h (struct s390_frame_layout)
15181 (struct machine_function): Move here from s390.c.
15182 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15183 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15184 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15185 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15186 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15187 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15188 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15189 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15190 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15191 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15192 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15193 (mnemonic attribute): Add values which aren't recognized
15195 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15196 pattern for branch conversion. Fix mnemonic attribute.
15197 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15198 indirect branch via thunk if requested.
15199 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15200 ("*indirect_jump"): Disable for branch conversion using out of
15202 ("indirect_jump_via_thunk<mode>_z10")
15203 ("indirect_jump_via_thunk<mode>")
15204 ("indirect_jump_via_inlinethunk<mode>_z10")
15205 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15206 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15207 ("casesi_jump_via_inlinethunk<mode>_z10")
15208 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15209 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15210 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15211 ("*indirect2_jump"): Disable for branch conversion.
15212 ("casesi_jump"): Turn into expander and expand patterns for branch
15214 ("return_use"): New expander.
15215 ("*return"): Emit return via thunk and rename it to ...
15216 ("*return<mode>"): ... this one.
15217 * config/s390/s390.opt: Add new options and and enum for the
15220 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15222 * lra-constraints.c (match_reload): Unconditionally use
15223 gen_lowpart_SUBREG, rather than selecting between that
15224 and equivalent gen_rtx_SUBREG code.
15226 2018-02-08 Richard Biener <rguenther@suse.de>
15228 PR tree-optimization/84233
15229 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15230 changed flag instead of boguously re-using phi_inserted.
15232 2018-02-08 Martin Jambor <mjambor@suse.cz>
15234 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15235 static local variables.
15237 2018-02-08 Richard Biener <rguenther@suse.de>
15239 PR tree-optimization/84278
15240 * tree-vect-stmts.c (vectorizable_store): When looking for
15241 smaller vector types to perform grouped strided loads/stores
15242 make sure the mode is supported by the target.
15243 (vectorizable_load): Likewise.
15245 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15247 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15248 Increase LDP/STP opportunities by adding adjacent callee-saves.
15250 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15252 PR rtl-optimization/84068
15253 PR rtl-optimization/83459
15254 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15256 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15258 PR tree-optimization/84224
15259 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15260 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15261 non-zero arguments.
15263 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15266 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15267 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15268 count, remove one USE.
15270 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15272 * doc/install.texi (Configuration): Document the
15273 --with-long-double-format={ibm,ieee} PowerPC configuration
15277 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15278 Convert from define_expand to be define_insn_and_split. Rework
15279 float/double/_Float128 conversions to QI/HI/SImode to work with
15280 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15281 conversions to QI/HImode types did a store and then a load to
15282 truncate the value. For conversions to VSX registers, don't split
15283 the insn, instead emit the code directly. Use the code iterator
15284 any_fix to combine signed and unsigned conversions.
15285 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15286 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15287 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15288 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15289 (fix_<mode>di2_hw): Likewise.
15290 (fixuns_<mode>di2_hw): Likewise.
15291 (fix_<mode>si2_hw): Likewise.
15292 (fixuns_<mode>si2_hw): Likewise.
15293 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15294 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15295 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15296 fix<uns>_trunc<SFDF:mode>si2_p8.
15297 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15298 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15299 (fix<uns>_<mode>_mem): Likewise.
15300 (fctiw<u>z_<mode>_mem): Likewise.
15301 (fix<uns>_<mode>_mem): Likewise.
15302 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15303 the register allocator from doing a direct move to the GPRs to do
15304 a store, and instead use the ISA 3.0 store byte/half-word from
15305 vector register instruction. For IEEE 128-bit floating point,
15306 also optimize stores of 32-bit ints.
15307 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15309 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15311 * genextract.c (push_pathstr_operand): New function to support
15313 (walk_rtx): Call push_pathstr_operand.
15314 (print_path): Support [a-zA-Z].
15316 2018-02-07 Richard Biener <rguenther@suse.de>
15318 PR tree-optimization/84037
15319 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15320 (cse_and_gimplify_to_preheader): Declare.
15321 (vect_get_place_in_interleaving_chain): Likewise.
15322 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15324 (_loop_vec_info::~_loop_vec_info): Delete it.
15325 (cse_and_gimplify_to_preheader): New function.
15326 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15327 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15328 (vectorizable_load): Likewise. For grouped stores always base
15329 the IV on the first element.
15330 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15331 condition before gimplifying.
15333 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15335 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15336 *DIV_EXPR and *MOD_EXPR.
15338 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15341 * config/i386/i386.c (ix86_option_override_internal): Mask out
15342 the CF_SET bit when checking -fcf-protection.
15344 2018-02-07 Tom de Vries <tom@codesourcery.com>
15347 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15350 2018-02-07 Richard Biener <rguenther@suse.de>
15352 PR tree-optimization/84204
15353 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15356 PR tree-optimization/84205
15357 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15358 special-case isl_ast_op_zdiv_r.
15360 PR tree-optimization/84223
15361 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15362 Only add conditions from within the region.
15363 (gather_bbs::after_dom_children): Adjust.
15365 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15368 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15369 * config/avr/avr.md: Only post-reload split REG-REG moves if
15370 either register is GENERAL_REG_P.
15372 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15374 PR tree-optimization/84235
15375 * tree-ssa-scopedtables.c
15376 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15377 if the subtraction is performed in floating point type where NaNs are
15378 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15379 build 1. Formatting fix.
15381 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15384 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15385 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15386 and skip it regardless of bb boundaries. Use CALL_P macro,
15387 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15388 unnecessarily, formatting fix.
15390 2018-02-06 Michael Collison <michael.collison@arm.com>
15392 * config/arm/thumb2.md:
15393 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15394 (*thumb_mov_notscc): Ditto.
15396 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15399 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15400 unsigned_fix, not "s".
15402 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15404 * configure.ac (gcc_fn_eh_frame_ro): New function.
15405 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15406 correct .eh_frame permissions.
15407 * configure: Regenerate.
15409 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15411 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15412 irrelevant options.
15414 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15416 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15417 Display warning message for -mno-speculate-indirect-jumps.
15419 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15421 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15423 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15425 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15427 PR tree-optimization/84225
15428 * tree-eh.c (find_trapping_overflow): Only call
15429 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15431 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15434 * config/i386/i386.c: Reimplement the check of possible options
15435 -mibt/-mshstk conbination. Change error messages.
15436 * doc/invoke.texi: Fix a typo: remove extra '='.
15438 2018-02-06 Marek Polacek <polacek@redhat.com>
15440 PR tree-optimization/84228
15441 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15443 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15446 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15447 emitted arch directives.
15448 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15449 __ARM_FEATURE_COPROC before changing architectures.
15451 2018-02-06 Richard Biener <rguenther@suse.de>
15453 * config/i386/i386.c (print_reg): Fix typo.
15454 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15456 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15458 * configure: Regenerate.
15460 2018-02-05 Martin Sebor <msebor@redhat.com>
15462 PR tree-optimization/83369
15463 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15466 2018-02-05 Martin Liska <mliska@suse.cz>
15468 * doc/invoke.texi: Cherry-pick upstream r323995.
15470 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15472 * ira.c (ira_init_register_move_cost): Adjust comment.
15474 2018-02-05 Martin Liska <mliska@suse.cz>
15476 PR gcov-profile/84137
15477 * doc/gcov.texi: Fix typo in documentation.
15479 2018-02-05 Martin Liska <mliska@suse.cz>
15481 PR gcov-profile/83879
15482 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15483 using dlopen functionality.
15485 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15487 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15488 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15489 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15490 _mm_maskz_range_round_ss): New intrinsics.
15491 (__builtin_ia32_rangesd128_round)
15492 (__builtin_ia32_rangess128_round): Remove.
15493 (__builtin_ia32_rangesd128_mask_round,
15494 __builtin_ia32_rangess128_mask_round): New builtins.
15495 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15496 __builtin_ia32_rangess128_round): Remove.
15497 (__builtin_ia32_rangesd128_mask_round,
15498 __builtin_ia32_rangess128_mask_round): New builtins.
15499 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15500 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15501 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15502 "<round_saeonly_constraint>")): Changed to ...
15503 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15504 "<round_saeonly_scalar_constraint>")): ... this.
15505 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15506 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15507 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15508 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15509 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15511 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15513 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15515 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15516 Remove all values except native, 8540 and 8548.
15518 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15520 * config/i386/i386.c (ix86_output_function_return): Pass
15521 INVALID_REGNUM, instead of -1, as invalid register number to
15522 indirect_thunk_name and output_indirect_thunk.
15524 2018-02-02 Julia Koval <julia.koval@intel.com>
15526 * config.gcc: Add -march=icelake.
15527 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15528 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15529 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15530 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15531 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15532 (processor_target_table): Add icelake.
15533 (ix86_option_override_internal): Handle new PTAs.
15534 (get_builtin_code_for_version): Handle icelake.
15535 (M_INTEL_COREI7_ICELAKE): New.
15536 (fold_builtin_cpu): Handle icelake.
15537 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15538 * doc/invoke.texi: Add -march=icelake.
15540 2018-02-02 Julia Koval <julia.koval@intel.com>
15542 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15543 to wide_int_bitmask.
15544 * wide-int-bitmask.h: New.
15546 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15549 * config/i386/i386.md: Replace Pmode with word_mode in
15550 builtin_setjmp_setup and builtin_longjmp to support x32.
15552 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15556 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15558 (rs6000_supported_cpu_names): New static variable.
15559 (linux_cpu_translation_table): Likewise.
15560 (elf_platform) <cpu>: Define new static variable and use it.
15561 Translate kernel AT_PLATFORM name to canonical name if needed.
15562 Error if platform name is unknown.
15564 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15567 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15569 2018-02-01 Jeff Law <law@redhat.com>
15572 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15573 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15574 the scratch if RELEASE_VIA_POP is false.
15575 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15576 If we have to save a temporary register, decrement SIZE appropriately.
15577 Pass new arguments to release_scratch_register_on_entry.
15578 (ix86_adjust_stack_and_probe): Likewise.
15579 (ix86_emit_probe_stack_range): Pass new arguments to
15580 release_scratch_register_on_entry.
15582 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15584 PR rtl-optimization/84157
15585 * combine.c (change_zero_ext): Use REG_P predicate in
15586 front of HARD_REGISTER_P predicate.
15588 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15590 * config/avr/avr.c (avr_option_override): Move disabling of
15591 -fdelete-null-pointer-checks to...
15592 * common/config/avr/avr-common.c (avr_option_optimization_table):
15595 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15597 PR tree-optimization/81635
15598 * tree-data-ref.c (split_constant_offset_1): For types that
15599 wrap on overflow, try to use range info to prove that wrapping
15602 2018-02-01 Renlin Li <renlin.li@arm.com>
15605 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15606 TAILCALL_ADDR_REGS.
15607 (aarch64_register_move_cost): Likewise.
15608 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15609 TAILCALL_ADDR_REGS.
15610 (REG_CLASS_NAMES): Likewise.
15611 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15612 TAILCALL_ADDR_REGS. Remove IP registers.
15613 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15615 2018-02-01 Richard Biener <rguenther@suse.de>
15617 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15618 for specifying RPO order and allow NULL for that.
15619 * domwalk.c (dom_walker::dom_walker): Likewise.
15620 (dom_walker::walk): Handle NULL RPO order.
15621 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15623 (rewrite_update_dom_walker): Likewise.
15624 (mark_def_dom_walker): Likewise.
15626 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15628 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15629 (aarch64_maybe_expand_sve_subreg_move): Declare.
15630 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15631 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15633 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15634 that are semantically a reverse operation.
15635 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15636 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15637 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15639 (aarch64_can_change_mode_class): For big-endian, forbid changes
15640 between two SVE modes if they have different element sizes.
15642 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15644 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15645 the TImode handling for big-endian targets.
15647 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15649 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15650 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15652 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15653 Remove BSWAP handing for big-endian targets and use the form of
15654 LD1RQ appropariate for the mode.
15656 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15658 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15659 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15660 duplicated element.
15662 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15665 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15666 check for operands that need to go through aarch64_sve_reload_be.
15668 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15670 PR tree-optimization/81661
15671 PR tree-optimization/84117
15672 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15673 * tree-eh.c: Include gimplify.h.
15674 (find_trapping_overflow, replace_trapping_overflow,
15675 rewrite_to_non_trapping_overflow): New functions.
15676 * tree-vect-loop.c: Include tree-eh.h.
15677 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15678 * tree-data-ref.c: Include tree-eh.h.
15679 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15681 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15683 PR rtl-optimization/84123
15684 * combine.c (change_zero_ext): Check if hard register satisfies
15685 can_change_dest_mode before calling gen_lowpart_SUBREG.
15687 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15690 * ira.c (ira_init_register_move_cost): Remove assert.
15692 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15694 PR rtl-optimization/84071
15695 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15696 * doc/tm.texi: Regenerate.
15698 2018-01-31 Richard Biener <rguenther@suse.de>
15700 PR tree-optimization/84132
15701 * tree-data-ref.c (analyze_miv_subscript): Properly
15702 check whether evolution_function_is_affine_multivariate_p
15703 before calling gcd_of_steps_may_divide_p.
15705 2018-01-31 Julia Koval <julia.koval@intel.com>
15708 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15709 * config/i386/i386.md (rdpid_rex64) New.
15710 (rdpid): Make 32bit only.
15712 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15715 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15716 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15718 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15721 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15723 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15725 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15727 PR rtl-optimization/84071
15728 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15729 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15731 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15733 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15734 (arc_attribute_table): Add 'aux' attribute.
15735 (arc_in_small_data_p): Consider aux like variables.
15736 (arc_is_aux_reg_p): New function.
15737 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15738 (arc_get_aux_arg): New function.
15739 (prepare_move_operands): Handle aux-register access.
15740 (arc_handle_aux_attribute): New function.
15741 * doc/extend.texi (ARC Variable attributes): Add subsection.
15743 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15745 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15746 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15747 (arc_attribute_table): Add 'uncached' attribute.
15748 (arc_print_operand): Print '.di' flag for uncached memory
15750 (arc_in_small_data_p): Do not consider for small data the uncached
15752 (arc_is_uncached_mem_p): New function.
15753 * config/arc/predicates.md (compact_store_memory_operand): Check
15754 for uncached memory accesses.
15755 (nonvol_nonimm_operand): Likewise.
15756 * doc/extend.texi (ARC Type Attribute): New subsection.
15758 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15761 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15762 falign-loops=): Add Optimization flag.
15764 2018-01-30 Jeff Law <law@redhat.com>
15767 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15768 INT_REGISTERS_SAVED. Check it prior to calling
15769 get_scratch_register_on_entry.
15770 (ix86_adjust_stack_and_probe): Similarly.
15771 (ix86_emit_probe_stack_range): Similarly.
15772 (ix86_expand_prologue): Corresponding changes.
15774 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15777 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15778 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15780 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15783 * lra-constraints.c (curr_insn_transform): Process AND in the
15786 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15788 PR rtl-optimization/83986
15789 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15790 dependence against last_pending_memory_flush in addition to
15791 pending_jump_insns.
15793 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15795 PR tree-optimization/81611
15796 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15799 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15802 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15805 2018-01-30 Richard Biener <rguenther@suse.de>
15806 Jakub Jelinek <jakub@redhat.com>
15808 PR tree-optimization/84111
15809 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15810 inner loops added during recursion, as they don't have up-to-date
15813 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15816 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15817 (can_inline_edge_by_limits_p): ... here.
15818 (can_early_inline_edge_p, check_callers,
15819 update_caller_keys, update_callee_keys, recursive_inlining,
15820 add_new_edges_to_heap, speculation_useful_p,
15821 inline_small_functions,
15822 inline_small_functions, flatten_function,
15823 inline_to_all_callers_1): Update.
15825 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15827 * profile-count.c (profile_count::combine_with_ipa_count): Handle
15830 2018-01-30 Richard Biener <rguenther@suse.de>
15832 PR tree-optimization/83008
15833 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15834 invariant and constant vector uses in stmts when they need
15835 more than one stmt.
15837 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15840 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15841 * configure: Regenerate.
15843 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15845 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15847 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15848 Use gen_rtx_REG rather than gen_lowpart.
15850 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15852 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15853 rather than 0 when creating partial subregs.
15855 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15857 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15860 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15863 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15864 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15865 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15866 flags. This restores the settings used before the 2017-07-24.
15867 Turning off pre increment/decrement/modify allows IVOPTS to
15868 optimize DF/SF loops where the index is an int.
15870 2018-01-29 Richard Biener <rguenther@suse.de>
15871 Kelvin Nilsen <kelvin@gcc.gnu.org>
15874 * tree-vect-stmts.c (vectorizable_call): Don't call
15875 targetm.vectorize_builtin_md_vectorized_function if callee is
15878 2018-01-22 Carl Love <cel@us.ibm.com>
15880 * doc/extend.tex: Fix typo in second arg in
15881 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15883 2018-01-29 Richard Biener <rguenther@suse.de>
15885 PR tree-optimization/84086
15886 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15887 (flush_ssaname_freelist): When SSA names were released reset
15888 the SCEV hash table.
15890 2018-01-29 Richard Biener <rguenther@suse.de>
15892 PR tree-optimization/84057
15893 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15894 removed paths when removing edges.
15896 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15898 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15899 -mfunction-return=@var{choice}.
15901 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15903 PR diagnostic/84034
15904 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15905 Handle CR like TAB.
15906 (layout::print_source_line): Likewise.
15907 (test_get_line_width_without_trailing_whitespace): Add test cases.
15909 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15911 PR middle-end/84040
15912 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15915 2018-01-26 Jim Wilson <jimw@sifive.com>
15917 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15919 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15922 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15924 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15925 and CMP + SUB-immediate -> SUBS.
15927 2018-01-26 Martin Sebor <msebor@redhat.com>
15929 PR tree-optimization/83896
15930 * tree-ssa-strlen.c (get_string_len): Rename...
15931 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15932 Avoid assuming length is constant.
15933 (handle_char_store): Use HOST_WIDE_INT for string length.
15935 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15938 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15939 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15941 2018-01-26 Richard Biener <rguenther@suse.de>
15943 PR rtl-optimization/84003
15944 * dse.c (record_store): Only record redundant stores when
15945 the earlier store aliases at least all accesses the later one does.
15947 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15949 PR rtl-optimization/83985
15950 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15951 REG_CFA_RESTORE insns.
15952 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15953 REG_CFA_RESTORE insns here.
15956 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15957 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15959 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15961 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15962 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15963 (arc_init): Likewise.
15964 (arc_override_options): Likewise.
15965 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15967 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15969 * config/arc/arc.h (TARGET_DBNZ): Define.
15970 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15971 properly set the tune attribute.
15972 (dbnz): Use TARGET_DBNZ guard.
15973 * config/arc/arc.opt (mtune): Add core3 option.
15975 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15977 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15978 recognize new pic like addresses.
15979 (arc_delegitimize_address): Clean up.
15981 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15983 * config/arc/arc-arches.def: Option mrf16 valid for all
15985 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15986 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15987 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15988 * config/arc/arc-tables.opt: Regenerate.
15989 * config/arc/arc.c (arc_conditional_register_usage): Handle
15990 reduced register file case.
15991 (arc_file_start): Set must have build attributes.
15992 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15993 mrf16 option value.
15994 * config/arc/arc.opt (mrf16): Add new option.
15995 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15996 * config/arc/genmultilib.awk: Handle new mrf16 option.
15997 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15998 * config/arc/t-multilib: Regenerate.
15999 * doc/invoke.texi (ARC Options): Document mrf16 option.
16001 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16003 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16004 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16005 (arc_attribute_table): Add 'secure_call' attribute.
16006 (arc_print_operand): Print secure call operand.
16007 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16009 (arc_is_secure_call_p): New function. * config/arc/arc.md
16010 (call_i): Add support for sjli instruction.
16011 (call_value_i): Likewise.
16012 * config/arc/constraints.md (Csc): New constraint.
16014 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16015 John Eric Martin <John.Martin@emmicro-us.com>
16017 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16018 * config/arc/arc.c (_arc_jli_section): New struct.
16019 (arc_jli_section): New type.
16020 (rc_jli_sections): New static variable.
16021 (arc_handle_jli_attribute): New function.
16022 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16023 (arc_file_end): New function.
16024 (TARGET_ASM_FILE_END): Define.
16025 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16026 (arc_add_jli_section): New function.
16027 (jli_call_scan): Likewise.
16028 (arc_reorg): Call jli_call_scan.
16029 (arc_output_addsi): Remove 'S' from printing asm operand.
16030 (arc_is_jli_call_p): New function.
16031 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16033 (movhi_insn): Likewise.
16034 (movsi_insn): Likewise.
16035 (movsi_set_cc_insn): Likewise.
16036 (loadqi_update): Likewise.
16037 (load_zeroextendqisi_update): Likewise.
16038 (load_signextendqisi_update): Likewise.
16039 (loadhi_update): Likewise.
16040 (load_zeroextendhisi_update): Likewise.
16041 (load_signextendhisi_update): Likewise.
16042 (loadsi_update): Likewise.
16043 (loadsf_update): Likewise.
16044 (movsicc_insn): Likewise.
16045 (bset_insn): Likewise.
16046 (bxor_insn): Likewise.
16047 (bclr_insn): Likewise.
16048 (bmsk_insn): Likewise.
16049 (bicsi3_insn): Likewise.
16050 (cmpsi_cc_c_insn): Likewise.
16051 (movsi_ne): Likewise.
16052 (movsi_cond_exec): Likewise.
16053 (clrsbsi2): Likewise.
16054 (norm_f): Likewise.
16064 (call_i): Remove 'S' asm letter, add jli instruction.
16065 (call_value_i): Likewise.
16066 * config/arc/arc.op (mjli-always): New option.
16067 * config/arc/constraints.md (Cji): New constraint.
16068 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16070 (subsf3_fpx): Likewise.
16071 (mulsf3_fpx): Likewise.
16072 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16074 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16075 function attrbutes.
16076 * doc/invoke.texi (ARC): Document mjli-always option.
16078 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16080 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16081 avoid addition with 0 and use incw and decw where possible.
16083 2018-01-26 Richard Biener <rguenther@suse.de>
16085 PR tree-optimization/81082
16086 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16087 association if it requires casting to unsigned.
16088 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16089 from fold_plusminus_mult_expr to catch important cases late when
16090 range info is available.
16092 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16094 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16095 * configure.ac (hidden_linkonce): New test.
16096 * configure: Regenerate.
16097 * config.in: Regenerate.
16099 2018-01-26 Julia Koval <julia.koval@intel.com>
16101 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16102 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16103 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16104 _mm_mask_bitshuffle_epi64_mask): Fix type.
16105 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16106 USI_FTYPE_V4DI_V4DI_USI): Remove.
16107 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16108 __builtin_ia32_vpshufbitqmb256_mask,
16109 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16110 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16111 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16113 2018-01-26 Alan Modra <amodra@gmail.com>
16116 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16117 UNSPEC_VBPERMQ. Sort other unspecs.
16119 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16121 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16123 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16125 PR middle-end/83055
16126 * predict.c (drop_profile): Do not push/pop cfun; update also
16128 (handle_missing_profiles): Fix logic looking for zero profiles.
16130 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16132 PR middle-end/83977
16133 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16134 on functions with #pragma omp declare simd or functions with simd
16136 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16137 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16138 Remove trailing \n from warning_at calls.
16140 2018-01-25 Tom de Vries <tom@codesourcery.com>
16143 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16144 for neutered workers.
16146 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16149 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16150 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16152 2018-01-24 Jeff Law <law@redhat.com>
16155 * i386.c (get_probe_interval): Move to earlier point.
16156 (ix86_compute_frame_layout): If -fstack-clash-protection and
16157 the frame is larger than the probe interval, then use pushes
16158 to save registers rather than reg->mem moves.
16159 (ix86_expand_prologue): Remove conditional for int_registers_saved
16162 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16165 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16166 min/max for never referenced object.
16168 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16170 PR middle-end/83977
16171 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16173 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16174 attributes from DECL_ATTRIBUTES (decl) without affecting
16175 DECL_ATTRIBUTES (current_function_decl).
16176 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16177 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16179 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16181 PR tree-optimization/83979
16182 * fold-const.c (fold_comparison): Use constant_boolean_node
16183 instead of boolean_{true,false}_node.
16185 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16187 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16190 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16192 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16193 Simplify the clause that sets the length attribute.
16194 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16195 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16196 clause that sets the length attribute.
16197 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16199 2018-01-24 Tom de Vries <tom@codesourcery.com>
16202 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16203 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16204 Add strict parameter.
16205 (prevent_branch_around_nothing): Insert dummy insn between branch to
16206 label and label with no ptx insn inbetween.
16207 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16209 2018-01-24 Tom de Vries <tom@codesourcery.com>
16212 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16213 for neutered threads in warp.
16214 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16216 2018-01-24 Richard Biener <rguenther@suse.de>
16218 PR tree-optimization/83176
16219 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16222 2018-01-24 Richard Biener <rguenther@suse.de>
16224 PR tree-optimization/82819
16225 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16226 code generating pluses that are no-ops in the target precision.
16228 2018-01-24 Richard Biener <rguenther@suse.de>
16230 PR middle-end/84000
16231 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16233 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16235 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16236 to merge probabilities.
16237 * predict.c (probably_never_executed): Also mark as cold functions
16238 with global 0 profile and guessed local profile.
16239 * profile-count.c (profile_probability::combine_with_count): New
16241 * profile-count.h (profile_probability::operator*,
16242 profile_probability::operator*=, profile_probability::operator/,
16243 profile_probability::operator/=): Reduce precision to adjusted
16244 and set value to guessed on contradictory divisions.
16245 (profile_probability::combine_with_freq): Remove.
16246 (profile_probability::combine_wiht_count): Declare.
16247 (profile_count::force_nonzero):: Set to adjusted.
16248 (profile_count::probability_in):: Set quality to adjusted.
16249 * tree-ssa-tail-merge.c (replace_block_by): Use
16250 combine_with_count.
16252 2018-01-23 Andrew Waterman <andrew@sifive.com>
16253 Jim Wilson <jimw@sifive.com>
16255 * config/riscv/riscv.c (riscv_stack_boundary): New.
16256 (riscv_option_override): Set riscv_stack_boundary. Handle
16257 riscv_preferred_stack_boundary_arg.
16258 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16259 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16260 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16261 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16262 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16263 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16265 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16268 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16269 of struct ix86_frame.
16270 (ix86_expand_epilogue): Likewise. Add a local variable for
16271 the reg_save_offset field in struct ix86_frame.
16273 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16275 PR tree-optimization/82604
16276 * tree-loop-distribution.c (enum partition_kind): New enum item
16277 PKIND_PARTIAL_MEMSET.
16278 (partition_builtin_p): Support above new enum item.
16279 (generate_code_for_partition): Ditto.
16280 (compute_access_range): Differentiate cases that equality can be
16281 proven at all loops, the innermost loops or no loops.
16282 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16283 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16284 (finalize_partitions, distribute_loop): Don't fuse partition of
16285 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16286 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16287 parloop is enabled.
16289 2018-01-23 Martin Liska <mliska@suse.cz>
16291 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16292 order to ignore the predictor.
16293 (PRED_POLYMORPHIC_CALL): Likewise.
16294 (PRED_RECURSIVE_CALL): Likewise.
16296 2018-01-23 Martin Liska <mliska@suse.cz>
16298 * tree-profile.c (tree_profiling): Print function header to
16299 aware reader which function we are working on.
16300 * value-prof.c (gimple_find_values_to_profile): Do not print
16301 not interesting value histograms.
16303 2018-01-23 Martin Liska <mliska@suse.cz>
16305 * profile-count.h (enum profile_quality): Add
16306 profile_uninitialized as the first value. Do not number values
16307 as they are zero based.
16308 (profile_count::verify): Update sanity check.
16309 (profile_probability::verify): Likewise.
16311 2018-01-23 Nathan Sidwell <nathan@acm.org>
16313 * doc/invoke.texi (ffor-scope): Deprecate.
16315 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16317 PR tree-optimization/83510
16318 * domwalk.c (set_all_edges_as_executable): New function.
16319 (dom_walker::dom_walker): Convert bool param
16320 "skip_unreachable_blocks" to enum reachability. Move setup of
16321 edge flags to set_all_edges_as_executable and only do it when
16322 reachability is REACHABLE_BLOCKS.
16323 * domwalk.h (enum dom_walker::reachability): New enum.
16324 (dom_walker::dom_walker): Convert bool param
16325 "skip_unreachable_blocks" to enum reachability.
16326 (set_all_edges_as_executable): New decl.
16327 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16328 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16330 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16331 but converting true to REACHABLE_BLOCKS.
16332 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16334 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16335 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16336 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16338 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16339 if check_all_array_refs will be called.
16341 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16343 * tree.c (selftest::test_location_wrappers): Add more test
16346 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16348 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16349 (selftest::test_bit_in_range): Likewise.
16351 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16354 * doc/sourcebuild.texi (vect_float): Say that the selector
16355 only describes the situation when -funsafe-math-optimizations is on.
16356 (vect_float_strict): Document.
16358 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16360 PR tree-optimization/83965
16361 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16362 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16363 instead of checking only for a reduction.
16364 (vect_recog_widen_sum_pattern): Likewise.
16366 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16368 * predict.c (probably_never_executed): Only use precise profile info.
16369 (compute_function_frequency): Skip after inlining hack since we now
16370 have quality checking.
16372 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16374 * profile-count.h (profile_probability::very_unlikely,
16375 profile_probability::unlikely, profile_probability::even): Set
16376 precision to guessed.
16378 2018-01-23 Richard Biener <rguenther@suse.de>
16380 PR tree-optimization/83963
16381 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16382 Properly terminate dominator walk when crossing the exit edge not
16383 when visiting its source block.
16385 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16388 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16389 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16391 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16393 PR tree-optimization/83957
16394 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16395 semicolon after for body surrounded by braces.
16397 PR tree-optimization/83081
16398 * profile-count.h (profile_probability::split): New method.
16399 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16400 Use profile_probability::split.
16401 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16402 when splitting a single conditional jump into 2.
16404 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16406 PR tree-optimization/69452
16407 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16410 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16412 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16413 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16414 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16416 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16418 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16420 * config/rl78/rl78.md (movdi): New define_expand.
16421 * config/rl78/rl78.c (rl78_split_movdi): New function.
16423 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16426 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16428 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16429 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16430 128-bit to produce an UNSPEC move to get the double word with the
16431 signbit and then a shift directly to do signbit.
16432 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16433 implementation with a new version that just does either a direct
16434 move or a regular move. Move memory interface to separate insns.
16435 Move insns so they are next to the expander.
16436 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16437 with signbit move. Split big and little endian case.
16438 (signbit<mode>2_dm_mem_le): Likewise.
16439 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16440 (signbit<mode>2_dm2): Likewise.
16442 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16444 * config/rl78/rl78.md (anddi3): New define_expand.
16446 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16448 * config/rl78/rl78.md (umindi3): New define_expand.
16450 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16452 * config/rl78/rl78.md (smindi3): New define_expand.
16454 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16456 * config/rl78/rl78.md (smaxdi3): New define_expand.
16458 2018-01-22 Carl Love <cel@us.ibm.com>
16460 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16461 LVX_V1TI): Add macro expansion.
16462 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16463 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16464 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16465 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16466 Change check to determine if the instruction is a byte reversing
16467 entry. Fix typo in comment.
16468 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16469 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16470 Add def_builtin calls for new builtins.
16471 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16472 Add define_insn expansion.
16474 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16476 * config/rl78/rl78.md (umaxdi3): New define_expand.
16478 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16480 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16481 for non-QImode registers.
16483 2018-01-22 Richard Biener <rguenther@suse.de>
16485 PR tree-optimization/83963
16486 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16487 including the loop exit block.
16488 (scop_detection::merge_sese): Likewise.
16489 (scop_detection::add_scop): Do it here instead.
16491 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16493 * doc/sourcebuild.texi (arm_softfloat): Document.
16495 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16498 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16499 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16500 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16502 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16503 David Edelsohn <dje.gcc@gmail.com>
16506 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16507 Change "crset eq" to "crset 2".
16508 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16509 (*call_indirect_aix<mode>_nospec): Likewise.
16510 (*call_value_indirect_aix<mode>_nospec): Likewise.
16511 (*call_indirect_elfv2<mode>_nospec): Likewise.
16512 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16513 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16514 change assembly output from . to $.
16515 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16516 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16517 (*tablejump<mode>_internal1_nospec): Likewise.
16519 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16522 * config/sh/sh_optimize_sett_clrt.cc:
16523 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16525 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16527 PR tree-optimization/83940
16528 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16529 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16530 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16531 use it to pass back the definition type.
16532 (vect_check_store_rhs): Likewise rhs_dt_out.
16533 (vect_build_gather_load_calls): Add a mask_dt argument and use
16534 it instead of a call to vect_is_simple_use.
16535 (vectorizable_store): Update calls to vect_check_load_store_mask
16536 and vect_check_store_rhs. Use the dt returned by the latter instead
16537 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16538 instead of calls to vect_is_simple_use. Pass the scalar rather
16539 than the vector operand to vect_is_simple_use when handling
16540 second and subsequent copies of an rhs value.
16541 (vectorizable_load): Update calls to vect_check_load_store_mask
16542 and vect_build_gather_load_calls. Use the cached mask_dt and
16543 gs_info.offset_dt instead of calls to vect_is_simple_use.
16545 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16547 PR middle-end/83945
16548 * tree-emutls.c: Include gimplify.h.
16549 (lower_emutls_2): New function.
16550 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16551 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16552 it before further processing.
16555 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16556 UINTVAL (trueop1) instead of INTVAL (op1).
16558 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16562 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16563 INCOMING_FRAME_SP_OFFSET if not defined.
16564 (scan_trace): Add ENTRY argument. If true and
16565 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16566 emit a note to adjust the CFA offset.
16567 (create_cfi_notes): Adjust scan_trace callers.
16568 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16569 INCOMING_FRAME_SP_OFFSET in the CIE.
16570 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16571 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16573 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16574 * doc/tm.texi: Regenerated.
16576 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16578 PR rtl-optimization/83147
16579 * lra-constraints.c (remove_inheritance_pseudos): Use
16580 lra_substitute_pseudo_within_insn.
16582 2018-01-19 Tom de Vries <tom@codesourcery.com>
16583 Cesar Philippidis <cesar@codesourcery.com>
16586 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16588 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16591 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16592 spaces for function labels.
16594 2018-01-19 Martin Liska <mliska@suse.cz>
16596 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16597 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16598 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16599 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16600 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16601 (PRED_CONST_RETURN): Change from 69 to 65.
16602 (PRED_NULL_RETURN): Change from 91 to 71.
16603 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16604 (PRED_LOOP_GUARD): Change from 66 to 73.
16606 2018-01-19 Martin Liska <mliska@suse.cz>
16608 * predict.c (predict_insn_def): Add new assert.
16609 (struct branch_predictor): Change type to signed integer.
16610 (test_prediction_value_range): Amend test to cover
16611 PROB_UNINITIALIZED.
16612 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16613 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16614 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16615 (PRED_LOOP_IV_COMPARE): Likewise.
16616 * predict.h (PROB_UNINITIALIZED): Define new constant.
16618 2018-01-19 Martin Liska <mliska@suse.cz>
16620 * predict.c (dump_prediction): Add new format for
16621 analyze_brprob.py script which is enabled with -details
16623 * profile-count.h (precise_p): New function.
16625 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16627 PR tree-optimization/83922
16628 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16629 there are no statements that need masking.
16630 (vect_active_double_reduction_p): New function.
16631 (vect_analyze_loop_operations): Use it when handling phis that
16632 are not in the loop header.
16634 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16636 PR tree-optimization/83914
16637 * tree-vect-loop.c (vectorizable_induction): Don't convert
16638 init_expr or apply the peeling adjustment for inductions
16639 that are nested within the vectorized loop.
16641 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16643 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16646 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16650 * function.h (gimplify_parameters): Add gimple_seq * argument.
16651 * function.c: Include gimple.h and options.h.
16652 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16653 for the added local temporaries if needed.
16654 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16655 if there are any parameter cleanups, wrap whole body into a
16656 try/finally with the cleanups.
16658 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16661 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16662 Use GET_MODE_CLASS for scalar floating point.
16664 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16668 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16669 Fix call of call_cgraph_insertion_hooks.
16671 2018-01-18 Martin Sebor <msebor@redhat.com>
16673 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16675 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16678 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16681 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16684 * common.opt: (-ffile-prefix-map): New option.
16685 * opts.c (common_handle_option): Defer it.
16686 * opts-global.c (handle_common_deferred_options): Handle it.
16687 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16688 * file-prefix-map.h: New file.
16689 (remap_debug_filename, add_debug_prefix_map): ...here.
16690 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16691 * final.c (debug_prefix_map, add_debug_prefix_map
16692 remap_debug_filename): Move to...
16693 * file-prefix-map.c: New file.
16694 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16695 generalize, get rid of alloca(), use strrchr() instead of strchr().
16696 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16697 Implement in terms of add_prefix_map().
16698 (remap_macro_filename, remap_debug_filename): Implement in term of
16700 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16701 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16702 * dbxout.c: Include file-prefix-map.h.
16703 * varasm.c: Likewise.
16704 * vmsdbgout.c: Likewise.
16705 * xcoffout.c: Likewise.
16706 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16707 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16708 * doc/invoke.texi (-ffile-prefix-map): Document.
16709 (-fdebug-prefix-map): Update description.
16711 2018-01-18 Martin Liska <mliska@suse.cz>
16713 * config/i386/i386.c (indirect_thunk_name): Document that also
16715 (output_indirect_thunk): Document why both instructions
16716 (pause and lfence) are generated.
16718 2018-01-18 Richard Biener <rguenther@suse.de>
16720 PR tree-optimization/83887
16721 * graphite-scop-detection.c
16722 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16723 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16724 (scop_detection::merge_sese): Re-implement with a flood-fill
16725 algorithm that properly finds a SESE region if it exists.
16727 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16730 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16731 pointer_diff optimizations use view_convert instead of convert.
16733 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16735 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16736 Generate different code for -mno-speculate-indirect-jumps.
16737 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16738 (*call_indirect_aix<mode>): Disable for
16739 -mno-speculate-indirect-jumps.
16740 (*call_indirect_aix<mode>_nospec): New define_insn.
16741 (*call_value_indirect_aix<mode>): Disable for
16742 -mno-speculate-indirect-jumps.
16743 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16744 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16745 -mno-speculate-indirect-jumps.
16746 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16748 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16750 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16751 long double type, set the flags for noting the default long double
16752 type, even if we don't pass or return a long double type.
16754 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16757 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16760 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16762 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16763 support for merge[hl].
16764 (fold_mergehl_helper): New helper function.
16765 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16766 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16767 (altivec_vmrglw_direct): Add xxmrglw insn.
16769 2018-01-17 Andrew Waterman <andrew@sifive.com>
16771 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16772 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16774 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16777 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16778 call the lto_location_cache before reading the
16779 DECL_SOURCE_LOCATION of the types.
16781 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16782 Richard Sandiford <richard.sandiford@linaro.org>
16784 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16785 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16786 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16787 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16788 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16790 * config/aarch64/constraints.md (aarch64_movti_operand):
16792 * config/aarch64/predicates.md (Uti): Add new constraint.
16794 2018-01-17 Carl Love <cel@us.ibm.com>
16796 * config/rs6000/vsx.md (define_expand xl_len_r,
16797 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16798 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16800 (define_expand, define_insn): Move the shift left from the
16801 define_insn to the define_expand for lxvl and stxvl instructions.
16802 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16803 and XL_LEN_R definitions to PURE.
16805 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16807 * config/i386/i386.c (indirect_thunk_name): Declare regno
16808 as unsigned int. Compare regno with INVALID_REGNUM.
16809 (output_indirect_thunk): Ditto.
16810 (output_indirect_thunk_function): Ditto.
16811 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
16812 in the call to output_indirect_thunk_function.
16814 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
16816 PR middle-end/83884
16817 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16818 rather than the size of inner_type to determine the stack slot size
16819 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16821 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
16824 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16827 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
16829 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16830 endian Linux systems to optionally enable multilibs for selecting
16831 the long double type if the user configured an explicit type.
16832 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16833 have no long double multilibs if not defined.
16834 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16835 warn if the user used -mabi={ieee,ibm}longdouble and we built
16836 multilibs for long double.
16837 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16838 appropriate multilib option.
16839 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16841 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16842 for building long double multilibs.
16843 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16845 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
16847 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16850 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16852 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16855 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16858 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16861 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16863 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16864 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16866 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16868 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16869 different rtl trees depending on TARGET_64BIT.
16870 (rs6000_gen_lvx): Likewise.
16872 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16874 * config/visium/visium.md (nop): Tweak comment.
16875 (hazard_nop): Likewise.
16877 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16879 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16880 -mspeculate-indirect-jumps.
16881 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16882 for -mno-speculate-indirect-jumps.
16883 (*call_indirect_elfv2<mode>_nospec): New define_insn.
16884 (*call_value_indirect_elfv2<mode>): Disable for
16885 -mno-speculate-indirect-jumps.
16886 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16887 (indirect_jump): Emit different RTL for
16888 -mno-speculate-indirect-jumps.
16889 (*indirect_jump<mode>): Disable for
16890 -mno-speculate-indirect-jumps.
16891 (*indirect_jump<mode>_nospec): New define_insn.
16892 (tablejump): Emit different RTL for
16893 -mno-speculate-indirect-jumps.
16894 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16895 (tablejumpsi_nospec): New define_expand.
16896 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16897 (tablejumpdi_nospec): New define_expand.
16898 (*tablejump<mode>_internal1): Disable for
16899 -mno-speculate-indirect-jumps.
16900 (*tablejump<mode>_internal1_nospec): New define_insn.
16901 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16904 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16906 * caller-save.c (insert_save): Drop unnecessary parameter. All
16909 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16910 Richard Biener <rguenth@suse.de>
16913 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16914 return early, inline manually is_gimple_sizepos. Make sure if we
16915 call gimplify_expr we don't end up with a gimple constant.
16916 * tree.c (variably_modified_type_p): Don't return true for
16917 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16918 * gimplify.h (is_gimple_sizepos): Remove.
16920 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16922 PR tree-optimization/83857
16923 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16924 vectorizable_live_operation for pure SLP statements.
16925 (vectorizable_live_operation): Handle PHIs.
16927 2018-01-16 Richard Biener <rguenther@suse.de>
16929 PR tree-optimization/83867
16930 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16931 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16933 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16936 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16937 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16938 If off is not INTEGER_CST, issue a may not be aligned warning
16939 rather than isn't aligned. Use isn%'t rather than isn't.
16940 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16942 <case MULT_EXPR>: Improve the case when bottom and one of the
16943 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16944 operand, in that case check if the other operand is multiple of
16945 bottom divided by the INTEGER_CST operand.
16947 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16950 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16951 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16952 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16953 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16954 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16955 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16956 (pa_function_arg_size): New function.
16958 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16960 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16961 in a separate statement.
16963 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16965 PR tree-optimization/83847
16966 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16967 group gathers and scatters.
16969 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16971 PR rtl-optimization/86620
16972 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16974 PR rtl-optimization/83213
16975 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16976 to last if both are JUMP_INSNs.
16978 PR tree-optimization/83843
16979 * gimple-ssa-store-merging.c
16980 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16981 store_immediate_info for bswap/nop orig_stores.
16983 2018-01-15 Andrew Waterman <andrew@sifive.com>
16985 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16987 <UDIV>: Increase cost if !TARGET_DIV.
16989 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16991 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16992 (define_attr "cr_logical_3op"): New.
16993 (cceq_ior_compare): Adjust.
16994 (cceq_ior_compare_complement): Adjust.
16995 (*cceq_rev_compare): Adjust.
16996 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16997 (is_cracked_insn): Adjust.
16998 (insn_must_be_first_in_group): Adjust.
16999 * config/rs6000/40x.md: Adjust.
17000 * config/rs6000/440.md: Adjust.
17001 * config/rs6000/476.md: Adjust.
17002 * config/rs6000/601.md: Adjust.
17003 * config/rs6000/603.md: Adjust.
17004 * config/rs6000/6xx.md: Adjust.
17005 * config/rs6000/7450.md: Adjust.
17006 * config/rs6000/7xx.md: Adjust.
17007 * config/rs6000/8540.md: Adjust.
17008 * config/rs6000/cell.md: Adjust.
17009 * config/rs6000/e300c2c3.md: Adjust.
17010 * config/rs6000/e500mc.md: Adjust.
17011 * config/rs6000/e500mc64.md: Adjust.
17012 * config/rs6000/e5500.md: Adjust.
17013 * config/rs6000/e6500.md: Adjust.
17014 * config/rs6000/mpc.md: Adjust.
17015 * config/rs6000/power4.md: Adjust.
17016 * config/rs6000/power5.md: Adjust.
17017 * config/rs6000/power6.md: Adjust.
17018 * config/rs6000/power7.md: Adjust.
17019 * config/rs6000/power8.md: Adjust.
17020 * config/rs6000/power9.md: Adjust.
17021 * config/rs6000/rs64.md: Adjust.
17022 * config/rs6000/titan.md: Adjust.
17024 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17026 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17027 ix86_indirect_branch_register logic.
17029 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17031 * config/i386/constraints.md (Bs): Update
17032 ix86_indirect_branch_register check. Don't check
17033 ix86_indirect_branch_register with GOT_memory_operand.
17035 * config/i386/predicates.md (GOT_memory_operand): Don't check
17036 ix86_indirect_branch_register here.
17037 (GOT32_symbol_operand): Likewise.
17039 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17041 * config/i386/predicates.md (constant_call_address_operand):
17042 Rewrite ix86_indirect_branch_register logic.
17043 (sibcall_insn_operand): Likewise.
17045 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17047 * config/i386/constraints.md (Bs): Replace
17048 ix86_indirect_branch_thunk_register with
17049 ix86_indirect_branch_register.
17051 * config/i386/i386.md (indirect_jump): Likewise.
17052 (tablejump): Likewise.
17053 (*sibcall_memory): Likewise.
17054 (*sibcall_value_memory): Likewise.
17055 Peepholes of indirect call and jump via memory: Likewise.
17056 * config/i386/i386.opt: Likewise.
17057 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17058 (GOT_memory_operand): Likewise.
17059 (call_insn_operand): Likewise.
17060 (sibcall_insn_operand): Likewise.
17061 (GOT32_symbol_operand): Likewise.
17063 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17065 PR middle-end/83837
17066 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17067 type rather than type addr's type points to.
17068 (expand_omp_atomic_mutex): Likewise.
17069 (expand_omp_atomic): Likewise.
17071 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17074 * config/i386/i386.c (output_indirect_thunk_function): Use
17075 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17076 for __x86_return_thunk.
17078 2018-01-15 Richard Biener <rguenther@suse.de>
17080 PR middle-end/83850
17081 * expmed.c (extract_bit_field_1): Fix typo.
17083 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17086 * config/arm/iterators.md (VF): New mode iterator.
17087 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17088 Remove integer-related logic from pattern.
17089 (neon_vabd<mode>_3): Likewise.
17091 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17093 PR middle-end/82694
17094 * common.opt (fstrict-overflow): No longer an alias.
17095 (fwrapv-pointer): New option.
17096 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17097 also for pointer types based on flag_wrapv_pointer.
17098 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17099 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17100 opts->x_flag_wrapv got set.
17101 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17102 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17103 POINTER_TYPE_OVERFLOW_UNDEFINED.
17104 * match.pd: Likewise in address comparison pattern.
17105 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17107 2018-01-15 Richard Biener <rguenther@suse.de>
17110 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17111 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17112 Reset type names to their identifier if their TYPE_DECL doesn't
17113 have linkage (and thus is used for ODR and devirt).
17114 (save_debug_info_for_decl): Remove.
17115 (save_debug_info_for_type): Likewise.
17116 (add_tree_to_fld_list): Adjust.
17117 * tree-pretty-print.c (dump_generic_node): Make dumping of
17118 type names more robust.
17120 2018-01-15 Richard Biener <rguenther@suse.de>
17122 * BASE-VER: Bump to 8.0.1.
17124 2018-01-14 Martin Sebor <msebor@redhat.com>
17127 * builtins.c (check_access): Avoid warning when the no-warning bit
17130 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17132 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17133 * ira-color (allocno_hard_regs_compare): Likewise.
17135 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17138 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17139 Use .pushsection/.popsection.
17141 2018-01-14 Martin Sebor <msebor@redhat.com>
17144 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17146 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17148 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17149 entry from extra_headers.
17150 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17151 extra_headers, make the list bitwise identical to the i?86-*-* one.
17153 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17155 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17156 -mcmodel=large with -mindirect-branch=thunk,
17157 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17158 -mfunction-return=thunk-extern.
17159 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17160 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17161 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17163 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17165 * config/i386/i386.c (print_reg): Print the name of the full
17166 integer register without '%'.
17167 (ix86_print_operand): Handle 'V'.
17168 * doc/extend.texi: Document 'V' modifier.
17170 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17172 * config/i386/constraints.md (Bs): Disallow memory operand for
17173 -mindirect-branch-register.
17175 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17176 (GOT_memory_operand): Likewise.
17177 (call_insn_operand): Likewise.
17178 (sibcall_insn_operand): Likewise.
17179 (GOT32_symbol_operand): Likewise.
17180 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17181 for -mindirect-branch-register.
17182 (tablejump): Likewise.
17183 (*sibcall_memory): Likewise.
17184 (*sibcall_value_memory): Likewise.
17185 Disallow peepholes of indirect call and jump via memory for
17186 -mindirect-branch-register.
17187 (*call_pop): Replace m with Bw.
17188 (*call_value_pop): Likewise.
17189 (*sibcall_pop_memory): Replace m with Bs.
17190 * config/i386/i386.opt (mindirect-branch-register): New option.
17191 * doc/invoke.texi: Document -mindirect-branch-register option.
17193 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17195 * config/i386/i386-protos.h (ix86_output_function_return): New.
17196 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17197 set function_return_type.
17198 (indirect_thunk_name): Add ret_p to indicate thunk for function
17200 (output_indirect_thunk_function): Pass false to
17201 indirect_thunk_name.
17202 (ix86_output_indirect_branch_via_reg): Likewise.
17203 (ix86_output_indirect_branch_via_push): Likewise.
17204 (output_indirect_thunk_function): Create alias for function
17205 return thunk if regno < 0.
17206 (ix86_output_function_return): New function.
17207 (ix86_handle_fndecl_attribute): Handle function_return.
17208 (ix86_attribute_table): Add function_return.
17209 * config/i386/i386.h (machine_function): Add
17210 function_return_type.
17211 * config/i386/i386.md (simple_return_internal): Use
17212 ix86_output_function_return.
17213 (simple_return_internal_long): Likewise.
17214 * config/i386/i386.opt (mfunction-return=): New option.
17215 (indirect_branch): Mention -mfunction-return=.
17216 * doc/extend.texi: Document function_return function attribute.
17217 * doc/invoke.texi: Document -mfunction-return= option.
17219 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17221 * config/i386/i386-opts.h (indirect_branch): New.
17222 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17223 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17224 with local indirect jump when converting indirect call and jump.
17225 (ix86_set_indirect_branch_type): New.
17226 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17227 (indirectlabelno): New.
17228 (indirect_thunk_needed): Likewise.
17229 (indirect_thunk_bnd_needed): Likewise.
17230 (indirect_thunks_used): Likewise.
17231 (indirect_thunks_bnd_used): Likewise.
17232 (INDIRECT_LABEL): Likewise.
17233 (indirect_thunk_name): Likewise.
17234 (output_indirect_thunk): Likewise.
17235 (output_indirect_thunk_function): Likewise.
17236 (ix86_output_indirect_branch_via_reg): Likewise.
17237 (ix86_output_indirect_branch_via_push): Likewise.
17238 (ix86_output_indirect_branch): Likewise.
17239 (ix86_output_indirect_jmp): Likewise.
17240 (ix86_code_end): Call output_indirect_thunk_function if needed.
17241 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17243 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17244 (ix86_attribute_table): Add indirect_branch.
17245 * config/i386/i386.h (machine_function): Add indirect_branch_type
17246 and has_local_indirect_jump.
17247 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17249 (tablejump): Likewise.
17250 (*indirect_jump): Use ix86_output_indirect_jmp.
17251 (*tablejump_1): Likewise.
17252 (simple_return_indirect_internal): Likewise.
17253 * config/i386/i386.opt (mindirect-branch=): New option.
17254 (indirect_branch): New.
17257 (thunk-inline): Likewise.
17258 (thunk-extern): Likewise.
17259 * doc/extend.texi: Document indirect_branch function attribute.
17260 * doc/invoke.texi: Document -mindirect-branch= option.
17262 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17265 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17267 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17269 * ipa-inline.c (want_inline_small_function_p): Return false if
17270 inlining has already failed with CIF_FINAL_ERROR.
17271 (update_caller_keys): Call want_inline_small_function_p before
17273 (update_callee_keys): Likewise.
17275 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17277 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17279 (rs6000_quadword_masked_address_p): Likewise.
17280 (quad_aligned_load_p): Likewise.
17281 (quad_aligned_store_p): Likewise.
17282 (const_load_sequence_p): Add comment to describe the outer-most loop.
17283 (mimic_memory_attributes_and_flags): New function.
17284 (rs6000_gen_stvx): Likewise.
17285 (replace_swapped_aligned_store): Likewise.
17286 (rs6000_gen_lvx): Likewise.
17287 (replace_swapped_aligned_load): Likewise.
17288 (replace_swapped_load_constant): Capitalize argument name in
17289 comment describing this function.
17290 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17291 and stores that access quad-word aligned addresses and replace
17292 with stvx or lvx instructions when appropriate.
17293 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17294 New function prototype.
17295 (rs6000_quadword_masked_address_p): Likewise.
17296 (rs6000_gen_lvx): Likewise.
17297 (rs6000_gen_stvx): Likewise.
17298 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17299 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17300 when memory address is aligned.
17301 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17302 this split to select lvx instruction when memory address is aligned.
17303 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17304 instruction when memory address is aligned.
17305 (*vsx_le_perm_load_v16qi): Likewise.
17306 (four unnamed splitters): Modify to select the stvx instruction
17307 when memory is aligned.
17309 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17311 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17312 which appears in the queue multiple times.
17314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17315 Alan Hayward <alan.hayward@arm.com>
17316 David Sherwood <david.sherwood@arm.com>
17318 * tree-vectorizer.h (vec_lower_bound): New structure.
17319 (_loop_vec_info): Add check_nonzero and lower_bounds.
17320 (LOOP_VINFO_CHECK_NONZERO): New macro.
17321 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17322 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17323 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17324 fields. Make seg_len the distance travelled, not including the
17326 (dr_direction_indicator): Declare.
17327 (dr_zero_step_indicator): Likewise.
17328 (dr_known_forward_stride_p): Likewise.
17329 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17331 (runtime_alias_check_p): Allow runtime alias checks with
17333 (operator ==): Compare access_size and align.
17334 (prune_runtime_alias_test_list): Rework for new distinction between
17335 the access_size and seg_len.
17336 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17338 (get_segment_min_max): New function.
17339 (create_intersect_range_checks): Use it.
17340 (dr_step_indicator): New function.
17341 (dr_direction_indicator): Likewise.
17342 (dr_zero_step_indicator): Likewise.
17343 (dr_known_forward_stride_p): Likewise.
17344 * tree-loop-distribution.c (data_ref_segment_size): Return
17345 DR_STEP * (niters - 1).
17346 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17348 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17349 (vect_preserves_scalar_order_p): New function, split out from...
17350 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17351 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17352 (vect_vfa_access_size): New function.
17353 (vect_vfa_align): Likewise.
17354 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17355 (dump_lower_bound): New function.
17356 (vect_check_lower_bound): Likewise.
17357 (vect_small_gap_p): Likewise.
17358 (vectorizable_with_step_bound_p): Likewise.
17359 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17360 depencies if the vectorization factor is 1. Convert the checks
17361 for nonzero steps into checks on the bounds of DR_STEP. Try using
17362 a bunds check for variable steps if the minimum required step is
17363 relatively small. Update calls to the dr_with_seg_len
17364 constructor and to vect_compile_time_alias.
17365 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17367 (vect_loop_versioning): Call it.
17368 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17370 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17372 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17373 Alan Hayward <alan.hayward@arm.com>
17374 David Sherwood <david.sherwood@arm.com>
17376 * doc/sourcebuild.texi (vect_scatter_store): Document.
17377 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17379 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17381 * genopinit.c (main): Add supports_vec_scatter_store and
17382 supports_vec_scatter_store_cached to target_optabs.
17383 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17384 IFN_MASK_SCATTER_STORE.
17385 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17387 * internal-fn.h (internal_store_fn_p): Declare.
17388 (internal_fn_stored_value_index): Likewise.
17389 * internal-fn.c (scatter_store_direct): New macro.
17390 (expand_scatter_store_optab_fn): New function.
17391 (direct_scatter_store_optab_supported_p): New macro.
17392 (internal_store_fn_p): New function.
17393 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17394 IFN_MASK_SCATTER_STORE.
17395 (internal_fn_mask_index): Likewise.
17396 (internal_fn_stored_value_index): New function.
17397 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17398 for scatter stores.
17399 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17400 * optabs-query.c (supports_vec_scatter_store_p): New function.
17401 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17402 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17403 true for scatter stores.
17404 (vect_gather_scatter_fn_p): Handle scatter stores too.
17405 (vect_check_gather_scatter): Consider using scatter stores if
17406 supports_vec_scatter_store_p.
17407 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17408 scatter stores too.
17409 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17410 internal_fn_stored_value_index.
17411 (check_load_store_masking): Handle scatter stores too.
17412 (vect_get_store_rhs): Make public.
17413 (vectorizable_call): Use internal_store_fn_p.
17414 (vectorizable_store): Handle scatter store internal functions.
17415 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17416 when deciding whether the end of the group has been reached.
17417 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17418 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17419 (mask_scatter_store<mode>): New insns.
17421 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17422 Alan Hayward <alan.hayward@arm.com>
17423 David Sherwood <david.sherwood@arm.com>
17425 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17426 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17427 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17429 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17430 Use vect_truncate_gather_scatter_offset if we can't treat the
17431 operation as a normal gather load or scatter store.
17432 (get_group_load_store_type): Take the gather_scatter_info
17433 as argument. Try using a gather load or scatter store for
17434 single-element groups.
17435 (get_load_store_type): Update calls to get_group_load_store_type
17436 and vect_use_strided_gather_scatters_p.
17438 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17439 Alan Hayward <alan.hayward@arm.com>
17440 David Sherwood <david.sherwood@arm.com>
17442 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17443 optional tree argument.
17444 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17446 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17447 but continue to use the current value as a fallback.
17448 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17449 to compare the updates.
17450 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17451 (get_load_store_type): Use it when handling a strided access.
17452 (vect_get_strided_load_store_ops): New function.
17453 (vect_get_data_ptr_increment): Likewise.
17454 (vectorizable_load): Handle strided gather loads. Always pass
17455 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17458 Alan Hayward <alan.hayward@arm.com>
17459 David Sherwood <david.sherwood@arm.com>
17461 * doc/md.texi (gather_load@var{m}): Document.
17462 (mask_gather_load@var{m}): Likewise.
17463 * genopinit.c (main): Add supports_vec_gather_load and
17464 supports_vec_gather_load_cached to target_optabs.
17465 * optabs-tree.c (init_tree_optimization_optabs): Use
17466 ggc_cleared_alloc to allocate target_optabs.
17467 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17468 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17470 * internal-fn.h (internal_load_fn_p): Declare.
17471 (internal_gather_scatter_fn_p): Likewise.
17472 (internal_fn_mask_index): Likewise.
17473 (internal_gather_scatter_fn_supported_p): Likewise.
17474 * internal-fn.c (gather_load_direct): New macro.
17475 (expand_gather_load_optab_fn): New function.
17476 (direct_gather_load_optab_supported_p): New macro.
17477 (direct_internal_fn_optab): New function.
17478 (internal_load_fn_p): Likewise.
17479 (internal_gather_scatter_fn_p): Likewise.
17480 (internal_fn_mask_index): Likewise.
17481 (internal_gather_scatter_fn_supported_p): Likewise.
17482 * optabs-query.c (supports_at_least_one_mode_p): New function.
17483 (supports_vec_gather_load_p): Likewise.
17484 * optabs-query.h (supports_vec_gather_load_p): Declare.
17485 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17486 and memory_type field.
17487 (NUM_PATTERNS): Bump to 15.
17488 * tree-vect-data-refs.c: Include internal-fn.h.
17489 (vect_gather_scatter_fn_p): New function.
17490 (vect_describe_gather_scatter_call): Likewise.
17491 (vect_check_gather_scatter): Try using internal functions for
17492 gather loads. Recognize existing calls to a gather load function.
17493 (vect_analyze_data_refs): Consider using gather loads if
17494 supports_vec_gather_load_p.
17495 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17496 (vect_get_gather_scatter_offset_type): Likewise.
17497 (vect_convert_mask_for_vectype): Likewise.
17498 (vect_add_conversion_to_patterm): Likewise.
17499 (vect_try_gather_scatter_pattern): Likewise.
17500 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17501 (vect_vect_recog_func_ptrs): Add it.
17502 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17503 internal_fn_mask_index and internal_gather_scatter_fn_p.
17504 (check_load_store_masking): Take the gather_scatter_info as an
17505 argument and handle gather loads.
17506 (vect_get_gather_scatter_ops): New function.
17507 (vectorizable_call): Check internal_load_fn_p.
17508 (vectorizable_load): Likewise. Handle gather load internal
17510 (vectorizable_store): Update call to check_load_store_masking.
17511 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17512 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17513 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17514 (aarch64_gather_scale_operand_d): New predicates.
17515 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17516 (mask_gather_load<mode>): New insns.
17518 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17519 Alan Hayward <alan.hayward@arm.com>
17520 David Sherwood <david.sherwood@arm.com>
17522 * optabs.def (fold_left_plus_optab): New optab.
17523 * doc/md.texi (fold_left_plus_@var{m}): Document.
17524 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17525 * internal-fn.c (fold_left_direct): Define.
17526 (expand_fold_left_optab_fn): Likewise.
17527 (direct_fold_left_optab_supported_p): Likewise.
17528 * fold-const-call.c (fold_const_fold_left): New function.
17529 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17530 * tree-parloops.c (valid_reduction_p): New function.
17531 (gather_scalar_reductions): Use it.
17532 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17533 (vect_finish_replace_stmt): Declare.
17534 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17535 (needs_fold_left_reduction_p): New function, split out from...
17536 (vect_is_simple_reduction): ...here. Accept reductions that
17537 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17538 (vect_force_simple_reduction): Also store the reduction type in
17539 the assignment's STMT_VINFO_REDUC_TYPE.
17540 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17541 (merge_with_identity): New function.
17542 (vect_expand_fold_left): Likewise.
17543 (vectorize_fold_left_reduction): Likewise.
17544 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17545 scalar phi in place for it. Check for target support and reject
17546 cases that would reassociate the operation. Defer the transform
17547 phase to vectorize_fold_left_reduction.
17548 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17549 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17550 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17554 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17555 call to ifc_temp_var.
17557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17558 Alan Hayward <alan.hayward@arm.com>
17559 David Sherwood <david.sherwood@arm.com>
17561 * target.def (legitimize_address_displacement): Take the original
17562 offset as a poly_int.
17563 * targhooks.h (default_legitimize_address_displacement): Update
17565 * targhooks.c (default_legitimize_address_displacement): Likewise.
17566 * doc/tm.texi: Regenerate.
17567 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17568 as an argument, moving assert of ad->disp == ad->disp_term to...
17569 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17570 Try calling targetm.legitimize_address_displacement before expanding
17571 the address rather than afterwards, and adjust for the new interface.
17572 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17573 Match the new hook interface. Handle SVE addresses.
17574 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17575 new hook interface.
17577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17579 * Makefile.in (OBJS): Add early-remat.o.
17580 * target.def (select_early_remat_modes): New hook.
17581 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17582 * doc/tm.texi: Regenerate.
17583 * targhooks.h (default_select_early_remat_modes): Declare.
17584 * targhooks.c (default_select_early_remat_modes): New function.
17585 * timevar.def (TV_EARLY_REMAT): New timevar.
17586 * passes.def (pass_early_remat): New pass.
17587 * tree-pass.h (make_pass_early_remat): Declare.
17588 * early-remat.c: New file.
17589 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17591 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17593 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17594 Alan Hayward <alan.hayward@arm.com>
17595 David Sherwood <david.sherwood@arm.com>
17597 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17598 vfm1 with a bound_epilog parameter.
17599 (vect_do_peeling): Update calls accordingly, and move the prologue
17600 call earlier in the function. Treat the base bound_epilog as 0 for
17601 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17602 this base when peeling for gaps.
17603 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17604 with fully-masked loops.
17605 (vect_estimate_min_profitable_iters): Handle the single peeled
17606 iteration in that case.
17608 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17609 Alan Hayward <alan.hayward@arm.com>
17610 David Sherwood <david.sherwood@arm.com>
17612 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17613 single-element interleaving even if the size is not a power of 2.
17614 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17615 accesses for single-element interleaving if the group size is
17618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17619 Alan Hayward <alan.hayward@arm.com>
17620 David Sherwood <david.sherwood@arm.com>
17622 * doc/md.texi (fold_extract_last_@var{m}): Document.
17623 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17624 * optabs.def (fold_extract_last_optab): New optab.
17625 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17626 * internal-fn.c (fold_extract_direct): New macro.
17627 (expand_fold_extract_optab_fn): Likewise.
17628 (direct_fold_extract_optab_supported_p): Likewise.
17629 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17630 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17631 EXTRACT_LAST_REDUCTION.
17632 (get_initial_def_for_reduction): Do not create an initial vector
17633 for EXTRACT_LAST_REDUCTION reductions.
17634 (vectorizable_reduction): Leave the scalar phi in place for
17635 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17636 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17637 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17638 transform phase to vectorizable_condition.
17639 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17641 (vect_finish_stmt_generation): ...here.
17642 (vect_finish_replace_stmt): New function.
17643 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17644 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17646 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17648 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17649 Alan Hayward <alan.hayward@arm.com>
17650 David Sherwood <david.sherwood@arm.com>
17652 * doc/md.texi (extract_last_@var{m}): Document.
17653 * optabs.def (extract_last_optab): New optab.
17654 * internal-fn.def (EXTRACT_LAST): New internal function.
17655 * internal-fn.c (cond_unary_direct): New macro.
17656 (expand_cond_unary_optab_fn): Likewise.
17657 (direct_cond_unary_optab_supported_p): Likewise.
17658 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17659 loops using EXTRACT_LAST.
17660 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17661 (extract_last_<mode>): ...this optab.
17662 (vec_extract<mode><Vel>): Update accordingly.
17664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17665 Alan Hayward <alan.hayward@arm.com>
17666 David Sherwood <david.sherwood@arm.com>
17668 * target.def (empty_mask_is_expensive): New hook.
17669 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17670 * doc/tm.texi: Regenerate.
17671 * targhooks.h (default_empty_mask_is_expensive): Declare.
17672 * targhooks.c (default_empty_mask_is_expensive): New function.
17673 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17674 if the target says that empty masks are expensive.
17675 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17677 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17680 Alan Hayward <alan.hayward@arm.com>
17681 David Sherwood <david.sherwood@arm.com>
17683 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17684 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17685 (vect_use_loop_mask_for_alignment_p): New function.
17686 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17687 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17688 niters_skip argument. Make sure that the first niters_skip elements
17689 of the first iteration are inactive.
17690 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17691 Update call to vect_set_loop_masks_directly.
17692 (get_misalign_in_elems): New function, split out from...
17693 (vect_gen_prolog_loop_niters): ...here.
17694 (vect_update_init_of_dr): Take a code argument that specifies whether
17695 the adjustment should be added or subtracted.
17696 (vect_update_init_of_drs): Likewise.
17697 (vect_prepare_for_masked_peels): New function.
17698 (vect_do_peeling): Skip prologue peeling if we're using a mask
17699 instead. Update call to vect_update_inits_of_drs.
17700 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17702 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17703 alignment. Do not include the number of peeled iterations in
17704 the minimum threshold in that case.
17705 (vectorizable_induction): Adjust the start value down by
17706 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17707 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17708 Take the number of skipped iterations into account when calculating
17710 * tree-vect-stmts.c (vect_gen_while_not): New function.
17712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17713 Alan Hayward <alan.hayward@arm.com>
17714 David Sherwood <david.sherwood@arm.com>
17716 * doc/sourcebuild.texi (vect_fully_masked): Document.
17717 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17718 default value to 0.
17719 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17721 (vect_analyze_loop_2): ...here. Don't check the vectorization
17722 factor against the number of loop iterations if the loop is
17725 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17726 Alan Hayward <alan.hayward@arm.com>
17727 David Sherwood <david.sherwood@arm.com>
17729 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17730 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17731 (dump_groups): Update accordingly.
17732 (iv_use::mem_type): New member variable.
17733 (address_p): New function.
17734 (record_use): Add a mem_type argument and initialize the new
17736 (record_group_use): Add a mem_type argument. Use address_p.
17737 Remove obsolete null checks of base_object. Update call to record_use.
17738 (find_interesting_uses_op): Update call to record_group_use.
17739 (find_interesting_uses_cond): Likewise.
17740 (find_interesting_uses_address): Likewise.
17741 (get_mem_type_for_internal_fn): New function.
17742 (find_address_like_use): Likewise.
17743 (find_interesting_uses_stmt): Try find_address_like_use before
17744 calling find_interesting_uses_op.
17745 (addr_offset_valid_p): Use the iv mem_type field as the type
17746 of the addressed memory.
17747 (add_autoinc_candidates): Likewise.
17748 (get_address_cost): Likewise.
17749 (split_small_address_groups_p): Use address_p.
17750 (split_address_groups): Likewise.
17751 (add_iv_candidate_for_use): Likewise.
17752 (autoinc_possible_for_pair): Likewise.
17753 (rewrite_groups): Likewise.
17754 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17755 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17756 (get_alias_ptr_type_for_ptr_address): New function.
17757 (rewrite_use_address): Rewrite address uses in calls that were
17758 identified by find_address_like_use.
17760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17761 Alan Hayward <alan.hayward@arm.com>
17762 David Sherwood <david.sherwood@arm.com>
17764 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17766 * gimple-expr.h (is_gimple_addressable: Likewise.
17767 * gimple-expr.c (is_gimple_address): Likewise.
17768 * internal-fn.c (expand_call_mem_ref): New function.
17769 (expand_mask_load_optab_fn): Use it.
17770 (expand_mask_store_optab_fn): Likewise.
17772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17773 Alan Hayward <alan.hayward@arm.com>
17774 David Sherwood <david.sherwood@arm.com>
17776 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17777 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17778 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17779 (cond_umax@var{mode}): Document.
17780 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17781 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17782 (cond_umin_optab, cond_umax_optab): New optabs.
17783 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17784 (COND_IOR, COND_XOR): New internal functions.
17785 * internal-fn.h (get_conditional_internal_fn): Declare.
17786 * internal-fn.c (cond_binary_direct): New macro.
17787 (expand_cond_binary_optab_fn): Likewise.
17788 (direct_cond_binary_optab_supported_p): Likewise.
17789 (get_conditional_internal_fn): New function.
17790 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17791 Cope with reduction statements that are vectorized as calls rather
17793 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17794 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17795 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17796 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17797 (UNSPEC_COND_EOR): New unspecs.
17798 (optab): Add mappings for them.
17799 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17800 (sve_int_op, sve_fp_op): New int attributes.
17802 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17803 Alan Hayward <alan.hayward@arm.com>
17804 David Sherwood <david.sherwood@arm.com>
17806 * optabs.def (while_ult_optab): New optab.
17807 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17808 * internal-fn.def (WHILE_ULT): New internal function.
17809 * internal-fn.h (direct_internal_fn_supported_p): New override
17810 that takes two types as argument.
17811 * internal-fn.c (while_direct): New macro.
17812 (expand_while_optab_fn): New function.
17813 (convert_optab_supported_p): Likewise.
17814 (direct_while_optab_supported_p): New macro.
17815 * wide-int.h (wi::udiv_ceil): New function.
17816 * tree-vectorizer.h (rgroup_masks): New structure.
17817 (vec_loop_masks): New typedef.
17818 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17819 and fully_masked_p.
17820 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17821 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17822 (vect_max_vf): New function.
17823 (slpeel_make_loop_iterate_ntimes): Delete.
17824 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17825 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17826 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17827 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17828 internal-fn.h, stor-layout.h and optabs-query.h.
17829 (vect_set_loop_mask): New function.
17830 (add_preheader_seq): Likewise.
17831 (add_header_seq): Likewise.
17832 (interleave_supported_p): Likewise.
17833 (vect_maybe_permute_loop_masks): Likewise.
17834 (vect_set_loop_masks_directly): Likewise.
17835 (vect_set_loop_condition_masked): Likewise.
17836 (vect_set_loop_condition_unmasked): New function, split out from
17837 slpeel_make_loop_iterate_ntimes.
17838 (slpeel_make_loop_iterate_ntimes): Rename to..
17839 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
17840 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17841 (vect_do_peeling): Update call accordingly.
17842 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17844 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17845 mask_compare_type, can_fully_mask_p and fully_masked_p.
17846 (release_vec_loop_masks): New function.
17847 (_loop_vec_info): Use it to free the loop masks.
17848 (can_produce_all_loop_masks_p): New function.
17849 (vect_get_max_nscalars_per_iter): Likewise.
17850 (vect_verify_full_masking): Likewise.
17851 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17852 retries, and free the mask rgroups before retrying. Check loop-wide
17853 reasons for disallowing fully-masked loops. Make the final decision
17854 about whether use a fully-masked loop or not.
17855 (vect_estimate_min_profitable_iters): Do not assume that peeling
17856 for the number of iterations will be needed for fully-masked loops.
17857 (vectorizable_reduction): Disable fully-masked loops.
17858 (vectorizable_live_operation): Likewise.
17859 (vect_halve_mask_nunits): New function.
17860 (vect_double_mask_nunits): Likewise.
17861 (vect_record_loop_mask): Likewise.
17862 (vect_get_loop_mask): Likewise.
17863 (vect_transform_loop): Handle the case in which the final loop
17864 iteration might handle a partial vector. Call vect_set_loop_condition
17865 instead of slpeel_make_loop_iterate_ntimes.
17866 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17867 (check_load_store_masking): New function.
17868 (prepare_load_store_mask): Likewise.
17869 (vectorizable_store): Handle fully-masked loops.
17870 (vectorizable_load): Likewise.
17871 (supportable_widening_operation): Use vect_halve_mask_nunits for
17873 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17874 (vect_gen_while): New function.
17875 * config/aarch64/aarch64.md (umax<mode>3): New expander.
17876 (aarch64_uqdec<mode>): New insn.
17878 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17879 Alan Hayward <alan.hayward@arm.com>
17880 David Sherwood <david.sherwood@arm.com>
17882 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17883 (reduc_xor_scal_optab): New optabs.
17884 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17885 (reduc_xor_scal_@var{m}): Document.
17886 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17887 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17888 internal functions.
17889 * fold-const-call.c (fold_const_call): Handle them.
17890 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17891 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17892 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17893 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17894 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17895 (UNSPEC_XORV): New unspecs.
17896 (optab): Add entries for them.
17897 (BITWISEV): New int iterator.
17898 (bit_reduc_op): New int attributes.
17900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17901 Alan Hayward <alan.hayward@arm.com>
17902 David Sherwood <david.sherwood@arm.com>
17904 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17905 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17906 * optabs.def (vec_shl_insert_optab): New optab.
17907 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17908 (duplicate_and_interleave): Likewise.
17909 * tree-vect-loop.c: Include internal-fn.h.
17910 (neutral_op_for_slp_reduction): New function, split out from
17911 get_initial_defs_for_reduction.
17912 (get_initial_def_for_reduction): Handle option 2 for variable-length
17913 vectors by loading the neutral value into a vector and then shifting
17914 the initial value into element 0.
17915 (get_initial_defs_for_reduction): Replace the code argument with
17916 the neutral value calculated by neutral_op_for_slp_reduction.
17917 Use gimple_build_vector for constant-length vectors.
17918 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17919 but the first group_size elements have a neutral value.
17920 Use duplicate_and_interleave otherwise.
17921 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17922 Update call to get_initial_defs_for_reduction. Handle SLP
17923 reductions for variable-length vectors by creating one vector
17924 result for each scalar result, with the elements associated
17925 with other scalar results stubbed out with the neutral value.
17926 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17927 Require IFN_VEC_SHL_INSERT for double reductions on
17928 variable-length vectors, or SLP reductions that have
17929 a neutral value. Require can_duplicate_and_interleave_p
17930 support for variable-length unchained SLP reductions if there
17931 is no neutral value, such as for MIN/MAX reductions. Also require
17932 the number of vector elements to be a multiple of the number of
17933 SLP statements when doing variable-length unchained SLP reductions.
17934 Update call to vect_create_epilog_for_reduction.
17935 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17936 and remove initial values.
17937 (duplicate_and_interleave): Make public.
17938 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17939 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17941 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17942 Alan Hayward <alan.hayward@arm.com>
17943 David Sherwood <david.sherwood@arm.com>
17945 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17946 (can_duplicate_and_interleave_p): New function.
17947 (vect_get_and_check_slp_defs): Take the vector of statements
17948 rather than just the current one. Remove excess parentheses.
17949 Restriction rejectinon of vect_constant_def and vect_external_def
17950 for variable-length vectors to boolean types, or types for which
17951 can_duplicate_and_interleave_p is false.
17952 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17953 (duplicate_and_interleave): New function.
17954 (vect_get_constant_vectors): Use gimple_build_vector for
17955 constant-length vectors and suitable variable-length constant
17956 vectors. Use duplicate_and_interleave for other variable-length
17957 vectors. Don't defer the update when inserting new statements.
17959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17960 Alan Hayward <alan.hayward@arm.com>
17961 David Sherwood <david.sherwood@arm.com>
17963 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17964 min_profitable_iters doesn't go negative.
17966 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17967 Alan Hayward <alan.hayward@arm.com>
17968 David Sherwood <david.sherwood@arm.com>
17970 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17971 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17972 * optabs.def (vec_mask_load_lanes_optab): New optab.
17973 (vec_mask_store_lanes_optab): Likewise.
17974 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17975 (MASK_STORE_LANES): Likewise.
17976 * internal-fn.c (mask_load_lanes_direct): New macro.
17977 (mask_store_lanes_direct): Likewise.
17978 (expand_mask_load_optab_fn): Handle masked operations.
17979 (expand_mask_load_lanes_optab_fn): New macro.
17980 (expand_mask_store_optab_fn): Handle masked operations.
17981 (expand_mask_store_lanes_optab_fn): New macro.
17982 (direct_mask_load_lanes_optab_supported_p): Likewise.
17983 (direct_mask_store_lanes_optab_supported_p): Likewise.
17984 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17986 (vect_load_lanes_supported): Likewise.
17987 * tree-vect-data-refs.c (strip_conversion): New function.
17988 (can_group_stmts_p): Likewise.
17989 (vect_analyze_data_ref_accesses): Use it instead of checking
17990 for a pair of assignments.
17991 (vect_store_lanes_supported): Take a masked_p parameter.
17992 (vect_load_lanes_supported): Likewise.
17993 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17994 vect_store_lanes_supported and vect_load_lanes_supported.
17995 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17996 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17997 parameter. Don't allow gaps for masked accesses.
17998 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17999 and vect_load_lanes_supported.
18000 (get_load_store_type): Take a masked_p parameter and update
18001 call to get_group_load_store_type.
18002 (vectorizable_store): Update call to get_load_store_type.
18003 Handle IFN_MASK_STORE_LANES.
18004 (vectorizable_load): Update call to get_load_store_type.
18005 Handle IFN_MASK_LOAD_LANES.
18007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18008 Alan Hayward <alan.hayward@arm.com>
18009 David Sherwood <david.sherwood@arm.com>
18011 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18013 * config/aarch64/aarch64-protos.h
18014 (aarch64_sve_struct_memory_operand_p): Declare.
18015 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18016 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18017 (VPRED, vpred): Handle SVE structure modes.
18018 * config/aarch64/constraints.md (Utx): New constraint.
18019 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18020 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18021 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18022 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18023 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18024 structure modes. Split into pieces after RA.
18025 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18026 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18028 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18029 SVE structure modes.
18030 (aarch64_classify_address): Likewise.
18031 (sizetochar): Move earlier in file.
18032 (aarch64_print_operand): Handle SVE register lists.
18033 (aarch64_array_mode): New function.
18034 (aarch64_sve_struct_memory_operand_p): Likewise.
18035 (TARGET_ARRAY_MODE): Redefine.
18037 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18038 Alan Hayward <alan.hayward@arm.com>
18039 David Sherwood <david.sherwood@arm.com>
18041 * target.def (array_mode): New target hook.
18042 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18043 * doc/tm.texi: Regenerate.
18044 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18045 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18046 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18047 targetm.array_mode.
18048 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18052 Alan Hayward <alan.hayward@arm.com>
18053 David Sherwood <david.sherwood@arm.com>
18055 * fold-const.c (fold_binary_loc): Check the argument types
18056 rather than the result type when testing for a vector operation.
18058 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18060 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18061 * doc/tm.texi: Regenerate.
18063 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18064 Alan Hayward <alan.hayward@arm.com>
18065 David Sherwood <david.sherwood@arm.com>
18067 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18068 (sve): Document new AArch64 extension.
18069 * doc/md.texi (w): Extend the description of the AArch64
18070 constraint to include SVE vectors.
18071 (Upl, Upa): Document new AArch64 predicate constraints.
18072 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18074 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18075 (msve-vector-bits=): New option.
18076 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18077 SVE when these are disabled.
18078 (sve): New extension.
18079 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18080 modes. Adjust their number of units based on aarch64_sve_vg.
18081 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18082 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18083 aarch64_addr_query_type.
18084 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18085 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18086 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18087 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18088 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18089 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18090 (aarch64_simd_imm_zero_p): Delete.
18091 (aarch64_check_zero_based_sve_index_immediate): Declare.
18092 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18093 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18094 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18095 (aarch64_sve_float_mul_immediate_p): Likewise.
18096 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18097 rather than an rtx.
18098 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18099 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18100 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18101 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18102 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18103 (aarch64_regmode_natural_size): Likewise.
18104 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18105 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18107 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18108 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18109 for VG and the SVE predicate registers.
18110 (V_ALIASES): Add a "z"-prefixed alias.
18111 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18112 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18113 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18114 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18115 (REG_CLASS_NAMES): Add entries for them.
18116 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18117 and the predicate registers.
18118 (aarch64_sve_vg): Declare.
18119 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18120 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18121 (REGMODE_NATURAL_SIZE): Define.
18122 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18124 * config/aarch64/aarch64.c: Include cfgrtl.h.
18125 (simd_immediate_info): Add a constructor for series vectors,
18126 and an associated step field.
18127 (aarch64_sve_vg): New variable.
18128 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18129 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18130 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18131 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18132 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18133 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18134 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18135 (aarch64_get_mask_mode): New functions.
18136 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18137 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18138 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18139 predicate modes and predicate registers. Explicitly restrict
18140 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18141 to store a vector mode if it is recognized by
18142 aarch64_classify_vector_mode.
18143 (aarch64_regmode_natural_size): New function.
18144 (aarch64_hard_regno_caller_save_mode): Return the original mode
18146 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18147 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18148 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18149 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18151 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18152 does not overlap dest if the function is frame-related. Handle
18154 (aarch64_split_add_offset): New function.
18155 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18156 them aarch64_add_offset.
18157 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18158 and update call to aarch64_sub_sp.
18159 (aarch64_add_cfa_expression): New function.
18160 (aarch64_expand_prologue): Pass extra temporary registers to the
18161 functions above. Handle the case in which we need to emit new
18162 DW_CFA_expressions for registers that were originally saved
18163 relative to the stack pointer, but now have to be expressed
18164 relative to the frame pointer.
18165 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18167 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18168 IP0 and IP1 values for SVE frames.
18169 (aarch64_expand_vec_series): New function.
18170 (aarch64_expand_sve_widened_duplicate): Likewise.
18171 (aarch64_expand_sve_const_vector): Likewise.
18172 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18173 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18174 into the register, rather than emitting a SET directly.
18175 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18176 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18177 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18178 (offset_9bit_signed_scaled_p): New functions.
18179 (aarch64_replicate_bitmask_imm): New function.
18180 (aarch64_bitmask_imm): Use it.
18181 (aarch64_cannot_force_const_mem): Reject expressions involving
18182 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18183 (aarch64_classify_index): Handle SVE indices, by requiring
18184 a plain register index with a scale that matches the element size.
18185 (aarch64_classify_address): Handle SVE addresses. Assert that
18186 the mode of the address is VOIDmode or an integer mode.
18187 Update call to aarch64_classify_symbol.
18188 (aarch64_classify_symbolic_expression): Update call to
18189 aarch64_classify_symbol.
18190 (aarch64_const_vec_all_in_range_p): New function.
18191 (aarch64_print_vector_float_operand): Likewise.
18192 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18193 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18194 and the FP immediates 1.0 and 0.5.
18195 (aarch64_print_address_internal): Handle SVE addresses.
18196 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18197 (aarch64_regno_regclass): Handle predicate registers.
18198 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18200 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18201 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18202 (aarch64_convert_sve_vector_bits): New function.
18203 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18204 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18205 rather than an rtx.
18206 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18207 Handle SVE vector and predicate modes. Accept VL-based constants
18208 that need only one temporary register, and VL offsets that require
18209 no temporary registers.
18210 (aarch64_conditional_register_usage): Mark the predicate registers
18211 as fixed if SVE isn't available.
18212 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18213 Return true for SVE vector and predicate modes.
18214 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18215 rather than an unsigned int. Handle SVE modes.
18216 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18218 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18220 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18221 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18222 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18223 (aarch64_sve_float_mul_immediate_p): New functions.
18224 (aarch64_sve_valid_immediate): New function.
18225 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18226 Explicitly reject structure modes. Check for INDEX constants.
18227 Handle PTRUE and PFALSE constants.
18228 (aarch64_check_zero_based_sve_index_immediate): New function.
18229 (aarch64_simd_imm_zero_p): Delete.
18230 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18231 vector modes. Accept constants in the range of CNT[BHWD].
18232 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18233 ask for an Advanced SIMD mode.
18234 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18235 (aarch64_simd_vector_alignment): Handle SVE predicates.
18236 (aarch64_vectorize_preferred_vector_alignment): New function.
18237 (aarch64_simd_vector_alignment_reachable): Use it instead of
18239 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18240 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18242 (MAX_VECT_LEN): Delete.
18243 (expand_vec_perm_d): Add a vec_flags field.
18244 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18245 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18246 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18248 (aarch64_evpc_rev): Rename to...
18249 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18250 (aarch64_evpc_rev_global): New function.
18251 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18252 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18254 (aarch64_evpc_sve_tbl): New function.
18255 (aarch64_expand_vec_perm_const_1): Update after rename of
18256 aarch64_evpc_rev. Handle SVE permutes too, trying
18257 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18258 than aarch64_evpc_tbl.
18259 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18260 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18261 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18262 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18263 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18264 (aarch64_expand_sve_vcond): New functions.
18265 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18266 of aarch64_vector_mode_p.
18267 (aarch64_dwarf_poly_indeterminate_value): New function.
18268 (aarch64_compute_pressure_classes): Likewise.
18269 (aarch64_can_change_mode_class): Likewise.
18270 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18271 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18272 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18273 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18274 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18275 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18276 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18277 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18279 (Dn, Dl, Dr): Accept const as well as const_vector.
18280 (Dz): Likewise. Compare against CONST0_RTX.
18281 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18282 of "vector" where appropriate.
18283 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18284 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18285 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18286 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18287 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18288 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18289 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18290 (v_int_equiv): Extend to SVE modes.
18291 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18293 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18294 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18295 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18296 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18297 (SVE_COND_FP_CMP): New int iterators.
18298 (perm_hilo): Handle the new unpack unspecs.
18299 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18301 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18302 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18303 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18304 (aarch64_equality_operator, aarch64_constant_vector_operand)
18305 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18306 (aarch64_sve_nonimmediate_operand): Likewise.
18307 (aarch64_sve_general_operand): Likewise.
18308 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18309 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18310 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18311 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18312 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18313 (aarch64_sve_float_arith_immediate): Likewise.
18314 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18315 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18316 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18317 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18318 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18319 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18320 (aarch64_sve_float_arith_operand): Likewise.
18321 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18322 (aarch64_sve_float_mul_operand): Likewise.
18323 (aarch64_sve_vec_perm_operand): Likewise.
18324 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18325 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18326 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18327 as well as const_vector.
18328 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18329 in file. Use CONST0_RTX and CONSTM1_RTX.
18330 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18331 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18332 Use aarch64_simd_imm_zero.
18333 * config/aarch64/aarch64-sve.md: New file.
18334 * config/aarch64/aarch64.md: Include it.
18335 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18336 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18337 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18338 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18339 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18340 (sve): New attribute.
18341 (enabled): Disable instructions with the sve attribute unless
18343 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18344 aarch64_expand_mov_immediate.
18345 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18346 CNT[BHSD] immediates.
18347 (movti): Split CONST_POLY_INT moves into two halves.
18348 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18349 Split additions that need a temporary here if the destination
18350 is the stack pointer.
18351 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18352 (*add<mode>3_poly_1): New instruction.
18353 (set_clobber_cc): New expander.
18355 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18357 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18358 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18359 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18360 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18361 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18362 Change innermode from fixed_mode_size to machine_mode.
18363 (simplify_subreg): Update call accordingly. Handle a constant-sized
18364 subreg of a variable-length CONST_VECTOR.
18366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18367 Alan Hayward <alan.hayward@arm.com>
18368 David Sherwood <david.sherwood@arm.com>
18370 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18371 (add_offset_to_base): New function, split out from...
18372 (create_mem_ref): ...here. When handling a scale other than 1,
18373 check first whether the address is valid without the offset.
18374 Add it into the base if so, leaving the index and scale as-is.
18376 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18379 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18380 fold_for_warn before checking if arg2 is INTEGER_CST.
18382 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18384 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18385 (store_multiple_operation): Delete.
18386 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18387 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18388 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18389 guarded by TARGET_STRING.
18390 (rs6000_output_load_multiple): Delete.
18391 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18392 OPTION_MASK_STRING / TARGET_STRING handling.
18393 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18394 (const rs6000_opt_masks) <"string">: Change mask to 0.
18395 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18396 (MASK_STRING): Delete.
18397 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18399 (load_multiple): Delete.
18406 (store_multiple): Delete.
18413 (movmemsi_8reg): Delete.
18414 (corresponding unnamed define_insn): Delete.
18415 (movmemsi_6reg): Delete.
18416 (corresponding unnamed define_insn): Delete.
18417 (movmemsi_4reg): Delete.
18418 (corresponding unnamed define_insn): Delete.
18419 (movmemsi_2reg): Delete.
18420 (corresponding unnamed define_insn): Delete.
18421 (movmemsi_1reg): Delete.
18422 (corresponding unnamed define_insn): Delete.
18423 * config/rs6000/rs6000.opt (mno-string): New.
18424 (mstring): Replace by deprecation warning stub.
18425 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18427 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18429 * regrename.c (regrename_do_replace): If replacing the same
18430 reg multiple times, try to reuse last created gen_raw_REG.
18433 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18434 main to workaround a bug in GDB.
18436 2018-01-12 Tom de Vries <tom@codesourcery.com>
18439 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18441 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18443 PR rtl-optimization/80481
18444 * ira-color.c (get_cap_member): New function.
18445 (allocnos_conflict_by_live_ranges_p): Use it.
18446 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18447 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18449 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18452 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18453 (*saddl_se_1): Ditto.
18454 (*ssubsi_1): Ditto.
18455 (*ssubl_se_1): Ditto.
18457 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18459 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18460 rather than wi::to_widest for DR_INITs.
18461 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18462 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18463 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18465 (vect_analyze_group_access_1): Note that here.
18467 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18469 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18470 polynomial type sizes.
18472 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18474 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18475 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18476 (gimple_add_tmp_var): Likewise.
18478 2018-01-12 Martin Liska <mliska@suse.cz>
18480 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18481 (gimple_alloc_sizes): Likewise.
18482 (dump_gimple_statistics): Use PRIu64 in printf format.
18483 * gimple.h: Change uint64_t to int.
18485 2018-01-12 Martin Liska <mliska@suse.cz>
18487 * tree-core.h: Use uint64_t instead of int.
18488 * tree.c (tree_node_counts): Likewise.
18489 (tree_node_sizes): Likewise.
18490 (dump_tree_statistics): Use PRIu64 in printf format.
18492 2018-01-12 Martin Liska <mliska@suse.cz>
18494 * Makefile.in: As qsort_chk is implemented in vec.c, add
18495 vec.o to linkage of gencfn-macros.
18496 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18497 passing the info to record_node_allocation_statistics.
18498 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18500 * ggc-common.c (struct ggc_usage): Add operator== and use
18501 it in operator< and compare function.
18502 * mem-stats.h (struct mem_usage): Likewise.
18503 * vec.c (struct vec_usage): Remove operator< and compare
18504 function. Can be simply inherited.
18506 2018-01-12 Martin Jambor <mjambor@suse.cz>
18509 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18510 * tree-ssa-math-opts.c: Include domwalk.h.
18511 (convert_mult_to_fma_1): New function.
18512 (fma_transformation_info): New type.
18513 (fma_deferring_state): Likewise.
18514 (cancel_fma_deferring): New function.
18515 (result_of_phi): Likewise.
18516 (last_fma_candidate_feeds_initial_phi): Likewise.
18517 (convert_mult_to_fma): Added deferring logic, split actual
18518 transformation to convert_mult_to_fma_1.
18519 (math_opts_dom_walker): New type.
18520 (math_opts_dom_walker::after_dom_children): New method, body moved
18521 here from pass_optimize_widening_mul::execute, added deferring logic
18523 (pass_optimize_widening_mul::execute): Moved most of code to
18524 math_opts_dom_walker::after_dom_children.
18525 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18526 * config/i386/i386.c (ix86_option_override_internal): Added
18527 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18529 2018-01-12 Richard Biener <rguenther@suse.de>
18532 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18533 inline instance vars.
18535 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18538 * config/rx/rx.c (rx_is_restricted_memory_address):
18539 Handle SUBREG case.
18541 2018-01-12 Richard Biener <rguenther@suse.de>
18543 PR tree-optimization/80846
18544 * target.def (split_reduction): New target hook.
18545 * targhooks.c (default_split_reduction): New function.
18546 * targhooks.h (default_split_reduction): Declare.
18547 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18548 target requests first reduce vectors by combining low and high
18550 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18551 (get_vectype_for_scalar_type_and_size): Export.
18552 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18553 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18554 * doc/tm.texi: Regenerate.
18555 * config/i386/i386.c (ix86_split_reduction): Implement
18556 TARGET_VECTORIZE_SPLIT_REDUCTION.
18558 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18561 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18562 in PIC mode except for TARGET_VXWORKS_RTP.
18563 * config/sparc/sparc.c: Include cfgrtl.h.
18564 (TARGET_INIT_PIC_REG): Define.
18565 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18566 (sparc_pic_register_p): New predicate.
18567 (sparc_legitimate_address_p): Use it.
18568 (sparc_legitimize_pic_address): Likewise.
18569 (sparc_delegitimize_address): Likewise.
18570 (sparc_mode_dependent_address_p): Likewise.
18571 (gen_load_pcrel_sym): Remove 4th parameter.
18572 (load_got_register): Adjust call to above. Remove obsolete stuff.
18573 (sparc_expand_prologue): Do not call load_got_register here.
18574 (sparc_flat_expand_prologue): Likewise.
18575 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18576 (sparc_use_pseudo_pic_reg): New function.
18577 (sparc_init_pic_reg): Likewise.
18578 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18579 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18581 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18583 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18584 Add item for branch_cost.
18586 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18588 PR rtl-optimization/83565
18589 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18590 not extend the result to a larger mode for rotate operations.
18591 (num_sign_bit_copies1): Likewise.
18593 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18596 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18598 Use values-Xc.o for -pedantic.
18599 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18601 2018-01-12 Martin Liska <mliska@suse.cz>
18604 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18606 (possible_polymorphic_call_targets): Use it.
18607 (ipa_devirt): Likewise.
18609 2018-01-12 Martin Liska <mliska@suse.cz>
18611 * profile-count.h (enum profile_quality): Use 0 as invalid
18612 enum value of profile_quality.
18614 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18616 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18617 -mext-string options.
18619 2018-01-12 Richard Biener <rguenther@suse.de>
18621 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18622 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18623 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18625 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18627 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18629 * configure.ac (--with-long-double-format): Add support for the
18630 configuration option to change the default long double format on
18632 * config.gcc (powerpc*-linux*-*): Likewise.
18633 * configure: Regenerate.
18634 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18635 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18636 used without modification.
18638 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18640 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18641 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18642 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18643 MISC_BUILTIN_SPEC_BARRIER.
18644 (rs6000_init_builtins): Likewise.
18645 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18647 (speculation_barrier): New define_insn.
18648 * doc/extend.texi: Document __builtin_speculation_barrier.
18650 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18653 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18654 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18655 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18657 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18658 integral modes instead of "ss" and "sd".
18659 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18660 vectors with 32-bit and 64-bit elements.
18661 (vecdupssescalarmodesuffix): New mode attribute.
18662 (vec_dup<mode>): Use it.
18664 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18667 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18668 frame if argument is passed on stack.
18670 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18673 * ree.c (combine_reaching_defs): Optimize also
18674 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18675 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18677 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18679 PR middle-end/83189
18680 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18682 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18684 PR middle-end/83718
18685 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18686 after they are computed.
18688 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18690 PR tree-optimization/83695
18691 * gimple-loop-linterchange.cc
18692 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18693 reset cached scev information after interchange.
18694 (pass_linterchange::execute): Remove call to scev_reset_htab.
18696 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18698 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18699 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18700 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18701 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18702 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18703 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18704 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18705 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18706 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18707 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18708 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18709 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18710 (V_lane_reg): Likewise.
18711 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18713 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18714 (vfmal_lane_low<mode>_intrinsic,
18715 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18716 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18717 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18718 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18719 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18720 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18722 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18724 * config/arm/arm-cpus.in (fp16fml): New feature.
18725 (ALL_SIMD): Add fp16fml.
18726 (armv8.2-a): Add fp16fml as an option.
18727 (armv8.3-a): Likewise.
18728 (armv8.4-a): Add fp16fml as part of fp16.
18729 * config/arm/arm.h (TARGET_FP16FML): Define.
18730 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18732 * config/arm/arm-modes.def (V2HF): Define.
18733 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18734 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18735 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18736 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18737 vfmsl_low, vfmsl_high): New set of builtins.
18738 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18739 (vfml_op): New code attribute.
18740 (VFMLHALVES): New int iterator.
18741 (VFML, VFMLSEL): New mode attributes.
18742 (V_reg): Define mapping for V2HF.
18743 (V_hi, V_lo): New mode attributes.
18744 (VF_constraint): Likewise.
18745 (vfml_half, vfml_half_selector): New int attributes.
18746 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18748 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18749 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18751 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18752 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18753 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18754 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18756 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18757 Document new effective target and option set.
18759 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18761 * config/arm/arm-cpus.in (armv8_4): New feature.
18762 (ARMv8_4a): New fgroup.
18763 (armv8.4-a): New arch.
18764 * config/arm/arm-tables.opt: Regenerate.
18765 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18766 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18767 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18768 Add matching rules for -march=armv8.4-a and extensions.
18769 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18771 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18774 * config/rx/rx.md (BW): New mode attribute.
18775 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18777 2018-01-11 Richard Biener <rguenther@suse.de>
18779 PR tree-optimization/83435
18780 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18781 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18782 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18784 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18785 Alan Hayward <alan.hayward@arm.com>
18786 David Sherwood <david.sherwood@arm.com>
18788 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18790 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18791 (aarch64_print_address_internal): Use it to check for a zero offset.
18793 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18794 Alan Hayward <alan.hayward@arm.com>
18795 David Sherwood <david.sherwood@arm.com>
18797 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18798 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18799 Return a poly_int64 rather than a HOST_WIDE_INT.
18800 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18801 rather than a HOST_WIDE_INT.
18802 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18803 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18804 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18805 final_offset from HOST_WIDE_INT to poly_int64.
18806 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18807 to_constant when getting the number of units in an Advanced SIMD
18809 (aarch64_builtin_vectorized_function): Check for a constant number
18811 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18813 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18814 attribute instead of GET_MODE_NUNITS.
18815 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18816 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18817 GET_MODE_SIZE for fixed-size registers.
18818 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18819 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18820 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18821 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18822 (aarch64_print_operand, aarch64_print_address_internal)
18823 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18824 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18825 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18826 Handle polynomial GET_MODE_SIZE.
18827 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
18828 wider than SImode without modification.
18829 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18830 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18831 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18832 passing and returning SVE modes.
18833 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18834 rather than GEN_INT.
18835 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18836 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18837 (aarch64_allocate_and_probe_stack_space): Likewise.
18838 (aarch64_layout_frame): Cope with polynomial offsets.
18839 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18840 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
18841 polynomial offsets.
18842 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18843 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18844 poly_int64 rather than a HOST_WIDE_INT.
18845 (aarch64_get_separate_components, aarch64_process_components)
18846 (aarch64_expand_prologue, aarch64_expand_epilogue)
18847 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18848 (aarch64_anchor_offset): New function, split out from...
18849 (aarch64_legitimize_address): ...here.
18850 (aarch64_builtin_vectorization_cost): Handle polynomial
18851 TYPE_VECTOR_SUBPARTS.
18852 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18854 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18855 number of elements from the PARALLEL rather than the mode.
18856 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18857 rather than GET_MODE_BITSIZE.
18858 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18859 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18860 (aarch64_expand_vec_perm_const_1): Handle polynomial
18861 d->perm.length () and d->perm elements.
18862 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
18863 Apply to_constant to d->perm elements.
18864 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18865 polynomial CONST_VECTOR_NUNITS.
18866 (aarch64_move_pointer): Take amount as a poly_int64 rather
18868 (aarch64_progress_pointer): Avoid temporary variable.
18869 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18870 the mode attribute instead of GET_MODE.
18872 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18873 Alan Hayward <alan.hayward@arm.com>
18874 David Sherwood <david.sherwood@arm.com>
18876 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18877 x exists before using it.
18878 (aarch64_add_constant_internal): Rename to...
18879 (aarch64_add_offset_1): ...this. Replace regnum with separate
18880 src and dest rtxes. Handle the case in which they're different,
18881 including when the offset is zero. Replace scratchreg with an rtx.
18882 Use 2 additions if there is no spare register into which we can
18883 move a 16-bit constant.
18884 (aarch64_add_constant): Delete.
18885 (aarch64_add_offset): Replace reg with separate src and dest
18886 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
18887 Use aarch64_add_offset_1.
18888 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18889 an rtx rather than an int. Take the delta as a poly_int64
18890 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18891 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18892 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18893 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18894 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18895 and aarch64_add_sp.
18896 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18897 aarch64_add_constant.
18899 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18901 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18902 Use scalar_float_mode.
18904 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18906 * config/aarch64/aarch64-simd.md
18907 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18908 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18909 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18910 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18911 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18912 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18913 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18914 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18915 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18916 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18918 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18921 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18922 targ_options->x_arm_arch_string is non NULL.
18924 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18926 * config/aarch64/aarch64.h
18927 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18929 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18932 * expmed.c (emit_store_flag_force): Swap if const op0
18933 and change VOIDmode to mode of op0.
18935 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18937 PR rtl-optimization/83761
18938 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18939 than bytes to mode_for_size.
18941 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18943 PR middle-end/83189
18944 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18945 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18948 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18950 PR middle-end/83575
18951 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18952 when in layout mode.
18953 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18954 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18957 2018-01-10 Michael Collison <michael.collison@arm.com>
18959 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18960 * config/aarch64/aarch64-option-extension.def: Add
18961 AARCH64_OPT_EXTENSION of 'fp16fml'.
18962 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18963 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18964 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18965 * config/aarch64/constraints.md (Ui7): New constraint.
18966 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18967 (VFMLA_SEL_W): Ditto.
18970 (VFMLA16_LOW): New int iterator.
18971 (VFMLA16_HIGH): Ditto.
18972 (UNSPEC_FMLAL): New unspec.
18973 (UNSPEC_FMLSL): Ditto.
18974 (UNSPEC_FMLAL2): Ditto.
18975 (UNSPEC_FMLSL2): Ditto.
18976 (f16mac): New code attribute.
18977 * config/aarch64/aarch64-simd-builtins.def
18978 (aarch64_fmlal_lowv2sf): Ditto.
18979 (aarch64_fmlsl_lowv2sf): Ditto.
18980 (aarch64_fmlalq_lowv4sf): Ditto.
18981 (aarch64_fmlslq_lowv4sf): Ditto.
18982 (aarch64_fmlal_highv2sf): Ditto.
18983 (aarch64_fmlsl_highv2sf): Ditto.
18984 (aarch64_fmlalq_highv4sf): Ditto.
18985 (aarch64_fmlslq_highv4sf): Ditto.
18986 (aarch64_fmlal_lane_lowv2sf): Ditto.
18987 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18988 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18989 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18990 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18991 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18992 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18993 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18994 (aarch64_fmlal_lane_highv2sf): Ditto.
18995 (aarch64_fmlsl_lane_highv2sf): Ditto.
18996 (aarch64_fmlal_laneq_highv2sf): Ditto.
18997 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18998 (aarch64_fmlalq_lane_highv4sf): Ditto.
18999 (aarch64_fmlsl_lane_highv4sf): Ditto.
19000 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19001 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19002 * config/aarch64/aarch64-simd.md:
19003 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19004 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19005 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19006 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19007 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19008 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19009 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19010 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19011 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19012 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19013 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19014 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19015 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19016 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19017 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19018 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19019 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19020 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19021 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19022 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19023 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19024 (vfmlsl_low_u32): Ditto.
19025 (vfmlalq_low_u32): Ditto.
19026 (vfmlslq_low_u32): Ditto.
19027 (vfmlal_high_u32): Ditto.
19028 (vfmlsl_high_u32): Ditto.
19029 (vfmlalq_high_u32): Ditto.
19030 (vfmlslq_high_u32): Ditto.
19031 (vfmlal_lane_low_u32): Ditto.
19032 (vfmlsl_lane_low_u32): Ditto.
19033 (vfmlal_laneq_low_u32): Ditto.
19034 (vfmlsl_laneq_low_u32): Ditto.
19035 (vfmlalq_lane_low_u32): Ditto.
19036 (vfmlslq_lane_low_u32): Ditto.
19037 (vfmlalq_laneq_low_u32): Ditto.
19038 (vfmlslq_laneq_low_u32): Ditto.
19039 (vfmlal_lane_high_u32): Ditto.
19040 (vfmlsl_lane_high_u32): Ditto.
19041 (vfmlal_laneq_high_u32): Ditto.
19042 (vfmlsl_laneq_high_u32): Ditto.
19043 (vfmlalq_lane_high_u32): Ditto.
19044 (vfmlslq_lane_high_u32): Ditto.
19045 (vfmlalq_laneq_high_u32): Ditto.
19046 (vfmlslq_laneq_high_u32): Ditto.
19047 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19048 (AARCH64_FL_FOR_ARCH8_4): New.
19049 (AARCH64_ISA_F16FML): New ISA flag.
19050 (TARGET_F16FML): New feature flag for fp16fml.
19051 (doc/invoke.texi): Document new fp16fml option.
19053 2018-01-10 Michael Collison <michael.collison@arm.com>
19055 * config/aarch64/aarch64-builtins.c:
19056 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19057 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19058 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19059 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19060 (AARCH64_ISA_SHA3): New ISA flag.
19061 (TARGET_SHA3): New feature flag for sha3.
19062 * config/aarch64/iterators.md (sha512_op): New int attribute.
19063 (CRYPTO_SHA512): New int iterator.
19064 (UNSPEC_SHA512H): New unspec.
19065 (UNSPEC_SHA512H2): Ditto.
19066 (UNSPEC_SHA512SU0): Ditto.
19067 (UNSPEC_SHA512SU1): Ditto.
19068 * config/aarch64/aarch64-simd-builtins.def
19069 (aarch64_crypto_sha512hqv2di): New builtin.
19070 (aarch64_crypto_sha512h2qv2di): Ditto.
19071 (aarch64_crypto_sha512su0qv2di): Ditto.
19072 (aarch64_crypto_sha512su1qv2di): Ditto.
19073 (aarch64_eor3qv8hi): Ditto.
19074 (aarch64_rax1qv2di): Ditto.
19075 (aarch64_xarqv2di): Ditto.
19076 (aarch64_bcaxqv8hi): Ditto.
19077 * config/aarch64/aarch64-simd.md:
19078 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19079 (aarch64_crypto_sha512su0qv2di): Ditto.
19080 (aarch64_crypto_sha512su1qv2di): Ditto.
19081 (aarch64_eor3qv8hi): Ditto.
19082 (aarch64_rax1qv2di): Ditto.
19083 (aarch64_xarqv2di): Ditto.
19084 (aarch64_bcaxqv8hi): Ditto.
19085 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19086 (vsha512h2q_u64): Ditto.
19087 (vsha512su0q_u64): Ditto.
19088 (vsha512su1q_u64): Ditto.
19089 (veor3q_u16): Ditto.
19090 (vrax1q_u64): Ditto.
19091 (vxarq_u64): Ditto.
19092 (vbcaxq_u16): Ditto.
19093 * config/arm/types.md (crypto_sha512): New type attribute.
19094 (crypto_sha3): Ditto.
19095 (doc/invoke.texi): Document new sha3 option.
19097 2018-01-10 Michael Collison <michael.collison@arm.com>
19099 * config/aarch64/aarch64-builtins.c:
19100 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19101 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19102 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19103 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19104 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19105 (AARCH64_ISA_SM4): New ISA flag.
19106 (TARGET_SM4): New feature flag for sm4.
19107 * config/aarch64/aarch64-simd-builtins.def
19108 (aarch64_sm3ss1qv4si): Ditto.
19109 (aarch64_sm3tt1aq4si): Ditto.
19110 (aarch64_sm3tt1bq4si): Ditto.
19111 (aarch64_sm3tt2aq4si): Ditto.
19112 (aarch64_sm3tt2bq4si): Ditto.
19113 (aarch64_sm3partw1qv4si): Ditto.
19114 (aarch64_sm3partw2qv4si): Ditto.
19115 (aarch64_sm4eqv4si): Ditto.
19116 (aarch64_sm4ekeyqv4si): Ditto.
19117 * config/aarch64/aarch64-simd.md:
19118 (aarch64_sm3ss1qv4si): Ditto.
19119 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19120 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19121 (aarch64_sm4eqv4si): Ditto.
19122 (aarch64_sm4ekeyqv4si): Ditto.
19123 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19124 (sm3part_op): Ditto.
19125 (CRYPTO_SM3TT): Ditto.
19126 (CRYPTO_SM3PART): Ditto.
19127 (UNSPEC_SM3SS1): New unspec.
19128 (UNSPEC_SM3TT1A): Ditto.
19129 (UNSPEC_SM3TT1B): Ditto.
19130 (UNSPEC_SM3TT2A): Ditto.
19131 (UNSPEC_SM3TT2B): Ditto.
19132 (UNSPEC_SM3PARTW1): Ditto.
19133 (UNSPEC_SM3PARTW2): Ditto.
19134 (UNSPEC_SM4E): Ditto.
19135 (UNSPEC_SM4EKEY): Ditto.
19136 * config/aarch64/constraints.md (Ui2): New constraint.
19137 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19138 * config/arm/types.md (crypto_sm3): New type attribute.
19139 (crypto_sm4): Ditto.
19140 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19141 (vsm3tt1aq_u32): Ditto.
19142 (vsm3tt1bq_u32): Ditto.
19143 (vsm3tt2aq_u32): Ditto.
19144 (vsm3tt2bq_u32): Ditto.
19145 (vsm3partw1q_u32): Ditto.
19146 (vsm3partw2q_u32): Ditto.
19147 (vsm4eq_u32): Ditto.
19148 (vsm4ekeyq_u32): Ditto.
19149 (doc/invoke.texi): Document new sm4 option.
19151 2018-01-10 Michael Collison <michael.collison@arm.com>
19153 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19154 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19155 (AARCH64_FL_FOR_ARCH8_4): New.
19156 (AARCH64_FL_V8_4): New flag.
19157 (doc/invoke.texi): Document new armv8.4-a option.
19159 2018-01-10 Michael Collison <michael.collison@arm.com>
19161 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19162 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19163 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19164 * config/aarch64/aarch64-option-extension.def: Add
19165 AARCH64_OPT_EXTENSION of 'sha2'.
19166 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19167 (crypto): Disable sha2 and aes if crypto disabled.
19168 (crypto): Enable aes and sha2 if enabled.
19169 (simd): Disable sha2 and aes if simd disabled.
19170 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19172 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19173 (TARGET_SHA2): New feature flag for sha2.
19174 (TARGET_AES): New feature flag for aes.
19175 * config/aarch64/aarch64-simd.md:
19176 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19177 conditional on TARGET_AES.
19178 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19179 (aarch64_crypto_sha1hsi): Make pattern conditional
19181 (aarch64_crypto_sha1hv4si): Ditto.
19182 (aarch64_be_crypto_sha1hv4si): Ditto.
19183 (aarch64_crypto_sha1su1v4si): Ditto.
19184 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19185 (aarch64_crypto_sha1su0v4si): Ditto.
19186 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19187 (aarch64_crypto_sha256su0v4si): Ditto.
19188 (aarch64_crypto_sha256su1v4si): Ditto.
19189 (doc/invoke.texi): Document new aes and sha2 options.
19191 2018-01-10 Martin Sebor <msebor@redhat.com>
19193 PR tree-optimization/83781
19194 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19197 2018-01-11 Martin Sebor <msebor@gmail.com>
19198 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19200 PR tree-optimization/83501
19201 PR tree-optimization/81703
19203 * tree-ssa-strlen.c (get_string_cst): Rename...
19204 (get_string_len): ...to this. Handle global constants.
19205 (handle_char_store): Adjust.
19207 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19208 Jim Wilson <jimw@sifive.com>
19210 * config/riscv/riscv-protos.h (riscv_output_return): New.
19211 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19212 (riscv_attribute_table, riscv_output_return),
19213 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19214 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19215 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19217 (riscv_expand_prologue): Add early return for naked function.
19218 (riscv_expand_epilogue): Likewise.
19219 (riscv_function_ok_for_sibcall): Return false for naked function.
19220 (riscv_set_current_function): New.
19221 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19222 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19223 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19224 * doc/extend.texi (RISC-V Function Attributes): New.
19226 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19228 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19229 check for 128-bit long double before checking TCmode.
19230 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19231 128-bit long doubles before checking TFmode or TCmode.
19232 (FLOAT128_IBM_P): Likewise.
19234 2018-01-10 Martin Sebor <msebor@redhat.com>
19236 PR tree-optimization/83671
19237 * builtins.c (c_strlen): Unconditionally return zero for the empty
19239 Use -Warray-bounds for warnings.
19240 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19241 for non-constant array indices with COMPONENT_REF, arrays of
19242 arrays, and pointers to arrays.
19243 (gimple_fold_builtin_strlen): Determine and set length range for
19244 non-constant character arrays.
19246 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19248 PR middle-end/81897
19249 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19252 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19254 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19256 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19259 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19260 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19261 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19262 indexed_or_indirect_operand predicate.
19263 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19264 (*vsx_le_perm_load_v8hi): Likewise.
19265 (*vsx_le_perm_load_v16qi): Likewise.
19266 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19267 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19268 (*vsx_le_perm_store_v8hi): Likewise.
19269 (*vsx_le_perm_store_v16qi): Likewise.
19270 (eight unnamed splitters): Likewise.
19272 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19274 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19275 * config/rs6000/emmintrin.h: Likewise.
19276 * config/rs6000/mmintrin.h: Likewise.
19277 * config/rs6000/xmmintrin.h: Likewise.
19279 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19282 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19284 * tree.c (tree_nop_conversion): Return true for location wrapper
19286 (maybe_wrap_with_location): New function.
19287 (selftest::check_strip_nops): New function.
19288 (selftest::test_location_wrappers): New function.
19289 (selftest::tree_c_tests): Call it.
19290 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19291 (maybe_wrap_with_location): New decl.
19292 (EXPR_LOCATION_WRAPPER_P): New macro.
19293 (location_wrapper_p): New inline function.
19294 (tree_strip_any_location_wrapper): New inline function.
19296 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19299 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19300 stack_realign_offset for the largest alignment of stack slot
19302 (ix86_find_max_used_stack_alignment): New function.
19303 (ix86_finalize_stack_frame_flags): Use it. Set
19304 max_used_stack_alignment if we don't realign stack.
19305 * config/i386/i386.h (machine_function): Add
19306 max_used_stack_alignment.
19308 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19310 * config/arm/arm.opt (-mbranch-cost): New option.
19311 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19314 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19317 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19318 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19320 2018-01-10 Richard Biener <rguenther@suse.de>
19323 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19324 early out so it also covers the case where we have a non-NULL
19327 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19329 PR tree-optimization/83753
19330 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19331 for non-strided grouped accesses if the number of elements is 1.
19333 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19336 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19337 * i386.h (TARGET_USE_GATHER): Define.
19338 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19340 2018-01-10 Martin Liska <mliska@suse.cz>
19343 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19344 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19346 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19347 CLEANUP_NO_PARTITIONING is not set.
19349 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19351 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19352 for vectors, as a partial revert of r254296.
19353 * rtl.h (const_vec_p): Delete.
19354 (const_vec_duplicate_p): Don't test for vector CONSTs.
19355 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19356 * expmed.c (make_tree): Likewise.
19359 * common.md (E, F): Use CONSTANT_P instead of checking for
19361 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19362 checking for CONST_VECTOR.
19364 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19366 PR middle-end/83575
19367 * predict.c (force_edge_cold): Handle in more sane way edges
19368 with no prediction.
19370 2018-01-09 Carl Love <cel@us.ibm.com>
19372 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19374 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19375 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19376 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19377 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19378 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19379 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19380 * config/rs6000/rs6000-protos.h: Add extern defition for
19381 rs6000_generate_float2_double_code.
19382 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19384 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19385 (float2_v2df): Add define_expand.
19387 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19390 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19391 op_mode in the force_to_mode call.
19393 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19395 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19396 instead of checking each element individually.
19397 (aarch64_evpc_uzp): Likewise.
19398 (aarch64_evpc_zip): Likewise.
19399 (aarch64_evpc_ext): Likewise.
19400 (aarch64_evpc_rev): Likewise.
19401 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19402 instead of checking each element individually. Return true without
19404 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19405 whether all selected elements come from the same input, instead of
19406 checking each element individually. Remove calls to gen_rtx_REG,
19407 start_sequence and end_sequence and instead assert that no rtl is
19410 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19412 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19413 order of HIGH and CONST checks.
19415 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19417 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19418 if the destination isn't an SSA_NAME.
19420 2018-01-09 Richard Biener <rguenther@suse.de>
19422 PR tree-optimization/83668
19423 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19425 (canonicalize_loop_form): ... here, renamed from ...
19426 (canonicalize_loop_closed_ssa_form): ... this and amended to
19427 swap successor edges for loop exit blocks to make us use
19428 the RPO order we need for initial schedule generation.
19430 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19432 PR tree-optimization/64811
19433 * match.pd: When optimizing comparisons with Inf, avoid
19434 introducing or losing exceptions from comparisons with NaN.
19436 2018-01-09 Martin Liska <mliska@suse.cz>
19439 * asan.c (shadow_mem_size): Add gcc_assert.
19441 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19443 Don't save registers in main().
19446 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19447 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19448 * config/avr/avr.c (avr_set_current_function): Don't error if
19449 naked, OS_task or OS_main are specified at the same time.
19450 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19452 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19454 * common/config/avr/avr-common.c (avr_option_optimization_table):
19455 Switch on -mmain-is-OS_task for optimizing compilations.
19457 2018-01-09 Richard Biener <rguenther@suse.de>
19459 PR tree-optimization/83572
19460 * graphite.c: Include cfganal.h.
19461 (graphite_transform_loops): Connect infinite loops to exit
19462 and remove fake edges at the end.
19464 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19466 * ipa-inline.c (edge_badness): Revert accidental checkin.
19468 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19471 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19472 symbols; not inline clones.
19474 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19477 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19478 hard registers. Formatting fixes.
19480 PR preprocessor/83722
19481 * gcc.c (try_generate_repro): Pass
19482 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19483 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19486 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19487 Kito Cheng <kito.cheng@gmail.com>
19489 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19490 (riscv_leaf_function_p): Delete.
19491 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19493 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19495 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19497 (do_ifelse): New function.
19498 (do_isel): New function.
19499 (do_sub3): New function.
19500 (do_add3): New function.
19501 (do_load_mask_compare): New function.
19502 (do_overlap_load_compare): New function.
19503 (expand_compare_loop): New function.
19504 (expand_block_compare): Call expand_compare_loop() when appropriate.
19505 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19506 option description.
19507 (-mblock-compare-inline-loop-limit): New option.
19509 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19512 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19513 Reverse order of second and third operands in first alternative.
19514 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19515 of first and second elements in UNSPEC_VPERMR vector.
19516 (altivec_expand_vec_perm_le): Likewise.
19518 2018-01-08 Jeff Law <law@redhat.com>
19520 PR rtl-optimizatin/81308
19521 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19522 (process_switch): If group_case_labels makes a change, then set
19524 (pass_convert_switch::execute): If a switch is converted, then
19525 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19527 PR rtl-optimization/81308
19528 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19531 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19533 PR target/83663 - Revert r255946
19534 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19535 generation for cases where splatting a value is not useful.
19536 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19537 across a vec_duplicate and a paradoxical subreg forming a vector
19538 mode to a vec_concat.
19540 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19542 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19543 -march=armv8.3-a variants.
19544 * config/arm/t-multilib: Likewise.
19545 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19547 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19549 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19551 (cceq_ior_compare_complement): Give it a name so I can use it, and
19552 change boolean_or_operator predicate to boolean_operator so it can
19553 be used to generate a crand.
19554 (eqne): New code iterator.
19555 (bd/bd_neg): New code_attrs.
19556 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19557 a single define_insn.
19558 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19559 decrement (bdnzt/bdnzf/bdzt/bdzf).
19560 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19561 with the new names of the branch decrement patterns, and added the
19562 names of the branch decrement conditional patterns.
19564 2018-01-08 Richard Biener <rguenther@suse.de>
19566 PR tree-optimization/83563
19567 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19570 2018-01-08 Richard Biener <rguenther@suse.de>
19572 PR middle-end/83713
19573 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19575 2018-01-08 Richard Biener <rguenther@suse.de>
19577 PR tree-optimization/83685
19578 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19579 references to abnormals.
19581 2018-01-08 Richard Biener <rguenther@suse.de>
19584 * dwarf2out.c (output_indirect_strings): Handle empty
19585 skeleton_debug_str_hash.
19586 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19588 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19590 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19591 (emit_store_direct): Likewise.
19592 (arc_trampoline_adjust_address): Likewise.
19593 (arc_asm_trampoline_template): New function.
19594 (arc_initialize_trampoline): Use asm_trampoline_template.
19595 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19596 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19597 * config/arc/arc.md (flush_icache): Delete pattern.
19599 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19601 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19602 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19605 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19608 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19609 by not USED_FOR_TARGET.
19610 (make_pass_resolve_sw_modes): Likewise.
19612 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19614 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19617 2018-01-08 Richard Biener <rguenther@suse.de>
19619 PR middle-end/83580
19620 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19622 2018-01-08 Richard Biener <rguenther@suse.de>
19624 PR middle-end/83517
19625 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19627 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19629 PR middle-end/81897
19630 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19631 basic blocks with a small number of successors.
19632 (convert_control_dep_chain_into_preds): Improve handling of
19634 (dump_predicates): Split apart into...
19635 (dump_pred_chain): ...here...
19636 (dump_pred_info): ...and here.
19637 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19638 (can_chain_union_be_invalidated_p): Improve check for invalidation
19640 (uninit_uses_cannot_happen): Avoid unnecessary if
19641 convert_control_dep_chain_into_preds yielded nothing.
19643 2018-01-06 Martin Sebor <msebor@redhat.com>
19645 PR tree-optimization/83640
19646 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19647 subtracting negative offset from size.
19648 (builtin_access::overlap): Adjust offset bounds of the access to fall
19649 within the size of the object if possible.
19651 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19653 PR rtl-optimization/83699
19654 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19655 extract_bit_field_as_subreg to cases in which the extracted
19656 value is also a vector.
19658 * lra-constraints.c (process_alt_operands): Test for the equivalence
19659 substitutions when detecting a possible reload cycle.
19661 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19664 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19665 by default if flag_selective_schedling{,2}. Formatting fixes.
19667 PR rtl-optimization/83682
19668 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19669 if it has non-VECTOR_MODE element mode.
19670 (vec_duplicate_p): Likewise.
19672 PR middle-end/83694
19673 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19674 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19676 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19679 * config/i386/i386-builtin.def
19680 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19681 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19682 Require also OPTION_MASK_ISA_AVX512F in addition to
19683 OPTION_MASK_ISA_GFNI.
19684 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19685 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19686 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19687 to OPTION_MASK_ISA_GFNI.
19688 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19689 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19690 OPTION_MASK_ISA_AVX512BW.
19691 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19692 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19693 addition to OPTION_MASK_ISA_GFNI.
19694 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19695 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19696 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19697 to OPTION_MASK_ISA_GFNI.
19698 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19699 a requirement for all ISAs rather than any of them with a few
19701 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19703 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19704 bitmasks to be enabled with 3 exceptions, instead of requiring any
19705 enabled ISA with lots of exceptions.
19706 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19707 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19708 Change avx512bw in isa attribute to avx512f.
19709 * config/i386/sgxintrin.h: Add license boilerplate.
19710 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19711 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19712 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19713 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19715 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19716 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19717 temporarily sse2 rather than sse if not enabled already.
19720 * config/i386/sse.md (VI248_VLBW): Rename to ...
19721 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19722 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19723 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19724 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19725 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19726 mode iterator instead of VI248_VLBW.
19728 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19730 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19731 (record_modified): Skip clobbers; add debug output.
19732 (param_change_prob): Use sreal frequencies.
19734 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19736 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19737 punt for user-aligned variables.
19739 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19741 * tree-chrec.c (chrec_contains_symbols): Return true for
19744 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19747 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19748 of (x|y) == x for BICS pattern.
19750 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19752 PR tree-optimization/83605
19753 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19754 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19757 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19759 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19760 * config/epiphany/rtems.h: New file.
19762 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19763 Uros Bizjak <ubizjak@gmail.com>
19766 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19767 QIreg_operand instead of register_operand predicate.
19768 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19769 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19770 comments instead of -fmitigate[-_]rop.
19772 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19775 * cgraphunit.c (symbol_table::compile): Switch to text_section
19776 before calling assembly_start debug hook.
19777 * run-rtl-passes.c (run_rtl_passes): Likewise.
19780 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19782 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19783 range_int_cst_p rather than !symbolic_range_p before calling
19784 extract_range_from_multiplicative_op_1.
19786 2018-01-04 Jeff Law <law@redhat.com>
19788 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19789 redundant test in assertion.
19791 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19793 * doc/rtl.texi: Document machine_mode wrapper classes.
19795 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19797 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19798 using tree_to_uhwi.
19800 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19802 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19803 the VEC_PERM_EXPR fold to fail.
19805 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19808 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19809 to switched_sections.
19811 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19814 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19815 test for d.testing.
19817 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
19820 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19821 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19823 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19826 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19827 is BLKmode and bitpos not zero or mode change is needed.
19829 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19832 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19835 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
19838 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19839 instead of MULT rtx. Update all corresponding splitters.
19840 (*saddl_se): Ditto.
19841 (*ssub<modesuffix>): Ditto.
19842 (*ssubl_se): Ditto.
19843 (*cmp_sadd_di): Update split patterns.
19844 (*cmp_sadd_si): Ditto.
19845 (*cmp_sadd_sidi): Ditto.
19846 (*cmp_ssub_di): Ditto.
19847 (*cmp_ssub_si): Ditto.
19848 (*cmp_ssub_sidi): Ditto.
19849 * config/alpha/predicates.md (const23_operand): New predicate.
19850 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19851 Look for ASHIFT, not MULT inner operand.
19852 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19854 2018-01-04 Martin Liska <mliska@suse.cz>
19856 PR gcov-profile/83669
19857 * gcov.c (output_intermediate_file): Add version to intermediate
19859 * doc/gcov.texi: Document new field 'version' in intermediate
19860 file format. Fix location of '-k' option of gcov command.
19862 2018-01-04 Martin Liska <mliska@suse.cz>
19865 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19867 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19869 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19871 2018-01-03 Martin Sebor <msebor@redhat.com>
19873 PR tree-optimization/83655
19874 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19875 checking calls with invalid arguments.
19877 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19879 * tree-vect-stmts.c (vect_get_store_rhs): New function.
19880 (vectorizable_mask_load_store): Delete.
19881 (vectorizable_call): Return false for masked loads and stores.
19882 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
19883 instead of gimple_assign_rhs1.
19884 (vectorizable_load): Handle IFN_MASK_LOAD.
19885 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19889 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19891 (vectorizable_mask_load_store): ...here.
19892 (vectorizable_load): ...and here.
19894 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19896 * tree-vect-stmts.c (vect_build_all_ones_mask)
19897 (vect_build_zero_merge_argument): New functions, split out from...
19898 (vectorizable_load): ...here.
19900 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19902 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19904 (vectorizable_mask_load_store): ...here.
19905 (vectorizable_store): ...and here.
19907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19909 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19911 (vectorizable_mask_load_store): ...here.
19913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19915 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19916 (vect_model_store_cost): Take a vec_load_store_type instead of a
19918 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19919 (vect_model_store_cost): Take a vec_load_store_type instead of a
19921 (vectorizable_mask_load_store): Update accordingly.
19922 (vectorizable_store): Likewise.
19923 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19927 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19928 IFN_MASK_LOAD calls here rather than...
19929 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19932 Alan Hayward <alan.hayward@arm.com>
19933 David Sherwood <david.sherwood@arm.com>
19935 * expmed.c (extract_bit_field_1): For vector extracts,
19936 fall back to extract_bit_field_as_subreg if vec_extract
19939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19940 Alan Hayward <alan.hayward@arm.com>
19941 David Sherwood <david.sherwood@arm.com>
19943 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19944 they are variable or constant sized.
19945 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19946 slots for constant-sized data.
19948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19949 Alan Hayward <alan.hayward@arm.com>
19950 David Sherwood <david.sherwood@arm.com>
19952 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19953 handling COND_EXPRs with boolean comparisons, try to find a better
19954 basis for the mask type than the boolean itself.
19956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19958 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19959 is calculated and how it can be overridden.
19960 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19961 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19963 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19967 Alan Hayward <alan.hayward@arm.com>
19968 David Sherwood <david.sherwood@arm.com>
19970 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19971 Remove the mode argument.
19972 (aarch64_simd_valid_immediate): Remove the mode and inverse
19974 * config/aarch64/iterators.md (bitsize): New iterator.
19975 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19976 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19977 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19978 aarch64_simd_valid_immediate.
19979 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19980 (aarch64_reg_or_bic_imm): Likewise.
19981 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19982 with an insn_type enum and msl with a modifier_type enum.
19983 Replace element_width with a scalar_mode. Change the shift
19984 to unsigned int. Add constructors for scalar_float_mode and
19985 scalar_int_mode elements.
19986 (aarch64_vect_float_const_representable_p): Delete.
19987 (aarch64_can_const_movi_rtx_p)
19988 (aarch64_simd_scalar_immediate_valid_for_move)
19989 (aarch64_simd_make_constant): Update call to
19990 aarch64_simd_valid_immediate.
19991 (aarch64_advsimd_valid_immediate_hs): New function.
19992 (aarch64_advsimd_valid_immediate): Likewise.
19993 (aarch64_simd_valid_immediate): Remove mode and inverse
19994 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19995 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19996 and aarch64_float_const_representable_p on the result.
19997 (aarch64_output_simd_mov_immediate): Remove mode argument.
19998 Update call to aarch64_simd_valid_immediate and use of
19999 simd_immediate_info.
20000 (aarch64_output_scalar_simd_mov_immediate): Update call
20003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20004 Alan Hayward <alan.hayward@arm.com>
20005 David Sherwood <david.sherwood@arm.com>
20007 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20008 (mode_nunits): Likewise CONST_MODE_NUNITS.
20009 * machmode.def (ADJUST_NUNITS): Document.
20010 * genmodes.c (mode_data::need_nunits_adj): New field.
20011 (blank_mode): Update accordingly.
20012 (adj_nunits): New variable.
20013 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20015 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20016 listed in adj_nunits.
20017 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20018 listed in adj_nunits. Don't emit case statements for such modes.
20019 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20020 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20021 nothing if adj_nunits is nonnull.
20022 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20023 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20024 (emit_mode_fbit): Update use of print_maybe_const_decl.
20025 (emit_move_size): Likewise. Treat the array as non-const
20027 (emit_mode_adjustments): Handle adj_nunits.
20029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20031 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20032 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20033 (VECTOR_MODES): Use it.
20034 (make_vector_modes): Take the prefix as an argument.
20036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20037 Alan Hayward <alan.hayward@arm.com>
20038 David Sherwood <david.sherwood@arm.com>
20040 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20041 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20042 for MODE_VECTOR_BOOL.
20043 * machmode.def (VECTOR_BOOL_MODE): Document.
20044 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20045 (make_vector_bool_mode): New function.
20046 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20048 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20049 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20051 * stor-layout.c (int_mode_for_mode): Likewise.
20052 * tree.c (build_vector_type_for_mode): Likewise.
20053 * varasm.c (output_constant_pool_2): Likewise.
20054 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20055 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20056 for MODE_VECTOR_BOOL.
20057 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20058 of mode class checks.
20059 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20060 instead of a list of mode class checks.
20061 (expand_vector_scalar_condition): Likewise.
20062 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20065 Alan Hayward <alan.hayward@arm.com>
20066 David Sherwood <david.sherwood@arm.com>
20068 * machmode.h (mode_size): Change from unsigned short to
20070 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20071 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20072 or if measurement_type is not polynomial.
20073 (fixed_size_mode::includes_p): Check for constant-sized modes.
20074 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20075 return a poly_uint16 rather than an unsigned short.
20076 (emit_mode_size): Change the type of mode_size from unsigned short
20077 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20078 (emit_mode_adjustments): Cope with polynomial vector sizes.
20079 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20081 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20083 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20084 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20085 * caller-save.c (setup_save_areas): Likewise.
20086 (replace_reg_with_saved_mem): Likewise.
20087 * calls.c (emit_library_call_value_1): Likewise.
20088 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20089 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20090 (gen_lowpart_for_combine): Likewise.
20091 * convert.c (convert_to_integer_1): Likewise.
20092 * cse.c (equiv_constant, cse_insn): Likewise.
20093 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20094 (cselib_subst_to_values): Likewise.
20095 * dce.c (word_dce_process_block): Likewise.
20096 * df-problems.c (df_word_lr_mark_ref): Likewise.
20097 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20098 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20099 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20100 (rtl_for_decl_location): Likewise.
20101 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20102 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20103 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20104 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20105 (expand_expr_real_1): Likewise.
20106 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20107 (pad_below): Likewise.
20108 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20109 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20110 * ira.c (get_subreg_tracking_sizes): Likewise.
20111 * ira-build.c (ira_create_allocno_objects): Likewise.
20112 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20113 (ira_sort_regnos_for_alter_reg): Likewise.
20114 * ira-costs.c (record_operand_costs): Likewise.
20115 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20116 (resolve_simple_move): Likewise.
20117 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20118 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20119 (lra_constraints): Likewise.
20120 (CONST_POOL_OK_P): Reject variable-sized modes.
20121 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20122 (add_pseudo_to_slot, lra_spill): Likewise.
20123 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20124 * optabs-query.c (get_best_extraction_insn): Likewise.
20125 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20126 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20127 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20128 * recog.c (offsettable_address_addr_space_p): Likewise.
20129 * regcprop.c (maybe_mode_change): Likewise.
20130 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20131 * regrename.c (build_def_use): Likewise.
20132 * regstat.c (dump_reg_info): Likewise.
20133 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20134 (find_reloads, find_reloads_subreg_address): Likewise.
20135 * reload1.c (eliminate_regs_1): Likewise.
20136 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20137 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20138 (simplify_binary_operation_1, simplify_subreg): Likewise.
20139 * targhooks.c (default_function_arg_padding): Likewise.
20140 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20141 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20142 (verify_gimple_assign_ternary): Likewise.
20143 * tree-inline.c (estimate_move_cost): Likewise.
20144 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20145 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20146 (get_address_cost_ainc): Likewise.
20147 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20148 (vect_supportable_dr_alignment): Likewise.
20149 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20150 (vectorizable_reduction): Likewise.
20151 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20152 (vectorizable_operation, vectorizable_load): Likewise.
20153 * tree.c (build_same_sized_truth_vector_type): Likewise.
20154 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20155 * var-tracking.c (emit_note_insn_var_location): Likewise.
20156 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20157 (ADDR_VEC_ALIGN): Likewise.
20159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20160 Alan Hayward <alan.hayward@arm.com>
20161 David Sherwood <david.sherwood@arm.com>
20163 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20165 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20166 or if measurement_type is polynomial.
20167 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20168 * combine.c (make_extraction): Likewise.
20169 * dse.c (find_shift_sequence): Likewise.
20170 * dwarf2out.c (mem_loc_descriptor): Likewise.
20171 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20172 (extract_bit_field, extract_low_bits): Likewise.
20173 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20174 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20175 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20176 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20177 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20178 * reload.c (find_reloads): Likewise.
20179 * reload1.c (alter_reg): Likewise.
20180 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20181 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20182 * tree-if-conv.c (predicate_mem_writes): Likewise.
20183 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20184 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20185 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20186 * valtrack.c (dead_debug_insert_temp): Likewise.
20187 * varasm.c (mergeable_constant_section): Likewise.
20188 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20191 Alan Hayward <alan.hayward@arm.com>
20192 David Sherwood <david.sherwood@arm.com>
20194 * expr.c (expand_assignment): Cope with polynomial mode sizes
20195 when assigning to a CONCAT.
20197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20198 Alan Hayward <alan.hayward@arm.com>
20199 David Sherwood <david.sherwood@arm.com>
20201 * machmode.h (mode_precision): Change from unsigned short to
20203 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20205 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20206 or if measurement_type is not polynomial.
20207 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20208 in which the mode is already known to be a scalar_int_mode.
20209 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20210 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20212 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20213 for GET_MODE_PRECISION.
20214 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20215 for GET_MODE_PRECISION.
20216 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20218 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20219 (expand_field_assignment, make_extraction): Likewise.
20220 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20221 (get_last_value): Likewise.
20222 * convert.c (convert_to_integer_1): Likewise.
20223 * cse.c (cse_insn): Likewise.
20224 * expr.c (expand_expr_real_1): Likewise.
20225 * lra-constraints.c (simplify_operand_subreg): Likewise.
20226 * optabs-query.c (can_atomic_load_p): Likewise.
20227 * optabs.c (expand_atomic_load): Likewise.
20228 (expand_atomic_store): Likewise.
20229 * ree.c (combine_reaching_defs): Likewise.
20230 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20231 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20232 * tree.h (type_has_mode_precision_p): Likewise.
20233 * ubsan.c (instrument_si_overflow): Likewise.
20235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20236 Alan Hayward <alan.hayward@arm.com>
20237 David Sherwood <david.sherwood@arm.com>
20239 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20240 polynomial numbers of units.
20241 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20242 (valid_vector_subparts_p): New function.
20243 (build_vector_type): Remove temporary shim and take the number
20244 of units as a poly_uint64 rather than an int.
20245 (build_opaque_vector_type): Take the number of units as a
20246 poly_uint64 rather than an int.
20247 * tree.c (build_vector_from_ctor): Handle polynomial
20248 TYPE_VECTOR_SUBPARTS.
20249 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20250 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20251 (build_vector_from_val): If the number of units is variable,
20252 use build_vec_duplicate_cst for constant operands and
20253 VEC_DUPLICATE_EXPR otherwise.
20254 (make_vector_type): Remove temporary is_constant ().
20255 (build_vector_type, build_opaque_vector_type): Take the number of
20256 units as a poly_uint64 rather than an int.
20257 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20259 * cfgexpand.c (expand_debug_expr): Likewise.
20260 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20261 (store_constructor, expand_expr_real_1): Likewise.
20262 (const_scalar_mask_from_tree): Likewise.
20263 * fold-const-call.c (fold_const_reduction): Likewise.
20264 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20265 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20266 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20267 (fold_relational_const): Likewise.
20268 (native_interpret_vector): Likewise. Change the size from an
20269 int to an unsigned int.
20270 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20271 TYPE_VECTOR_SUBPARTS.
20272 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20273 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20274 duplicating a non-constant operand into a variable-length vector.
20275 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20276 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20277 * ipa-icf.c (sem_variable::equals): Likewise.
20278 * match.pd: Likewise.
20279 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20280 * print-tree.c (print_node): Likewise.
20281 * stor-layout.c (layout_type): Likewise.
20282 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20283 * tree-cfg.c (verify_gimple_comparison): Likewise.
20284 (verify_gimple_assign_binary): Likewise.
20285 (verify_gimple_assign_ternary): Likewise.
20286 (verify_gimple_assign_single): Likewise.
20287 * tree-pretty-print.c (dump_generic_node): Likewise.
20288 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20289 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20290 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20291 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20292 (vect_shift_permute_load_chain): Likewise.
20293 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20294 (expand_vector_condition, optimize_vector_constructor): Likewise.
20295 (lower_vec_perm, get_compute_type): Likewise.
20296 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20297 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20298 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20299 (vect_recog_mask_conversion_pattern): Likewise.
20300 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20301 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20302 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20303 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20304 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20305 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20306 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20307 (supportable_widening_operation): Likewise.
20308 (supportable_narrowing_operation): Likewise.
20309 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20311 * varasm.c (output_constant): Likewise.
20313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20314 Alan Hayward <alan.hayward@arm.com>
20315 David Sherwood <david.sherwood@arm.com>
20317 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20318 so that both the length == 3 and length != 3 cases set up their
20319 own permute vectors. Add comments explaining why we know the
20320 number of elements is constant.
20321 (vect_permute_load_chain): Likewise.
20323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20324 Alan Hayward <alan.hayward@arm.com>
20325 David Sherwood <david.sherwood@arm.com>
20327 * machmode.h (mode_nunits): Change from unsigned char to
20329 (ONLY_FIXED_SIZE_MODES): New macro.
20330 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20331 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20332 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20334 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20335 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20336 or if measurement_type is not polynomial.
20337 * genmodes.c (ZERO_COEFFS): New macro.
20338 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20340 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20341 Use ZERO_COEFFS when emitting initializers.
20342 * data-streamer.h (bp_pack_poly_value): New function.
20343 (bp_unpack_poly_value): Likewise.
20344 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20345 for GET_MODE_NUNITS.
20346 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20347 for GET_MODE_NUNITS.
20348 * tree.c (make_vector_type): Remove temporary shim and make
20349 the real function take the number of units as a poly_uint64
20350 rather than an int.
20351 (build_vector_type_for_mode): Handle polynomial nunits.
20352 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20353 * emit-rtl.c (const_vec_series_p_1): Likewise.
20354 (gen_rtx_CONST_VECTOR): Likewise.
20355 * fold-const.c (test_vec_duplicate_folding): Likewise.
20356 * genrecog.c (validate_pattern): Likewise.
20357 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20358 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20359 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20360 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20361 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20362 * rtlanal.c (subreg_get_info): Likewise.
20363 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20364 (vect_grouped_load_supported): Likewise.
20365 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20366 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20367 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20368 (simplify_const_unary_operation, simplify_binary_operation_1)
20369 (simplify_const_binary_operation, simplify_ternary_operation)
20370 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20371 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20372 instead of CONST_VECTOR_NUNITS.
20373 * varasm.c (output_constant_pool_2): Likewise.
20374 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20375 explicit-encoded elements in the XVEC for variable-length vectors.
20377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20379 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20382 Alan Hayward <alan.hayward@arm.com>
20383 David Sherwood <david.sherwood@arm.com>
20385 * coretypes.h (fixed_size_mode): Declare.
20386 (fixed_size_mode_pod): New typedef.
20387 * builtins.h (target_builtins::x_apply_args_mode)
20388 (target_builtins::x_apply_result_mode): Change type to
20389 fixed_size_mode_pod.
20390 * builtins.c (apply_args_size, apply_result_size, result_vector)
20391 (expand_builtin_apply_args_1, expand_builtin_apply)
20392 (expand_builtin_return): Update accordingly.
20394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20396 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20397 * cselib.c (cselib_hash_rtx): Likewise.
20398 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20399 CONST_VECTOR encoding.
20401 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20402 Jeff Law <law@redhat.com>
20405 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20406 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20407 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20408 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20411 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20412 explicitly probe *sp in a noreturn function if there were any callee
20413 register saves or frame pointer is needed.
20415 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20418 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20419 BLKmode for ternary, binary or unary expressions.
20422 * var-tracking.c (delete_vta_debug_insn): New inline function.
20423 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20424 insns from get_insns () to NULL instead of each bb separately.
20425 Use delete_vta_debug_insn. No longer static.
20426 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20427 delete_vta_debug_insns callers.
20428 * rtl.h (delete_vta_debug_insns): Declare.
20429 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20430 instead of variable_tracking_main.
20432 2018-01-03 Martin Sebor <msebor@redhat.com>
20434 PR tree-optimization/83603
20435 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20436 arguments past the endof the argument list in functions declared
20437 without a prototype.
20438 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20439 Avoid checking when arguments are null.
20441 2018-01-03 Martin Sebor <msebor@redhat.com>
20444 * doc/extend.texi (attribute const): Fix a typo.
20445 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20446 issuing -Wsuggest-attribute for void functions.
20448 2018-01-03 Martin Sebor <msebor@redhat.com>
20450 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20451 offset_int::from instead of wide_int::to_shwi.
20452 (maybe_diag_overlap): Remove assertion.
20453 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20454 * gimple-ssa-sprintf.c (format_directive): Same.
20455 (parse_directive): Same.
20456 (sprintf_dom_walker::compute_format_length): Same.
20457 (try_substitute_return_value): Same.
20459 2018-01-03 Jeff Law <law@redhat.com>
20461 PR middle-end/83654
20462 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20463 non-constant residual for zero at runtime and avoid probing in
20464 that case. Reorganize code for trailing problem to mirror handling
20467 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20469 PR tree-optimization/83501
20470 * tree-ssa-strlen.c (get_string_cst): New.
20471 (handle_char_store): Call get_string_cst.
20473 2018-01-03 Martin Liska <mliska@suse.cz>
20475 PR tree-optimization/83593
20476 * tree-ssa-strlen.c: Include tree-cfg.h.
20477 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20478 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20479 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20481 (strlen_dom_walker::before_dom_children): Call
20482 gimple_purge_dead_eh_edges. Dump tranformation with details
20484 (strlen_dom_walker::before_dom_children): Update call by adding
20485 new argument cleanup_eh.
20486 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20488 2018-01-03 Martin Liska <mliska@suse.cz>
20491 * cif-code.def (VARIADIC_THUNK): New enum value.
20492 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20495 2018-01-03 Jan Beulich <jbeulich@suse.com>
20497 * sse.md (mov<mode>_internal): Tighten condition for when to use
20498 vmovdqu<ssescalarsize> for TI and OI modes.
20500 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20502 Update copyright years.
20504 2018-01-03 Martin Liska <mliska@suse.cz>
20507 * ipa-visibility.c (function_and_variable_visibility): Skip
20508 functions with noipa attribure.
20510 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20512 * gcc.c (process_command): Update copyright notice dates.
20513 * gcov-dump.c (print_version): Ditto.
20514 * gcov.c (print_version): Ditto.
20515 * gcov-tool.c (print_version): Ditto.
20516 * gengtype.c (create_file): Ditto.
20517 * doc/cpp.texi: Bump @copying's copyright year.
20518 * doc/cppinternals.texi: Ditto.
20519 * doc/gcc.texi: Ditto.
20520 * doc/gccint.texi: Ditto.
20521 * doc/gcov.texi: Ditto.
20522 * doc/install.texi: Ditto.
20523 * doc/invoke.texi: Ditto.
20525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20527 * vector-builder.h (vector_builder::m_full_nelts): Change from
20528 unsigned int to poly_uint64.
20529 (vector_builder::full_nelts): Update prototype accordingly.
20530 (vector_builder::new_vector): Likewise.
20531 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20532 (vector_builder::operator ==): Likewise.
20533 (vector_builder::finalize): Likewise.
20534 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20535 Take the number of elements as a poly_uint64 rather than an
20537 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20538 from unsigned int to poly_uint64.
20539 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20540 (vec_perm_indices::new_vector): Likewise.
20541 (vec_perm_indices::length): Likewise.
20542 (vec_perm_indices::nelts_per_input): Likewise.
20543 (vec_perm_indices::input_nelts): Likewise.
20544 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20545 number of elements per input as a poly_uint64 rather than an
20546 unsigned int. Use the original encoding for variable-length
20547 vectors, rather than clamping each individual element.
20548 For the second and subsequent elements in each pattern,
20549 clamp the step and base before clamping their sum.
20550 (vec_perm_indices::series_p): Handle polynomial element counts.
20551 (vec_perm_indices::all_in_range_p): Likewise.
20552 (vec_perm_indices_to_tree): Likewise.
20553 (vec_perm_indices_to_rtx): Likewise.
20554 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20555 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20556 (tree_vector_builder::new_binary_operation): Handle polynomial
20557 element counts. Return false if we need to know the number
20558 of elements at compile time.
20559 * fold-const.c (fold_vec_perm): Punt if the number of elements
20560 isn't known at compile time.
20562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20564 * vec-perm-indices.h (vec_perm_builder): Change element type
20565 from HOST_WIDE_INT to poly_int64.
20566 (vec_perm_indices::element_type): Update accordingly.
20567 (vec_perm_indices::clamp): Handle polynomial element_types.
20568 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20569 (vec_perm_indices::all_in_range_p): Likewise.
20570 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20572 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20573 polynomial vec_perm_indices element types.
20574 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20575 * fold-const.c (fold_vec_perm): Likewise.
20576 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20577 * tree-vect-generic.c (lower_vec_perm): Likewise.
20578 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20579 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20580 element type to HOST_WIDE_INT.
20582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20583 Alan Hayward <alan.hayward@arm.com>
20584 David Sherwood <david.sherwood@arm.com>
20586 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20587 rather than an int. Use plus_constant.
20588 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20589 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20592 Alan Hayward <alan.hayward@arm.com>
20593 David Sherwood <david.sherwood@arm.com>
20595 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20596 a HOST_WIDE_INT to a poly_int64.
20598 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20599 Alan Hayward <alan.hayward@arm.com>
20600 David Sherwood <david.sherwood@arm.com>
20602 * calls.c (load_register_parameters): Cope with polynomial
20603 mode sizes. Require a constant size for BLKmode parameters
20604 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20605 forces a parameter to be padded at the lsb end in order to
20606 fill a complete number of words, require the parameter size
20607 to be ordered wrt UNITS_PER_WORD.
20609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20610 Alan Hayward <alan.hayward@arm.com>
20611 David Sherwood <david.sherwood@arm.com>
20613 * reload1.c (spill_stack_slot_width): Change element type
20614 from unsigned int to poly_uint64_pod.
20615 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
20622 (reload_inner_reg_of_subreg, push_reload): Use it.
20624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20625 Alan Hayward <alan.hayward@arm.com>
20626 David Sherwood <david.sherwood@arm.com>
20628 * lra-constraints.c (process_alt_operands): Reject matched
20629 operands whose sizes aren't ordered.
20630 (match_reload): Refer to this check here.
20632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20633 Alan Hayward <alan.hayward@arm.com>
20634 David Sherwood <david.sherwood@arm.com>
20636 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20637 that the mode size is in the set {1, 2, 4, 8, 16}.
20639 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20640 Alan Hayward <alan.hayward@arm.com>
20641 David Sherwood <david.sherwood@arm.com>
20643 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20644 Use plus_constant instead of gen_rtx_PLUS.
20646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20647 Alan Hayward <alan.hayward@arm.com>
20648 David Sherwood <david.sherwood@arm.com>
20650 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20651 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20652 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20653 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20654 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20655 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20656 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20657 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20658 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20659 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20661 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20662 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20663 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20664 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20665 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20666 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20667 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20668 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20669 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20670 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20672 * expr.c (emit_move_resolve_push): Treat the input and result
20673 of PUSH_ROUNDING as a poly_int64.
20674 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20675 (emit_push_insn): Likewise.
20676 * lra-eliminations.c (mark_not_eliminable): Likewise.
20677 * recog.c (push_operand): Likewise.
20678 * reload1.c (elimination_effects): Likewise.
20679 * rtlanal.c (nonzero_bits1): Likewise.
20680 * calls.c (store_one_arg): Likewise. Require the padding to be
20681 known at compile time.
20683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20684 Alan Hayward <alan.hayward@arm.com>
20685 David Sherwood <david.sherwood@arm.com>
20687 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20688 Use plus_constant instead of gen_rtx_PLUS.
20690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20691 Alan Hayward <alan.hayward@arm.com>
20692 David Sherwood <david.sherwood@arm.com>
20694 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20695 rather than an int.
20697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20698 Alan Hayward <alan.hayward@arm.com>
20699 David Sherwood <david.sherwood@arm.com>
20701 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20702 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20703 via stack temporaries. Treat the mode size as polynomial too.
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 * expr.c (expand_expr_real_2): When handling conversions involving
20710 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20711 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20712 as a poly_uint64 too.
20714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20715 Alan Hayward <alan.hayward@arm.com>
20716 David Sherwood <david.sherwood@arm.com>
20718 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20721 Alan Hayward <alan.hayward@arm.com>
20722 David Sherwood <david.sherwood@arm.com>
20724 * combine.c (can_change_dest_mode): Handle polynomial
20725 REGMODE_NATURAL_SIZE.
20726 * expmed.c (store_bit_field_1): Likewise.
20727 * expr.c (store_constructor): Likewise.
20728 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20729 and polynomial REGMODE_NATURAL_SIZE.
20730 (gen_lowpart_common): Likewise.
20731 * reginfo.c (record_subregs_of_mode): Likewise.
20732 * rtlanal.c (read_modify_subreg_p): Likewise.
20734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20735 Alan Hayward <alan.hayward@arm.com>
20736 David Sherwood <david.sherwood@arm.com>
20738 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20739 numbers of elements.
20741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20742 Alan Hayward <alan.hayward@arm.com>
20743 David Sherwood <david.sherwood@arm.com>
20745 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20752 in a POINTER_PLUS_EXPR.
20754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20755 Alan Hayward <alan.hayward@arm.com>
20756 David Sherwood <david.sherwood@arm.com>
20758 * omp-simd-clone.c (simd_clone_subparts): New function.
20759 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20760 (ipa_simd_modify_function_body): Likewise.
20762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20763 Alan Hayward <alan.hayward@arm.com>
20764 David Sherwood <david.sherwood@arm.com>
20766 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20767 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20768 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20769 (expand_vector_condition, vector_element): Likewise.
20770 (subparts_gt): New function.
20771 (get_compute_type): Use subparts_gt.
20772 (count_type_subparts): Delete.
20773 (expand_vector_operations_1): Use subparts_gt instead of
20774 count_type_subparts.
20776 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20777 Alan Hayward <alan.hayward@arm.com>
20778 David Sherwood <david.sherwood@arm.com>
20780 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20781 (vect_compile_time_alias): ...this new function. Do the calculation
20782 on poly_ints rather than trees.
20783 (vect_prune_runtime_alias_test_list): Update call accordingly.
20785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20786 Alan Hayward <alan.hayward@arm.com>
20787 David Sherwood <david.sherwood@arm.com>
20789 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20791 (vect_schedule_slp_instance): Likewise.
20793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20794 Alan Hayward <alan.hayward@arm.com>
20795 David Sherwood <david.sherwood@arm.com>
20797 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20798 constant and extern definitions for variable-length vectors.
20799 (vect_get_constant_vectors): Note that the number of units
20800 is known to be constant.
20802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20803 Alan Hayward <alan.hayward@arm.com>
20804 David Sherwood <david.sherwood@arm.com>
20806 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20807 of units as polynomial. Choose between WIDE and NARROW based
20810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20811 Alan Hayward <alan.hayward@arm.com>
20812 David Sherwood <david.sherwood@arm.com>
20814 * tree-vect-stmts.c (simd_clone_subparts): New function.
20815 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20818 Alan Hayward <alan.hayward@arm.com>
20819 David Sherwood <david.sherwood@arm.com>
20821 * tree-vect-stmts.c (vectorizable_call): Treat the number of
20822 vectors as polynomial. Use build_index_vector for
20823 IFN_GOMP_SIMD_LANE.
20825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20826 Alan Hayward <alan.hayward@arm.com>
20827 David Sherwood <david.sherwood@arm.com>
20829 * tree-vect-stmts.c (get_load_store_type): Treat the number of
20830 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20831 for variable-length vectors.
20832 (vectorizable_mask_load_store): Treat the number of units as
20833 polynomial, asserting that it is constant if the condition has
20834 already been enforced.
20835 (vectorizable_store, vectorizable_load): Likewise.
20837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20838 Alan Hayward <alan.hayward@arm.com>
20839 David Sherwood <david.sherwood@arm.com>
20841 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20842 of units as polynomial. Punt if we can't tell at compile time
20843 which vector contains the final result.
20845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20846 Alan Hayward <alan.hayward@arm.com>
20847 David Sherwood <david.sherwood@arm.com>
20849 * tree-vect-loop.c (vectorizable_induction): Treat the number
20850 of units as polynomial. Punt on SLP inductions. Use an integer
20851 VEC_SERIES_EXPR for variable-length integer reductions. Use a
20852 cast of such a series for variable-length floating-point
20855 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20856 Alan Hayward <alan.hayward@arm.com>
20857 David Sherwood <david.sherwood@arm.com>
20859 * tree.h (build_index_vector): Declare.
20860 * tree.c (build_index_vector): New function.
20861 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20862 of units as polynomial, forcibly converting it to a constant if
20863 vectorizable_reduction has already enforced the condition.
20864 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
20865 to create a {1,2,3,...} vector.
20866 (vectorizable_reduction): Treat the number of units as polynomial.
20867 Choose vectype_in based on the largest scalar element size rather
20868 than the smallest number of units. Enforce the restrictions
20871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20872 Alan Hayward <alan.hayward@arm.com>
20873 David Sherwood <david.sherwood@arm.com>
20875 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20876 number of units as polynomial.
20878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20879 Alan Hayward <alan.hayward@arm.com>
20880 David Sherwood <david.sherwood@arm.com>
20882 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20883 * target.def (autovectorize_vector_sizes): Return the vector sizes
20884 by pointer, using vector_sizes rather than a bitmask.
20885 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20886 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20887 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20889 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20890 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20891 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20892 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20893 * omp-general.c (omp_max_vf): Likewise.
20894 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20895 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20896 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20897 * tree-vect-slp.c (vect_slp_bb): Likewise.
20898 * doc/tm.texi: Regenerate.
20899 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20901 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20902 the vector size as a poly_uint64 rather than an unsigned int.
20903 (current_vector_size): Change from an unsigned int to a poly_uint64.
20904 (get_vectype_for_scalar_type): Update accordingly.
20905 * tree.h (build_truth_vector_type): Take the size and number of
20906 units as a poly_uint64 rather than an unsigned int.
20907 (build_vector_type): Add a temporary overload that takes
20908 the number of units as a poly_uint64 rather than an unsigned int.
20909 * tree.c (make_vector_type): Likewise.
20910 (build_truth_vector_type): Take the number of units as a poly_uint64
20911 rather than an unsigned int.
20913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20914 Alan Hayward <alan.hayward@arm.com>
20915 David Sherwood <david.sherwood@arm.com>
20917 * target.def (get_mask_mode): Take the number of units and length
20918 as poly_uint64s rather than unsigned ints.
20919 * targhooks.h (default_get_mask_mode): Update accordingly.
20920 * targhooks.c (default_get_mask_mode): Likewise.
20921 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20922 * doc/tm.texi: Regenerate.
20924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20925 Alan Hayward <alan.hayward@arm.com>
20926 David Sherwood <david.sherwood@arm.com>
20928 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20929 * omp-general.c (omp_max_vf): Likewise.
20930 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20931 (expand_omp_simd): Handle polynomial safelen.
20932 * omp-low.c (omplow_simd_context): Add a default constructor.
20933 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20934 (lower_rec_simd_input_clauses): Update accordingly.
20935 (lower_rec_input_clauses): Likewise.
20937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20938 Alan Hayward <alan.hayward@arm.com>
20939 David Sherwood <david.sherwood@arm.com>
20941 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20942 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20943 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20944 (vect_analyze_slp_cost): Likewise.
20945 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20946 (vect_model_load_cost): Likewise.
20948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20949 Alan Hayward <alan.hayward@arm.com>
20950 David Sherwood <david.sherwood@arm.com>
20952 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20953 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20954 from an unsigned int * to a poly_uint64_pod *.
20955 (calculate_unrolling_factor): New function.
20956 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20958 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20959 Alan Hayward <alan.hayward@arm.com>
20960 David Sherwood <david.sherwood@arm.com>
20962 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20963 from an unsigned int to a poly_uint64.
20964 (_loop_vec_info::slp_unrolling_factor): Likewise.
20965 (_loop_vec_info::vectorization_factor): Change from an int
20967 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20968 (vect_get_num_vectors): New function.
20969 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20970 (vect_get_num_copies): Use vect_get_num_vectors.
20971 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20972 to an unsigned int *.
20973 (vect_analyze_data_refs): Change min_vf from an int * to a
20975 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20976 than an unsigned HOST_WIDE_INT.
20977 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20978 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20979 to an unsigned int *.
20980 (vect_analyze_data_ref_dependences): Likewise.
20981 (vect_compute_data_ref_alignment): Handle polynomial vf.
20982 (vect_enhance_data_refs_alignment): Likewise.
20983 (vect_prune_runtime_alias_test_list): Likewise.
20984 (vect_shift_permute_load_chain): Likewise.
20985 (vect_supportable_dr_alignment): Likewise.
20986 (dependence_distance_ge_vf): Take the vectorization factor as a
20987 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20988 (vect_analyze_data_refs): Change min_vf from an int * to a
20990 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20991 vfm1 as a poly_uint64 rather than an int. Make the same change
20992 for the returned bound_scalar.
20993 (vect_gen_vector_loop_niters): Handle polynomial vf.
20994 (vect_do_peeling): Likewise. Update call to
20995 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20996 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20998 * tree-vect-loop.c (vect_determine_vectorization_factor)
20999 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21000 (vect_get_known_peeling_cost): Likewise.
21001 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21002 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21003 (vect_transform_loop): Likewise. Use the lowest possible VF when
21004 updating the upper bounds of the loop.
21005 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21006 rather than an int.
21007 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21008 polynomial unroll factors.
21009 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21010 (vect_make_slp_decision): Likewise.
21011 (vect_supported_load_permutation_p): Likewise, and polynomial
21013 (vect_analyze_slp_cost): Handle polynomial vf.
21014 (vect_slp_analyze_node_operations): Likewise.
21015 (vect_slp_analyze_bb_1): Likewise.
21016 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21017 than an unsigned HOST_WIDE_INT.
21018 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21019 (vectorizable_load): Handle polynomial vf.
21020 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21022 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21025 Alan Hayward <alan.hayward@arm.com>
21026 David Sherwood <david.sherwood@arm.com>
21028 * match.pd: Handle bit operations involving three constants
21029 and try to fold one pair.
21031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21033 * tree-vect-loop-manip.c: Include gimple-fold.h.
21034 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21035 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21036 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21037 Add a path that uses a step of VF instead of 1, but disable it
21039 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21040 and niters_no_overflow parameters. Update calls to
21041 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21042 Create a new SSA name if the latter choses to use a ste other
21043 than zero, and return it via niters_vector_mult_vf_var.
21044 * tree-vect-loop.c (vect_transform_loop): Update calls to
21045 vect_do_peeling, vect_gen_vector_loop_niters and
21046 slpeel_make_loop_iterate_ntimes.
21047 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21048 (vect_gen_vector_loop_niters): Update declarations after above changes.
21050 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21052 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21053 128-bit round to integer instructions.
21054 (ceil<mode>2): Likewise.
21055 (btrunc<mode>2): Likewise.
21056 (round<mode>2): Likewise.
21058 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21060 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21061 unaligned VSX load/store on P8/P9.
21062 (expand_block_clear): Allow the use of unaligned VSX
21063 load/store on P8/P9.
21065 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21067 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21069 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21070 swap associated with both a load and a store.
21072 2018-01-02 Andrew Waterman <andrew@sifive.com>
21074 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21075 * config/riscv/riscv.md (clear_cache): Use it.
21077 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21079 * web.c: Remove out-of-date comment.
21081 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21083 * expr.c (fixup_args_size_notes): Check that any existing
21084 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21085 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21086 (emit_single_push_insn): ...here.
21088 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21090 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21091 (const_vector_encoded_nelts): New function.
21092 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21093 (const_vector_int_elt, const_vector_elt): Declare.
21094 * emit-rtl.c (const_vector_int_elt_1): New function.
21095 (const_vector_elt): Likewise.
21096 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21097 of CONST_VECTOR_ELT.
21099 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21101 * expr.c: Include rtx-vector-builder.h.
21102 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21103 directly on the tree encoding.
21104 (const_vector_from_tree): Likewise.
21105 * optabs.c: Include rtx-vector-builder.h.
21106 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21107 sequence of "u" values.
21108 * vec-perm-indices.c: Include rtx-vector-builder.h.
21109 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21110 directly on the vec_perm_indices encoding.
21112 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21114 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21115 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21116 * rtx-vector-builder.h: New file.
21117 * rtx-vector-builder.c: Likewise.
21118 * rtl.h (rtx_def::u2): Add a const_vector field.
21119 (CONST_VECTOR_NPATTERNS): New macro.
21120 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21121 (CONST_VECTOR_DUPLICATE_P): Likewise.
21122 (CONST_VECTOR_STEPPED_P): Likewise.
21123 (CONST_VECTOR_ENCODED_ELT): Likewise.
21124 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21125 (unwrap_const_vec_duplicate): Likewise.
21126 (const_vec_series_p): Check for a non-duplicated vector encoding.
21127 Say that the function only returns true for integer vectors.
21128 * emit-rtl.c: Include rtx-vector-builder.h.
21129 (gen_const_vec_duplicate_1): Delete.
21130 (gen_const_vector): Call gen_const_vec_duplicate instead of
21131 gen_const_vec_duplicate_1.
21132 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21133 (gen_const_vec_duplicate): Use rtx_vector_builder.
21134 (gen_const_vec_series): Likewise.
21135 (gen_rtx_CONST_VECTOR): Likewise.
21136 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21137 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21138 Build a new vector rather than modifying a CONST_VECTOR in-place.
21139 (handle_special_swappables): Update call accordingly.
21140 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21141 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21142 Build a new vector rather than modifying a CONST_VECTOR in-place.
21143 (handle_special_swappables): Update call accordingly.
21145 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21147 * simplify-rtx.c (simplify_const_binary_operation): Use
21148 CONST_VECTOR_ELT instead of XVECEXP.
21150 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21152 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21153 the selector elements to be different from the data elements
21154 if the selector is a VECTOR_CST.
21155 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21156 ssizetype for the selector.
21158 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21160 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21161 before testing each element individually.
21162 * tree-vect-generic.c (lower_vec_perm): Likewise.
21164 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21166 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21167 * selftest-run-tests.c (selftest::run_tests): Call it.
21168 * vector-builder.h (vector_builder::operator ==): New function.
21169 (vector_builder::operator !=): Likewise.
21170 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21171 (vec_perm_indices::all_from_input_p): New function.
21172 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21173 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21174 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21175 instead of reading the VECTOR_CST directly. Detect whether both
21176 vector inputs are the same before constructing the vec_perm_indices,
21177 and update the number of inputs argument accordingly. Use the
21178 utility functions added above. Only construct sel2 if we need to.
21180 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21182 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21183 the broadcast of the low byte.
21184 (expand_mult_highpart): Use an explicit encoding for the permutes.
21185 * optabs-query.c (can_mult_highpart_p): Likewise.
21186 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21187 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21188 (vectorizable_bswap): Likewise.
21189 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21190 explicit encoding for the power-of-2 permutes.
21191 (vect_permute_store_chain): Likewise.
21192 (vect_grouped_load_supported): Likewise.
21193 (vect_permute_load_chain): Likewise.
21195 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21197 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21198 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21199 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21200 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21201 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21202 (vect_gen_perm_mask_any): Likewise.
21204 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21206 * int-vector-builder.h: New file.
21207 * vec-perm-indices.h: Include int-vector-builder.h.
21208 (vec_perm_indices): Redefine as an int_vector_builder.
21209 (auto_vec_perm_indices): Delete.
21210 (vec_perm_builder): Redefine as a stand-alone class.
21211 (vec_perm_indices::vec_perm_indices): New function.
21212 (vec_perm_indices::clamp): Likewise.
21213 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21214 (vec_perm_indices::new_vector): New function.
21215 (vec_perm_indices::new_expanded_vector): Update for new
21216 vec_perm_indices class.
21217 (vec_perm_indices::rotate_inputs): New function.
21218 (vec_perm_indices::all_in_range_p): Operate directly on the
21219 encoded form, without computing elided elements.
21220 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21221 encoding. Update for new vec_perm_indices class.
21222 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21223 the given vec_perm_builder.
21224 (expand_vec_perm_var): Update vec_perm_builder constructor.
21225 (expand_mult_highpart): Use vec_perm_builder instead of
21226 auto_vec_perm_indices.
21227 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21228 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21229 or double series encoding as appropriate.
21230 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21231 vec_perm_indices instead of auto_vec_perm_indices.
21232 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21233 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21234 (vect_permute_store_chain): Likewise.
21235 (vect_grouped_load_supported): Likewise.
21236 (vect_permute_load_chain): Likewise.
21237 (vect_shift_permute_load_chain): Likewise.
21238 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21239 (vect_transform_slp_perm_load): Likewise.
21240 (vect_schedule_slp_instance): Likewise.
21241 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21242 (vectorizable_mask_load_store): Likewise.
21243 (vectorizable_bswap): Likewise.
21244 (vectorizable_store): Likewise.
21245 (vectorizable_load): Likewise.
21246 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21247 vec_perm_indices instead of auto_vec_perm_indices. Use
21248 tree_to_vec_perm_builder to read the vector from a tree.
21249 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21250 vec_perm_builder instead of a vec_perm_indices.
21251 (have_whole_vector_shift): Use vec_perm_builder and
21252 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21253 truncation to calc_vec_perm_mask_for_shift.
21254 (vect_create_epilog_for_reduction): Likewise.
21255 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21256 from auto_vec_perm_indices to vec_perm_indices.
21257 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21258 instead of changing individual elements.
21259 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21260 the vector in d.perm.
21261 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21262 from auto_vec_perm_indices to vec_perm_indices.
21263 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21264 instead of changing individual elements.
21265 (arm_vectorize_vec_perm_const): Use new_vector to install
21266 the vector in d.perm.
21267 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21268 Update vec_perm_builder constructor.
21269 (rs6000_expand_interleave): Likewise.
21270 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21271 (rs6000_expand_interleave): Likewise.
21273 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21275 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21276 to qimode could truncate the indices.
21277 * optabs.c (expand_vec_perm_var): Likewise.
21279 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21281 * Makefile.in (OBJS): Add vec-perm-indices.o.
21282 * vec-perm-indices.h: New file.
21283 * vec-perm-indices.c: Likewise.
21284 * target.h (vec_perm_indices): Replace with a forward class
21286 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21287 * optabs.h: Include vec-perm-indices.h.
21288 (expand_vec_perm): Delete.
21289 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21290 (expand_vec_perm_const): Declare.
21291 * target.def (vec_perm_const_ok): Replace with...
21292 (vec_perm_const): ...this new hook.
21293 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21294 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21295 * doc/tm.texi: Regenerate.
21296 * optabs.def (vec_perm_const): Delete.
21297 * doc/md.texi (vec_perm_const): Likewise.
21298 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21299 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21300 expand_vec_perm for constant permutation vectors. Assert that
21301 the mode of variable permutation vectors is the integer equivalent
21302 of the mode that is being permuted.
21303 * optabs-query.h (selector_fits_mode_p): Declare.
21304 * optabs-query.c: Include vec-perm-indices.h.
21305 (selector_fits_mode_p): New function.
21306 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21307 is defined, instead of checking whether the vec_perm_const_optab
21308 exists. Use targetm.vectorize.vec_perm_const instead of
21309 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21310 fit in the vector mode before using a variable permute.
21311 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21312 vec_perm_indices instead of an rtx.
21313 (expand_vec_perm): Replace with...
21314 (expand_vec_perm_const): ...this new function. Take the selector
21315 as a vec_perm_indices rather than an rtx. Also take the mode of
21316 the selector. Update call to shift_amt_for_vec_perm_mask.
21317 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21318 Use vec_perm_indices::new_expanded_vector to expand the original
21319 selector into bytes. Check whether the indices fit in the vector
21320 mode before using a variable permute.
21321 (expand_vec_perm_var): Make global.
21322 (expand_mult_highpart): Use expand_vec_perm_const.
21323 * fold-const.c: Includes vec-perm-indices.h.
21324 * tree-ssa-forwprop.c: Likewise.
21325 * tree-vect-data-refs.c: Likewise.
21326 * tree-vect-generic.c: Likewise.
21327 * tree-vect-loop.c: Likewise.
21328 * tree-vect-slp.c: Likewise.
21329 * tree-vect-stmts.c: Likewise.
21330 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21332 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21333 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21334 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21335 (aarch64_vectorize_vec_perm_const): ...this new function.
21336 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21337 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21338 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21339 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21340 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21341 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21342 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21344 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21345 check for NEON modes.
21346 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21347 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21348 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21349 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21351 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21352 the old VEC_PERM_CONST conditions.
21353 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21354 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21355 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21356 (ia64_vectorize_vec_perm_const_ok): Merge into...
21357 (ia64_vectorize_vec_perm_const): ...this new function.
21358 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21359 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21360 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21361 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21362 * config/mips/mips.c (mips_expand_vec_perm_const)
21363 (mips_vectorize_vec_perm_const_ok): Merge into...
21364 (mips_vectorize_vec_perm_const): ...this new function.
21365 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21366 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21367 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21368 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21369 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21370 (rs6000_expand_vec_perm_const): Delete.
21371 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21373 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21374 (altivec_expand_vec_perm_const_le): Take each operand individually.
21375 Operate on constant selectors rather than rtxes.
21376 (altivec_expand_vec_perm_const): Likewise. Update call to
21377 altivec_expand_vec_perm_const_le.
21378 (rs6000_expand_vec_perm_const): Delete.
21379 (rs6000_vectorize_vec_perm_const_ok): Delete.
21380 (rs6000_vectorize_vec_perm_const): New function.
21381 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21382 an element count and rtx array.
21383 (rs6000_expand_extract_even): Update call accordingly.
21384 (rs6000_expand_interleave): Likewise.
21385 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21386 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21387 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21388 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21389 (rs6000_expand_vec_perm_const): Delete.
21390 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21391 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21392 (altivec_expand_vec_perm_const_le): Take each operand individually.
21393 Operate on constant selectors rather than rtxes.
21394 (altivec_expand_vec_perm_const): Likewise. Update call to
21395 altivec_expand_vec_perm_const_le.
21396 (rs6000_expand_vec_perm_const): Delete.
21397 (rs6000_vectorize_vec_perm_const_ok): Delete.
21398 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21399 reference to the SPE evmerge intructions.
21400 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21401 an element count and rtx array.
21402 (rs6000_expand_extract_even): Update call accordingly.
21403 (rs6000_expand_interleave): Likewise.
21404 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21405 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21407 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21409 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21411 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21412 vector mode and that that mode matches the mode of the data
21414 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21415 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21416 directly using expand_vec_perm_1 when forcing selectors into
21418 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21420 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21422 * optabs-query.h (can_vec_perm_p): Delete.
21423 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21424 * optabs-query.c (can_vec_perm_p): Split into...
21425 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21426 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21427 particular selector is valid.
21428 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21429 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21430 (vect_grouped_load_supported): Likewise.
21431 (vect_shift_permute_load_chain): Likewise.
21432 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21433 (vect_transform_slp_perm_load): Likewise.
21434 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21435 (vectorizable_bswap): Likewise.
21436 (vect_gen_perm_mask_checked): Likewise.
21437 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21438 implementations of variable permutation vectors into account
21439 when deciding which selector to use.
21440 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21441 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21442 with a false third argument.
21443 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21444 to test whether the constant selector is valid and can_vec_perm_var_p
21445 to test whether a variable selector is valid.
21447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21449 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21450 * optabs-query.c (can_vec_perm_p): Likewise.
21451 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21452 instead of vec_perm_indices.
21453 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21454 (vect_gen_perm_mask_checked): Likewise,
21455 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21456 (vect_gen_perm_mask_checked): Likewise,
21458 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21460 * optabs-query.h (qimode_for_vec_perm): Declare.
21461 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21462 (qimode_for_vec_perm): ...this new function.
21463 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21465 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21467 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21468 does not have a conditional at the top.
21470 2018-01-02 Richard Biener <rguenther@suse.de>
21472 * ipa-inline.c (big_speedup_p): Fix expression.
21474 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21477 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21480 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21484 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21485 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21486 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21487 cond_taken_branch_cost 3->4.
21489 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21491 PR tree-optimization/83581
21492 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21493 TODO_cleanup_cfg if any changes have been made.
21495 PR middle-end/83608
21496 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21497 convert_modes if target mode has the right side, but different mode
21500 PR middle-end/83609
21501 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21502 last argument when extracting from CONCAT. If either from_real or
21503 from_imag is NULL, use expansion through memory. If result is not
21504 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21505 the parts directly to inner mode, if even that fails, use expansion
21508 PR middle-end/83623
21509 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21510 check for bswap in mode rather than HImode and use that in expand_unop
21513 Copyright (C) 2018 Free Software Foundation, Inc.
21515 Copying and distribution of this file, with or without modification,
21516 are permitted in any medium without royalty provided the copyright
21517 notice and this notice are preserved.