1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4 original stmt as a stmt_vec_info rather than a gimple stmt.
5 (vect_pattern_recog_1): Take the statement directly as a
6 stmt_vec_info, rather than via a gimple_stmt_iterator.
7 Update call to vect_mark_pattern_stmts.
8 (vect_pattern_recog): Update calls accordingly.
10 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
14 a vect_def_type for the first argument.
15 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
16 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
17 operand if it isn't defined by a vectorized statement.
18 (vect_build_gather_load_calls): Remove the mask_dt argument and
19 update calls to vect_get_vec_def_for_stmt_copy.
20 (vectorizable_bswap): Likewise the dt argument.
21 (vectorizable_call): Update calls to vectorizable_bswap and
22 vect_get_vec_def_for_stmt_copy.
23 (vectorizable_simd_clone_call, vectorizable_assignment)
24 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
25 (vectorizable_comparison): Update calls to
26 vect_get_vec_def_for_stmt_copy.
27 (vectorizable_store): Likewise. Remove now-unnecessary calls to
29 (vect_get_loop_based_defs): Remove dt argument and update call
30 to vect_get_vec_def_for_stmt_copy.
31 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
32 and vect_get_vec_def_for_stmt_copy.
33 (vectorizable_load): Update calls to vect_build_gather_load_calls
34 and vect_get_vec_def_for_stmt_copy.
35 * tree-vect-loop.c (vect_create_epilog_for_reduction)
36 (vectorizable_reduction, vectorizable_live_operation): Update calls
37 to vect_get_vec_def_for_stmt_copy.
39 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
41 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
42 and gimple stmt arguments with a stmt_vec_info.
43 (vect_record_base_alignments): Update calls accordingly.
44 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
45 and gimple stmt arguments with a stmt_vec_info.
46 (vect_build_slp_tree_1): Remove vinfo argument and update call
47 to vect_record_max_nunits.
48 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
49 and vect_record_max_nunits.
51 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
53 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
54 file and take a stmt_vec_info instead of a gimple stmt.
55 (supportable_widening_operation, vect_finish_replace_stmt)
56 (vect_finish_stmt_generation, vect_get_store_rhs)
57 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
58 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
59 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
60 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
61 (vect_create_data_ref_ptr, bump_vector_ptr)
62 (vect_permute_store_chain, vect_setup_realignment)
63 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
64 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
65 (vectorizable_reduction, vectorizable_induction)
66 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
67 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
68 than gimple stmts as arguments.
69 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
70 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
71 (can_group_stmts_p, vect_check_gather_scatter)
72 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
73 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
74 (vect_permute_load_chain, vect_shift_permute_load_chain)
75 (vect_transform_grouped_load)
76 (vect_record_grouped_load_vectors): Likewise.
77 * tree-vect-loop.c (vect_fixup_reduc_chain)
78 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
79 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
80 (vectorizable_reduction, vectorizable_induction)
81 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
82 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
83 (vect_get_load_store_mask): Likewise.
84 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
85 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
86 * tree-vect-stmts.c (vect_mark_relevant)
87 (is_simple_and_all_uses_invariant)
88 (exist_non_indexing_operands_for_use_p, process_use)
89 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
90 (vect_get_vec_def_for_operand, vect_get_vec_defs)
91 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
92 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
93 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
94 (get_negative_load_store_type, get_load_store_type)
95 (vect_check_load_store_mask, vect_check_store_rhs)
96 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
97 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
98 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
99 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
100 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
101 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
102 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
103 (supportable_widening_operation): Likewise.
105 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
107 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
108 a stmt_vec_info instead of a gcall.
109 (vect_check_gather_scatter): Update call accordingly.
110 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
112 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
113 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
114 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
115 instead of a gimple stmt.
116 (vect_transform_loop): Update calls accordingly.
117 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
118 stmt_vec_infos instead of gimple stmts.
119 (vect_analyze_slp_instance): Update use accordingly.
120 * tree-vect-stmts.c (read_vector_array, write_vector_array)
121 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
122 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
123 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
124 (vect_gen_widened_results_half, vect_get_loop_based_defs)
125 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
126 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
129 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
131 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
132 of the worklist from a vector of gimple stmts to a vector of
134 * tree-vect-stmts.c (vect_mark_relevant, process_use)
135 (vect_mark_stmts_to_be_vectorized): Likewise
137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
139 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
140 statement before passing it to vect_analyze_stmt.
141 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
142 the chain of phi vector definitions. Track the exit phi via its
144 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
145 STMT_VINFO_REDUC_DEF.
146 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
147 stmt_vec_infos to handle the statement chains.
148 (vect_get_slp_defs): Record the first statement in the node
149 using a stmt_vec_info.
150 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
151 statements here and pass their stmt_vec_info down to subroutines.
152 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
153 down to vect_finish_stmt_generation.
154 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
155 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
156 stmt_vec_infos to subroutines.
157 (vect_remove_stores): Use stmt_vec_infos to handle the statement
160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
162 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
163 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
164 (vect_permute_store_chain, vect_setup_realignment)
165 (vect_permute_load_chain, vect_shift_permute_load_chain)
166 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
167 stmts internally, and when passing values to other vectorizer routines.
168 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
169 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
170 (vect_analyze_loop_operations, get_initial_def_for_reduction)
171 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
172 (vectorizable_reduction, vectorizable_induction)
173 (vectorizable_live_operation, vect_transform_loop_stmt)
174 (vect_transform_loop): Likewise.
175 * tree-vect-patterns.c (vect_reassociating_reduction_p)
176 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
177 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
178 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
179 (vect_slp_analyze_node_operations_1): Likewise.
180 * tree-vect-stmts.c (vect_mark_relevant, process_use)
181 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
182 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
183 (vect_finish_stmt_generation_1, get_group_load_store_type)
184 (get_load_store_type, vect_build_gather_load_calls)
185 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
186 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
187 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
188 (vectorizable_store, vectorizable_load, vectorizable_condition)
189 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
190 (supportable_widening_operation): Likewise.
191 (vect_get_vector_types_for_stmt): Likewise.
192 * tree-vectorizer.h (vect_dr_behavior): Likewise.
194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
196 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
197 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
198 (vect_permute_store_chain, vect_permute_load_chain)
199 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
200 repeated stmt_vec_info lookups.
201 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
202 (vect_update_ivs_after_vectorizer): Likewise.
203 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
204 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
205 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
206 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
207 (vect_bb_slp_scalar_cost): Likewise.
208 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
210 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
212 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
213 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
214 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
215 to get gassigns and gcalls, rather than operating on generc gimple
217 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
218 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
219 (vectorizable_load, vect_analyze_stmt): Likewise.
220 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
222 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
224 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
225 return stmt_vec_infos rather than gimple stmts. Do not accept
227 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
229 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
230 Update use of get_later_stmt.
231 (vect_get_constant_vectors): Update call accordingly.
232 (vect_schedule_slp_instance): Likewise
233 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
234 (vect_slp_analyze_instance_dependence): Likewise.
235 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
237 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
239 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
240 (stmt_info_for_cost::stmt_info): ...this new field.
241 (add_stmt_costs): Update accordingly.
242 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
243 (vect_get_known_peeling_cost): Likewise.
244 (vect_estimate_min_profitable_iters): Likewise.
245 * tree-vect-stmts.c (record_stmt_cost): Likewise.
247 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
249 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
250 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
251 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
253 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
255 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
257 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
258 a gimple stmt to a stmt_vec_info.
259 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
261 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
263 * tree-vectorizer.h (vec_info::grouped_stores): Change from
264 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
265 (_loop_vec_info::reduction_chains): Likewise.
266 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
268 * tree-vect-slp.c (vect_analyze_slp): Likewise.
270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
272 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
273 a gimple stmt to a stmt_vec_info.
274 (_stmt_vec_info::next_element): Likewise.
275 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
276 (vect_slp_analyze_and_verify_node_alignment)
277 (vect_analyze_group_access_1, vect_analyze_group_access)
278 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
279 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
280 (vect_supportable_dr_alignment): Update accordingly.
281 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
282 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
283 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
284 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
285 * tree-vect-slp.c (vect_build_slp_tree_1)
286 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
287 (vect_split_slp_store_group, vect_analyze_slp_instance)
288 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
289 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
290 (get_group_load_store_type, get_load_store_type)
291 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
292 (vect_transform_stmt, vect_remove_stores): Likewise.
294 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
296 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
298 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
299 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
300 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
301 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
302 (vector_alignment_reachable_p, vect_get_data_access_cost)
303 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
304 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
305 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
306 (vect_analyze_group_access_1, vect_analyze_group_access)
307 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
308 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
309 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
310 result of vect_dr_stmt and use the stmt_vec_info instead of
311 the associated gimple stmt.
312 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
313 (vect_gen_prolog_loop_niters): Likewise.
314 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
318 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
319 to a vec<stmt_vec_info>.
320 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
321 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
323 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
324 to a vec<stmt_vec_info>.
325 (bst_traits::value_type, bst_traits::value_type): Likewise.
326 (bst_traits::hash): Update accordingly.
327 (vect_get_and_check_slp_defs): Change the stmts parameter from
328 a vec<gimple *> to a vec<stmt_vec_info>.
329 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
330 (vect_build_slp_tree): Likewise.
331 (vect_build_slp_tree_2): Likewise. Update uses of
332 SLP_TREE_SCALAR_STMTS.
333 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
334 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
335 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
336 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
337 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
338 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
339 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
340 (vect_get_constant_vectors, vect_get_slp_defs)
341 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
342 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
343 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
344 instead of gimple stmts.
345 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
346 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
347 (vect_slp_analyze_instance_dependence): Update uses of
348 SLP_TREE_SCALAR_STMTS.
349 (vect_slp_analyze_and_verify_node_alignment): Likewise.
350 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
351 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
352 (get_initial_defs_for_reduction): Likewise.
353 (vect_create_epilog_for_reduction): Likewise.
354 (vectorize_fold_left_reduction): Likewise.
355 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
356 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
357 (can_vectorize_live_stmts): Likewise.
359 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
361 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
362 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
363 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
365 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
367 (gather_scalar_reductions): Update after above interface changes.
368 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
369 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
371 (vect_force_simple_reduction): Likewise.
372 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
373 LOOP_VINFO_REDUCTIONS.
374 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
378 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
379 a gimple stmt to a stmt_vec_info.
380 * tree-vect-loop.c (vect_active_double_reduction_p)
381 (vect_force_simple_reduction, vectorizable_reduction): Update
384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
386 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
387 vec<gimple *> to a vec<stmt_vec_info>.
388 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
389 the reduction_phis argument from a vec<gimple *> to a
391 (vectorizable_reduction): Likewise the phis local variable that
392 is passed to vect_create_epilog_for_reduction. Update for new type
393 of SLP_TREE_VEC_STMTS.
394 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
395 (vectorizable_live_operation): Likewise.
396 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
397 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
399 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
401 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
402 a gimple stmt to a stmt_vec_info.
403 (vectorizable_condition, vectorizable_live_operation)
404 (vectorizable_reduction, vectorizable_induction): Pass back the
405 vectorized statement as a stmt_vec_info.
406 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
407 use of STMT_VINFO_VEC_STMT.
408 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
409 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
410 as stmt_vec_infos rather than gimple stmts.
411 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
413 (vectorizable_live_operation): Likewise.
414 (vectorizable_reduction, vectorizable_induction): Likewise,
415 updating use of STMT_VINFO_VEC_STMT.
416 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
417 of STMT_VINFO_VEC_STMT.
418 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
419 (vectorizable_simd_clone_call, vectorizable_conversion)
420 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
421 (vectorizable_store, vectorizable_load, vectorizable_condition)
422 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
423 from a gimple stmt to a stmt_vec_info.
424 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
425 pointer to a stmt_vec_info to the vectorizable_* routines.
427 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
429 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
430 a gimple stmt to a stmt_vec_info.
431 (is_pattern_stmt_p): Update accordingly.
432 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
433 (vect_record_grouped_load_vectors): Likewise.
434 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
435 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
436 (vect_model_reduction_cost): Likewise.
437 (vect_create_epilog_for_reduction): Likewise.
438 (vectorizable_reduction, vectorizable_induction): Likewise.
439 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
440 Return the stmt_vec_info for the pattern statement.
441 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
442 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
443 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
444 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
445 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
446 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
447 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
448 (free_stmt_vec_info, vect_is_simple_use): Likewise.
450 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
452 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
453 (vect_finish_stmt_generation): Likewise.
454 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
455 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
456 (vect_build_gather_load_calls): Use the return value of the above
457 functions instead of a separate call to vinfo_for_stmt. Use narrow
458 scopes for the input gimple stmt and wider scopes for the associated
459 stmt_vec_info. Use vec_info::lookup_def when setting these
460 stmt_vec_infos from an SSA_NAME definition.
461 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
462 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
463 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
464 (vectorizable_store, vectorizable_load, vectorizable_condition)
465 (vectorizable_comparison): Likewise.
466 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
467 (vectorizable_reduction): Likewise.
469 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
471 * tree-vectorizer.h (vect_is_simple_use): Add an optional
472 stmt_vec_info * parameter before the optional gimple **.
473 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
474 (process_use, vect_get_vec_def_for_operand_1): Update callers.
475 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
476 * tree-vect-loop.c (vectorizable_reduction): Likewise.
477 (vectorizable_live_operation): Likewise.
478 * tree-vect-patterns.c (type_conversion_p): Likewise.
479 (vect_look_through_possible_promotion): Likewise.
480 (vect_recog_rotate_pattern): Likewise.
481 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
483 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
485 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
486 a typedef to a wrapper class.
487 (NULL_STMT_VEC_INFO): New macro.
488 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
489 (stmt_vec_info::operator*): New function.
490 (stmt_vec_info::operator gimple *): Likewise.
491 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
492 (add_stmt_costs): Likewise.
493 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
494 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
495 (vect_get_known_peeling_cost): Likewise.
496 (vect_estimate_min_profitable_iters): Likewise.
497 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
498 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
499 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
500 (vectorizable_store, free_stmt_vec_infos): Likewise.
501 (new_stmt_vec_info): Change return type of xcalloc to
504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
506 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
507 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
508 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
509 a single_imm_use-based sequence.
510 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
514 * tree-vectorizer.h (vec_info::lookup_def): Declare.
515 * tree-vectorizer.c (vec_info::lookup_def): New function.
516 * tree-vect-patterns.c (vect_get_internal_def): Use it.
517 (vect_widened_op_tree): Likewise.
518 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
519 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
520 (vectorizable_reduction): Likewise.
521 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
523 (vect_is_slp_reduction): Update calls accordingly. Use
524 vec_info::lookup_def.
525 (vect_is_simple_reduction): Likewise
526 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
528 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
530 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
531 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
532 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
534 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
535 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
536 (vect_update_vf_for_slp, vect_analyze_loop_operations)
537 (vect_is_slp_reduction, vectorizable_induction)
538 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
539 * tree-vect-patterns.c (vect_init_pattern_stmt):
540 (vect_determine_min_output_precision_1, vect_determine_precisions)
541 (vect_pattern_recog): Likewise.
542 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
543 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
544 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
545 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
546 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
547 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
548 info field from a loop to a loop_vec_info.
550 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
552 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
553 (vec_info::add_stmt): Declare.
554 * tree-vectorizer.c (vec_info::add_stmt): New function.
555 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
556 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
557 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
558 (vectorizable_induction): Likewise.
559 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
560 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
561 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
562 (vectorizable_load): Likewise.
563 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
564 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
565 (vect_recog_gather_scatter_pattern): Likewise.
566 (append_pattern_def_seq): Likewise. Remove a check that is
567 performed by add_stmt itself.
569 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
571 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
572 which make_ssa_name was called with new_stmt before new_stmt
575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
577 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
579 (vect_is_slp_reduction): ...here...
580 (vect_is_simple_reduction): ...and here. Remove repetition of tests
581 that are already known to be false.
583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
585 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
586 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
587 STMT_VINFO_NUM_SLP_USES when it's true.
588 (vect_free_slp_instance): Add a final_p parameter and pass it to
590 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
591 (vect_analyze_slp_instance): Likewise.
592 (vect_slp_analyze_operations): Likewise.
593 (vect_slp_analyze_bb_1): Likewise.
594 * tree-vectorizer.c (vec_info): Likewise.
595 * tree-vect-loop.c (vect_transform_loop): Likewise.
597 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
599 * tree-vect-loop.c (vectorizable_reduction): Assert that the
600 function is not called for second and subsequent members of
603 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
605 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
606 cases for nested loops from here to ...
607 (vect_create_epilog_for_reduction): ...here. Only call
608 vect_is_simple_use for inner-loop reductions.
610 2018-07-31 Martin Liska <mliska@suse.cz>
612 PR gcov-profile/85338
613 PR gcov-profile/85350
614 PR gcov-profile/85372
615 * profile.c (struct location_triplet): New.
616 (struct location_triplet_hash): Likewise.
617 (output_location): Do not output a BB that
618 is already recorded for a line.
619 (branch_prob): Use streamed_locations.
621 2018-07-31 Martin Liska <mliska@suse.cz>
623 PR gcov-profile/85370
624 * coverage.c (coverage_begin_function): Do not mark target
625 clones as artificial functions.
627 2018-07-31 Martin Liska <mliska@suse.cz>
629 PR gcov-profile/83813
630 PR gcov-profile/84758
631 PR gcov-profile/85217
632 PR gcov-profile/85332
633 * profile.c (branch_prob): Do not record GOTO expressions
634 for GIMPLE statements which locations are already streamed.
636 2018-07-31 Olivier Hainque <hainque@adacore.com>
638 * gcc.c (handle_spec_function): Accept a soft_matched_part
639 argument, as do_spec_1. Pass it down to ...
640 (eval_spec_function): Accept a soft_matched_part argument,
641 and pass it down to ...
642 (do_spec_2): Accept a soft_matched_part argument, and pass
643 it down to do_spec_1.
644 (do_spec_1): Pass soft_matched_part to handle_spec_function.
645 (handle_braces): Update call to handle_spec_function.
646 (driver::set_up_specs): Update calls to do_spec_2.
647 (compare_debug_dump_opt_spec_function): Likewise.
648 (compare_debug_self_opt_spec_function): Likewise.
650 2018-07-31 Olivier Hainque <hainque@adacore.com>
652 * common.opt (nolibc): New option.
653 * doc/invoke.texi (Link Options): Document it.
654 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
655 * config/alpha/linux.h: Likewise.
656 * config/arc/elf.h: Likewise.
657 * config/arm/uclinux-elf.h: Likewise.
658 * config/arm/unknown-elf.h: Likewise.
659 * config/avr/avrlibc.h: Likewise.
660 * config/bfin/bfin.h: Likewise.
661 * config/bfin/linux.h: Likewise.
662 * config/bfin/uclinux.h: Likewise.
663 * config/darwin.h: Likewise.
664 * config/darwin10.h: Likewise.
665 * config/darwin12.h: Likewise.
666 * config/gnu-user.h: Likewise.
667 * config/lm32/uclinux-elf.h: Likewise.
668 * config/pa/pa-hpux11.h: Likewise.
669 * config/pa/pa64-hpux.h: Likewise.
670 * config/sparc/sparc.h: Likewise.
672 2018-07-31 Olivier Hainque <hainque@adacore.com>
674 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
677 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
680 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
683 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
685 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
686 terminated string literal.
688 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
690 PR rtl-optimization/85160
691 * combine.c (is_just_move): New function.
692 (try_combine): Allow combining two instructions into two if neither of
693 the original instructions was a move.
695 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
698 * doc/extend.texi (Global Register Variables): Discourage use of type
700 (Local Register Variables): Likewise.
702 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
704 PR tree-optimization/86506
705 * hwint.h (ceil_log2): Resync with hwint.c implementation.
707 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
710 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
711 hard_regno, make sure no insn between `from` and `to` clobbers it.
713 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
714 Tom de Vries <tdevries@suse.de>
716 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
717 (PTX_DEFAULT_RUNTIME_DIM): ... this.
718 (nvptx_goacc_validate_dims): Set default worker and gang dims to
719 PTX_DEFAULT_RUNTIME_DIM.
720 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
722 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
724 * config/pa/pa.c (pa_output_addr_vec): Align address table.
725 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
726 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
728 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
730 * config/rs6000/constraints.md (wG constraint): Delete, no longer
732 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
733 predicate to reflect toc fusion has been deleted.
734 (toc_fusion_mem_raw): Delete, no longer used.
735 (toc_fusion_mem_wrapped): Likewise.
736 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
738 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
739 Delete, no longer used.
740 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
741 meant to be used for toc fusion.
742 (rs6000_debug_print_mode): Delete toc fusion debugging.
743 (rs6000_debug_reg_global): Likewise.
744 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
745 fusion and secondary reload support that were never used.
746 (rs6000_option_override_internal): Delete TOC fusion, that was only
747 partially defined, and it did not work unless you also used the
749 (rs6000_legitimate_address_p): Delete TOC fusion support.
750 (rs6000_opt_masks): Likewise.
751 (fusion_wrap_memory_address): Delete function, no longer used.
752 (fusion_split_address); Delete TOC fusion support.
753 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
754 longer used with toc fusion being deleted.
755 (TARGET_TOC_FUSION_FP): Likewise.
756 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
758 (toc fusion spliter): Delete TOC fusion support.
759 (toc_fusionload_<mode>): Likewise.
760 (toc_fusionload_di): Likewise.
761 (fusion_gpr_load_<mode>): Delete generator function, this insn no
762 longer needs to be named. Rename predicate to delete TOC fusion.
763 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
764 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
765 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
766 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
767 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
769 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
771 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
772 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
773 __int128 in built-in function prototypes.
774 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
775 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
777 2018-07-27 Martin Sebor <msebor@redhat.com>
779 PR tree-optimization/86696
780 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
781 types, including enums.
782 (handle_char_store): Be prepared for the above function to fail.
784 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
786 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
787 when optimization level is lower than 2 or optimize for size.
789 2018-07-26 Martin Sebor <msebor@redhat.com>
791 PR tree-optimization/86043
792 PR tree-optimization/86042
793 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
794 (get_string_cst_length): Rename...
795 (get_min_string_length): ...to this. Add argument.
796 (handle_char_store): Extend to handle multi-character stores by
798 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
799 * tree.h (initializer_zerop): Add argument.
801 2018-07-26 Jakub Jelinek <jakub@redhat.com>
804 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
805 declare target to variables if they have always,{to,from,tofrom} map
808 2018-07-26 Martin Liska <mliska@suse.cz>
811 * lto-wrapper.c: Add linker_output as prefix
812 for ltrans_output_file.
814 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
816 PR rtl-optimization/85805
817 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
818 value for hard registers if that was written in the same mode.
820 2018-07-26 Martin Liska <mliska@suse.cz>
822 PR gcov-profile/86536
823 * gcov.c (format_gcov): Use printf format %.*f directly
824 and do not handle special values.
826 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
828 * common/config/arc/arc-common.c (arc_option_optimization_table):
829 Update default optimizations for size.
831 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
833 * config/arc/arc.md (movsf_insn): Add short instruction selection.
834 * config/arc/constraints.md (CfZ): New constraint.
835 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
836 (subsf3_fpu): Likewise.
837 (cmpsf_fpu): Likewise.
838 (cmpsf_fpu_uneq): Likewise.
840 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
842 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
844 (arc_is_uncached_mem_p): uncached applies to both the variable and
847 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
849 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
852 2018-07-25 David Malcolm <dmalcolm@redhat.com>
854 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
855 field "m_scopes" from vec to auto_vec.
857 2018-07-25 Martin Liska <mliska@suse.cz>
859 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
862 2018-07-25 Richard Biener <rguenther@suse.de>
865 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
866 special wrt context_die late.
867 (gen_subprogram_die): Re-use DIEs in local scope.
869 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
871 PR tree-optimization/86644
872 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
874 2018-07-25 Martin Liska <mliska@suse.cz>
877 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
878 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
880 2018-07-25 Martin Liska <mliska@suse.cz>
883 * params.def: Explain ASan abbreviation and provide
884 a documentation link.
886 2018-07-24 Martin Sebor <msebor@redhat.com>
888 PR tree-optimization/86622
889 PR tree-optimization/86532
890 * builtins.h (string_length): Declare.
891 * builtins.c (c_strlen): Correct handling of non-constant offsets.
892 (check_access): Be prepared for non-constant length ranges.
893 (string_length): Make extern.
894 * expr.c (string_constant): Only handle the minor non-constant
895 array index. Use string_constant to compute the length of
896 a generic string constant.
898 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
900 PR tree-optimization/86618
901 * tree-vect-stmts.c (vectorizable_call): Don't take the address
902 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
904 2018-07-24 David Malcolm <dmalcolm@redhat.com>
906 PR tree-optimization/86636
907 * json.cc (json::object::set): Fix comment. Add assertions.
908 (json::array::append): Move here from json.h. Add comment and an
910 (json::string::string): Likewise.
911 * json.h (json::array::append): Move to json.cc.
912 (json::string::string): Likewise.
913 * optinfo-emit-json.cc
914 (optrecord_json_writer::impl_location_to_json): Assert that we
915 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
916 wrapper around it. Expand the location once, rather than three
918 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
919 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
921 (optrecord_json_writer::optinfo_to_json): Likewise, in four
922 places. Fix some overlong lines.
924 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
926 * config/aarch64/aarch64-simd.md
927 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
928 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
929 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
930 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
931 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
932 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
933 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
934 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
935 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
937 2018-07-24 Jakub Jelinek <jakub@redhat.com>
940 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
941 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
942 and abs_d == d, do the power of two handling if profitable.
944 2018-07-24 Richard Biener <rguenther@suse.de>
946 * match.pd: Add BIT_FIELD_REF canonicalizations.
948 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
951 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
953 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
955 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
956 terminated STRING_CST object.
958 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
960 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
962 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
964 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
965 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
966 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
967 the elements into a register.
968 (rs6000_split_v4si_init_di_reg): Delete.
969 (rs6000_split_v4si_init): Delete.
970 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
971 (vsx_init_v4si): Rewrite as a define_expand.
973 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
975 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
976 zero_extend argument from memory): New.
978 2018-07-22 Martin Sebor <msebor@redhat.com>
981 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
982 diagnosing calls with unknown arguments unless -Walloca-larger-than
983 is restricted to less than PTRDIFF_MAX bytes.
985 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
987 * doc/gcov.texi (Invoking Gcov): Editorial changes.
989 2018-07-20 David Malcolm <dmalcolm@redhat.com>
991 * pretty-print.c (text_info::set_location): Remove redundant
992 "line_table" parameter from call to rich_location::set_range.
994 2018-07-20 Martin Sebor <msebor@redhat.com>
997 * builtins.c (expand_builtin_alloca): Adjust.
998 * calls.c (alloc_max_size): Simplify.
999 * cgraphunit.c (cgraph_node::expand): Adjust.
1000 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1002 (frame_larger_than_size): Same.
1003 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1004 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1006 * doc/invoke.texi (GCC Command Options): Document option arguments.
1007 Explain byte-size arguments and suffixes.
1008 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1009 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1010 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1011 * doc/options.texi (UInteger): Expand.
1012 (Host_Wide_Int, ByteSize): Document new properties.
1013 * final.c (final_start_function_1): Include sizes in an error message.
1014 * function.c (frame_offset_overflow): Same.
1015 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1016 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1017 Diagnose unbounded alloca calls only for limits of less than
1019 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1020 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1022 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1023 only for limits of less than PTRDIFF_MAX.
1024 * langhooks-def.h (lhd_handle_option): Change function argument
1026 * langhooks.c (lhd_handle_option): Same.
1027 * langhooks.h (handle_option): Same.
1028 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1030 (var_type, var_type_struct): Same.
1031 (var_set): Handle ByteSize flag.
1032 * optc-gen.awk: Add comments to output to ease debugging. Make
1033 use of HOST_WIDE_INT where appropriate.
1034 * opts-gen-save.awk: Use %lx to format unsigned long.
1035 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1036 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1037 arguments. Parse bytes-size suffixes.
1038 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1039 (enum_value_to_arg): Same.
1040 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1041 (handle_option): Adjust.
1042 (generate_option): Change function argument to HOST_WIDE_INT.
1043 (cmdline_handle_error): Adjust.
1044 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1045 (set_option): Change function argument to HOST_WIDE_INT.
1046 (option_enabled): Handle cl_host_wide_int.
1047 (get_option_state): Handle CLVC_SIZE.
1048 (control_warning_option): Same.
1049 * opts.c (common_handle_option): Change function argument to
1050 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1051 OPT_Wvla_larger_than_.
1052 * opts.h (enum cl_var_type): Add an enumerator.
1053 * stor-layout.c (layout_decl): Print a more meaningful warning.
1054 * toplev.c (output_stack_usage): Adjust.
1056 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1058 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1059 call to inline_expand_builtin_string_cmp.
1060 (expand_builtin_strcmp): Likewise.
1061 (expand_builtin_strncmp): Likewise.
1062 (inline_string_cmp): Delete the last parameter, change char_type_node
1063 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1065 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1066 the inlining expansion on target where the type of the call has same or
1067 narrower precision than unsigned char.
1069 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1071 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1072 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1073 * common.opt (fsave-optimization-record): New option.
1074 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1075 * doc/invoke.texi (-fsave-optimization-record): New option.
1076 * dumpfile.c: Include "optinfo-emit-json.h".
1077 (struct kv_pair): Move to coretypes.h.
1078 (optgroup_options): Make non-static.
1079 (dump_context::end_scope): Call
1080 optimization_records_maybe_pop_dump_scope.
1081 * dumpfile.h (optgroup_options): New decl.
1082 * json.cc: New file.
1084 * optinfo-emit-json.cc: New file.
1085 * optinfo-emit-json.h: New file.
1086 * optinfo.cc: Include "optinfo-emit-json.h".
1087 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1088 (optinfo_enabled_p): Check optimization_records_enabled_p.
1089 (optinfo_wants_inlining_info_p): Likewise.
1090 * optinfo.h: Update comment.
1091 * profile-count.c (profile_quality_as_string): New function.
1092 * profile-count.h (profile_quality_as_string): New decl.
1093 (profile_count::quality): New accessor.
1094 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1095 and optinfo_emit_json_cc_tests.
1096 * selftest.h (selftest::json_cc_tests): New decl.
1097 (selftest::optinfo_emit_json_cc_tests): New decl.
1098 * toplev.c: Include "optinfo-emit-json.h".
1099 (compile_file): Call optimization_records_finish.
1100 (do_compile): Call optimization_records_start.
1101 * tree-ssa-live.c: Include optinfo.h.
1102 (remove_unused_scope_block_p): Retain inlining information if
1103 optinfo_wants_inlining_info_p returns true.
1105 2018-07-20 Richard Biener <rguenther@suse.de>
1108 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1109 to cover -flto-partition=none.
1111 2018-07-20 Martin Liska <mliska@suse.cz>
1113 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1114 (get_decl_source_range): Remove unused function.
1116 2018-07-20 Richard Biener <rguenther@suse.de>
1118 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1119 (struct vn_phi_s): Likewise.
1120 (struct vn_reference_s): Likewise.
1121 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1122 for searching the slot of an entry known to be in the hash itself.
1123 (vn_phi_hasher::equal): Likewise.
1124 (vn_reference_hasher::equal): Likewise.
1125 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1127 (optimistic_info, current_info): Remove, keeping only valid_info.
1128 (vn_reference_lookup_1): Remove fallback lookup.
1129 (vn_reference_lookup_2): Likewise.
1130 (vn_nary_op_lookup_1): Likewise.
1131 (vn_phi_lookup): Likewise.
1132 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1134 (vn_reference_insert): Adjust, chain the inserted hash element
1135 at last_inserted_ref.
1136 (vn_reference_insert_pieces): Likewise.
1137 (visit_reference_op_call): Likewise.
1138 (vn_nary_op_insert_into): Chain the inserted hash element at
1140 (vn_nary_op_insert_pieces): Adjust.
1141 (vn_nary_op_insert): Likewise.
1142 (vn_nary_op_insert_stmt): Likewise.
1143 (vn_phi_insert): Adjust, chain the inserted hash element at
1145 (process_scc): Remove clearing and copying the optimistic
1146 table. Instead remove elements inserted during an optimistic
1147 iteration from the single table we maintain.
1148 (init_scc_vn): Adjust.
1149 (free_scc_vn): Likewise.
1150 (sccvn_dom_walker::record_cond): Likewise.
1151 (sccvn_dom_walker::after_dom_children): Likewise.
1153 2018-07-19 Martin Sebor <msebor@redhat.com>
1155 PR tree-optimization/84047
1156 PR tree-optimization/83776
1157 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1158 (check_array_bounds): Call it.
1160 2018-07-19 Martin Sebor <msebor@redhat.com>
1162 * align.h (align_flags): Use member initialization.
1164 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1166 * Makefile.in (OBJS): Add optinfo.o.
1167 * coretypes.h (class symtab_node): New forward decl.
1168 (struct cgraph_node): New forward decl.
1169 (class varpool_node): New forward decl.
1170 * dump-context.h: New file.
1171 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1173 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1174 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1175 (set_alt_dump_file): Likewise.
1176 (dump_context::~dump_context): New dtor.
1177 (dump_gimple_stmt): Move implementation to...
1178 (dump_context::dump_gimple_stmt): ...this new member function.
1179 Add the stmt to any pending optinfo, creating one if need be.
1180 (dump_gimple_stmt_loc): Move implementation to...
1181 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1182 Start a new optinfo and add the stmt to it.
1183 (dump_gimple_expr): Move implementation to...
1184 (dump_context::dump_gimple_expr): ...this new member function.
1185 Add the stmt to any pending optinfo, creating one if need be.
1186 (dump_gimple_expr_loc): Move implementation to...
1187 (dump_context::dump_gimple_expr_loc): ...this new member function.
1188 Start a new optinfo and add the stmt to it.
1189 (dump_generic_expr): Move implementation to...
1190 (dump_context::dump_generic_expr): ...this new member function.
1191 Add the tree to any pending optinfo, creating one if need be.
1192 (dump_generic_expr_loc): Move implementation to...
1193 (dump_context::dump_generic_expr_loc): ...this new member
1194 function. Add the tree to any pending optinfo, creating one if
1196 (dump_printf): Move implementation to...
1197 (dump_context::dump_printf_va): ...this new member function. Add
1198 the text to any pending optinfo, creating one if need be.
1199 (dump_printf_loc): Move implementation to...
1200 (dump_context::dump_printf_loc_va): ...this new member function.
1201 Start a new optinfo and add the stmt to it.
1202 (dump_dec): Move implementation to...
1203 (dump_context::dump_dec): ...this new member function. Add the
1204 value to any pending optinfo, creating one if need be.
1205 (dump_context::dump_symtab_node): New member function.
1206 (dump_context::get_scope_depth): New member function.
1207 (dump_context::begin_scope): New member function.
1208 (dump_context::end_scope): New member function.
1209 (dump_context::ensure_pending_optinfo): New member function.
1210 (dump_context::begin_next_optinfo): New member function.
1211 (dump_context::end_any_optinfo): New member function.
1212 (dump_context::s_current): New global.
1213 (dump_context::s_default): New global.
1214 (dump_scope_depth): Delete global.
1215 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1216 (dump_symtab_node): New function.
1217 (get_dump_scope_depth): Reimplement in terms of dump_context.
1218 (dump_begin_scope): Likewise.
1219 (dump_end_scope): Likewise.
1220 (selftest::temp_dump_context::temp_dump_context): New ctor.
1221 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1222 (selftest::verify_item): New function.
1223 (ASSERT_IS_TEXT): New macro.
1224 (ASSERT_IS_TREE): New macro.
1225 (ASSERT_IS_GIMPLE): New macro.
1226 (selftest::test_capture_of_dump_calls): New test.
1227 (selftest::dumpfile_c_tests): Call it.
1228 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1229 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1230 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1231 descriptive comment.
1232 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1233 (dump_node, dump_bb): Move these unrelated decls.
1234 (class dump_manager): Add leading comment.
1235 * optinfo.cc: New file.
1236 * optinfo.h: New file.
1238 2018-07-19 Michael Collison <michael.collison@arm.com>
1239 Richard Henderson <rth@redhat.com>
1241 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1242 (subti): Handle op1 zero.
1243 (subvti4, usub4ti4): New.
1244 (*sub<GPI>3_compare1_imm): New.
1245 (sub<GPI>3_carryinCV): New.
1246 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1247 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1249 2018-07-19 Michael Collison <michael.collison@arm.com>
1250 Richard Henderson <rth@redhat.com>
1252 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1253 (addti3): Create simpler code if low part is already known to be 0.
1254 (addvti4, uaddvti4): New.
1255 (*add<GPI>3_compareC_cconly_imm): New.
1256 (*add<GPI>3_compareC_cconly): New.
1257 (*add<GPI>3_compareC_imm): New.
1258 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1259 handle constants within this pattern..
1260 (*add<GPI>3_compareV_cconly_imm): New.
1261 (*add<GPI>3_compareV_cconly): New.
1262 (*add<GPI>3_compareV_imm): New.
1263 (add<GPI>3_compareV): New.
1264 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1265 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1266 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1267 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1268 with 'comparison' operator.
1269 (*add<GPI>3_compareV_cconly_imm): Ditto.
1270 (*add<GPI>3_compareV_cconly): Ditto.
1271 (*add<GPI>3_compareV_imm): Ditto.
1272 (add<GPI>3_compareV): Ditto.
1273 (add<mode>3_carryinC): Ditto.
1274 (*add<mode>3_carryinC_zero): Ditto.
1275 (*add<mode>3_carryinC): Ditto.
1276 (add<mode>3_carryinV): Ditto.
1277 (*add<mode>3_carryinV_zero): Ditto.
1278 (*add<mode>3_carryinV): Ditto.
1280 2018-07-19 Michael Collison <michael.collison@arm.com>
1281 Richard Henderson <rth@redhat.com>
1283 * config/aarch64/aarch64-modes.def (CC_V): New.
1284 * config/aarch64/aarch64-protos.h
1285 (aarch64_addti_scratch_regs): Declare
1286 (aarch64_subvti_scratch_regs): Declare.
1287 (aarch64_expand_subvti): Declare.
1288 (aarch64_gen_unlikely_cbranch): Declare
1289 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1290 for signed overflow using CC_Vmode.
1291 (aarch64_get_condition_code_1): Handle CC_Vmode.
1292 (aarch64_gen_unlikely_cbranch): New function.
1293 (aarch64_addti_scratch_regs): New function.
1294 (aarch64_subvti_scratch_regs): New function.
1295 (aarch64_expand_subvti): New function.
1297 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1299 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1301 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1302 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1305 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1308 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1309 address check not strict.
1311 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1313 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1315 (store_pair_lanes<mode>): Likewise.
1316 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1317 enum value 'ADDR_QUERY_LDP_STP_N'.
1318 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1319 (aarch64_print_address_internal): Add declaration.
1320 (aarch64_print_ldpstp_address): Remove.
1321 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1322 (aarch64_print_operand): Change printing of 'y'.
1323 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1324 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1325 'true' rather than '1'.
1326 * config/aarch64/constraints.md (Uml): Likewise.
1327 (Uml): Rename to Umn.
1330 2018-07-19 Richard Biener <rguenther@suse.de>
1332 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1334 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1335 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1336 (vn_reference_hasher): Likewise.
1337 (struct vn_tables_s): Remove obstack and alloc-pool members.
1338 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1339 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1340 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1341 (vn_reference_insert_pieces): Likewise.
1342 (alloc_vn_nary_op_noinit): Adjust.
1343 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1344 (vn_phi_eq): Adjust.
1345 (shared_lookup_phiargs): Remove.
1346 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1347 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1348 (visit_reference_op_call): Likewise.
1349 (copy_nary, copy_phi, copy_reference): Remove.
1350 (process_scc): Rewind the obstack when iterating. Do not
1351 copy the elements to valid_info but just move them from one
1352 hashtable to the other.
1353 (allocate_vn_table): Adjust.
1354 (free_vn_table): Likewise.
1355 (init_scc_vn): Likewise.
1356 (free_scc_vn): Likewise.
1358 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1361 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1362 indirect_return as function type attribute.
1363 (ix86_attribute_table): Change indirect_return to function
1365 * doc/extend.texi: Update indirect_return attribute.
1367 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1369 * wide-int.h (widest2_int): New.
1370 * gimple-fold.c (arith_overflowed_p): Use it.
1371 * tree.h (widest2_int_cst): New.
1372 * tree-vrp.c (wide_int_binop_overflow): Rename from
1373 vrp_int_const_binop.
1374 Rewrite to work on trees.
1375 (extract_range_from_multiplicative_op_1): Abstract code to...
1376 (wide_int_range_min_max): ...here.
1377 (wide_int_range_cross_product): ...and here.
1378 (extract_range_from_binary_expr_1): Abstract overflow code to...
1379 (wide_int_range_mult_wrapping): ...here.
1380 * tree-vrp.h (wide_int_range_cross_product): New.
1381 (wide_int_range_mult_wrapping): New.
1383 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1384 Julia Koval <julia.koval@intel.com>
1386 * config/i386/x86-tune-costs.h (skylake_memcpy,
1387 skylake_memset): Replace rep_prefix with unrolling for size 512.
1389 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1392 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1395 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1397 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1398 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1399 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1400 previously known as "PowerPC AltiVec Built-in Functions". Move
1401 some material to new subsubsections "PowerPC AltiVec Built-in
1402 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1404 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1405 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1406 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1407 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1409 2018-07-18 Richard Biener <rguenther@suse.de>
1411 PR tree-optimization/86557
1412 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1415 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1417 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1419 2018-07-17 Jeff Law <law@redhat.com>
1421 * config/arm/arm.c (get_label_padding): Update for recent
1422 changes to label_to_alignment.
1424 PR tree-optimization/86010
1425 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1427 * config/mips/mips.c (vr4130_align_insns): Update for recent
1428 changes to label_to_alignment.
1430 * config/frv/frv.c (frv_label_align): Update for recent changes
1431 to label_to_alignment.
1433 * config/nios2/nios2.c (nios2_label_align): Update for recent
1434 changes which dropped ALIGN_LABELS_LOG.
1436 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1438 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1439 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1441 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1443 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1444 deprecated align_labels_log.
1446 2018-07-17 Richard Biener <rguenther@suse.de>
1449 * dwarf2out.c (init_sections_and_labels): Always generate
1450 a debug_line_str_section for early LTO debug.
1451 (dwarf2out_finish): Reset debug_line_str_hash output early.
1452 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1454 (dwarf2out_early_finish): Output debug_line_str.
1456 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1458 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1459 index register on z196 or later.
1461 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1463 * config/s390/s390.c (s390_default_align): Set default function
1465 (s390_override_options_after_change): Call s390_default align.
1466 (s390_option_override_internal): Call s390_default_align.
1467 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1469 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1472 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1473 to _looptemp_ clauses, other than the first two.
1475 2018-07-17 Martin Liska <mliska@suse.cz>
1477 * opts.c: Do not enable OPT_falign_* for -Os.
1479 2018-07-17 Martin Liska <mliska@suse.cz>
1481 * align.h (MAX_CODE_ALIGN): New.
1482 (MAX_CODE_ALIGN_VALUE): New.
1483 * common/config/i386/i386-common.c (ix86_handle_option):
1484 (MAX_CODE_ALIGN): Moved to align.h.
1485 * final.c (MAX_CODE_ALIGN): Likewise.
1486 * opts.c (parse_and_check_align_values):
1487 (MAX_CODE_ALIGN): Likewise.
1488 (MAX_CODE_ALIGN_VALUE): Likewise.
1490 2018-07-17 Martin Liska <mliska@suse.cz>
1492 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1493 in order to fulfil coding style.
1494 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1495 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1496 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1497 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1498 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1499 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1500 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1501 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1502 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1504 2018-07-17 Martin Liska <mliska@suse.cz>
1506 * align.h: New file.
1507 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1508 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1509 align_flags of label_to_alignment.
1510 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1512 * config/m68k/m68k.c: Do not use removed align_labels_value and
1514 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1515 (LOOP_ALIGN): Likewise.
1516 (LABEL_ALIGN): Likewise.
1517 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1518 Remove not used macro.
1519 (rs6000_loop_align): Change return type to align_flags.
1520 (rs6000_loop_align_max_skip): Remove.
1521 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1522 Change return type to align_flags.
1523 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1524 Remove not used macro.
1525 (rs6000_loop_align): Change return type to align_flags.
1526 (rs6000_loop_align_max_skip): Remove.
1527 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1528 * config/rx/rx-protos.h (rx_align_for_label): Make it
1530 * config/rx/rx.c (rx_align_for_label): Change return type
1532 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1534 into align_flags class.
1535 (LABEL_ALIGN): Likewise.
1536 (LOOP_ALIGN): Likewise.
1537 * config/s390/s390.c (s390_label_align): Use align_flags
1539 (s390_asm_output_function_label): Likewise.
1540 * config/sh/sh.c (sh_override_options_after_change):
1541 Use align_flags class directly without macros.
1542 (find_barrier): Likewise.
1543 (barrier_align): Likewise.
1544 (sh_loop_align): Likewise.
1545 * config/spu/spu.c (spu_option_override):
1546 Use align_flags_tuple::get_value instead of removed macros.
1547 (spu_sched_init): Likewise.
1548 * config/spu/spu.h (GTY): Likewise.
1549 * config/visium/visium.c (visium_option_override):
1550 Set "8" as default secondary alignment.
1551 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1552 in order to guarantee secondary alignment of 8.
1553 * coretypes.h: Include align.h header file.
1554 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1555 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1556 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1557 * doc/tm.texi.in: Likewise.
1558 * final.c (struct label_alignment): Remove not used structure.
1559 (LABEL_ALIGN): Change type to align_flags.
1560 (LOOP_ALIGN): Likewise.
1561 (JUMP_ALIGN): Likewise.
1562 (default_loop_align_max_skip): Remove.
1563 (default_label_align_max_skip): Likewise.
1564 (default_jump_align_max_skip): Likewise.
1565 (default_label_align_after_barrier_max_skip):
1566 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1567 (LABEL_TO_MAX_SKIP): Remove.
1568 (label_to_alignment): Return align_flags type instead of integer.
1569 (label_to_max_skip): Remove.
1570 (align_fuzz): Use align_flags type.
1571 (compute_alignments): Use align_flags type and use align_flags::max
1572 to combine multiple alignments.
1573 (grow_label_align): Grow vec instead of C array.
1574 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1575 (shorten_branches): Use align_flags type and use align_flags::max
1576 to combine multiple alignments.
1577 (final_scan_insn_1): Remove usage of secondary alignment that comes
1578 from label alignment, but instead use proper secondary alignment
1579 which is computed in grow_label_align.
1580 * flags.h (struct align_flags_tuple): Move to align.h.
1581 (struct align_flags): Likewise.
1582 (state_align_loops): Rename to align_loops.
1583 (state_align_jumps): Rename to align_jumps.
1584 (state_align_labels): Rename to align_labels.
1585 (state_align_functions): Rename to align_functions.
1586 (align_loops_log): Remove.
1587 (align_jumps_log): Remove.
1588 (align_labels_log): Remove.
1589 (align_functions_log): Remove.
1590 (align_loops_max_skip): Remove.
1591 (align_jumps_max_skip): Remove.
1592 (align_labels_max_skip): Remove.
1593 (align_functions_max_skip): Remove.
1594 (align_loops_value): Remove.
1595 (align_jumps_value): Remove.
1596 (align_labels_value): Remove.
1597 (align_functions_value): Remove.
1598 * output.h (label_to_alignment): Change return type to align_flags.
1599 (label_to_max_skip): Remove.
1600 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1601 jump_align_max_skip macros.
1602 * targhooks.h (default_loop_align_max_skip): Remove.
1603 (default_label_align_max_skip): Likewise.
1604 (default_jump_align_max_skip): Likewise.
1605 (default_label_align_after_barrier_max_skip): Remove.
1606 * toplev.c (read_log_maxskip): Use ::normalize function.
1607 (parse_N_M): Remove not used argument and also call ::normalize.
1608 (parse_alignment_opts): Do not pass unused arguments.
1609 * varasm.c (assemble_start_function): Use directly align_functions
1610 instead of removed macros.
1611 * system.h: Do not poison removed macros.
1613 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1616 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1617 and cond temporaries don't have reference type if iterator has
1618 pointer type. For init use &for_pre_body instead of pre_p if
1619 for_pre_body is non-empty.
1621 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1623 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1624 double-double modes to SFmode directly directly.
1625 (trunc<mode>sf2_fprs): Delete.
1627 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1629 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1630 for conversions between IFmode and the decimal floating point modes.
1631 (init_float128_ieee): Use the correct names for conversions between
1632 KFmode and the decimal floating point modes.
1634 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1636 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1637 for the conversions between TDmode and IFmode.
1638 (init_float128_ieee): Use more correct names for the conversions
1639 between TDmode and KFmode.
1641 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1643 PR tree-optimization/86526
1644 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1645 (inline_expand_builtin_string_cmp): Likewise.
1646 (inline_string_cmp): Likewise. Use c_readstr instead of
1647 builtin_memcpy_read_str. Add unit_mode temporary.
1649 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1652 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1653 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1655 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1657 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1658 Alphabetize prototypes of built-in functions, separating out
1659 built-in functions that are listed in this section but should be
1660 described elsewhere.
1662 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1665 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1666 conditional move when trapping comparison was split to a
1667 non-trapping one (and vice versa).
1669 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1671 * config/s390/s390.c (s390_function_profiler): Generate nops
1672 instead of profiler call sequences.
1673 * config/s390/s390.opt: Add the new option.
1675 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1677 * config/s390/s390.c (s390_function_profiler): Generate
1678 __mcount_loc section.
1679 * config/s390/s390.opt: Add the new option.
1681 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1683 * common.opt: Add the new warning.
1684 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1685 %r0,__fentry__" when -mfentry is specified.
1686 (s390_option_override_internal): Disallow -mfentry for 31-bit
1688 * config/s390/s390.opt: Add the new option.
1690 2018-07-16 Richard Biener <rguenther@suse.de>
1693 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1694 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1696 2018-07-16 Martin Liska <mliska@suse.cz>
1699 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1702 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1704 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1706 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1708 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1710 * config/arc/arc-cpus.def (hs4x): New cpu.
1712 * config/arc/arc-tables.opt: Regenerate.
1713 * config/arc/arc.c (arc_sched_issue_rate): New function.
1714 (TARGET_SCHED_ISSUE_RATE): Define.
1715 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1716 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1718 (attr tune): Add ARCHS4x tune values.
1719 (attr tune_dspmpy): Define.
1720 (*tst): Correct instruction type.
1721 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1722 * config/arc/arcHS4x.md: New file.
1723 * config/arc/fpu.md: Update instruction type attributes.
1724 * config/arc/t-multilib: Regenerate.
1726 2018-07-16 Tom de Vries <tdevries@suse.de>
1729 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1731 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1733 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1736 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1738 PR tree-optimization/86514
1739 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1740 conversion to a boolean type from a type with greater precision.
1742 2018-07-16 Tom de Vries <tdevries@suse.de>
1744 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1745 dump_flags request TDF_SLIM.
1747 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1749 * fold-const.c (int_const_binop_1): Abstract...
1750 (wide_int_binop): ...wide int code here.
1751 (poly_int_binop): ...poly int code here.
1752 Abstract the rest of int_const_binop_1 into int_const_binop.
1753 * fold-const.h (wide_int_binop): New.
1754 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1755 Remove useless PLUS/MINUS_EXPR case.
1756 (zero_nonzero_bits_from_vr): Move wide int code...
1757 (zero_nonzero_bits_from_bounds): ...here.
1758 (extract_range_from_binary_expr_1): Move mask optimization code...
1759 (range_easy_mask_min_max): ...here.
1760 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1761 (range_easy_mask_min_max): New.
1763 2018-07-15 Jeff Law <law@redhat.com>
1766 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1769 2018-07-14 Jim Wilson <jimw@sifive.com>
1771 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1773 2018-07-14 Paul Koning <ni1d@arrl.net>
1775 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1777 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1779 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1782 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1783 Steve Munroe <munroesj52@gmail.com>
1785 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1786 (_mm_andnot_si128): Likewise.
1787 (_mm_or_si128): Likewise.
1788 (_mm_xor_si128): Likewise.
1790 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1793 * builtins.c (expand_builtin_memcmp): Inline the calls first
1794 when result_eq is false.
1795 (expand_builtin_strcmp): Inline the calls first.
1796 (expand_builtin_strncmp): Likewise.
1797 (inline_string_cmp): New routine. Expand a string compare
1798 call by using a sequence of char comparison.
1799 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1800 a call to str(n)cmp/memcmp.
1801 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1803 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1805 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1807 * config/arm/driver-arm.c: Include arm-native.h.
1808 (host_detect_local_cpu): Use auto-generated data tables.
1809 (vendors, arm_cpu_table): Delete. Move part information to ...
1810 * config/arm/arm-cpus.in: ... here.
1811 * config/arm/parsecpu.awk (gen_native): New function.
1812 (vendor, part): New CPU fields.
1813 (END): Add support for building the native CPU detection tables.
1814 * config/arm/t-arm (arm-native.h): Add build rule.
1815 (driver-arm.o): Add dependency on arm-native.h.
1817 2018-07-13 Richard Biener <rguenther@suse.de>
1820 * match.pd (addr1 - addr2): Allow either of the operand to
1823 2018-07-13 Tom de Vries <tdevries@suse.de>
1825 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1828 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
1830 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1831 arrays instead of numbered variables.
1833 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1835 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1836 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1838 2018-07-13 Richard Biener <rguenther@suse.de>
1841 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1842 instead of get_context_die.
1844 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1845 Richard Biener <rguenther@suse.de>
1848 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1849 that the loop latch destination where phi is defined.
1851 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
1853 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1854 (riscv_expand_epilogue): Add assertion to check interrupt mode.
1855 (riscv_set_current_function): Extract getting interrupt type to new
1857 (riscv_get_interrupt_type): New function.
1858 (riscv_merge_decl_attributes): New function, checking interrupt type is
1860 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1862 2018-07-12 Paul Koning <ni1d@arrl.net>
1864 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1867 2018-07-12 Paul Koning <ni1d@arrl.net>
1869 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1870 zero reference, add doloop_end instead.
1871 * doc/md.texi (decrement_and_branch_until_zero): Remove.
1872 (Looping patterns): Remove decrement_and_branch_until_zero. Add
1873 detail for doloop_end.
1875 2018-07-12 Martin Sebor <msebor@redhat.com>
1878 * attribs.c (decl_attributes): Reject conflicting attributes before
1879 calling attribute handlers.
1881 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1883 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1885 (gcc::dump_manager::get_dump_file_name): likewise.
1886 (dump_begin): Likewise.
1887 * dumpfile.h (dump_begin): Update prototype.
1888 (gcc::dump_manager::get_dump_file_name,
1889 gcc::dump_manager::get_dump_file_name): Update prototype.
1891 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1893 * internal-fn.h (vectorizable_internal_fn_p): New function.
1894 * tree-vect-slp.c (compatible_calls_p): Likewise.
1895 (vect_build_slp_tree_1): Remove nops argument. Handle calls
1896 to internal functions.
1897 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1899 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1901 * fold-const.h (inverse_conditions_p): Declare.
1902 * fold-const.c (inverse_conditions_p): New function.
1903 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1904 that test the inverse condition of a conditional internal function.
1905 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1906 * internal-fn.c (internal_fn_mask_index): Handle conditional
1908 (vectorized_internal_fn_supported_p): New function.
1909 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1910 (any_pred_load_store): Replace with...
1911 (need_to_predicate): ...this new variable.
1912 (redundant_ssa_names): New variable.
1913 (ifcvt_can_use_mask_load_store): Move initial checks to...
1914 (ifcvt_can_predicate): ...this new function. Handle tree codes
1915 for which a conditional internal function exists.
1916 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1917 instead of ifcvt_can_use_mask_load_store. Update after variable
1919 (predicate_load_or_store): New function, split out from
1920 predicate_mem_writes.
1921 (check_redundant_cond_expr): New function.
1922 (value_available_p): Likewise.
1923 (predicate_rhs_code): Likewise.
1924 (predicate_mem_writes): Rename to...
1925 (predicate_statements): ...this. Use predicate_load_or_store
1926 and predicate_rhs_code.
1927 (combine_blocks, tree_if_conversion): Update after above name changes.
1928 (ifcvt_local_dce): Handle redundant_ssa_names.
1929 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1930 general conditional functions.
1931 * tree-vect-stmts.c (vectorizable_call): Likewise.
1933 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1934 Alan Hayward <alan.hayward@arm.com>
1935 David Sherwood <david.sherwood@arm.com>
1937 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1938 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1939 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1940 plus and minus and convert them into IFN_COND_FMA-based sequences.
1941 (convert_mult_to_fma): Handle conditional plus and minus.
1943 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1945 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1946 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1947 (cond_fnms_optab): New optabs.
1948 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1950 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1951 * internal-fn.h (get_conditional_internal_fn): Declare.
1952 (get_unconditional_internal_fn): Likewise.
1953 * internal-fn.c (cond_ternary_direct): New macro.
1954 (expand_cond_ternary_optab_fn): Likewise.
1955 (direct_cond_ternary_optab_supported_p): Likewise.
1956 (FOR_EACH_COND_FN_PAIR): Likewise.
1957 (get_conditional_internal_fn): New function.
1958 (get_unconditional_internal_fn): Likewise.
1959 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1960 (gimple_match_op::gimple_match_op): Add a new overload for 5
1962 (gimple_match_op::set_op): Likewise.
1963 (gimple_resimplify5): Declare.
1964 * genmatch.c (decision_tree::gen): Generate simplifications for
1966 * gimple-match-head.c (gimple_simplify): Define an overload for
1967 5 operands. Handle calls with 5 arguments in the top-level overload.
1968 (convert_conditional_op): Handle conversions from unconditional
1969 internal functions to conditional ones.
1970 (gimple_resimplify5): New function.
1971 (build_call_internal): Pass a fifth operand.
1972 (maybe_push_res_to_seq): Likewise.
1973 (try_conditional_simplification): Try converting conditional
1974 internal functions to unconditional internal functions.
1975 Handle 3-operand unconditional forms.
1976 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1977 Define ternary equivalents of the current rules for binary conditional
1979 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1981 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1982 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1983 (optab): Handle them.
1984 (SVE_COND_FP_TERNARY): New int iterator.
1985 (sve_fmla_op, sve_fmad_op): New int attributes.
1986 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1987 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1988 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1990 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1992 * target.def (preferred_else_value): New target hook.
1993 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1994 * doc/tm.texi: Regenerate.
1995 * targhooks.h (default_preferred_else_value): Declare.
1996 * targhooks.c (default_preferred_else_value): New function.
1997 * internal-fn.h (conditional_internal_fn_code): Declare.
1998 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1999 (get_conditional_internal_fn): Use it.
2000 (conditional_internal_fn_code): New function.
2001 * gimple-match.h (gimple_match_cond): New struct.
2002 (gimple_match_op): Add a cond member function.
2003 (gimple_match_op::gimple_match_op): Update all forms to take a
2005 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2006 for the suboperation, but don't specify a particular else_value.
2007 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2008 (visit_nary_op, visit_reference_op_load): Pass
2009 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2010 * gimple-match-head.c: Include tree-eh.h
2011 (convert_conditional_op): New function.
2012 (maybe_resimplify_conditional_op): Likewise.
2013 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2014 (gimple_resimplify2): Likewise.
2015 (gimple_resimplify3): Likewise.
2016 (gimple_resimplify4): Likewise.
2017 (maybe_push_res_to_seq): Return null for conditional operations.
2018 (try_conditional_simplification): New function.
2019 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2021 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2023 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2025 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2027 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2029 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2031 (hash_tree): Do not hash DECL_FCONTEXT
2032 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2033 Do not stream DECL_FCONTEXT.
2034 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2035 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2037 2018-07-12 Richard Biener <rguenther@suse.de>
2040 * dwarf2out.c (gen_block_die): Only output blocks when they have
2041 at least one !DECL_IGNORED_P variable.
2043 2018-07-12 Richard Biener <rguenther@suse.de>
2046 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2047 Remove -mieee-fp handling.
2049 2018-07-12 Richard Biener <rguenther@suse.de>
2051 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2052 left-over from last patch.
2054 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2056 PR tree-optimization/86492
2057 * gimple-ssa-store-merging.c
2058 (imm_store_chain_info::coalesce_immediate_stores): Call
2059 check_no_overlap even for the merge_overlapping case. Formatting fix.
2061 2018-07-12 Richard Biener <rguenther@suse.de>
2064 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2065 move possibly trapping operations into the conditional.
2067 2018-07-12 Richard Biener <rguenther@suse.de>
2069 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2070 (vn_lookup_simplify_result): Remove recursion limit applied
2072 (vn_nary_build_or_lookup_1): Adjust.
2073 (try_to_simplify): Likewise.
2074 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2076 (gimple_resimplify2): Likewise.
2077 (gimple_resimplify3): Likewise.
2078 (gimple_resimplify4): Likewise.
2080 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2082 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2083 Use __mmask64 type instead of __mmask8 for __M argument.
2084 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2085 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2087 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2088 __mmask16 for __M argument.
2089 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2090 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2091 to __mmask16 instead of __mmask8.
2092 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2093 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2094 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2095 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2096 instead of __mmask16 for __U argument.
2097 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2098 __mmask16 instead of __mmask8 for __U argument.
2099 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2101 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2103 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2105 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2107 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2109 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2111 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2113 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2115 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2117 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2119 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2120 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2121 return type as well as __M argument type and all casts from __mmask8
2123 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2124 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2125 return type as well as __M argument type and all casts from __mmask8
2127 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2128 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2129 return type as well as __M argument type and all casts from __mmask8
2131 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2132 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2133 return type as well as __M argument type and all casts from __mmask8
2135 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2136 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2139 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2141 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2142 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2145 2018-07-11 Paul Koning <ni1d@arrl.net>
2147 * doc/md.texi (define_subst): Document how multiple occurrences of
2148 the same argument in the replacement pattern are handled.
2150 2018-07-11 Paul Koning <ni1d@arrl.net>
2152 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2154 (Common Type Attributes): Add "mode" attribute.
2156 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2158 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2159 stream DECL_ORIGINAL_TYPE.
2160 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2161 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2162 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2163 Do not walk original type.
2164 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2166 (write_ts_decl_non_common_tree_pointers): Do not stream
2168 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2169 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2171 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2173 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2174 thread twice from the same starting edge.
2176 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2178 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2179 * gimple.c (gimple_call_nonnull_result_p): ...here...
2180 (gimple_call_nonnull_arg): ...and here.
2181 * gimple.h (gimple_call_nonnull_result_p): New.
2182 (gimple_call_nonnull_arg): New.
2184 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2186 * config/arm/arm-cpus.in: Move information from fpu field of each
2187 cpu definition to the isa field.
2188 * config/arm/parsecpu.awk (fpu): Delete match rule.
2189 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2191 2018-07-11 Richard Biener <rguenther@suse.de>
2194 * dwarf2out.c (init_sections_and_labels): Use
2195 output_asm_line_debug_info consistently.
2196 (dwarf2out_early_finish): Likewise.
2197 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2200 2018-07-11 Richard Biener <rguenther@suse.de>
2202 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2203 Rework father_bb setting in a way to avoid propagating constants
2204 multiple times on a loop body.
2206 2018-07-10 Mark Wielaard <mark@klomp.org>
2209 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2211 2018-07-10 Richard Biener <rguenther@suse.de>
2213 * hash-map.h (hash_map::iterator::operator*): Return
2214 references to key and value.
2216 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2219 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2220 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2221 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2222 (gimplify_omp_for): For composite loops, move outer
2223 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2224 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2225 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2226 TREE_LIST for both the original class iterator and the "last" helper
2227 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2228 loop, remember has_decl_expr from outer composite loops for the
2229 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2231 2018-07-09 Martin Sebor <msebor@redhat.com>
2235 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2236 accessing implicitly initialized array elements.
2237 * expr.c (string_constant): Handle string initializers of
2238 character arrays within aggregates.
2239 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2240 Store element offset. As a special case, handle zero size.
2241 (fold_nonarray_ctor_reference): Same.
2242 (fold_ctor_reference): Add argument. Store subobject offset.
2243 * gimple-fold.h (fold_ctor_reference): Add argument.
2245 2018-07-09 Paul Koning <ni1d@arrl.net>
2247 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2248 (pdp11_insn_cost): New function.
2249 (pdp11_md_asm_adjust): New function.
2250 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2251 (pdp11_rtx_costs): Update to match machine better.
2252 (output_addr_const_pdp11): Correct format mismatch warnings.
2253 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2254 * config/pdp11/pdp11.md: General change to add base_cost and/or
2255 length attributes for use by new pdp11_insn_cost function.
2256 (MIN_BRANCH): Correct definition.
2258 (doloop_end): Use standard pattern name for looping pattern.
2259 (doloop_end_nocc): New.
2260 (movsf): Add another constraint alternative.
2261 (zero_extendqihi2): Add constraint alternatives for not in place
2263 (zero_extendhisi2): Remove.
2264 (shift patterns): Add CC handling variants.
2268 (define_peephole2): New peephole to recognize mov that sets CC for
2271 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2273 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2274 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2277 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2280 * real.c (real_nextafter): Return true if result is denormal.
2282 2018-07-09 Martin Liska <mliska@suse.cz>
2284 * common.opt: Add back wrongly removed attribute.
2286 2018-07-09 Richard Biener <rguenther@suse.de>
2289 * dwarf2out.c (gen_block_die): For an early generated DIE
2290 always output high/low PC attributes.
2292 2018-07-09 Tom de Vries <tdevries@suse.de>
2294 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2295 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2296 onto VAR_DECL with abstract origin.
2298 2018-07-07 Jim Wilson <jimw@sifive.com>
2300 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2302 2018-07-07 Tom de Vries <tdevries@suse.de>
2304 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2306 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2308 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2310 (combine_bound): Use wide-int overflow calculation instead of
2312 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2314 * fold-const.c (int_const_binop_2): Same.
2315 (extract_muldiv_1): Same.
2316 (fold_div_compare): Same.
2317 (fold_abs_const): Same.
2319 * poly-int.h (add): Same.
2323 * predict.c (predict_iv_comparison): Same.
2324 * profile-count.c (slow_safe_scale_64bit): Same.
2325 * simplify-rtx.c (simplify_const_binary_operation): Same.
2326 * tree-chrec.c (tree_fold_binomial): Same.
2327 * tree-data-ref.c (split_constant_offset_1): Same.
2328 * tree-if-conv.c (idx_within_array_bound): Same.
2329 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2330 * tree-ssa-phiopt.c (minmax_replacement): Same.
2331 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2332 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2333 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2334 * wide-int.cc (wi::add_large): Same.
2335 (wi::mul_internal): Same.
2336 (wi::sub_large): Same.
2337 (wi::divmod_internal): Same.
2338 * wide-int.h: Change overflow type to overflow_type for neg, add,
2339 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2340 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2341 mul_internal, divmod_internal.
2342 (overflow_type): New enum.
2343 (accumulate_overflow): New.
2345 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2347 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2348 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2350 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2352 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2353 argument is checked for zero before entering loop, avoid checking again.
2355 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2357 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2358 * gimplify.h (generic_expr_could_trap_p): Likwise.
2359 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2361 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2363 PR tree-optimization/86401
2364 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2365 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2366 (fold_bit_and_mask): ... here. New helper function for match.pd.
2367 * fold-const.h (fold_bit_and_mask): Declare.
2368 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2370 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2373 * target.def (translate_mode_attribute): New hook.
2374 * targhooks.h (default_translate_mode_attribute): Declare.
2375 * targhooks.c (default_translate_mode_attribute): New function.
2376 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2377 * doc/tm.texi: Regenerate.
2378 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2379 (rs6000_translate_mode_attribute): New function.
2381 2018-07-06 Paul Koning <ni1d@arrl.net>
2383 * doc/md.texi (define_split): Document DONE and FAIL.
2384 (define_peephole2): Ditto.
2386 2018-07-05 Jeff Law <law@redhat.com>
2388 PR tree-optimization/86010
2389 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2390 both the head and tail of mem* and str* calls.
2392 2018-07-05 Jim Wilson <jimw@sifive.com>
2394 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2396 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2398 * config/aarch64/aarch64-simd.md: correct flags text for
2399 MIN_EXPR replacement.
2401 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2403 * configure: Regenerated.
2405 2018-07-05 Carl Love <cel@us.ibm.com>
2407 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2408 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2409 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2410 VSX_BUILTIN_DOUBLEL_V4SF.
2412 2018-07-05 Martin Sebor <msebor@redhat.com>
2415 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2416 than its domain to compute its the upper bound of a char array.
2418 2018-07-05 Nathan Sidwell <nathan@acm.org>
2420 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2421 * doc/cpp.texi: Update comment.
2422 * doc/tm.texi: Rebuilt.
2423 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2424 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2425 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2426 headers affected by extern "C".
2427 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2428 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2429 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2430 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2431 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2432 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2433 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2434 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2435 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2436 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2437 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2438 config/sparc/sp64-elf.h, config/spu/spu.h,
2439 config/stormy16/stormy16.h, config/v850/v850.h,
2440 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2441 define NO_IMPLICIT_EXTERN_C.
2442 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2444 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2447 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2448 instead of GET_MODE_SIZE when comparing Units.
2450 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2453 * rtlanal.c (set_noop_p): Constrain on mode change,
2454 include hard-reg-set.h
2456 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2458 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2460 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2463 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2466 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2468 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2470 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2473 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2475 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2477 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2480 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2482 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2484 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2485 neg_*_op* variables.
2487 2018-07-04 Martin Liska <mliska@suse.cz>
2489 * tree-switch-conversion.c: Define
2490 max_ratio_for_speed and max_ratio_for_size constants.
2492 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2493 Martin Liska <mliska@suse.cz>
2498 * common.opt: Rename align options with 'str_' prefix.
2499 * common/config/i386/i386-common.c (set_malign_value): New
2501 (ix86_handle_option): Use it to set -falign-* options/
2502 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2503 type from int to string.
2504 * config/aarch64/aarch64.c: Update default values from int
2506 * config/alpha/alpha.c (alpha_override_options_after_change):
2508 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2509 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2510 max skip conditionally.
2511 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2512 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2513 max skip conditionally.
2514 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2515 max skip conditionally.
2516 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2517 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2518 max skip conditionally.
2519 * config/i386/i386.c (struct ptt): Change type from int to
2521 (ix86_default_align): Set default values.
2522 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2523 max skip conditionally.
2524 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2525 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2526 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2527 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2528 max skip conditionally.
2529 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2530 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2531 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2532 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2533 max skip conditionally.
2534 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2535 * config/ia64/ia64.c (ia64_option_override): Set default values
2536 for alignment options.
2537 * config/m68k/m68k.c: Handle new str_align_* options.
2538 * config/mips/mips.c (mips_set_compression_mode): Change
2540 (mips_option_override): Set default values for options.
2541 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2543 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2545 * config/rx/rx.c (rx_option_override): Likewise.
2546 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2547 (LABEL_ALIGN): Use align_labels_log.
2548 (LOOP_ALIGN): Use align_loops_align.
2549 * config/s390/s390.c (s390_asm_output_function_label): Use new
2551 * config/sh/sh.c (sh_override_options_after_change):
2552 Change type of constants.
2553 * config/spu/spu.c (spu_sched_init): Likewise.
2554 * config/sparc/sparc.c (sparc_option_override): Set default
2556 * config/visium/visium.c (visium_option_override): Likewise.
2557 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2558 emit p2align format with last argument if it's not needed.
2559 * doc/invoke.texi: Document extended format of -falign-*.
2560 * final.c: Use align_labels alignment.
2561 * flags.h (struct target_flag_state): Change type to use
2563 (struct align_flags_tuple): New.
2564 (struct align_flags): Likewise.
2565 (align_loops_log): Redefine macro to use new types.
2566 (align_loops_max_skip): Redefine macro to use new types.
2567 (align_jumps_log): Redefine macro to use new types.
2568 (align_jumps_max_skip): Redefine macro to use new types.
2569 (align_labels_log): Redefine macro to use new types.
2570 (align_labels_max_skip): Redefine macro to use new types.
2571 (align_functions_log): Redefine macro to use new types.
2572 (align_loops): Redefine macro to use new types.
2573 (align_jumps): Redefine macro to use new types.
2574 (align_labels): Redefine macro to use new types.
2575 (align_functions): Redefine macro to use new types.
2576 (align_functions_max_skip): Redefine macro to use new types.
2577 (align_loops_value): New macro.
2578 (align_jumps_value): New macro.
2579 (align_labels_value): New macro.
2580 (align_functions_value): New macro.
2581 * function.c (invoke_set_current_function_hook): Propagate
2582 alignment values from flags to global variables default in
2584 * ipa-icf.c (sem_function::equals_wpa): Use
2585 cl_optimization_option_eq instead of memcmp.
2586 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2588 (cl_optimization_stream_in): Likewise.
2589 * optc-save-gen.awk: Support strings in cl_optimization.
2590 * opth-gen.awk: Likewise.
2591 * opts.c (finish_options): Remove error checking of invalid
2593 (MAX_CODE_ALIGN): Remove.
2594 (MAX_CODE_ALIGN_VALUE): Likewise.
2595 (parse_and_check_align_values): New function.
2596 (check_alignment_argument): Likewise.
2597 (common_handle_option): Use check_alignment_argument.
2598 * opts.h (parse_and_check_align_values): Declare.
2599 * toplev.c (init_alignments): Remove.
2600 (read_log_maxskip): New.
2601 (parse_N_M): Likewise.
2602 (parse_alignment_opts): Likewise.
2603 (backend_init_target): Remove usage of init_alignments.
2604 * toplev.h (parse_alignment_opts): Declare.
2605 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2607 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2608 * tree.c (cl_option_hasher::equal): New.
2609 * varasm.c: Use new global macros.
2611 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2613 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2614 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2615 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2616 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2617 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2618 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2619 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2620 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2621 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2622 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2623 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2624 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2625 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2627 2018-07-04 Martin Liska <mliska@suse.cz>
2628 Jonathan Wakely <jwakely@redhat.com>
2630 * coverage.c: Use correct type.
2631 * doc/invoke.texi: Language correction.
2633 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2636 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2637 ENDBRANCH for non-tail call which may return via indirect branch.
2638 * doc/extend.texi: Document indirect_return attribute.
2640 2018-07-03 Martin Sebor <msebor@redhat.com>
2642 PR tree-optimization/86274
2643 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2645 (format_floating): Correct handling of infinities and NaNs.
2647 2018-07-03 Martin Sebor <msebor@redhat.com>
2649 * print-tree.c (print_real_cst): New function.
2650 (print_node_brief): Call it.
2651 (print_node): Ditto.
2653 2018-07-03 Jeff Law <law@redhat.com>
2655 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2656 into a single pattern.
2658 * config/h8300/h8300.md (ors code_iterator): New.
2659 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2660 a single pattern and single splitter.
2661 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2662 (iorqi3_1, xorqi3_1): Likewise.
2663 (iorqi3, xorqi3 expanders): Similarly.
2665 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2666 (movmd_internal) into a single pattern using the P mode iterator.
2667 (movmd splitters): Similarly.
2668 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2669 (movsd splitters): Similarly.
2671 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2672 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2673 right table based on the size of the operand.
2674 * config/h8300/h8300.md (length_table): Corresponding changes. All
2675 references to "addb", "addw" and "addl" changed to "add".
2676 (btst patterns): Merge two variants into a single pattern.
2677 (tstqi, tsthi): Likewise.
2678 (addhi3_incdec, addsi3_incdec): Likewise.
2679 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2680 (mulhi3, mulsi3): Likewise.
2681 (udivhi3, udivsi3): Likewise.
2682 (divhi3, divsi3): Likewise.
2683 (andorqi3, andorhi3, andorsi3): Likewise.
2685 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2688 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2689 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2691 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2693 PR tree-optimization/85694
2694 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2695 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2697 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2698 (<u>avg<mode>3_ceil): New patterns.
2700 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2702 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2703 scan-tree-dump directive.
2704 * gcc.dg/vect/slp-perm-2.c: Likewise.
2705 * gcc.dg/vect/slp-perm-3.c: Likewise.
2706 * gcc.dg/vect/slp-perm-5.c: Likewise.
2707 * gcc.dg/vect/slp-perm-6.c: Likewise.
2708 * gcc.dg/vect/slp-perm-7.c: Likewise.
2709 * gcc.dg/vect/slp-perm-8.c: Likewise.
2711 2018-07-03 Marek Polacek <polacek@redhat.com>
2714 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2716 2018-07-03 Richard Biener <rguenther@suse.de>
2719 * tree-ssa-structalias.c (find_func_clobbers): Properly
2720 handle indirect calls.
2722 2018-07-03 Jeff Law <law@redhat.com>
2724 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2725 (shifts): New code iterator.
2726 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2727 expander. Fix HImode handling on H8/SX.
2728 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2729 (subqi3, subhi3, subsi3 expanders): Likewise.
2730 (andqi3, andhi3, andsi3 expanders): Likewise.
2731 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2732 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2733 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2734 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2735 (zero_extendqihi2, zero_extendqisi2): Likewise.
2736 (extendqihi2, extendqisi2): Likewise.
2737 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2738 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2739 (rotlqi3_1, rotlhi3_1): Likewise.
2740 (logicalhi3_sn, logicalsi3_sn): Likewise.
2741 (logicalhi3, logicalsi3): Likewise.
2743 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2745 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2746 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2747 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2748 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2749 type to append_pattern_def_seq instead of creating a stmt_vec_info
2751 (build_mask_conversion): Likewise. Remove vinfo argument.
2752 (vect_add_conversion_to_patterm): Likewise, renaming to...
2753 (vect_add_conversion_to_pattern): ...this.
2754 (vect_recog_mask_conversion_pattern): Update call to
2755 build_mask_conversion. Pass the vector type to
2756 append_pattern_def_seq here too.
2757 (vect_recog_gather_scatter_pattern): Update call to
2758 vect_add_conversion_to_pattern.
2760 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2762 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2763 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2764 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2765 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2766 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2767 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2768 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2769 append_pattern_def_seq instead of new_pattern_def_seq.
2770 (vect_recog_divmod_pattern): Do both of the above.
2771 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2774 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2776 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2777 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2778 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2779 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2780 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2781 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2782 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2783 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2784 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2785 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2786 parameter with a single stmt_vec_info.
2787 (vect_recog_func_ptr): Likewise.
2788 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2789 (vect_try_gather_scatter_pattern): ...this.
2790 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2791 the stmt_vec_info of the statement to be matched. Don't clear
2792 STMT_VINFO_RELATED_STMT.
2793 (vect_pattern_recog): Update call accordingly.
2795 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2797 PR tree-optimization/85694
2798 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2799 (uavgM3_ceil): Document new optabs.
2800 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2801 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2803 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2804 (savg_ceil_optab): New optabs.
2805 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2806 (vect_vect_recog_func_ptrs): Add it.
2807 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2808 constant directly from the associated lhs.
2810 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2812 * tree-vect-patterns.c (vect_split_statement): New function.
2813 (vect_convert_input): Use it to try to split an existing cast.
2815 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2817 * poly-int.h (print_hex): New function.
2818 * dumpfile.h (dump_dec, dump_hex): Declare.
2819 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2820 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2821 min_input_precision, operation_precision and operation_sign.
2822 * tree-vect-patterns.c (vect_get_range_info): New function.
2823 (vect_same_loop_or_bb_p, vect_single_imm_use)
2824 (vect_operation_fits_smaller_type): Delete.
2825 (vect_look_through_possible_promotion): Add an optional
2826 single_use_p parameter.
2827 (vect_recog_over_widening_pattern): Rewrite to use new
2828 stmt_vec_info infomration. Handle one operation at a time.
2829 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2830 (vect_truncatable_operation_p, vect_set_operation_type)
2831 (vect_set_min_input_precision): New functions.
2832 (vect_determine_min_output_precision_1): Likewise.
2833 (vect_determine_min_output_precision): Likewise.
2834 (vect_determine_precisions_from_range): Likewise.
2835 (vect_determine_precisions_from_users): Likewise.
2836 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2837 (vect_vect_recog_func_ptrs): Put over_widening first.
2839 (vect_pattern_recog): Call vect_determine_precisions.
2841 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2843 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2844 statements that have been replaced by further pattern statements.
2845 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2847 2018-07-03 Richard Biener <rguenther@suse.de>
2849 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2850 always set *dt. Dump vectype in vectype overload.
2851 * dumpfile.h (dump_gimple_expr): New function.
2852 (dump_gimple_expr_loc): Likewise.
2853 * dumpfile.c (dump_gimple_expr): New function.
2854 (dump_gimple_expr_loc): Likewise.
2856 2018-07-02 Jeff Law <law@redhat.com>
2858 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2859 the H8/300, H8/300H and H8/S variants into a single pattern.
2860 (movhi_h8300, movqi_h8300hs): Similarly.
2861 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2862 (QHI mode iterator): New.
2864 * config/h8300/h8300.md: Remove trailing whitespace.
2866 2018-07-02 Jim Wilson <jimw@sifive.com>
2868 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2869 instead of emit_insn for interrupt returns.
2870 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2871 (riscv_sret, riscv_uret): Likewise.
2873 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2875 * pretty-print.c (selftest::test_pp_format): Move save and restore
2876 of quotes to class auto_fix_quotes, and add an instance.
2877 * selftest.c: Include "intl.h".
2878 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2879 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2880 * selftest.h (selftest::auto_fix_quotes): New class.
2882 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
2884 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2885 (aarch64_sve_prepare_conditional_op): Remove.
2886 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2887 Allow aarch64_simd_reg_or_zero as select operand; remove
2888 the aarch64_sve_prepare_conditional_op call.
2889 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2890 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2891 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2892 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2893 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2894 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2895 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2896 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2897 and a splitters to match all of the *_any patterns.
2898 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2900 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2901 (SVE_COND_FP_BINARY_REV): Remove.
2902 (sve_int_op_rev, sve_fp_op_rev): New.
2903 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2904 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2905 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2906 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2907 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2908 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2909 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2910 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2911 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2913 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2914 Remove match_dup 1 from the inner unspec.
2915 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2917 * config/aarch64/aarch64.md (movprfx): New attr.
2918 (length): Default movprfx to 8.
2919 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2920 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2921 (*<su>mul<SVE_I>3_highpart): Likewise.
2922 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2923 (*v<ASHIFT><SVE_I>3): Likewise.
2924 (*<su><MAXMIN><SVE_I>3): Likewise.
2925 (*<su><MAXMIN><SVE_F>3): Likewise.
2926 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2927 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2928 (*div<SVE_F>4): Likewise.
2930 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2932 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2935 2018-07-02 Richard Biener <rguenther@suse.de>
2937 PR tree-optimization/86363
2938 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2939 memset argument refers to a non-variable address.
2941 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2943 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2944 {PLUS,MINUS}_EXPR code to...
2945 (adjust_symbolic_bound): ...here,
2946 (combine_bound): ...here,
2947 (set_value_range_with_overflow): ...and here.
2949 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2951 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2953 (extract_range_from_abs_expr): ...here.
2955 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2957 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2958 -fno-omit-frame-pointer when not optimizing.
2960 2018-07-02 Martin Liska <mliska@suse.cz>
2963 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2964 (propagate_nothrow): Likewise.
2966 2018-07-02 Martin Liska <mliska@suse.cz>
2969 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2971 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2973 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2974 function in r262149, changing "loc" param from source_location to
2975 const dump_location_t &.
2976 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2977 declaration, as above.
2979 2018-07-01 Paul Koning <ni1d@arrl.net>
2981 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2982 -munit-asm, -mgnu-asm, -mdec-asm.
2983 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2984 (pdp11_output_labelref): New.
2985 (pdp11_output_def): New.
2986 (pdp11_output_addr_vec_elt): New.
2987 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2988 %# and %@ format codes.
2989 (pdp11_option_override): New.
2990 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2991 (pdp11_output_ident): New.
2992 (pdp11_asm_named_section): New.
2993 (pdp11_asm_init_sections): New.
2994 (pdp11_file_start): New.
2995 (pdp11_file_end): New.
2996 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2997 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2998 %o, like %c but octal.
2999 (pdp11_option_override): New.
3000 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3002 (DATA_SECTION_ASM_OP): Ditto.
3003 (READONLY_DATA_SECTION_ASM_OP): New.
3004 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3005 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3006 (ASM_OUTPUT_LABELREF): Ditto.
3007 (ASM_OUTPUT_DEF): Ditto.
3008 (ASM_OUTPUT_EXTERNAL): New.
3009 (ASM_OUTPUT_SOURCE_FILENAME): New.
3010 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3011 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3012 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3013 %# and %@ format codes.
3014 * config/pdp11/pdp11.opt (mgnu-asm): New.
3015 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3016 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3017 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3019 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3021 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3022 dereferencing path[] beyond its length.
3024 (debug_all_paths): New.
3025 (rewire_first_differing_edge): New.
3026 (adjust_paths_after_duplication): New.
3027 (duplicate_thread_path): Call adjust_paths_after_duplication.
3029 (thread_through_all_blocks): Add new argument to
3030 duplicate_thread_path.
3032 2018-06-30 Jim Wilson <jimw@sifive.com>
3034 * config/riscv/predicates.md (p2m1_shift_operand): New.
3035 (high_mask_shift_operand): New.
3036 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3037 pattern using p2m1_shift_operand.
3038 (lshsi3_zero_extend_3+2): New combiner pattern using
3039 high_mask_shift_operand.
3041 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3043 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3045 (vect_recog_rotate_pattern): ...here.
3046 (vect_convert_input): Try to insert casts of invariants in the
3048 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3049 preheader to be empty.
3051 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3053 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3054 vector type. If given, install it in the new statement's
3056 (vect_element_precision): New function.
3057 (vect_unpromoted_value): New struct.
3058 (vect_unpromoted_value::vect_unpromoted_value): New function.
3059 (vect_unpromoted_value::set_op): Likewise.
3060 (vect_look_through_possible_promotion): Likewise.
3061 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3062 (vect_widened_op_tree, vect_convert_input): Likewise.
3063 (vect_convert_inputs, vect_convert_output): Likewise.
3064 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3065 to handle the optional cast of the multiplication result and
3066 vect_widened_op_tree to detect the widened multiplication itself.
3067 Do not require the input and output of promotion casts to have
3068 the same sign, but base the signedness of the operation on the
3069 input rather than the result. If the pattern includes two
3070 promotions, check that those promotions have the same sign.
3071 Do not restrict the MULT_EXPR handling to a double-width result;
3072 handle quadruple-width results and wider. Use vect_convert_inputs
3073 to convert the inputs to the common type.
3074 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3075 to handle the optional cast of the ABS result. Also allow a sign
3076 change or a sign extension between the ABS and MINUS.
3077 Use vect_widened_op_tree to detect the widened subtraction and use
3078 vect_convert_inputs to convert the inputs to the common type.
3079 (vect_handle_widen_op_by_const): Delete.
3080 (vect_recog_widen_op_pattern): New function.
3081 (vect_recog_widen_mult_pattern): Use it.
3082 (vect_recog_widen_shift_pattern): Likewise.
3083 (vect_recog_widen_sum_pattern): Use
3084 vect_look_through_possible_promotion to handle the promoted
3087 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3089 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3090 the containing gimple_seq *.
3091 * gimple-iterator.h (gsi_for_stmt): Declare it.
3092 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3093 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3094 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3095 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3096 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3098 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3100 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3101 statement being replaced is part of an existing pattern
3102 definition sequence, inserting the new pattern statements before
3104 (vect_pattern_recog_1): Don't return a bool. If the statement
3105 is already part of a pattern, instead apply pattern matching
3106 to the pattern definition statements. Don't clear the
3107 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3108 (vect_pattern_recog): Don't break after the first match;
3109 continue processing the pattern definition statements instead.
3110 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3112 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3114 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3115 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3116 (vect_recog_widen_sum_pattern): Use it.
3118 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3120 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3121 phi is not a pattern statement and has not been replaced by
3122 a pattern statement.
3123 * tree-vect-patterns.c (type_conversion_p): Don't check
3124 STMT_VINFO_IN_PATTERN_P.
3125 (vect_recog_vector_vector_shift_pattern): Likewise.
3126 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3127 the pattern statement rather than the original statement; check
3128 directly for a WIDEN_MULT_EXPR here.
3129 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3130 vect_is_simple_use to return the pattern statement rather
3131 than the original statement; use is_pattern_stmt_p to check
3132 for such a pattern statement.
3133 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3134 to return the pattern statement rather than the original statement;
3135 don't do the same transformation here.
3136 (vect_is_simple_use): If the defining statement has been replaced
3137 by a pattern statement, return the pattern statement instead.
3138 Remove the corresponding (local) transformation from the vectype
3141 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3143 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3144 end and default to null.
3145 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3146 (vectorizable_reduction): Update calls accordingly, dropping the
3147 gimple ** argument if the passed-back statement isn't needed.
3148 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3149 (vect_recog_rotate_pattern): Likewise.
3150 (vect_recog_mask_conversion_pattern): Likewise.
3151 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3152 (vect_mask_constant_operand_p): Likewise.
3153 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3154 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3155 (get_group_load_store_type, get_load_store_type): Likewise.
3156 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3157 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3158 (vectorizable_conversion, vectorizable_assignment): Likewise.
3159 (vectorizable_shift, vectorizable_operation): Likewise.
3160 (vectorizable_store, vect_is_simple_cond): Likewise.
3161 (vectorizable_condition, vectorizable_comparison): Likewise.
3162 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3163 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3164 and move it to the end. Cope with null def_stmt_outs.
3166 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3168 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3170 2018-06-29 Jeff Law <law@redhat.com>
3172 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3173 displacements for TARGET_V850E2V3 and newer.
3174 (TARGET_LRA_P): Remove. Defaults to LRA now.
3175 * config/v850/v850.md (sign23byte_load): Remove.
3176 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3177 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3179 2018-06-29 Martin Liska <mliska@suse.cz>
3182 * coverage.c (coverage_init): Mangle full path name.
3183 * doc/invoke.texi: Document the change.
3184 * gcov-io.c (mangle_path): New.
3185 * gcov-io.h (mangle_path): Likewise.
3186 * gcov.c (mangle_name): Use mangle_path for path mangling.
3188 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3190 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3191 if starting source register is not even.
3193 2018-06-29 Martin Liska <mliska@suse.cz>
3195 PR tree-optimization/86263
3196 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3197 Make edge redirection.
3199 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3201 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3202 (dump_scope_depth): New variable.
3203 (get_dump_scope_depth): New function.
3204 (dump_begin_scope): New function.
3205 (dump_end_scope): New function.
3206 * dumpfile.h (get_dump_scope_depth): New declaration.
3207 (dump_begin_scope): New declaration.
3208 (dump_end_scope): New declaration.
3209 (class auto_dump_scope): New class.
3210 (AUTO_DUMP_SCOPE): New macro.
3211 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3214 2018-06-29 Richard Biener <rguenther@suse.de>
3216 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3217 compute_all_dependences succeeds.
3218 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3219 exceed --param loop-max-datarefs-for-datadeps.
3221 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3223 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3225 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3228 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3229 alternative 0 in preferred_for_speed attribute.
3231 2018-06-28 Paul Koning <ni1d@arrl.net>
3233 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3234 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3235 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3236 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3237 for shift insn patterns.
3239 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3241 * cgraph.c (cgraph_node::get_body): Replace assignments to
3242 "dump_file" with calls to set_dump_file.
3243 * dumpfile.c (alt_dump_file): Make static, and group with...
3244 (alt_flags): ...this definition.
3245 (dumps_are_enabled): New variable.
3246 (refresh_dumps_are_enabled): New function.
3247 (set_dump_file): New function.
3248 (set_alt_dump_file): New function.
3249 (gcc::dump_manager::dump_start): Replace assignments to
3250 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3252 (gcc::dump_manager::dump_finish): Likewise.
3253 * dumpfile.h (alt_dump_file): Delete decl.
3254 (dumps_are_enabled): New variable decl.
3255 (set_dump_file): New function decl.
3256 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3258 * tree-nested.c (lower_nested_functions): Replace assignments to
3259 "dump_file" with calls to set_dump_file.
3261 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3263 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3264 goto_locus of each outgoing edge of each basic block.
3266 2018-06-28 Richard Biener <rguenther@suse.de>
3268 * dwarf2out.c (decl_scope_table): Remove.
3269 (push_decl_scope): Likewise.
3270 (pop_decl_scope): Likewise.
3271 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3272 (gen_struct_or_union_type_die): Likewise.
3273 (gen_tagged_type_die): Likewise.
3274 (dwarf2out_init): Do not initialize decl_scope_table.
3275 (dwarf2out_c_finalize): Do not free it.
3277 2018-06-28 Richard Biener <rguenther@suse.de>
3279 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3280 deciding whether to not re-use a DIE.
3282 2018-06-28 Richard Biener <rguenther@suse.de>
3284 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3285 DW_AT_abstract_origin attribute.
3287 2018-06-28 Martin Liska <mliska@suse.cz>
3289 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3290 Use newly introduced constants.
3291 * tree-switch-conversion.h (struct jump_table_cluster):
3292 Define max_ratio_for_size and max_ratio_for_speed.
3294 2018-06-28 Martin Liska <mliska@suse.cz>
3296 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3297 Add new checking assert to catch invalid state.
3298 (jump_table_cluster::can_be_handled): Handle single case
3300 (jump_table_cluster::is_beneficial): Bail out for such case.
3301 (bit_test_cluster::find_bit_tests):
3302 Add new checking assert to catch invalid state.
3303 (bit_test_cluster::can_be_handled): Handle single case
3305 (bit_test_cluster::is_beneficial): Bail out for such case.
3306 (switch_decision_tree::analyze_switch_statement):
3309 2018-06-28 Martin Liska <mliska@suse.cz>
3311 * common.opt: Introduce -completion option.
3312 * gcc.c (driver_handle_option): Handle it.
3313 (driver::main): Print completions if completion
3315 * opt-suggestions.c (option_proposer::get_completions):
3317 (option_proposer::suggest_completion): Likewise.
3318 (option_proposer::find_param_completions): Likewise.
3319 (verify_autocompletions): Likewise.
3320 (test_completion_valid_options): Likewise.
3321 (test_completion_valid_params): Likewise.
3322 (in_completion_p): Likewise.
3323 (empty_completion_p): Likewise.
3324 (test_completion_partial_match): Likewise.
3325 (test_completion_garbage): Likewise.
3326 (opt_proposer_c_tests): Likewise.
3327 * opt-suggestions.h: Declare new functions.
3328 * opts.c (common_handle_option): Handle OPT__completion_.
3329 * selftest-run-tests.c (selftest::run_tests): Add
3330 opt_proposer_c_tests.
3331 * selftest.c (assert_str_startswith): New.
3332 * selftest.h (assert_str_startswith): Likewise.
3333 (opt_proposer_c_tests): New.
3334 (ASSERT_STR_STARTSWITH): Likewise.
3336 2018-06-28 Martin Liska <mliska@suse.cz>
3338 * Makefile.in: Add opt-suggestions.o.
3339 * gcc-main.c: Include opt-suggestions.h.
3340 * gcc.c (driver::driver): Likewise.
3341 (driver::~driver): Remove m_option_suggestions.
3342 (driver::build_option_suggestions): Moved to option_proposer.
3343 (driver::suggest_option): Likewise.
3344 (driver::handle_unrecognized_options): Use option_proposer.
3345 * gcc.h (class driver): Add new memver m_option_proposer.
3346 * opt-suggestions.c: New file.
3347 * opt-suggestions.h: New file.
3349 2018-06-28 Martin Liska <mliska@suse.cz>
3351 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3352 (auto_string_vec::~auto_string_vec): Likewise.
3354 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3356 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3357 prevent_decl_creation_for_types fields up and add reset_location field.
3358 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3359 statement if id->reset_location is true.
3360 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3361 id->reset_location is true.
3362 (copy_phis_for_bb): Force input_location on the arguments if
3363 id->reset_location is true.
3364 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3365 is set on the function to be inlined.
3367 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3369 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3371 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3373 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3374 registers for Pmode.
3375 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3376 hard registers for the clobbered pseudo.
3378 2018-06-27 Paul Koning <ni1d@arrl.net>
3380 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3381 mutually exclusive options.
3382 * config/pdp11/constraints.md (h): New constraint.
3383 (O): Update definition to match shift code generation.
3384 (D): New constraint.
3385 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3387 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3389 (output_jump): Change arguments.
3390 (pdp11_fixed_cc_regs): New function.
3391 (pdp11_cc_mode): Ditto.
3392 (pdp11_expand_shift): Ditto.
3393 (pdp11_assemble_shift): Ditto.
3394 (pdp11_small_shift): Ditto.
3395 (pdp11_branch_cost): Remove.
3396 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3398 (pdp11_register_move_cost): Update for CC registers.
3399 (pdp11_rtx_costs): Add case for LSHIFTRT.
3400 (pdp11_output_jump): Add CCNZ mode conditional branches.
3401 (notice_update_cc_on_set): Remove.
3402 (pdp11_cc_mode): New function.
3403 (simple_memory_operand): Correct pre/post decrement case.
3404 (no_side_effect_operand): New function.
3405 (pdp11_regno_reg_class): Add CC_REGS class.
3406 (pdp11_fixed_cc_regs): New function.
3407 (pdp11_small_shift): New function.
3408 (pdp11_expand_shift): New function to expand shift insns.
3409 (pdp11_assemble_shift): New function to output shifts.
3410 (pdp11_branch_cost): Remove.
3411 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3412 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3413 (WCHAR_TYPE): Ditto.
3414 (PTRDIFF_TYPE): Ditto.
3415 (ADJUST_INSN_LENGTH): New macro.
3416 (FIXED_REGISTERS): Add CC registers.
3417 (CALL_USED_REGISTERS): Ditto.
3419 (REG_CLASS_NAMES): Ditto.
3420 (REG_CLASS_CONTENTS): Ditto.
3421 (SELECT_CC_MODE): Use new function.
3422 (TARGET_FLAGS_REGNUM): New macro.
3423 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3424 (cc0_reg_rtx): Remove.
3425 (CC_STATUS_MDEP): Remove.
3426 (CC_STATUS_MDEFP_INIT): Remove.
3427 (CC_IN_FPU): Remove.
3428 (NOTICE_UPDATE_CC): Remove.
3429 (REGISTER_NAMES): Add CC registers.
3430 (BRANCH_COST): Change to constant 1.
3431 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3433 * config/pdp11/pdp11.opt (mbcopy): Remove.
3434 (mbcopy-builtin): Remove.
3435 (mbranch-cheap): Remove.
3436 (mbranch-expensive): Remove.
3437 * config/pdp11/predicates.md (expand_shift_operand): Update to
3438 match shift code generation.
3439 (ccnz_operator): New predicate.
3440 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3441 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3442 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3444 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3445 description of O constraint.
3447 2018-06-27 Jeff Law <law@redhat.com>
3448 Austin Law <austinklaw@gmail.com>
3450 * config/v850/v850.md (addsi3_set_flags): New pattern.
3451 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3452 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3453 (zero_extendhisi2_v850_set_flags): Likewise.
3454 (zero_extendqisi2_v850_set_flags): Likewise.
3455 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3456 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3457 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3459 * config/v850/v850-protos.h (notice_update_cc): Remove.
3460 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3461 (v850_print_operand): Handle 'D' and "d".
3462 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3463 Add handling of arithmetic/logical operations compared against zero.
3464 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3465 Do not look at v850_compare_op, instead get mode from last argument.
3466 (v850_gen_compare): Remove
3467 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3468 after reload for prologue insns.
3469 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3471 (construct_save_jarl): Likewise.
3472 (TARGET_FLAGS_REGNUM): Define.
3473 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3474 (NOTICE_UPDATE_CC): Remove.
3475 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3476 than cc0. Conditionalize on reload_completed.
3477 (cmpsi_insn, setfcc_insn): Likewise.
3478 (tst1 splitter): Turn into define_and_split which sets the flags
3480 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3481 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3482 (cstoresf4, cstoredf4): Clobber the flags.
3483 (cmpsi, cmpsf, cmpdf): Remove expanders.
3484 (setf_insn): Remove pattern.
3485 (addsi3): Turn into define_and_split which clobbers the flags after
3486 reload and a suitable pattern (addsi3_clobber_flags) for use after
3488 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3489 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3490 (ashrsi3, ashrsi3_v850e2): Likewise.
3491 (bins): Clobber the flags.
3492 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3493 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3494 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3495 (call_value_internal_short, call_value_internal_long): Likewise.
3496 (callt_save_interrupt, callt_return_interrupt): Likewise.
3497 (save_interrupt, return_interrupt): Likewise.
3498 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3499 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3500 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3501 (All FP comparisons): Only allow after reload has completed.
3503 (divh, divhu): Tweak output template.
3504 (branch_z_normal, branch_z_invert): Remove
3505 (branch_nz_normal, branch_nz_invert): Likewise.
3506 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3508 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3509 * config/v850/v850.c (notice_update_cc): Remove.
3510 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3511 (CC_NO_CARRY): Likewise.
3512 (NOTICE_UPDATE_CC): Define to nothing.
3513 * config/v850/v850.md: Remove block comment on cc0 handling
3514 Remove "cc" attribute from all patterns. Remove cc_status handling
3515 from all patterns. Minor formatting fixes.
3517 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3519 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3520 (cortex-a76.cortex-a55): Likewise.
3521 * config/aarch64/aarch64-tune.md: Regenerate.
3522 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3523 cortex-a76.cortex-a55.
3525 2018-06-27 Jeff Law <law@redhat.com>
3527 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3528 (MULTILIB_DIRNAMES): Similarly.
3530 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3532 * gimple.h (gimple_return_retbnd): Delete.
3533 (gimple_return_set_retbnd): Likewise.
3534 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3535 gimple_return_set_retbnd.
3536 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3537 gimple_return_retbnd and adjust.
3538 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3539 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3540 Explicitly return NULL in a couple more cases. Move assertion
3541 on debug statements and remove unreachable code.
3542 (reset_debug_binding): Do not test id->retbnd.
3543 (expand_call_inline): Do not set it.
3545 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3547 * configure.ac: Add --disable-gcov option.
3548 * configure: Regenerate.
3549 * Makefile.in: Honour @enable_gcov@.
3550 * doc/install.texi: Document --disable-gcov.
3552 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3554 * config/arm/arm-cpus.in (cortex-a76): New entry.
3555 (cortex-a76.cortex-a55): Likewise.
3556 * config/arm/arm-tables.opt: Regenerate.
3557 * config/arm/arm-tune.md: Likewise.
3558 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3559 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3560 cortex-a76.cortex-a55.
3562 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3565 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3567 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3569 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3571 (EPILOGUE_USES): Likewise.
3573 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3575 * tree-inline.c (remap_location): New function extracted from...
3576 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3577 (copy_phis_for_bb): ...here. Call remap_location.
3578 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3580 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3582 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3583 unaligned vsx for 16B memset.
3585 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3588 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3589 ieee128_float_type_node to long_double_type_node unless
3590 TARGET_LONG_DOUBLE_128 is set.
3592 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3594 * cfgloop.c (get_loop_location): Convert return type from
3595 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3596 by implicit construction from rtx_insn *, and using
3597 dump_user_location_t::from_function_decl for the fallback case.
3598 * cfgloop.h (get_loop_location): Convert return type from
3599 location_t to dump_user_location_t.
3600 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3601 dump_printf_loc to pass in a dump_location_t rather than a
3602 location_t, via the gimple stmt.
3603 * coverage.c (get_coverage_counts): Update calls to
3604 dump_printf_loc to pass in dump_location_t rather than a
3606 * doc/optinfo.texi (Dump types): Convert example of
3607 dump_printf_loc from taking "locus" to taking "insn". Update
3608 description of the "_loc" calls to cover dump_location_t.
3609 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3611 (dump_user_location_t::dump_user_location_t): New constructors,
3612 from gimple *stmt and rtx_insn *.
3613 (dump_user_location_t::from_function_decl): New function.
3614 (dump_loc): Make static.
3615 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3616 const dump_location_t &.
3617 (dump_generic_expr_loc): Delete.
3618 (dump_printf_loc): Convert param "loc" from location_t to
3619 const dump_location_t &.
3620 (selftest::test_impl_location): New function.
3621 (selftest::dumpfile_c_tests): New function.
3622 * dumpfile.h: Include "profile-count.h".
3623 (class dump_user_location_t): New class.
3624 (struct dump_impl_location_t): New struct.
3625 (class dump_location_t): New class.
3626 (dump_printf_loc): Convert 2nd param from source_location to
3627 const dump_location_t &.
3628 (dump_generic_expr_loc): Delete.
3629 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3630 const dump_location_t &.
3631 * gimple-fold.c (fold_gimple_assign): Update call to
3632 dump_printf_loc to pass in a dump_location_t rather than a
3633 location_t, via the gimple stmt.
3634 (gimple_fold_call): Likewise.
3635 * gimple-loop-interchange.cc
3636 (loop_cand::analyze_iloop_reduction_var): Update for change to
3637 check_reduction_path.
3638 (tree_loop_interchange::interchange): Update for change to
3640 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3641 change in return-type of find_loop_location.
3642 (graphite_regenerate_ast_isl): Likewise.
3643 * graphite-optimize-isl.c (optimize_isl): Likewise.
3644 * graphite.c (graphite_transform_loops): Likewise.
3645 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3646 pass in a dump_location_t rather than a location_t, via the
3648 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3649 * ipa.c (walk_polymorphic_call_targets): Likewise.
3650 * loop-unroll.c (report_unroll): Convert "locus" param from
3651 location_t to dump_location_t.
3652 (decide_unrolling): Update for change to get_loop_location's
3654 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3655 location_t to dump_user_location_t.
3656 (grid_find_single_omp_among_assignments_1): Updates calls to
3657 dump_printf_loc to pass in a dump_location_t rather than a
3658 location_t, via the gimple stmt.
3659 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3660 location_t to dump_location_t. Updates calls to dump_printf_loc
3661 to pass in a dump_location_t rather than a location_t, via the
3663 (grid_inner_loop_gridifiable_p): Likewise.
3664 (grid_dist_follows_simple_pattern): Likewise.
3665 (grid_gfor_follows_tiling_pattern): Likewise.
3666 (grid_target_follows_gridifiable_pattern): Likewise.
3667 (grid_attempt_target_gridification): Convert initialization
3668 of local "grid" from memset to zero-initialization; FIXME: does
3669 this require C++11? Update call to dump_printf_loc to pass in a
3670 optinfo_location rather than a location_t, via the gimple stmt.
3671 * profile.c (read_profile_edge_counts): Updates call to
3672 dump_printf_loc to pass in a dump_location_t rather than a
3674 (compute_branch_probabilities): Likewise.
3675 * selftest-run-tests.c (selftest::run_tests): Call
3677 * selftest.h (dumpfile_c_tests): New decl.
3678 * tree-loop-distribution.c (pass_loop_distribution::execute):
3679 Update for change in return type of find_loop_location.
3680 * tree-parloops.c (parallelize_loops): Likewise.
3681 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3682 "locus" from location_t to dump_user_location_t.
3683 (canonicalize_loop_induction_variables): Likewise.
3684 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3685 for change in return type of find_loop_location.
3686 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3687 to dump_printf_loc to pass in a dump_location_t rather than a
3688 location_t, via the stmt.
3689 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3691 * tree-vect-loop-manip.c (find_loop_location): Convert return
3692 type from source_location to dump_user_location_t.
3693 (vect_do_peeling): Update for above change.
3694 (vect_loop_versioning): Update for change in type of
3696 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3697 from location_t to dump_user_location_t.
3698 (vect_estimate_min_profitable_iters): Update for change in type
3700 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3701 location_t to dump_location_t.
3702 (vect_slp_bb): Update for change in type of vect_location.
3703 * tree-vectorizer.c (vect_location): Convert from source_location
3704 to dump_user_location_t.
3705 (try_vectorize_loop_1): Update for change in vect_location's type.
3706 (vectorize_loops): Likewise.
3707 (increase_alignment): Likewise.
3708 * tree-vectorizer.h (vect_location): Convert from source_location
3709 to dump_user_location_t.
3710 (find_loop_location): Convert return type from source_location to
3711 dump_user_location_t.
3712 (check_reduction_path): Convert 1st param from location_t to
3713 dump_user_location_t.
3714 * value-prof.c (check_counter): Update call to dump_printf_loc to
3715 pass in a dump_user_location_t rather than a location_t; update
3716 call to error_at for change in type of "locus".
3717 (check_ic_target): Update call to dump_printf_loc to
3718 pass in a dump_user_location_t rather than a location_t, via the
3721 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3723 * config/s390/s390.h (enum processor_flags): Do not use
3724 default tune parameter when -march was specified.
3726 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3729 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3730 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3733 2018-06-26 Richard Biener <rguenther@suse.de>
3735 PR tree-optimization/86287
3737 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3738 (vect_analyze_loop): Initialize n_stmts.
3740 2018-06-26 Richard Biener <rguenther@suse.de>
3743 * fold-const.c (fold_convertible_p): Pointer extension
3746 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3749 * dwarf2out.c (loc_list_has_views): Adjust comments.
3750 (dw_loc_list): Split single cross-partition range with
3753 2018-06-25 Jeff Law <law@redhat.com>
3755 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3756 on -mbig-switch by default.
3758 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3760 (const_float_0_operand): Remove unused predicate.
3761 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3762 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3763 (recipsf2): New expander. Original pattern now called
3765 (recipdf2, recipdf2_insn): Similarly.
3766 (rsqrtsf2, rsqrtsf2_insn): Similarly
3767 (rsqrtdf2, rsqrtdf2_insn): Similarly
3769 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3771 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3772 Simplify logic for FreeBSD (twice).
3774 2018-06-25 Martin Sebor <msebor@redhat.com>
3776 PR tree-optimization/86204
3777 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3778 a strnlen result if it's less than the length of the string.
3780 2018-06-25 Martin Sebor <msebor@redhat.com>
3782 PR tree-optimization/85700
3783 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3784 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3785 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3787 2018-06-25 Martin Sebor <msebor@redhat.com>
3789 * doc/extend.texi (Zero-length arrays): Update and clarify.
3791 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3793 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3794 added IEEE/IBM long double multilib support on PowerPC little
3795 endian Linux systems.
3796 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3797 (MULTILIB_DEFAULTS): Likewise.
3798 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3800 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3801 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3802 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3804 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3807 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3808 (REORDER_45): Likewise.
3810 2018-06-25 Jeff Law <law@redhat.com>
3812 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3813 dividend to 32 bits. Adjust length.
3814 (udivmodhi4): Cleanup output template. Fix length.
3816 2018-06-25 Carl Love <cel@us.ibm.com>
3818 * config/rs6000/vsx.md: Change word selector to prefered location.
3820 2018-06-25 Richard Biener <rguenther@suse.de>
3822 PR tree-optimization/86304
3823 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3824 epilogue-if-converted loops as well.
3826 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
3828 * lto-section-out.c (lto_begin_section): Do not print section
3829 name for noaddr and unnumbered dumps.
3831 2018-06-25 Richard Biener <rguenther@suse.de>
3833 * tree-vectorizer.h (struct vec_info_shared): New structure
3834 with parts split out from struct vec_info and loop_nest from
3835 struct _loop_vec_info.
3836 (struct vec_info): Adjust accordingly.
3837 (struct _loop_vec_info): Likewise.
3838 (LOOP_VINFO_LOOP_NEST): Adjust.
3839 (LOOP_VINFO_DATAREFS): Likewise.
3840 (LOOP_VINFO_DDRS): Likewise.
3841 (struct _bb_vec_info): Likewise.
3842 (BB_VINFO_DATAREFS): Likewise.
3843 (BB_VINFO_DDRS): Likewise.
3844 (struct _stmt_vec_info): Add dr_aux member.
3845 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3846 (DR_MISALIGNMENT_UNINITIALIZED): New.
3847 (set_dr_misalignment): Adjust.
3848 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3849 (vect_analyze_loop): Adjust prototype.
3850 (vect_analyze_loop_form): Likewise.
3851 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3852 Compute dependences lazily.
3853 (vect_record_base_alignments): Use shared datarefs/ddrs.
3854 (vect_verify_datarefs_alignment): Likewise.
3855 (vect_analyze_data_refs_alignment): Likewise.
3856 (vect_analyze_data_ref_accesses): Likewise.
3857 (vect_analyze_data_refs): Likewise.
3858 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3859 constructor parameter for shared part.
3860 (vect_analyze_loop_form): Pass in shared part and adjust.
3861 (vect_analyze_loop_2): Pass in storage for the number of
3862 stmts. Move loop nest finding to the caller. Compute
3864 (vect_analyze_loop): Pass in shared part.
3865 (vect_transform_loop): Verify shared datarefs are unchanged.
3866 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3867 constructor parameter for shared part.
3868 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3869 (vect_slp_bb): Verify shared datarefs are unchanged before
3871 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3873 (new_stmt_vec_info): Initialize DR_AUX misalignment to
3874 DR_MISALIGNMENT_UNINITIALIZED.
3875 * tree-vectorizer.c (vec_info::vec_info): Add constructor
3876 parameter for shared part.
3877 (vec_info::~vec_info): Adjust.
3878 (vec_info_shared::vec_info_shared): New.
3879 (vec_info_shared::~vec_info_shared): Likewise.
3880 (vec_info_shared::save_datarefs): Likewise.
3881 (vec_info_shared::check_datarefs): Likewise.
3882 (try_vectorize_loop_1): Construct shared part live for analyses
3883 of a single loop for multiple vector sizes.
3884 * tree-parloops.c (gather_scalar_reductions): Adjust.
3886 2018-06-25 Richard Biener <rguenther@suse.de>
3888 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3889 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3890 (vect_analyze_data_refs): Remove similar code from here and
3891 simplify accordingly.
3893 2018-06-25 Richard Biener <rguenther@suse.de>
3895 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3896 for reverse storage order accesses rather than asserting
3897 they cannot happen here.
3899 2018-06-25 Tom de Vries <tdevries@suse.de>
3902 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3903 Use data16 instead of .byte for insn prefix.
3905 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3908 * parser.c (make_char_string_pack): Pass this literal chars
3909 through cpp_interpret_string.
3910 (cp_parser_userdef_numeric_literal): Check the result of
3911 make_char_string_pack.
3913 2018-06-24 Maya Rashish <coypu@sdf.org>
3915 * ginclude/stddef.h: Simplify conditions around avoiding
3916 re-definition of __size_t.
3918 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3920 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3921 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3923 2018-06-22 Maya Rashish <coypu@sdf.org>
3925 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3926 made to OpenBSD and NetBSD through the years.
3928 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3930 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3931 behavior of vec_pack (vector double, vector double) to match
3932 behavior of vec_float2 (vector double, vector double).
3934 2018-06-22 Olivier Hainque <hainque@adacore.com>
3936 * gimplify.c (gimplify_function_tree): Prevent creation
3937 of a trampoline for the address of the current function
3938 passed to entry/exit instrumentation hooks.
3940 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3943 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3946 2018-06-22 Martin Liska <mliska@suse.cz>
3948 PR tree-optimization/86263
3949 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3950 Bail out if is_enabled is false.
3951 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3953 (jump_table_cluster::is_enabled): New function.
3955 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3957 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3958 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3959 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3960 (lto_input_ts_binfo_tree_pointers): Likewise.
3961 * tree-streamer-out.c (streamer_write_tree_bitfields,
3962 write_ts_binfo_tree_pointers): Likewise.
3963 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3965 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3967 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3969 2018-06-22 Martin Liska <mliska@suse.cz>
3971 * symbol-summary.h (get): Make it pure and inline move
3972 functionality from ::get function.
3973 (get): Remove and inline into ::get and ::get_create.
3974 (get_create): Move code from ::get function.
3976 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3979 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3980 -x assembler-with-cpp.
3982 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3984 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3985 _FILE_OFFSET_BITS=64 for C++.
3987 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3989 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3990 conversion insn that shows up when pr85657-3.c is compiled using
3991 IEEE 128-bit long double.
3992 (neg<mode>2_internal): Use the correct mode to check whether the
3993 mode is IBM extended.
3994 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3995 multiply and divide external functions from being created more
3998 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4000 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4002 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4003 the edge can be forwarded.
4004 (cfg_layout_merge_blocks): Likewise.
4006 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4008 * except.c (finish_eh_generation): Commit edge insertions only after
4009 the EH edges have been redirected from post-landing to landing pads.
4011 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4013 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4014 create_tmp_var_for to create the FRAME decl.
4015 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4017 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4019 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4020 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4021 debug statement when resetting its value.
4022 (expand_call_inline): Copy the locus of the call onto the assignment
4023 of the return value, if any. Use local variable in more cases.
4025 2018-06-21 Martin Liska <mliska@suse.cz>
4027 * ipa-pure-const.c (propagate_nothrow): Use
4028 funct_state_summaries->get.
4029 (dump_malloc_lattice): Likewise.
4030 (propagate_malloc): Likewise.
4032 2018-06-21 Richard Biener <rguenther@suse.de>
4034 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4035 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4036 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4038 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4039 BLOCK_ABSTRACT_ORIGIN unconditionally.
4041 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4043 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4045 * ipa-reference.c (ipa_reference_c_finalize): Delete
4046 ipa_ref_opt_sum_summaries and set it to NULL.
4048 2018-06-21 Tom de Vries <tdevries@suse.de>
4050 PR tree-optimization/85859
4051 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4052 test with comment from bb_no_side_effects_p.
4054 2018-06-21 Richard Biener <rguenther@suse.de>
4056 PR tree-optimization/86232
4057 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4058 max for constant niter.
4060 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4062 * config/aarch64/aarch64-simd.md
4063 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4065 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4067 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4068 Make opernads of the unspec commutative.
4070 2018-06-21 Richard Biener <rguenther@suse.de>
4072 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4073 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4074 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4075 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4077 (vect_record_base_alignments): Do not record base alignment
4078 for gathers or scatters.
4079 (vect_compute_data_ref_alignment): Drop return value that is always
4080 true. Bail out early for gathers or scatters.
4081 (vect_enhance_data_refs_alignment): Bail out early for gathers
4083 (vect_find_same_alignment_drs): Likewise.
4084 (vect_analyze_data_refs_alignment): Remove dead code.
4085 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4086 (vect_analyze_data_refs): For possible gathers or scatters do
4087 not create an alternate DR, just check their possible validity
4088 and mark them. Adjust DECL_NONALIASED handling to not rely
4090 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4091 update inits of gathers or scatters.
4092 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4093 Also copy gather/scatter flag to pattern vinfo.
4095 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4097 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4098 behavior of vec_packsu (vector unsigned long long, vector unsigned
4099 long long) to match behavior of vec_packs with same signature.
4101 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4102 Thomas Schwinge <thomas@codesourcery.com>
4103 Cesar Philippidis <cesar@codesourcery.com>
4105 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4106 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4107 (gimplify_adjust_omp_clauses): Likewise.
4108 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4109 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4110 (gimplify_omp_target_update): Update handling of acc update and
4112 * omp-low.c (install_var_field): Remove unused parameter
4113 base_pointers_restrict.
4114 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4115 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4117 (omp_target_base_pointers_restrict_p): Delete.
4118 (scan_omp_target): Update call to scan_sharing_clauses.
4119 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4121 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4122 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4123 (convert_local_omp_clauses): Likewise.
4124 * tree-pretty-print.c (dump_omp_clause): Likewise.
4125 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4127 (omp_clause_code_name): Likewise.
4129 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4132 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4135 PR tree-optimization/86231
4136 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4137 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4139 2018-06-20 Tom de Vries <tdevries@suse.de>
4141 PR tree-optimization/86097
4142 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4143 iv type if signedness of iv type is not the same as that of *nit.
4145 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4147 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4148 EDGE_EH edges, verify they are all EDGE_EH.
4150 2018-06-20 Maya Rashish <coypu@sdf.org>
4152 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4154 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4156 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4157 * config/aarch64/aarch64.c (xgene1_tunings): Add
4158 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4159 (aarch64_mode_valid_for_sched_fusion_p):
4160 Allow 16-byte modes.
4161 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4162 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4164 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4166 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4167 * config/aarch64/iterators.md (VQ2): New mode iterator.
4169 2018-06-20 Martin Liska <mliska@suse.cz>
4171 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4172 Change default ratio from 10 to 8.
4174 2018-06-20 Martin Liska <mliska@suse.cz>
4176 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4178 (bit_test_cluster::find_bit_tests): Likewise.
4179 (switch_decision_tree::analyze_switch_statement): Find clusters.
4180 * tree-switch-conversion.h (struct jump_table_cluster): Document
4183 2018-06-20 Martin Liska <mliska@suse.cz>
4185 * tree-switch-conversion.c (switch_conversion::collect):
4186 Record m_uniq property.
4187 (switch_conversion::expand): Bail out for special conditions.
4188 (group_cluster::~group_cluster): New.
4189 (group_cluster::group_cluster): Likewise.
4190 (group_cluster::dump): Likewise.
4191 (jump_table_cluster::emit): New.
4192 (switch_decision_tree::fix_phi_operands_for_edges): New.
4193 (struct case_node): Remove struct.
4194 (jump_table_cluster::can_be_handled): New.
4195 (case_values_threshold): Moved to header.
4196 (reset_out_edges_aux): Likewise.
4197 (jump_table_cluster::is_beneficial): New.
4198 (bit_test_cluster::can_be_handled): Likewise.
4199 (add_case_node): Remove.
4200 (bit_test_cluster::is_beneficial): New.
4201 (case_bit_test::cmp): New.
4202 (bit_test_cluster::emit): New.
4203 (expand_switch_as_decision_tree_p): Remove.
4204 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4205 (fix_phi_operands_for_edge): Likewise.
4206 (switch_decision_tree::analyze_switch_statement): New.
4207 (compute_cases_per_edge): Move ...
4208 (switch_decision_tree::compute_cases_per_edge): ... here.
4209 (try_switch_expansion): Likewise.
4210 (switch_decision_tree::try_switch_expansion): Likewise.
4211 (record_phi_operand_mapping): Likewise.
4212 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4213 (emit_case_decision_tree): Likewise.
4214 (switch_decision_tree::emit): Likewise.
4215 (balance_case_nodes): Likewise.
4216 (switch_decision_tree::balance_case_nodes): Likewise.
4217 (dump_case_nodes): Likewise.
4218 (switch_decision_tree::dump_case_nodes): Likewise.
4219 (emit_jump): Likewise.
4220 (switch_decision_tree::emit_jump): Likewise.
4221 (emit_cmp_and_jump_insns): Likewise.
4222 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4223 (emit_case_nodes): Likewise.
4224 (switch_decision_tree::emit_case_nodes): Likewise.
4225 (conditional_probability): Remove.
4226 * tree-switch-conversion.h (enum cluster_type): New.
4228 (struct cluster): Likewise.
4229 (cluster::cluster): Likewise.
4230 (struct simple_cluster): Likewise.
4231 (simple_cluster::simple_cluster): Likewise.
4232 (struct group_cluster): Likewise.
4233 (struct jump_table_cluster): Likewise.
4234 (struct bit_test_cluster): Likewise.
4235 (struct min_cluster_item): Likewise.
4236 (struct case_tree_node): Likewise.
4237 (case_tree_node::case_tree_node): Likewise.
4238 (jump_table_cluster::case_values_threshold): Likewise.
4239 (struct case_bit_test): Likewise.
4240 (struct switch_decision_tree): Likewise.
4241 (struct switch_conversion): Likewise.
4242 (switch_decision_tree::reset_out_edges_aux): Likewise.
4244 2018-06-20 Martin Liska <mliska@suse.cz>
4246 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4247 (hoist_edge_and_branch_if_true): Likewise.
4248 (expand_switch_using_bit_tests_p): Likewise.
4249 (struct case_bit_test): Likewise.
4250 (case_bit_test_cmp): Likewise.
4251 (emit_case_bit_tests): Likewise.
4252 (switch_conversion::switch_conversion): New class.
4253 (struct switch_conv_info): Remove old struct.
4254 (collect_switch_conv_info): More to ...
4255 (switch_conversion::collect): ... this.
4256 (check_range): Likewise.
4257 (switch_conversion::check_range): Likewise.
4258 (check_all_empty_except_final): Likewise.
4259 (switch_conversion::check_all_empty_except_final): Likewise.
4260 (check_final_bb): Likewise.
4261 (switch_conversion::check_final_bb): Likewise.
4262 (create_temp_arrays): Likewise.
4263 (switch_conversion::create_temp_arrays): Likewise.
4264 (free_temp_arrays): Likewise.
4265 (gather_default_values): Likewise.
4266 (switch_conversion::gather_default_values): Likewise.
4267 (build_constructors): Likewise.
4268 (switch_conversion::build_constructors): Likewise.
4269 (constructor_contains_same_values_p): Likewise.
4270 (switch_conversion::contains_same_values_p): Likewise.
4271 (array_value_type): Likewise.
4272 (switch_conversion::array_value_type): Likewise.
4273 (build_one_array): Likewise.
4274 (switch_conversion::build_one_array): Likewise.
4275 (build_arrays): Likewise.
4276 (switch_conversion::build_arrays): Likewise.
4277 (gen_def_assigns): Likewise.
4278 (switch_conversion::gen_def_assigns): Likewise.
4279 (prune_bbs): Likewise.
4280 (switch_conversion::prune_bbs): Likewise.
4281 (fix_phi_nodes): Likewise.
4282 (switch_conversion::fix_phi_nodes): Likewise.
4283 (gen_inbound_check): Likewise.
4284 (switch_conversion::gen_inbound_check): Likewise.
4285 (process_switch): Use the newly created class.
4286 (switch_conversion::expand): New.
4287 (switch_conversion::~switch_conversion): New.
4288 * tree-switch-conversion.h: New file.
4290 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4292 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4293 tree-vect-patterns.c.
4294 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4295 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4296 (vect_recog_sad_pattern): Likewise.
4297 (vect_recog_widen_sum_pattern): Likewise.
4298 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4299 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4300 (vect_recog_rotate_pattern): Likewise.
4301 (vect_recog_mult_pattern): Likewise.
4302 (vect_recog_vector_vector_shift_pattern): Likewise.
4303 (vect_recog_divmod_pattern): Likewise.
4304 (vect_recog_mixed_size_cond_pattern): Likewise.
4305 (vect_recog_bool_pattern): Likewise.
4306 (vect_recog_mask_conversion_pattern): Likewise.
4307 (vect_try_gather_scatter_pattern): Likewise.
4308 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4309 (vect_recog_over_widening_pattern): Likewise.
4310 (vect_recog_gather_scatter_pattern): Likewise.
4311 (vect_recog_func_ptr): Move from tree-vectorizer.h
4312 (vect_vect_recog_func_ptrs): Move further down the file.
4313 (vect_recog_func): Likewise. Remove the third argument.
4314 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4315 (vect_pattern_recog_1): Expect the pattern function to do any
4316 necessary target tests. Also expect it to provide a vector type.
4317 Remove the type_in handling.
4319 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4321 * tree-vect-patterns.c (vect_pattern_detected): New function.
4322 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4323 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4324 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4325 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4326 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4327 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4328 (vect_recog_mask_conversion_pattern)
4329 (vect_try_gather_scatter_pattern): Likewise.
4331 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4333 * tree-vect-patterns.c (vect_get_internal_def): New function.
4334 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4335 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4336 (search_type_for_mask_1): Use it.
4338 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4340 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4341 redundant WIDEN_SUM_EXPR handling.
4342 (vect_recog_sad_pattern): Likewise.
4344 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4346 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4347 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4348 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4349 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4350 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4352 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4354 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4355 use the stmt_vec_info of the original bb statement for the
4356 new zero assignment, even if the call is part of a pattern.
4358 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4360 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4361 that the sequence is attached to the original statement rather
4362 than the pattern statement.
4363 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4364 PATTERN_DEF_SEQ from the original statement rather than
4365 the main pattern statement.
4366 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4367 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4368 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4370 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4372 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4373 definition statements before the early exit for statements that aren't
4375 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4377 (vect_transform_loop): ...here. Process pattern definition
4378 statements without first checking whether the main pattern
4379 statement is live or relevant.
4381 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4383 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4384 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4386 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4388 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4389 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4390 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4391 (expand_block_compare): Change select_block_compare_mode call.
4392 (expand_strncmp_align_check): Use new functions, fix comment.
4393 (emit_final_str_compare_gpr): New function.
4394 (expand_strn_compare): Refactor and clean up code.
4395 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4397 2018-06-19 Tony Reix <tony.reix@atos.com>
4398 Damien Bergamini <damien.bergamini@atos.com>
4399 David Edelsohn <dje.gcc@gmail.com>
4401 * collect2.c (static_obj): New variable.
4402 (static_libs): New variable.
4403 (is_in_list): Uncomment declaration.
4404 (main): Track AIX libraries linked statically.
4405 (is_in_list): Uncomment definition.
4406 (scan_prog_file): Don't add AIX shared libraries initializer
4407 to constructor list if linking statically.
4409 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4411 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4413 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4415 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4417 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4420 2018-06-19 Martin Liska <mliska@suse.cz>
4422 * config/i386/i386.c (ix86_can_inline_p): Do not use
4423 ipa_fn_summaries::get_create.
4424 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4426 (devirtualization_time_bonus): Likewise.
4427 (ipcp_propagate_stage): Likewise.
4428 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4429 (edge_set_predicate): Likewise.
4430 (evaluate_conditions_for_known_args): Likewise.
4431 (evaluate_properties_for_edge): Likewise.
4432 (ipa_call_summary::reset): Tranform to ...
4433 (ipa_call_summary::~ipa_call_summary): ... this.
4434 (ipa_fn_summary::reset): Transform to ...
4435 (ipa_fn_summary::~ipa_fn_summary): ... this.
4436 (ipa_fn_summary_t::remove): Rename to ...
4437 (ipa_fn_summary_t::remove_callees): ... this.
4438 (ipa_fn_summary_t::duplicate): Use placement new
4439 instead of memory copy.
4440 (ipa_call_summary_t::duplicate): Likewise.
4441 (ipa_call_summary_t::remove): Remove.
4442 (dump_ipa_call_summary): Change get_create to get.
4443 (ipa_dump_fn_summary): Dump only when summary exists.
4444 (analyze_function_body): Use symbol_summary::get instead
4446 (compute_fn_summary): Likewise.
4447 (estimate_edge_devirt_benefit): Likewise.
4448 (estimate_edge_size_and_time): Likewise.
4449 (inline_update_callee_summaries): Likewise.
4450 (remap_edge_change_prob): Likewise.
4451 (remap_edge_summaries): Likewise.
4452 (ipa_merge_fn_summary_after_inlining): Likewise.
4453 (write_ipa_call_summary): Likewise.
4454 (ipa_fn_summary_write): Likewise.
4455 (ipa_free_fn_summary): Likewise.
4456 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4457 (struct ipa_call_summary): Likewise.
4458 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4460 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4461 (estimate_size_after_inlining): Likewise.
4462 (estimate_growth): Likewise.
4463 (growth_likely_positive): Likewise.
4464 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4465 (inline_call): Likewise.
4466 * ipa-inline.c (caller_growth_limits): Likewise.
4467 (can_inline_edge_p): Likewise.
4468 (can_inline_edge_by_limits_p): Likewise.
4469 (compute_uninlined_call_time): Likewise.
4470 (compute_inlined_call_time): Likewise.
4471 (want_inline_small_function_p): Likewise.
4472 (edge_badness): Likewise.
4473 (update_caller_keys): Likewise.
4474 (update_callee_keys): Likewise.
4475 (inline_small_functions): Likewise.
4476 (inline_to_all_callers_1): Likewise.
4477 (dump_overall_stats): Likewise.
4478 (early_inline_small_functions): Likewise.
4479 (early_inliner): Likewise.
4480 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4481 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4482 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4483 * ipa-split.c (execute_split_functions): Likewise.
4484 * symbol-summary.h: Likewise.
4485 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4487 2018-06-19 Richard Biener <rguenther@suse.de>
4489 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4490 (vectorize_loops): ... here. Fix dbgcnt handling.
4491 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4493 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4496 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4497 ieee128 argument takes up only one (vector) register, not two (floating
4500 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4502 * gimplify.c (gimplify_init_constructor): Really never clear for an
4503 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4505 2018-06-19 Richard Biener <rguenther@suse.de>
4507 PR tree-optimization/86179
4508 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4509 after failed recognition.
4511 2018-06-18 Martin Sebor <msebor@redhat.com>
4514 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4515 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4516 Handle integer subtraction.
4517 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4518 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4520 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4522 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4523 param from rtx to rtx_insn *.
4524 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4526 (frv_ifcvt_modify_insn): Likwise.
4527 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4528 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4529 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4530 as_a <rtx_insn *> cast to local "unprotected_region" once
4531 it's been established that it's not NULL or pc_rtx.
4532 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4533 param "sethi" from rtx to rtx_insn *.
4534 (nds32_group_float_insns): Likewise for param "insn".
4535 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4537 (vax_output_int_subtract): Likewise.
4538 * config/vax/vax.c (vax_output_int_add): Likewise for param
4540 (vax_output_int_subtract): Likewise.
4541 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4542 (emit_pattern_after): Likewise for param "after".
4543 (emit_insn_after): Likewise.
4544 (emit_jump_insn_after): Likewise.
4545 (emit_call_insn_after): Likewise.
4546 (emit_debug_insn_after): Likewise.
4547 (emit_pattern_before): Likewise for param "before".
4548 (emit_insn_before): Likewise.
4549 (emit_jump_insn_before): Likewise.
4550 * final.c (get_insn_template): Likewise for param "insn", removing
4552 * output.h (get_insn_template): Likewise for 2nd param.
4553 * rtl.h (emit_insn_before): Likewise.
4554 (emit_jump_insn_before): Likewise.
4555 (emit_debug_insn_before_noloc): Likewise.
4556 (emit_insn_after): Likewise.
4557 (emit_jump_insn_after): Likewise.
4558 (emit_call_insn_after): Likewise.
4559 (emit_debug_insn_after): Likewise.
4560 (set_insn_deleted): Likewise for param.
4562 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4565 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4566 floating point modes, so that IFmode is numerically greater than
4567 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4568 to declare the ordering. This prevents IFmode from being
4569 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4570 machine. Include rs6000-modes.h to share the fractional values
4571 between genmodes* and the rest of the compiler.
4575 * config/rs6000/rs6000-modes.h: New file.
4576 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4577 meaning of rs6000_long_double_size so that 126..128 selects an
4578 appropriate 128-bit floating point type.
4579 (rs6000_option_override_internal): Likewise.
4580 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4581 (TARGET_LONG_DOUBLE_128): Change the meaning of
4582 rs6000_long_double_size so that 126..128 selects an appropriate
4583 128-bit floating point type.
4584 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4585 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4586 source and destination to match the standard usage.
4587 (truncifkf2): Likewise.
4588 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4589 ISA 2.07 to use an explicit clobber, instead of passing in a
4591 (copysign<mode>3_soft): Likewise.
4593 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4595 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4596 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4597 (vect_slp_analyze_instance_dependence): Likewise.
4598 (vect_enhance_data_refs_alignment): Likewise.
4599 (vect_analyze_data_refs_alignment): Likewise.
4600 (vect_slp_analyze_and_verify_instance_alignment
4601 (vect_analyze_data_ref_accesses): Likewise.
4602 (vect_prune_runtime_alias_test_list): Likewise.
4603 (vect_analyze_data_refs): Likewise.
4604 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4605 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4606 (vect_analyze_scalar_cycles_1): Likewise.
4607 (vect_get_loop_niters): Likewise.
4608 (vect_analyze_loop_form_1): Likewise.
4609 (vect_update_vf_for_slp): Likewise.
4610 (vect_analyze_loop_operations): Likewise.
4611 (vect_analyze_loop): Likewise.
4612 (vectorizable_induction): Likewise.
4613 (vect_transform_loop): Likewise.
4614 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4615 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4616 (vect_make_slp_decision): Likewise.
4617 (vect_detect_hybrid_slp): Likewise.
4618 (vect_slp_analyze_operations): Likewise.
4619 (vect_slp_bb): Likewise.
4620 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4621 (vectorizable_bswap): Likewise.
4622 (vectorizable_call): Likewise.
4623 (vectorizable_simd_clone_call): Likewise.
4624 (vectorizable_conversion): Likewise.
4625 (vectorizable_assignment): Likewise.
4626 (vectorizable_shift): Likewise.
4627 (vectorizable_operation): Likewise.
4628 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4630 2018-06-18 Martin Sebor <msebor@redhat.com>
4632 PR tree-optimization/81384
4633 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4634 * builtins.c (expand_builtin_strnlen): New function.
4635 (expand_builtin): Call it.
4636 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4637 * builtins.def (BUILT_IN_STRNLEN): New.
4638 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4639 Warn for bounds in excess of maximum object size.
4640 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4641 single-value ranges. Handle strnlen.
4642 (handle_builtin_strlen): Handle strnlen.
4643 (strlen_check_and_optimize_stmt): Same.
4644 * doc/extend.texi (Other Builtins): Document strnlen.
4646 2018-06-18 Maya Rashish <coypu@sdf.org>
4648 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4649 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4650 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4652 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4654 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4656 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4658 * tree.c (escaped_string::escape): Replace cast to char * by
4659 const_cast<char *> (unescaped).
4661 2018-06-18 Nick Clifton <nickc@redhat.com>
4664 * tree.c (escaped_string): New class. Converts an unescaped
4665 string into its escaped equivalent.
4666 (warn_deprecated_use): Use the new class to convert the
4667 deprecation message, if present.
4668 (test_escaped_strings): New self test.
4669 (test_c_tests): Add test_escaped_strings.
4670 * doc/extend.texi (deprecated): Add a note that the
4671 deprecation message is affected by the -fmessage-length
4672 option, and that control characters will be escaped.
4673 (#pragma GCC error): Document this pragma.
4674 (#pragma GCC warning): Likewise.
4675 * doc/invoke.texi (-fmessage-length): Document this option's
4676 effect on the #warning and #error preprocessor directives and
4677 the deprecated attribute.
4679 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4681 * tree.c (decl_value_expr_lookup): Revert latest change.
4682 (decl_value_expr_insert): Likewise.
4684 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4686 * gimplify.c (nonlocal_vlas): Delete.
4687 (nonlocal_vla_vars): Likewise.
4688 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4690 (gimplify_body): Do not create and destroy nonlocal_vlas.
4691 * tree-nested.c: Include diagnostic.h.
4692 (use_pointer_in_frame): Tweak.
4693 (lookup_field_for_decl): Add assertion and declare the transformation.
4694 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4695 internal error when the reference is in a wrong context. Do not
4696 create a debug decl by default.
4697 (note_nonlocal_block_vlas): Delete.
4698 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4699 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4700 create a debug decl by default.
4701 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4702 call is in a wrong context.
4703 (fixup_vla_decls): New function.
4704 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4705 debug variables were created.
4706 * tree.c (decl_value_expr_lookup): Add checking assertion.
4707 (decl_value_expr_insert): Likewise.
4709 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4712 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4713 * tree-scalar-evolution.c (interpret_expr): Likewise.
4714 (expression_expensive_p): Likewise.
4715 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4716 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4717 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4718 (ssa_defined_by_minus_one_stmt_p): New.
4720 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4723 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4724 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4725 * dojump.c (do_jump): Likewise.
4726 * expr.c (expand_expr_real_2): Check operand type's sign.
4727 * fold-const.c (const_unop): Handle ABSU_EXPR.
4728 (fold_abs_const): Likewise.
4729 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4730 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4731 (strip_sign_op_1): Likesise.
4732 * match.pd: Add new pattern to generate ABSU_EXPR.
4733 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4734 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4735 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4736 * tree-inline.c (estimate_operator_cost): Likewise.
4737 * tree-pretty-print.c (dump_generic_node): Likewise.
4738 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4739 * tree.def (ABSU_EXPR): New.
4741 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4744 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4745 documented as preserved for backward compatibility only.
4746 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4748 PR rtl-optimization/86108
4749 * bb-reorder.c (create_forwarder_block): Renamed to ...
4750 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4751 jump from new landing pad to the second part.
4752 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4755 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4758 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4759 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4760 Only call store_expr for halves if the mode is the same.
4763 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4764 Fix up comment formatting.
4766 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4768 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4769 (typed_splay_tree::closure,
4770 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4771 (typed_splay_tree::typed_splay_tree,
4772 typed_splay_tree::operator =): Declared private.
4773 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4774 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4775 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4776 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4777 typed_splay_tree::splay_tree_splay,
4778 typed_splay_tree::splay_tree_foreach_helper,
4779 typed_splay_tree::splay_tree_insert,
4780 typed_splay_tree::splay_tree_remove,
4781 typed_splay_tree::splay_tree_lookup,
4782 typed_splay_tree::splay_tree_predecessor,
4783 typed_splay_tree::splay_tree_successor,
4784 typed_splay_tree::splay_tree_min,
4785 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4786 (typed_splay_tree::root, typed_splay_tree::comp,
4787 typed_splay_tree::delete_key,
4788 typed_splay_tree::delete_value): New data members.
4789 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4790 typed_splay_tree::remove.
4792 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4794 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4795 -mginv and -mno-ginv to the assembler.
4796 * config/mips/mips.opt (-mcrc): New option.
4798 * doc/invoke.text (-mcrc): Document.
4801 2018-06-15 Nick Clifton <nickc@redhat.com>
4804 * tree.c (escaped_string): New class. Converts an unescaped
4805 string into its escaped equivalent.
4806 (warn_deprecated_use): Use the new class to convert the
4807 deprecation message, if present.
4808 (test_escaped_strings): New self test.
4809 (test_c_tests): Add test_escaped_strings.
4810 * doc/extend.texi (deprecated): Add a note that the
4811 deprecation message is affected by the -fmessage-length
4812 option, and that control characters will be escaped.
4813 (#pragma GCC error): Document this pragma.
4814 (#pragma GCC warning): Likewise.
4815 * doc/invoke.texi (-fmessage-length): Document this option's
4816 effect on the #warning and #error preprocessor directives and
4817 the deprecated attribute.
4819 2018-06-15 Richard Biener <rguenther@suse.de>
4821 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4822 here, also noting vector size used.
4823 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
4824 size used in MSG_OPTIMIZED_LOCATIONS dump.
4825 (pass_slp_vectorize::execute): Adjust.
4827 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
4830 * config/arc/arc.c (arc_return_address_register): Fix
4833 2018-06-15 Richard Biener <rguenther@suse.de>
4836 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4837 leave useless conversion stripping to force_gimple_operand_gsi.
4838 (gimplify_build2): Likewise.
4839 (gimplify_build1): Likewise.
4841 2018-06-15 Richard Biener <rguenther@suse.de>
4844 * tree-cfg.c (move_stmt_op): unshare invariant addresses
4845 before adjusting their block.
4847 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4849 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4850 multilibs for *-*-rtems*.
4851 * config/riscv/t-rtems: New file.
4853 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4856 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4857 unsigned_type_for returns NULL.
4860 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4861 subregs of multi-word pseudos unless the float mode has word size.
4863 2018-06-14 Richard Biener <rguenther@suse.de>
4866 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4867 duplicate and harmful type_hash_canon.
4868 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4870 2018-06-14 Richard Biener <rguenther@suse.de>
4873 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4876 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4878 * config/rtems.h (STDINT_LONG32): Define.
4880 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
4881 Prachi Godbole <prachi.godbole@imgtec.com>
4883 * config/mips/mips-cpus.def: Define P6600.
4884 * config/mips/mips-tables.opt: Regenerate.
4885 * config/mips/mips.c (mips_ucbranch_type): New enum.
4886 (mips_rtx_cost_data): Add support for P6600.
4887 (mips_issue_rate): Likewise.
4888 (mips_multipass_dfa_lookahead): Likewise.
4889 (mips_avoid_hazard): Likewise.
4890 (mips_reorg_process_insns): Likewise.
4891 (mips_classify_branch_p6600): New function.
4892 * config/mips/mips.h (TUNE_P6600): New define.
4893 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4894 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4895 * config/mips/mips.md: Include p6600.md.
4896 (processor): Add p6600.
4897 * config/mips/p6600.md: New file.
4898 * doc/invoke.texi: Add p6600 to supported architectures.
4900 2018-06-13 Martin Sebor <msebor@redhat.com>
4902 PR tree-optimization/86114
4903 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4905 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4907 2018-06-13 Richard Biener <rguenther@suse.de>
4909 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4910 Properly set vector type of the intermediate stmt.
4911 * tree-vect-stmts.c (vectorizable_operation): The destination
4912 var always has vectype_out type.
4914 2018-06-13 Jeff Law <law@redhat.com>
4916 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4917 integer 0 for argument to print_rtl_with_bb.
4918 (rl78_reorg): Likewise.
4920 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4922 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4923 from rtx to rtx_insn *.
4924 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4926 (add_sched_insns_for_speculation): Likewise for local "target",
4927 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4928 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4929 from rtx_insn ** to rtx_code_label **.
4930 (reorg_emit_nops): Likewise.
4931 (c6x_reorg): Likewise for local "call_labels".
4932 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4934 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4935 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4936 the loops over LABEL_REFS.
4937 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4939 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4940 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4941 (split_branches): Strengthen local "olabel" from rtx to
4942 rtx_insn *, adding a safe_as_a cast.
4943 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4945 (add_insn_after): Likewise for first two params.
4946 (add_insn_before): Likewise.
4947 (remove_insn): Likewise for param.
4948 (emit_pattern_before_noloc): Likewise for second and third params.
4949 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4950 (emit_call_insn_before_noloc): Likewise.
4951 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4953 (emit_barrier_before): Likewise.
4954 (emit_label_before): Strengthen "label" param from "rtx" to
4955 "rtx_code_label *". Strengthen "before" param from "rtx" to
4957 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4959 (emit_pattern_after_noloc): Likewise.
4960 (emit_insn_after_noloc): Likewise.
4961 (emit_jump_insn_after_noloc): Likewise.
4962 (emit_call_insn_after_noloc): Likewise.
4963 (emit_debug_insn_after_noloc): Likewise.
4964 (emit_barrier_after): Likewise.
4965 (emit_label_after): Likewise for both params.
4966 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4967 "loc" param from "int" to "location_t".
4968 (emit_insn_after_setloc): Likewise.
4969 (emit_jump_insn_after_setloc): Likewise.
4970 (emit_call_insn_after_setloc): Likewise.
4971 (emit_debug_insn_after_setloc): Likewise.
4972 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4973 "loc" param from "int" to "location_t".
4974 (emit_pattern_before): Convert NULL_RTX to NULL.
4975 (emit_insn_before_setloc): Convert "loc" param from "int" to
4977 (emit_jump_insn_before_setloc): Likewise.
4978 (emit_call_insn_before_setloc): Likewise.
4979 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4980 rtx_insn *. Convert "loc" param from "int" to "location_t".
4981 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4982 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4983 Convert 3rd param from "int" to "location_t".
4984 (emit_barrier_before, emit_barrier_after, next_real_insn):
4985 Strengthen param from rtx to rtx_insn *.
4986 (emit_label_before): Strengthen 1st param from "rtx" to
4987 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4989 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4990 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4991 Strengthen 2nd param from "rtx" to "rtx_insn *".
4992 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4993 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4994 Likewise. Convert 3rd param from "int" to "location_t".
4995 (emit_label_after): Strengthen 1st param from "rtx" to
4997 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4999 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5000 from "rtx" to "rtx_insn *".
5002 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5004 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5005 bodies streamed in with -Q.
5006 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5007 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5008 * gimple-streamer-out.c: Include gimple-pretty-print.h
5009 (output_bb): Dump stmts streamed.
5010 * lto-section-out.c: Include print-tree.h
5011 (lto_begin_section): Dump sections created.
5012 (lto_output_decl_index): Dump decl encoded.
5013 * lto-streamer-out.c: Include print-tree.h
5014 (create_output_block): Dump output block created.
5015 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5016 (output_function): Dump function output.
5017 (output_constructor): Dump constructor streamed.
5018 (write_global_stream): Output indexes encoded.
5019 (produce_asm_for_decls): Dump streams encoded.
5020 * lto-streamer.c (streamer_dump_file): New global var.
5021 * lto-streamer.h (streamer_dump_file): Declare.
5022 * passes.c (ipa_write_summaries): Initialize streamer dump.
5023 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5026 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5029 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5030 offsets for register save directives. Emit a second batch of save
5031 directives, if need be, when the function accesses prior frames.
5033 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5035 * config/arc/fpu.md (fmasf4): Force operand to register.
5036 (fnmasf4): Likewise.
5038 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5040 * config/arc/arc-protos.h (arc_pad_return): Remove.
5041 * config/arc/arc.c (machine_function): Remove force_short_suffix
5043 (arc_print_operand): Adjust printing of '&'.
5044 (arc_verify_short): Remove conditional printing of short suffix.
5045 (arc_final_prescan_insn): Remove reference to size_reason.
5046 (pad_return): New function.
5047 (arc_reorg): Call pad_return.
5048 (arc_pad_return): Remove.
5049 (arc_init_machine_status): Remove reference to force_short_suffix.
5050 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5051 (attr length): When attribute iscompact is true force to 2
5052 regardless; in the case of maybe check if we want to force the
5053 instruction to have 4 bytes length.
5054 (nopv): Change it to generate 4 byte long nop as well.
5055 (blockage): New pattern.
5056 (simple_return): Remove call to arc_pad_return.
5057 (p_return_i): Likewise.
5059 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5061 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5063 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5065 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5068 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5070 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5071 for ARC700 and ARCv2.
5073 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5076 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5077 operands[2] instead of operands[1].
5080 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5082 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5083 case, check whether the outer register overlaps an unallocatable
5084 register, not just whether it fits the required class.
5086 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5088 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5090 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5091 (memrefs_conflict_p): Likewise.
5092 (init_alias_analysis): Likewise.
5093 * cfgexpand.c (expand_debug_expr): Likewise.
5094 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5095 * cse.c (fold_rtx): Likewise.
5096 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5097 * expr.c (emit_block_move_hints): Likewise.
5098 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5099 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5100 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5101 (emit_group_store): Likewise.
5102 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5103 to read the PRE/POST_MODIFY increment.
5104 * calls.c (store_one_arg): Use strip_offset.
5105 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5107 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5109 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5110 (simplify_binary_operation_1): Extend CONST_INT handling to
5112 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5113 than a HOST_WIDE_INT.
5114 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5116 (adjust_mems, add_stores): Update accodingly.
5117 (vt_canonicalize_addr): Track polynomial offsets.
5118 (emit_note_insn_var_location): Likewise.
5119 (vt_add_function_parameter): Likewise.
5120 (vt_initialize): Likewise.
5122 2018-06-12 Jeff Law <law@redhat.com>
5124 * config.gcc (alpha*-*-freebsd*): Remove.
5125 * config/alpha/freebsd.h: Remove.
5127 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5130 * spellcheck-tree.c (levenshtein_distance): Rename to...
5131 (get_edit_distance): ...this, and update for underlying renaming.
5132 * spellcheck-tree.h (levenshtein_distance): Rename to...
5133 (get_edit_distance): ...this.
5134 * spellcheck.c (levenshtein_distance): Rename to...
5135 (get_edit_distance): ...this. Convert from Levenshtein distance
5136 to Damerau-Levenshtein distance by supporting transpositions of
5137 adjacent characters. Rename "v1" to "v_next" and "v0" to
5139 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5140 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5141 update for underlying renaming.
5142 (selftest::levenshtein_distance_unit_test): Rename to...
5143 (selftest::test_get_edit_distance_unit): ...this, and update for
5144 underlying renaming.
5145 (selftest::test_find_closest_string): Add example from PR 69968
5146 where transposition helps
5147 (selftest::test_metric_conditions): Update for renaming.
5148 (selftest::test_metric_conditions): Likewise.
5149 (selftest::spellcheck_c_tests): Likewise.
5150 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5151 (get_edit_distance): ...this.
5152 (best_match::consider): Update for renaming.
5154 2018-06-12 Martin Sebor <msebor@redhat.com>
5156 PR tree-optimization/85259
5157 * builtins.c (compute_objsize): Handle constant offsets.
5158 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5159 true iff a warning has been issued.
5160 * gimple.h (gimple_nonartificial_location): New function.
5161 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5162 gimple_nonartificial_location and handle -Wno-system-headers.
5163 (handle_builtin_stxncpy): Same.
5165 2018-06-12 Martin Sebor <msebor@redhat.com>
5168 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5170 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5172 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5173 BUILTIN_VEC_XST entries for pointer to double and long long.
5175 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5178 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5180 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5183 2018-06-12 Martin Liska <mliska@suse.cz>
5185 * doc/options.texi: Document IntegerRange.
5187 2018-06-12 Martin Liska <mliska@suse.cz>
5189 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5190 * opt-functions.awk: Handle Deprecated flag.
5191 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5193 (read_cmdline_option): Report warning for a deprecated option.
5194 * opts.h (struct cl_option): Add new field cl_deprecated.
5195 (CL_ERR_DEPRECATED): New.
5197 2018-06-12 Martin Liska <mliska@suse.cz>
5199 * doc/options.texi: Document Deprecated option flag.
5201 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5203 * config/arc/arc-arch.h (arc_extras): New enum.
5204 (arc_cpu_t):Add field extra.
5205 (arc_cpu_types): Consider the extras.
5206 * config/arc/arc-cpus.def: Add extras info.
5207 * config/arc/arc-opts.h (processor_type): Consider extra field.
5208 * config/arc/arc.c (arc_override_options): Handle extra field.
5210 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5212 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5213 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5215 * config/arc/arc.c (arc_init): Update pic warning.
5216 (irq_range): Update irq range parsing warnings.
5217 (arc_override_options): Update various warning messages.
5218 (arc_handle_aux_attribute): Likewise.
5220 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5222 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5224 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5226 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5227 compiler messages directives.
5229 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5231 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5232 * config/mips/mips-tables.opt: Regenerate.
5233 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5235 * doc/invoke.texi: Document -march=i6500.
5237 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5239 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5240 (i6400_gpmul): Add cpu_unit.
5241 (i6400_gpdiv): Likewise.
5242 (i6400_msa_add_d): Update reservations.
5243 (i6400_msa_int_add) Likewise.
5244 (i6400_msa_short_logic3) Likewise.
5245 (i6400_msa_short_logic2) Likewise.
5246 (i6400_msa_short_logic) Likewise.
5247 (i6400_msa_move) Likewise.
5248 (i6400_msa_cmp) Likewise.
5249 (i6400_msa_short_float2) Likewise.
5250 (i6400_msa_div_d) Likewise.
5251 (i6400_msa_long_logic1) Likewise.
5252 (i6400_msa_long_logic2) Likewise.
5253 (i6400_msa_mult) Likewise.
5254 (i6400_msa_long_float2) Likewise.
5255 (i6400_msa_long_float4) Likewise.
5256 (i6400_msa_long_float5) Likewise.
5257 (i6400_msa_long_float8) Likewise.
5258 (i6400_fpu_fadd): Include frint type.
5259 (i6400_fpu_store): New define_insn_reservation.
5260 (i6400_fpu_load): Likewise.
5261 (i6400_fpu_move): Likewise.
5262 (i6400_fpu_fcmp): Likewise.
5263 (i6400_fpu_fmadd): Likewise.
5264 (i6400_int_mult): Include imul3nc type and update reservation.
5265 (i6400_int_div): Include idiv3 type and update reservation.
5266 (i6400_int_load): Update to check type not move_type.
5267 (i6400_int_store): Likewise.
5268 (i6400_int_prefetch): Set zero latency.
5270 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5272 * gcc.c: Document new %@{...} sequence.
5273 (LINK_COMMAND_SPEC): Use it for the -L switches.
5274 (cpp_unique_options): Use it for the -I switches.
5275 (at_file_argbuf): New global variable.
5276 (in_at_file): Likewise.
5277 (alloc_args): Create at_file_argbuf.
5278 (clear_args): Truncate at_file_argbuf.
5279 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5280 (open_at_file): New function.
5281 (close_at_file): Likewise.
5282 (create_at_file): Delete.
5283 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5286 (validate_switches_from_spec): Deal with %@{...} sequence.
5287 (validate_switches): Likewise.
5288 (driver::finalize): Call clear_args.
5290 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5292 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5294 2018-06-11 Martin Sebor <msebor@redhat.com>
5296 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5297 (Wno-class-memaccess): Add @opindex.
5298 (Wno-templates, Wno-multiple-inheritance): Same.
5299 (Wno-virtual-inheritance, Wno-namespaces): Same.
5300 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5301 (Wno-format-overflow, Wno-format-truncation): Same.
5302 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5303 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5304 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5305 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5306 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5307 (Wno-misspelled-isr): Same.
5309 2018-06-11 Martin Sebor <msebor@redhat.com>
5311 * PR tree-optimization/86083
5312 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5314 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5316 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5318 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5321 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5322 on the correct operand.
5323 (*movdi_internal64): Ditto.
5325 2018-06-11 Martin Liska <mliska@suse.cz>
5327 PR tree-optimization/86089
5328 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5330 2018-06-11 Julia Koval <julia.koval@intel.com>
5332 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5333 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5334 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5336 2018-06-11 Olivier Hainque <hainque@adacore.com>
5338 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5339 for Ada with strict dwarf2.
5341 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5344 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5347 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5349 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5351 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5353 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5356 2018-06-08 Martin Liska <mliska@suse.cz>
5358 * tree-cfg.h (debug_function): Fix argument type to match
5361 2018-06-08 Martin Liska <mliska@suse.cz>
5363 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5364 Remove usage of MPX-related (and removed) fields.
5365 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5367 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5369 * cfg.c (debug): Use TDF_NONE rather than 0.
5370 * cfghooks.c (debug): Likewise.
5371 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5372 (struct dump_option_value_info): Convert to...
5373 (struct kv_pair): ...this template type.
5374 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5376 (optinfo_verbosity_options): Likewise.
5377 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5379 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5380 than int for "optgroup_flags" param.
5381 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5383 (dump_dec): Likewise.
5384 (dump_finish): Use TDF_NONE rather than 0.
5385 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5386 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5387 than 0. Update for change to option_ptr.
5388 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5389 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5390 0. Update for changes to optinfo_verbosity_options and
5392 (opt_info_switch_p): Convert optgroup_flags from int to
5394 (dump_basic_block): Use dump_flags_t rather than int
5395 for "dump_kind" param.
5396 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5397 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5398 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5399 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5400 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5401 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5402 TDF_NONE): Convert from macros to...
5403 (enum dump_flag): ...this new enum.
5404 (dump_flags_t): Update to use enum.
5405 (operator|, operator&, operator~, operator|=, operator&=):
5406 Implement for dump_flags_t.
5407 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5408 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5409 Convert from macros to...
5410 (enum optgroup_flag): ...this new enum.
5411 (optgroup_flags_t): New typedef.
5412 (operator|, operator|=): Implement for optgroup_flags_t.
5413 (struct dump_file_info): Convert field "alt_flags" to
5414 dump_flags_t. Convert field "optgroup_flags" to
5416 (dump_basic_block): Use dump_flags_t rather than int for param.
5417 (dump_generic_expr_loc): Likewise.
5418 (dump_dec): Likewise.
5419 (dump_register): Convert param "optgroup_flags" to
5421 (opt_info_enable_passes): Likewise.
5422 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5424 * gimple-pretty-print.c (debug): Likewise.
5425 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5426 (merged_store_group::apply_stores): Likewise.
5427 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5428 * gimple.c (verify_gimple_pp): Likewise.
5429 * graphite-poly.c (print_pbb_body): Likewise.
5430 * passes.c (pass_manager::register_one_dump_file): Convert
5431 local "optgroup_flags" to optgroup_flags_t.
5432 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5434 (debug_body): Likewise.
5435 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5436 to optgroup_flags_t.
5437 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5439 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5440 (convert_mult_to_fma): Likewise.
5441 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5442 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5443 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5444 "dump_kind" to dump_flags_t.
5446 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5448 * config/rs6000/rs6000.c (min, max): Delete.
5450 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5452 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5453 -mabi=spe and -mabi=no-spe.
5455 2018-06-08 Martin Liska <mliska@suse.cz>
5457 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5458 where we expect an existing summary.
5460 2018-06-08 Martin Liska <mliska@suse.cz>
5462 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5463 * ipa-inline.h (estimate_edge_growth): Likewise.
5465 2018-06-08 Martin Liska <mliska@suse.cz>
5467 * cgraph.c (function_version_hasher::hash): Use
5468 cgraph_node::get_uid ().
5469 (function_version_hasher::equal):
5470 * cgraph.h (cgraph_node::get_uid): New method.
5471 * ipa-inline.c (update_caller_keys): Use
5472 cgraph_node::get_uid ().
5473 (update_callee_keys): Likewise.
5474 * ipa-utils.c (searchc): Likewise.
5475 (ipa_reduced_postorder): Likewise.
5476 * lto-cgraph.c (input_node): Likewise.
5477 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5478 * symbol-summary.h (symtab_insertion): Likewise.
5479 (symtab_removal): Likewise.
5480 (symtab_duplication): Likewise.
5481 * tree-pretty-print.c (dump_function_header): Likewise.
5482 * tree-sra.c (convert_callers_for_node): Likewise.
5484 2018-06-08 Martin Liska <mliska@suse.cz>
5486 * cgraph.c (symbol_table::create_edge): Always assign a new
5488 (symbol_table::free_edge): Do not recycle numbers.
5489 * cgraph.h (cgraph_edge::get): New method.
5490 * symbol-summary.h (symtab_removal): Use it.
5491 (symtab_duplication): Likewise.
5492 (call_summary::hashable_uid): Remove.
5494 2018-06-08 Martin Liska <mliska@suse.cz>
5496 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5497 (initialize_growth_caches): Remove.
5498 (free_growth_caches): Likewise.
5499 (do_estimate_edge_time): Use edge_growth_cache.
5500 (do_estimate_edge_size): Likewise.
5501 (do_estimate_edge_hints): Likewise.
5502 * ipa-inline.c (reset_edge_caches): Likewise.
5503 (recursive_inlining): Likewise.
5504 (inline_small_functions): Likewise.
5505 * ipa-inline.h (initialize_growth_caches): Remove.
5506 (estimate_edge_size): Likewise.
5507 (estimate_edge_time): Likewise.
5508 (estimate_edge_hints): Likewise.
5509 (reset_edge_growth_cache): Likewise.
5510 * symbol-summary.h (call_summary::remove): New method.
5512 2018-06-08 Martin Liska <mliska@suse.cz>
5514 * ipa-cp.c (class edge_clone_summary): New summary.
5515 (grow_edge_clone_vectors): Remove.
5516 (ipcp_edge_duplication_hook): Remove.
5517 (class edge_clone_summary_t): New call_summary class.
5518 (ipcp_edge_removal_hook): Remove.
5519 (edge_clone_summary_t::duplicate): New function.
5520 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5521 (create_specialized_node): Likewise.
5522 (ipcp_driver): Initialize edge_clone_summaries and do not
5525 2018-06-08 Martin Liska <mliska@suse.cz>
5527 * symbol-summary.h (get): New function.
5528 (call_summary::m_initialize_when_cloning): New class member.
5530 2018-06-08 Martin Liska <mliska@suse.cz>
5532 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5533 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5534 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5535 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5536 (remove_cgraph_node_from_order): Use the removed_nodes set.
5537 (do_per_function_toporder): Likwise.
5538 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5539 instead of summary_uid.
5540 (symtab_removal): Likewise.
5541 (symtab_duplication): Likewise.
5543 2018-06-08 Martin Liska <mliska@suse.cz>
5545 * ipa-cp.c (ipcp_store_bits_results): Use
5546 ipcp_transformation_sum.
5547 (ipcp_store_vr_results): Likewise.
5548 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5550 (ipcp_transformation_initialize): ... this.
5551 (ipa_set_node_agg_value_chain):
5552 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5553 (write_ipcp_transformation_info): Likewise.
5554 (read_ipcp_transformation_info): Likewise.
5555 (ipcp_update_bits): Likewise.
5556 (ipcp_update_vr): Likewise.
5557 (ipcp_transform_function): Likewise.
5558 * ipa-prop.h: Rename ipcp_transformation_summary to
5559 ipcp_transformation.
5560 (class ipcp_transformation_t): New function summary.
5561 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5562 (ipa_get_agg_replacements_for_node): Likewise.
5564 2018-06-08 Martin Liska <mliska@suse.cz>
5566 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5568 (class funct_state_summary_t): New function_summary class.
5569 (has_function_state): Remove.
5570 (get_function_state): Likewise.
5571 (set_function_state): Likewise.
5572 (add_new_function): Likewise.
5573 (funct_state_summary_t::insert): New function.
5574 (duplicate_node_data): Remove.
5575 (remove_node_data): Remove.
5576 (funct_state_summary_t::duplicate): New function.
5577 (register_hooks): Create new funct_state_summaries.
5578 (pure_const_generate_summary): Use it.
5579 (pure_const_write_summary): Likewise.
5580 (pure_const_read_summary): Likewise.
5581 (propagate_pure_const): Likewise.
5582 (propagate_nothrow): Likewise.
5583 (dump_malloc_lattice): Likewise.
5584 (propagate_malloc): Likewise.
5585 (execute): Do not register hooks, just remove summary
5587 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5590 2018-06-08 Martin Liska <mliska@suse.cz>
5592 * ipa-reference.c (remove_node_data): Remove.
5593 (duplicate_node_data): Likewise.
5594 (class ipa_ref_var_info_summary_t): New class.
5595 (class ipa_ref_opt_summary_t): Likewise.
5596 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5597 (get_reference_optimization_summary): Use
5598 ipa_ref_opt_sum_summaries.
5599 (set_reference_vars_info): Remove.
5600 (set_reference_optimization_summary): Likewise.
5601 (ipa_init): Create summaries.
5602 (init_function_info): Use function summary.
5603 (ipa_ref_opt_summary_t::duplicate): New function.
5604 (ipa_ref_opt_summary_t::remove): New function.
5605 (get_read_write_all_from_node): Fix GNU coding style.
5606 (propagate): Use function summary.
5607 (write_node_summary_p): Fix GNU coding style.
5608 (stream_out_bitmap): Likewise.
5609 (ipa_reference_read_optimization_summary): Use function summary.
5610 (ipa_reference_c_finalize): Do not release hooks.
5612 2018-06-08 Martin Liska <mliska@suse.cz>
5614 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5615 (analyze_function_body): Extract multiple calls of get_create.
5616 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5617 * ipa-inline.c (recursive_inlining): Use ::get method.
5618 * ipa-inline.h (estimate_edge_growth): Likewise.
5620 2018-06-08 Martin Liska <mliska@suse.cz>
5622 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5624 (hsa_function_summary::hsa_function_summary): Use the new enum
5626 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5627 * hsa-gen.c (hsa_get_host_function): Likewise.
5628 (get_brig_function_name): Likewise.
5629 * ipa-hsa.c (process_hsa_functions): Likewise.
5630 (ipa_hsa_write_summary): Likewise.
5631 * symbol-summary.h (symtab_duplication): Use ::get function/
5632 (get): New function.
5634 2018-06-08 Martin Liska <mliska@suse.cz>
5636 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5638 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5639 (hsa_register_kernel): Likewise.
5640 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5641 * hsa-gen.c (hsa_get_host_function): Likewise.
5642 (get_brig_function_name): Likewise.
5643 (generate_hsa): Likewise.
5644 (pass_gen_hsail::execute): Likewise.
5645 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5646 (devirtualization_time_bonus): Likewise.
5647 (ipcp_propagate_stage): Likewise.
5648 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5649 (edge_set_predicate): Likewise.
5650 (evaluate_conditions_for_known_args): Likewise.
5651 (evaluate_properties_for_edge): Likewise.
5652 (ipa_fn_summary::reset): Likewise.
5653 (ipa_fn_summary_t::duplicate): Likewise.
5654 (dump_ipa_call_summary): Likewise.
5655 (ipa_dump_fn_summary): Likewise.
5656 (analyze_function_body): Likewise.
5657 (compute_fn_summary): Likewise.
5658 (estimate_edge_devirt_benefit): Likewise.
5659 (estimate_edge_size_and_time): Likewise.
5660 (estimate_calls_size_and_time): Likewise.
5661 (estimate_node_size_and_time): Likewise.
5662 (inline_update_callee_summaries): Likewise.
5663 (remap_edge_change_prob): Likewise.
5664 (remap_edge_summaries): Likewise.
5665 (ipa_merge_fn_summary_after_inlining): Likewise.
5666 (ipa_update_overall_fn_summary): Likewise.
5667 (read_ipa_call_summary): Likewise.
5668 (inline_read_section): Likewise.
5669 (write_ipa_call_summary): Likewise.
5670 (ipa_fn_summary_write): Likewise.
5671 (ipa_free_fn_summary): Likewise.
5672 * ipa-hsa.c (process_hsa_functions): Likewise.
5673 (ipa_hsa_write_summary): Likewise.
5674 (ipa_hsa_read_section): Likewise.
5675 * ipa-icf.c (sem_function::merge): Likewise.
5676 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5677 (do_estimate_edge_time): Likewise.
5678 (estimate_size_after_inlining): Likewise.
5679 (estimate_growth): Likewise.
5680 (growth_likely_positive): Likewise.
5681 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5682 (inline_call): Likewise.
5683 * ipa-inline.c (caller_growth_limits): Likewise.
5684 (can_inline_edge_p): Likewise.
5685 (can_inline_edge_by_limits_p): Likewise.
5686 (compute_uninlined_call_time): Likewise.
5687 (compute_inlined_call_time): Likewise.
5688 (want_inline_small_function_p): Likewise.
5689 (edge_badness): Likewise.
5690 (update_caller_keys): Likewise.
5691 (update_callee_keys): Likewise.
5692 (recursive_inlining): Likewise.
5693 (inline_small_functions): Likewise.
5694 (inline_to_all_callers_1): Likewise.
5695 (dump_overall_stats): Likewise.
5696 (early_inline_small_functions): Likewise.
5697 (early_inliner): Likewise.
5698 * ipa-inline.h (estimate_edge_growth): Likewise.
5699 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5700 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5701 * ipa-prop.h (IPA_NODE_REF): Likewise.
5702 (IPA_EDGE_REF): Likewise.
5703 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5704 (propagate_malloc): Likewise.
5705 * ipa-split.c (execute_split_functions): Likewise.
5706 * symbol-summary.h: Rename get to get_create.
5708 (get_create): Likewise.
5709 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5711 2018-06-08 Martin Liska <mliska@suse.cz>
5713 * symbol-summary.h (release): Move definition out of class
5715 (symtab_removal): Likewise.
5716 (symtab_duplication): Likewise.
5718 2018-06-08 Martin Liska <mliska@suse.cz>
5720 * symbol-summary.h (function_summary): Move constructor
5721 implementation out of class declaration.
5722 (release): Likewise.
5723 (symtab_insertion): Likewise.
5724 (symtab_removal): Likewise.
5725 (symtab_duplication): Likewise.
5728 2018-06-08 Martin Liska <mliska@suse.cz>
5730 * Makefile.in: Remove support for MPX (macros, related functions,
5731 fields in cgraph_node, ...).
5732 * builtin-types.def (BT_BND): Likewise.
5733 (BT_FN_BND_CONST_PTR): Likewise.
5734 (BT_FN_CONST_PTR_BND): Likewise.
5735 (BT_FN_VOID_PTR_BND): Likewise.
5736 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5737 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5738 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5739 (expand_builtin_mempcpy_with_bounds): Likewise.
5740 (expand_builtin_memset_with_bounds): Likewise.
5741 (expand_builtin_memset_args): Likewise.
5742 (std_expand_builtin_va_start): Likewise.
5743 (expand_builtin): Likewise.
5744 (expand_builtin_with_bounds): Likewise.
5745 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5746 (DEF_LIB_BUILTIN_CHKP): Likewise.
5747 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5748 (DEF_CHKP_BUILTIN): Likewise.
5749 (BUILT_IN_MEMCPY): Likewise.
5750 (BUILT_IN_MEMMOVE): Likewise.
5751 (BUILT_IN_MEMPCPY): Likewise.
5752 (BUILT_IN_MEMSET): Likewise.
5753 (BUILT_IN_STPCPY): Likewise.
5754 (BUILT_IN_STRCAT): Likewise.
5755 (BUILT_IN_STRCHR): Likewise.
5756 (BUILT_IN_STRCPY): Likewise.
5757 (BUILT_IN_STRLEN): Likewise.
5758 (BUILT_IN_MEMCPY_CHK): Likewise.
5759 (BUILT_IN_MEMMOVE_CHK): Likewise.
5760 (BUILT_IN_MEMPCPY_CHK): Likewise.
5761 (BUILT_IN_MEMSET_CHK): Likewise.
5762 (BUILT_IN_STPCPY_CHK): Likewise.
5763 (BUILT_IN_STRCAT_CHK): Likewise.
5764 (BUILT_IN_STRCPY_CHK): Likewise.
5765 * calls.c (store_bounds): Likewise.
5766 (emit_call_1): Likewise.
5767 (special_function_p): Likewise.
5768 (maybe_warn_nonstring_arg): Likewise.
5769 (initialize_argument_information): Likewise.
5770 (finalize_must_preallocate): Likewise.
5771 (compute_argument_addresses): Likewise.
5772 (expand_call): Likewise.
5773 * cfgexpand.c (expand_call_stmt): Likewise.
5774 (expand_return): Likewise.
5775 (expand_gimple_stmt_1): Likewise.
5776 (pass_expand::execute): Likewise.
5777 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5778 (cgraph_node::remove): Likewise.
5779 (cgraph_node::dump): Likewise.
5780 (cgraph_node::verify_node): Likewise.
5781 * cgraph.h (chkp_function_instrumented_p): Likewise.
5782 (symtab_node::get_alias_target): Likewise.
5783 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5784 (cgraph_local_p): Likewise.
5785 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5786 (cgraph_edge::rebuild_references): Likewise.
5787 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5788 (walk_polymorphic_call_targets): Likewise.
5789 (cgraph_node::expand_thunk): Likewise.
5790 (symbol_table::output_weakrefs): Likewise.
5791 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5792 (ix86_handle_option): Likewise.
5793 * config/i386/constraints.md: Likewise.
5794 * config/i386/i386-builtin-types.def (BND): Likewise.
5798 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5799 (BDESC_FIRST): Likewise.
5801 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5802 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5803 * config/i386/i386.c (enum reg_class): Likewise.
5804 (ix86_target_string): Likewise.
5805 (ix86_option_override_internal): Likewise.
5806 (ix86_conditional_register_usage): Likewise.
5807 (ix86_valid_target_attribute_inner_p): Likewise.
5808 (ix86_set_indirect_branch_type): Likewise.
5809 (ix86_set_current_function): Likewise.
5810 (ix86_function_arg_regno_p): Likewise.
5811 (init_cumulative_args): Likewise.
5812 (ix86_function_arg_advance): Likewise.
5813 (ix86_function_arg): Likewise.
5814 (ix86_pass_by_reference): Likewise.
5815 (ix86_function_value_regno_p): Likewise.
5816 (ix86_function_value_1): Likewise.
5817 (ix86_function_value_bounds): Likewise.
5818 (ix86_return_in_memory): Likewise.
5819 (ix86_setup_incoming_vararg_bounds): Likewise.
5820 (ix86_va_start): Likewise.
5821 (indirect_thunk_need_prefix): Likewise.
5822 (print_reg): Likewise.
5823 (ix86_print_operand): Likewise.
5824 (ix86_expand_call): Likewise.
5825 (ix86_output_function_return): Likewise.
5826 (reg_encoded_number): Likewise.
5827 (BDESC_VERIFYS): Likewise.
5828 (ix86_init_mpx_builtins): Likewise.
5829 (ix86_init_builtins): Likewise.
5830 (ix86_emit_cmove): Likewise.
5831 (ix86_emit_move_max): Likewise.
5832 (ix86_expand_builtin): Likewise.
5833 (ix86_builtin_mpx_function): Likewise.
5834 (ix86_get_arg_address_for_bt): Likewise.
5835 (ix86_load_bounds): Likewise.
5836 (ix86_store_bounds): Likewise.
5837 (ix86_load_returned_bounds): Likewise.
5838 (ix86_store_returned_bounds): Likewise.
5839 (ix86_class_likely_spilled_p): Likewise.
5840 (ix86_hard_regno_mode_ok): Likewise.
5841 (x86_order_regs_for_local_alloc): Likewise.
5842 (ix86_mitigate_rop): Likewise.
5843 (ix86_bnd_prefixed_insn_p): Likewise.
5844 (ix86_mpx_bound_mode): Likewise.
5845 (ix86_make_bounds_constant): Likewise.
5846 (ix86_initialize_bounds): Likewise.
5847 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5848 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5849 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5850 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5851 (TARGET_CHKP_BOUND_MODE): Likewise.
5852 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5853 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5854 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5855 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5856 * config/i386/i386.h (TARGET_MPX): Likewise.
5857 (TARGET_MPX_P): Likewise.
5858 (VALID_BND_REG_MODE): Likewise.
5859 (FIRST_BND_REG): Likewise.
5860 (LAST_BND_REG): Likewise.
5861 (enum reg_class): Likewise.
5862 (BND_REG_P): Likewise.
5863 (BND_REGNO_P): Likewise.
5864 (BNDmode): Likewise.
5865 (ADJUST_INSN_LENGTH): Likewise.
5866 * config/i386/i386.md: Likewise.
5867 * config/i386/i386.opt: Likewise.
5868 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5869 (defined): Likewise.
5870 (LINK_MPX): Likewise.
5871 (MPX_SPEC): Likewise.
5872 (LIBMPX_SPEC): Likewise.
5873 (LIBMPXWRAPPERS_SPEC): Likewise.
5874 (CHKP_SPEC): Likewise.
5875 * config/i386/predicates.md: Likewise.
5876 * dbxout.c (dbxout_type): Likewise.
5877 * doc/extend.texi: Likewise.
5878 * doc/invoke.texi: Likewise.
5879 * doc/md.texi: Likewise.
5880 * doc/tm.texi: Likewise.
5881 * doc/tm.texi.in: Likewise.
5882 * dwarf2out.c (is_base_type): Likewise.
5883 (gen_formal_types_die): Likewise.
5884 (gen_subprogram_die): Likewise.
5885 (gen_type_die_with_usage): Likewise.
5886 (gen_decl_die): Likewise.
5887 (dwarf2out_late_global_decl): Likewise.
5888 * expr.c (expand_assignment): Likewise.
5889 (emit_storent_insn): Likewise.
5890 (store_expr_with_bounds): Likewise.
5891 (store_expr): Likewise.
5892 (expand_expr_real_1): Likewise.
5893 * expr.h (store_expr_with_bounds): Likewise.
5894 * function.c (use_register_for_decl): Likewise.
5895 (struct bounds_parm_data): Likewise.
5896 (assign_parms_augmented_arg_list): Likewise.
5897 (assign_parm_find_entry_rtl): Likewise.
5898 (assign_parm_is_stack_parm): Likewise.
5899 (assign_parm_load_bounds): Likewise.
5900 (assign_bounds): Likewise.
5901 (assign_parms): Likewise.
5902 (expand_function_start): Likewise.
5903 * gcc.c (CHKP_SPEC): Likewise.
5904 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5905 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5906 (wrestrict_dom_walker::check_call): Likewise.
5907 * gimple.c (gimple_build_call_from_tree): Likewise.
5908 * gimple.h (enum gf_mask): Likewise.
5909 (gimple_call_with_bounds_p): Likewise.
5910 (gimple_call_set_with_bounds): Likewise.
5911 * gimplify.c (gimplify_init_constructor): Likewise.
5912 * ipa-cp.c (initialize_node_lattices): Likewise.
5913 (propagate_constants_across_call): Likewise.
5914 (find_more_scalar_values_for_callers_subset): Likewise.
5915 * ipa-hsa.c (process_hsa_functions): Likewise.
5916 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5917 * ipa-icf.c (sem_function::merge): Likewise.
5918 * ipa-inline.c (early_inliner): Likewise.
5919 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5920 (warn_function_cold): Likewise.
5921 (propagate_pure_const): Likewise.
5922 * ipa-ref.h (enum GTY): Likewise.
5923 * ipa-split.c (find_retbnd): Likewise.
5924 (consider_split): Likewise.
5925 (split_function): Likewise.
5926 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5927 * ipa.c (walk_polymorphic_call_targets): Likewise.
5928 (symbol_table::remove_unreachable_nodes): Likewise.
5929 (process_references): Likewise.
5930 (cgraph_build_static_cdtor_1): Likewise.
5931 * lto-cgraph.c (lto_output_node): Likewise.
5932 (output_refs): Likewise.
5933 (compute_ltrans_boundary): Likewise.
5934 (input_overwrite_node): Likewise.
5935 (input_node): Likewise.
5936 (input_cgraph_1): Likewise.
5937 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5938 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5939 (class pass_chkp_instrumentation_passes): Likewise.
5940 (make_pass_chkp_instrumentation_passes): Likewise.
5941 * passes.def: Likewise.
5942 * rtl.h (struct GTY): Likewise.
5943 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5944 * stor-layout.c (layout_type): Likewise.
5945 * symtab.c: Likewise.
5946 * target.def: Likewise.
5947 * targhooks.c (default_chkp_bound_type): Likewise.
5948 (default_chkp_bound_mode): Likewise.
5949 (default_builtin_chkp_function): Likewise.
5950 (default_chkp_function_value_bounds): Likewise.
5951 (default_chkp_make_bounds_constant): Likewise.
5952 (default_chkp_initialize_bounds): Likewise.
5953 * targhooks.h (default_chkp_bound_type): Likewise.
5954 (default_chkp_bound_mode): Likewise.
5955 (default_builtin_chkp_function): Likewise.
5956 (default_chkp_function_value_bounds): Likewise.
5957 (default_chkp_make_bounds_constant): Likewise.
5958 (default_chkp_initialize_bounds): Likewise.
5959 * toplev.c (compile_file): Likewise.
5960 (process_options): Likewise.
5961 * tree-core.h (DEF_BUILTIN): Likewise.
5962 (DEF_BUILTIN_CHKP): Likewise.
5963 * tree-inline.c (declare_return_variable): Likewise.
5964 (remap_gimple_stmt): Likewise.
5965 (copy_bb): Likewise.
5966 (initialize_inlined_parameters): Likewise.
5967 (expand_call_inline): Likewise.
5968 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5969 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5970 (make_pass_ipa_chkp_produce_thunks): Likewise.
5971 (make_pass_chkp): Likewise.
5972 (make_pass_chkp_opt): Likewise.
5973 (make_pass_chkp_instrumentation_passes): Likewise.
5974 * tree-pretty-print.c (dump_generic_node): Likewise.
5975 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5976 * tree-ssa-dce.c (propagate_necessity): Likewise.
5977 (eliminate_unnecessary_stmts): Likewise.
5978 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5979 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5980 * tree-ssa-sccvn.h: Likewise.
5981 * tree-ssa-strlen.c (get_string_length): Likewise.
5982 (valid_builtin_call): Likewise.
5983 (adjust_last_stmt): Likewise.
5984 (handle_builtin_strchr): Likewise.
5985 (handle_builtin_strcpy): Likewise.
5986 (handle_builtin_stxncpy): Likewise.
5987 (handle_builtin_memcpy): Likewise.
5988 (handle_builtin_strcat): Likewise.
5989 (strlen_check_and_optimize_stmt): Likewise.
5990 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5991 * tree-streamer-in.c: Likewise.
5992 * tree-streamer.c (record_common_node): Likewise.
5993 * tree.c (tree_code_size): Likewise.
5994 (wide_int_to_tree_1): Likewise.
5995 (type_contains_placeholder_1): Likewise.
5996 (build_common_tree_nodes): Likewise.
5997 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5998 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5999 (POINTER_BOUNDS_P): Likewise.
6000 (BOUNDED_TYPE_P): Likewise.
6001 (BOUNDED_P): Likewise.
6002 (CALL_WITH_BOUNDS_P): Likewise.
6003 (pointer_bounds_type_node): Likewise.
6004 * value-prof.c (gimple_ic): Likewise.
6005 * var-tracking.c (vt_add_function_parameters): Likewise.
6006 * varasm.c (make_decl_rtl): Likewise.
6007 (assemble_start_function): Likewise.
6008 (output_constant): Likewise.
6009 (maybe_assemble_visibility): Likewise.
6010 * varpool.c (ctor_for_folding): Likewise.
6011 * chkp-builtins.def: Remove.
6012 * ipa-chkp.c: Remove.
6013 * ipa-chkp.h: Remove.
6014 * rtl-chkp.c: Remove.
6015 * rtl-chkp.h: Remove.
6016 * tree-chkp-opt.c: Remove.
6017 * tree-chkp.c: Remove.
6018 * tree-chkp.h: Remove.
6020 2018-06-07 Carl Love <cel@us.ibm.com>
6022 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6023 vextract_fp_from_shortl): Add BE support.
6025 2018-06-07 Paul Koning <ni1d@arrl.net>
6027 * compare-elim.c (try_merge_compare): Don't merge compare if
6028 address contains a side effect.
6029 (try_eliminate_compare): Likewise.
6031 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6033 * config.gcc: Support "tremont".
6034 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6035 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6037 * config/i386/i386.c (m_TREMONT): Define.
6038 (processor_target_table): Add "tremont".
6039 (PTA_TREMONT): Define.
6040 (ix86_lea_outperforms): Add TARGET_TREMONT.
6041 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6042 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6043 and M_INTEL_GOLDMONT_PLUS.
6044 (fold_builtin_cpu): Add "tremont".
6045 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6046 (ix86_option_override_internal): Add "tremont".
6047 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6048 (processor_type): Add PROCESSOR_TREMONT.
6049 * config/i386/x86-tune.def: Add m_TREMONT.
6050 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6052 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6054 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6055 symbol defined for msp430i* devices to be lower case.
6057 2018-06-07 Richard Biener <rguenther@suse.de>
6059 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6060 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6061 Properly wrap signed arithmetic if overflow wraps.
6063 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6065 PR tree-optimization/69615
6066 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6067 of a cast from a same precision integral SSA_NAME in a bb dominated
6068 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6069 cast to utype if rhs2 has already a compatible type.
6071 2018-06-07 Richard Biener <rguenther@suse.de>
6073 PR tree-optimization/85935
6074 * graphite-scop-detection.c (find_params_in_bb): Analyze
6075 condition operands with respect to the correct loop. Assert
6076 the analysis doesn't fail.
6078 2018-06-04 Carl Love <cel@us.ibm.com>
6080 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6081 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6082 as it is slightly cheaper.
6083 (first_match_or_eos_index_<mode>):
6084 Calculate index using natural element order.
6085 (first_match_index_<mode>):
6086 Calculate index using natural element order.
6087 (first_match_or_eos_index_<mode>):
6088 Calculate index using natural order.
6089 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6090 for BE and LE modes.
6091 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6092 P9V_BUILTIN_VCLZLSBB_V16QI.
6093 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6096 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6098 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6099 indentation and line wrap for many prototypes. Add missing
6100 @smallexample directives around block of prototypes for vec_xl and
6103 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6105 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6106 track if we pass or return IEEE 128-bit floating point.
6107 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6108 C++ mangling that is compatible with GCC 8.1.
6109 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6110 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6111 floating point types.
6112 (rs6000_function_arg_advance_1): Likewise.
6113 (rs6000_mangle_type): Optionally generate mangled names that match
6114 what GCC 8.1 generated for IEEE 128-bit floating point types.
6115 (rs6000_globalize_decl_name): If we have an external function that
6116 passes or returns IEEE 128-bit types, generate a weak reference
6117 from the mangled name used in GCC 8.1 to the current mangled
6119 (rs6000_init_builtins): Make __ibm128 use the long double type if
6120 long double is IBM extended double. Make __float128 use the long
6121 double type if long double is IEEE 128-bit.
6124 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6125 macro for __ibm128 built-in functions.
6126 (PACK_IF): Add __ibm128 pack/unpack functions.
6127 (UNPACK_IF): Likewise.
6128 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6129 enable long double built-in functions if long double is IEEE
6130 128-bit floating point.
6131 (rs6000_invalid_builtin): Update long double built-in function
6133 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6134 functions, adjust the built-in function to use the long double
6135 built-in function if __ibm128 and long double are the same type.
6136 * doc/extend.texi (PowerPC builtins): Update documention for
6137 __builtin_{,un}pack_longdouble. Add documentation for
6138 __builtin_{,un}pack_ibm128.
6140 2018-06-06 Jim Wilson <jimw@sifive.com>
6142 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6143 (struct machine_function): New field interrupt_mode.
6144 (riscv_handle_type_attribute): New function. Add forward declaration.
6145 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6146 (riscv_expand_epilogue): Check interrupt_mode field.
6147 (riscv_set_current_function): Check interrupt attribute args and
6148 set interrupt_mode field.
6149 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6150 (riscv_sret, riscv_uret): New.
6151 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6152 new arguments to interrupt attribute.
6154 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6157 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6158 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6160 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6162 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6163 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6164 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6165 several redundant entries.
6167 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6169 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6170 type from "rtx" to "rtx_insn *".
6171 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6172 for local "call_insn", removing cast.
6173 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6175 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6177 PR tree-optimization/86066
6178 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6179 for BIT_INSERT_EXPR stores.
6181 2018-06-06 Richard Biener <rguenther@suse.de>
6183 PR tree-optimization/86062
6184 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6185 component refs ontop
6186 of to be offsetted base.
6188 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6190 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6191 to be static and remove check on interrupt attribute name.
6193 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6195 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6196 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6198 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6201 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6203 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6204 Remove second argument, change how error is called.
6205 (aarch64_layout_arg): Remove second argument from
6206 aarch64_err_no_fpadvsimd call.
6207 (aarch64_init_cumulative_args): Ditto.
6208 (aarch64_gimplify_va_arg_expr): Ditto.
6209 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6211 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6213 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6214 (*simple_return_indirect_internal<mode>): Rename from
6215 simple_return_indirect_internal. Use W mode iterator.
6216 (rstorssp): New expander.
6217 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6218 (clrssbsy): New expander.
6219 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6221 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6223 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6225 (cmse_check_pointed_object): Likewise.
6227 2018-06-05 Martin Liska <mliska@suse.cz>
6229 PR gcov-profile/47618
6230 * doc/invoke.texi: Document how -fprofile-dir format
6233 2018-06-05 Richard Biener <rguenther@suse.de>
6235 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6236 removal pretend DOM info isn't available so we do not update
6237 it and only remove edges, not dominated blocks. Actually free
6238 DOM info in case we removed something. Remove unreachable blocks.
6239 (mfb_keep_latches): Work with either DOM info or marked backedges.
6240 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6241 first. Mark backedges if DOM info isn't available.
6242 (Re-)compute DOM info after cleanup_control_flow_pre.
6244 2018-06-05 Richard Biener <rguenther@suse.de>
6246 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6247 (locus_discrim_hasher::hash): Adjust.
6248 (locus_discrim_hasher::equal): Likewise.
6249 (next_discriminator_for_locus): Work on line directly.
6250 (same_line_p): Pass in expanded locus1 as well.
6251 (assign_discriminators): Avoid redundant location expansions.
6253 2018-06-05 Richard Biener <rguenther@suse.de>
6255 PR tree-optimization/86046
6256 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6257 if required after clearing TREE_ADDRESSABLE.
6259 2018-06-05 Richard Biener <rguenther@suse.de>
6261 PR tree-optimization/86047
6262 * tree-ssa-loop.c (for_each_index): Glob handling of all
6263 decls and constants and really handle all of them.
6265 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6268 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6269 qualifier_void_pointer and qualifier_const_void_pointer.
6270 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6271 (arm_init_builtins): Handle the above.
6272 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6273 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6274 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6277 2018-06-05 Martin Liska <mliska@suse.cz>
6279 * auto-profile.c (read_autofdo_file): Do not use
6280 gcov_ctr_summary struct.
6281 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6282 * coverage.c (struct counts_entry): Likewise.
6283 (read_counts_file): Read just single summary entry.
6284 (get_coverage_counts): Use gcov_summary struct.
6285 * coverage.h (get_coverage_counts): Likewise.
6286 * gcov-dump.c (dump_working_sets): Likewise.
6287 (tag_summary): Dump just single summary.
6288 * gcov-io.c (gcov_write_summary): Write just histogram
6290 (gcov_read_summary): Read just single summary.
6291 (compute_working_sets): Use gcov_summary struct.
6292 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6293 of GCOV_COUNTERS_SUMMABLE.
6294 (GCOV_COUNTERS_SUMMABLE): Remove.
6295 (GCOV_FIRST_VALUE_COUNTER): Replace with
6296 GCOV_COUNTER_V_INTERVAL.
6297 (struct gcov_ctr_summary): Remove.
6298 (struct gcov_summary): Directly use fields of former
6300 (compute_working_sets): Use gcov_summary struct.
6301 * gcov.c (read_count_file): Do not use ctrs fields.
6302 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6304 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6306 * profile.c: Likewise.
6307 * profile.h: Likewise.
6309 2018-06-05 Martin Liska <mliska@suse.cz>
6311 PR gcov-profile/84846
6312 * gcov.c (output_lines): Print working directory only
6313 in intermediate format.
6315 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6317 * config/s390/s390-builtin-types.def: Add void function type.
6318 * config/s390/s390-builtins.def: Use the function type for the
6321 2018-06-04 Jim Wilson <jimw@sifive.com>
6323 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6325 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6326 and maybe_eh_return. Change regno to unsigned int. Use new args to
6327 handle EH_RETURN_DATA_REGNO registers properly.
6328 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6329 (riscv_expand_epilogue): Update comment. Change argument name and
6330 type. Update code to use new name and type. Pass new args to
6331 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6333 * config/riscv/riscv.md (NORMAL_RETURN): New.
6334 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6335 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6336 (eh_return): Call gen_eh_return_internal and emit barrier.
6337 (eh_return_internal): Call riscv_expand_epilogue.
6339 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6341 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6342 bit_insertion field and declare can_be_merged_into method.
6343 (merged_store_group::can_be_merged_into): New method.
6344 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6345 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6346 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6348 2018-06-04 Richard Biener <rguenther@suse.de>
6350 PR tree-optimization/85955
6351 * builtins.c (fold_builtin_sincos): Convert pointers to
6352 destination to appropriate type before dereferencing.
6354 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6356 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6358 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6360 * expr.c (expand_expr_real_1): Force the operand into memory if
6361 its TYPE_MODE is BLKmode and if there is no integer mode for
6362 the number of bits being extracted.
6364 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6368 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6369 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6371 2018-06-04 Richard Biener <rguenther@suse.de>
6373 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6374 (cleanup_tree_cfg_noloop): ... single caller. Do
6375 start_recording_case_labels later.
6377 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6379 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6380 to _IMMINTRIN_H_INCLUDED.
6381 * config/i386/pconfigintrin.h: Ditto.
6382 * config/i386/waitpkgintrin.h: Ditto.
6383 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6384 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6385 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6386 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6387 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6388 waitpkgintrin.h and cldemoteintrin.h.
6390 2018-06-04 Richard Biener <rguenther@suse.de>
6392 PR tree-optimization/86038
6393 * tracer.c (find_best_successor): Check probability for
6394 being initialized, bail out if not.
6396 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6399 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6400 of bits to ignore when comparing architectures.
6402 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6404 PR tree-optimization/69615
6405 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6406 maximum or minimum of the type, try to merge it also as if
6407 range1 is + [-, x - 1] or + [x + 1, -].
6410 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6412 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6414 PR tree-optimization/86034
6415 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6416 the unsigned bitfield type in a bit insertion sequence if it does not
6417 have a larger precision than the bitfield size.
6418 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6420 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6422 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6424 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6426 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6427 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6428 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6429 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6431 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6433 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6434 Disable -fdelete-null-pointer-checks for ELF toolchain.
6436 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6437 Kito Cheng <kito.cheng@gmail.com>
6439 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6440 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6441 (nds32*-*-*): Add glibc and uclibc conditions.
6442 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6443 (TARGET_EXCEPT_UNWIND_INFO): Define.
6444 * config/nds32/elf.h: New file.
6445 * config/nds32/linux.h: New file.
6446 * config/nds32/nds32-elf.opt: New file.
6447 * config/nds32/nds32-linux.opt: New file.
6448 * config/nds32/nds32-fp-as-gp.c
6449 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6450 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6452 (nds32_asm_file_end): Ditto.
6453 (nds32_print_operand): Ditto.
6454 (nds32_insert_attributes): Ditto.
6455 (nds32_init_libfuncs): New function.
6456 (TARGET_HAVE_TLS): Define.
6457 (TARGET_INIT_LIBFUNCS): Define.
6458 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6460 (TARGET_ELF): Apply different mcmodel setting.
6461 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6462 been migrated into elf.h and linux.h files.
6463 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6464 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6465 (mcmodel): The content has been migrated into nds32-elf.opt and
6466 nds32-linux.opt files.
6467 * config/nds32/t-elf: New file.
6468 * config/nds32/t-linux: New file.
6470 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6471 Shiva Chen <shiva0217@gmail.com>
6473 * config/nds32/constants.md (unspec_volatile_element): Add
6474 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6475 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6477 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6478 (make_pass_nds32_fp_as_gp): Declare.
6479 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6481 (nds32_asm_function_end_prologue): Remove unused asm output.
6482 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6483 (nds32_asm_file_start): Output necessary fp_as_gp information.
6484 (nds32_option_override): Adjust register usage.
6485 (nds32_expand_prologue): Consider fp_as_gp situation.
6486 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6487 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6490 (simple_return): Ditto.
6491 (omit_fp_begin): Output special directive for fp_as_gp.
6492 (omit_fp_end): Output special directive for fp_as_gp.
6493 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6494 mforbid-fp-as-gp): New options.
6496 2018-06-01 Mark Wielaard <mark@klomp.org>
6498 * dwarf2out.c (dwarf2out_finish): Remove generation of
6499 DW_AT_loclists_base.
6501 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6503 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6504 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6505 (struct merged_store_group): Add bit_insertion field.
6506 (dump_char_array): Use standard hexadecimal format.
6507 (merged_store_group::merged_store_group): Set bit_insertion to false.
6508 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6509 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6510 also print the mask in the dump file.
6511 (pass_store_merging::gate): Minor tweak.
6512 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6513 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6514 stores with INTEGER_CST stores.
6515 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6516 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6517 and use it throughout. Generate bit insertion sequences if need be.
6518 (pass_store_merging::process_store): Remove redundant condition.
6519 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6521 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6523 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6524 the 128-bit floating point types. Fix function comment.
6526 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6528 * config/aarch64/aarch64-simd.md
6529 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6531 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6534 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6536 PR tree-optimization/85989
6537 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6539 (backprop::intersect_uses): Check it when deciding whether this
6540 is a backedge reference.
6541 (backprop::process_block): Add each phi to m_visited_phis
6542 after visiting it, then clear it at the end.
6544 2018-06-01 Richard Biener <rguenther@suse.de>
6546 * tree-vectorizer.h (vect_dr_stmt): New function.
6547 (vect_get_load_cost): Adjust.
6548 (vect_get_store_cost): Likewise.
6549 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6550 Use vect_dr_stmt instead of DR_SMTT.
6551 (vect_record_base_alignments): Likewise.
6552 (vect_calculate_target_alignment): Likewise.
6553 (vect_compute_data_ref_alignment): Likewise and make static.
6554 (vect_update_misalignment_for_peel): Likewise.
6555 (vect_verify_datarefs_alignment): Likewise.
6556 (vector_alignment_reachable_p): Likewise.
6557 (vect_get_data_access_cost): Likewise. Pass down
6558 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6559 (vect_get_peeling_costs_all_drs): Likewise.
6560 (vect_peeling_hash_get_lowest_cost): Likewise.
6561 (vect_enhance_data_refs_alignment): Likewise.
6562 (vect_find_same_alignment_drs): Likewise.
6563 (vect_analyze_data_refs_alignment): Likewise.
6564 (vect_analyze_group_access_1): Likewise.
6565 (vect_analyze_group_access): Likewise.
6566 (vect_analyze_data_ref_access): Likewise.
6567 (vect_analyze_data_ref_accesses): Likewise.
6568 (vect_vfa_segment_size): Likewise.
6569 (vect_small_gap_p): Likewise.
6570 (vectorizable_with_step_bound_p): Likewise.
6571 (vect_prune_runtime_alias_test_list): Likewise.
6572 (vect_analyze_data_refs): Likewise.
6573 (vect_supportable_dr_alignment): Likewise.
6574 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6575 (vect_gen_prolog_loop_niters): Likewise.
6576 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6577 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6579 (vect_recog_mask_conversion_pattern): Likewise.
6580 (vect_try_gather_scatter_pattern): Likewise.
6581 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6582 to vect_get_store_cost.
6583 (vect_get_store_cost): Get stmt_info instead of DR.
6584 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6585 (vect_get_load_cost): Get stmt_info instead of DR.
6587 2018-06-01 Richard Biener <rguenther@suse.de>
6590 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6591 vars wrapped in MEM_REFs.
6593 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6595 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6596 Fix subreg tests so that we only return a choice between
6597 GENERAL_REGS and FP_REGS if the original classes included both.
6599 2018-06-01 Richard Biener <rguenther@suse.de>
6602 * tree-ssa-structalias.c (get_function_part_constraint):
6603 Handle NULL fi->decl.
6604 (find_func_aliases_for_call): Properly handle indirect
6605 fi from direct call.
6606 (find_func_clobbers): Likewise.
6607 (ipa_pta_execute): Likewise.
6608 (create_variable_info_for): For functions that are ifunc_resolver
6609 resolve to a varinfo that contains the result of the resolver call.
6610 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6613 2018-05-31 Michael Collison <michael.collison@arm.com>
6615 * config/aarch64/aarch64.md:
6616 (*fix_to_zero_extenddfdi2): New pattern.
6617 * gcc.target/aarch64/fix_extend1.c: New testcase.
6619 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6623 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6624 and BUILT_IN_STRNCMP_EQ.
6625 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6626 BUILT_IN_STRNCMP_EQ.
6627 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6628 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6629 (gimple_fold_builtin): Likewise.
6630 * tree-ssa-strlen.c (compute_string_length): New function.
6631 (determine_min_obsize): New function.
6632 (handle_builtin_string_cmp): New function to handle calls to
6633 string compare functions.
6634 (strlen_optimize_stmt): Add handling to builtin string compare
6636 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6637 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6638 * tree.c (build_common_builtin_nodes): Add new defines of
6639 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6641 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6644 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6645 functions with naked attribute.
6647 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6649 * config/i386/sse.md (avx_vec_concat<mode>):
6650 Substitute concat_tg_mode mode attribute with xtg_mode.
6651 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6652 (concat_tg_mode): Remove mode attribute.
6654 2018-05-31 Martin Sebor <msebor@redhat.com>
6657 * calls.c (alloc_max_size): Correct a logic error/typo.
6658 Treat excessive arguments as infinite. Warn for invalid arguments.
6659 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6661 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6664 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6665 and movx for Haswell.
6667 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6668 Cesar Philippidis <cesar@codesourcery.com>
6671 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6672 when emitting error on private/firstprivate reductions.
6673 * omp-low.c (lower_omp_target): Avoid reference-type processing
6674 on pointers for firstprivate clause.
6676 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6678 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6681 * config/aarch64/aarch64-simd.md
6682 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6683 (aarch64_ld1_x3_<mode>): Likewise
6684 (aarch64_st1x2<VALLDIF:mode>): Likewise
6685 (aarch64_st1_x2_<mode>): Likewise
6686 (aarch64_st1x3<VALLDIF:mode>): Likewise
6687 (aarch64_st1_x3_<mode>): Likewise
6688 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6689 (vld1_s8_x3): Likewise.
6690 (vld1_u16_x3): Likewise.
6691 (vld1_s16_x3): Likewise.
6692 (vld1_u32_x3): Likewise.
6693 (vld1_s32_x3): Likewise.
6694 (vld1_u64_x3): Likewise.
6695 (vld1_s64_x3): Likewise.
6696 (vld1_f16_x3): Likewise.
6697 (vld1_f32_x3): Likewise.
6698 (vld1_f64_x3): Likewise.
6699 (vld1_p8_x3): Likewise.
6700 (vld1_p16_x3): Likewise.
6701 (vld1_p64_x3): Likewise.
6702 (vld1q_u8_x3): Likewise.
6703 (vld1q_s8_x3): Likewise.
6704 (vld1q_u16_x3): Likewise.
6705 (vld1q_s16_x3): Likewise.
6706 (vld1q_u32_x3): Likewise.
6707 (vld1q_s32_x3): Likewise.
6708 (vld1q_u64_x3): Likewise.
6709 (vld1q_s64_x3): Likewise.
6710 (vld1q_f16_x3): Likewise.
6711 (vld1q_f32_x3): Likewise.
6712 (vld1q_f64_x3): Likewise.
6713 (vld1q_p8_x3): Likewise.
6714 (vld1q_p16_x3): Likewise.
6715 (vld1q_p64_x3): Likewise.
6716 (vst1_s64_x2): Likewise.
6717 (vst1_u64_x2): Likewise.
6718 (vst1_f64_x2): Likewise.
6719 (vst1_s8_x2): Likewise.
6720 (vst1_p8_x2): Likewise.
6721 (vst1_s16_x2): Likewise.
6722 (vst1_p16_x2): Likewise.
6723 (vst1_s32_x2): Likewise.
6724 (vst1_u8_x2): Likewise.
6725 (vst1_u16_x2): Likewise.
6726 (vst1_u32_x2): Likewise.
6727 (vst1_f16_x2): Likewise.
6728 (vst1_f32_x2): Likewise.
6729 (vst1_p64_x2): Likewise.
6730 (vst1q_s8_x2): Likewise.
6731 (vst1q_p8_x2): Likewise.
6732 (vst1q_s16_x2): Likewise.
6733 (vst1q_p16_x2): Likewise.
6734 (vst1q_s32_x2): Likewise.
6735 (vst1q_s64_x2): Likewise.
6736 (vst1q_u8_x2): Likewise.
6737 (vst1q_u16_x2): Likewise.
6738 (vst1q_u32_x2): Likewise.
6739 (vst1q_u64_x2): Likewise.
6740 (vst1q_f16_x2): Likewise.
6741 (vst1q_f32_x2): Likewise.
6742 (vst1q_f64_x2): Likewise.
6743 (vst1q_p64_x2): Likewise.
6744 (vst1_s64_x3): Likewise.
6745 (vst1_u64_x3): Likewise.
6746 (vst1_f64_x3): Likewise.
6747 (vst1_s8_x3): Likewise.
6748 (vst1_p8_x3): Likewise.
6749 (vst1_s16_x3): Likewise.
6750 (vst1_p16_x3): Likewise.
6751 (vst1_s32_x3): Likewise.
6752 (vst1_u8_x3): Likewise.
6753 (vst1_u16_x3): Likewise.
6754 (vst1_u32_x3): Likewise.
6755 (vst1_f16_x3): Likewise.
6756 (vst1_f32_x3): Likewise.
6757 (vst1_p64_x3): Likewise.
6758 (vst1q_s8_x3): Likewise.
6759 (vst1q_p8_x3): Likewise.
6760 (vst1q_s16_x3): Likewise.
6761 (vst1q_p16_x3): Likewise.
6762 (vst1q_s32_x3): Likewise.
6763 (vst1q_s64_x3): Likewise.
6764 (vst1q_u8_x3): Likewise.
6765 (vst1q_u16_x3): Likewise.
6766 (vst1q_u32_x3): Likewise.
6767 (vst1q_u64_x3): Likewise.
6768 (vst1q_f16_x3): Likewise.
6769 (vst1q_f32_x3): Likewise.
6770 (vst1q_f64_x3): Likewise.
6771 (vst1q_p64_x3): Likewise.
6773 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6775 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6776 user_label_prefix to name.
6778 * tree-core.h: Update comment about the format of NAME string
6779 passed to handler in attribute_spec.
6781 * config/msp430/msp430.md: Remove erroneous subreg expression from
6782 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6783 zero_extend{q,h}isi2.
6785 2018-05-30 Borislav Petkov <bp@suse.de>
6787 * doc/extend.texi: Document some architecture specific
6788 constraints and sort entries.
6790 2018-05-30 Martin Sebor <msebor@redhat.com>
6793 * builtins.c (expand_builtin_stpcpy_1): New function.
6794 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6795 only if the former succeeds.
6797 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6799 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6802 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6804 * doc/invoke.texi (-flinker-output): Document
6806 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6808 * passes.c (ipa_write_summaries): Only modify statements if body
6810 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6811 incrementally linking.
6812 (ipa_passes): Likewise.
6813 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6814 pass down resolution info.
6815 * common.opt (flag_incremental_link): Update info.
6816 * gcc.c (plugin specs): Turn flinker-output=* to
6817 -plugin-opt=-linker-output-known
6818 * toplev.c (compile_file): Also cut compilation when doing incremental
6820 * flag-types. (enum lto_partition_model): Add
6821 LTO_LINKER_OUTPUT_NOLTOREL.
6822 (invoke.texi): Add -flinker-output docs.
6823 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6824 link same way as WPA; do not stream in dead initializers.
6826 * dwarf2out.c (dwarf2out_die_ref_for_decl,
6827 darf2out_register_external_decl): Support incremental link.
6829 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6831 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6833 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6835 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6836 it down to simple_object_copy_lto_debug_sections.
6837 (run_gcc): Determine incremental LTO link time and configure
6838 lto1 into non-wpa mode, disable renaming of debug sections.
6840 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
6842 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6843 descriptions of various incorrectly documented functions.
6845 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
6848 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6849 address check not strict.
6851 2018-05-30 Richard Biener <rguenther@suse.de>
6853 PR tree-optimization/85964
6854 * tracer.c (better_p): Drop initialized count check, we only
6855 call the function with initialized counts now.
6856 (find_best_successor): Do find a best edge if one
6857 has uninitialized count.
6858 (find_best_predecessor): Likewise. Do BB frequency check only
6859 if count is initialized.
6861 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
6863 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6864 (aarch64_ldrstr_offset_compare): New.
6865 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6866 load/store orderings.
6867 (aarch64_gen_adjusted_ldpstp): Likewise.
6869 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
6871 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6872 Check for subset of GENERAL_REGS and FP_REGS.
6873 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6876 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
6878 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6879 and wi::to_poly_offset. Add the current offset and then check
6880 whether the sum fits, rather than using an unchecked addition of
6881 a checked term. Check for a shwi rather than a uhwi.
6882 * expr.c (get_bit_range): Use tree_to_poly_uint64.
6883 (store_constructor): Use poly_int_tree_p.
6884 (expand_expr_real_1): Likewise.
6885 * function.c (assign_temp): Likewise.
6886 * fold-const.c (const_binop): Use poly_int_tree_p and
6888 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
6890 * ipa-icf-gimple.c (func_checker::compare_operand): Use
6891 to_poly_offset for MEM offsets.
6892 * ipa-icf.c (sem_variable::equals): Likewise.
6893 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6894 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6895 wi::to_poly_offset for BIT_FIELD_REF offsets.
6896 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6898 * var-tracking.c (emit_note_insn_var_location): Use
6899 tree_to_poly_uint64.
6901 2018-05-29 Jim Wilson <jimw@sifive.com>
6903 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6905 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6908 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6909 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6911 (sse4_1_round<mode>2): Use nonimmediate_operand
6912 for operand 1 predicate.
6914 2018-05-29 Martin Sebor <msebor@redhat.com>
6915 Richard Biener <rguenther@suse.de>
6918 * calls.c (get_size_range): Call determine_value_range instead
6919 of get_value_range..
6920 * tree-vrp.h (determine_value_range): Declared new function.
6921 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6923 2018-05-29 Richard Biener <rguenther@suse.de>
6925 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6926 sure to use non-pattern stmts for get_earlier_stmt arguments.
6927 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6928 called on pattern stmts.
6929 (get_later_stmt): Likewise.
6931 2018-05-29 Martin Liska <mliska@suse.cz>
6933 PR gcov-profile/85759
6934 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6937 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6939 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6941 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6945 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6946 VEC_PACK_FLOAT_EXPR): New tree codes.
6947 * tree-pretty-print.c (op_code_prio): Handle
6948 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6949 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6950 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6951 * tree-inline.c (estimate_operator_cost): Likewise.
6952 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6953 * fold-const.c (const_binop): Likewise.
6954 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6955 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6956 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6957 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6958 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6959 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6960 * expr.c (expand_expr_real_2): Likewise.
6961 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6962 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6963 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6965 * optabs.c (expand_widen_pattern_expr): For
6966 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6967 sign from result type rather than operand's type.
6968 (expand_binop_directly): For vec_packu_float_optab and
6969 vec_packs_float_optab allow result type to be different from operand's
6971 * optabs-tree.c (optab_for_tree_code): Handle
6972 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6973 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6974 * tree-vect-generic.c (expand_vector_operations_1): Handle
6975 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6976 VEC_PACK_FLOAT_EXPR.
6977 * tree-vect-stmts.c (supportable_widening_operation): Handle
6979 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6980 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6981 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6982 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6983 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6985 (vec_pack<floatprefix>_float_<mode>): New expander.
6986 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6988 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6989 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6990 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6991 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6992 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6994 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6995 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6996 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6997 VEC_PACK_FLOAT_EXPR): Document.
6999 2018-05-29 Richard Biener <rguenther@suse.de>
7001 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7003 (stmt_vec_info_vec): Make pointer.
7004 (init_stmt_vec_info_vec): Remove.
7005 (free_stmt_vec_info_vec): Likewise.
7006 (set_stmt_vec_info_vec): New function.
7007 (free_stmt_vec_infos): Likewise.
7008 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7009 (set_vinfo_for_stmt): Likewise.
7010 (get_earlier_stmt): Likewise.
7011 (get_later_stmt): Likewise.
7012 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7013 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7014 (vec_info::~vec_info): Free stmt_vec_infos.
7015 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7016 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7017 (pass_slp_vectorize::execute): Likewise.
7018 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7019 (free_stmt_vec_info_vec): Likewise.
7020 (set_stmt_vec_info_vec): New function.
7021 (free_stmt_vec_infos): Likewise.
7022 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7023 the global stmt_vec_info_vec.
7024 * tree-parloops.c (gather_scalar_reductions): Use
7025 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7028 2018-05-29 Richard Biener <rguenther@suse.de>
7030 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7032 2018-05-29 Martin Liska <mliska@suse.cz>
7033 David Malcolm <dmalcolm@redhat.com>
7035 * vec.c (test_reverse): New.
7036 (vec_c_tests): Add new test.
7037 * vec.h (vl_ptr>::reverse): New function.
7039 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7041 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7043 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7046 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7048 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7050 2018-05-28 Richard Biener <rguenther@suse.de>
7052 PR tree-optimization/85933
7053 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7054 look at stmts marked as vectorizable.
7056 2018-05-28 Richard Biener <rguenther@suse.de>
7058 PR tree-optimization/85934
7059 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7060 vector boolean check before scalar optimization.
7062 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7064 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7067 2018-05-28 Mark Wielaard <mark@klomp.org>
7069 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7070 if it is an expression containing a minus sign.
7072 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7074 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7076 2018-05-27 Paul Koning <ni1d@arrl.net>
7078 * config/pdp11/pdp11.md (truncsihi2): Remove.
7080 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7081 Chung-Ju Wu <jasonwucj@gmail.com>
7083 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7085 (unaligned_store_dw): Ditto.
7086 * config/nds32/nds32-memory-manipulation.c
7087 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7088 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7089 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7090 (emit_setmem_word_loop): Rename to ...
7091 (emit_setmem_doubleword_loop): ... this.
7092 (nds32_gen_dup_4_byte_to_word_value): New function.
7093 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7094 (nds32_expand_setmem_loop): Refine implementation.
7095 (nds32_expand_setmem_loop_v3m): Ditto.
7096 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7099 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7101 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7103 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7105 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7106 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7107 machine->attr_no_prologue_p.
7108 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7109 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7110 (nds32_expand_epilogue): Consider attr_naked_p.
7111 (nds32_expand_epilogue_v3pop): Likewise.
7112 (nds32_can_use_return_insn): Likewise.
7113 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7114 attr_no_prologue_p fields.
7115 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7117 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7120 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7122 * config/i386/sse.md
7123 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7125 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7127 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7129 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7131 (*<floatsuffix>floatv2div2sf2): Rename to ...
7132 (*float<floatunssuffix>v2div2sf2): ... this.
7133 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7134 (float<floatunssuffix>v2div2sf2_mask): ... this.
7135 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7136 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7137 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7139 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7141 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7143 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7145 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7147 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7149 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7150 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7151 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7152 gen_ufix_truncv8dfv8si2.
7153 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7154 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7155 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7156 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7157 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7158 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7159 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7160 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7162 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7166 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7168 2018-05-25 Jim Wilson <jimw@sifive.com>
7170 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7171 * config/riscv/riscv.c (struct machine_function): Add
7172 interrupt_handler_p and attribute_checked_p fields.
7173 (riscv_attribute_table): Add interrupt.
7174 (riscv_interrupt_type_p): New.
7175 (riscv_save_reg_p): Save extra regs for interrupt handler.
7176 (riscv_use_save_libcall): Return false for interrupt handler.
7177 (riscv_first_stack_step): Add forward declaration.
7178 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7179 for interrupt handler with large frame. Use it for saved reg list.
7180 (riscv_expand_prologue): Move flag_stack_usage_info support to
7181 eliminate duplication.
7182 (riscv_expand_epilogue): Generate mret for interrupt handler.
7183 (riscv_epilogue_uses): New.
7184 (riscv_can_use_return_insn): Return false for interrupt handler.
7185 (riscv_function_ok_for_sibcall): Likewise.
7186 (riscv_set_current_function): Add interrupt handler support.
7187 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7188 * config/riscv/riscv.md (UNSPECV_MRET): New.
7190 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7192 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7194 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7196 PR tree-optimization/85712
7197 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7198 this candidate has already been replaced in-situ by a copy.
7200 2018-05-25 Jason Merrill <jason@redhat.com>
7202 PR c++/80485 - inline function non-zero address.
7203 * symtab.c (nonzero_address): Check DECL_COMDAT.
7205 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7208 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7209 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7210 extension of SImode operation. Use const123_operand predicate.
7211 (*saddsi_1): Remove.
7212 (*saddl_se_1): Ditto.
7214 (*ssubl_se_1): Ditto.
7215 * config/alpha/predicates.md (const123_operand): New predicate.
7216 * config/alpha/constraints.md (P): Use IN_RANGE.
7218 2018-05-25 Richard Biener <rguenther@suse.de>
7220 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7222 (ref_maybe_used_by_stmt_p): Likewise.
7223 (stmt_may_clobber_ref_p): Likewise.
7224 (stmt_may_clobber_ref_p_1): Likewise.
7225 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7227 (ref_maybe_used_by_stmt_p): Likewise.
7228 (stmt_may_clobber_ref_p): Likewise.
7229 (stmt_may_clobber_ref_p_1): Likewise.
7230 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7231 the alias oracle to disambiguate DRs with stmts DR analysis
7233 (vect_analyze_data_refs): Do not give up on not analyzable
7234 DRs for BB vectorization. Remove code truncating the dataref
7237 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7240 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7241 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7242 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7244 2018-05-25 Richard Biener <rguenther@suse.de>
7246 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7247 function, combining stmt data ref gathering and fatal analysis
7249 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7250 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7251 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7252 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7253 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7255 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7257 PR tree-optimization/85720
7258 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7259 SCC if all partitions are builtins.
7260 (version_loop_by_alias_check): New parameter. Generate cancelable
7261 runtime alias check if all partitions are builtins.
7262 (distribute_loop): Update call to above function.
7264 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7266 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7267 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7268 (parm_default_def_partition_arg): Ditto.
7269 (set_parm_default_def_partition): Ditto.
7270 (get_parm_default_def_partitions): Ditto and make it static.
7271 (get_undefined_value_partitions): Ditto and make it static.
7272 (remove_ssa_form): Refactor call to init_var_map here.
7273 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7274 computation for loop region.
7275 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7276 (register_default_def): Delete.
7277 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7278 (parm_default_def_partition_arg): Ditto.
7279 (set_parm_default_def_partition): Ditto.
7280 (get_parm_default_def_partitions): Ditto and make it static.
7281 (get_undefined_value_partitions): Ditto and make it static.
7282 (coalesce_with_default, coalesce_with_default): Update comment.
7283 (create_coalesce_list_for_region): New func factored out from
7284 create_outofssa_var_map.
7285 (populate_coalesce_list_for_outofssa): New func factored out from
7286 create_outofssa_var_map and coalesce_ssa_name.
7287 (create_outofssa_var_map): Delete.
7288 (coalesce_ssa_name): Refactor to support live range computation.
7289 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7290 (get_parm_default_def_partitions): Delete.
7291 (get_undefined_value_partitions): Ditto.
7292 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7293 computation for loop region.
7294 (new_tree_live_info, loe_visit_block): Ditto.
7295 (live_worklist, set_var_live_on_entry): Ditto.
7296 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7297 * tree-ssa-live.h (struct _var_map): New fields.
7298 (init_var_map): Change decl.
7299 (region_contains_p): New.
7301 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7303 * tree-ssa-live.h (live_merge_and_clear): Delete.
7305 2018-05-25 Richard Biener <rguenther@suse.de>
7308 * tree-dump.c (dequeue_and_dump): Remove access to removed
7309 operand 2 of a SWITCH_EXPR.
7311 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7313 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7314 multiplication and division.
7315 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7316 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7317 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7318 (cond_udiv_optab, cond_umod_optab): New optabs.
7319 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7320 (IFN_COND_RDIV): New internal functions.
7321 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7322 TRUNC_MOD_EXPR and RDIV_EXPR.
7323 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7324 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7326 (SVE_INT_BINARY): Include mult.
7327 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7328 (optab, sve_int_op): Handle mult.
7329 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7331 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7332 for SVE_INT_BINARY_SD.
7334 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7336 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7337 (optab, sve_int_op): Handle div and udiv.
7338 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7339 for SVE_INT_BINARY_SD.
7340 (*<optab><mode>3): New insn for the same.
7342 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7344 * tree-vect-patterns.c: Include predict.h.
7345 (vect_recog_divmod_pattern): Restrict check for division support
7346 to when optimizing for size.
7348 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7350 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7351 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7352 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7353 (gimple_match_op::set_op): Likewise.
7354 (gimple_resimplify4): Declare.
7355 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7356 (expr::gen_transform): Likewise.
7357 (decision_tree::gen): Generate a simplification routine for 4 operands.
7358 * gimple-match-head.c (gimple_simplify): Add an overload for
7359 4 operands. In the top-level function, handle up to 4 call
7360 arguments and call gimple_resimplify4.
7361 (gimple_resimplify4): New function.
7362 (build_call_internal): Pass a fourth operand.
7363 (maybe_push_to_seq): Likewise.
7364 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7365 Fold VEC_COND_EXPRs of an operation and a default value into
7366 an IFN_COND_* function if possible.
7367 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7369 (SVE_COND_FP_BINARY): Include them.
7370 (optab, sve_fp_op): Handle them.
7371 (SVE_INT_BINARY_REV): New code iterator.
7372 (SVE_COND_FP_BINARY_REV): New int iterator.
7373 (commutative): New int attribute.
7374 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7376 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7378 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7379 (*cond_<optab><mode>): New patterns for reversed operands.
7381 2018-05-25 Richard Biener <rguenther@suse.de>
7383 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7384 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7385 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7386 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7387 * tree-vect-data-refs.c (everywhere): Adjust users.
7388 * tree-vect-loop.c (everywhere): Likewise.
7389 * tree-vect-slp.c (everywhere): Likewise.
7390 * tree-vect-stmts.c (everywhere): Likewise.
7391 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7393 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7395 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7397 (gcc_cv_as_section_exclude): ... this.
7398 Try Solaris as #exclude syntax.
7399 * configure: Regenerate.
7400 * config.in: Regenerate.
7401 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7403 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7404 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7406 * varasm.c (default_elf_asm_named_section): Don't check if
7407 HAVE_GAS_SECTION_EXCLUDE is defined.
7409 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7411 * doc/md.texi: Update the documentation of the cond_* optabs
7412 to mention the new final operand. Fix GET_MODE_NUNITS call.
7413 Describe the scalar case too.
7414 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7415 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7417 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7418 (get_conditional_internal_fn): Update comment.
7419 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7420 accumulator value as a final argument to conditional functions.
7421 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7422 a define_expand and add an "else" operand. Assert for now that
7423 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7424 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7425 (*cond_<optab><mode>): New patterns.
7426 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7427 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7428 (UNSPEC_COND_EOR): Delete.
7429 (optab): Remove associated mappings.
7430 (SVE_INT_BINARY): New code iterator.
7431 (sve_int_op): Remove int attribute and add "minus" to the code
7433 (SVE_COND_INT_OP): Delete.
7434 (SVE_COND_FP_OP): Rename to...
7435 (SVE_COND_FP_BINARY): ...this.
7437 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7439 * optabs.c (can_reuse_operands_p): New function.
7440 (maybe_legitimize_operands): Try to reuse the results for
7443 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7445 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7446 Add {q} suffix to insn mnemonic.
7448 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7450 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7451 (msp430_warn_func_return): New.
7453 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7455 * fold-const.c (tree_nonzero_bits): New function.
7456 * fold-const.h (tree_nonzero_bits): Likewise.
7457 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7458 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7460 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7464 * varasm.c (assemble_alias): Check ifunc_resolver only on
7467 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7470 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7471 when memory input operand is handled.
7473 2018-05-24 Luis Machado <luis.machado@linaro.org>
7475 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7477 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7479 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7481 * match.pd: Delay FMA folds until after vectorization.
7483 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7486 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7487 address check not strict.
7489 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7491 * gimple-match.h (gimple_match_op): New class.
7492 (mprts_hook): Replace parameters with a gimple_match_op *.
7493 (maybe_build_generic_op): Likewise.
7494 (gimple_simplified_result_is_gimple_val): Replace parameters with
7495 a const gimple_match_op *.
7496 (gimple_simplify): Replace code_helper * and tree * parameters with
7497 a gimple_match_op * parameter.
7498 (gimple_resimplify1): Replace code_helper *, tree and tree *
7499 parameters with a gimple_match_op * parameter.
7500 (gimple_resimplify2): Likewise.
7501 (gimple_resimplify3): Likewise.
7502 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7503 parameters with a gimple_match_op * parameter.
7504 * gimple-match-head.c (gimple_simplify): Change prototypes of
7505 auto-generated functions to take a gimple_match_op * instead of
7506 separate code_helper * and tree * parameters. Make the same
7507 change in the top-level overload and update calls to the
7508 gimple_resimplify routines. Update calls to the auto-generated
7509 functions and to maybe_push_res_to_seq in the publicly-facing
7510 operation-specific gimple_simplify overloads.
7511 (gimple_match_op::MAX_NUM_OPS): Define.
7512 (gimple_resimplify1): Replace rcode and ops with a single res_op
7513 parameter. Update call to gimple_simplify.
7514 (gimple_resimplify2): Likewise.
7515 (gimple_resimplify3): Likewise.
7516 (mprts_hook): Replace parameters with a gimple_match_op *.
7517 (maybe_build_generic_op): Likewise.
7518 (build_call_internal): Replace type, nargs and ops with
7519 a gimple_match_op *.
7520 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7521 with a single gimple_match_op *. Update calls to mprts_hook,
7522 build_call_internal and gimple_simplified_result_is_gimple_val.
7523 Factor out code that is common to the tree_code and combined_fn cases.
7524 * genmatch.c (expr::gen_transform): Replace tem_code and
7525 tem_ops with a gimple_match_op called tem_op. Update calls
7526 to the gimple_resimplify functions and maybe_push_res_to_seq.
7527 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7528 res_ops. Update call to the gimple_resimplify functions.
7529 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7530 (decision_tree::gen): Make the functions take a gimple_match_op *
7531 called res_op instead of separate res_code and res_ops parameters.
7532 Update call accordingly.
7533 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7534 and ops with a single res_op parameter. Update calls to
7535 maybe_build_generic_op and maybe_push_res_to_seq.
7536 (fold_stmt_1): Update calls to gimple_simplify and
7537 replace_stmt_with_simplification.
7538 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7539 and gimple_simplified_result_is_gimple_val.
7540 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7542 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7543 with a gimple_match_op *.
7544 (vn_nary_build_or_lookup): Likewise. Update call to
7545 vn_nary_build_or_lookup_1.
7546 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7547 gimple_match_op *. Update calls to the gimple_resimplify routines
7548 and to gimple_simplified_result_is_gimple_val.
7549 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7550 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7551 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7552 (visit_nary_op): Likewise.
7553 (visit_reference_op_load): Likewise.
7555 2018-05-23 Luis Machado <luis.machado@linaro.org>
7557 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7558 modifier for printing the step amount.
7560 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7563 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7566 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7568 * doc/sourcebuild.texi (Endianness): New subsubsection.
7570 2018-05-23 Luis Machado <luis.machado@linaro.org>
7572 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7573 <prefetch_dynamic_strides>: New const bool field.
7574 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7575 prefetch_dynamic_strides.
7576 (exynosm1_prefetch_tune): Likewise.
7577 (thunderxt88_prefetch_tune): Likewise.
7578 (thunderx_prefetch_tune): Likewise.
7579 (thunderx2t99_prefetch_tune): Likewise.
7580 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7582 (aarch64_override_options_internal): Update to set
7583 PARAM_PREFETCH_DYNAMIC_STRIDES.
7584 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7585 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7586 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7587 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7588 prefetch-dynamic-strides setting.
7590 2018-05-23 Luis Machado <luis.machado@linaro.org>
7592 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7593 <minimum_stride>: New const int field.
7594 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7595 minimum_stride field defaulting to -1.
7596 (exynosm1_prefetch_tune): Likewise.
7597 (thunderxt88_prefetch_tune): Likewise.
7598 (thunderx_prefetch_tune): Likewise.
7599 (thunderx2t99_prefetch_tune): Likewise.
7600 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7601 <default_opt_level>: Set to 3.
7602 (aarch64_override_options_internal): Update to set
7603 PARAM_PREFETCH_MINIMUM_STRIDE.
7604 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7605 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7606 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7607 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7608 stride is constant and is below the minimum stride threshold.
7610 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7612 * config/arm/arm-cpus.in (mode26): Delete.
7613 (armv4): Delete mode26 reference.
7614 * config/arm/arm.c (arm_configure_build_target): Delete use of
7617 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7619 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7621 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7622 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7624 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7625 (floatunsdidf2): Ditto.
7627 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7629 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7630 (fixuns_trunc<mode>si2_avx512f): Ditto.
7631 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7632 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7633 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7635 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7637 PR rtl-optimization/79985
7638 * df-scan.c (df_insn_refs_collect): Remove special case for
7639 global registers and asm statements.
7641 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7643 * extend.texi (Global Register Variables): Rewrite the bullet list.
7644 Note that the register is available for allocation. Note that access
7645 via inline asm must use constraints. Add note about async-signal
7646 handlers. Remove paragraph about automagic register selection.
7648 2018-05-23 Richard Biener <rguenther@suse.de>
7650 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7651 of fixed offset from memset VN.
7653 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7655 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7657 (alloc_cand_and_find_basis): Initialize first_interp field.
7658 (slsr_process_mul): Modify first_interp field.
7659 (slsr_process_add): Likewise.
7660 (slsr_process_cast): Modify first_interp field for each new
7662 (slsr_process_copy): Likewise.
7663 (dump_candidate): Dump first_interp field.
7664 (replace_mult_candidate): Process all interpretations, not just
7666 (replace_rhs_if_not_dup): Likewise.
7667 (replace_one_candidate): Likewise.
7669 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7671 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7673 (aarch64_needs_frame_chain): New function.
7674 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7676 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7679 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7680 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7681 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7682 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7683 as true for strict-align.
7684 (aarch64_can_inline_p): Perform checks even when callee has no
7685 attributes to check for strict alignment.
7686 * doc/extend.texi (AArch64 Function Attributes): Document
7688 * doc/invoke.texi: (AArch64 Options): Likewise.
7690 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7692 PR tree-optimization/85853
7693 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7694 the handling of the root of the node to...
7695 (vect_slp_analyze_node_operations_1): ...this new function,
7696 and run the whole thing with the child nodes' def types
7697 set according to their SLP node's def type.
7699 2018-05-23 Richard Biener <rguenther@suse.de>
7702 * tree-data-ref.c (create_runtime_alias_checks): Defer
7703 and ignore overflow warnings.
7705 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7707 PR tree-optimization/85822
7708 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7711 2018-05-23 Richard Biener <rguenther@suse.de>
7713 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7714 memset constants via native_interpret_expr.
7716 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7719 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7721 (cgraph_node::create_alias): Likewise.
7722 (cgraph_node::get_availability): Check ifunc_resolver instead
7723 of looking up ifunc attribute.
7724 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7725 * varasm.c (do_assemble_alias): Likewise.
7726 (assemble_alias): Likewise.
7727 (default_binds_local_p_3): Likewise.
7728 * cgraph.h (cgraph_node): Add ifunc_resolver.
7729 (cgraph_node::only_called_directly_or_aliased_p): Return false
7731 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7733 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7734 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7735 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7736 instead of looking up ifunc attribute.
7738 2018-05-22 Luis Machado <luis.machado@linaro.org>
7740 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7742 2018-05-22 Martin Sebor <msebor@redhat.com>
7745 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7746 only when expasion succeeds.
7747 (expand_builtin_strcmp): Same.
7748 (expand_builtin_strncmp): Same.
7750 2018-05-22 Martin Sebor <msebor@redhat.com>
7752 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7754 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7755 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7757 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7758 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7760 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7761 Add check for legitimate_address.
7762 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7763 (aarch64_swap_ldrstr_operands): New.
7764 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7767 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7768 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7770 * config/aarch64/aarch64.md: New patterns to generate stp
7772 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7773 single words and double words.
7774 (load_pair_sw, load_pair_dw): Likewise.
7775 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7777 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7779 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7780 for different mode ldpstp and add peephole for merged zero stores.
7782 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7784 (aarch64_gen_store_pair): Rename calls to match new patterns.
7785 (aarch64_gen_load_pair): Rename calls to match new patterns.
7786 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7787 (load_pair<DREG:mode><DREG2:mode>): ... This.
7788 (store_pair<mode>): Rename to...
7789 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7790 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7792 (V_INT_EQUIV): Handle SImode.
7793 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7796 2018-05-22 Martin Sebor <msebor@redhat.com>
7799 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7800 or ajust the presumed bound on an operation to avoid unnecessary
7803 2018-05-22 Martin Sebor <msebor@redhat.com>
7805 PR tree-optimization/85826
7806 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7807 assuming that a DECL necesarily has a constant size.
7809 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7812 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7814 2018-05-22 Richard Biener <rguenther@suse.de>
7816 PR tree-optimization/85834
7817 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7818 non-constant and non-zero memset arguments.
7820 2018-05-22 Martin Liska <mliska@suse.cz>
7823 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7825 2018-05-22 Richard Biener <rguenther@suse.de>
7827 PR tree-optimization/85863
7828 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7829 comparisons when vectype is specified.
7830 (vectorizable_condition): Do not specify vectype for
7831 vect_is_simple_cond when SLP vectorizing.
7833 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
7836 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7837 define __ibm128 as long double.
7838 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7839 as a distinct type when IEEE 128-bit support is enabled.
7840 (init_float128_ieee): Fix up conversions between IFmode and IEEE
7841 128-bit types to use the correct functions.
7842 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7843 convert between 128-bit floating point types that have different
7844 modes but the same representation, instead of using gen_lowpart to
7846 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7848 (IFKF_reg): New attributes to give the register constraints for
7850 (extend<mode>tf2_internal): New insns to mark an explicit
7851 conversion between 128-bit floating point types that have a
7852 different mode but share the same representation.
7854 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
7856 PR tree-optimization/85814
7857 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7858 a null return from get_strinfo when unsharing the next
7859 strinfo in the chain.
7861 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7864 * varasm.c (weak_finish): Clean up weak_decls.
7866 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7868 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7869 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7870 UNSPEC_UADALP values.
7871 * config/aarch64/iterators.md (ABAL): New int iterator.
7874 (sur): Add mappings for the above.
7875 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7877 (aarch64_<sur>abal<mode>_4): Likewise.
7878 (aarch64_<sur>adalp<mode>_3): Likewise.
7879 (<sur>sadv16qi): New define_expand.
7881 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
7883 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7884 (*movdf_internal): Ditto.
7885 (*rcpsf2_sse): Ditto.
7886 (*rsqrtsf2_sse): Ditto.
7887 (*sqrt<mode>2_sse): Ditto.
7889 2018-05-21 Tamar Christina <tamar.christina@arm.com>
7891 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7893 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7894 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7895 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7896 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7898 * config/aarch64/arm_neon.h: Likewise.
7899 * config/aarch64/iterators.md (VQ_I): New.
7901 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7903 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7905 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7908 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7910 * config/nds32/constraints.md (S): New constraint.
7911 * config/nds32/nds32.md (call_internal): Use constraint S.
7912 (call_value_internal): Likewise.
7913 (sibcall_internal): Likewise.
7914 (sibcall_value_internal): Likewise.
7916 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7917 Chung-Ju Wu <jasonwucj@gmail.com>
7919 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7922 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7923 Chung-Ju Wu <jasonwucj@gmail.com>
7925 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7926 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7927 (nds32_rtx_costs_impl): Simplify.
7928 (nds32_address_cost_impl): Simplify.
7929 (nds32_init_rtx_costs): New function.
7930 (nds32_rtx_costs_speed_prefer): Likewise.
7931 (nds32_rtx_costs_size_prefer): Likewise.
7932 (nds32_address_cost_speed_prefer): Likewise.
7933 (nds32_address_cost_speed_fwprop): Likewise.
7934 (nds32_address_cost_size_prefer): Likewise.
7935 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7936 * config/nds32/nds32.c (nds32_option_override): Use
7937 nds32_init_rtx_costs function.
7939 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7941 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7942 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7943 (TARGET_PIPELINE_N8): Likewise.
7944 (TARGET_PIPELINE_N10): Likewise.
7945 (TARGET_PIPELINE_N13): Likewise.
7946 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7948 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7950 * config/nds32/nds32-fpu.md: Update copyright year.
7952 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7954 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7956 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7958 * config/nds32/nds32.c
7959 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7960 * config/nds32/nds32.opt (minline-asm-r15): New option.
7962 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7964 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7966 * config/nds32/nds32.md (abssi2): New pattern.
7968 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7970 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7971 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7972 Merge insn pattern from sse_cvtsi2ss<round_name> and
7973 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7974 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7975 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7976 using SWI48 mode iterator.
7977 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7978 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7979 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7980 pattern from sse_cvttss2si<round_saeonly_name>
7981 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7982 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7983 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7984 using SWI48 mode iterator.
7985 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7986 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7987 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7988 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7989 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7990 using SWI48 mode iterator.
7991 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7992 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7993 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7994 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7995 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7996 SWI48 mode iterator.
7997 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7998 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7999 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8000 pattern from sse_cvttsd2si<round_saeonly_name>
8001 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8003 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8005 * config/nds32/nds32-md-auxiliary.c
8006 (nds32_valid_smw_lwm_base_p): Refine.
8007 (nds32_output_smw_single_word): Refine.
8008 (nds32_output_smw_double_word): New.
8009 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8011 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8013 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8014 (nds32_output_stack_pop): Refine.
8015 (nds32_expand_unaligned_load): Refine.
8016 (nds32_expand_unaligned_store): Refine.
8018 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8019 Chung-Ju Wu <jasonwucj@gmail.com>
8021 * config/nds32/constants.md: Add TP_REGNUM constant.
8022 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8023 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8025 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8026 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8027 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8028 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8029 and PIC code generation.
8030 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8032 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8034 * config/nds32/nds32.md: Support TLS and PIC.
8035 * config/nds32/nds32.c: Support TLS and PIC.
8036 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8037 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8040 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8042 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8043 mode with E_ prefix.
8045 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8046 Chung-Ju Wu <jasonwucj@gmail.com>
8048 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8049 * config/nds32/nds32-md-auxiliary.c
8050 (symbolic_reference_mentioned_p): New.
8051 (nds32_legitimize_ict_address): New.
8052 (nds32_expand_ict_move): New.
8053 (nds32_indirect_call_referenced_p): New.
8054 (nds32_symbol_binds_local_p): Delete.
8055 (nds32_long_call_p): Modify.
8056 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8057 * config/nds32/nds32-protos.h
8058 (symbolic_reference_mentioned_p): Declare.
8059 (nds32_legitimize_ict_address): Declare.
8060 (nds32_expand_ict_move): Declare.
8061 (nds32_indirect_call_referenced_p): Declare.
8062 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8063 (nds32_relax_group): Use nds32_ict_const_p as condition.
8064 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8065 (nds32_asm_file_start): Output ict_model directive in asm code.
8066 (nds32_legitimate_address_p): Consider indirect call.
8067 (nds32_print_operand): Consider indirect call.
8068 (nds32_print_operand_address): Consider indirect call.
8069 (nds32_insert_attributes): Handle "indirect_call" attribute.
8070 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8071 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8072 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8073 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8074 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8075 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8076 (TARGET_ICT_MODEL_SMALL): Define.
8077 (TARGET_ICT_MODEL_LARGE): Define.
8078 * config/nds32/nds32.md (movsi): Consider ict model.
8079 (call, call_value): Consider ict model.
8080 (sibcall, sibcall_value): Consider ict model.
8081 * config/nds32/nds32.opt (mict-model): New option.
8082 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8085 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8086 Monk Chiang <sh.chiang04@gmail.com>
8087 Jim Wilson <jimw@sifive.com>
8089 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8090 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8091 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8092 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8093 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8094 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8095 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8096 compute save_libcall_adjustment properly.
8097 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8098 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8099 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8100 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8101 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8102 (ABI_SPEC): Handle mabi=ilp32e.
8103 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8104 (RVE): Add RVE mask.
8105 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8106 <-march>: Add rv32e as an example.
8108 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8111 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8112 (intra_create_variable_infos): Handle C++ constructors.
8114 2018-05-18 Martin Liska <mliska@suse.cz>
8116 * passes.def: Remove a redundant pass.
8118 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8121 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8123 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8125 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8127 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8129 (armv2, armv2a, armv3, armv3m): Delete architectures.
8130 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8131 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8132 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8134 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8135 (*mulsidi3adddi): Likewise.
8136 (mulsidi3): Likewise.
8137 (*mulsidi3_nov6): Likewise.
8138 (umulsidi3): Likewise.
8139 (umulsidi3_nov6): Likewise.
8140 (umaddsidi4): Likewise.
8141 (*umulsidi3adddi): Likewise.
8142 (smulsi3_highpart): Likewise.
8143 (*smulsi3_highpart_nov6): Likewise.
8144 (umulsi3_highpart): Likewise.
8145 (*umulsi3_highpart_nov6): Likewise.
8146 * config/arm/arm.h (arm_arch3m): Delete.
8147 * config/arm/arm.c (arm_arch3m): Delete.
8148 (arm_option_override_internal): Update armv3-related comment.
8149 (arm_configure_build_target): Delete use of isa_bit_mode32.
8150 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8151 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8152 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8154 (mulusa3): Likewise.
8155 * config/arm/arm-protos.h (arm_arch3m): Delete.
8156 * config/arm/arm-tables.opt: Regenerate.
8157 * config/arm/arm-tune.md: Likewise.
8158 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8159 deleted architectures.
8161 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8163 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8164 (armv5t, armv5te): New features.
8165 (ARMv5, ARMv5e): Delete fgroups.
8166 (ARMv5t, ARMv5te): Adjust for above changes.
8168 (armv5, armv5e): Delete arches.
8169 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8171 (*call_reg_arm): Likewise.
8172 (*call_value_reg_armv5): Likewise.
8173 (*call_value_reg_arm): Likewise.
8174 (*call_symbol): Likewise.
8175 (*call_value_symbol): Likewise.
8176 (*sibcall_insn): Likewise.
8177 (*sibcall_value_insn): Likewise.
8179 (prefetch): Likewise.
8180 (define_split and define_peephole2 dependent on arm_arch5):
8182 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8184 (TARGET_ARM_QBIT): Likewise.
8185 (TARGET_DSP_MULTIPLY): Likewise.
8186 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8187 (arm_arch5, arm_arch5e): Delete.
8188 (arm_arch5t, arm_arch5te): Declare.
8189 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8190 (arm_arch5t): Declare.
8191 (arm_option_reconfigure_globals): Update for the above.
8192 (arm_options_perform_arch_sanity_checks): Update comment, replace
8193 use of arm_arch5 with arm_arch5t.
8194 (use_return_insn): Likewise.
8195 (arm_emit_call_insn): Likewise.
8196 (output_return_instruction): Likewise.
8197 (arm_final_prescan_insn): Likewise.
8198 (arm_coproc_builtin_available): Likewise.
8199 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8200 arm_arch5e with arm_arch5t and arm_arch5te.
8201 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8202 (arm_arch5t, arm_arch5te): Declare.
8203 * config/arm/arm-tables.opt: Regenerate.
8204 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8205 * config/arm/t-multilib: Likewise.
8206 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8207 instead of arm_arch5.
8208 (*call_reg_thumb1): Likewise.
8209 (*call_value_reg_thumb1_v5): Likewise.
8210 (*call_value_reg_thumb1): Likewise.
8211 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8213 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8215 2018-05-18 Martin Liska <mliska@suse.cz>
8217 PR gcov-profile/84846
8218 * doc/gcov.texi: Document -t option of gcov tool.
8220 2018-05-18 Martin Liska <mliska@suse.cz>
8222 PR gcov-profile/84846
8223 * gcov.c (print_usage): Add new -t option.
8224 (process_args): Handle the option.
8225 (generate_results): Use stdout as output when requested by
8228 2018-05-18 Martin Liska <mliska@suse.cz>
8230 PR gcov-profile/84846
8231 * coverage.c (coverage_init): Write PWD to .gcno file.
8232 * doc/gcov.texi: Document how working directory is printed.
8233 * gcov-dump.c (dump_gcov_file): Print PWD.
8234 * gcov.c (output_intermediate_file): Likewise.
8235 (read_graph_file): Read PWD string.
8236 (output_lines): Print PWD.
8238 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8241 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8242 for retval and return false if all args to phi are zero.
8244 2018-05-18 Richard Biener <rguenther@suse.de>
8246 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8248 (evrp_dom_walker::before_dom_children): Call it.
8250 2018-05-18 Richard Biener <rguenther@suse.de>
8252 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8253 results when processing array refs with variable index.
8255 2018-05-18 Toon Moene <toon@moene.org>
8257 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8258 directly after that of -floop-interchange. Indicate that both
8259 options are enabled by default when specifying -O3.
8261 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8263 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8264 iterator. Delete separate integer-mode vec_set<mode> expander.
8265 (aarch64_simd_vec_setv2di): Delete.
8266 (vec_setv2di): Delete.
8267 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8268 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8269 the "w, r" alternative.
8271 2018-05-18 Martin Liska <mliska@suse.cz>
8273 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8274 * tree-pass.h (make_pass_lower_switch_O0): New function.
8275 * tree-switch-conversion.c (node_has_low_bound): Remove.
8276 (node_has_high_bound): Likewise.
8277 (node_is_bounded): Likewise.
8278 (class pass_lower_switch): Make it a template type and create
8280 (pass_lower_switch::execute): Add template argument.
8281 (make_pass_lower_switch): New function.
8282 (make_pass_lower_switch_O0): New function.
8283 (do_jump_if_equal): Remove.
8284 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8285 all the hard work to tree optimization passes.
8287 2018-05-18 Martin Liska <mliska@suse.cz>
8289 * dbgcnt.c (limit_low): Renamed from limit.
8290 (limit_high): New variable.
8291 (dbg_cnt_is_enabled): Check for upper limit.
8292 (dbg_cnt): Adjust dumping.
8293 (dbg_cnt_set_limit_by_index): Add new argument for high
8295 (dbg_cnt_set_limit_by_name): Likewise.
8296 (dbg_cnt_process_single_pair): Parse new format.
8297 (dbg_cnt_process_opt): Use strtok.
8298 (dbg_cnt_list_all_counters): Remove 'value' and add
8300 * doc/invoke.texi: Document changes.
8302 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8304 * doc/sourcebuild.texi (scalar_all_fma): Document.
8305 * tree.def (FMA_EXPR): Delete.
8306 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8307 * internal-fn.c (ternary_direct): New macro.
8308 (expand_ternary_optab_fn): Likewise.
8309 (direct_ternary_optab_supported_p): Likewise.
8310 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8311 * builtins.c (fold_builtin_fma): Delete.
8312 (fold_builtin_3): Don't call it.
8313 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8314 * expr.c (expand_expr_real_2): Likewise.
8315 * fold-const.c (operand_equal_p): Likewise.
8316 (fold_ternary_loc): Likewise.
8317 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8318 * gimple.c (DEFTREECODE): Likewise.
8319 * gimplify.c (gimplify_expr): Likewise.
8320 * optabs-tree.c (optab_for_tree_code): Likewise.
8321 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8322 * tree-eh.c (operation_could_trap_p): Likewise.
8323 (stmt_could_throw_1_p): Likewise.
8324 * tree-inline.c (estimate_operator_cost): Likewise.
8325 * tree-pretty-print.c (dump_generic_node): Likewise.
8326 (op_code_prio): Likewise.
8327 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8328 * tree-ssa-operands.c (get_expr_operands): Likewise.
8329 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8330 * fold-const-call.h (fold_fma): Delete.
8331 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8332 CFN_FNMA and CFN_FNMS.
8334 * genmatch.c (combined_fn): New enum.
8335 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8336 (commutative_op): New function.
8337 (commutate): Use it. Handle more than 2 operands.
8338 (dt_operand::gen_gimple_expr): Use commutative_op.
8339 (parser::parse_expr): Allow :c to be used with non-binary
8340 operators if the commutative operand is known.
8341 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8342 CFN_FMS, CFN_FNMA and CFN_FNMS.
8343 (backprop::process_assign_use): Remove FMA_EXPR handling.
8344 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8345 (gen_hsa_fma): New function.
8346 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8347 IFN_FNMA and IFN_FNMS.
8348 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8349 * gimple-fold.h (follow_all_ssa_edges): Declare.
8350 * gimple-fold.c (follow_all_ssa_edges): New function.
8351 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8352 gimple_build interface and use follow_all_ssa_edges to fold the result.
8353 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8354 instead of checking for optabs directly.
8355 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8356 rather than FMA_EXPRs.
8357 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8358 call to IFN_FMA instead of an FMA_EXPR.
8360 2018-05-17 Jim Wilson <jimw@sifive.com>
8362 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8363 sign extended promoted subreg, and the range does not have the sign bit
8364 set, then do a sign extend.
8366 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8367 test, check for sign extended subreg and/or constant operands, and
8368 do a sign extend in that case.
8370 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8372 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8373 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8375 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8376 Change logics_shift_reg to logics_shift_imm.
8377 (thunderx2t99_fp_loadpair_basic): Delete.
8378 (thunderx2t99_fp_storepair_basic): Delete.
8379 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8380 (thunderx2t99_asimd_polynomial): Delete.
8381 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8382 and neon_fp_mul_d_scalar_q.
8383 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8384 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8385 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8386 (thunderx2t99_asimd_lut): Add missing tbl types.
8387 (thunderx2t99_asimd_ext): Delete.
8388 (thunderx2t99_asimd_load1_1_mult): Delete.
8389 (thunderx2t99_asimd_load1_2_mult): Delete.
8390 (thunderx2t99_asimd_load1_ldp): New.
8391 (thunderx2t99_asimd_load1): New.
8392 (thunderx2t99_asimd_load2): Add missing *load2* types.
8393 (thunderx2t99_asimd_load3): New.
8394 (thunderx2t99_asimd_load4): New.
8395 (thunderx2t99_asimd_store1_1_mult): Delete.
8396 (thunderx2t99_asimd_store1_2_mult): Delete.
8397 (thunderx2t99_asimd_store2_mult): Delete.
8398 (thunderx2t99_asimd_store2_onelane): Delete.
8399 (thunderx2t99_asimd_store_stp): New.
8400 (thunderx2t99_asimd_store1): New.
8401 (thunderx2t99_asimd_store2): New.
8402 (thunderx2t99_asimd_store3): New.
8403 (thunderx2t99_asimd_store4): New.
8405 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8407 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8408 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8410 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8411 Segher Boessenkool <segher@kernel.crashing.org>
8414 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8417 2018-05-17 Richard Biener <rguenther@suse.de>
8419 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8420 for pruning loop and prune defs feeding only already visited PHIs.
8422 2018-05-17 Richard Biener <rguenther@suse.de>
8424 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8426 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8427 Richard Biener <rguenther@suse.de>
8429 PR tree-optimization/85793
8430 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8431 for VMAT_ELEMENTWISE.
8433 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8435 * internal-fn.h (lookup_internal_fn): Declare
8436 * internal-fn.c (lookup_internal_fn): New function.
8437 * gimple.c (gimple_build_call_from_tree): Handle calls to
8439 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8440 internal function names.
8441 * tree-pretty-print.c (dump_generic_node): Likewise.
8442 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8444 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8446 * gimple-fold.h (gimple_build): Make the function forms take
8447 combined_fn rather than built_in_function.
8448 (gimple_simplify): Likewise.
8449 * gimple-match-head.c (gimple_simplify): Likewise.
8450 * gimple-fold.c (gimple_build): Likewise.
8451 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8452 rather than gimple_build_call_internal.
8453 (get_initial_defs_for_reduction): Likewise.
8454 (vect_create_epilog_for_reduction): Likewise.
8455 (vectorizable_live_operation): Likewise.
8457 2018-05-17 Martin Liska <mliska@suse.cz>
8459 * gimple-ssa-sprintf.c (format_directive): Do not use
8460 space in between 'G_' and '('.
8462 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8465 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8466 even if the mask is not all ones.
8469 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8471 (ix86_gimple_fold_builtin): Likewise.
8474 * config/i386/i386.c: Include tree-vector-builder.h.
8475 (ix86_vector_shift_count): New function.
8476 (ix86_fold_builtin): Fold shift builtins by scalar count.
8477 (ix86_gimple_fold_builtin): Likewise.
8479 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8480 _mm512_setzero): New intrinsics.
8482 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8483 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8485 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8486 code generation for cases where splatting a value is not useful.
8487 * simplify-rtx.c (simplify_ternary_operation): Simplify
8488 vec_merge across a vec_duplicate and a paradoxical subreg forming
8489 a vector mode to a vec_concat.
8491 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8493 * config.gcc: Support "goldmont-plus".
8494 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8496 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8497 PROCESSOR_GOLDMONT_PLUS.
8498 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8499 (processor_target_table): Add "goldmont-plus".
8500 (PTA_GOLDMONT_PLUS): Define.
8501 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8502 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8503 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8504 (fold_builtin_cpu): Add "goldmont-plus".
8505 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8506 (ix86_option_override_internal): Add "goldmont-plus".
8507 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8508 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8509 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8510 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8512 2018-05-17 Richard Biener <rguenther@suse.de>
8514 PR tree-optimization/85757
8515 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8516 remove defs that only feed that PHI from further processing.
8518 2018-05-16 Jim Wilson <jimw@sifive.com>
8520 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8522 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8524 2018-05-16 Mark Wielaard <mark@klomp.org>
8526 * dwarf2out.c (count_index_strings): New function.
8527 (output_indirect_strings): Call count_index_strings and generate
8528 header for dwarf_version >= 5.
8530 2018-05-16 Mark Wielaard <mark@klomp.org>
8532 * dwarf2out.c (dwarf_FORM): New function.
8533 (set_indirect_string): Use dwarf_FORM.
8534 (reset_indirect_string): Likewise.
8535 (size_of_die): Likewise.
8536 (value_format): Likewise.
8537 (output_die): Likewise.
8538 (add_skeleton_AT_string): Likewise.
8539 (output_macinfo_op): Likewise.
8540 (index_string): Likewise.
8541 (output_index_string_offset): Likewise.
8542 (output_index_string): Likewise.
8543 (count_index_strings): Likewise.
8545 2018-05-16 Carl Love <cel@us.ibm.com>
8547 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8548 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8550 2018-05-16 Martin Jambor <mjambor@suse.cz>
8552 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8553 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8555 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8557 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8558 (fnma<mode>4): Likewise.
8559 (fms<mode>4): Likewise.
8560 (fnms<mode>4): Likewise.
8561 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8562 (aarch64_fnma<mode>4): Likewise.
8563 (aarch64_fms<mode>4): Likewise.
8564 (aarch64_fnms<mode>4): Likewise.
8565 (aarch64_fnmadd<mode>4): Likewise.
8567 2018-05-16 Jason Merrill <jason@redhat.com>
8569 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8571 2018-05-16 Richard Biener <rguenther@suse.de>
8573 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8574 (dump_stmt_cost): Declare.
8575 (add_stmt_cost): Dump cost we add.
8576 (add_stmt_costs): New function.
8577 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8579 (vect_analyze_stmt): Adjust prototype.
8580 (vectorizable_condition): Likewise.
8581 (vectorizable_live_operation): Likewise.
8582 (vectorizable_reduction): Likewise.
8583 (vectorizable_induction): Likewise.
8584 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8585 cost vector to pass to vectorizable_ and record afterwards.
8586 (vect_model_reduction_cost): Take cost vector argument and adjust.
8587 (vect_model_induction_cost): Likewise.
8588 (vectorizable_reduction): Likewise.
8589 (vectorizable_induction): Likewise.
8590 (vectorizable_live_operation): Likewise.
8591 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8592 SLP_TREE_NUMBER_OF_VEC_STMTS.
8593 (vect_analyze_slp_cost_1): Remove.
8594 (vect_analyze_slp_cost): Likewise.
8595 (vect_slp_analyze_node_operations): Take visited args and
8596 a target cost vector. Avoid processing already visited stmt sets.
8597 (vect_slp_analyze_operations): Use a local cost vector to gather
8598 costs and register those of non-discarded instances.
8599 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8600 (vect_schedule_slp_instance): Remove copying of
8601 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8603 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8604 adding cost. Record cost entry location.
8605 (vect_prologue_cost_for_slp_op): Function to compute cost of
8606 a constant or invariant generated for SLP vect in the prologue,
8607 split out from vect_analyze_slp_cost_1.
8608 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8609 (vect_model_promotion_demotion_cost): Likewise.
8610 (vect_model_store_cost): Likewise, make static.
8611 (vect_model_load_cost): Likewise.
8612 (vectorizable_bswap): Add cost vector arg and adjust.
8613 (vectorizable_call): Likewise.
8614 (vectorizable_simd_clone_call): Likewise.
8615 (vectorizable_conversion): Likewise.
8616 (vectorizable_assignment): Likewise.
8617 (vectorizable_shift): Likewise.
8618 (vectorizable_operation): Likewise.
8619 (vectorizable_store): Likewise.
8620 (vectorizable_load): Likewise.
8621 (vectorizable_condition): Likewise.
8622 (vectorizable_comparison): Likewise.
8623 (can_vectorize_live_stmts): Likewise.
8624 (vect_analyze_stmt): Likewise.
8625 (vect_transform_stmt): Adjust calls to vectorizable_*.
8626 * tree-vectorizer.c: Include gimple-pretty-print.h.
8627 (dump_stmt_cost): New function.
8629 2018-05-16 Richard Biener <rguenther@suse.de>
8631 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8632 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8633 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8634 (check_name): New callback.
8635 (dse_classify_store): Track cycles via a visited bitmap of PHI
8636 defs and simplify handling of in-loop and across loop dead stores
8637 and properly fail for loop-variant refs. Handle byte-tracking with
8638 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8641 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8643 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8644 (vect_get_mask_type_for_stmt): Likewise.
8645 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8647 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8648 to determine the statement's vector type and the vector type that
8649 should be used for calculating nunits. Deal with cases in which
8650 the type has to be deferred.
8651 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8652 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8653 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8654 (vect_determine_vf_for_stmt): New functions, split out from...
8655 (vect_determine_vectorization_factor): ...here.
8656 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8657 (vect_get_mask_type_for_stmt): New functions, split out from
8658 vect_determine_vectorization_factor.
8660 2018-05-16 Richard Biener <rguenther@suse.de>
8662 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8663 verify the [VEC_]COND_EXPR embedded comparison.
8665 2018-05-15 Martin Sebor <msebor@redhat.com>
8667 PR tree-optimization/85753
8668 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8669 RECORD_TYPE in addition to ARRAY_TYPE.
8671 2018-05-15 Martin Sebor <msebor@redhat.com>
8674 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8676 2018-05-15 Richard Biener <rguenther@suse.de>
8678 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8679 add by_clobber_p one. Change algorithm to collect all defs
8680 representing uses we need to walk and try reducing them to
8681 a single one before failing.
8682 (dse_dom_walker::dse_optimize_stmt): Adjust.
8684 2018-05-13 Mark Wielaard <mark@klomp.org>
8686 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8687 (size_of_loc_descr): Likewise.
8688 (output_loc_operands): Likewise.
8689 (output_loc_operands_raw): Likewise.
8690 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8691 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8692 (hash_loc_operands): Likewise.
8693 (compare_loc_operands): Likewise.
8695 2018-05-14 Mark Wielaard <mark@klomp.org>
8697 * dwarf2out.c (count_index_addrs): New function.
8698 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8700 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8702 PR tree-optimization/83648
8703 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8704 return value as malloc candidate.
8706 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8709 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8710 param as true in call to suggest_attribute.
8712 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8714 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8715 -mreadonly-in-sdata.
8717 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8719 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8721 (aarch64_crypto_aesd_fused): Likewise.
8723 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8725 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8726 (movsi_aarch64): Likewise.
8727 (load_pairsi): Likewise.
8728 (load_pairdi): Likewise.
8729 (store_pairsi): Likewise.
8730 (store_pairdi): Likewise.
8731 (load_pairsf): Likewise.
8732 (load_pairdf): Likewise.
8733 (store_pairsf): Likewise.
8734 (store_pairdf): Likewise.
8735 (zero_extend): Likewise.
8736 (trunc): Swap alternatives.
8737 (fcvt_target): Add '?' to prefer w over r.
8739 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8742 * config/i386/i386.md: Disallow non-commutative arithmetics in
8743 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8744 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8745 in the peephole2 before it.
8747 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8749 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8750 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8751 (ix86_handle_option): Handle -mcldemote.
8752 * config.gcc: New header.
8753 * config/i386/cldemoteintrin.h: New file.
8754 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8755 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8757 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8758 OPTION_MASK_ISA_CLDEMOTE.
8759 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8760 (ix86_valid_target_attribute_inner_p): Ditto.
8761 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8762 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8763 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8764 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8765 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8767 * config/i386/i386.opt: Add -mcldemote.
8768 * config/i386/x86intrin.h: New header.
8769 * doc/invoke.texi: Add -mcldemote.
8771 2018-05-14 Richard Biener <rguenther@suse.de>
8773 * doc/match-and-simplify.texi: Adjust :s documentation.
8775 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8777 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8778 intended memcpy size.
8779 (REORDER_45): Likewise.
8781 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8783 * sort.cc: New file.
8784 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8785 * vec.c (qsort_chk): Use gcc_qsort.
8786 * Makefile.in (OBJS-libcommon): Add sort.o.
8787 (build/sort.o): New target. Use it...
8788 (BUILD_RTL): ... here, and...
8789 (build/gencfn-macros): ... here, and...
8790 (build/genmatch): ... here.
8792 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8793 Chung-Ju Wu <jasonwucj@gmail.com>
8795 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8796 * config/nds32/nds32-graywolf.md: New file.
8797 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8798 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8800 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8801 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8802 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8803 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8804 * config/nds32/pipelines.md: Include n15 settings.
8806 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8807 Chung-Ju Wu <jasonwucj@gmail.com>
8809 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8810 * config/nds32/nds32-n13.md: New file.
8811 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8812 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8814 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8815 * config/nds32/nds32.md (pipeline_model): Add n13.
8816 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8817 * config/nds32/pipelines.md: Include n13 settings.
8819 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8820 Chung-Ju Wu <jasonwucj@gmail.com>
8822 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8823 * config/nds32/nds32-n10.md: New file.
8824 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8825 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8827 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8828 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8829 * config/nds32/nds32.md (pipeline_model): Add n10.
8830 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8831 * config/nds32/pipelines.md: Include n10 settings.
8833 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
8834 Kito Cheng <kito.cheng@gmail.com>
8835 Chung-Ju Wu <jasonwucj@gmail.com>
8837 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8838 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8839 Add enum values for DSP extension instructions.
8840 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8842 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8843 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8845 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8846 * config/nds32/nds32-dspext.md: New file for DSP implementation.
8847 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8848 * config/nds32/nds32-intrinsic.md: Likewise.
8849 * config/nds32/nds32_intrinsic.h: Likewise.
8850 * config/nds32/nds32-md-auxiliary.c: Likewise.
8851 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8852 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8853 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8854 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8855 * config/nds32/nds32-protos.h: New declarations for DSP extension.
8856 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8857 TYPE_DMAC in switch statement.
8858 * config/nds32/nds32.c: New checking and implementation for DSP
8859 extension instructions.
8860 * config/nds32/nds32.h: Likewise.
8861 * config/nds32/nds32.md: Likewise.
8862 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8863 * config/nds32/predicates.md: Implement new predicates for DSP
8866 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8868 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8869 Reformat alternatives and attributes so it is easier to identify
8870 which constraints/attributes go with which instruction.
8871 (mov<mode>_hardfloat32, FMOVE64): Likewise.
8872 (mov<mode>_softfloat32, FMOVE64): Likewise.
8873 (mov<mode>_hardfloat64, FMOVE64): Likewise.
8874 (mov<mode>_softfloat64, FMOVE64): Likewise.
8876 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
8878 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8880 (Basic PowerPC Built-in Functions): The new name of the
8881 subsection previously known as "PowerPC Built-in Functions".
8882 (Basic PowerPC Built-in Functions Available on all Configurations):
8884 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8885 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8886 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8887 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8889 2018-05-11 Martin Jambor <mjambor@suse.cz>
8892 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8895 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8898 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8900 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8902 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8903 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8904 (ix86_handle_option): Handle -mwaitpkg.
8905 * config.gcc: New header.
8906 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8907 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8908 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8910 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8911 OPTION_MASK_ISA_WAITPKG.
8912 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8913 (ix86_option_override_internal): Add PTA_WAITPKG.
8914 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8915 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8916 IX86_BUILTIN_TPAUSE.
8917 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8918 __builtin_ia32_umwait and __builtin_ia32_tpause.
8919 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8920 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8921 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8922 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8923 UNSPECV_TPAUSE): New.
8924 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8925 * config/i386/i386.opt: Add -mwaitpkg.
8926 * config/i386/waitpkgintrin.h: New file.
8927 * config/i386/x86intrin.h: New header.
8928 * doc/invoke.texi: Add -mwaitpkg.
8930 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8933 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8935 (cortex-m0): Use armv6s-m isa.
8936 (cortex-m0plus): Likewise.
8937 (cortex-m1): Likewise.
8938 (cortex-m0.small-multiply): Likewise.
8939 (cortex-m0plus.small-multiply): Likewise.
8940 (cortex-m1.small-multiply): Likewise.
8942 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8943 Jakub Jelinek <jakub@redhat.com>
8945 PR tree-optimization/85692
8946 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8947 source permute as well.
8949 2018-05-11 Martin Liska <mliska@suse.cz>
8952 * doc/extend.texi: Document LLVM style format for no_sanitize
8955 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8957 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8958 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8959 (mode_supports_vsx_dform_quad): Likewise.
8960 (mode_supports_vmx_dform): Move these functions to be next to the
8961 other mode_supports functions.
8962 (mode_supports_dq_form): Likewise.
8963 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8964 mode_supports_dq_form.
8965 (reg_offset_addressing_ok_p): Likewise.
8966 (offsettable_ok_by_alignment): Likewise.
8967 (rs6000_legitimate_offset_address_p): Likewise.
8968 (legitimate_lo_sum_address_p): Likewise.
8969 (rs6000_legitimize_address): Likewise.
8970 (rs6000_legitimize_reload_address): Likewise.
8971 (rs6000_secondary_reload_inner): Likewise.
8972 (rs6000_preferred_reload_class): Likewise.
8973 (rs6000_output_move_128bit): Likewise.
8975 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8977 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8978 Generate SImode target register for null target.
8979 <case IX86_BUILTIN_XGETBV>: Ditto.
8980 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8981 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8983 2018-05-10 Carl Love <cel@us.ibm.com>
8985 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8986 dcbtt and dcbtstt if operands[2] is 0.
8988 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8991 * config/i386/sse.md (usadv64qi): New expander.
8993 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8995 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8996 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8997 -maltivec=be support.
8998 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8999 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9000 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9001 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9002 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9003 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9004 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9005 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9006 altivec_vsumsws): Adjust.
9007 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9008 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9009 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9011 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9012 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9013 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9014 (altivec_lve<VI_char>x): Delete expand.
9015 (*altivec_lve<VI_char>x_internal): Rename to...
9016 (altivec_lve<VI_char>x): ... this.
9017 (altivec_lvxl_<mode>): Delete expand.
9018 (*altivec_lvxl_<mode>_internal): Rename to ...
9019 (altivec_lvxl_<mode>): ... this.
9020 (altivec_stvxl_<mode>): Delete expand.
9021 (*altivec_stvxl_<mode>_internal): Rename to ...
9022 (altivec_stvxl_<mode>): ... this.
9023 (altivec_stve<VI_char>x): Delete expand.
9024 (*altivec_stve<VI_char>x_internal): Rename to ...
9025 (altivec_stve<VI_char>x): ... this.
9026 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9027 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9028 reduc_plus_scal_<mode>): Adjust.
9029 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9031 (rs6000_cpu_cpp_builtins): Adjust.
9032 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9033 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9034 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9035 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9036 -maltivec=be support.
9037 (rs6000_split_vec_extract_var): Adjust.
9038 (rs6000_split_v4si_init): Adjust.
9039 (swap_selector_for_mode): Delete.
9040 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9041 altivec_expand_stvex_be): Delete.
9042 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9043 -maltivec=be support.
9044 (rs6000_gimple_fold_builtin): Ditto.
9045 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9047 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9048 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9049 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9050 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9051 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9052 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9053 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9054 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9055 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9056 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9057 anonymous split): Adjust.
9058 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9059 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9061 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9063 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9064 when --with-gxx-include-dir is also specified.
9065 * configure: Regenerate.
9067 2018-05-09 Jim Wilson <jimw@sifive.com>
9070 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9071 * config/riscv/t-withmultilib: New.
9072 * config/riscv/withmultilib.h: New.
9073 * doc/install.texi: Document RISC-V --with-multilib-list support.
9075 2018-05-09 Richard Biener <rguenther@suse.de>
9077 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9079 (vect_bb_vectorization_profitable_p): Adjust. Compute
9080 actual scalar cost using the cost vector and the add_stmt_cost
9083 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9085 PR rtl-optimization/85645
9086 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9087 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9089 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9091 PR rtl-optimization/85645
9092 * shrink-wrap.c (spread_components): Return a boolean saying if
9093 anything was changed.
9094 (try_shrink_wrapping_separate): Iterate spread_components until
9095 nothing changes anymore.
9097 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9099 PR rtl-optimization/85645
9100 * regrename.c (build_def_use): Also kill the chains that include the
9101 destination of a REG_CFA_REGISTER note.
9103 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9105 PR rtl-optimization/85645
9106 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9107 insn that has a REG_CFA_REGISTER note.
9109 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9111 * cfgexpand.c (expand_clobber): New function.
9112 (expand_gimple_stmt_1): Use it.
9113 * tree-vect-stmts.c (vect_clobber_variable): New function,
9115 (vectorizable_simd_clone_call): ...here.
9116 (vectorizable_store): Emit a clobber either side of an
9117 IFN_STORE_LANES sequence.
9118 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9120 2018-05-09 Tom de Vries <tom@codesourcery.com>
9123 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9124 (define_insn "trap_if_false"): Add exit after trap.
9126 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9128 PR rtl-optimization/85638
9129 * bb-reorder.c: Include common/common-target.h.
9130 (create_forwarder_block): New function extracted from...
9131 (fix_up_crossing_landing_pad): ...here. Rename into...
9132 (dw2_fix_up_crossing_landing_pad): ...this.
9133 (sjlj_fix_up_crossing_landing_pad): New function.
9134 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9135 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9136 from both partitions and exit the loop after one iteration.
9138 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9141 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9143 (Basic PowerPC Built-in Functions): The new name of the
9144 subsection previously known as "PowerPC Built-in Functions".
9145 (Basic PowerPC Built-in Functions Available on all Configurations):
9147 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9149 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9151 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9153 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9156 2018-05-08 Jim Wilson <jimw@sifive.com>
9158 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9159 (LD_EMUL_SUFFIX): New.
9160 (LINK_SPEC): Use it.
9162 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9164 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9166 (Basic PowerPC Built-in Functions): The new name of the
9167 subsection previously known as "PowerPC Built-in Functions".
9168 (Basic PowerPC Built-in Functions Available on all Configurations):
9170 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9172 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9174 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9176 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9179 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9182 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9183 after cmpelim optimization.
9185 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9187 * config.gcc: Support "goldmont".
9188 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9189 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9191 * config/i386/i386.c (m_GOLDMONT): Define.
9192 (processor_target_table): Add "goldmont".
9193 (PTA_GOLDMONT): Define.
9194 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9195 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9196 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9197 (fold_builtin_cpu): Add "goldmont".
9198 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9199 (ix86_option_override_internal): Add "goldmont".
9200 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9201 (processor_type): Add PROCESSOR_GOLDMONT.
9202 * config/i386/i386.md: Add CPU "glm".
9203 * config/i386/glm.md: New file.
9204 * config/i386/x86-tune.def: Add m_GOLDMONT.
9205 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9207 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9210 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9212 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9213 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9214 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9217 * config/i386/i386.c (ix86_fold_builtin): Handle
9218 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9221 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9222 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9224 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9227 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9228 (check_arch): Likewise.
9229 (check_fpu): Return the result rather than printing it.
9230 (end arch): Fix operator precedence.
9231 (end cpu): Likewise.
9232 (END): Print the result from check_fpu.
9234 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9235 Alan Hayward <alan.hayward@arm.com>
9236 David Sherwood <david.sherwood@arm.com>
9238 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9239 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9240 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9241 (*fcmuo<mode>_and): New patterns.
9243 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9245 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9246 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9247 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9248 (cmp_op, sve_imm_con): New code attributes.
9249 (SVE_COND_INT_CMP, imm_con): Delete.
9250 (cmp_op): Remove above unspecs from int attribute.
9251 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9253 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9254 comparison-specific unspecs.
9255 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9256 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9257 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9258 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9259 (*vec_fcm<cmp_op><mode>): Rename to...
9260 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9261 (*vec_fcmuo<mode>): Rename to...
9262 (*fcmuo<mode>): ...this and adjust likewise.
9263 (*pred_fcm<cmp_op><mode>): New pattern.
9264 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9265 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9267 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9269 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9270 (aarch64_emit_sve_predicated_cond): New function.
9271 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9272 (aarch64_emit_unspec_cond_or): Replace with...
9273 (aarch64_emit_sve_or_conds): ...this new function. Use
9274 aarch64_emit_sve_ptrue_op for the individual comparisons and
9275 aarch64_emit_binop to OR them together.
9276 (aarch64_emit_inverted_unspec_cond): Replace with...
9277 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9278 aarch64_emit_sve_ptrue_op for the comparison and
9279 aarch64_emit_unop to invert the result.
9280 (aarch64_expand_sve_vec_cmp_float): Update after the above
9281 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9283 2018-05-07 Nathan Sidwell <nathan@acm.org>
9285 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9286 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9287 (Backwards Compatibility): Likewise.
9289 2018-05-07 Luis Machado <luis.machado@linaro.org>
9293 2018-05-07 Luis Machado <luis.machado@linaro.org>
9295 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9296 <prefetch_dynamic_strides>: New const bool field.
9297 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9298 prefetch_dynamic_strides.
9299 (exynosm1_prefetch_tune): Likewise.
9300 (thunderxt88_prefetch_tune): Likewise.
9301 (thunderx_prefetch_tune): Likewise.
9302 (thunderx2t99_prefetch_tune): Likewise.
9303 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9305 (aarch64_override_options_internal): Update to set
9306 PARAM_PREFETCH_DYNAMIC_STRIDES.
9307 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9308 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9309 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9310 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9311 prefetch-dynamic-strides setting.
9313 2018-05-07 Luis Machado <luis.machado@linaro.org>
9315 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9316 <minimum_stride>: New const int field.
9317 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9318 minimum_stride field.
9319 (exynosm1_prefetch_tune): Likewise.
9320 (thunderxt88_prefetch_tune): Likewise.
9321 (thunderx_prefetch_tune): Likewise.
9322 (thunderx2t99_prefetch_tune): Likewise.
9323 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9324 (aarch64_override_options_internal): Update to set
9325 PARAM_PREFETCH_MINIMUM_STRIDE.
9326 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9327 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9328 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9329 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9330 stride is constant and is below the minimum stride threshold.
9332 2018-05-07 Luis Machado <luis.machado@linaro.org>
9334 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9337 2018-05-07 Luis Machado <luis.machado@linaro.org>
9339 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9340 <prefetch_dynamic_strides>: New const bool field.
9341 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9342 prefetch_dynamic_strides.
9343 (exynosm1_prefetch_tune): Likewise.
9344 (thunderxt88_prefetch_tune): Likewise.
9345 (thunderx_prefetch_tune): Likewise.
9346 (thunderx2t99_prefetch_tune): Likewise.
9347 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9349 (aarch64_override_options_internal): Update to set
9350 PARAM_PREFETCH_DYNAMIC_STRIDES.
9351 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9352 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9353 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9354 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9355 prefetch-dynamic-strides setting.
9357 2018-05-07 Luis Machado <luis.machado@linaro.org>
9359 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9360 <minimum_stride>: New const int field.
9361 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9362 minimum_stride field.
9363 (exynosm1_prefetch_tune): Likewise.
9364 (thunderxt88_prefetch_tune): Likewise.
9365 (thunderx_prefetch_tune): Likewise.
9366 (thunderx2t99_prefetch_tune): Likewise.
9367 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9368 (aarch64_override_options_internal): Update to set
9369 PARAM_PREFETCH_MINIMUM_STRIDE.
9370 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9371 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9372 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9373 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9374 stride is constant and is below the minimum stride threshold.
9376 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9379 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9380 the type is addressable. Don't force op into register if it has
9383 2018-05-05 Roland McGrath <mcgrathr@google.com>
9386 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9387 any section for which we don't know a specific type it should have,
9388 regardless of name. Previously this was done only for the exact
9389 names ".init_array", ".fini_array", and ".preinit_array".
9390 (default_elf_asm_named_section): Add comment about
9391 relationship with default_section_type_flags and SECTION_NOTYPE.
9392 (get_section): Don't consider it a type conflict if one side has
9393 SECTION_NOTYPE and the other doesn't, as long as neither has the
9394 SECTION_BSS et al used in the default_section_type_flags logic.
9396 2018-05-05 Tom de Vries <tom@codesourcery.com>
9399 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9400 (workaround_barsyncs): New function.
9401 (nvptx_reorg): Use workaround_barsyncs.
9402 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9403 (define_expand "nvptx_membar_cta"): New define_expand.
9404 (define_insn "*nvptx_membar_cta"): New insn.
9406 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9408 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9409 To improve optimization opportunities.
9410 * builtin-types.def: The new needed builtin types for the above.
9412 2018-05-04 Richard Biener <rguenther@suse.de>
9414 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9415 * gimple-ssa-store-merging.c
9416 (imm_store_chain_info::output_merged_store): Remove redundant create,
9417 release split_store vector contents on failure.
9418 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9419 scalar stmt vector on cache hit.
9421 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9423 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9425 * config.gcc (powerpc-xilinx-eabi*): Remove.
9426 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9428 (fusion_addis_mem_combo_load): Ditto.
9429 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9431 (rs6000_cpu_cpp_builtins): Ditto.
9432 * config/rs6000/rs6000-linux.c
9433 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9434 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9435 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9437 (rs6000_setup_reg_addr_masks): Ditto.
9438 (rs6000_init_hard_regno_mode_ok): Ditto.
9439 (rs6000_option_override_internal): Ditto.
9440 (legitimate_lo_sum_address_p): Ditto.
9441 (rs6000_legitimize_address): Ditto.
9442 (rs6000_legitimize_reload_address): Ditto.
9443 (rs6000_legitimate_address_p): Ditto.
9444 (abi_v4_pass_in_fpr): Ditto.
9445 (setup_incoming_varargs): Ditto.
9446 (rs6000_gimplify_va_arg): Ditto.
9447 (rs6000_split_multireg_move): Ditto.
9448 (rs6000_savres_strategy): Ditto.
9449 (rs6000_emit_prologue_components): Ditto.
9450 (rs6000_emit_epilogue_components): Ditto.
9451 (rs6000_emit_prologue): Ditto.
9452 (rs6000_emit_epilogue): Ditto.
9453 (rs6000_elf_file_end): Ditto.
9454 (rs6000_function_value): Ditto.
9455 (rs6000_libcall_value): Ditto.
9456 * config/rs6000/rs6000.h: Ditto.
9457 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9458 (TARGET_MINMAX): ... this. New.
9459 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9460 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9461 (*movsi_internal1_single): Delete.
9462 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9463 mfpu=, mxilinx-fpu): Delete.
9464 * config/rs6000/singlefp.h: Delete.
9465 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9466 * config/rs6000/t-rs6000: Ditto.
9467 * config/rs6000/t-xilinx: Delete.
9468 * config/rs6000/titan.md: Adjust for fp_type removal.
9469 * config/rs6000/vsx.md: Remove Xilinx FP support.
9470 (VStype_simple): Delete.
9471 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9472 * config/rs6000/xfpu.h: Delete.
9473 * config/rs6000/xfpu.md: Delete.
9474 * config/rs6000/xilinx.h: Delete.
9475 * config/rs6000/xilinx.opt: Delete.
9476 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9477 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9479 2018-05-04 Tom de Vries <tom@codesourcery.com>
9482 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9485 2018-05-04 Richard Biener <rguenther@suse.de>
9488 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9489 (expand_complex_div_wide): Likewise.
9490 (expand_complex_operations_1): Likewise.
9491 (expand_complex_libcall): Preserve EH info of the original stmt.
9492 (tree_lower_complex): Handle removed blocks.
9493 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9494 on complex multiplication and division libcall builtins.
9496 2018-05-04 Richard Biener <rguenther@suse.de>
9499 * fold-const.c (negate_expr_p): Restrict negation of operand
9500 zero of a division to when we know that can happen without
9502 (fold_negate_expr_1): Likewise.
9504 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9507 * real.h (real_nextafter): Declare.
9508 * real.c (real_nextafter): New function.
9509 * fold-const-call.c (fold_const_nextafter): New function.
9510 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9511 CASE_CFN_NEXTTOWARD.
9512 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9513 even when arg1_mode is different from arg0_mode.
9515 2018-05-03 Nathan Sidwell <nathan@acm.org>
9517 * doc/extend.texi (Deprecated Features): Remove
9519 (Backwards Compatibility): Likewise.
9520 * doc/invoke.texi (C++ Language Options): Likewise.
9521 (C++ Dialect Options): Likewise.
9523 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9526 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9527 _mm512_mask_mullox_epi64): New intrinsics.
9529 2018-05-03 Tom de Vries <tom@codesourcery.com>
9532 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9533 dump files): Add offload-tree.
9535 2018-05-03 Richard Biener <rguenther@suse.de>
9537 PR tree-optimization/85615
9538 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9539 to loops not nested in BBs loop father to avoid creating multi-entry
9542 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9544 PR tree-optimization/70291
9545 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9546 arguments. Change return type to tree. Emit libcall as a new
9547 statement rather than replacing existing one when inplace_p is true.
9548 (expand_complex_multiplication_components): New function.
9549 (expand_complex_multiplication): Expand floating-point complex
9550 multiplication using the above.
9551 (expand_complex_division): Rename inner_type parameter to type.
9552 Update expand_complex_libcall call-site.
9553 (expand_complex_operations_1): Update expand_complex_multiplication
9554 and expand_complex_division call-sites.
9556 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9559 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9560 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9561 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9562 the highest significant bit of the shift count mask is clear. In
9563 check whether and[sq]i3 is needed verify that all significant bits
9564 of the shift count other than the highest are set.
9566 2018-05-02 Tom de Vries <tom@codesourcery.com>
9569 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9570 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9571 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9572 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9573 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9574 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9575 __builtin_goacc_parlevel_size.
9577 2018-05-02 Richard Biener <rguenther@suse.de>
9579 PR tree-optimization/85597
9580 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9581 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9584 2018-05-02 Tom de Vries <tom@codesourcery.com>
9587 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9588 dump files): Add ltrans-tree.
9590 2018-05-02 Tom de Vries <tom@codesourcery.com>
9593 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9594 dump files): Add wpa-ipa.
9596 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9598 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9599 powerpc*-*-linux*paired* target.
9600 * config/rs6000/750cl.h: Delete.
9601 * config/rs6000/paired.h: Delete.
9602 * config/rs6000/paired.md: Delete.
9603 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9605 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9606 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9607 comment. Remove paired float support.
9608 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9609 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9611 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9612 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9614 * config/rs6000/rs6000.c: Remove paired float support.
9615 (paired_expand_vector_init, paired_expand_vector_move,
9616 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9617 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9618 paired_expand_builtin, paired_expand_predicate_builtin,
9619 paired_init_builtins): Delete.
9620 * config/rs6000/rs6000.h: Remove paired float support.
9621 * config/rs6000/rs6000.md: Remove paired float support.
9622 (move_from_CR_ov_bit): Delete.
9623 * config/rs6000/rs6000.opt (mpaired): Delete.
9624 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9625 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9627 2018-05-02 Richard Biener <rguenther@suse.de>
9630 * gimplify.c (gimplify_save_expr): When in SSA form allow
9631 SAVE_EXPRs to compute to SSA vars.
9633 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9636 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9637 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9638 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9639 clobber operands[2], instead use a new pseudo. Formatting fixes.
9641 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9643 PR tree-optimization/85586
9644 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9645 exit early for statements in the same group if the accesses are
9648 2018-05-02 Tom de Vries <tom@codesourcery.com>
9651 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9654 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9656 PR tree-optimization/85143
9657 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9659 2018-05-01 Tom de Vries <tom@codesourcery.com>
9662 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9663 not found" error message.
9665 2018-05-01 Tom de Vries <tom@codesourcery.com>
9668 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9669 * vec.c (test_ordered_remove_if): New function.
9670 (vec_c_tests): Call test_ordered_remove_if.
9671 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9672 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9673 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9674 VEC_ORDERED_REMOVE_IF.
9676 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9678 PR tree-optimization/82665
9679 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9680 pointer subtraction where arguments come from a memchr call.
9682 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9684 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9685 --push-state --as-needed and --pop-state instead of --as-needed and
9686 --no-as-needed if ld supports it.
9687 * configure: Regenerated.
9690 * doc/install.texi2html: Replace _002d with - and _002a with * in
9691 generated html files using sed.
9693 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9696 * gcc-rich-location.c (blank_line_before_p): New function.
9697 (use_new_line): New function.
9698 (gcc_rich_location::add_fixit_insert_formatted): New function.
9699 * gcc-rich-location.h
9700 (gcc_rich_location::add_fixit_insert_formatted): New function.
9702 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9704 * selftest.c (assert_streq): Rename "expected" and "actual" to
9705 "val1" and "val2". Extend NULL-handling to cover both inputs
9706 symmetrically, while still requiring both to be non-NULL for a pass.
9707 * selftest.h (assert_streq): Rename "expected" and "actual" to
9709 (ASSERT_EQ): Likewise.
9710 (ASSERT_EQ_AT): Likewise.
9711 (ASSERT_KNOWN_EQ): Likewise.
9712 (ASSERT_KNOWN_EQ_AT): Likewise.
9713 (ASSERT_NE): Likewise.
9714 (ASSERT_MAYBE_NE): Likewise.
9715 (ASSERT_MAYBE_NE_AT): Likewise.
9716 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9717 the assertion to pass.
9718 (ASSERT_STREQ_AT): Likewise.
9720 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9722 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9723 interaction with -pie.
9725 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9727 * selftest.h: Fix alphabetization of per-source-file selftest
9730 2018-04-30 Jason Merrill <jason@redhat.com>
9732 PR c++/61982 - dead stores to destroyed objects.
9733 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9736 2018-04-30 Jason Merrill <jason@redhat.com>
9738 * tree.c (build_clobber): New.
9739 * tree.h: Declare it.
9740 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9742 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9744 * diagnostic-show-locus.c (layout::layout): Update for
9745 location_get_source_line returning a char_span.
9746 (struct char_span): Move to input.h.
9747 (struct correction): Update for fields in char_span becoming
9749 (struct source_line): Update for location_get_source_line
9750 returning a char_span.
9751 (layout::print_line): Likewise.
9752 * edit-context.c (edited_file::print_content): Likewise.
9753 (edited_file::print_diff_hunk): Likewise.
9754 (edited_file::print_run_of_changed_lines): Likewise.
9755 (edited_file::get_num_lines): Likewise.
9756 (edited_line::edited_line): Likewise.
9757 * final.c (asm_show_source): Likewise.
9758 * input.c (location_get_source_line): Convert return type
9759 from const char * to char_span, losing the final "line_len"
9761 (dump_location_info): Update for the above.
9762 (get_substring_ranges_for_loc): Likewise. Use a char_span
9763 when handling the literal within the line.
9764 (test_reading_source_line): Update for location_get_source_line
9765 returning a char_span.
9766 * input.h (class char_span): Move here from
9767 diagnostic-show-locus.c, converting from a struct to a class.
9768 Make data members private.
9769 (char_span::operator bool): New.
9770 (char_span::length): New.
9771 (char_span::get_buffer): New.
9772 (char_span::operator[]): New.
9773 (char_span::subspan): Make const.
9774 (char_span::xstrdup): New.
9775 (location_get_source_line): Convert return type from const char *
9776 to char_span, losing the final "line_size" param.
9778 2018-04-30 Jan Hubicka <jh@suse.cz>
9780 * lto-wrapper.c (ltrans_priorities): New static var.
9781 (cmp_priority): New.
9782 (run_gcc): Read priorities and if doing parallel build order
9783 the Makefile by them.
9785 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9787 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9789 2018-04-30 Richard Biener <rguenther@suse.de>
9791 * tree-cfg.c (verify_address): Remove base argument, add
9792 flag whether to check TREE_ADDRESSABLE and do that.
9793 (verify_expr): Remove.
9794 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9795 (verify_gimple_assign_single): Likewise.
9796 (verify_gimple_switch): Likewise.
9797 (verify_expr_location_1): Dereference tp once. Add (disabled)
9798 piece from verify_expr.
9799 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9801 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9803 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9805 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9807 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9808 (small_data_pattern): Likewise.
9809 (arc_rewrite_small_data): Likewise.
9810 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9811 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9812 (get_symbol_alignment): New function.
9813 (legitimate_small_data_address_p): Likewise.
9814 (legitimate_scaled_address): Update, call
9815 legitimate_small_data_address_p.
9816 (output_sdata): New static variable.
9817 (arc_print_operand): Update how we handle small data operands.
9818 (arc_print_operand_address): Likewise.
9819 (arc_legitimate_address_p): Update, use
9820 legitimate_small_data_address_p.
9821 (arc_rewrite_small_data_p): Remove.
9822 (arc_rewrite_small_data_1): Likewise.
9823 (arc_rewrite_small_data): Likewise.
9824 (small_data_pattern): Likewise.
9825 (compact_sda_memory_operand): Update to use
9826 legitimate_small_data_address_p and get_symbol_alignment.
9827 (prepare_move_operands): Don't rewite sdata pattern.
9828 (prepare_extend_operands): Remove.
9829 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9831 (zero_extendqisi2): Likewise.
9832 (zero_extendhisi2): Likewise.
9833 (extendqihi2): Likewise.
9834 (extendqisi2): Likewise.
9835 (extendhisi2): Likewise.
9839 * config/arc/constraints.md (Usd): Change it to memory constraint.
9841 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9843 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9844 as source of std instructions.
9845 * config/arc/arc.md (movsi_insn): Update pattern predicate to
9846 allow 6-bit constants as source for store instructions.
9847 (movdi_insn): Update instruction pattern to allow 6-bit constants
9848 as source for store instructions.
9850 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9852 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9854 2018-04-30 Nathan Sidwell <nathan@acm.org>
9855 Sandra Loosemore <sandra@codesourcery.com>
9857 * dumpfile.c (dump_open): Allow '-' for stdout.
9858 * doc/invoke.texi (Developer Options): Document dump filename
9859 determination early. Document stdin/stdout selection.
9861 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
9863 Microblaze Target: PIC data text relative
9865 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9866 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9868 * config/microblaze/microblaze.h (microblaze_constant_address_p):
9869 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9870 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9871 New addressing mode for data-text relative position indepenedent code.
9872 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9873 'ADDRESS_SYMBOLIC_TXT_REL'.
9874 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9875 (microblaze_legitimate_pic_operand): Exclude function calls from
9876 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9877 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9879 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9880 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9881 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9882 for 'address + offset'.
9883 (microblaze_expand_prologue): Add new function prologue call for
9885 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9886 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9887 table in case of TARGET_PIC_DATA_TEXT_REL.
9888 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9889 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9890 Add new macros 'UNSPEC_TEXT',
9891 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9892 + exclude function calls from 'UNSPEC_PLT' in case of data text
9894 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9895 new target hook for generating address diff vector tables in case of
9897 * doc/tm.texi : Regenerate.
9898 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9899 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9900 of addr diff vector generation.
9901 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9902 target hook definition.
9903 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9904 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9905 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9906 option for data text relative.
9908 2018-04-30 Richard Biener <rguenther@suse.de>
9910 * tree-chrec.h (evolution_function_is_constant_p): Remove
9912 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9914 2018-04-30 Richard Biener <rguenther@suse.de>
9917 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9919 2018-04-30 Richard Biener <rguenther@suse.de>
9921 PR tree-optimization/28364
9922 PR tree-optimization/85275
9923 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9924 copying first exit test.
9926 2018-04-28 Mark Wielaard <mark@klomp.org>
9928 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9930 (dwarf_AT): Handle DW_AT_addr_base.
9931 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9933 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9936 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9937 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9938 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9939 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9941 2018-04-28 Richard Biener <rguenther@suse.de>
9943 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9944 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9945 to reflect use. Only add interesting stmts.
9947 2018-04-27 Martin Jambor <mjambor@suse.cz>
9950 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9951 the jump function allows for passing through aggregate values.
9953 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9955 * input.h (in_system_header_at): Convert from macro to inline
9957 (from_macro_expansion_at): Likewise.
9958 (from_macro_definition_at): Likewise.
9960 2018-04-27 Jeff Law <law@redhat.com>
9962 * config.gcc: Mark tile* targets as deprecated/obsolete.
9964 2018-04-27 Richard Biener <rguenther@suse.de>
9966 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9969 2018-04-27 Richard Biener <rguenther@suse.de>
9971 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9973 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9975 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9976 with Yd constraint. Set "preferred_for_speed" attribute from
9977 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9979 (*movdi_internal): Ditto.
9980 (movti_interunit splitters): Remove
9981 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9982 (movdi_interunit splitters): Ditto.
9983 * config/i386/constraints.md (Ye): Remove.
9984 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9986 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9989 * config/aarch64/constraints.md (Usg): Limit to 31.
9992 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9994 PR tree-optimization/85529
9995 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9996 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9997 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9998 zero extension or masking of the MSB bit.
9999 (optimize_range_tests): Add FIRST_BB argument, pass it through
10000 to optimize_range_tests_var_bound.
10001 (maybe_optimize_range_tests, reassociate_bb): Adjust
10002 optimize_range_tests callers.
10004 2018-04-26 Richard Biener <rguenther@suse.de>
10005 Jakub Jelinek <jakub@redhat.com>
10007 * cgraph.h (symbol_table): Just declare debug method here.
10008 * symtab.c (symbol_table::debug): Define.
10010 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10012 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10014 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10016 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10017 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10018 (*movdi_internal): Substitute Yi and Yj constraint with x
10019 and Ym and Yn constraint with y constraint. Update "isa"
10020 attribute and set "preferred_for_speed" attribute from
10021 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10022 (*movsi_internal): Ditto.
10023 (*movdf_internal): Ditto.
10024 (*movsf_internal): Ditto.
10025 (*zero_extendsidi2): Ditto.
10026 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10027 (sse2_loadld): Ditto.
10028 (*vec_extract<ssevecmodelower>_0): Ditto.
10029 (*vec_extractv4si_0_zext_sse4): Ditto.
10030 (vec_concatv2di): Ditto.
10031 (*vec_dup<mode>): Ditto.
10032 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10033 * config/i386/constraints.md (Yi): Remove.
10038 2018-04-26 Nathan Sidwell <nathan@acm.org>
10040 * dumpfile.c (dump_open): New.
10041 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10042 (dump_finish): Detect stdio/stderr by value not name.
10044 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10046 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10048 2018-04-26 Tom de Vries <tom@codesourcery.com>
10051 * config/nvptx/nvptx.c (verify_neutering_jumps)
10052 (verify_neutering_labels): New function
10053 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10055 2018-04-26 Tom de Vries <tom@codesourcery.com>
10058 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10059 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10062 2018-04-26 Richard Biener <rguenther@suse.de>
10063 Tom de Vries <tom@codesourcery.com>
10066 * lto-streamer-out.c (output_function): Fixup loops if required to match
10067 discovery done in the reader.
10069 2018-04-26 Richard Biener <rguenther@suse.de>
10071 PR tree-optimization/85116
10072 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10073 have a loop exit from the single latch predecessor. Remove
10074 case of header with just condition.
10075 (ch_base::copy_headers): Exclude infinite loops from any
10077 (pass_ch::execute): Record exits.
10079 2018-04-26 Richard Biener <rguenther@suse.de>
10081 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10082 prologue cost vector and pass it to vect_get_load_cost.
10083 (vect_get_peeling_costs_all_drs): Likewise.
10084 (vect_peeling_hash_get_lowest_cost): Likewise.
10085 (vect_enhance_data_refs_alignment): Likewise.
10087 2018-04-26 Richard Biener <rguenther@suse.de>
10089 PR middle-end/85450
10090 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10091 checking of integer<->pointer conversions.
10092 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10093 sign-/zero-extending pointer types.
10094 (expand_omp_for_static_chunk): Likewise.
10096 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10097 Jean Lee <xiaoyur347@gmail.com>
10099 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10100 (TARGET_ASAN_SHADOW_OFFSET): Define.
10101 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10102 true for -fsanitize=address.
10104 2018-04-25 Mark Wielaard <mark@klomp.org>
10106 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10109 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10111 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10112 than "alu", remove explicit "memory" and "imm_disp" attributes.
10113 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10115 PR middle-end/85414
10116 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10117 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10118 gen_lowpart_no_emit.
10120 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10123 * config/i386/i386.c (ix86_expand_builtin): Change memory
10124 operand to XI, extend p0 to Pmode.
10125 * config/i386/i386.md: Change unspec volatile and operand
10126 1 mode to XI, change operand 0 mode to P.
10128 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10130 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10131 GET_MODE_MASK before any checking.
10132 (nds32_can_use_bset_p): Likewise.
10133 (nds32_can_use_btgl_p): Likewise.
10135 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10137 * config/nds32/nds32-doubleword.md: New define_split pattern for
10138 illegal register number.
10140 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10142 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10144 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10146 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10148 2018-04-25 Richard Biener <rguenther@suse.de>
10150 * lto-streamer.h (LTO_major_version): Bump to 8.
10152 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10154 * BASE-VER: Set to 9.0.0.
10156 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10158 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10159 in __abskf2 and __powikf2.
10161 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10164 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10165 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10166 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10167 Use the above on operand 2. Reindent.
10168 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10170 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10173 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10175 * config/i386/i386.opt (mcet): Removed.
10176 * doc/install.texi: Remove -mcet documentation.
10177 * doc/invoke.texi: Likewise.
10179 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10182 * doc/install.texi: Remove -mcet from bootstrap-cet.
10184 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10187 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10188 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10192 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10193 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10194 containing a CONST_VECTOR.
10196 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10198 * doc/install.texi: Update newlib dependency for nvptx.
10200 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10203 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10204 instead of INTVAL when shifting x left.
10206 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10208 PR tree-optimization/85478
10209 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10210 vect_grouped_store_supported for single element vectors.
10212 2018-04-24 Richard Biener <rguenther@suse.de>
10215 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10216 load cost increase to the case of non-constant step.
10218 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10221 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10222 destination if any_malformed_asm.
10224 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10226 PR middle-end/85496
10227 * expr.c (store_field): In the bitfield case, if the value comes from
10228 a function call and is returned in registers by means of a PARALLEL,
10229 do not change the mode of the temporary unless BLKmode and VOIDmode.
10231 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10233 PR rtl-optimization/85423
10234 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10235 dependencies to debug insns when the previous insn is non-debug.
10237 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10239 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10240 enums into a single definition.
10241 (fls): Fix predicates and printing.
10244 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10246 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10247 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10248 and short u6 immediate.
10249 (check_if_valid_sleep_operand): Remove.
10250 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10252 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10254 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10255 flag_always_save_lp condition.
10256 * config/nds32/nds32.opt (malways-save-lp): New option.
10258 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10260 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10261 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10262 * config/nds32/nds32.h
10263 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10264 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10266 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10268 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10269 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10271 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10272 Chung-Ju Wu <jasonwucj@gmail.com>
10274 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10276 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10277 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10279 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10281 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10283 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10285 * config/nds32/nds32-protos.h (nds32_data_alignment,
10286 nds32_local_alignment): Declare.
10287 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10288 nds32_local_alignment): New functions.
10289 (TARGET_CONSTANT_ALIGNMENT): Define.
10290 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10292 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10294 * config/nds32/nds32.c
10295 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10296 (TARGET_MODES_TIEABLE_P): Likewise.
10298 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10300 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10301 level Ofast and Og.
10303 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10304 Chung-Ju Wu <jasonwucj@gmail.com>
10306 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10307 for unaligned access.
10308 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10310 * config/nds32/nds32-intrinsic.md: Likewise.
10311 * config/nds32/nds32_intrinsic.h: Likewise.
10312 * config/nds32/nds32.h (nds32_builtins): Likewise.
10313 * config/nds32/nds32.opt (munaligned-access): New option.
10314 * config/nds32/nds32.c (nds32_asm_file_start): Display
10315 flag_unaligned_access status.
10317 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10319 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10320 -mno-relax is present.
10321 * config/riscv/linux.h (LINK_SPEC): Ditto.
10323 2018-04-20 Martin Sebor <msebor@redhat.com>
10326 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10328 (gimple_fold_builtin_stxcpy_chk): Same.
10329 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10331 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10334 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10335 __powikf2 when long double is IEEE 128-bit.
10337 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10339 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10340 step to make sure stack always aligned.
10342 2018-04-20 Carl Love <cel@us.ibm.com>
10345 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10346 size check for arg0.
10348 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10349 Tom de Vries <tom@codesourcery.com>
10352 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10353 Emit insns for calls too.
10354 (nvptx_find_par): Always look for worker-level predecessor insn.
10355 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10357 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10358 (nvptx_process_pars): Propagate frames for calls.
10360 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10363 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10365 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10366 (ix86_handle_option): Don't handle OPT_mibt.
10367 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10369 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10371 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10372 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10373 (ix86_target_macros): Define __CET__ with flag_cf_protection
10374 for -fcf-protection.
10375 * config/i386/i386.c (isa2_opts): Remove -mibt.
10376 * config/i386/i386.h (TARGET_IBT): Removed.
10377 (TARGET_IBT_P): Likewise.
10378 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10379 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10380 * config/i386/i386.opt (mcet): Update help message.
10381 (mshstk): Likewise.
10383 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10384 -mcet as an alias for -mshstk.
10386 2018-04-20 Richard Biener <rguenther@suse.de>
10388 PR middle-end/85475
10389 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10390 complexity by forcing a single use of the multiply operand.
10392 2018-04-20 Martin Jambor <mjambor@suse.cz>
10395 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10396 recursion dependency to only apply to non-clones.
10398 2018-04-20 Martin Jambor <mjambor@suse.cz>
10401 * ipa-cp.c (create_specialized_node): Check that clones of
10402 self-recursive edges exist during IPA-CP.
10404 2018-04-19 Toon Moene <toon@moene.org>
10406 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10409 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10411 PR tree-optimization/85467
10412 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10413 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10414 VECTOR_CST element to type.
10416 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10419 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10420 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10421 (builtin_longjmp): Likewise.
10422 (save_stack_nonlocal): New pattern.
10423 (restore_stack_nonlocal): Likewise.
10425 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10428 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10429 Replace ASM_OUTPUT_LABEL with fprintf.
10431 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10434 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10435 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10436 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10437 define __IBT__ and __SHSTK__ for -fcf-protection.
10438 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10440 (ix86_trampoline_init): Likewise.
10441 (x86_output_mi_thunk): Likewise.
10442 (ix86_notrack_prefixed_insn_p): Likewise.
10443 (ix86_option_override_internal): Don't disallow -fcf-protection.
10444 * config/i386/i386.md (rdssp<mode>): Also enable for
10446 (incssp<mode>): Likewise.
10447 (nop_endbr): Likewise.
10448 * config/i386/i386.opt (mcet): Change help message to built-in
10451 (mshstk): Likewise.
10452 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10453 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10454 enable CET built-in functions.
10456 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10458 * common/config/i386/i386-common.c
10459 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10460 OPTION_MASK_ISA_MOVDIRI_UNSET,
10461 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10462 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10463 * config.gcc (movdirintrin.h): New header.
10464 * config/i386/cpuid.h (bit_MOVDIRI,
10465 bit_MOVDIR64B): New bits.
10466 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10468 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10469 (VOID, PVOID, PCVOID)): New function types.
10470 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10471 __builtin_ia32_directstoreu_u64,
10472 __builtin_ia32_movdir64b): New builtins.
10473 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10474 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10476 (ix86_valid_target_attribute_inner_p): Ditto.
10477 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10478 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10479 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10480 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10481 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10482 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10483 (movdiri<mode>, movdir64b_<mode>): New.
10484 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10485 * config/i386/immintrin.h: Include movdirintrin.h.
10486 * config/i386/movdirintrin.h: New file.
10487 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10489 2018-04-19 Richard Biener <rguenther@suse.de>
10491 PR middle-end/85455
10492 * cfg.c (clear_bb_flags): When loop state says we have
10493 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10495 2018-04-19 Richard Biener <rguenther@suse.de>
10497 PR tree-optimization/84737
10498 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10499 copying restrict info.
10500 (vect_setup_realignment): Use it.
10501 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10502 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10503 the first DR to all generated stores.
10504 (vectorizable_load): Likewise for loads.
10506 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10508 PR tree-optimization/85446
10509 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10510 the integral and pointer types to have the same precision.
10512 * doc/install.texi: Document --disable-cet being the default and
10515 2018-04-18 Martin Liska <mliska@suse.cz>
10517 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10520 2018-04-18 Martin Liska <mliska@suse.cz>
10523 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10526 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10527 arguments if they are comparable.
10529 2018-04-18 Martin Liska <mliska@suse.cz>
10532 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10535 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10538 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10541 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10542 ENDBR after calling __morestack.
10544 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10547 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10548 by using gcc_base_ver to generate a gcc_driver_version, and use
10549 it when generating GCC_DRIVER_NAME.
10550 * configure: Regenerate.
10552 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10555 * config.gcc: Obsolete powerpc*-*-*spe*.
10557 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10560 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10561 (stabstr_D): Change type of unum from unsigned int to
10562 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10565 2018-04-17 Jim Wilson <jimw@sifive.com>
10568 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10569 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10570 Set arg_pointer_offset after using pretend_args_size.
10572 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10574 PR rtl-optimization/85431
10575 * dse.c (record_store): Ignore zero width stores.
10578 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10579 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10580 __builtin_stack_restore rather than after it.
10581 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10582 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10583 argument instead of virtual_dynamic_stack_rtx.
10585 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10587 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10589 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10590 Add note to error message to explain internal mapping of overloaded
10591 built-in function name to non-overloaded built-in function name.
10592 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10595 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10598 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10599 where the inputs overlap with the output.
10601 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10603 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10604 (=v, v) alternative and explicit "memory" attribute.
10605 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10606 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10608 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10609 "sselog1" type instead of "sselog".
10610 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10611 "sselog". Remove explicit "memory" attribute.
10612 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10613 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10615 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10616 "sselog1" type instead of "sselog". Remove explicit "memory"
10618 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10619 use "sselog1" type instead of "sselog". Remove explicit "memory"
10621 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10622 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10624 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10625 "sselog1" type instead of "sselog". Remove explicit "memory"
10627 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10628 use "sselog1" type instead of "sselog". Remove explicit "memory"
10632 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10634 PR middle-end/85414
10635 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10638 2018-04-17 Martin Jambor <mjambor@suse.cz>
10641 * ipa-cp.c (create_specialized_node): Call
10642 expand_all_artificial_thunks if necessary.
10644 2018-04-17 Martin Liska <mliska@suse.cz>
10647 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10648 in message, remote space in between '_G' and '('.
10650 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10653 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10654 avx512f_vmcmp<mode>3<round_saeonly_name>,
10655 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10656 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10657 avx512f_rndscale<mode><round_saeonly_name>,
10658 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10659 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10660 Use %<iptr>2 instead of %2 for -masm=intel.
10661 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10662 avx512f_vcvttss2usi<round_saeonly_name>,
10663 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10665 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10666 avx512f_vcvttsd2usi<round_saeonly_name>,
10667 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10668 Use %q1 instead of %1 for -masm=intel.
10669 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10670 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10671 of %3 for -masm=intel.
10672 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10674 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10676 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10678 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10679 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10681 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10683 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10684 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10685 %g1 and one with %0 and %1.
10686 (avx512er_vmrcp28<mode><round_saeonly_name>,
10687 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10688 %1 for -masm=intel.
10689 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10690 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10691 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10692 of %0 and %{%4%} for -masm=intel.
10693 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10694 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10695 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10696 order of %0 and %{%5%}%{z%} for -masm=intel.
10698 2018-04-17 Jan Hubicka <jh@suse.cz>
10701 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10703 2018-04-17 Martin Liska <mliska@suse.cz>
10706 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10707 for target_clone error message. Make default implementation
10708 clone to be a local declaration.
10709 (separate_attrs): Add new argument and check for an empty
10711 (expand_target_clones): Handle it.
10712 (ipa_target_clone): Make redirection just for target_clones
10715 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10716 Tom de Vries <tom@codesourcery.com>
10718 PR middle-end/84955
10719 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10720 tiled basic blocks without omp continue statements.
10722 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10725 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10726 vec_extract expression as having side effects to make sure it gets
10729 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10732 * config/i386/i386.c (get_builtin_code_for_version): Check
10735 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10738 * config.gcc: Support "skylake".
10739 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10741 * config/i386/i386.c (m_SKYLAKE): Define.
10742 (processor_target_table): Add "skylake".
10743 (ix86_option_override_internal): Add "skylake".
10744 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10745 PROCESSOR_CANNONLAKE.
10746 (get_builtin_code_for_version): Fix priority for
10747 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10748 PROCESSOR_SKYLAKE-AVX512.
10749 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10750 (processor_type): Add PROCESSOR_SKYLAKE.
10752 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10753 Jason Merrill <jason@redhat.com>
10756 * convert.c (convert_to_integer_1): Use direct recursion for
10757 enumeral types and types with a precision less than the number
10758 of bits in their mode.
10760 2018-04-16 Julia Koval <julia.koval@intel.com>
10763 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10764 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10766 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10769 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10770 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10771 and -mno-direct-move.
10773 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10776 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10777 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10778 Ensure negative shifts result in {0}.
10780 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10782 PR rtl-optimization/79916
10783 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10784 regs (if any) to define how to gnerate SD moves when LRA is in
10787 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10789 PR rtl-optimization/85393
10790 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10791 * except.c (expand_dw2_landing_pad_for_region): Make static.
10792 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10793 a label and unconditional jump to old_bb, rather than
10794 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10797 PR rtl-optimization/85376
10798 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10799 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10800 instead of a specific value.
10802 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10803 Bin Cheng <bin.cheng@arm.com>
10805 PR tree-optimization/82965
10806 PR tree-optimization/83991
10807 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10808 by_profile_only parameter.
10809 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10810 information if the loop was predicted to iterate too many times.
10811 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10813 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10816 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10819 2018-04-13 Martin Liska <mliska@suse.cz>
10820 Jakub Jelinek <jakub@redhat.com>
10822 PR middle-end/81657
10823 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10824 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10825 * builtins.c (expand_builtin_memory_copy_args): Use
10826 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10827 handle dest_addr == pc_rtx.
10829 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
10832 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10833 asked to not generate direct moves.
10834 (fix_trunc<mode>si2_stfiwx): Similar.
10835 (fix_trunc<mode>si2_internal): Similar.
10837 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10840 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10841 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10842 lookup if dest in some wider mode is known to be const0_rtx and
10843 if so, record permanent equivalence for it to be ZERO_EXTEND of
10844 the narrower mode destination.
10846 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10848 * lto-streamer-out.c (output_function): Revert 259346.
10849 * omp-expand.c (expand_oacc_for): Likewise.
10851 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
10853 PR rtl-optimization/85354
10854 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10855 * sel-sched.c (sel_global_init): ... here.
10857 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
10860 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10861 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10862 mode for PE-COFF targets.
10863 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10864 (i386_pe_asm_lto_end): Likewise.
10865 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10866 (TARGET_ASM_LTO_END): Likewise.
10867 * config/i386/winnt.c (saved_debug_info_level): New static variable.
10868 (i386_pe_asm_lto_start): New function.
10869 (i386_pe_asm_lto_end): Likewise.
10871 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10872 Richard Biener <rguenther@suse.de>
10874 PR middle-end/84955
10875 * lto-streamer-out.c (output_function): Fix CFG loop state before
10877 * omp-expand.c (expand_oacc_for): Handle calls to internal
10878 functions like regular functions.
10880 2018-04-12 Richard Biener <rguenther@suse.de>
10883 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10884 for the early LTO debug to properly generate references to it
10885 during DIE emission. Do not re-use that for the skeleton for
10887 (dwarf2out_early_finish): Likewise.
10889 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10892 * config/i386/sse.md
10893 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10894 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10895 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10896 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10897 and output is a reg, avoid creating invalid lowpart subreg, but
10898 instead split into a 512-bit move. Don't split if not AVX512VL,
10899 input is xmm16+ reg and output is a mem.
10900 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10901 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10902 xmm16+ reg and output is a mem.
10904 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10906 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10907 also for flag_dwarf2_cfi_asm.
10909 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10911 PR rtl-optimization/85342
10912 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10913 a bool scalar var inside of the loop instead. Don't try to update
10914 recog_data.operand after failed apply_change_group.
10916 2018-04-12 Tom de Vries <tom@codesourcery.com>
10919 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10920 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10921 array with flexible array member as array without given dimension.
10922 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10923 argument for undefined param to true.
10925 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10928 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10929 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10930 from PowerPC section.
10931 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10932 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10933 help text that is too long.
10934 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10935 help text that is too long.
10936 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10937 help text that is too long.
10939 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10941 * config/alpha/alpha.md (stack_probe_internal): Rename
10942 from "probe_stack". Update all callers.
10944 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10946 PR rtl-optimization/84566
10947 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10948 sched_macro_fuse_insns.
10950 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10953 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10954 (compute_block_dependences): ... from here.
10956 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10958 PR tree-optimization/85331
10959 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10960 from int to HOST_WIDE_INT.
10962 2018-04-11 Martin Jambor <mjambor@suse.cz>
10965 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10966 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10967 not the same as the source val.
10968 (cgraph_edge_brings_value_p): New parameter.
10969 (gather_edges_for_value): Pass destination value to
10970 cgraph_edge_brings_value_p.
10971 (perhaps_add_new_callers): Likewise.
10972 (get_info_about_necessary_edges): Likewise and exclude values brought
10973 only by self-recursive edges.
10974 (create_specialized_node): Redirect only clones of self-calling edges.
10975 (+self_recursive_pass_through_p): New function.
10976 (find_more_scalar_values_for_callers_subset): Use it.
10977 (find_aggregate_values_for_callers_subset): Likewise.
10978 (known_aggs_to_agg_replacement_list): Removed.
10979 (decide_whether_version_node): Re-calculate known constants for all
10980 remaining context clones.
10982 2018-04-11 Richard Biener <rguenther@suse.de>
10985 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10986 from early DWARF output.
10987 (dwarf2out_early_finish): Output line info unconditionally into
10988 early DWARF and add reference to it.
10990 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10993 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10994 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10995 other than V2DFmode using iptr mode attribute.
10996 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10998 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11000 PR rtl-optimization/84659
11001 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11003 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11006 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11008 (output_loc_list): Pass address of a dummy size variable even in the
11009 locview handling loop.
11010 (index_location_lists): Add comment on why skip_loc_list_entry can't
11013 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11016 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11019 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11022 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11023 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11024 and -mstring-compare-inline-limit.
11026 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11029 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11030 for stack clash protection in a register whenever we need it to be in
11033 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11035 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11036 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11038 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11041 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11043 (mlong-double-): Ditto.
11044 * config/rs6000/sysv4.opt (msdata=): Ditto.
11045 (mtls-size=): Ditto.
11047 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11049 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11050 erroneous entries for
11051 "vector int vec_ldl (int, long int *)", and
11052 "vector unsigned int vec_ldl (int, unsigned long int *)".
11053 Add comments and entries for
11054 "vector bool char vec_ldl (int, bool char *)",
11055 "vector bool short vec_ldl (int, bool short *)",
11056 "vector bool int vec_ldl (int, bool int *)",
11057 "vector bool long long vec_ldl (int, bool long long *)",
11058 "vector pixel vec_ldl (int, pixel *)",
11059 "vector long long vec_ldl (int, long long *)",
11060 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11061 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11062 type tree bool_long_long_type_node and correct definition of
11063 bool_V2DI_type_node to make reference to this new type tree.
11064 (rs6000_mangle_type): Replace erroneous reference to
11065 bool_long_type_node with bool_long_long_type_node.
11066 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11067 comments to emphasize sign distinctions for char and int types and
11068 replace RS6000_BTI_bool_long constant with
11069 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11070 use of RS6000_BTI_pixel.
11071 (bool_long_type_node): Remove this macro definition.
11072 (bool_long_long_type_node): New macro definition
11074 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11076 PR rtl-optimization/85300
11077 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11078 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11079 simplify_unary_operation fails.
11081 2018-04-10 Martin Liska <mliska@suse.cz>
11083 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11084 cgraph_edge and ipa_ref.
11086 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11090 * config/i386/sse.md
11091 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11092 computation of the VEC_MERGE selector from mask.
11093 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11094 Fix decoding of the VEC_MERGE selector into mask.
11096 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11098 PR tree-optimization/85286
11099 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11101 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11103 * final.c (final_1): Set insn_last_address as well as
11104 insn_current_address.
11106 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11109 * explow.c (emit_stack_probe): Call validize_mem on memory location
11110 before passing it to gen_probe_stack. Create address operand and
11111 legitimize it for the probe_stack_address case.
11113 2018-04-09 Jan Hubicka <jh@suse.cz>
11116 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11117 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11118 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11120 (free_lang_data): Rebuild type inheritance graph.
11122 2018-04-09 Martin Sebor <msebor@redhat.com>
11124 * invoke.texi (-finline-small-functions): Mention other optimization
11126 (-findirect-inlining, -fpartial-inlining): Same.
11127 (-finline-functions-called-once): Same.
11128 (-freorder-blocks-and-partition): Same.
11130 2018-04-09 Jan Hubicka <jh@suse.cz>
11133 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11134 jumps; choose last target that matches the criteria (i.e.
11135 no partition changes for non-crossing jumps).
11136 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11137 support for redirecting crossing jumps to non-crossing.
11139 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11141 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11142 also for naked functions.
11144 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11146 * config/arc/arc.md (add_shift): New pattern.
11147 (add_shift2): Likewise.
11148 (sub_shift): Likewise.
11149 (sub_shift_cmp0_noout): Likewise.
11150 (compare_si_ashiftsi): Likewise.
11151 (xbfu_cmp0_noout): New combine pattern.
11152 (xbfu_cmp0"): Likewise.
11153 (movsi_set_cc_insn): Place the predicable variant first.
11154 (commutative_binary_cmp0_noout): Remove clobber.
11155 (commutative_binary_cmp0): New pattern.
11156 (noncommutative_binary_cmp0): Likewise.
11157 (noncommutative_binary_cmp0_noout): Likewise.
11158 (noncommutative_binary_comparison_result_used): Removed.
11159 (rsub_cmp0): New pattern.
11160 (rsub_cmp0_noout): Likewise.
11161 (extzvsi): Changed, keep only meaningful variants.
11162 (SQH, SEZ): New iterators.
11163 (SQH_postfix): New mode attribute.
11164 (SEZ_prefix): New code attribute.
11165 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11166 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11167 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11168 of numerical value.
11169 (noncommutative_operator): Check the availability of barrel
11172 2018-04-09 Richard Biener <rguenther@suse.de>
11174 PR tree-optimization/85284
11175 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11176 Only use the niter constraining form of simple_iv when the exit
11177 is always executed.
11179 2018-04-09 Tom de Vries <tom@codesourcery.com>
11182 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11183 (define_expand "*memory_barrier"): New define_expand.
11184 (define_insn "memory_barrier"): New insn.
11186 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11188 PR rtl-optimization/80463
11189 PR rtl-optimization/83972
11190 PR rtl-optimization/83480
11192 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11193 correct producer for the insn.
11194 (tidy_control_flow): Fixup seqnos in case of debug insns.
11196 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11198 PR rtl-optimization/83913
11200 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11201 different sched-times when merging exprs.
11203 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11205 PR rtl-optimization/83962
11207 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11208 tidy_fallthru_edge and tidy_control_flow.
11210 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11212 PR rtl-optimization/83530
11214 * sel-sched.c (force_next_insn): New global variable.
11215 (remove_insn_for_debug): When force_next_insn is true, also leave only
11216 next insn in the ready list.
11217 (sel_sched_region): When the region wasn't scheduled, make another pass
11218 over it with force_next_insn set to 1.
11220 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11222 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11224 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11225 for interrupt control.
11226 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11227 functions for interrupt control.
11228 * config/nds32/nds32-intrinsic.md: Likewise.
11229 * config/nds32/nds32_intrinsic.h: Likewise.
11230 * config/nds32/nds32.h (nds32_builtins): Likewise.
11232 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11234 * config/nds32/nds32.c (nds32_init_machine_status,
11235 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11236 strict_aligned_p field.
11237 (nds32_expand_to_rtl_hook): New function.
11238 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11239 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11241 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11242 Chung-Ju Wu <jasonwucj@gmail.com>
11244 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11245 * config/nds32/nds32-n7.md: New file.
11246 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11247 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11249 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11250 * config/nds32/nds32.md (pipeline_model): Add n7.
11251 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11252 * config/nds32/pipelines.md: Include n7 settings.
11254 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11255 Chung-Ju Wu <jasonwucj@gmail.com>
11257 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11258 * config/nds32/nds32-e8.md: New file.
11259 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11260 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11262 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11263 * config/nds32/nds32.md (pipeline_model): Add e8.
11264 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11265 * config/nds32/pipelines.md: Include e8 settings.
11267 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11268 Chung-Ju Wu <jasonwucj@gmail.com>
11270 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11271 * config/nds32/nds32-n8.md: New file.
11272 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11273 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11275 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11276 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11277 * config/nds32/nds32.md (pipeline_model): Add n8.
11278 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11279 * config/nds32/pipelines.md: Include n8 settings.
11281 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11282 Chung-Ju Wu <jasonwucj@gmail.com>
11284 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11285 * config/nds32/nds32-n9-2r1w.md: New file.
11286 * config/nds32/nds32-n9-3r2w.md: New file.
11287 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11288 nds32_register_ports): New or modify for cpu n9.
11289 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11291 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11292 * config/nds32/nds32-utils.c: New file.
11293 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11294 TARGET_MUL_SLOW): Define.
11295 * config/nds32/nds32.md (pipeline_model): New attribute.
11296 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11297 New options that support cpu n9.
11298 * config/nds32/pipelines.md: Include n9 settings.
11299 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11301 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11303 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11304 information if necessary.
11305 (output_cond_branch_compare_zero): Likewise.
11306 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11307 (nds32_target_alignment): Refine for alignment.
11308 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11309 (FUNCTION_BOUNDARY): Modify.
11310 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11312 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11314 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11316 * config/nds32/constants.md (unspec_volatile_element): Add values for
11317 TLB operation and data prefetch.
11318 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11319 functions for TLB operation and data prefetch.
11320 * config/nds32/nds32-intrinsic.md: Likewise.
11321 * config/nds32/nds32_intrinsic.h: Likewise.
11322 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11323 (nds32_print_operand): Likewise.
11324 * config/nds32/nds32.h (nds32_builtins): Likewise.
11326 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11327 Andrew Pinski <pinsika@gcc.gnu.org>
11329 PR middle-end/82976
11330 * match.pd: Use constant_boolean_node of correct type instead of
11331 boolean_true_node or boolean_false_node for simplifying
11332 pointer comparisons to zero.
11334 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11336 PR tree-optimization/80021
11337 * tree.c (verify_type_variant): Make error call in verify_variant_match
11338 translatable and remove final full stop.
11340 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11342 * config/nds32/constants.md (unspec_volatile_element): Add
11343 UNSPEC_VOLATILE_EH_RETURN.
11344 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11345 nds32_output_stack_pop): Support dwarf exception handling process.
11346 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11347 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11348 exception handling process.
11349 (nds32_compute_stack_frame): Likewise.
11350 (nds32_return_addr_rtx): Likewise.
11351 (nds32_initial_elimination_offset): Likewise.
11352 (nds32_expand_prologue): Likewise.
11353 (nds32_expand_epilogue): Likewise.
11354 (nds32_dynamic_chain_address): New function.
11355 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11356 exception handling.
11357 (DYNAMIC_CHAIN_ADDRESS): Define.
11358 (EH_RETURN_DATA_REGNO): Define.
11359 (EH_RETURN_STACKADJ_RTX): Define.
11360 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11361 patterns for dwarf exception handling.
11363 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11365 * config/nds32/nds32.h: Clean up obsolete macros.
11367 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11369 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11370 Add enum values for particular instructions.
11371 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11372 particular intrinsic functions.
11373 * config/nds32/nds32-intrinsic.md: Likewise.
11374 * config/nds32/nds32_intrinsic.h: Likewise.
11375 * config/nds32/nds32.h (nds32_builtins): Likewise.
11376 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11377 (btst, ave): New patterns for particular instructions.
11379 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11381 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11382 Add enum values for atomic load/store and memory sync.
11383 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11385 * config/nds32/nds32-intrinsic.md: Likewise.
11386 * config/nds32/nds32_intrinsic.h: Likewise.
11387 * config/nds32/nds32.h (nds32_builtins): Likewise.
11389 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11391 PR tree-optimization/85257
11392 * fold-const.c (native_encode_vector): If not all elts could fit
11393 and off is -1, return 0 rather than offset.
11394 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11395 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11396 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11397 adjust buffer in native_interpret_expr call.
11399 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11401 * config/nds32/constants.md (unspec_volatile_element): Add cache
11402 control enum values.
11403 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11404 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11405 * config/nds32/nds32.c (nds32_cctl_names): New.
11406 (nds32_print_operand): Handle cache control register names.
11407 * config/nds32/nds32.h (nds32_builtins): New enum values.
11408 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11410 * config/nds32/nds32.md (type): Add mmu.
11411 * config/nds32/pipelines.md (simple_insn): Add mmu.
11413 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11415 * config/nds32/nds32.md (type): Remove call.
11416 * config/nds32/pipelines.md (simple_insn): Likewise.
11418 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11420 * config/nds32/constants.md (unspec_volatile_element): Add
11421 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11422 UNSPEC_VOLATILE_FMFCFG.
11423 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11424 description for fmfcfg and fmfcsr.
11425 (bdesc_1arg): Add fmtcsr.
11426 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11427 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11428 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11429 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11430 unspec_fmfcfg): New patterns.
11431 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11432 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11433 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11434 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11435 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11436 __nds32__fmfcfg): Define.
11438 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11440 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11441 intrinsic register names.
11442 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11443 intrinsic register enum values and macros.
11445 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11447 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11448 for load/store addressing form.
11449 (nds32_print_operand_address): Likewise.
11451 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11454 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11455 based on LABEL_REF. Remove useless assertion.
11456 (pic_address_needs_scratch): Fix formatting.
11457 (sparc_legitimize_pic_address): Minor tweaks.
11458 (sparc_delegitimize_address): Adjust assertion accordingly.
11459 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11460 into symbolic_operand.
11461 (movsi_high_pic_label_ref): Likewise.
11462 (movsi_lo_sum_pic_label_ref): Likewise.
11463 (movdi_pic_label_ref): Likewise.
11464 (movdi_high_pic_label_ref): Likewise.
11465 (movdi_lo_sum_pic_label_ref): Likewise.
11467 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11469 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11470 custom LIB_SPEC setup.
11472 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11473 Kito Cheng <kito.cheng@gmail.com>
11475 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11476 * config/riscv/freebsd.h: New.
11478 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11480 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11481 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11484 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11485 Kito Cheng <kito.cheng@gmail.com>
11487 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11488 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11489 * config/nds32/nds32-protos.h (nds32_output_call,
11490 nds32_output_return): Declare.
11491 * config/nds32/nds32.md: Refine all the call and return patterns.
11493 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11496 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11497 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11499 PR rtl-optimization/84872
11500 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11501 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11502 EDGE_CROSSING edge.
11504 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11506 * expr.c (copy_blkmode_to_reg): Revert 254862.
11507 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11509 2018-04-06 Richard Biener <rguenther@suse.de>
11511 PR middle-end/85244
11512 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11513 after seeing a component reference with an adjacent field. Treat
11514 refs to arrays at struct end of external decls similar to
11515 refs to unconstrained commons.
11517 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11520 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11521 look through SAVE_EXPRs with non-side-effects argument. Adjust
11523 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11526 2018-04-06 Richard Biener <rguenther@suse.de>
11528 PR middle-end/85180
11529 * alias.c (find_base_term): New wrapper around find_base_term
11530 unwinding CSELIB_VAL_PTR changes.
11531 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11534 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11536 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11538 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11539 constant definitions.
11540 ("nop"): lr 0,0 -> nopr r0
11541 ("nop_lr0", "nop_lr1"): New insn definitions.
11543 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11545 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11546 NDS32_V3PUSH_AVAILABLE_P macro.
11548 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11549 Chung-Ju Wu <jasonwucj@gmail.com>
11551 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11552 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11553 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11554 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11555 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11556 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11557 * config/nds32/constraints.md: New constraints and checking for hard
11558 float configuration.
11559 * config/nds32/iterators.md: New mode iterator and attribute for hard
11560 float configuration.
11561 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11563 * config/nds32/nds32-fpu.md: New file.
11564 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11565 deal with hard float code generation.
11566 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11568 (abi_type, float_reg_number): New enum type.
11569 * config/nds32/nds32-predicates.c: New predicates for hard float.
11570 * config/nds32/nds32-protos.h: Declare functions for hard float.
11571 * config/nds32/nds32.c: Implementation for hard float configuration.
11572 * config/nds32/nds32.h: Definitions for hard float configuration.
11573 * config/nds32/nds32.md: Include hard float machine description and
11574 modify patterns for hard float configuration.
11575 * config/nds32/nds32.opt: New options for hard float configuration.
11576 * config/nds32/predicates.md: New predicates for hard float
11579 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11581 * common/config/nds32/nds32-common.c
11582 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11584 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11586 PR middle-end/85195
11587 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11588 CONSTRUCTOR_ELT (ctor, ...)->value.
11590 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11593 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11595 2018-04-05 Tom de Vries <tom@codesourcery.com>
11598 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11601 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11602 Kito Cheng <kito.cheng@gmail.com>
11604 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11605 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11606 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11607 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11609 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11610 Kito Cheng <kito.cheng@gmail.com>
11612 * config/nds32/constraints.md (Ufe): New memory constraint.
11613 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11614 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11615 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11617 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11618 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11620 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11622 * config/nds32/nds32.md: Use optimize_size in the condition for
11623 alu-shift instructions.
11625 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11627 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11629 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11631 * config/nds32/nds32.md (negsi2): Refine pattern.
11633 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11634 Chung-Ju Wu <jasonwucj@gmail.com>
11636 * config/nds32/iterators.md (shift_rotate): New code iterator.
11637 (shift): New code attribute.
11638 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11639 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11640 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11641 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11642 bit-wise operations.
11643 (andsi3, *andsi3): Ditto.
11644 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11645 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11646 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11647 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11648 nds32_ior_operand, nds32_xor_operand): New predicates.
11650 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11652 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11653 (addsi3, subsi3): ... this.
11655 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11657 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11659 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11661 * config/nds32/nds32.md: Adjust indention.
11663 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11665 * config/nds32/nds32.md (feature): New attribute.
11667 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11669 * config/nds32/nds32.md (subtype): New attribute.
11671 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11674 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11675 expansion to perform a bitwise AND of the argument followed by a
11676 boolean negation of the result.
11678 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11680 PR rtl-optimization/84878
11681 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11682 the basic block. Assert the use reference is not artificial and that
11683 it has an associated insn.
11685 2018-04-04 Michael Matz <matz@suse.de>
11687 * builtins.c (compute_objsize): Pass correct operand
11688 to array_at_struct_end_p.
11690 2018-04-04 Richard Biener <rguenther@suse.de>
11693 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11694 from contexts for DINFO_LEVEL_TERSE and below.
11696 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11698 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11699 resiter_operand condition.
11700 * config/nds32/nds32.md (*move<mode>): Ditto.
11702 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11703 Monk Chiang <sh.chiang04@gmail.com>
11705 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11707 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11709 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11711 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11712 Kito Cheng <kito.cheng@gmail.com>
11714 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11715 nds32_cond_code_str, output_cond_branch,
11716 output_cond_branch_compare_zero, nds32_expand_cbranch,
11717 nds32_expand_cstore, nds32_expand_movcc,
11718 nds32_output_cbranchsi4_equality_zero,
11719 nds32_output_cbranchsi4_equality_reg,
11720 nds32_output_cbranchsi4_equality_reg_or_const_int,
11721 nds32_output_cbranchsi4_greater_less_zero: New functions.
11722 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11723 nds32_expand_cstore, nds32_expand_movcc,
11724 nds32_output_cbranchsi4_equality_zero,
11725 nds32_output_cbranchsi4_equality_reg,
11726 nds32_output_cbranchsi4_equality_reg_or_const_int,
11727 nds32_output_cbranchsi4_greater_less_zero): Declare.
11728 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11729 nds32_rimm11s_operand): New predicates.
11730 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11731 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11734 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11736 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11737 * config/nds32/nds32.md: Ditto.
11738 * config/nds32/pipelines.md: Ditto.
11740 2018-04-04 Richard Biener <rguenther@suse.de>
11742 PR tree-optimization/85168
11743 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11744 propagating abnormals.
11746 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11748 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11750 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11751 Kito Cheng <kito.cheng@gmail.com>
11753 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11754 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11755 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11756 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11757 * config/nds32/nds32.md (sibcall_internal): New.
11758 (sibcall_register): Remove.
11759 (sibcall_immediate): Remove.
11760 (sibcall_value_internal): New.
11761 (sibcall_value_register): Remove.
11762 (sibcall_value_immediate): Remove.
11763 * config/nds32/predicates.md (nds32_general_register_operand): New.
11764 (nds32_call_address_operand): New.
11766 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11768 PR rtl-optimization/85167
11769 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11770 bb_defs if *split_p, instead preinitialize it to NULL.
11772 PR tree-optimization/85156
11773 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11774 evaluating the argument multiple times.
11776 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11778 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11780 (_mm_cvtpd_ps): Likewise.
11781 (_mm_cvttpd_epi32): Likewise.
11782 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11783 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11784 vector, pixel, and bool following altivec.h include.
11786 2018-04-03 Martin Sebor <msebor@redhat.com>
11788 * doc/extend.texi (Common Function Attributes): Clarify.
11789 (const attribute): Likewise.
11790 (pure attribute): Likewise.
11792 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11795 * config/i386/i386.c (ix86_expand_vector_set): Use
11796 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11798 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11800 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11801 instructions when changing rounding bits to preserve precision bits
11802 in the x87 control word.
11804 2018-04-03 Martin Liska <mliska@suse.cz>
11806 PR tree-optimization/82491
11807 * rtl.h (strip_offset_and_add): Replace += suboffset with
11808 poly_uint64 () + suboffset.
11810 2018-03-29 Martin Liska <mliska@suse.cz>
11811 Martin Jambor <mjambor@suse.cz>
11814 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11815 param_type is not an integral or pointer type.
11817 2018-04-03 Richard Biener <rguenther@suse.de>
11819 * sese.h (recompute_all_dominators): Remove.
11821 2018-04-02 Martin Sebor <msebor@redhat.com>
11823 * doc/invoke.texi (-Wrestrict): Fix typos.
11825 2018-04-02 Jim Wilson <jimw@sifive.com>
11827 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11828 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11829 (<optab>di3, <optab>si3_extend): Likewise.
11830 (<optab>si3_mask, <optab>si3_mask_1): New.
11831 (<optab>di3_mask, <optab>di3_mask_1): New.
11832 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11833 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11834 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11836 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
11838 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11841 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
11843 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11844 (nds32_canonicalize_comparison): New function.
11846 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11847 Kito Cheng <kito.cheng@gmail.com>
11848 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11850 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11851 * config/nds32/constants.md (unspec_volatile_element): Add
11852 UNSPEC_VOLATILE_RELAX_GROUP.
11853 * config/nds32/nds32-relax-opt.c: New file.
11854 * config/nds32/nds32-predicates.c
11855 (nds32_symbol_load_store_p): New function.
11856 * config/nds32/nds32-protos.h
11857 (nds32_symbol_load_store_p): Declare function.
11858 (make_pass_nds32_relax_opt): Declare new rtl pass function.
11859 * config/nds32/nds32.c
11860 (nds32_register_pass): New function to register pass.
11861 (nds32_register_passes): New function to register passes.
11862 * config/nds32/nds32.md (relax_group): New pattern.
11863 * config/nds32/nds32.opt (mrelax-hint): New option.
11864 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11866 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
11868 * config/nds32/t-nds32: Modify files dependency.
11870 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11872 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11873 (PROFILE_HOOK): Define its implementation.
11875 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11877 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11878 type and 32-bit size.
11880 2018-04-01 Jakub Jelinek <jakub@redhat.com>
11882 PR middle-end/85090
11883 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11884 (V_128_256): New mode iterator.
11885 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11886 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11887 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11889 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11890 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11892 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
11895 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11896 NaN inputs correctly.
11898 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11901 * config/rs6000/vsx.md (??r): New mode attribute.
11902 (*vsx_mov<mode>_64bit): Use it.
11903 (*vsx_mov<mode>_32bit): Likewise.
11905 2018-03-30 Martin Sebor <msebor@redhat.com>
11907 PR tree-optimization/84818
11908 * builtins.c (check_access): Use warning_n.
11910 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11913 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11915 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11918 2018-03-30 Julia Koval <julia.koval@intel.com>
11921 * x86-tune.def (movx, partial_reg_dependency): Enable for
11924 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11926 PR inline-asm/84985
11927 * lra-constraints.c (process_alt_operands): Move setting
11928 this_alternative_matches below.
11930 2018-03-29 Martin Liska <mliska@suse.cz>
11933 * doc/invoke.texi: Document how LTO works with debug info.
11934 Describe auto-load support of binutils. Mention 'x86-64'
11935 as valid option value of -march option.
11937 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11939 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11942 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11943 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11944 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11947 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11950 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11951 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11952 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11953 for RS6000_BTM_POWERPC64.
11954 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11955 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11956 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11959 (DIVDEU): Likewise.
11961 2018-03-28 Carl Love <cel@us.ibm.com>
11964 2017-09-27 Carl Love <cel@us.ibm.com>
11966 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11967 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11968 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11971 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11973 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11974 instead of __vector bool.
11975 (_mm_max_pu8): Likewise.
11976 (_mm_min_pi16): Likewise.
11978 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11981 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11982 (DIVWEUO): Likewise.
11983 (DIVDEO): Likewise.
11984 (DIVDEUO): Likewise.
11985 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11986 DIVWEUO and DIVDEUO.
11987 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11988 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11989 (div_extend): Likewise.
11990 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11992 (__builtin_divweuo): Likewise.
11993 (__builtin_divdeo): Likewise.
11994 (__builtin_divdeuo): Likewise.
11996 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11999 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12000 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12002 PR tree-optimization/82004
12003 * gimple-match-head.c (optimize_pow_to_exp): New function.
12004 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12005 Don't fold to exp if optimize_pow_to_exp is false.
12007 2018-03-28 Martin Liska <mliska@suse.cz>
12010 * calls.c (initialize_argument_information): Fix trailing space.
12011 * common.opt: Fix typo and provide better explanation for
12012 -fsanitize-coverage option.
12013 * config/i386/i386.opt: Fix typo.
12015 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12016 Martin Liska <mliska@suse.cz>
12019 * gimplify.c (asan_poison_variable): Don't do the check for
12020 gimplify_omp_ctxp here.
12021 (gimplify_decl_expr): Do it here.
12022 (gimplify_target_expr): Likewise.
12024 2018-03-28 Martin Liska <mliska@suse.cz>
12027 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12028 chkp_type_bounds_count if MPX is not enabled.
12030 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12032 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12034 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12037 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12038 function to create the function decl for complex long double
12039 multiply and divide for -mabi=ieeelongdouble.
12040 (init_float128_ieee): Call it.
12042 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12045 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12046 -fcf-protection=branch -mibt.
12047 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12049 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12052 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12053 arm_word_relocations.
12055 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12058 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12059 extern array declarations.
12061 2018-03-27 Richard Biener <rguenther@suse.de>
12063 PR middle-end/84067
12064 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12065 explicit single_use checks.
12067 2018-03-27 Richard Biener <rguenther@suse.de>
12069 PR tree-optimization/85082
12070 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12073 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12075 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12076 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12077 Turn on fasynchronous-unwind-tables and funwind-tables.
12079 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12082 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12083 (*bmi_blsr_<mode>_ccz): Ditto.
12085 2018-03-26 Tom de Vries <tom@codesourcery.com>
12087 PR tree-optimization/85063
12088 * omp-general.c (offloading_function_p): New function. Factor out
12090 * omp-offload.c (pass_omp_target_link::gate): ... here.
12091 * omp-general.h (offloading_function_p): Declare.
12092 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12093 with attribute omp declare target for offloading functions.
12095 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12097 PR tree-optimization/84005
12098 * tree-data-ref.h (get_base_for_alignment): Declare.
12099 * tree-data-ref.c (get_base_for_alignment_1): New function.
12100 (get_base_for_alignment): Likewise.
12101 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12102 get_base_for_alignment to find a suitable base object, instead
12103 of always using drb->base_address.
12105 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12107 PR inline-asm/85022
12108 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12109 known size by default.
12111 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12113 PR inline-asm/85030
12114 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12115 and non BLKmode operands.
12117 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12120 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12121 Clean up attributes.
12123 2018-03-23 Richard Biener <rguenther@suse.de>
12126 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12127 we are going to emit early debug for LTO.
12129 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12131 PR inline-asm/85034
12132 * function.c (match_asm_constraints_1): Don't optimize if input
12133 doesn't satisfy general_operand predicate for output's mode.
12135 PR inline-asm/85022
12136 * alias.c (write_dependence_p): Don't require for x_canonicalized
12137 non-VOIDmode if x has VOIDmode.
12140 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12141 just don't try to optimize it rather than assert it never happens.
12143 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12145 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12146 macro expansions for definition of ST_INTERNAL_<mode> and
12147 LD_INTERNAL_<mode> builtins.
12148 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12150 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12152 (altivec_expand_st_builtin): Likewise.
12153 (altivec_expand_builtin): Remove calls to deleted functions.
12154 (rs6000_address_for_altivec): Delete this function.
12155 * config/rs6000/vector.md: Remove expands for
12156 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12158 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12161 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12162 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12163 re-computing once computed.
12164 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12165 (arm_init_machine_status): Initialize
12166 machine->static_chain_stack_bytes.
12168 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12171 * doc/extend.texi: Add four new prototypes for vec_ld.
12172 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12173 definitions for more logical presentation.
12174 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12175 entries for V1TI variants of __builtin_altivec_ld builtin.
12176 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12177 handling of V1TI variant of LVX icode pattern.
12178 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12179 (rs6000_gimple_fold_builtin): Likewise.
12180 (altivec_init_builtins): Add code to define
12181 __builtin_altivec_lvx_v1ti function.
12183 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12185 PR inline-asm/84941
12186 * function.c (match_asm_constraints_1): Don't do the optimization
12187 if input isn't a REG, SUBREG, MEM or constant.
12189 2018-03-22 Tom de Vries <tom@codesourcery.com>
12191 PR tree-optimization/84956
12192 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12193 bb_has_abnormal_pred.
12195 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12198 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12199 DECL_INITIAL (decl) to decl at the end.
12200 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12201 adjust the comment.
12203 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12205 * doc/extend.texi (__builtin_tgmath): Document when complex
12206 integer types are treated as _Complex _Float64.
12208 2018-03-21 Tom de Vries <tom@codesourcery.com>
12210 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12212 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12214 PR tree-optimization/84960
12215 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12216 if it is ENTRY block, move them into single succ of ENTRY in that case.
12218 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12220 PR tree-optimization/84811
12221 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12222 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12223 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12224 (known_subrange_p): Update accordingly. Cast each value involved
12225 in the size comparison, rather than casting the result of the
12228 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12230 PR tree-optimization/84982
12231 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12232 by flipping the least significant bit rather than all bits from
12233 bitpos to bitpos + bitsize - 1.
12235 2018-03-21 Nathan Sidwell <nathan@acm.org>
12237 * doc/extend.texi (Deprecated Features): Remove mention of
12238 long-deleted deprecations.
12240 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12243 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12244 * configure: Regenerate.
12246 2018-03-21 Tom de Vries <tom@codesourcery.com>
12248 PR tree-optimization/83126
12249 * tree-parloops.c (num_phis): New function.
12250 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12252 2018-03-21 Nathan Sidwell <nathan@acm.org>
12254 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12255 mention anon-struct/union members and trailing attributes.
12257 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12259 PR tree-optimization/84969
12260 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12261 builtin memset partitions if they set different rhs values.
12263 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12265 PR rtl-optimization/84989
12266 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12267 VEC_DUPLICATE with scalar result mode.
12269 2018-03-21 Martin Liska <mliska@suse.cz>
12272 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12273 not intended return statement.
12275 2018-03-21 Martin Liska <mliska@suse.cz>
12278 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12279 (chkp_find_bound_slots_1): Limit number of iterations.
12281 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12284 * Minor grammar fixes for x86 options.
12286 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12289 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12290 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12292 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12295 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12296 (altivec_lvx_<mode>_1op): Likewise.
12297 (altivec_stvx_<mode>_2op): Likewise.
12298 (altivec_stvx_<mode>_1op): Likewise.
12299 (altivec_lvx_<VM2:mode>): New define_expand.
12300 (altivec_stvx_<VM2:mode>): Likewise.
12301 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12302 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12303 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12304 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12305 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12306 (rs6000_gen_lvx): Likewise.
12307 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12308 (altivec_expand_stv_builtin): Likewise.
12309 (altivec_expand_builtin): Likewise.
12310 * config/rs6000/vector.md: Likewise.
12312 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12315 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12318 2018-03-20 Richard Biener <rguenther@suse.de>
12321 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12322 sign-conversions as zero, fall back to standard scalar_stmt
12325 2018-03-20 Martin Liska <mliska@suse.cz>
12328 * predict.c (rebuild_frequencies): Handle case when we have
12329 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12331 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12334 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12335 flag_section_anchors.
12336 * varasm.c (use_blocks_for_decl_p): Remove hack for
12337 dw2_force_const_mem.
12340 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12342 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12343 be created, use lowpart_subreg of operands[0] rather than operands[0]
12345 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12346 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12347 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12348 and n constraint instead of aarch64_shift_imm_di and Usd.
12349 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12350 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12352 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12355 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12356 to favor GPR over NEON registers.
12357 (<shift>di3_neon): Likewise.
12359 2018-03-20 Tom de Vries <tom@codesourcery.com>
12362 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12363 (nvptx_process_pars): Emit bar.sync asap and alap.
12365 2018-03-20 Tom de Vries <tom@codesourcery.com>
12368 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12369 seen_label if seen_label is already set.
12371 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12374 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12375 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12376 Use 1U instead of 1. Formatting fixes.
12379 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12380 instead of TREE_TYPE (s1) for the return value.
12382 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12384 PR tree-optimization/84946
12385 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12386 bitsize + bitsize in poly_uint64 rather than poly_int64.
12389 * dwarf2asm.c: Include fold-const.c.
12390 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12391 of decl rather than decl itself.
12393 PR rtl-optimization/84643
12394 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12396 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12399 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12400 calling assemble_variable.
12402 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12405 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12406 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12408 2018-03-19 Jim Wilson <jimw@sifive.com>
12411 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12412 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12413 (riscv_first_stack_step): Likewise.
12414 (riscv_option_override): Use STACK_BOUNDARY instead of
12415 MIN_STACK_BOUNDARY.
12416 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12417 MIN_STACK_BOUNDARY.
12418 (BIGGEST_ALIGNMENT): Set to 128.
12419 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12420 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12423 2018-03-19 Richard Biener <rguenther@suse.de>
12425 PR tree-optimization/84933
12426 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12427 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12429 2018-03-19 Richard Biener <rguenther@suse.de>
12431 PR tree-optimization/84859
12432 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12433 (cond_if_else_store_replacement): Perform sinking operation on
12434 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12435 Generalize what a BB with a single eligible store is.
12437 2018-03-19 Richard Biener <rguenther@suse.de>
12439 PR tree-optimization/84929
12440 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12441 chrec_is_positive against non-chrec arg.
12443 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12446 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12448 2018-03-18 Martin Liska <mliska@suse.cz>
12450 PR rtl-optimization/84635
12451 * regrename.c (build_def_use): Use matches_mode only when
12454 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12456 PR tree-optimization/84913
12457 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12458 vectorize chains of COND_EXPRs.
12460 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12462 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12464 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12466 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12468 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12470 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12472 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12473 Kito Cheng <kito.cheng@gmail.com>
12475 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12476 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12477 (nds32_adjust_reg_alloc_order): New function.
12478 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12480 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12482 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12483 nds32_print_operand, nds32_print_operand_address): Use
12484 HOST_WIDE_INT_PRINT_DEC instead.
12486 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12488 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12490 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12493 * config/i386/i386.c (initial_ix86_tune_features,
12494 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12495 unsigned long long.
12496 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12497 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12498 rather than 1u << ix86_tune. Formatting fix.
12499 (ix86_option_override_internal): Change ix86_arch_mask from
12500 unsigned int to unsigned HOST_WIDE_INT, initialize to
12501 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12502 (ix86_function_specific_restore): Likewise.
12504 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12507 * postreload.c (reload_combine_recognize_pattern): Perform
12508 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12509 truncate_int_for_mode the result for the destination's mode.
12512 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12513 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12515 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12518 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12521 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12522 regno_allocno_class_array and sorted_pseudos.
12523 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12524 insns where regno is used.
12526 2018-03-16 Martin Liska <mliska@suse.cz>
12529 * multiple_target.c (create_dispatcher_calls): Redirect
12530 reference in the symbol table.
12532 2018-03-16 Martin Liska <mliska@suse.cz>
12535 * multiple_target.c (create_dispatcher_calls): Redirect also
12538 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12542 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12543 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12544 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12546 2018-03-16 Julia Koval <julia.koval@intel.com>
12548 * doc/invoke.texi (Skylake Server): Add CLWB.
12549 Cannonlake): Remove CLWB.
12551 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12553 PR tree-optimization/84841
12554 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12556 (FLOAT_ONE_CONST_TYPE): Define.
12557 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12558 (sort_by_operand_rank): Put entries with higher constant_type last
12559 rather than first to match comments.
12561 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12563 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12566 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12569 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12570 check and use address of target always.
12572 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12575 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12576 (indirect_thunk_bnd_needed): Likewise.
12577 (indirect_thunks_used): Likewise.
12578 (indirect_thunks_bnd_used): Likewise.
12579 (indirect_return_needed): New.
12580 (indirect_return_bnd_needed): Likewise.
12581 (output_indirect_thunk_function): Add a bool argument for
12583 (output_indirect_thunk_function): Don't generate alias for
12584 function return thunk.
12585 (ix86_code_end): Call output_indirect_thunk_function to generate
12586 function return thunks.
12587 (ix86_output_function_return): Set indirect_return_bnd_needed
12588 and indirect_return_needed instead of indirect_thunk_bnd_needed
12589 and indirect_thunk_needed.
12591 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12593 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12594 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12595 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12597 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12598 Paul Hua <paul.hua.gm@gmail.com>
12601 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12603 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12605 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12606 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12607 resp. SFmode cases.
12609 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12612 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12613 instead of GET_MODE_SIZE when comparing Units.
12615 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12618 * varasm.c (hash_section): Return an unchangeble hash value
12619 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12620 Return !aarch64_can_use_per_function_literal_pools_p ().
12622 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12625 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12626 rather than address of cmode as last argument to prepare_cmp_insn.
12628 2018-03-15 Julia Koval <julia.koval@intel.com>
12630 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12631 F_AVX512VNNI, F_AVX512BITALG): New.
12633 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12636 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12637 insn for floating-point loads and stores.
12639 2018-03-14 Carl Love <cel@us.ibm.com>
12641 * config/rs6000/rs6000-c.c: Add macro definitions for
12642 ALTIVEC_BUILTIN_VEC_PERMXOR.
12643 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12644 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12645 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12646 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12648 * config/doc/extend.texi: Add prototypes for vec_permxor.
12650 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12653 * diagnostic-show-locus.c (class layout_point): Convert m_line
12654 from int to linenum_type.
12655 (line_span::comparator): Use linenum "compare" function when
12656 comparing line numbers.
12657 (test_line_span): New function.
12658 (layout_range::contains_point): Convert param "row" from int to
12660 (layout_range::intersects_line_p): Likewise.
12661 (layout::will_show_line_p): Likewise.
12662 (layout::print_source_line): Likewise.
12663 (layout::should_print_annotation_line_p): Likewise.
12664 (layout::print_annotation_line): Likewise.
12665 (layout::print_leading_fixits): Likewise.
12666 (layout::annotation_line_showed_range_p): Likewise.
12667 (struct line_corrections): Likewise for field m_row.
12668 (line_corrections::line_corrections): Likewise for param "row".
12669 (layout::print_trailing_fixits): Likewise.
12670 (layout::get_state_at_point): Likewise.
12671 (layout::get_x_bound_for_row): Likewise.
12672 (layout::print_line): Likewise.
12673 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12674 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12675 * input.c (selftest::test_linenum_comparisons): New function.
12676 (selftest::input_c_tests): Call it.
12677 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12678 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12679 * selftest.h (ASSERT_GT): New macro.
12680 (ASSERT_GT_AT): New macro.
12681 (ASSERT_LT): New macro.
12682 (ASSERT_LT_AT): New macro.
12684 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12686 PR rtl-optimization/84780
12687 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12689 2018-03-14 Martin Liska <mliska@suse.cz>
12691 * tree.c (record_node_allocation_statistics): Use
12692 get_stats_node_kind.
12693 (get_stats_node_kind): New function extracted from
12694 record_node_allocation_statistics.
12695 (free_node): Use get_stats_node_kind.
12697 2018-03-14 Richard Biener <rguenther@suse.de>
12699 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12700 that the value-set of ANTIC_IN doesn't grow.
12703 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12705 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12706 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12708 2018-03-14 Julia Koval <julia.koval@intel.com>
12710 * config.gcc (icelake-client, icelake-server): New.
12712 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12713 (initial_ix86_arch_features): Ditto.
12714 (PTA_SKYLAKE): Add SGX.
12715 (PTA_ICELAKE): Remove.
12716 (PTA_ICELAKE_CLIENT): New.
12717 (PTA_ICELAKE_SERVER): New.
12718 (ix86_option_override_internal): Split up icelake on icelake client and
12720 (get_builtin_code_for_version): Ditto.
12721 (fold_builtin_cpu): Ditto.
12722 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12723 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12724 * config/i386/i386.h (processor_type): Ditto.
12725 * doc/invoke.texi: Ditto.
12727 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12730 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12731 INTEGER_CST offset, add it together with bitpos / 8 and
12732 sign extend based on POINTER_SIZE.
12736 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12739 * config/i386/constraints.md (Yc): New register constraint.
12740 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12741 Use Yc constraint for alternative 2 of operand 0. Remove
12742 preferred_for_speed attribute.
12744 2018-03-14 Richard Biener <rguenther@suse.de>
12746 PR tree-optimization/84830
12747 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12748 with the old one to avoid oscillations.
12750 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12753 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12755 (assign_by_spills): Return a flag of reload assignment failure.
12756 Do not process the reload assignment failures. Do not spill other
12757 reload pseudos if they has the same reg class. Update n if
12759 (lra_assign): Add a return arg. Set up from the result of
12760 assign_by_spills call.
12761 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12762 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12763 usage_insns if it is not NULL.
12764 (spill_hard_reg_in_range): New function.
12765 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12766 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12767 function prototypes.
12768 (lra_assign): Change prototype.
12769 * lra.c (lra): Add code to deal with fails by splitting hard reg
12772 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12774 * config/riscv/riscv.opt (mrelax): New option.
12775 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12776 "norelax" when riscv_mrelax is disabled.
12777 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12779 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12782 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12783 reassociation for int modes.
12785 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12787 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12788 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12790 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12791 * config/aarch64/aarch64-sve.md
12792 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12793 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12794 (*extend<mode><Vwide>2): Rename to...
12795 (aarch64_sve_extend<mode><Vwide>2): ...this.
12796 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12797 renaming the old pattern to...
12798 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12800 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12801 define_expand, renaming the old pattern to...
12802 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12803 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12804 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12805 account when deciding which SVE instruction the optab should use.
12806 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12808 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12810 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12811 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12812 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12813 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12814 (tlsdesc_small_<mode>): Turn a define_expand and use
12815 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12816 (tlsdesc_small_advsimd_<mode>): ...this.
12817 (tlsdesc_small_sve_<mode>): New pattern.
12819 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12821 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12822 (UNSPEC_UMUL_HIGHPART): New constants.
12823 (MUL_HIGHPART): New int iteraor.
12824 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12825 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12827 (*<su>mul<mode>3_highpart): New define_insn.
12829 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12832 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12835 2018-03-13 Martin Liska <mliska@suse.cz>
12838 * (sem_item_optimizer::sem_item_optimizer): Initialize new
12840 (sem_item_optimizer::~sem_item_optimizer): Release it.
12841 (sem_item_optimizer::merge_classes): Register variable aliases.
12842 (sem_item_optimizer::fixup_pt_set): New function.
12843 (sem_item_optimizer::fixup_points_to_sets): Likewise.
12844 * ipa-icf.h: Declare new variables and functions.
12846 2018-03-13 Jakub Jelinek <jakub@redhat.com>
12848 PR middle-end/84834
12849 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12850 integer_pow2p@2 and test integer_pow2p in condition.
12851 (A < 0 ? C : 0): Similarly for @1.
12853 PR middle-end/84831
12854 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12855 characters starting at p contain '\0' character, don't look beyond
12859 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12860 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12863 * reg-stack.c (change_stack): Change update_end var from int to
12864 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12865 also call set_block_for_insn on the newly added insns and rescan.
12868 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12869 on the last operand.
12872 * tree.c (stabilize_reference_1): Return save_expr (e) for
12873 STATEMENT_LIST even if it doesn't have side-effects.
12875 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
12877 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12879 2018-03-12 Renlin Li <renlin.li@arm.com>
12881 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12882 aarch64_output_scalar_simd_mov_immediate.
12884 2018-03-12 Martin Sebor <msebor@redhat.com>
12886 PR tree-optimization/83456
12887 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12888 for perfectly overlapping calls to memcpy.
12889 (gimple_fold_builtin_memory_chk): Same.
12890 (gimple_fold_builtin_strcpy): Handle no-warning.
12891 (gimple_fold_builtin_stxcpy_chk): Same.
12892 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12894 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12896 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12897 parameter. Use it for SFmode.
12898 (rs6000_function_arg_advance_1): Adjust.
12899 (rs6000_function_arg): Adjust.
12900 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12902 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12904 PR rtl-optimization/84169
12905 PR rtl-optimization/84780
12906 * combine.c (can_combine_p): Check for a 2-insn combination whether
12907 the destination register is used between the two insns, too.
12909 2018-03-12 Richard Biener <rguenther@suse.de>
12911 PR tree-optimization/84803
12912 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12913 for refs DR analysis didn't process.
12915 2018-03-12 Richard Biener <rguenther@suse.de>
12917 PR tree-optimization/84777
12918 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12919 force-vectorize loops ignore whether we are optimizing for size.
12921 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12923 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12924 (TARGET_MD_ASM_ADJUST): Define.
12926 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12927 Kito Cheng <kito.cheng@gmail.com>
12928 Chung-Ju Wu <jasonwucj@gmail.com>
12930 * config/nds32/nds32.c (nds32_compute_stack_frame,
12931 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12932 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12933 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12934 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12935 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12936 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12937 * config/nds32/nds32.md (prologue, epilogue): Use macro
12938 NDS32_V3PUSH_AVAILABLE_P to do checking.
12940 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12943 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12944 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12945 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12946 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12947 addition of most attributes on !orig_type_die or the attribute not
12948 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12950 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12951 Chung-Ju Wu <jasonwucj@gmail.com>
12953 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12954 __NDS32_VH__ macro.
12955 * config/nds32/nds32.opt (mvh): New option.
12957 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12958 Chung-Ju Wu <jasonwucj@gmail.com>
12960 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12962 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12963 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12966 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12967 Chung-Ju Wu <jasonwucj@gmail.com>
12969 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12971 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12972 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12974 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12975 Kito Cheng <kito.cheng@gmail.com>
12976 Chung-Ju Wu <jasonwucj@gmail.com>
12978 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12979 UNSPEC_FFMISM and UNSPEC_FLMISM.
12980 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12981 for ffb, ffmism and flmism.
12982 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12983 (unspec_ffmism): Ditto.
12984 (unspec_flmism): Ditto.
12985 (nds32_expand_builtin_impl): Check if string extension is available.
12986 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12987 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12989 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12992 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12995 * lra-assigns.c (assign_by_spills): Return a flag of reload
12996 assignment failure. Do not process the reload assignment
12997 failures. Do not spill other reload pseudos if they has the same
12999 (lra_assign): Add a return arg. Set up from the result of
13000 assign_by_spills call.
13001 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13002 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13003 usage_insns if it is not NULL.
13004 (spill_hard_reg_in_range): New function.
13005 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13006 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13007 function prototypes.
13008 (lra_assign): Change prototype.
13009 * lra.c (lra): Add code to deal with fails by splitting hard reg
13012 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13015 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13017 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13020 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13021 (dw_val_node): Add val_symbolic_view.
13022 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13023 (symview_upper_bound): New.
13024 (new_line_info_table): Initialize symviews_since_reset.
13025 (dwarf2out_source_line): Count symviews_since_reset and set
13026 symview_upper_bound.
13027 (dw_val_equal_p): Handle symview.
13028 (add_AT_symview): New.
13029 (print_dw_val): Handle symview.
13030 (attr_checksum, attr_checksum_ordered): Likewise.
13031 (same_dw_val_p, size_of_die): Likewise.
13032 (value_format, output_die): Likewise.
13033 (add_high_low_attributes): Use add_AT_symview for entry_view.
13034 (dwarf2out_finish): Reset symview_upper_bound, clear
13037 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13040 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13041 Add strict argument and use it.
13042 (rs6000_split_multireg_move): Update for new strict argument.
13043 (mem_operand_gpr): Disallow all non-offsettable addresses.
13044 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13046 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13049 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13050 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13051 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13054 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13055 decl, use remap_type if we want to use the type.
13057 2018-03-09 Martin Sebor <msebor@redhat.com>
13059 PR tree-optimization/84526
13060 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13062 (builtin_access::generic_overlap): Be prepared to handle non-array
13065 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13067 PR rtl-optimization/84682
13068 * lra-constraints.c (process_address_1): Check is_address flag
13069 for address constraints.
13070 (process_alt_operands): Likewise.
13071 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13072 preprocess_constraints.
13073 * recog.h (preprocess_constraints): Add oploc parameter.
13075 * recog.c (preprocess_constraints): Test address_operand for
13076 CT_ADDRESS constraints.
13078 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13081 * lra-assigns.c (assign_by_spills): Return a flag of reload
13082 assignment failure. Do not process the reload assignment
13083 failures. Do not spill other reload pseudos if they has the same
13085 (lra_assign): Add a return arg. Set up from the result of
13086 assign_by_spills call.
13087 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13088 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13089 usage_insns if it is not NULL.
13090 (spill_hard_reg_in_range): New function.
13091 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13092 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13093 function prototypes.
13094 (lra_assign): Change prototype.
13095 * lra.c (lra): Add code to deal with fails by splitting hard reg
13098 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13101 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13102 Accept complain bool parameter. Only emit errors if it is true.
13103 (arm_parse_cpu_option_name): Likewise.
13104 (arm_target_thumb_only): Adjust callers of the above.
13105 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13106 prototype to take a default true bool parameter.
13107 (arm_parse_arch_option_name): Likewise.
13109 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13110 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13114 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13115 * configure: Regenerate.
13116 * configure.ac ("linker --version-script option"): New.
13117 ("linker soname option"): New.
13119 2018-03-09 Richard Biener <rguenther@suse.de>
13121 PR tree-optimization/84775
13122 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13123 immediate uses of predicate stmts and mark them modified.
13126 PR tree-optimization/84178
13127 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13129 (version_loop_for_if_conversion): Delay update_ssa call.
13130 (tree_if_conversion): Delay update_ssa until after predicate
13133 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13136 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13137 when the function accesses prior frames.
13139 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13142 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13143 gen_llsym, otherwise call maybe_gen_llsym.
13145 PR inline-asm/84742
13146 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13147 has ',' character inside of it.
13149 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13152 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13153 as clobbering CC_REGNUM.
13155 2018-03-08 Richard Biener <rguenther@suse.de>
13157 PR middle-end/84552
13158 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13159 (follow_copies_to_constant): Do not follow SSA names registered
13162 2018-03-08 Richard Biener <rguenther@suse.de>
13164 PR tree-optimization/84178
13165 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13167 (version_loop_for_if_conversion): Delay update_ssa call.
13168 (tree_if_conversion): Delay update_ssa until after predicate
13171 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13173 PR tree-optimization/84178
13174 * tree-if-conv.c (release_bb_predicate): Remove the
13175 the assertion that the stmts have NULL use_ops.
13176 Discard the statements, asserting that they haven't
13177 yet been added to a BB.
13179 2018-03-08 Richard Biener <rguenther@suse.de>
13181 PR tree-optimization/84746
13182 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13183 (phi_translate): Pass in destination ANTIC_OUT set.
13184 (phi_translate_1): Likewise. For a simplified result lookup
13185 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13186 (phi_translate_set): Adjust.
13187 (do_pre_regular_insertion): Likewise.
13188 (do_pre_partial_partial_insertion): Likewise.
13190 2018-03-08 Martin Liska <mliska@suse.cz>
13192 PR gcov-profile/84735
13193 * doc/gcov.texi: Document usage of profile files.
13194 * gcov-io.h: Document changes in the format.
13196 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13200 * dwarf2out.c (struct dw_line_info_table): Update comments for
13202 (FORCE_RESET_NEXT_VIEW): New.
13203 (FORCE_RESETTING_VIEW_P): New.
13204 (RESETTING_VIEW_P): Check for -1 too.
13205 (ZERO_VIEW_P): Likewise.
13206 (new_line_info_table): Force-reset next view.
13207 (dwarf2out_begin_function): Likewise.
13208 (dwarf2out_source_line): Simplify zero_view_p initialization.
13209 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13210 view directly. Omit view when omitting .loc at line 0.
13212 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13214 PR tree-optimization/84740
13215 * tree-switch-conversion.c (process_switch): Call build_constructors
13216 only if info.phi_count is non-zero.
13218 PR tree-optimization/84739
13219 * tree-tailcall.c (find_tail_calls): Check call arguments against
13220 DECL_ARGUMENTS (current_function_decl) rather than
13221 DECL_ARGUMENTS (func) when checking for tail recursion.
13223 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13225 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13226 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13227 Volker Reichelt's entry and add entries for people that perform
13228 GCC fuzzy testing and report numerous bugs.
13230 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13233 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13234 readonly data in sdata, if that is disabled.
13235 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13236 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13237 -mreadonly-in-sdata option.
13239 2018-03-07 Martin Sebor <msebor@redhat.com>
13241 PR tree-optimization/84468
13242 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13243 basic block when looking for nul assignment.
13245 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13248 * except.h (output_function_exception_table): Adjust prototype.
13249 * except.c (output_function_exception_table): Remove FNNAME parameter
13250 and add SECTION parameter. Ouput one part of the table at a time.
13251 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13252 the first part of the exception table and emit unwind directives.
13253 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13254 (i386_pe_seh_cold_init): Likewise.
13255 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13256 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13257 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13258 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13259 * config/i386/winnt.c: Include except.h.
13260 (struct seh_frame_state): Add reg_offset, after_prologue and
13261 in_cold_section fields.
13262 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13263 (i386_pe_seh_cold_init): New function.
13264 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13265 to seh->in_cold_section.
13266 (seh_emit_push): Record the offset of the push.
13267 (seh_emit_save): Record the offet of the save.
13268 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13269 Test seh->after_prologue to disregard the epilogue.
13270 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13271 (i386_pe_end_cold_function): New function.
13273 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13276 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13277 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13280 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13282 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13283 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13285 PR middle-end/84723
13286 * multiple_target.c: Include tree-inline.h and intl.h.
13287 (expand_target_clones): Diagnose and fail if node->definition and
13288 !tree_versionable_function_p (node->decl).
13290 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13292 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13294 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13295 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13296 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13298 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13301 * combine.c (try_combine): Use reg_or_subregno instead of handling
13302 just paradoxical SUBREGs and REGs.
13304 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13306 * config/arc/arc.c (arc_finalize_pic): Remove function.
13307 (arc_must_save_register): We use single base PIC register, remove
13308 checks to save/restore the PIC register.
13309 (arc_expand_prologue): Likewise.
13310 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13312 (arc_verify_short): Likewise.
13313 (arc_attr_type): Likewise.
13314 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13315 (walk_stores): Likewise.
13316 (arc_address_cost): Make it static.
13317 (arc_verify_short): Likewise.
13318 (branch_dest): Likewise.
13319 (arc_attr_type): Likewise.
13320 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13321 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13322 (arc_final_prescan_insn): Remove inserting the nops due to
13323 hardware hazards. It is done in reorg step.
13324 (insn_length_variant_t): Remove.
13325 (insn_length_parameters_t): Likewise.
13326 (arc_insn_length_parameters): Likewise.
13327 (arc_get_insn_variants): Likewise.
13328 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13330 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13332 PR inline-asm/84683
13333 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13336 PR tree-optimization/84687
13337 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13339 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13341 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13343 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13344 Rename to ppc_speculation_barrier.
13345 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13346 __builtin_ppc_speculation_barrier.
13348 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13351 * combine.c (combine_simplify_rtx): Don't try to simplify if
13352 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13355 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13357 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13358 to 32 bytes when compiling for POWER9.
13360 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13363 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13364 regparm >= 3 with no arg reg available also for calls with
13365 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13368 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13370 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13372 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13375 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13377 2018-03-05 Richard Biener <rguenther@suse.de>
13379 PR tree-optimization/84486
13380 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13381 When inserting a __builtin_assume_aligned call set the LHS
13382 SSA name alignment info accordingly.
13384 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13386 PR tree-optimization/84114
13387 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13388 Avoid reassociation of FLOAT_MODE addition.
13390 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13392 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13393 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13394 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13395 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13396 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13397 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13398 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13400 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13401 __builtin_ia32_wbinvd): New builtins.
13402 (SPECIAL_ARGS2): New.
13403 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13404 (SPECIAL_ARGS2): New.
13405 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13406 (ix86_valid_target_attribute_inner_p): Ditto.
13407 (ix86_init_mmx_sse_builtins): Add special_args2.
13408 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13409 TARGET_WBNOINVD_P): New.
13410 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13411 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13412 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13413 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13414 * config/i386/pconfigintrin.h: New file.
13415 * config/i386/wbnoinvdintrin.h: Ditto.
13416 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13418 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13420 2018-03-05 Richard Biener <rguenther@suse.de>
13422 PR tree-optimization/84670
13423 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13425 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13426 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13427 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13428 doesn't grow if all successors (recursively) were visited at least
13431 2018-03-05 Richard Biener <rguenther@suse.de>
13433 PR tree-optimization/84650
13434 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13435 if executed in the loop pipeline.
13437 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13439 * doc/configfiles.texi (Configuration Files): Move info about
13440 conditionalizing $target-protos.h to...
13441 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13442 differs from $target-protos.h.
13444 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13445 Chung-Ju Wu <jasonwucj@gmail.com>
13447 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13448 * config/nds32/nds32-multiple.md (setmemsi): Define.
13449 * config/nds32/nds32-memory-manipulation.c
13450 (nds32_gen_dup_4_byte_to_word_value): New.
13451 (emit_setmem_word_loop): New.
13452 (emit_setmem_byte_loop): New.
13453 (nds32_expand_setmem_loop): New.
13454 (nds32_expand_setmem_loop_v3m): New.
13455 (nds32_expand_setmem_unroll): New.
13456 (nds32_expand_setmem): New.
13458 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13459 Chung-Ju Wu <jasonwucj@gmail.com>
13461 * config/nds32/nds32-memory-manipulation.c
13462 (nds32_emit_load_store): New.
13463 (nds32_emit_post_inc_load_store): New.
13464 (nds32_emit_mem_move): New.
13465 (nds32_emit_mem_move_block): New.
13466 (nds32_expand_movmemsi_loop_unknown_size): New.
13467 (nds32_expand_movmemsi_loop_known_size): New.
13468 (nds32_expand_movmemsi_loop): New.
13469 (nds32_expand_movmemsi_unroll): New.
13470 (nds32_expand_movmemqi): Rename ...
13471 (nds32_expand_movmemsi): ... to this.
13472 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13473 (movmemsi): ... to this.
13474 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13475 (nds32_expand_movmemsi): ... to this.
13477 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13478 Monk Chiang <sh.chiang04@gmail.com>
13479 Chung-Ju Wu <jasonwucj@gmail.com>
13481 * config/nds32/nds32-protos.h
13482 (nds32_expand_load_multiple): New arguments.
13483 (nds32_expand_store_multiple): Ditto.
13484 (nds32_valid_multiple_load_store): Rename ...
13485 (nds32_valid_multiple_load_store_p): ... to this.
13486 * config/nds32/nds32-memory-manipulation.c
13487 (nds32_expand_load_multiple): Refine implementation.
13488 (nds32_expand_store_multiple): Ditto.
13489 * config/nds32/nds32-multiple.md
13490 (load_multiple): Update nds32_expand_load_multiple interface.
13491 (store_multiple): Update nds32_expand_store_multiple interface.
13492 * config/nds32/nds32-predicates.c
13493 (nds32_valid_multiple_load_store): Rename ...
13494 (nds32_valid_multiple_load_store_p): ... to this and refine
13496 * config/nds32/predicates.md
13497 (nds32_load_multiple_and_update_address_operation): New predicate.
13498 (nds32_store_multiple_and_update_address_operation): New predicate.
13500 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13501 Chung-Ju Wu <jasonwucj@gmail.com>
13503 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13504 (combo): New attribute.
13505 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13507 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13509 * config/nds32/nds32.opt: Change -mcmodel= default value.
13511 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13512 Monk Chiang <sh.chiang04@gmail.com>
13513 Chung-Ju Wu <jasonwucj@gmail.com>
13515 * config/nds32/constants.md (unspec_element): New enum.
13516 * config/nds32/constraints.md (Umw): New constraint.
13517 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13518 * config/nds32/nds32-intrinsic.md: Likewise.
13519 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13520 (nds32_valid_smw_lwm_base_p): New.
13521 (nds32_output_smw_single_word): New.
13522 (nds32_output_lmw_single_word): New.
13523 (nds32_expand_unaligned_load): New.
13524 (nds32_expand_unaligned_store): New.
13525 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13526 (nds32_output_smw_single_word): Declare.
13527 (nds32_output_lmw_single_word): Declare.
13528 (nds32_expand_unaligned_load): Declare.
13529 (nds32_expand_unaligned_store): Declare.
13530 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13531 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13532 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13533 NDS32_BUILTIN_UASTORE_DW.
13534 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13537 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13538 Kito Cheng <kito.cheng@gmail.com>
13539 Chung-Ju Wu <jasonwucj@gmail.com>
13541 * config/nds32/nds32-intrinsic.c
13542 (nds32_expand_builtin_null_ftype_reg): Delete.
13543 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13544 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13545 (nds32_read_argument): New.
13546 (nds32_legitimize_target): Ditto.
13547 (nds32_legitimize_argument): Ditto.
13548 (nds32_check_constant_argument): Ditto.
13549 (nds32_expand_unop_builtin): Ditto.
13550 (nds32_expand_unopimm_builtin): Ditto.
13551 (nds32_expand_binop_builtin): Ditto.
13552 (nds32_builtin_decl_impl): Ditto.
13553 (builtin_description): Ditto.
13554 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13555 (nds32_init_builtins_impl): Ditto.
13556 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13557 (nds32_builtin_decl): New.
13558 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13559 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13561 2018-03-02 Jeff Law <law@redhat.com>
13563 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13564 (redundant_insn, fill_simple_delay_slots): Likewise.
13565 (fill_slots_from_thread): Likewise.
13566 * resource.c (mark_referenced_resources): Likewise.
13567 (mark_set_resources, find_dead_or_set_registers): Likewise.
13569 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13571 * substring-locations.h (format_warning_va): Formatting fix for
13572 ATTRIBUTE_GCC_DIAG.
13573 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13575 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13576 * substring-locations.c: Include intl.h.
13577 (format_warning_va): Turned into small wrapper around
13578 format_warning_n_va, renamed to ...
13579 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13580 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13582 (format_warning_at_substring_n): New function.
13583 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13584 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13585 format_warning_at_substring with just a shorter name instead of
13586 const function pointer.
13587 (fmtwarn_n): New function.
13588 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13589 appropriate, get rid of all the fmtstr temporaries, move conditionals
13590 with G_() wrapped string literals directly into fmtwarn arguments,
13591 cast dir.len to (int), formatting fixes.
13593 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13595 * doc/invoke.texi: Remove "Cilk Plus" references.
13597 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13598 Richard Biener <rguenther@suse.de>
13601 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13602 for error or warning attributes if CALL_FROM_THUNK_P is set.
13605 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13608 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13609 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13612 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13613 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13615 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13616 instead of -1U in last predictors element's probability member.
13618 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13621 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13622 arguments if they are comparable.
13624 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13626 PR tree-optimization/84634
13627 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13628 masks and masked_loop_p with a single loop_masks, making sure it's
13629 null for bb vectorization.
13631 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13633 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13634 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13635 loop->force_vectorize to check whether there is no alias.
13637 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13640 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13642 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13644 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13645 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13646 instead of a loop around prev_real_insn.
13647 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13650 PR inline-asm/84625
13651 * config/i386/i386.c (ix86_print_operand): Use conditional
13652 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13655 2018-03-02 Richard Biener <rguenther@suse.de>
13657 PR tree-optimization/84427
13658 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13659 (bitmap_set_subtract_values): Rewrite to handle multiple
13662 (prune_clobbered_mems): Likewise.
13663 (phi_translate): Take edge instead of pred/phiblock.
13664 (phi_translate_1): Likewise.
13665 (phi_translate_set): Likewise. Insert all translated
13666 exprs for a value into the set, keeping possibly multiple
13667 expressions per value.
13668 (compute_antic_aux): Adjust for phi_translate changes.
13669 When intersecting union the expressions and prune those
13670 not in the final value set, keeping possibly multiple
13671 expressions per value. Do not use value-insertion
13672 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13673 all expressions. Add verification that the value-sets
13674 only shrink during iteration.
13675 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13676 (do_pre_regular_insertion): Likewise.
13677 (do_pre_partial_partial_insertion): Likewise.
13679 2018-03-02 Richard Biener <rguenther@suse.de>
13682 * config/darwin.c (saved_debug_info_level): New static global.
13683 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13684 (darwin_asm_lto_end): Restore debug info generation settings.
13686 2018-03-01 Martin Liska <mliska@suse.cz>
13689 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13690 volatile arguments.
13692 2018-03-01 Richard Biener <rguenther@suse.de>
13695 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13696 type annotation with LTO when debug was disabled at compile-time.
13698 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13700 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13702 (mips_final_postscan_insn): Likewise.
13704 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13706 PR rtl-optimization/84528
13707 * alias.c (init_alias_target): Add commentary.
13708 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13709 a unique base value if the frame pointer is not eliminated
13710 to the stack pointer.
13712 2018-03-01 Tom de Vries <tom@codesourcery.com>
13714 PR rtl-optimization/83327
13715 * lra-int.h (hard_regs_spilled_into): Declare.
13716 * lra.c (hard_regs_spilled_into): Define.
13717 (init_reg_info): Init hard_regs_spilled_into.
13718 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13719 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13720 (process_bb_lives): Handle hard_regs_spilled_into.
13721 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13722 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13724 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13726 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13727 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13728 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13729 * config/rs6000/aix72.h: New file.
13731 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13733 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13734 instead of warning_at with conditional singular and plural messages
13738 * stor-layout.c (update_alignment_for_field): For
13739 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13740 && !DECL_PACKED (field), do the alignment update, just use
13741 only desired_align instead of MAX (type_align, desired_align)
13743 (place_field): Don't do known_align < desired_align handling
13744 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13745 is non-NULL, instead do it after rli->prev_field handling and
13746 only if not within a bitfield word. For DECL_PACKED (field)
13747 use type_align of BITS_PER_UNIT.
13749 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13751 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13752 superfluous parentheses and trailing spaces.
13754 2018-02-28 Richard Biener <rguenther@suse.de>
13756 PR tree-optimization/84584
13757 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13758 SCoPs with fake exit edge.
13760 2018-02-28 Martin Liska <mliska@suse.cz>
13763 * timevar.c (timer::print): Fix format to properly print 100%
13766 2018-02-28 Richard Biener <rguenther@suse.de>
13768 PR middle-end/84607
13769 * genmatch.c (capture_info::walk_match): Do not mark
13770 captured expressions without operands as expr_p given
13771 they act more like predicates and should be subject to
13772 "lost tail" side-effect preserving.
13774 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13776 PR rtl-optimization/81611
13777 * auto-inc-dec.c (attempt_change): Move dead note from
13778 mem_insn if it's the next use of regno
13779 (find_address): Take address use of reg holding
13780 non-incremented value. Add parm to limit search to the named
13782 (merge_in_block): Attempt to use a mem insn that is the next
13783 use of the original regno.
13785 2018-02-27 Martin Sebor <msebor@redhat.com>
13788 * doc/invoke.texi (-Wmissing-attributes): New option.
13789 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13791 2018-02-27 Martin Sebor <msebor@redhat.com>
13793 PR translation/84207
13794 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13795 n argument to unsigned HOST_WIDE_INT.
13796 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13797 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13798 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13799 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13801 2018-02-27 Richard Biener <rguenther@suse.de>
13803 PR tree-optimization/84512
13804 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13805 Do not use the estimate returned from record_stmt_cost for
13806 the scalar iteration cost but sum properly using add_stmt_cost.
13808 2018-02-27 Richard Biener <rguenther@suse.de>
13810 PR tree-optimization/84466
13811 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13812 Adjust last change to less strictly validate use operands.
13814 2018-02-27 Martin Liska <mliska@suse.cz>
13816 PR gcov-profile/84548
13817 * gcov.c (process_file): Allow partial overlap and consider it
13818 also as group functions.
13819 (output_lines): Properly calculate range of lines for a group.
13821 2018-02-27 Martin Liska <mliska@suse.cz>
13823 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13824 'ggc' suffixes. Change first column width.
13825 (timer::print): Fix formatting of the column.
13827 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
13829 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13830 preserve inline entry blocks for the sake of debug inline
13831 entry point markers alone.
13832 (remove_unused_locals): Suggest in comments a better place to
13833 force the preservation of inline entry blocks that are
13834 otherwise unused, but do not preserve them.
13836 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13838 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13840 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13843 * config/i386/constraints.md (Bs): Replace
13844 ix86_indirect_branch_register with
13845 TARGET_INDIRECT_BRANCH_REGISTER.
13847 * config/i386/i386.md (indirect_jump): Likewise.
13848 (tablejump): Likewise.
13849 (*sibcall_memory): Likewise.
13850 (*sibcall_value_memory): Likewise.
13851 Peepholes of indirect call and jump via memory: Likewise.
13852 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13853 (*sibcall_value_GOT_32): Likewise.
13854 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13855 (GOT_memory_operand): Likewise.
13856 (call_insn_operand): Likewise.
13857 (sibcall_insn_operand): Likewise.
13858 (GOT32_symbol_operand): Likewise.
13859 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13861 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13863 PR rtl-optimization/83496
13864 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13865 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
13866 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13867 redundant insn, if any.
13868 (relax_delay_slots): Likewise.
13869 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13871 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
13873 PR tree-optimization/83965
13874 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13875 that grouped statements are part of a reduction chain. Return
13876 true if the statement is not marked as a reduction itself but
13877 is part of a group.
13878 (vect_recog_dot_prod_pattern): Don't check whether the statement
13879 is part of a group here.
13880 (vect_recog_sad_pattern): Likewise.
13881 (vect_recog_widen_sum_pattern): Likewise.
13883 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13886 * final.c (rest_of_clean_state): Also look for calls inside sequences.
13888 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13891 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13893 (ix86_output_indirect_function_return): New prototype.
13894 (ix86_split_simple_return_pop_internal): Likewise.
13895 * config/i386/i386.c (indirect_return_via_cx): New.
13896 (indirect_return_via_cx_bnd): Likewise.
13897 (indirect_thunk_name): Handle return va CX_REG.
13898 (output_indirect_thunk_function): Create alias for
13899 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13900 (ix86_output_indirect_jmp): Remove the bool argument.
13901 (ix86_output_indirect_function_return): New function.
13902 (ix86_split_simple_return_pop_internal): Likewise.
13903 * config/i386/i386.md (*indirect_jump): Don't pass false
13904 to ix86_output_indirect_jmp.
13905 (*tablejump_1): Likewise.
13906 (simple_return_pop_internal): Change it to define_insn_and_split.
13907 Call ix86_split_simple_return_pop_internal to split it for
13908 -mfunction-return=.
13909 (simple_return_indirect_internal): Call
13910 ix86_output_indirect_function_return instead of
13911 ix86_output_indirect_jmp.
13913 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13916 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13917 memset and value initialization afterwards.
13919 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13921 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13923 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13926 * common/config/aarch64/aarch64-common.c
13927 (aarch_option_optimization_table[]): Switch
13928 off fomit-frame-pointer
13930 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13931 Chung-Ju Wu <jasonwucj@gmail.com>
13933 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13935 (store_multiple): Ditto.
13937 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13939 * config.gcc: Add --with-cpu support for nds32 target.
13940 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13941 * config/nds32/nds32.opt: Add -mcpu= option.
13943 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13945 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13946 isel=yes): Warn for these deprecated options.
13948 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13950 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13951 ISA_2_5_MASKS_EMBEDDED.
13953 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13955 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13956 p->max as pointers rather than using iterative_hash_expr.
13958 2018-02-23 Carl Love <cel@us.ibm.com>
13960 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13961 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13963 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13964 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13965 P8V_BUILTIN_VEC_VUNSIGNED2.
13967 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13970 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13971 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13973 * lra-constraints.c (curr_insn_transform): Set up
13974 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13976 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13977 * lra-eliminations.c (spill_pseudos): Ditto.
13978 (process_insn_for_elimination): Ditto.
13979 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13980 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13981 LRA_NON_CLOBBERED_ALT.
13983 2018-02-22 Martin Sebor <msebor@redhat.com>
13985 PR tree-optimization/84480
13986 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13987 to maybe_diag_stxncpy_trunc. Call it.
13988 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13989 from gimple_fold_builtin_strcpy. Print inlining stack.
13990 (handle_builtin_stxncpy): Print inlining stack.
13991 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13993 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13996 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13997 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13998 and -fcheck-pointer-bounds are used together.
13999 (indirect_thunk_prefix): New enum.
14000 (indirect_thunk_need_prefix): New function.
14001 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14002 "_nt" instead of "_bnd" for NOTRACK prefix.
14003 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14004 (output_indirect_thunk_function): Likewise.
14006 (ix86_code_end): Update output_indirect_thunk_function calls.
14007 (ix86_output_indirect_branch_via_reg): Replace
14008 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14009 (ix86_output_indirect_branch_via_push): Likewise.
14010 (ix86_output_function_return): Likewise.
14011 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14012 incompatible with -fcf-protection=branch and
14013 -fcheck-pointer-bounds.
14015 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14018 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14019 Change gcc_assert call to output_operand_lossage.
14021 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14023 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14025 2018-02-22 DJ Delorie <dj@redhat.com>
14026 Sebastian Perta <sebastian.perta@renesas.com>
14027 Oleg Endo <olegendo@gcc.gnu.org>
14029 * config/rx/rx.c (rx_rtx_costs): New function.
14030 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14032 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14034 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14036 2018-02-22 Martin Liska <mliska@suse.cz>
14039 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14040 Add "native" as a possible value.
14042 2018-02-22 Martin Liska <mliska@suse.cz>
14045 * config/i386/i386.c (ix86_option_override_internal):
14046 Add "native" as a possible value for -march and -mtune.
14048 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14051 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14052 to all type variants.
14054 PR tree-optimization/84503
14055 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14056 width as info->bitpos + info->bitsize - start.
14057 (merged_store_group::merge_overlapping): Simplify width computation.
14058 (check_no_overlap): New function.
14059 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14060 start + width and last_order of the group, fail if check_no_overlap
14062 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14063 to group if check_no_overlap fails.
14065 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14067 * config/rs6000/altivec.md: Delete contraint arguments to
14068 define_expand, define_split, and define_peephole2, and in
14069 define_insn_and_split if always unused.
14070 * config/rs6000/darwin.md: Ditto.
14071 * config/rs6000/dfp.md: Ditto.
14072 * config/rs6000/rs6000.md: Ditto.
14073 * config/rs6000/sync.md: Ditto.
14074 * config/rs6000/vector.md: Ditto.
14075 * config/rs6000/vsx.md: Ditto.
14077 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14079 * config/rs6000/altivec.md: Write output control strings as braced
14080 blocks instead of double-quoted strings.
14081 * config/rs6000/darwin.md: Ditto.
14082 * config/rs6000/rs6000.md: Ditto.
14083 * config/rs6000/vector.md: Ditto.
14084 * config/rs6000/vsx.md: Ditto.
14086 2018-02-21 Jason Merrill <jason@redhat.com>
14088 PR c++/84314 - ICE with templates and fastcall attribute.
14089 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14091 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14093 * ipa-cp.c (determine_versionability): Fix comment typos.
14095 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14098 * ipa-cp.c (determine_versionability): Do not version functions caling
14101 2018-02-21 Martin Liska <mliska@suse.cz>
14104 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14105 Add "native" as a possible value.
14106 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14107 the macro when native cpu detection is available.
14109 2018-02-21 Martin Liska <mliska@suse.cz>
14112 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14113 Add "native" as a possible value.
14114 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14115 when native cpu detection is available.
14117 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14118 Martin Sebor <msebor@redhat.com>
14120 PR tree-optimization/84478
14121 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14123 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14124 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14125 support which is conservatively correct, for 2 only stay conservative
14126 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14127 argument to the 2 argument get_range_strlen, adjust 6 arg
14128 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14130 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14131 (gimple_fold_builtin_strlen): Pass true as last argument to
14134 2018-02-20 Martin Sebor <msebor@redhat.com>
14136 PR middle-end/84095
14137 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14138 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14139 (builtin_memref::builtin_memref): Factor out parts into
14140 set_base_and_offset and call it.
14142 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14144 PR middle-end/84406
14145 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14146 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14147 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14148 search at the associated MODE_INT.
14150 2018-02-20 Jeff Law <law@redhat.com>
14152 PR middle-end/82123
14153 PR tree-optimization/81592
14154 PR middle-end/79257
14155 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14156 for range data rather than using global data.
14157 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14158 range data rather than using global data.
14159 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14160 pass it to children as needed.
14161 (struct directive::fmtresult): Similarly.
14162 (struct directive::set_width): Similarly.
14163 (struct directive::set_precision): Similarly.
14164 (format_integer, format_directive, parse_directive): Similarly.
14165 (format_none): Accept unnamed vr_values parameter.
14166 (format_percent, format_floating, format_character): Similarly.
14167 (format_string, format_plain): Similarly.
14168 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14169 the EVRP range analyzer for range data rather than using global data.
14170 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14171 gimple-ssa-evrp-analyze.h
14172 (class sprintf_dom_walker): Add after_dom_children member function.
14173 Add evrp_range_analyzer member.
14174 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14175 range analyzer as needed.
14176 (sprintf_dom_walker::after_dom_children): New member function.
14177 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14179 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14180 (evrp_range_analyzer::pop_to_marker): Likewise.
14182 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14184 PR tree-optimization/84419
14185 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14186 with the required type if its current type is compatible but
14189 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14191 PR middle-end/82004
14192 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14193 after vectorization.
14195 2018-02-20 Martin Liska <mliska@suse.cz>
14198 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14199 possible values if we don't have a hint.
14201 2018-02-20 Martin Liska <mliska@suse.cz>
14205 * final.c (shorten_branches): Build align_tab array with one
14207 * opts.c (finish_options): Add alignment option limit check.
14208 (MAX_CODE_ALIGN): Likewise.
14209 (MAX_CODE_ALIGN_VALUE): Likewise.
14210 * doc/invoke.texi: Document maximum allowed option value for
14211 all -falign-* options.
14213 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14216 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14217 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14218 * var-tracking.c (emit_note_insn_var_location): Remove all references
14219 to NOTE_INSN_CALL_ARG_LOCATION.
14220 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14221 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14222 Use copy_rtx_if_shared.
14223 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14224 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14225 (dwarf2out_var_location): Remove handling of
14226 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14228 * final.c (final_scan_insn): Remove all references to
14229 NOTE_INSN_CALL_ARG_LOCATION.
14230 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14231 before dumping final insns.
14232 * except.c (emit_note_eh_region_end): Remove all references to
14233 NOTE_INSN_CALL_ARG_LOCATION.
14234 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14235 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14236 * config/arc/arc.c (hwloop_optimize): Likewise.
14237 * config/arm/arm.c (create_fix_barrier): Likewise.
14238 * config/s390/s390.c (s390_chunkify_start): Likewise.
14239 * config/sh/sh.c (find_barrier): Likewise.
14240 * config/i386/i386.c (rest_of_insert_endbranch,
14241 ix86_seh_fixup_eh_fallthru): Likewise.
14242 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14243 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14244 * config/frv/frv.c (frv_function_prologue): Likewise.
14245 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14247 (note_outside_basic_block_p): Remove all references to
14248 NOTE_INSN_CALL_ARG_LOCATION.
14249 * gengtype.c (adjust_field_rtx_def): Likewise.
14250 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14252 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14253 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14256 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14259 PR tree-optimization/84452
14260 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14261 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14264 2018-02-19 Martin Liska <mliska@suse.cz>
14267 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14269 2018-02-19 Martin Liska <mliska@suse.cz>
14270 Richard Sandiford <richard.sandiford@linaro.org>
14272 PR tree-optimization/82491
14273 * gimple-fold.c (get_base_constructor): Make earlier bail out
14276 2018-02-19 Carl Love <cel@us.ibm.com>
14278 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14279 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14281 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14282 P8V_BUILTIN_VEC_NEG.
14284 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14286 * config/rl78/rl78.md (movdf): New define expand.
14288 2018-02-19 Martin Liska <mliska@suse.cz>
14291 * doc/invoke.texi: Fix typo.
14292 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14294 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14296 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14297 handle rs6000_single_float and rs6000_double_float specially for
14300 2018-02-16 Jeff Law <law@redhat.com>
14302 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14303 (pop_regs): Use it.
14305 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14308 * ipa-inline.c (inline_small_functions): Fix a typo.
14310 2018-02-16 Nathan Sidwell <nathan@acm.org>
14312 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14314 2018-02-16 Carl Love <cel@us.ibm.com>
14316 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14317 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14318 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14319 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14320 expansion to P8V_BUILTIN_VEC_FLOAT2.
14322 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14324 PR rtl-optimization/70023
14325 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14326 src_regno into account.
14328 2018-02-16 Carl Love <cel@us.ibm.com>
14330 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14331 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14332 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14333 * config/rs6000/rs6000.c: Remove case statements for
14334 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14335 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14336 and P9V_BUILTIN_VEC_VINSERT4B.
14337 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14338 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14339 * config/rs6000/vsx.md:
14340 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14343 2018-02-16 Carl Love <cel@us.ibm.com>
14345 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14347 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14349 * config/rs6000/rs6000-c.c: Add the definitions for
14350 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14351 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14352 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14353 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14354 definition for insert4b and define insn *insert3b_internal.
14355 * doc/extend.texi: Add documentation for vec_extract4b.
14357 2018-02-16 Nathan Sidwell <nathan@acm.org>
14359 * doc/extend.texi (Backwards Compatibility): Mention friend
14360 injection. Note for-scope is deprecated.
14361 * doc/invoke.texi (-ffriend-injection): Deprecate.
14363 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14365 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14366 that moved to I2, also allow destinations that are a paradoxical
14367 subreg (instead of a normal reg).
14369 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14372 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14375 2018-02-16 Richard Biener <rguenther@suse.de>
14377 PR tree-optimization/84037
14378 PR tree-optimization/84016
14380 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14381 Adjust vec_construct for the fact we need additional higher latency
14382 128bit inserts for AVX256 and AVX512 vector builds.
14383 (ix86_add_stmt_cost): Scale vector construction cost for
14386 2018-02-16 Richard Biener <rguenther@suse.de>
14388 PR tree-optimization/84417
14389 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14390 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14391 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14393 2018-02-16 Martin Liska <mliska@suse.cz>
14396 * internal-fn.def (ASAN_CHECK): Set proper flags.
14397 (ASAN_MARK): Likewise.
14399 2018-02-16 Julia Koval <julia.koval@intel.com>
14401 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14402 from PTA_CANNONLAKE.
14404 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14407 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14408 Use ++iter rather than iter++ for std::list iterators.
14409 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14410 defer deleting them until all nodes in the forest are processed. Do
14411 free even leaf nodes. Change to_process into auto_vec.
14414 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14415 * vec.h (vec_default_construct): Use memset instead of placement new
14416 if BROKEN_VALUE_INITIALIZATION is defined.
14417 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14418 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14421 PR rtl-optimization/83723
14422 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14423 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14424 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14426 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14428 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14430 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14432 PR rtl-optimization/81443
14433 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14434 from inner REGs to paradoxical SUBREGs.
14436 2018-02-16 Richard Biener <rguenther@suse.de>
14438 PR tree-optimization/84399
14439 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14440 For operands we can analyze at their definition make sure we can
14441 analyze them at each use as well.
14443 2018-02-16 Richard Biener <rguenther@suse.de>
14445 PR tree-optimization/84190
14446 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14447 volatile accesses if the decl isn't volatile.
14449 2018-02-15 Jason Merrill <jason@redhat.com>
14451 PR c++/84314 - ICE with templates and fastcall attribute.
14452 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14453 TYPE_CANONICAL on an existing type.
14455 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14457 PR tree-optimization/84383
14458 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14459 dstoff nor call operand_equal_p if dstbase is NULL.
14461 PR tree-optimization/84334
14462 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14463 also a CONSTANT_CLASS_P, punt.
14465 2018-02-14 Jim Wilson <jimw@sifive.com>
14467 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14468 first SMALL_OPERAND check. New local min_second_step. Move assert
14469 to where locals are set. Add TARGET_RVC support.
14470 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14472 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14474 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14476 2018-02-14 Martin Sebor <msebor@redhat.com>
14478 PR tree-optimization/83698
14479 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14480 arrays constrain the offset range to their bounds.
14481 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14482 (builtin_access::overlap): Avoid setting the size of overlap if it's
14484 (maybe_diag_overlap): Also consider arrays when deciding what values
14485 of offsets to include in diagnostics.
14487 2018-02-14 Martin Sebor <msebor@redhat.com>
14490 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14491 that correspond to the kind of a declaration.
14493 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14496 * config/pa/pa.md: Load address of PIC label using the linkage table
14497 if the label is nonlocal.
14499 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14501 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14502 warning message if user requests -maltivec=be.
14503 * doc/invoke.texi: Document deprecation of -maltivec=be.
14505 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14508 * config/rs6000/rs6000-c.c: Update definitions for
14509 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14510 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14512 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14515 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14516 add _get_ssp intrinsics. Remove argument from
14517 __builtin_ia32_rdssp[d|q].
14518 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14519 * config/i386/i386-builtin.def: Remove argument from
14520 __builtin_ia32_rdssp[d|q].
14521 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14522 ix86_expand_special_args_builtin for _rdssp[d|q].
14523 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14524 Clear register before usage.
14525 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14526 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14528 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14530 PR tree-optimization/84357
14531 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14532 operand 1 of an ARRAY_REF too.
14534 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14537 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14538 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14540 (set_of_reg): New struct.
14541 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14542 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14543 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14545 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14546 Split into bitclr, bitset, bitinvert patterns if appropriate.
14547 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14548 use rx_fuse_in_memory_bitop.
14549 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14550 to named insn, correct maximum insn length.
14552 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14555 * machmode.def: Define a complex mode for PARTIAL_INT.
14556 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14558 * doc/rtl.texi: Document CSPImode.
14559 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14561 (msp430_hard_regno_nregs_with_padding): Likewise.
14563 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14566 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14568 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14570 PR rtl-optimization/84169
14571 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14572 we generated a parallel as new i3 and we split that to new i2 and i3
14573 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14574 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14575 those to i2, not i1. Partially rewrite this scan code.
14577 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14580 * stor-layout.c (place_field): For variable length fields, adjust
14581 offset_align afterwards not just based on the field's alignment,
14582 but also on the size.
14584 PR middle-end/84309
14585 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14586 of exps and logs in the use_exp2 case.
14588 2018-02-13 Jeff Law <law@redhat.com>
14590 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14591 entry for "vector".
14593 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14596 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14600 * common.opt (gas-loc-support, gas-locview-support): New.
14601 (ginline-points, ginternal-reset-location-views): New.
14602 * doc/invoke.texi: Document them. Use @itemx where intended.
14603 (gvariable-location-views): Adjust.
14604 * target.def (reset_location_view): New.
14605 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14606 (TARGET_RESET_LOCATION_VIEW): New.
14607 * doc/tm.texi: Rebuilt.
14608 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14609 (dwarf2out_default_as_locview_support): New.
14610 (output_asm_line_debug_info): Use option variables.
14611 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14612 (output_loc_list): Likewise.
14613 (add_high_low_attributes): Check option variables.
14614 Don't output entry view attribute in strict mode.
14615 (gen_inlined_subroutine_die): Check option variables.
14616 (dwarf2out_inline_entry): Likewise.
14617 (init_sections_and_labels): Likewise.
14618 (dwarf2out_early_finish): Likewise.
14619 (maybe_reset_location_view): New, from...
14620 (dwarf2out_var_location): ... here. Call it.
14621 * debug.h (dwarf2out_default_as_loc_support): Declare.
14622 (dwarf2out_default_as_locview_support): Declare.
14623 * hooks.c (hook_int_rtx_insn_0): New.
14624 * hooks.h (hook_int_rtx_insn_0): Declare.
14625 * toplev.c (process_options): Take -gas-loc-support and
14626 -gas-locview-support from dwarf2out. Enable
14627 -gvariable-location-views by default only with locview
14628 assembler support. Enable -ginternal-reset-location-views by
14629 default only if the target defines the corresponding hook.
14630 Enable -ginline-points by default if location views are
14631 enabled; force it disabled if statement frontiers are
14633 * tree-inline.c (expand_call_inline): Check option variables.
14634 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14636 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14638 PR tree-optimization/84321
14639 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14640 handling. Also check whether the anti-range contains any values
14641 that satisfy the mask; switch to a VR_RANGE if not.
14643 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14646 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14648 2018-02-13 Martin Jambor <mjambor@suse.cz>
14651 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14652 of call statements, also set location of a load to a temporary.
14654 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14656 * config/rl78/rl78.c (add_vector_labels): New function.
14657 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14658 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14659 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14660 which checks that no arguments are passed.
14661 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14662 * doc/extend.texi: Documentation for the new attribute.
14664 2018-02-13 Andreas Schwab <schwab@suse.de>
14666 * config/riscv/linux.h (CPP_SPEC): Define.
14668 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14671 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14672 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14673 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14674 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14675 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14676 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14677 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14678 temporarily for AES and PCLMUL builtins.
14680 PR tree-optimization/84339
14681 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14682 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14685 PR middle-end/84309
14686 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14687 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14688 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14690 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14692 * omp-simd-clone.h: New file.
14693 * omp-simd-clone.c: Include omp-simd-clone.h.
14694 (expand_simd_clones): No longer static.
14695 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14696 cgraph.h and omp-simd-clone.h.
14697 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14698 (vect_recog_widen_shift_pattern): Formatting fix.
14699 (vect_pattern_recog_1): Don't check optab for calls.
14702 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14703 operands[2] into a REG before using gen_lowpart on it.
14705 2018-02-12 Jeff Law <law@redhat.com>
14708 * config/sh/sh.c (find_barrier): Consider a sibling call
14711 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14712 successfully back substituting a reg.
14714 2018-02-12 Richard Biener <rguenther@suse.de>
14716 PR tree-optimization/84037
14717 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14718 parameter, move visited init to caller.
14719 (vect_slp_analyze_operations): Separate cost from validity
14720 check, initialize visited once for all instances.
14721 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14723 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14725 (vect_model_promotion_demotion_cost): Likewise.
14726 (vectorizable_bswap): Guard cost modeling with !slp_node
14727 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14729 (vectorizable_call): Likewise.
14730 (vectorizable_conversion): Likewise.
14731 (vectorizable_assignment): Likewise.
14732 (vectorizable_shift): Likewise.
14733 (vectorizable_operation): Likewise.
14734 (vectorizable_store): Likewise.
14735 (vectorizable_load): Likewise.
14736 (vectorizable_condition): Likewise.
14737 (vectorizable_comparison): Likewise.
14739 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14742 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14743 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14744 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14746 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14748 PR middle-end/83665
14749 * params.def (inline-min-speedup): Increase from 8 to 15.
14750 (max-inline-insns-auto): Decrease from 40 to 30.
14751 * ipa-split.c (consider_split): Add some buffer for function to
14752 be considered inlining candidate.
14753 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14756 2018-02-12 Richard Biener <rguenther@suse.de>
14758 PR tree-optimization/84037
14759 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14760 matched stmts if we cannot swap the non-matched ones.
14762 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14764 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14765 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14766 _mm_maskz_scalef_round_ss): New intrinsics.
14767 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14768 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14769 __builtin_ia32_scalefss_round): Remove.
14770 (__builtin_ia32_scalefsd_mask_round,
14771 __builtin_ia32_scalefss_mask_round): New intrinsics.
14772 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14773 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14774 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14775 "<round_constraint>")): Changed to ...
14776 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14777 "<round_scalar_constraint>")): ... this.
14778 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14779 %0, %1, %2<round_op3>}"): Changed to ...
14780 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14781 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14782 %2<round_scalar_mask_op3>}"): ... this.
14783 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14785 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14787 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14788 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14789 (_mm_maskz_sqrt_round_ss): New intrinsics.
14790 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14791 (__builtin_ia32_sqrtsd_mask_round)
14792 (__builtin_ia32_sqrtss_mask_round): New builtins.
14793 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14794 (__builtin_ia32_sqrtss_round): Remove.
14795 (__builtin_ia32_sqrtsd_mask_round)
14796 (__builtin_ia32_sqrtss_mask_round): New builtins.
14797 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14798 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14799 ((match_operand:VF_128 1 "vector_operand"
14800 "xBm,<round_constraint>")): Changed to ...
14801 ((match_operand:VF_128 1 "vector_operand"
14802 "xBm,<round_scalar_constraint>")): ... this.
14803 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14804 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14805 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14806 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14807 %<iptr>1<round_scalar_mask_op3>}): ... this.
14808 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14809 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14811 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14814 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14815 Cast vec_cmpeq result to correct type.
14816 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14817 Cast vec_cmpgt result to correct type.
14819 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
14821 * final.c (final_scan_insn_1): Renamed from...
14822 (final_scan_insn): ... this. New wrapper, to recover
14823 seen from the outermost call in recursive ones.
14824 * config/sparc/sparc.c (output_return): Drop seen from call.
14825 (output_sibcall): Likewise.
14826 * config/visium/visium.c (output_branch): Likewise.
14828 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
14830 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14833 2018-02-10 Alan Modra <amodra@gmail.com>
14836 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14837 Specify LR as an input.
14839 2018-02-10 Jakub Jelinek <jakub@redhat.com>
14842 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14843 remove_member_access_dummy_vars): New functions.
14844 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14845 lower_omp_1, execute_lower_omp): Use them.
14847 PR rtl-optimization/84308
14848 * shrink-wrap.c (spread_components): Release todo vector.
14850 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
14852 PR rtl-optimization/57193
14853 * ira-color.c (struct allocno_color_data): Add member
14854 conflict_allocno_hard_prefs.
14855 (update_conflict_allocno_hard_prefs): New.
14856 (bucket_allocno_compare_func): Add a preference based on
14857 conflict_allocno_hard_prefs.
14858 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14859 (color_allocnos): Remove a dead code. Initiate
14860 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
14862 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14865 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14866 constraint from =wa to wa. Avoid a subreg on the output operand,
14867 instead use a pseudo and subreg it in a move.
14868 (p9_xxbrd_<mode>): Changed to ...
14869 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14870 (p9_xxbrd_v2df): New expander.
14871 (p9_xxbrw_<mode>): Changed to ...
14872 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14873 (p9_xxbrw_v4sf): New expander.
14875 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14877 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14879 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
14882 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14883 multiply in 32-bit mode.
14884 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14885 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14888 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14890 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14891 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14892 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14893 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14895 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14898 * dwarf2out.c (is_trivial_indirect_ref): New function.
14899 (dwarf2out_late_global_decl): Do not generate a location
14900 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14901 and that are not defined in the current unit.
14903 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14905 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14906 instead of a libcall for UNORDERED.
14908 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14911 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14912 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14914 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14917 * config/s390/s390.c (s390_set_current_function): Invoke
14918 s390_indirect_branch_settings also if fndecl didn't change.
14920 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14922 * config/rs6000/rs6000.md (blockage): Set length to zero.
14924 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14926 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14928 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14931 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14932 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14936 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14937 PARALLEL incoming that failed vt_get_decl_and_offset check.
14939 PR middle-end/84237
14940 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14941 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14943 (get_variable_section): For decls in named .bss* sections pass true as
14944 second argument to bss_initializer_p.
14946 2018-02-09 Marek Polacek <polacek@redhat.com>
14947 Jakub Jelinek <jakub@redhat.com>
14950 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14951 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14952 Sync some changes from cxx_fold_indirect_ref.
14954 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14956 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14958 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14959 (BLOCK_INLINE_ENTRY_LABEL): New.
14960 (dwarf2out_var_location): Disregard inline entry markers.
14961 (inline_entry_data): New struct.
14962 (inline_entry_data_hasher): New hashtable type.
14963 (inline_entry_data_hasher::hash): New.
14964 (inline_entry_data_hasher::equal): New.
14965 (inline_entry_data_table): New variable.
14966 (add_high_low_attributes): Add DW_AT_entry_pc and
14967 DW_AT_GNU_entry_view attributes if a pending entry is found
14968 in inline_entry_data_table. Add old entry_pc attribute only
14969 if debug nonbinding markers are disabled.
14970 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14971 markers are enabled.
14972 (block_within_block_p, dwarf2out_inline_entry): New.
14973 (dwarf2out_finish): Check that no entries remained in
14974 inline_entry_data_table.
14975 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14976 (final_scan_insn, notice_source_line): Likewise.
14977 (rest_of_clean_state): Skip inline entry markers.
14978 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14980 * gimple.c (gimple_build_debug_inline_entry): New.
14981 * gimple.h (enum gimple_debug_subcode): Add
14982 GIMPLE_DEBUG_INLINE_ENTRY.
14983 (gimple_build_debug_inline_entry): Declare.
14984 (gimple_debug_inline_entry_p): New.
14985 (gimple_debug_nonbind_marker_p): Adjust.
14986 * insn-notes.def (INLINE_ENTRY): New.
14987 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14988 inline entry marker notes.
14989 (print_insn): Likewise.
14990 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14991 (INSN_DEBUG_MARKER_KIND): Likewise.
14992 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14993 * tree-inline.c (expand_call_inline): Build and insert
14994 debug_inline_entry stmt.
14995 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14996 inline entry blocks early, if nonbind markers are enabled.
14997 (dump_scope_block): Dump fragment info.
14998 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14999 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15000 (gimple_build_debug_inline_entry): New.
15001 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15002 Enable/disable inline entry points too.
15003 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15004 (DEBUG_INSN): Describe inline entry markers.
15006 * common.opt (gvariable-location-views): New.
15007 (gvariable-location-views=incompat5): New.
15008 * config.in: Rebuilt.
15009 * configure: Rebuilt.
15010 * configure.ac: Test assembler for view support.
15011 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15012 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15013 * dwarf2out.c (var_loc_view): New typedef.
15014 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15015 (dwarf2out_locviews_in_attribute): New.
15016 (dwarf2out_locviews_in_loclist): New.
15017 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15018 (enum dw_line_info_opcode): Add LI_adv_address.
15019 (struct dw_line_info_table): Add view.
15020 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15021 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15022 (zero_view_p): New variable.
15023 (ZERO_VIEW_P): New macro.
15024 (output_asm_line_debug_info): New.
15025 (struct var_loc_node): Add view.
15026 (add_AT_view_list, AT_loc_list): New.
15027 (add_var_loc_to_decl): Add view param. Test it against last.
15028 (new_loc_list): Add view params. Record them.
15029 (AT_loc_list_ptr): Handle loc and view lists.
15030 (view_list_to_loc_list_val_node): New.
15031 (print_dw_val): Handle dw_val_class_view_list.
15032 (size_of_die): Likewise.
15033 (value_format): Likewise.
15034 (loc_list_has_views): New.
15035 (gen_llsym): Set vl_symbol too.
15036 (maybe_gen_llsym, skip_loc_list_entry): New.
15037 (dwarf2out_maybe_output_loclist_view_pair): New.
15038 (output_loc_list): Output view list or entries too.
15039 (output_view_list_offset): New.
15040 (output_die): Handle dw_val_class_view_list.
15041 (output_dwarf_version): New.
15042 (output_compilation_unit_header): Use it.
15043 (output_skeleton_debug_sections): Likewise.
15044 (output_rnglists, output_line_info): Likewise.
15045 (output_pubnames, output_aranges): Update version comments.
15046 (output_one_line_info_table): Output view numbers in asm comments.
15047 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15048 Call maybe_gen_llsym.
15049 (loc_list_from_tree_1): Adjust.
15050 (add_AT_location_description): Create view list attribute if
15051 needed, check it's absent otherwise.
15052 (convert_cfa_to_fb_loc_list): Adjust.
15053 (maybe_emit_file): Call output_asm_line_debug_info for test.
15054 (dwarf2out_var_location): Reset views as needed. Precompute
15055 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15056 attribute. Set view.
15057 (new_line_info_table): Reset next view.
15058 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15059 (dwarf2out_source_line): Likewise. Output view resets and labels to
15060 the assembler, or select appropriate line info opcodes.
15061 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15062 (optimize_string_length): Catch it. Adjust.
15063 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15064 dw_val_class_view_list, and remove it if no longer needed.
15065 (hash_loc_list): Hash view numbers.
15066 (loc_list_hasher::equal): Compare them.
15067 (optimize_location_lists): Check whether a view list symbol is
15068 needed, and whether the locview attribute is present, and
15069 whether they match. Remove the locview attribute if no longer
15071 (index_location_lists): Call skip_loc_list_entry for test.
15072 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15073 Use output_dwarf_version.
15074 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15075 (struct dw_val_node): Add val_view_list.
15076 * final.c (SEEN_NEXT_VIEW): New.
15077 (set_next_view_needed): New.
15078 (clear_next_view_needed): New.
15079 (maybe_output_next_view): New.
15080 (final_start_function): Rename to...
15081 (final_start_function_1): ... this. Take pointer to FIRST,
15082 add SEEN parameter. Emit param bindings in the initial view.
15083 (final_start_function): Reintroduce SEEN-less interface.
15084 (final): Rename to...
15085 (final_1): ... this. Take SEEN parameter. Output final pending
15086 next view at the end.
15087 (final): Reintroduce seen-less interface.
15088 (final_scan_insn): Output pending next view before switching
15089 sections or ending a block. Mark the next view as needed when
15090 outputting variable locations. Notify debug backend of section
15091 changes, and of location view changes.
15092 (rest_of_handle_final): Adjust.
15093 * toplev.c (process_options): Autodetect value for debug variable
15094 location views option. Warn on incompat5 without -gdwarf-5.
15095 * doc/invoke.texi (gvariable-location-views): New.
15096 (gvariable-location-views=incompat5): New.
15097 (gno-variable-location-views): New.
15099 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15101 PR tree-optimization/84136
15102 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15103 that the result of find_edge is non-NULL.
15105 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15108 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15109 storing integer register in SImode. Fix cost of 256 and 512
15110 byte aligned SSE register store.
15112 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15114 * config/i386/i386.c (ix86_multiplication_cost): Fix
15115 multiplication cost for TARGET_AVX512DQ.
15117 2018-02-08 Marek Polacek <polacek@redhat.com>
15119 PR tree-optimization/84238
15120 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15123 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15125 PR tree-optimization/84265
15126 * tree-vect-stmts.c (vectorizable_store): Don't treat
15127 VMAT_CONTIGUOUS accesses as grouped.
15128 (vectorizable_load): Likewise.
15130 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15132 PR tree-optimization/81635
15133 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15134 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15135 (test_round_for_mask): New functions.
15136 (wide_int_cc_tests): Call test_round_for_mask.
15137 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15138 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15139 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15140 range returned by get_range_info.
15142 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15145 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15146 * symtab.c: Include builtins.h
15147 (symtab_node::output_to_lto_symbol_table_p): Move here
15148 from lto-streamer-out.c:output_symbol_p.
15149 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15150 (output_symbol_p): Move all logic to symtab.c
15151 (produce_symtab): Update.
15153 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15155 * config/s390/s390-opts.h (enum indirect_branch): Define.
15156 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15157 (s390_indirect_branch_via_thunk)
15158 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15159 (enum s390_indirect_branch_type): Define.
15160 * config/s390/s390.c (struct s390_frame_layout, struct
15161 machine_function): Remove.
15162 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15163 (indirect_branch_table_label_no, indirect_branch_table_name):
15165 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15166 (enum s390_indirect_branch_option): Define.
15167 (s390_return_addr_from_memory): New function.
15168 (s390_handle_string_attribute): New function.
15169 (s390_attribute_table): Add new attribute handler.
15170 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15171 (s390_indirect_branch_via_thunk): New function.
15172 (s390_indirect_branch_via_inline_thunk): New function.
15173 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15174 sibling call optimization for non z10 compiles.
15175 (s390_emit_call): Force indirect branch target to be a single
15176 register. Add r1 clobber for non-z10 compiles.
15177 (s390_emit_epilogue): Emit return jump via return_use expander.
15178 (s390_reorg): Handle JUMP_INSNs as execute targets.
15179 (s390_option_override_internal): Perform validity checks for the
15180 new command line options.
15181 (s390_indirect_branch_attrvalue): New function.
15182 (s390_indirect_branch_settings): New function.
15183 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15184 (s390_output_indirect_thunk_function): New function.
15185 (s390_code_end): Implement target hook.
15186 (s390_case_values_threshold): Implement target hook.
15187 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15189 * config/s390/s390.h (struct s390_frame_layout)
15190 (struct machine_function): Move here from s390.c.
15191 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15192 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15193 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15194 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15195 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15196 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15197 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15198 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15199 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15200 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15201 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15202 (mnemonic attribute): Add values which aren't recognized
15204 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15205 pattern for branch conversion. Fix mnemonic attribute.
15206 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15207 indirect branch via thunk if requested.
15208 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15209 ("*indirect_jump"): Disable for branch conversion using out of
15211 ("indirect_jump_via_thunk<mode>_z10")
15212 ("indirect_jump_via_thunk<mode>")
15213 ("indirect_jump_via_inlinethunk<mode>_z10")
15214 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15215 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15216 ("casesi_jump_via_inlinethunk<mode>_z10")
15217 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15218 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15219 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15220 ("*indirect2_jump"): Disable for branch conversion.
15221 ("casesi_jump"): Turn into expander and expand patterns for branch
15223 ("return_use"): New expander.
15224 ("*return"): Emit return via thunk and rename it to ...
15225 ("*return<mode>"): ... this one.
15226 * config/s390/s390.opt: Add new options and and enum for the
15229 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15231 * lra-constraints.c (match_reload): Unconditionally use
15232 gen_lowpart_SUBREG, rather than selecting between that
15233 and equivalent gen_rtx_SUBREG code.
15235 2018-02-08 Richard Biener <rguenther@suse.de>
15237 PR tree-optimization/84233
15238 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15239 changed flag instead of boguously re-using phi_inserted.
15241 2018-02-08 Martin Jambor <mjambor@suse.cz>
15243 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15244 static local variables.
15246 2018-02-08 Richard Biener <rguenther@suse.de>
15248 PR tree-optimization/84278
15249 * tree-vect-stmts.c (vectorizable_store): When looking for
15250 smaller vector types to perform grouped strided loads/stores
15251 make sure the mode is supported by the target.
15252 (vectorizable_load): Likewise.
15254 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15256 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15257 Increase LDP/STP opportunities by adding adjacent callee-saves.
15259 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15261 PR rtl-optimization/84068
15262 PR rtl-optimization/83459
15263 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15265 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15267 PR tree-optimization/84224
15268 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15269 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15270 non-zero arguments.
15272 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15275 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15276 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15277 count, remove one USE.
15279 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15281 * doc/install.texi (Configuration): Document the
15282 --with-long-double-format={ibm,ieee} PowerPC configuration
15286 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15287 Convert from define_expand to be define_insn_and_split. Rework
15288 float/double/_Float128 conversions to QI/HI/SImode to work with
15289 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15290 conversions to QI/HImode types did a store and then a load to
15291 truncate the value. For conversions to VSX registers, don't split
15292 the insn, instead emit the code directly. Use the code iterator
15293 any_fix to combine signed and unsigned conversions.
15294 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15295 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15296 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15297 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15298 (fix_<mode>di2_hw): Likewise.
15299 (fixuns_<mode>di2_hw): Likewise.
15300 (fix_<mode>si2_hw): Likewise.
15301 (fixuns_<mode>si2_hw): Likewise.
15302 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15303 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15304 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15305 fix<uns>_trunc<SFDF:mode>si2_p8.
15306 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15307 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15308 (fix<uns>_<mode>_mem): Likewise.
15309 (fctiw<u>z_<mode>_mem): Likewise.
15310 (fix<uns>_<mode>_mem): Likewise.
15311 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15312 the register allocator from doing a direct move to the GPRs to do
15313 a store, and instead use the ISA 3.0 store byte/half-word from
15314 vector register instruction. For IEEE 128-bit floating point,
15315 also optimize stores of 32-bit ints.
15316 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15318 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15320 * genextract.c (push_pathstr_operand): New function to support
15322 (walk_rtx): Call push_pathstr_operand.
15323 (print_path): Support [a-zA-Z].
15325 2018-02-07 Richard Biener <rguenther@suse.de>
15327 PR tree-optimization/84037
15328 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15329 (cse_and_gimplify_to_preheader): Declare.
15330 (vect_get_place_in_interleaving_chain): Likewise.
15331 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15333 (_loop_vec_info::~_loop_vec_info): Delete it.
15334 (cse_and_gimplify_to_preheader): New function.
15335 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15336 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15337 (vectorizable_load): Likewise. For grouped stores always base
15338 the IV on the first element.
15339 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15340 condition before gimplifying.
15342 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15344 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15345 *DIV_EXPR and *MOD_EXPR.
15347 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15350 * config/i386/i386.c (ix86_option_override_internal): Mask out
15351 the CF_SET bit when checking -fcf-protection.
15353 2018-02-07 Tom de Vries <tom@codesourcery.com>
15356 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15359 2018-02-07 Richard Biener <rguenther@suse.de>
15361 PR tree-optimization/84204
15362 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15365 PR tree-optimization/84205
15366 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15367 special-case isl_ast_op_zdiv_r.
15369 PR tree-optimization/84223
15370 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15371 Only add conditions from within the region.
15372 (gather_bbs::after_dom_children): Adjust.
15374 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15377 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15378 * config/avr/avr.md: Only post-reload split REG-REG moves if
15379 either register is GENERAL_REG_P.
15381 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15383 PR tree-optimization/84235
15384 * tree-ssa-scopedtables.c
15385 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15386 if the subtraction is performed in floating point type where NaNs are
15387 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15388 build 1. Formatting fix.
15390 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15393 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15394 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15395 and skip it regardless of bb boundaries. Use CALL_P macro,
15396 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15397 unnecessarily, formatting fix.
15399 2018-02-06 Michael Collison <michael.collison@arm.com>
15401 * config/arm/thumb2.md:
15402 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15403 (*thumb_mov_notscc): Ditto.
15405 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15408 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15409 unsigned_fix, not "s".
15411 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15413 * configure.ac (gcc_fn_eh_frame_ro): New function.
15414 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15415 correct .eh_frame permissions.
15416 * configure: Regenerate.
15418 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15420 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15421 irrelevant options.
15423 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15425 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15426 Display warning message for -mno-speculate-indirect-jumps.
15428 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15430 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15432 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15434 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15436 PR tree-optimization/84225
15437 * tree-eh.c (find_trapping_overflow): Only call
15438 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15440 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15443 * config/i386/i386.c: Reimplement the check of possible options
15444 -mibt/-mshstk conbination. Change error messages.
15445 * doc/invoke.texi: Fix a typo: remove extra '='.
15447 2018-02-06 Marek Polacek <polacek@redhat.com>
15449 PR tree-optimization/84228
15450 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15452 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15455 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15456 emitted arch directives.
15457 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15458 __ARM_FEATURE_COPROC before changing architectures.
15460 2018-02-06 Richard Biener <rguenther@suse.de>
15462 * config/i386/i386.c (print_reg): Fix typo.
15463 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15465 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15467 * configure: Regenerate.
15469 2018-02-05 Martin Sebor <msebor@redhat.com>
15471 PR tree-optimization/83369
15472 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15475 2018-02-05 Martin Liska <mliska@suse.cz>
15477 * doc/invoke.texi: Cherry-pick upstream r323995.
15479 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15481 * ira.c (ira_init_register_move_cost): Adjust comment.
15483 2018-02-05 Martin Liska <mliska@suse.cz>
15485 PR gcov-profile/84137
15486 * doc/gcov.texi: Fix typo in documentation.
15488 2018-02-05 Martin Liska <mliska@suse.cz>
15490 PR gcov-profile/83879
15491 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15492 using dlopen functionality.
15494 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15496 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15497 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15498 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15499 _mm_maskz_range_round_ss): New intrinsics.
15500 (__builtin_ia32_rangesd128_round)
15501 (__builtin_ia32_rangess128_round): Remove.
15502 (__builtin_ia32_rangesd128_mask_round,
15503 __builtin_ia32_rangess128_mask_round): New builtins.
15504 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15505 __builtin_ia32_rangess128_round): Remove.
15506 (__builtin_ia32_rangesd128_mask_round,
15507 __builtin_ia32_rangess128_mask_round): New builtins.
15508 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15509 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15510 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15511 "<round_saeonly_constraint>")): Changed to ...
15512 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15513 "<round_saeonly_scalar_constraint>")): ... this.
15514 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15515 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15516 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15517 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15518 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15520 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15522 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15524 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15525 Remove all values except native, 8540 and 8548.
15527 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15529 * config/i386/i386.c (ix86_output_function_return): Pass
15530 INVALID_REGNUM, instead of -1, as invalid register number to
15531 indirect_thunk_name and output_indirect_thunk.
15533 2018-02-02 Julia Koval <julia.koval@intel.com>
15535 * config.gcc: Add -march=icelake.
15536 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15537 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15538 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15539 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15540 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15541 (processor_target_table): Add icelake.
15542 (ix86_option_override_internal): Handle new PTAs.
15543 (get_builtin_code_for_version): Handle icelake.
15544 (M_INTEL_COREI7_ICELAKE): New.
15545 (fold_builtin_cpu): Handle icelake.
15546 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15547 * doc/invoke.texi: Add -march=icelake.
15549 2018-02-02 Julia Koval <julia.koval@intel.com>
15551 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15552 to wide_int_bitmask.
15553 * wide-int-bitmask.h: New.
15555 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15558 * config/i386/i386.md: Replace Pmode with word_mode in
15559 builtin_setjmp_setup and builtin_longjmp to support x32.
15561 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15565 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15567 (rs6000_supported_cpu_names): New static variable.
15568 (linux_cpu_translation_table): Likewise.
15569 (elf_platform) <cpu>: Define new static variable and use it.
15570 Translate kernel AT_PLATFORM name to canonical name if needed.
15571 Error if platform name is unknown.
15573 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15576 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15578 2018-02-01 Jeff Law <law@redhat.com>
15581 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15582 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15583 the scratch if RELEASE_VIA_POP is false.
15584 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15585 If we have to save a temporary register, decrement SIZE appropriately.
15586 Pass new arguments to release_scratch_register_on_entry.
15587 (ix86_adjust_stack_and_probe): Likewise.
15588 (ix86_emit_probe_stack_range): Pass new arguments to
15589 release_scratch_register_on_entry.
15591 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15593 PR rtl-optimization/84157
15594 * combine.c (change_zero_ext): Use REG_P predicate in
15595 front of HARD_REGISTER_P predicate.
15597 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15599 * config/avr/avr.c (avr_option_override): Move disabling of
15600 -fdelete-null-pointer-checks to...
15601 * common/config/avr/avr-common.c (avr_option_optimization_table):
15604 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15606 PR tree-optimization/81635
15607 * tree-data-ref.c (split_constant_offset_1): For types that
15608 wrap on overflow, try to use range info to prove that wrapping
15611 2018-02-01 Renlin Li <renlin.li@arm.com>
15614 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15615 TAILCALL_ADDR_REGS.
15616 (aarch64_register_move_cost): Likewise.
15617 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15618 TAILCALL_ADDR_REGS.
15619 (REG_CLASS_NAMES): Likewise.
15620 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15621 TAILCALL_ADDR_REGS. Remove IP registers.
15622 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15624 2018-02-01 Richard Biener <rguenther@suse.de>
15626 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15627 for specifying RPO order and allow NULL for that.
15628 * domwalk.c (dom_walker::dom_walker): Likewise.
15629 (dom_walker::walk): Handle NULL RPO order.
15630 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15632 (rewrite_update_dom_walker): Likewise.
15633 (mark_def_dom_walker): Likewise.
15635 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15637 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15638 (aarch64_maybe_expand_sve_subreg_move): Declare.
15639 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15640 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15642 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15643 that are semantically a reverse operation.
15644 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15645 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15646 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15648 (aarch64_can_change_mode_class): For big-endian, forbid changes
15649 between two SVE modes if they have different element sizes.
15651 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15653 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15654 the TImode handling for big-endian targets.
15656 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15658 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15659 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15661 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15662 Remove BSWAP handing for big-endian targets and use the form of
15663 LD1RQ appropariate for the mode.
15665 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15667 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15668 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15669 duplicated element.
15671 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15674 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15675 check for operands that need to go through aarch64_sve_reload_be.
15677 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15679 PR tree-optimization/81661
15680 PR tree-optimization/84117
15681 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15682 * tree-eh.c: Include gimplify.h.
15683 (find_trapping_overflow, replace_trapping_overflow,
15684 rewrite_to_non_trapping_overflow): New functions.
15685 * tree-vect-loop.c: Include tree-eh.h.
15686 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15687 * tree-data-ref.c: Include tree-eh.h.
15688 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15690 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15692 PR rtl-optimization/84123
15693 * combine.c (change_zero_ext): Check if hard register satisfies
15694 can_change_dest_mode before calling gen_lowpart_SUBREG.
15696 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15699 * ira.c (ira_init_register_move_cost): Remove assert.
15701 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15703 PR rtl-optimization/84071
15704 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15705 * doc/tm.texi: Regenerate.
15707 2018-01-31 Richard Biener <rguenther@suse.de>
15709 PR tree-optimization/84132
15710 * tree-data-ref.c (analyze_miv_subscript): Properly
15711 check whether evolution_function_is_affine_multivariate_p
15712 before calling gcd_of_steps_may_divide_p.
15714 2018-01-31 Julia Koval <julia.koval@intel.com>
15717 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15718 * config/i386/i386.md (rdpid_rex64) New.
15719 (rdpid): Make 32bit only.
15721 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15724 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15725 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15727 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15730 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15732 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15734 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15736 PR rtl-optimization/84071
15737 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15738 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15740 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15742 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15743 (arc_attribute_table): Add 'aux' attribute.
15744 (arc_in_small_data_p): Consider aux like variables.
15745 (arc_is_aux_reg_p): New function.
15746 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15747 (arc_get_aux_arg): New function.
15748 (prepare_move_operands): Handle aux-register access.
15749 (arc_handle_aux_attribute): New function.
15750 * doc/extend.texi (ARC Variable attributes): Add subsection.
15752 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15754 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15755 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15756 (arc_attribute_table): Add 'uncached' attribute.
15757 (arc_print_operand): Print '.di' flag for uncached memory
15759 (arc_in_small_data_p): Do not consider for small data the uncached
15761 (arc_is_uncached_mem_p): New function.
15762 * config/arc/predicates.md (compact_store_memory_operand): Check
15763 for uncached memory accesses.
15764 (nonvol_nonimm_operand): Likewise.
15765 * doc/extend.texi (ARC Type Attribute): New subsection.
15767 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15770 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15771 falign-loops=): Add Optimization flag.
15773 2018-01-30 Jeff Law <law@redhat.com>
15776 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15777 INT_REGISTERS_SAVED. Check it prior to calling
15778 get_scratch_register_on_entry.
15779 (ix86_adjust_stack_and_probe): Similarly.
15780 (ix86_emit_probe_stack_range): Similarly.
15781 (ix86_expand_prologue): Corresponding changes.
15783 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15786 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15787 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15789 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15792 * lra-constraints.c (curr_insn_transform): Process AND in the
15795 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15797 PR rtl-optimization/83986
15798 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15799 dependence against last_pending_memory_flush in addition to
15800 pending_jump_insns.
15802 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15804 PR tree-optimization/81611
15805 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15808 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15811 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15814 2018-01-30 Richard Biener <rguenther@suse.de>
15815 Jakub Jelinek <jakub@redhat.com>
15817 PR tree-optimization/84111
15818 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15819 inner loops added during recursion, as they don't have up-to-date
15822 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15825 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15826 (can_inline_edge_by_limits_p): ... here.
15827 (can_early_inline_edge_p, check_callers,
15828 update_caller_keys, update_callee_keys, recursive_inlining,
15829 add_new_edges_to_heap, speculation_useful_p,
15830 inline_small_functions,
15831 inline_small_functions, flatten_function,
15832 inline_to_all_callers_1): Update.
15834 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15836 * profile-count.c (profile_count::combine_with_ipa_count): Handle
15839 2018-01-30 Richard Biener <rguenther@suse.de>
15841 PR tree-optimization/83008
15842 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15843 invariant and constant vector uses in stmts when they need
15844 more than one stmt.
15846 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15849 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15850 * configure: Regenerate.
15852 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15854 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15856 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15857 Use gen_rtx_REG rather than gen_lowpart.
15859 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15861 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15862 rather than 0 when creating partial subregs.
15864 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15866 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15869 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15872 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15873 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15874 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15875 flags. This restores the settings used before the 2017-07-24.
15876 Turning off pre increment/decrement/modify allows IVOPTS to
15877 optimize DF/SF loops where the index is an int.
15879 2018-01-29 Richard Biener <rguenther@suse.de>
15880 Kelvin Nilsen <kelvin@gcc.gnu.org>
15883 * tree-vect-stmts.c (vectorizable_call): Don't call
15884 targetm.vectorize_builtin_md_vectorized_function if callee is
15887 2018-01-22 Carl Love <cel@us.ibm.com>
15889 * doc/extend.tex: Fix typo in second arg in
15890 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15892 2018-01-29 Richard Biener <rguenther@suse.de>
15894 PR tree-optimization/84086
15895 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15896 (flush_ssaname_freelist): When SSA names were released reset
15897 the SCEV hash table.
15899 2018-01-29 Richard Biener <rguenther@suse.de>
15901 PR tree-optimization/84057
15902 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15903 removed paths when removing edges.
15905 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15907 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15908 -mfunction-return=@var{choice}.
15910 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15912 PR diagnostic/84034
15913 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15914 Handle CR like TAB.
15915 (layout::print_source_line): Likewise.
15916 (test_get_line_width_without_trailing_whitespace): Add test cases.
15918 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15920 PR middle-end/84040
15921 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15924 2018-01-26 Jim Wilson <jimw@sifive.com>
15926 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15928 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15931 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15933 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15934 and CMP + SUB-immediate -> SUBS.
15936 2018-01-26 Martin Sebor <msebor@redhat.com>
15938 PR tree-optimization/83896
15939 * tree-ssa-strlen.c (get_string_len): Rename...
15940 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15941 Avoid assuming length is constant.
15942 (handle_char_store): Use HOST_WIDE_INT for string length.
15944 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15947 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15948 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15950 2018-01-26 Richard Biener <rguenther@suse.de>
15952 PR rtl-optimization/84003
15953 * dse.c (record_store): Only record redundant stores when
15954 the earlier store aliases at least all accesses the later one does.
15956 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15958 PR rtl-optimization/83985
15959 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15960 REG_CFA_RESTORE insns.
15961 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15962 REG_CFA_RESTORE insns here.
15965 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15966 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15968 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15970 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15971 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15972 (arc_init): Likewise.
15973 (arc_override_options): Likewise.
15974 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15976 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15978 * config/arc/arc.h (TARGET_DBNZ): Define.
15979 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15980 properly set the tune attribute.
15981 (dbnz): Use TARGET_DBNZ guard.
15982 * config/arc/arc.opt (mtune): Add core3 option.
15984 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15986 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15987 recognize new pic like addresses.
15988 (arc_delegitimize_address): Clean up.
15990 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15992 * config/arc/arc-arches.def: Option mrf16 valid for all
15994 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15995 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15996 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15997 * config/arc/arc-tables.opt: Regenerate.
15998 * config/arc/arc.c (arc_conditional_register_usage): Handle
15999 reduced register file case.
16000 (arc_file_start): Set must have build attributes.
16001 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16002 mrf16 option value.
16003 * config/arc/arc.opt (mrf16): Add new option.
16004 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16005 * config/arc/genmultilib.awk: Handle new mrf16 option.
16006 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16007 * config/arc/t-multilib: Regenerate.
16008 * doc/invoke.texi (ARC Options): Document mrf16 option.
16010 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16012 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16013 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16014 (arc_attribute_table): Add 'secure_call' attribute.
16015 (arc_print_operand): Print secure call operand.
16016 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16018 (arc_is_secure_call_p): New function. * config/arc/arc.md
16019 (call_i): Add support for sjli instruction.
16020 (call_value_i): Likewise.
16021 * config/arc/constraints.md (Csc): New constraint.
16023 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16024 John Eric Martin <John.Martin@emmicro-us.com>
16026 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16027 * config/arc/arc.c (_arc_jli_section): New struct.
16028 (arc_jli_section): New type.
16029 (rc_jli_sections): New static variable.
16030 (arc_handle_jli_attribute): New function.
16031 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16032 (arc_file_end): New function.
16033 (TARGET_ASM_FILE_END): Define.
16034 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16035 (arc_add_jli_section): New function.
16036 (jli_call_scan): Likewise.
16037 (arc_reorg): Call jli_call_scan.
16038 (arc_output_addsi): Remove 'S' from printing asm operand.
16039 (arc_is_jli_call_p): New function.
16040 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16042 (movhi_insn): Likewise.
16043 (movsi_insn): Likewise.
16044 (movsi_set_cc_insn): Likewise.
16045 (loadqi_update): Likewise.
16046 (load_zeroextendqisi_update): Likewise.
16047 (load_signextendqisi_update): Likewise.
16048 (loadhi_update): Likewise.
16049 (load_zeroextendhisi_update): Likewise.
16050 (load_signextendhisi_update): Likewise.
16051 (loadsi_update): Likewise.
16052 (loadsf_update): Likewise.
16053 (movsicc_insn): Likewise.
16054 (bset_insn): Likewise.
16055 (bxor_insn): Likewise.
16056 (bclr_insn): Likewise.
16057 (bmsk_insn): Likewise.
16058 (bicsi3_insn): Likewise.
16059 (cmpsi_cc_c_insn): Likewise.
16060 (movsi_ne): Likewise.
16061 (movsi_cond_exec): Likewise.
16062 (clrsbsi2): Likewise.
16063 (norm_f): Likewise.
16073 (call_i): Remove 'S' asm letter, add jli instruction.
16074 (call_value_i): Likewise.
16075 * config/arc/arc.op (mjli-always): New option.
16076 * config/arc/constraints.md (Cji): New constraint.
16077 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16079 (subsf3_fpx): Likewise.
16080 (mulsf3_fpx): Likewise.
16081 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16083 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16084 function attrbutes.
16085 * doc/invoke.texi (ARC): Document mjli-always option.
16087 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16089 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16090 avoid addition with 0 and use incw and decw where possible.
16092 2018-01-26 Richard Biener <rguenther@suse.de>
16094 PR tree-optimization/81082
16095 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16096 association if it requires casting to unsigned.
16097 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16098 from fold_plusminus_mult_expr to catch important cases late when
16099 range info is available.
16101 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16103 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16104 * configure.ac (hidden_linkonce): New test.
16105 * configure: Regenerate.
16106 * config.in: Regenerate.
16108 2018-01-26 Julia Koval <julia.koval@intel.com>
16110 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16111 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16112 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16113 _mm_mask_bitshuffle_epi64_mask): Fix type.
16114 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16115 USI_FTYPE_V4DI_V4DI_USI): Remove.
16116 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16117 __builtin_ia32_vpshufbitqmb256_mask,
16118 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16119 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16120 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16122 2018-01-26 Alan Modra <amodra@gmail.com>
16125 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16126 UNSPEC_VBPERMQ. Sort other unspecs.
16128 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16130 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16132 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16134 PR middle-end/83055
16135 * predict.c (drop_profile): Do not push/pop cfun; update also
16137 (handle_missing_profiles): Fix logic looking for zero profiles.
16139 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16141 PR middle-end/83977
16142 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16143 on functions with #pragma omp declare simd or functions with simd
16145 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16146 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16147 Remove trailing \n from warning_at calls.
16149 2018-01-25 Tom de Vries <tom@codesourcery.com>
16152 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16153 for neutered workers.
16155 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16158 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16159 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16161 2018-01-24 Jeff Law <law@redhat.com>
16164 * i386.c (get_probe_interval): Move to earlier point.
16165 (ix86_compute_frame_layout): If -fstack-clash-protection and
16166 the frame is larger than the probe interval, then use pushes
16167 to save registers rather than reg->mem moves.
16168 (ix86_expand_prologue): Remove conditional for int_registers_saved
16171 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16174 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16175 min/max for never referenced object.
16177 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16179 PR middle-end/83977
16180 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16182 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16183 attributes from DECL_ATTRIBUTES (decl) without affecting
16184 DECL_ATTRIBUTES (current_function_decl).
16185 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16186 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16188 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16190 PR tree-optimization/83979
16191 * fold-const.c (fold_comparison): Use constant_boolean_node
16192 instead of boolean_{true,false}_node.
16194 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16196 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16199 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16201 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16202 Simplify the clause that sets the length attribute.
16203 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16204 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16205 clause that sets the length attribute.
16206 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16208 2018-01-24 Tom de Vries <tom@codesourcery.com>
16211 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16212 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16213 Add strict parameter.
16214 (prevent_branch_around_nothing): Insert dummy insn between branch to
16215 label and label with no ptx insn inbetween.
16216 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16218 2018-01-24 Tom de Vries <tom@codesourcery.com>
16221 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16222 for neutered threads in warp.
16223 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16225 2018-01-24 Richard Biener <rguenther@suse.de>
16227 PR tree-optimization/83176
16228 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16231 2018-01-24 Richard Biener <rguenther@suse.de>
16233 PR tree-optimization/82819
16234 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16235 code generating pluses that are no-ops in the target precision.
16237 2018-01-24 Richard Biener <rguenther@suse.de>
16239 PR middle-end/84000
16240 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16242 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16244 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16245 to merge probabilities.
16246 * predict.c (probably_never_executed): Also mark as cold functions
16247 with global 0 profile and guessed local profile.
16248 * profile-count.c (profile_probability::combine_with_count): New
16250 * profile-count.h (profile_probability::operator*,
16251 profile_probability::operator*=, profile_probability::operator/,
16252 profile_probability::operator/=): Reduce precision to adjusted
16253 and set value to guessed on contradictory divisions.
16254 (profile_probability::combine_with_freq): Remove.
16255 (profile_probability::combine_wiht_count): Declare.
16256 (profile_count::force_nonzero):: Set to adjusted.
16257 (profile_count::probability_in):: Set quality to adjusted.
16258 * tree-ssa-tail-merge.c (replace_block_by): Use
16259 combine_with_count.
16261 2018-01-23 Andrew Waterman <andrew@sifive.com>
16262 Jim Wilson <jimw@sifive.com>
16264 * config/riscv/riscv.c (riscv_stack_boundary): New.
16265 (riscv_option_override): Set riscv_stack_boundary. Handle
16266 riscv_preferred_stack_boundary_arg.
16267 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16268 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16269 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16270 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16271 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16272 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16274 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16277 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16278 of struct ix86_frame.
16279 (ix86_expand_epilogue): Likewise. Add a local variable for
16280 the reg_save_offset field in struct ix86_frame.
16282 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16284 PR tree-optimization/82604
16285 * tree-loop-distribution.c (enum partition_kind): New enum item
16286 PKIND_PARTIAL_MEMSET.
16287 (partition_builtin_p): Support above new enum item.
16288 (generate_code_for_partition): Ditto.
16289 (compute_access_range): Differentiate cases that equality can be
16290 proven at all loops, the innermost loops or no loops.
16291 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16292 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16293 (finalize_partitions, distribute_loop): Don't fuse partition of
16294 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16295 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16296 parloop is enabled.
16298 2018-01-23 Martin Liska <mliska@suse.cz>
16300 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16301 order to ignore the predictor.
16302 (PRED_POLYMORPHIC_CALL): Likewise.
16303 (PRED_RECURSIVE_CALL): Likewise.
16305 2018-01-23 Martin Liska <mliska@suse.cz>
16307 * tree-profile.c (tree_profiling): Print function header to
16308 aware reader which function we are working on.
16309 * value-prof.c (gimple_find_values_to_profile): Do not print
16310 not interesting value histograms.
16312 2018-01-23 Martin Liska <mliska@suse.cz>
16314 * profile-count.h (enum profile_quality): Add
16315 profile_uninitialized as the first value. Do not number values
16316 as they are zero based.
16317 (profile_count::verify): Update sanity check.
16318 (profile_probability::verify): Likewise.
16320 2018-01-23 Nathan Sidwell <nathan@acm.org>
16322 * doc/invoke.texi (ffor-scope): Deprecate.
16324 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16326 PR tree-optimization/83510
16327 * domwalk.c (set_all_edges_as_executable): New function.
16328 (dom_walker::dom_walker): Convert bool param
16329 "skip_unreachable_blocks" to enum reachability. Move setup of
16330 edge flags to set_all_edges_as_executable and only do it when
16331 reachability is REACHABLE_BLOCKS.
16332 * domwalk.h (enum dom_walker::reachability): New enum.
16333 (dom_walker::dom_walker): Convert bool param
16334 "skip_unreachable_blocks" to enum reachability.
16335 (set_all_edges_as_executable): New decl.
16336 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16337 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16339 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16340 but converting true to REACHABLE_BLOCKS.
16341 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16343 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16344 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16345 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16347 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16348 if check_all_array_refs will be called.
16350 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16352 * tree.c (selftest::test_location_wrappers): Add more test
16355 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16357 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16358 (selftest::test_bit_in_range): Likewise.
16360 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16363 * doc/sourcebuild.texi (vect_float): Say that the selector
16364 only describes the situation when -funsafe-math-optimizations is on.
16365 (vect_float_strict): Document.
16367 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16369 PR tree-optimization/83965
16370 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16371 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16372 instead of checking only for a reduction.
16373 (vect_recog_widen_sum_pattern): Likewise.
16375 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16377 * predict.c (probably_never_executed): Only use precise profile info.
16378 (compute_function_frequency): Skip after inlining hack since we now
16379 have quality checking.
16381 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16383 * profile-count.h (profile_probability::very_unlikely,
16384 profile_probability::unlikely, profile_probability::even): Set
16385 precision to guessed.
16387 2018-01-23 Richard Biener <rguenther@suse.de>
16389 PR tree-optimization/83963
16390 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16391 Properly terminate dominator walk when crossing the exit edge not
16392 when visiting its source block.
16394 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16397 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16398 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16400 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16402 PR tree-optimization/83957
16403 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16404 semicolon after for body surrounded by braces.
16406 PR tree-optimization/83081
16407 * profile-count.h (profile_probability::split): New method.
16408 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16409 Use profile_probability::split.
16410 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16411 when splitting a single conditional jump into 2.
16413 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16415 PR tree-optimization/69452
16416 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16419 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16421 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16422 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16423 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16425 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16427 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16429 * config/rl78/rl78.md (movdi): New define_expand.
16430 * config/rl78/rl78.c (rl78_split_movdi): New function.
16432 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16435 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16437 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16438 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16439 128-bit to produce an UNSPEC move to get the double word with the
16440 signbit and then a shift directly to do signbit.
16441 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16442 implementation with a new version that just does either a direct
16443 move or a regular move. Move memory interface to separate insns.
16444 Move insns so they are next to the expander.
16445 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16446 with signbit move. Split big and little endian case.
16447 (signbit<mode>2_dm_mem_le): Likewise.
16448 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16449 (signbit<mode>2_dm2): Likewise.
16451 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16453 * config/rl78/rl78.md (anddi3): New define_expand.
16455 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16457 * config/rl78/rl78.md (umindi3): New define_expand.
16459 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16461 * config/rl78/rl78.md (smindi3): New define_expand.
16463 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16465 * config/rl78/rl78.md (smaxdi3): New define_expand.
16467 2018-01-22 Carl Love <cel@us.ibm.com>
16469 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16470 LVX_V1TI): Add macro expansion.
16471 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16472 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16473 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16474 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16475 Change check to determine if the instruction is a byte reversing
16476 entry. Fix typo in comment.
16477 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16478 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16479 Add def_builtin calls for new builtins.
16480 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16481 Add define_insn expansion.
16483 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16485 * config/rl78/rl78.md (umaxdi3): New define_expand.
16487 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16489 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16490 for non-QImode registers.
16492 2018-01-22 Richard Biener <rguenther@suse.de>
16494 PR tree-optimization/83963
16495 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16496 including the loop exit block.
16497 (scop_detection::merge_sese): Likewise.
16498 (scop_detection::add_scop): Do it here instead.
16500 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16502 * doc/sourcebuild.texi (arm_softfloat): Document.
16504 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16507 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16508 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16509 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16511 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16512 David Edelsohn <dje.gcc@gmail.com>
16515 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16516 Change "crset eq" to "crset 2".
16517 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16518 (*call_indirect_aix<mode>_nospec): Likewise.
16519 (*call_value_indirect_aix<mode>_nospec): Likewise.
16520 (*call_indirect_elfv2<mode>_nospec): Likewise.
16521 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16522 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16523 change assembly output from . to $.
16524 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16525 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16526 (*tablejump<mode>_internal1_nospec): Likewise.
16528 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16531 * config/sh/sh_optimize_sett_clrt.cc:
16532 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16534 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16536 PR tree-optimization/83940
16537 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16538 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16539 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16540 use it to pass back the definition type.
16541 (vect_check_store_rhs): Likewise rhs_dt_out.
16542 (vect_build_gather_load_calls): Add a mask_dt argument and use
16543 it instead of a call to vect_is_simple_use.
16544 (vectorizable_store): Update calls to vect_check_load_store_mask
16545 and vect_check_store_rhs. Use the dt returned by the latter instead
16546 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16547 instead of calls to vect_is_simple_use. Pass the scalar rather
16548 than the vector operand to vect_is_simple_use when handling
16549 second and subsequent copies of an rhs value.
16550 (vectorizable_load): Update calls to vect_check_load_store_mask
16551 and vect_build_gather_load_calls. Use the cached mask_dt and
16552 gs_info.offset_dt instead of calls to vect_is_simple_use.
16554 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16556 PR middle-end/83945
16557 * tree-emutls.c: Include gimplify.h.
16558 (lower_emutls_2): New function.
16559 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16560 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16561 it before further processing.
16564 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16565 UINTVAL (trueop1) instead of INTVAL (op1).
16567 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16571 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16572 INCOMING_FRAME_SP_OFFSET if not defined.
16573 (scan_trace): Add ENTRY argument. If true and
16574 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16575 emit a note to adjust the CFA offset.
16576 (create_cfi_notes): Adjust scan_trace callers.
16577 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16578 INCOMING_FRAME_SP_OFFSET in the CIE.
16579 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16580 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16582 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16583 * doc/tm.texi: Regenerated.
16585 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16587 PR rtl-optimization/83147
16588 * lra-constraints.c (remove_inheritance_pseudos): Use
16589 lra_substitute_pseudo_within_insn.
16591 2018-01-19 Tom de Vries <tom@codesourcery.com>
16592 Cesar Philippidis <cesar@codesourcery.com>
16595 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16597 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16600 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16601 spaces for function labels.
16603 2018-01-19 Martin Liska <mliska@suse.cz>
16605 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16606 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16607 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16608 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16609 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16610 (PRED_CONST_RETURN): Change from 69 to 65.
16611 (PRED_NULL_RETURN): Change from 91 to 71.
16612 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16613 (PRED_LOOP_GUARD): Change from 66 to 73.
16615 2018-01-19 Martin Liska <mliska@suse.cz>
16617 * predict.c (predict_insn_def): Add new assert.
16618 (struct branch_predictor): Change type to signed integer.
16619 (test_prediction_value_range): Amend test to cover
16620 PROB_UNINITIALIZED.
16621 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16622 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16623 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16624 (PRED_LOOP_IV_COMPARE): Likewise.
16625 * predict.h (PROB_UNINITIALIZED): Define new constant.
16627 2018-01-19 Martin Liska <mliska@suse.cz>
16629 * predict.c (dump_prediction): Add new format for
16630 analyze_brprob.py script which is enabled with -details
16632 * profile-count.h (precise_p): New function.
16634 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16636 PR tree-optimization/83922
16637 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16638 there are no statements that need masking.
16639 (vect_active_double_reduction_p): New function.
16640 (vect_analyze_loop_operations): Use it when handling phis that
16641 are not in the loop header.
16643 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16645 PR tree-optimization/83914
16646 * tree-vect-loop.c (vectorizable_induction): Don't convert
16647 init_expr or apply the peeling adjustment for inductions
16648 that are nested within the vectorized loop.
16650 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16652 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16655 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16659 * function.h (gimplify_parameters): Add gimple_seq * argument.
16660 * function.c: Include gimple.h and options.h.
16661 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16662 for the added local temporaries if needed.
16663 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16664 if there are any parameter cleanups, wrap whole body into a
16665 try/finally with the cleanups.
16667 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16670 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16671 Use GET_MODE_CLASS for scalar floating point.
16673 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16677 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16678 Fix call of call_cgraph_insertion_hooks.
16680 2018-01-18 Martin Sebor <msebor@redhat.com>
16682 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16684 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16687 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16690 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16693 * common.opt: (-ffile-prefix-map): New option.
16694 * opts.c (common_handle_option): Defer it.
16695 * opts-global.c (handle_common_deferred_options): Handle it.
16696 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16697 * file-prefix-map.h: New file.
16698 (remap_debug_filename, add_debug_prefix_map): ...here.
16699 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16700 * final.c (debug_prefix_map, add_debug_prefix_map
16701 remap_debug_filename): Move to...
16702 * file-prefix-map.c: New file.
16703 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16704 generalize, get rid of alloca(), use strrchr() instead of strchr().
16705 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16706 Implement in terms of add_prefix_map().
16707 (remap_macro_filename, remap_debug_filename): Implement in term of
16709 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16710 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16711 * dbxout.c: Include file-prefix-map.h.
16712 * varasm.c: Likewise.
16713 * vmsdbgout.c: Likewise.
16714 * xcoffout.c: Likewise.
16715 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16716 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16717 * doc/invoke.texi (-ffile-prefix-map): Document.
16718 (-fdebug-prefix-map): Update description.
16720 2018-01-18 Martin Liska <mliska@suse.cz>
16722 * config/i386/i386.c (indirect_thunk_name): Document that also
16724 (output_indirect_thunk): Document why both instructions
16725 (pause and lfence) are generated.
16727 2018-01-18 Richard Biener <rguenther@suse.de>
16729 PR tree-optimization/83887
16730 * graphite-scop-detection.c
16731 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16732 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16733 (scop_detection::merge_sese): Re-implement with a flood-fill
16734 algorithm that properly finds a SESE region if it exists.
16736 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16739 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16740 pointer_diff optimizations use view_convert instead of convert.
16742 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16744 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16745 Generate different code for -mno-speculate-indirect-jumps.
16746 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16747 (*call_indirect_aix<mode>): Disable for
16748 -mno-speculate-indirect-jumps.
16749 (*call_indirect_aix<mode>_nospec): New define_insn.
16750 (*call_value_indirect_aix<mode>): Disable for
16751 -mno-speculate-indirect-jumps.
16752 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16753 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16754 -mno-speculate-indirect-jumps.
16755 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16757 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16759 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16760 long double type, set the flags for noting the default long double
16761 type, even if we don't pass or return a long double type.
16763 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16766 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16769 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16771 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16772 support for merge[hl].
16773 (fold_mergehl_helper): New helper function.
16774 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16775 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16776 (altivec_vmrglw_direct): Add xxmrglw insn.
16778 2018-01-17 Andrew Waterman <andrew@sifive.com>
16780 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16781 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16783 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16786 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16787 call the lto_location_cache before reading the
16788 DECL_SOURCE_LOCATION of the types.
16790 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16791 Richard Sandiford <richard.sandiford@linaro.org>
16793 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16794 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16795 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16796 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16797 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16799 * config/aarch64/constraints.md (aarch64_movti_operand):
16801 * config/aarch64/predicates.md (Uti): Add new constraint.
16803 2018-01-17 Carl Love <cel@us.ibm.com>
16805 * config/rs6000/vsx.md (define_expand xl_len_r,
16806 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16807 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16809 (define_expand, define_insn): Move the shift left from the
16810 define_insn to the define_expand for lxvl and stxvl instructions.
16811 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16812 and XL_LEN_R definitions to PURE.
16814 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16816 * config/i386/i386.c (indirect_thunk_name): Declare regno
16817 as unsigned int. Compare regno with INVALID_REGNUM.
16818 (output_indirect_thunk): Ditto.
16819 (output_indirect_thunk_function): Ditto.
16820 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
16821 in the call to output_indirect_thunk_function.
16823 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
16825 PR middle-end/83884
16826 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16827 rather than the size of inner_type to determine the stack slot size
16828 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16830 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
16833 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16836 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
16838 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16839 endian Linux systems to optionally enable multilibs for selecting
16840 the long double type if the user configured an explicit type.
16841 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16842 have no long double multilibs if not defined.
16843 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16844 warn if the user used -mabi={ieee,ibm}longdouble and we built
16845 multilibs for long double.
16846 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16847 appropriate multilib option.
16848 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16850 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16851 for building long double multilibs.
16852 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16854 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
16856 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16859 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16861 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16864 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16867 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16870 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16872 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16873 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16875 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16877 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16878 different rtl trees depending on TARGET_64BIT.
16879 (rs6000_gen_lvx): Likewise.
16881 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16883 * config/visium/visium.md (nop): Tweak comment.
16884 (hazard_nop): Likewise.
16886 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16888 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16889 -mspeculate-indirect-jumps.
16890 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16891 for -mno-speculate-indirect-jumps.
16892 (*call_indirect_elfv2<mode>_nospec): New define_insn.
16893 (*call_value_indirect_elfv2<mode>): Disable for
16894 -mno-speculate-indirect-jumps.
16895 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16896 (indirect_jump): Emit different RTL for
16897 -mno-speculate-indirect-jumps.
16898 (*indirect_jump<mode>): Disable for
16899 -mno-speculate-indirect-jumps.
16900 (*indirect_jump<mode>_nospec): New define_insn.
16901 (tablejump): Emit different RTL for
16902 -mno-speculate-indirect-jumps.
16903 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16904 (tablejumpsi_nospec): New define_expand.
16905 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16906 (tablejumpdi_nospec): New define_expand.
16907 (*tablejump<mode>_internal1): Disable for
16908 -mno-speculate-indirect-jumps.
16909 (*tablejump<mode>_internal1_nospec): New define_insn.
16910 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16913 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16915 * caller-save.c (insert_save): Drop unnecessary parameter. All
16918 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16919 Richard Biener <rguenth@suse.de>
16922 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16923 return early, inline manually is_gimple_sizepos. Make sure if we
16924 call gimplify_expr we don't end up with a gimple constant.
16925 * tree.c (variably_modified_type_p): Don't return true for
16926 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16927 * gimplify.h (is_gimple_sizepos): Remove.
16929 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16931 PR tree-optimization/83857
16932 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16933 vectorizable_live_operation for pure SLP statements.
16934 (vectorizable_live_operation): Handle PHIs.
16936 2018-01-16 Richard Biener <rguenther@suse.de>
16938 PR tree-optimization/83867
16939 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16940 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16942 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16945 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16946 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16947 If off is not INTEGER_CST, issue a may not be aligned warning
16948 rather than isn't aligned. Use isn%'t rather than isn't.
16949 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16951 <case MULT_EXPR>: Improve the case when bottom and one of the
16952 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16953 operand, in that case check if the other operand is multiple of
16954 bottom divided by the INTEGER_CST operand.
16956 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16959 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16960 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16961 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16962 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16963 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16964 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16965 (pa_function_arg_size): New function.
16967 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16969 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16970 in a separate statement.
16972 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16974 PR tree-optimization/83847
16975 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16976 group gathers and scatters.
16978 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16980 PR rtl-optimization/86620
16981 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16983 PR rtl-optimization/83213
16984 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16985 to last if both are JUMP_INSNs.
16987 PR tree-optimization/83843
16988 * gimple-ssa-store-merging.c
16989 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16990 store_immediate_info for bswap/nop orig_stores.
16992 2018-01-15 Andrew Waterman <andrew@sifive.com>
16994 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16996 <UDIV>: Increase cost if !TARGET_DIV.
16998 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17000 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17001 (define_attr "cr_logical_3op"): New.
17002 (cceq_ior_compare): Adjust.
17003 (cceq_ior_compare_complement): Adjust.
17004 (*cceq_rev_compare): Adjust.
17005 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17006 (is_cracked_insn): Adjust.
17007 (insn_must_be_first_in_group): Adjust.
17008 * config/rs6000/40x.md: Adjust.
17009 * config/rs6000/440.md: Adjust.
17010 * config/rs6000/476.md: Adjust.
17011 * config/rs6000/601.md: Adjust.
17012 * config/rs6000/603.md: Adjust.
17013 * config/rs6000/6xx.md: Adjust.
17014 * config/rs6000/7450.md: Adjust.
17015 * config/rs6000/7xx.md: Adjust.
17016 * config/rs6000/8540.md: Adjust.
17017 * config/rs6000/cell.md: Adjust.
17018 * config/rs6000/e300c2c3.md: Adjust.
17019 * config/rs6000/e500mc.md: Adjust.
17020 * config/rs6000/e500mc64.md: Adjust.
17021 * config/rs6000/e5500.md: Adjust.
17022 * config/rs6000/e6500.md: Adjust.
17023 * config/rs6000/mpc.md: Adjust.
17024 * config/rs6000/power4.md: Adjust.
17025 * config/rs6000/power5.md: Adjust.
17026 * config/rs6000/power6.md: Adjust.
17027 * config/rs6000/power7.md: Adjust.
17028 * config/rs6000/power8.md: Adjust.
17029 * config/rs6000/power9.md: Adjust.
17030 * config/rs6000/rs64.md: Adjust.
17031 * config/rs6000/titan.md: Adjust.
17033 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17035 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17036 ix86_indirect_branch_register logic.
17038 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17040 * config/i386/constraints.md (Bs): Update
17041 ix86_indirect_branch_register check. Don't check
17042 ix86_indirect_branch_register with GOT_memory_operand.
17044 * config/i386/predicates.md (GOT_memory_operand): Don't check
17045 ix86_indirect_branch_register here.
17046 (GOT32_symbol_operand): Likewise.
17048 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17050 * config/i386/predicates.md (constant_call_address_operand):
17051 Rewrite ix86_indirect_branch_register logic.
17052 (sibcall_insn_operand): Likewise.
17054 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17056 * config/i386/constraints.md (Bs): Replace
17057 ix86_indirect_branch_thunk_register with
17058 ix86_indirect_branch_register.
17060 * config/i386/i386.md (indirect_jump): Likewise.
17061 (tablejump): Likewise.
17062 (*sibcall_memory): Likewise.
17063 (*sibcall_value_memory): Likewise.
17064 Peepholes of indirect call and jump via memory: Likewise.
17065 * config/i386/i386.opt: Likewise.
17066 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17067 (GOT_memory_operand): Likewise.
17068 (call_insn_operand): Likewise.
17069 (sibcall_insn_operand): Likewise.
17070 (GOT32_symbol_operand): Likewise.
17072 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17074 PR middle-end/83837
17075 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17076 type rather than type addr's type points to.
17077 (expand_omp_atomic_mutex): Likewise.
17078 (expand_omp_atomic): Likewise.
17080 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17083 * config/i386/i386.c (output_indirect_thunk_function): Use
17084 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17085 for __x86_return_thunk.
17087 2018-01-15 Richard Biener <rguenther@suse.de>
17089 PR middle-end/83850
17090 * expmed.c (extract_bit_field_1): Fix typo.
17092 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17095 * config/arm/iterators.md (VF): New mode iterator.
17096 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17097 Remove integer-related logic from pattern.
17098 (neon_vabd<mode>_3): Likewise.
17100 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17102 PR middle-end/82694
17103 * common.opt (fstrict-overflow): No longer an alias.
17104 (fwrapv-pointer): New option.
17105 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17106 also for pointer types based on flag_wrapv_pointer.
17107 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17108 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17109 opts->x_flag_wrapv got set.
17110 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17111 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17112 POINTER_TYPE_OVERFLOW_UNDEFINED.
17113 * match.pd: Likewise in address comparison pattern.
17114 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17116 2018-01-15 Richard Biener <rguenther@suse.de>
17119 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17120 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17121 Reset type names to their identifier if their TYPE_DECL doesn't
17122 have linkage (and thus is used for ODR and devirt).
17123 (save_debug_info_for_decl): Remove.
17124 (save_debug_info_for_type): Likewise.
17125 (add_tree_to_fld_list): Adjust.
17126 * tree-pretty-print.c (dump_generic_node): Make dumping of
17127 type names more robust.
17129 2018-01-15 Richard Biener <rguenther@suse.de>
17131 * BASE-VER: Bump to 8.0.1.
17133 2018-01-14 Martin Sebor <msebor@redhat.com>
17136 * builtins.c (check_access): Avoid warning when the no-warning bit
17139 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17141 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17142 * ira-color (allocno_hard_regs_compare): Likewise.
17144 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17147 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17148 Use .pushsection/.popsection.
17150 2018-01-14 Martin Sebor <msebor@redhat.com>
17153 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17155 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17157 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17158 entry from extra_headers.
17159 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17160 extra_headers, make the list bitwise identical to the i?86-*-* one.
17162 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17164 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17165 -mcmodel=large with -mindirect-branch=thunk,
17166 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17167 -mfunction-return=thunk-extern.
17168 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17169 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17170 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17172 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17174 * config/i386/i386.c (print_reg): Print the name of the full
17175 integer register without '%'.
17176 (ix86_print_operand): Handle 'V'.
17177 * doc/extend.texi: Document 'V' modifier.
17179 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17181 * config/i386/constraints.md (Bs): Disallow memory operand for
17182 -mindirect-branch-register.
17184 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17185 (GOT_memory_operand): Likewise.
17186 (call_insn_operand): Likewise.
17187 (sibcall_insn_operand): Likewise.
17188 (GOT32_symbol_operand): Likewise.
17189 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17190 for -mindirect-branch-register.
17191 (tablejump): Likewise.
17192 (*sibcall_memory): Likewise.
17193 (*sibcall_value_memory): Likewise.
17194 Disallow peepholes of indirect call and jump via memory for
17195 -mindirect-branch-register.
17196 (*call_pop): Replace m with Bw.
17197 (*call_value_pop): Likewise.
17198 (*sibcall_pop_memory): Replace m with Bs.
17199 * config/i386/i386.opt (mindirect-branch-register): New option.
17200 * doc/invoke.texi: Document -mindirect-branch-register option.
17202 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17204 * config/i386/i386-protos.h (ix86_output_function_return): New.
17205 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17206 set function_return_type.
17207 (indirect_thunk_name): Add ret_p to indicate thunk for function
17209 (output_indirect_thunk_function): Pass false to
17210 indirect_thunk_name.
17211 (ix86_output_indirect_branch_via_reg): Likewise.
17212 (ix86_output_indirect_branch_via_push): Likewise.
17213 (output_indirect_thunk_function): Create alias for function
17214 return thunk if regno < 0.
17215 (ix86_output_function_return): New function.
17216 (ix86_handle_fndecl_attribute): Handle function_return.
17217 (ix86_attribute_table): Add function_return.
17218 * config/i386/i386.h (machine_function): Add
17219 function_return_type.
17220 * config/i386/i386.md (simple_return_internal): Use
17221 ix86_output_function_return.
17222 (simple_return_internal_long): Likewise.
17223 * config/i386/i386.opt (mfunction-return=): New option.
17224 (indirect_branch): Mention -mfunction-return=.
17225 * doc/extend.texi: Document function_return function attribute.
17226 * doc/invoke.texi: Document -mfunction-return= option.
17228 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17230 * config/i386/i386-opts.h (indirect_branch): New.
17231 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17232 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17233 with local indirect jump when converting indirect call and jump.
17234 (ix86_set_indirect_branch_type): New.
17235 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17236 (indirectlabelno): New.
17237 (indirect_thunk_needed): Likewise.
17238 (indirect_thunk_bnd_needed): Likewise.
17239 (indirect_thunks_used): Likewise.
17240 (indirect_thunks_bnd_used): Likewise.
17241 (INDIRECT_LABEL): Likewise.
17242 (indirect_thunk_name): Likewise.
17243 (output_indirect_thunk): Likewise.
17244 (output_indirect_thunk_function): Likewise.
17245 (ix86_output_indirect_branch_via_reg): Likewise.
17246 (ix86_output_indirect_branch_via_push): Likewise.
17247 (ix86_output_indirect_branch): Likewise.
17248 (ix86_output_indirect_jmp): Likewise.
17249 (ix86_code_end): Call output_indirect_thunk_function if needed.
17250 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17252 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17253 (ix86_attribute_table): Add indirect_branch.
17254 * config/i386/i386.h (machine_function): Add indirect_branch_type
17255 and has_local_indirect_jump.
17256 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17258 (tablejump): Likewise.
17259 (*indirect_jump): Use ix86_output_indirect_jmp.
17260 (*tablejump_1): Likewise.
17261 (simple_return_indirect_internal): Likewise.
17262 * config/i386/i386.opt (mindirect-branch=): New option.
17263 (indirect_branch): New.
17266 (thunk-inline): Likewise.
17267 (thunk-extern): Likewise.
17268 * doc/extend.texi: Document indirect_branch function attribute.
17269 * doc/invoke.texi: Document -mindirect-branch= option.
17271 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17274 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17276 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17278 * ipa-inline.c (want_inline_small_function_p): Return false if
17279 inlining has already failed with CIF_FINAL_ERROR.
17280 (update_caller_keys): Call want_inline_small_function_p before
17282 (update_callee_keys): Likewise.
17284 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17286 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17288 (rs6000_quadword_masked_address_p): Likewise.
17289 (quad_aligned_load_p): Likewise.
17290 (quad_aligned_store_p): Likewise.
17291 (const_load_sequence_p): Add comment to describe the outer-most loop.
17292 (mimic_memory_attributes_and_flags): New function.
17293 (rs6000_gen_stvx): Likewise.
17294 (replace_swapped_aligned_store): Likewise.
17295 (rs6000_gen_lvx): Likewise.
17296 (replace_swapped_aligned_load): Likewise.
17297 (replace_swapped_load_constant): Capitalize argument name in
17298 comment describing this function.
17299 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17300 and stores that access quad-word aligned addresses and replace
17301 with stvx or lvx instructions when appropriate.
17302 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17303 New function prototype.
17304 (rs6000_quadword_masked_address_p): Likewise.
17305 (rs6000_gen_lvx): Likewise.
17306 (rs6000_gen_stvx): Likewise.
17307 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17308 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17309 when memory address is aligned.
17310 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17311 this split to select lvx instruction when memory address is aligned.
17312 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17313 instruction when memory address is aligned.
17314 (*vsx_le_perm_load_v16qi): Likewise.
17315 (four unnamed splitters): Modify to select the stvx instruction
17316 when memory is aligned.
17318 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17320 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17321 which appears in the queue multiple times.
17323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17324 Alan Hayward <alan.hayward@arm.com>
17325 David Sherwood <david.sherwood@arm.com>
17327 * tree-vectorizer.h (vec_lower_bound): New structure.
17328 (_loop_vec_info): Add check_nonzero and lower_bounds.
17329 (LOOP_VINFO_CHECK_NONZERO): New macro.
17330 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17331 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17332 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17333 fields. Make seg_len the distance travelled, not including the
17335 (dr_direction_indicator): Declare.
17336 (dr_zero_step_indicator): Likewise.
17337 (dr_known_forward_stride_p): Likewise.
17338 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17340 (runtime_alias_check_p): Allow runtime alias checks with
17342 (operator ==): Compare access_size and align.
17343 (prune_runtime_alias_test_list): Rework for new distinction between
17344 the access_size and seg_len.
17345 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17347 (get_segment_min_max): New function.
17348 (create_intersect_range_checks): Use it.
17349 (dr_step_indicator): New function.
17350 (dr_direction_indicator): Likewise.
17351 (dr_zero_step_indicator): Likewise.
17352 (dr_known_forward_stride_p): Likewise.
17353 * tree-loop-distribution.c (data_ref_segment_size): Return
17354 DR_STEP * (niters - 1).
17355 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17357 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17358 (vect_preserves_scalar_order_p): New function, split out from...
17359 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17360 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17361 (vect_vfa_access_size): New function.
17362 (vect_vfa_align): Likewise.
17363 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17364 (dump_lower_bound): New function.
17365 (vect_check_lower_bound): Likewise.
17366 (vect_small_gap_p): Likewise.
17367 (vectorizable_with_step_bound_p): Likewise.
17368 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17369 depencies if the vectorization factor is 1. Convert the checks
17370 for nonzero steps into checks on the bounds of DR_STEP. Try using
17371 a bunds check for variable steps if the minimum required step is
17372 relatively small. Update calls to the dr_with_seg_len
17373 constructor and to vect_compile_time_alias.
17374 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17376 (vect_loop_versioning): Call it.
17377 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17379 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17381 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17382 Alan Hayward <alan.hayward@arm.com>
17383 David Sherwood <david.sherwood@arm.com>
17385 * doc/sourcebuild.texi (vect_scatter_store): Document.
17386 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17388 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17390 * genopinit.c (main): Add supports_vec_scatter_store and
17391 supports_vec_scatter_store_cached to target_optabs.
17392 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17393 IFN_MASK_SCATTER_STORE.
17394 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17396 * internal-fn.h (internal_store_fn_p): Declare.
17397 (internal_fn_stored_value_index): Likewise.
17398 * internal-fn.c (scatter_store_direct): New macro.
17399 (expand_scatter_store_optab_fn): New function.
17400 (direct_scatter_store_optab_supported_p): New macro.
17401 (internal_store_fn_p): New function.
17402 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17403 IFN_MASK_SCATTER_STORE.
17404 (internal_fn_mask_index): Likewise.
17405 (internal_fn_stored_value_index): New function.
17406 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17407 for scatter stores.
17408 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17409 * optabs-query.c (supports_vec_scatter_store_p): New function.
17410 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17411 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17412 true for scatter stores.
17413 (vect_gather_scatter_fn_p): Handle scatter stores too.
17414 (vect_check_gather_scatter): Consider using scatter stores if
17415 supports_vec_scatter_store_p.
17416 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17417 scatter stores too.
17418 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17419 internal_fn_stored_value_index.
17420 (check_load_store_masking): Handle scatter stores too.
17421 (vect_get_store_rhs): Make public.
17422 (vectorizable_call): Use internal_store_fn_p.
17423 (vectorizable_store): Handle scatter store internal functions.
17424 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17425 when deciding whether the end of the group has been reached.
17426 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17427 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17428 (mask_scatter_store<mode>): New insns.
17430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17431 Alan Hayward <alan.hayward@arm.com>
17432 David Sherwood <david.sherwood@arm.com>
17434 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17435 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17436 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17438 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17439 Use vect_truncate_gather_scatter_offset if we can't treat the
17440 operation as a normal gather load or scatter store.
17441 (get_group_load_store_type): Take the gather_scatter_info
17442 as argument. Try using a gather load or scatter store for
17443 single-element groups.
17444 (get_load_store_type): Update calls to get_group_load_store_type
17445 and vect_use_strided_gather_scatters_p.
17447 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17448 Alan Hayward <alan.hayward@arm.com>
17449 David Sherwood <david.sherwood@arm.com>
17451 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17452 optional tree argument.
17453 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17455 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17456 but continue to use the current value as a fallback.
17457 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17458 to compare the updates.
17459 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17460 (get_load_store_type): Use it when handling a strided access.
17461 (vect_get_strided_load_store_ops): New function.
17462 (vect_get_data_ptr_increment): Likewise.
17463 (vectorizable_load): Handle strided gather loads. Always pass
17464 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17466 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17467 Alan Hayward <alan.hayward@arm.com>
17468 David Sherwood <david.sherwood@arm.com>
17470 * doc/md.texi (gather_load@var{m}): Document.
17471 (mask_gather_load@var{m}): Likewise.
17472 * genopinit.c (main): Add supports_vec_gather_load and
17473 supports_vec_gather_load_cached to target_optabs.
17474 * optabs-tree.c (init_tree_optimization_optabs): Use
17475 ggc_cleared_alloc to allocate target_optabs.
17476 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17477 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17479 * internal-fn.h (internal_load_fn_p): Declare.
17480 (internal_gather_scatter_fn_p): Likewise.
17481 (internal_fn_mask_index): Likewise.
17482 (internal_gather_scatter_fn_supported_p): Likewise.
17483 * internal-fn.c (gather_load_direct): New macro.
17484 (expand_gather_load_optab_fn): New function.
17485 (direct_gather_load_optab_supported_p): New macro.
17486 (direct_internal_fn_optab): New function.
17487 (internal_load_fn_p): Likewise.
17488 (internal_gather_scatter_fn_p): Likewise.
17489 (internal_fn_mask_index): Likewise.
17490 (internal_gather_scatter_fn_supported_p): Likewise.
17491 * optabs-query.c (supports_at_least_one_mode_p): New function.
17492 (supports_vec_gather_load_p): Likewise.
17493 * optabs-query.h (supports_vec_gather_load_p): Declare.
17494 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17495 and memory_type field.
17496 (NUM_PATTERNS): Bump to 15.
17497 * tree-vect-data-refs.c: Include internal-fn.h.
17498 (vect_gather_scatter_fn_p): New function.
17499 (vect_describe_gather_scatter_call): Likewise.
17500 (vect_check_gather_scatter): Try using internal functions for
17501 gather loads. Recognize existing calls to a gather load function.
17502 (vect_analyze_data_refs): Consider using gather loads if
17503 supports_vec_gather_load_p.
17504 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17505 (vect_get_gather_scatter_offset_type): Likewise.
17506 (vect_convert_mask_for_vectype): Likewise.
17507 (vect_add_conversion_to_patterm): Likewise.
17508 (vect_try_gather_scatter_pattern): Likewise.
17509 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17510 (vect_vect_recog_func_ptrs): Add it.
17511 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17512 internal_fn_mask_index and internal_gather_scatter_fn_p.
17513 (check_load_store_masking): Take the gather_scatter_info as an
17514 argument and handle gather loads.
17515 (vect_get_gather_scatter_ops): New function.
17516 (vectorizable_call): Check internal_load_fn_p.
17517 (vectorizable_load): Likewise. Handle gather load internal
17519 (vectorizable_store): Update call to check_load_store_masking.
17520 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17521 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17522 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17523 (aarch64_gather_scale_operand_d): New predicates.
17524 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17525 (mask_gather_load<mode>): New insns.
17527 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17528 Alan Hayward <alan.hayward@arm.com>
17529 David Sherwood <david.sherwood@arm.com>
17531 * optabs.def (fold_left_plus_optab): New optab.
17532 * doc/md.texi (fold_left_plus_@var{m}): Document.
17533 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17534 * internal-fn.c (fold_left_direct): Define.
17535 (expand_fold_left_optab_fn): Likewise.
17536 (direct_fold_left_optab_supported_p): Likewise.
17537 * fold-const-call.c (fold_const_fold_left): New function.
17538 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17539 * tree-parloops.c (valid_reduction_p): New function.
17540 (gather_scalar_reductions): Use it.
17541 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17542 (vect_finish_replace_stmt): Declare.
17543 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17544 (needs_fold_left_reduction_p): New function, split out from...
17545 (vect_is_simple_reduction): ...here. Accept reductions that
17546 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17547 (vect_force_simple_reduction): Also store the reduction type in
17548 the assignment's STMT_VINFO_REDUC_TYPE.
17549 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17550 (merge_with_identity): New function.
17551 (vect_expand_fold_left): Likewise.
17552 (vectorize_fold_left_reduction): Likewise.
17553 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17554 scalar phi in place for it. Check for target support and reject
17555 cases that would reassociate the operation. Defer the transform
17556 phase to vectorize_fold_left_reduction.
17557 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17558 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17559 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17561 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17563 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17564 call to ifc_temp_var.
17566 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17567 Alan Hayward <alan.hayward@arm.com>
17568 David Sherwood <david.sherwood@arm.com>
17570 * target.def (legitimize_address_displacement): Take the original
17571 offset as a poly_int.
17572 * targhooks.h (default_legitimize_address_displacement): Update
17574 * targhooks.c (default_legitimize_address_displacement): Likewise.
17575 * doc/tm.texi: Regenerate.
17576 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17577 as an argument, moving assert of ad->disp == ad->disp_term to...
17578 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17579 Try calling targetm.legitimize_address_displacement before expanding
17580 the address rather than afterwards, and adjust for the new interface.
17581 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17582 Match the new hook interface. Handle SVE addresses.
17583 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17584 new hook interface.
17586 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17588 * Makefile.in (OBJS): Add early-remat.o.
17589 * target.def (select_early_remat_modes): New hook.
17590 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17591 * doc/tm.texi: Regenerate.
17592 * targhooks.h (default_select_early_remat_modes): Declare.
17593 * targhooks.c (default_select_early_remat_modes): New function.
17594 * timevar.def (TV_EARLY_REMAT): New timevar.
17595 * passes.def (pass_early_remat): New pass.
17596 * tree-pass.h (make_pass_early_remat): Declare.
17597 * early-remat.c: New file.
17598 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17600 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17602 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17603 Alan Hayward <alan.hayward@arm.com>
17604 David Sherwood <david.sherwood@arm.com>
17606 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17607 vfm1 with a bound_epilog parameter.
17608 (vect_do_peeling): Update calls accordingly, and move the prologue
17609 call earlier in the function. Treat the base bound_epilog as 0 for
17610 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17611 this base when peeling for gaps.
17612 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17613 with fully-masked loops.
17614 (vect_estimate_min_profitable_iters): Handle the single peeled
17615 iteration in that case.
17617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17618 Alan Hayward <alan.hayward@arm.com>
17619 David Sherwood <david.sherwood@arm.com>
17621 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17622 single-element interleaving even if the size is not a power of 2.
17623 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17624 accesses for single-element interleaving if the group size is
17627 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17628 Alan Hayward <alan.hayward@arm.com>
17629 David Sherwood <david.sherwood@arm.com>
17631 * doc/md.texi (fold_extract_last_@var{m}): Document.
17632 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17633 * optabs.def (fold_extract_last_optab): New optab.
17634 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17635 * internal-fn.c (fold_extract_direct): New macro.
17636 (expand_fold_extract_optab_fn): Likewise.
17637 (direct_fold_extract_optab_supported_p): Likewise.
17638 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17639 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17640 EXTRACT_LAST_REDUCTION.
17641 (get_initial_def_for_reduction): Do not create an initial vector
17642 for EXTRACT_LAST_REDUCTION reductions.
17643 (vectorizable_reduction): Leave the scalar phi in place for
17644 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17645 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17646 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17647 transform phase to vectorizable_condition.
17648 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17650 (vect_finish_stmt_generation): ...here.
17651 (vect_finish_replace_stmt): New function.
17652 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17653 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17655 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17657 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17658 Alan Hayward <alan.hayward@arm.com>
17659 David Sherwood <david.sherwood@arm.com>
17661 * doc/md.texi (extract_last_@var{m}): Document.
17662 * optabs.def (extract_last_optab): New optab.
17663 * internal-fn.def (EXTRACT_LAST): New internal function.
17664 * internal-fn.c (cond_unary_direct): New macro.
17665 (expand_cond_unary_optab_fn): Likewise.
17666 (direct_cond_unary_optab_supported_p): Likewise.
17667 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17668 loops using EXTRACT_LAST.
17669 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17670 (extract_last_<mode>): ...this optab.
17671 (vec_extract<mode><Vel>): Update accordingly.
17673 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17674 Alan Hayward <alan.hayward@arm.com>
17675 David Sherwood <david.sherwood@arm.com>
17677 * target.def (empty_mask_is_expensive): New hook.
17678 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17679 * doc/tm.texi: Regenerate.
17680 * targhooks.h (default_empty_mask_is_expensive): Declare.
17681 * targhooks.c (default_empty_mask_is_expensive): New function.
17682 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17683 if the target says that empty masks are expensive.
17684 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17686 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17688 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17689 Alan Hayward <alan.hayward@arm.com>
17690 David Sherwood <david.sherwood@arm.com>
17692 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17693 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17694 (vect_use_loop_mask_for_alignment_p): New function.
17695 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17696 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17697 niters_skip argument. Make sure that the first niters_skip elements
17698 of the first iteration are inactive.
17699 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17700 Update call to vect_set_loop_masks_directly.
17701 (get_misalign_in_elems): New function, split out from...
17702 (vect_gen_prolog_loop_niters): ...here.
17703 (vect_update_init_of_dr): Take a code argument that specifies whether
17704 the adjustment should be added or subtracted.
17705 (vect_update_init_of_drs): Likewise.
17706 (vect_prepare_for_masked_peels): New function.
17707 (vect_do_peeling): Skip prologue peeling if we're using a mask
17708 instead. Update call to vect_update_inits_of_drs.
17709 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17711 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17712 alignment. Do not include the number of peeled iterations in
17713 the minimum threshold in that case.
17714 (vectorizable_induction): Adjust the start value down by
17715 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17716 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17717 Take the number of skipped iterations into account when calculating
17719 * tree-vect-stmts.c (vect_gen_while_not): New function.
17721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17722 Alan Hayward <alan.hayward@arm.com>
17723 David Sherwood <david.sherwood@arm.com>
17725 * doc/sourcebuild.texi (vect_fully_masked): Document.
17726 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17727 default value to 0.
17728 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17730 (vect_analyze_loop_2): ...here. Don't check the vectorization
17731 factor against the number of loop iterations if the loop is
17734 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17735 Alan Hayward <alan.hayward@arm.com>
17736 David Sherwood <david.sherwood@arm.com>
17738 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17739 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17740 (dump_groups): Update accordingly.
17741 (iv_use::mem_type): New member variable.
17742 (address_p): New function.
17743 (record_use): Add a mem_type argument and initialize the new
17745 (record_group_use): Add a mem_type argument. Use address_p.
17746 Remove obsolete null checks of base_object. Update call to record_use.
17747 (find_interesting_uses_op): Update call to record_group_use.
17748 (find_interesting_uses_cond): Likewise.
17749 (find_interesting_uses_address): Likewise.
17750 (get_mem_type_for_internal_fn): New function.
17751 (find_address_like_use): Likewise.
17752 (find_interesting_uses_stmt): Try find_address_like_use before
17753 calling find_interesting_uses_op.
17754 (addr_offset_valid_p): Use the iv mem_type field as the type
17755 of the addressed memory.
17756 (add_autoinc_candidates): Likewise.
17757 (get_address_cost): Likewise.
17758 (split_small_address_groups_p): Use address_p.
17759 (split_address_groups): Likewise.
17760 (add_iv_candidate_for_use): Likewise.
17761 (autoinc_possible_for_pair): Likewise.
17762 (rewrite_groups): Likewise.
17763 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17764 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17765 (get_alias_ptr_type_for_ptr_address): New function.
17766 (rewrite_use_address): Rewrite address uses in calls that were
17767 identified by find_address_like_use.
17769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17770 Alan Hayward <alan.hayward@arm.com>
17771 David Sherwood <david.sherwood@arm.com>
17773 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17775 * gimple-expr.h (is_gimple_addressable: Likewise.
17776 * gimple-expr.c (is_gimple_address): Likewise.
17777 * internal-fn.c (expand_call_mem_ref): New function.
17778 (expand_mask_load_optab_fn): Use it.
17779 (expand_mask_store_optab_fn): Likewise.
17781 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17782 Alan Hayward <alan.hayward@arm.com>
17783 David Sherwood <david.sherwood@arm.com>
17785 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17786 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17787 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17788 (cond_umax@var{mode}): Document.
17789 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17790 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17791 (cond_umin_optab, cond_umax_optab): New optabs.
17792 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17793 (COND_IOR, COND_XOR): New internal functions.
17794 * internal-fn.h (get_conditional_internal_fn): Declare.
17795 * internal-fn.c (cond_binary_direct): New macro.
17796 (expand_cond_binary_optab_fn): Likewise.
17797 (direct_cond_binary_optab_supported_p): Likewise.
17798 (get_conditional_internal_fn): New function.
17799 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17800 Cope with reduction statements that are vectorized as calls rather
17802 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17803 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17804 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17805 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17806 (UNSPEC_COND_EOR): New unspecs.
17807 (optab): Add mappings for them.
17808 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17809 (sve_int_op, sve_fp_op): New int attributes.
17811 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17812 Alan Hayward <alan.hayward@arm.com>
17813 David Sherwood <david.sherwood@arm.com>
17815 * optabs.def (while_ult_optab): New optab.
17816 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17817 * internal-fn.def (WHILE_ULT): New internal function.
17818 * internal-fn.h (direct_internal_fn_supported_p): New override
17819 that takes two types as argument.
17820 * internal-fn.c (while_direct): New macro.
17821 (expand_while_optab_fn): New function.
17822 (convert_optab_supported_p): Likewise.
17823 (direct_while_optab_supported_p): New macro.
17824 * wide-int.h (wi::udiv_ceil): New function.
17825 * tree-vectorizer.h (rgroup_masks): New structure.
17826 (vec_loop_masks): New typedef.
17827 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17828 and fully_masked_p.
17829 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17830 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17831 (vect_max_vf): New function.
17832 (slpeel_make_loop_iterate_ntimes): Delete.
17833 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17834 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17835 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17836 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17837 internal-fn.h, stor-layout.h and optabs-query.h.
17838 (vect_set_loop_mask): New function.
17839 (add_preheader_seq): Likewise.
17840 (add_header_seq): Likewise.
17841 (interleave_supported_p): Likewise.
17842 (vect_maybe_permute_loop_masks): Likewise.
17843 (vect_set_loop_masks_directly): Likewise.
17844 (vect_set_loop_condition_masked): Likewise.
17845 (vect_set_loop_condition_unmasked): New function, split out from
17846 slpeel_make_loop_iterate_ntimes.
17847 (slpeel_make_loop_iterate_ntimes): Rename to..
17848 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
17849 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17850 (vect_do_peeling): Update call accordingly.
17851 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17853 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17854 mask_compare_type, can_fully_mask_p and fully_masked_p.
17855 (release_vec_loop_masks): New function.
17856 (_loop_vec_info): Use it to free the loop masks.
17857 (can_produce_all_loop_masks_p): New function.
17858 (vect_get_max_nscalars_per_iter): Likewise.
17859 (vect_verify_full_masking): Likewise.
17860 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17861 retries, and free the mask rgroups before retrying. Check loop-wide
17862 reasons for disallowing fully-masked loops. Make the final decision
17863 about whether use a fully-masked loop or not.
17864 (vect_estimate_min_profitable_iters): Do not assume that peeling
17865 for the number of iterations will be needed for fully-masked loops.
17866 (vectorizable_reduction): Disable fully-masked loops.
17867 (vectorizable_live_operation): Likewise.
17868 (vect_halve_mask_nunits): New function.
17869 (vect_double_mask_nunits): Likewise.
17870 (vect_record_loop_mask): Likewise.
17871 (vect_get_loop_mask): Likewise.
17872 (vect_transform_loop): Handle the case in which the final loop
17873 iteration might handle a partial vector. Call vect_set_loop_condition
17874 instead of slpeel_make_loop_iterate_ntimes.
17875 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17876 (check_load_store_masking): New function.
17877 (prepare_load_store_mask): Likewise.
17878 (vectorizable_store): Handle fully-masked loops.
17879 (vectorizable_load): Likewise.
17880 (supportable_widening_operation): Use vect_halve_mask_nunits for
17882 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17883 (vect_gen_while): New function.
17884 * config/aarch64/aarch64.md (umax<mode>3): New expander.
17885 (aarch64_uqdec<mode>): New insn.
17887 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17888 Alan Hayward <alan.hayward@arm.com>
17889 David Sherwood <david.sherwood@arm.com>
17891 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17892 (reduc_xor_scal_optab): New optabs.
17893 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17894 (reduc_xor_scal_@var{m}): Document.
17895 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17896 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17897 internal functions.
17898 * fold-const-call.c (fold_const_call): Handle them.
17899 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17900 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17901 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17902 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17903 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17904 (UNSPEC_XORV): New unspecs.
17905 (optab): Add entries for them.
17906 (BITWISEV): New int iterator.
17907 (bit_reduc_op): New int attributes.
17909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17910 Alan Hayward <alan.hayward@arm.com>
17911 David Sherwood <david.sherwood@arm.com>
17913 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17914 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17915 * optabs.def (vec_shl_insert_optab): New optab.
17916 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17917 (duplicate_and_interleave): Likewise.
17918 * tree-vect-loop.c: Include internal-fn.h.
17919 (neutral_op_for_slp_reduction): New function, split out from
17920 get_initial_defs_for_reduction.
17921 (get_initial_def_for_reduction): Handle option 2 for variable-length
17922 vectors by loading the neutral value into a vector and then shifting
17923 the initial value into element 0.
17924 (get_initial_defs_for_reduction): Replace the code argument with
17925 the neutral value calculated by neutral_op_for_slp_reduction.
17926 Use gimple_build_vector for constant-length vectors.
17927 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17928 but the first group_size elements have a neutral value.
17929 Use duplicate_and_interleave otherwise.
17930 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17931 Update call to get_initial_defs_for_reduction. Handle SLP
17932 reductions for variable-length vectors by creating one vector
17933 result for each scalar result, with the elements associated
17934 with other scalar results stubbed out with the neutral value.
17935 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17936 Require IFN_VEC_SHL_INSERT for double reductions on
17937 variable-length vectors, or SLP reductions that have
17938 a neutral value. Require can_duplicate_and_interleave_p
17939 support for variable-length unchained SLP reductions if there
17940 is no neutral value, such as for MIN/MAX reductions. Also require
17941 the number of vector elements to be a multiple of the number of
17942 SLP statements when doing variable-length unchained SLP reductions.
17943 Update call to vect_create_epilog_for_reduction.
17944 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17945 and remove initial values.
17946 (duplicate_and_interleave): Make public.
17947 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17948 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17950 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17951 Alan Hayward <alan.hayward@arm.com>
17952 David Sherwood <david.sherwood@arm.com>
17954 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17955 (can_duplicate_and_interleave_p): New function.
17956 (vect_get_and_check_slp_defs): Take the vector of statements
17957 rather than just the current one. Remove excess parentheses.
17958 Restriction rejectinon of vect_constant_def and vect_external_def
17959 for variable-length vectors to boolean types, or types for which
17960 can_duplicate_and_interleave_p is false.
17961 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17962 (duplicate_and_interleave): New function.
17963 (vect_get_constant_vectors): Use gimple_build_vector for
17964 constant-length vectors and suitable variable-length constant
17965 vectors. Use duplicate_and_interleave for other variable-length
17966 vectors. Don't defer the update when inserting new statements.
17968 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17969 Alan Hayward <alan.hayward@arm.com>
17970 David Sherwood <david.sherwood@arm.com>
17972 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17973 min_profitable_iters doesn't go negative.
17975 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17976 Alan Hayward <alan.hayward@arm.com>
17977 David Sherwood <david.sherwood@arm.com>
17979 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17980 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17981 * optabs.def (vec_mask_load_lanes_optab): New optab.
17982 (vec_mask_store_lanes_optab): Likewise.
17983 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17984 (MASK_STORE_LANES): Likewise.
17985 * internal-fn.c (mask_load_lanes_direct): New macro.
17986 (mask_store_lanes_direct): Likewise.
17987 (expand_mask_load_optab_fn): Handle masked operations.
17988 (expand_mask_load_lanes_optab_fn): New macro.
17989 (expand_mask_store_optab_fn): Handle masked operations.
17990 (expand_mask_store_lanes_optab_fn): New macro.
17991 (direct_mask_load_lanes_optab_supported_p): Likewise.
17992 (direct_mask_store_lanes_optab_supported_p): Likewise.
17993 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17995 (vect_load_lanes_supported): Likewise.
17996 * tree-vect-data-refs.c (strip_conversion): New function.
17997 (can_group_stmts_p): Likewise.
17998 (vect_analyze_data_ref_accesses): Use it instead of checking
17999 for a pair of assignments.
18000 (vect_store_lanes_supported): Take a masked_p parameter.
18001 (vect_load_lanes_supported): Likewise.
18002 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18003 vect_store_lanes_supported and vect_load_lanes_supported.
18004 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18005 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18006 parameter. Don't allow gaps for masked accesses.
18007 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18008 and vect_load_lanes_supported.
18009 (get_load_store_type): Take a masked_p parameter and update
18010 call to get_group_load_store_type.
18011 (vectorizable_store): Update call to get_load_store_type.
18012 Handle IFN_MASK_STORE_LANES.
18013 (vectorizable_load): Update call to get_load_store_type.
18014 Handle IFN_MASK_LOAD_LANES.
18016 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18017 Alan Hayward <alan.hayward@arm.com>
18018 David Sherwood <david.sherwood@arm.com>
18020 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18022 * config/aarch64/aarch64-protos.h
18023 (aarch64_sve_struct_memory_operand_p): Declare.
18024 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18025 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18026 (VPRED, vpred): Handle SVE structure modes.
18027 * config/aarch64/constraints.md (Utx): New constraint.
18028 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18029 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18030 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18031 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18032 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18033 structure modes. Split into pieces after RA.
18034 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18035 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18037 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18038 SVE structure modes.
18039 (aarch64_classify_address): Likewise.
18040 (sizetochar): Move earlier in file.
18041 (aarch64_print_operand): Handle SVE register lists.
18042 (aarch64_array_mode): New function.
18043 (aarch64_sve_struct_memory_operand_p): Likewise.
18044 (TARGET_ARRAY_MODE): Redefine.
18046 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18047 Alan Hayward <alan.hayward@arm.com>
18048 David Sherwood <david.sherwood@arm.com>
18050 * target.def (array_mode): New target hook.
18051 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18052 * doc/tm.texi: Regenerate.
18053 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18054 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18055 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18056 targetm.array_mode.
18057 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18060 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18061 Alan Hayward <alan.hayward@arm.com>
18062 David Sherwood <david.sherwood@arm.com>
18064 * fold-const.c (fold_binary_loc): Check the argument types
18065 rather than the result type when testing for a vector operation.
18067 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18069 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18070 * doc/tm.texi: Regenerate.
18072 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18073 Alan Hayward <alan.hayward@arm.com>
18074 David Sherwood <david.sherwood@arm.com>
18076 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18077 (sve): Document new AArch64 extension.
18078 * doc/md.texi (w): Extend the description of the AArch64
18079 constraint to include SVE vectors.
18080 (Upl, Upa): Document new AArch64 predicate constraints.
18081 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18083 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18084 (msve-vector-bits=): New option.
18085 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18086 SVE when these are disabled.
18087 (sve): New extension.
18088 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18089 modes. Adjust their number of units based on aarch64_sve_vg.
18090 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18091 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18092 aarch64_addr_query_type.
18093 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18094 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18095 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18096 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18097 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18098 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18099 (aarch64_simd_imm_zero_p): Delete.
18100 (aarch64_check_zero_based_sve_index_immediate): Declare.
18101 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18102 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18103 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18104 (aarch64_sve_float_mul_immediate_p): Likewise.
18105 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18106 rather than an rtx.
18107 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18108 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18109 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18110 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18111 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18112 (aarch64_regmode_natural_size): Likewise.
18113 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18114 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18116 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18117 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18118 for VG and the SVE predicate registers.
18119 (V_ALIASES): Add a "z"-prefixed alias.
18120 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18121 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18122 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18123 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18124 (REG_CLASS_NAMES): Add entries for them.
18125 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18126 and the predicate registers.
18127 (aarch64_sve_vg): Declare.
18128 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18129 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18130 (REGMODE_NATURAL_SIZE): Define.
18131 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18133 * config/aarch64/aarch64.c: Include cfgrtl.h.
18134 (simd_immediate_info): Add a constructor for series vectors,
18135 and an associated step field.
18136 (aarch64_sve_vg): New variable.
18137 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18138 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18139 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18140 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18141 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18142 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18143 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18144 (aarch64_get_mask_mode): New functions.
18145 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18146 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18147 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18148 predicate modes and predicate registers. Explicitly restrict
18149 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18150 to store a vector mode if it is recognized by
18151 aarch64_classify_vector_mode.
18152 (aarch64_regmode_natural_size): New function.
18153 (aarch64_hard_regno_caller_save_mode): Return the original mode
18155 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18156 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18157 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18158 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18160 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18161 does not overlap dest if the function is frame-related. Handle
18163 (aarch64_split_add_offset): New function.
18164 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18165 them aarch64_add_offset.
18166 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18167 and update call to aarch64_sub_sp.
18168 (aarch64_add_cfa_expression): New function.
18169 (aarch64_expand_prologue): Pass extra temporary registers to the
18170 functions above. Handle the case in which we need to emit new
18171 DW_CFA_expressions for registers that were originally saved
18172 relative to the stack pointer, but now have to be expressed
18173 relative to the frame pointer.
18174 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18176 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18177 IP0 and IP1 values for SVE frames.
18178 (aarch64_expand_vec_series): New function.
18179 (aarch64_expand_sve_widened_duplicate): Likewise.
18180 (aarch64_expand_sve_const_vector): Likewise.
18181 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18182 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18183 into the register, rather than emitting a SET directly.
18184 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18185 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18186 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18187 (offset_9bit_signed_scaled_p): New functions.
18188 (aarch64_replicate_bitmask_imm): New function.
18189 (aarch64_bitmask_imm): Use it.
18190 (aarch64_cannot_force_const_mem): Reject expressions involving
18191 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18192 (aarch64_classify_index): Handle SVE indices, by requiring
18193 a plain register index with a scale that matches the element size.
18194 (aarch64_classify_address): Handle SVE addresses. Assert that
18195 the mode of the address is VOIDmode or an integer mode.
18196 Update call to aarch64_classify_symbol.
18197 (aarch64_classify_symbolic_expression): Update call to
18198 aarch64_classify_symbol.
18199 (aarch64_const_vec_all_in_range_p): New function.
18200 (aarch64_print_vector_float_operand): Likewise.
18201 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18202 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18203 and the FP immediates 1.0 and 0.5.
18204 (aarch64_print_address_internal): Handle SVE addresses.
18205 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18206 (aarch64_regno_regclass): Handle predicate registers.
18207 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18209 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18210 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18211 (aarch64_convert_sve_vector_bits): New function.
18212 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18213 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18214 rather than an rtx.
18215 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18216 Handle SVE vector and predicate modes. Accept VL-based constants
18217 that need only one temporary register, and VL offsets that require
18218 no temporary registers.
18219 (aarch64_conditional_register_usage): Mark the predicate registers
18220 as fixed if SVE isn't available.
18221 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18222 Return true for SVE vector and predicate modes.
18223 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18224 rather than an unsigned int. Handle SVE modes.
18225 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18227 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18229 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18230 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18231 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18232 (aarch64_sve_float_mul_immediate_p): New functions.
18233 (aarch64_sve_valid_immediate): New function.
18234 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18235 Explicitly reject structure modes. Check for INDEX constants.
18236 Handle PTRUE and PFALSE constants.
18237 (aarch64_check_zero_based_sve_index_immediate): New function.
18238 (aarch64_simd_imm_zero_p): Delete.
18239 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18240 vector modes. Accept constants in the range of CNT[BHWD].
18241 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18242 ask for an Advanced SIMD mode.
18243 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18244 (aarch64_simd_vector_alignment): Handle SVE predicates.
18245 (aarch64_vectorize_preferred_vector_alignment): New function.
18246 (aarch64_simd_vector_alignment_reachable): Use it instead of
18248 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18249 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18251 (MAX_VECT_LEN): Delete.
18252 (expand_vec_perm_d): Add a vec_flags field.
18253 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18254 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18255 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18257 (aarch64_evpc_rev): Rename to...
18258 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18259 (aarch64_evpc_rev_global): New function.
18260 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18261 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18263 (aarch64_evpc_sve_tbl): New function.
18264 (aarch64_expand_vec_perm_const_1): Update after rename of
18265 aarch64_evpc_rev. Handle SVE permutes too, trying
18266 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18267 than aarch64_evpc_tbl.
18268 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18269 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18270 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18271 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18272 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18273 (aarch64_expand_sve_vcond): New functions.
18274 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18275 of aarch64_vector_mode_p.
18276 (aarch64_dwarf_poly_indeterminate_value): New function.
18277 (aarch64_compute_pressure_classes): Likewise.
18278 (aarch64_can_change_mode_class): Likewise.
18279 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18280 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18281 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18282 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18283 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18284 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18285 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18286 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18288 (Dn, Dl, Dr): Accept const as well as const_vector.
18289 (Dz): Likewise. Compare against CONST0_RTX.
18290 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18291 of "vector" where appropriate.
18292 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18293 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18294 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18295 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18296 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18297 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18298 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18299 (v_int_equiv): Extend to SVE modes.
18300 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18302 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18303 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18304 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18305 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18306 (SVE_COND_FP_CMP): New int iterators.
18307 (perm_hilo): Handle the new unpack unspecs.
18308 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18310 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18311 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18312 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18313 (aarch64_equality_operator, aarch64_constant_vector_operand)
18314 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18315 (aarch64_sve_nonimmediate_operand): Likewise.
18316 (aarch64_sve_general_operand): Likewise.
18317 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18318 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18319 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18320 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18321 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18322 (aarch64_sve_float_arith_immediate): Likewise.
18323 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18324 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18325 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18326 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18327 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18328 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18329 (aarch64_sve_float_arith_operand): Likewise.
18330 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18331 (aarch64_sve_float_mul_operand): Likewise.
18332 (aarch64_sve_vec_perm_operand): Likewise.
18333 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18334 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18335 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18336 as well as const_vector.
18337 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18338 in file. Use CONST0_RTX and CONSTM1_RTX.
18339 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18340 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18341 Use aarch64_simd_imm_zero.
18342 * config/aarch64/aarch64-sve.md: New file.
18343 * config/aarch64/aarch64.md: Include it.
18344 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18345 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18346 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18347 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18348 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18349 (sve): New attribute.
18350 (enabled): Disable instructions with the sve attribute unless
18352 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18353 aarch64_expand_mov_immediate.
18354 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18355 CNT[BHSD] immediates.
18356 (movti): Split CONST_POLY_INT moves into two halves.
18357 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18358 Split additions that need a temporary here if the destination
18359 is the stack pointer.
18360 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18361 (*add<mode>3_poly_1): New instruction.
18362 (set_clobber_cc): New expander.
18364 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18366 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18367 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18368 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18369 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18370 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18371 Change innermode from fixed_mode_size to machine_mode.
18372 (simplify_subreg): Update call accordingly. Handle a constant-sized
18373 subreg of a variable-length CONST_VECTOR.
18375 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18376 Alan Hayward <alan.hayward@arm.com>
18377 David Sherwood <david.sherwood@arm.com>
18379 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18380 (add_offset_to_base): New function, split out from...
18381 (create_mem_ref): ...here. When handling a scale other than 1,
18382 check first whether the address is valid without the offset.
18383 Add it into the base if so, leaving the index and scale as-is.
18385 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18388 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18389 fold_for_warn before checking if arg2 is INTEGER_CST.
18391 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18393 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18394 (store_multiple_operation): Delete.
18395 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18396 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18397 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18398 guarded by TARGET_STRING.
18399 (rs6000_output_load_multiple): Delete.
18400 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18401 OPTION_MASK_STRING / TARGET_STRING handling.
18402 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18403 (const rs6000_opt_masks) <"string">: Change mask to 0.
18404 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18405 (MASK_STRING): Delete.
18406 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18408 (load_multiple): Delete.
18415 (store_multiple): Delete.
18422 (movmemsi_8reg): Delete.
18423 (corresponding unnamed define_insn): Delete.
18424 (movmemsi_6reg): Delete.
18425 (corresponding unnamed define_insn): Delete.
18426 (movmemsi_4reg): Delete.
18427 (corresponding unnamed define_insn): Delete.
18428 (movmemsi_2reg): Delete.
18429 (corresponding unnamed define_insn): Delete.
18430 (movmemsi_1reg): Delete.
18431 (corresponding unnamed define_insn): Delete.
18432 * config/rs6000/rs6000.opt (mno-string): New.
18433 (mstring): Replace by deprecation warning stub.
18434 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18436 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18438 * regrename.c (regrename_do_replace): If replacing the same
18439 reg multiple times, try to reuse last created gen_raw_REG.
18442 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18443 main to workaround a bug in GDB.
18445 2018-01-12 Tom de Vries <tom@codesourcery.com>
18448 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18450 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18452 PR rtl-optimization/80481
18453 * ira-color.c (get_cap_member): New function.
18454 (allocnos_conflict_by_live_ranges_p): Use it.
18455 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18456 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18458 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18461 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18462 (*saddl_se_1): Ditto.
18463 (*ssubsi_1): Ditto.
18464 (*ssubl_se_1): Ditto.
18466 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18468 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18469 rather than wi::to_widest for DR_INITs.
18470 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18471 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18472 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18474 (vect_analyze_group_access_1): Note that here.
18476 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18478 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18479 polynomial type sizes.
18481 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18483 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18484 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18485 (gimple_add_tmp_var): Likewise.
18487 2018-01-12 Martin Liska <mliska@suse.cz>
18489 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18490 (gimple_alloc_sizes): Likewise.
18491 (dump_gimple_statistics): Use PRIu64 in printf format.
18492 * gimple.h: Change uint64_t to int.
18494 2018-01-12 Martin Liska <mliska@suse.cz>
18496 * tree-core.h: Use uint64_t instead of int.
18497 * tree.c (tree_node_counts): Likewise.
18498 (tree_node_sizes): Likewise.
18499 (dump_tree_statistics): Use PRIu64 in printf format.
18501 2018-01-12 Martin Liska <mliska@suse.cz>
18503 * Makefile.in: As qsort_chk is implemented in vec.c, add
18504 vec.o to linkage of gencfn-macros.
18505 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18506 passing the info to record_node_allocation_statistics.
18507 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18509 * ggc-common.c (struct ggc_usage): Add operator== and use
18510 it in operator< and compare function.
18511 * mem-stats.h (struct mem_usage): Likewise.
18512 * vec.c (struct vec_usage): Remove operator< and compare
18513 function. Can be simply inherited.
18515 2018-01-12 Martin Jambor <mjambor@suse.cz>
18518 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18519 * tree-ssa-math-opts.c: Include domwalk.h.
18520 (convert_mult_to_fma_1): New function.
18521 (fma_transformation_info): New type.
18522 (fma_deferring_state): Likewise.
18523 (cancel_fma_deferring): New function.
18524 (result_of_phi): Likewise.
18525 (last_fma_candidate_feeds_initial_phi): Likewise.
18526 (convert_mult_to_fma): Added deferring logic, split actual
18527 transformation to convert_mult_to_fma_1.
18528 (math_opts_dom_walker): New type.
18529 (math_opts_dom_walker::after_dom_children): New method, body moved
18530 here from pass_optimize_widening_mul::execute, added deferring logic
18532 (pass_optimize_widening_mul::execute): Moved most of code to
18533 math_opts_dom_walker::after_dom_children.
18534 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18535 * config/i386/i386.c (ix86_option_override_internal): Added
18536 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18538 2018-01-12 Richard Biener <rguenther@suse.de>
18541 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18542 inline instance vars.
18544 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18547 * config/rx/rx.c (rx_is_restricted_memory_address):
18548 Handle SUBREG case.
18550 2018-01-12 Richard Biener <rguenther@suse.de>
18552 PR tree-optimization/80846
18553 * target.def (split_reduction): New target hook.
18554 * targhooks.c (default_split_reduction): New function.
18555 * targhooks.h (default_split_reduction): Declare.
18556 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18557 target requests first reduce vectors by combining low and high
18559 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18560 (get_vectype_for_scalar_type_and_size): Export.
18561 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18562 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18563 * doc/tm.texi: Regenerate.
18564 * config/i386/i386.c (ix86_split_reduction): Implement
18565 TARGET_VECTORIZE_SPLIT_REDUCTION.
18567 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18570 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18571 in PIC mode except for TARGET_VXWORKS_RTP.
18572 * config/sparc/sparc.c: Include cfgrtl.h.
18573 (TARGET_INIT_PIC_REG): Define.
18574 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18575 (sparc_pic_register_p): New predicate.
18576 (sparc_legitimate_address_p): Use it.
18577 (sparc_legitimize_pic_address): Likewise.
18578 (sparc_delegitimize_address): Likewise.
18579 (sparc_mode_dependent_address_p): Likewise.
18580 (gen_load_pcrel_sym): Remove 4th parameter.
18581 (load_got_register): Adjust call to above. Remove obsolete stuff.
18582 (sparc_expand_prologue): Do not call load_got_register here.
18583 (sparc_flat_expand_prologue): Likewise.
18584 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18585 (sparc_use_pseudo_pic_reg): New function.
18586 (sparc_init_pic_reg): Likewise.
18587 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18588 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18590 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18592 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18593 Add item for branch_cost.
18595 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18597 PR rtl-optimization/83565
18598 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18599 not extend the result to a larger mode for rotate operations.
18600 (num_sign_bit_copies1): Likewise.
18602 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18605 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18607 Use values-Xc.o for -pedantic.
18608 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18610 2018-01-12 Martin Liska <mliska@suse.cz>
18613 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18615 (possible_polymorphic_call_targets): Use it.
18616 (ipa_devirt): Likewise.
18618 2018-01-12 Martin Liska <mliska@suse.cz>
18620 * profile-count.h (enum profile_quality): Use 0 as invalid
18621 enum value of profile_quality.
18623 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18625 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18626 -mext-string options.
18628 2018-01-12 Richard Biener <rguenther@suse.de>
18630 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18631 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18632 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18634 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18636 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18638 * configure.ac (--with-long-double-format): Add support for the
18639 configuration option to change the default long double format on
18641 * config.gcc (powerpc*-linux*-*): Likewise.
18642 * configure: Regenerate.
18643 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18644 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18645 used without modification.
18647 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18649 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18650 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18651 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18652 MISC_BUILTIN_SPEC_BARRIER.
18653 (rs6000_init_builtins): Likewise.
18654 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18656 (speculation_barrier): New define_insn.
18657 * doc/extend.texi: Document __builtin_speculation_barrier.
18659 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18662 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18663 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18664 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18666 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18667 integral modes instead of "ss" and "sd".
18668 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18669 vectors with 32-bit and 64-bit elements.
18670 (vecdupssescalarmodesuffix): New mode attribute.
18671 (vec_dup<mode>): Use it.
18673 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18676 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18677 frame if argument is passed on stack.
18679 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18682 * ree.c (combine_reaching_defs): Optimize also
18683 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18684 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18686 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18688 PR middle-end/83189
18689 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18691 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18693 PR middle-end/83718
18694 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18695 after they are computed.
18697 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18699 PR tree-optimization/83695
18700 * gimple-loop-linterchange.cc
18701 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18702 reset cached scev information after interchange.
18703 (pass_linterchange::execute): Remove call to scev_reset_htab.
18705 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18707 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18708 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18709 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18710 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18711 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18712 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18713 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18714 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18715 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18716 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18717 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18718 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18719 (V_lane_reg): Likewise.
18720 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18722 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18723 (vfmal_lane_low<mode>_intrinsic,
18724 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18725 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18726 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18727 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18728 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18729 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18731 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18733 * config/arm/arm-cpus.in (fp16fml): New feature.
18734 (ALL_SIMD): Add fp16fml.
18735 (armv8.2-a): Add fp16fml as an option.
18736 (armv8.3-a): Likewise.
18737 (armv8.4-a): Add fp16fml as part of fp16.
18738 * config/arm/arm.h (TARGET_FP16FML): Define.
18739 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18741 * config/arm/arm-modes.def (V2HF): Define.
18742 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18743 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18744 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18745 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18746 vfmsl_low, vfmsl_high): New set of builtins.
18747 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18748 (vfml_op): New code attribute.
18749 (VFMLHALVES): New int iterator.
18750 (VFML, VFMLSEL): New mode attributes.
18751 (V_reg): Define mapping for V2HF.
18752 (V_hi, V_lo): New mode attributes.
18753 (VF_constraint): Likewise.
18754 (vfml_half, vfml_half_selector): New int attributes.
18755 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18757 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18758 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18760 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18761 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18762 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18763 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18765 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18766 Document new effective target and option set.
18768 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18770 * config/arm/arm-cpus.in (armv8_4): New feature.
18771 (ARMv8_4a): New fgroup.
18772 (armv8.4-a): New arch.
18773 * config/arm/arm-tables.opt: Regenerate.
18774 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18775 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18776 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18777 Add matching rules for -march=armv8.4-a and extensions.
18778 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18780 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18783 * config/rx/rx.md (BW): New mode attribute.
18784 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18786 2018-01-11 Richard Biener <rguenther@suse.de>
18788 PR tree-optimization/83435
18789 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18790 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18791 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
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.c (aarch64_address_info): Add a const_offset
18799 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18800 (aarch64_print_address_internal): Use it to check for a zero offset.
18802 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18803 Alan Hayward <alan.hayward@arm.com>
18804 David Sherwood <david.sherwood@arm.com>
18806 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18807 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18808 Return a poly_int64 rather than a HOST_WIDE_INT.
18809 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18810 rather than a HOST_WIDE_INT.
18811 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18812 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18813 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18814 final_offset from HOST_WIDE_INT to poly_int64.
18815 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18816 to_constant when getting the number of units in an Advanced SIMD
18818 (aarch64_builtin_vectorized_function): Check for a constant number
18820 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18822 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18823 attribute instead of GET_MODE_NUNITS.
18824 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18825 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18826 GET_MODE_SIZE for fixed-size registers.
18827 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18828 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18829 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18830 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18831 (aarch64_print_operand, aarch64_print_address_internal)
18832 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18833 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18834 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18835 Handle polynomial GET_MODE_SIZE.
18836 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
18837 wider than SImode without modification.
18838 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18839 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18840 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18841 passing and returning SVE modes.
18842 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18843 rather than GEN_INT.
18844 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18845 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18846 (aarch64_allocate_and_probe_stack_space): Likewise.
18847 (aarch64_layout_frame): Cope with polynomial offsets.
18848 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18849 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
18850 polynomial offsets.
18851 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18852 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18853 poly_int64 rather than a HOST_WIDE_INT.
18854 (aarch64_get_separate_components, aarch64_process_components)
18855 (aarch64_expand_prologue, aarch64_expand_epilogue)
18856 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18857 (aarch64_anchor_offset): New function, split out from...
18858 (aarch64_legitimize_address): ...here.
18859 (aarch64_builtin_vectorization_cost): Handle polynomial
18860 TYPE_VECTOR_SUBPARTS.
18861 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18863 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18864 number of elements from the PARALLEL rather than the mode.
18865 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18866 rather than GET_MODE_BITSIZE.
18867 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18868 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18869 (aarch64_expand_vec_perm_const_1): Handle polynomial
18870 d->perm.length () and d->perm elements.
18871 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
18872 Apply to_constant to d->perm elements.
18873 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18874 polynomial CONST_VECTOR_NUNITS.
18875 (aarch64_move_pointer): Take amount as a poly_int64 rather
18877 (aarch64_progress_pointer): Avoid temporary variable.
18878 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18879 the mode attribute instead of GET_MODE.
18881 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18882 Alan Hayward <alan.hayward@arm.com>
18883 David Sherwood <david.sherwood@arm.com>
18885 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18886 x exists before using it.
18887 (aarch64_add_constant_internal): Rename to...
18888 (aarch64_add_offset_1): ...this. Replace regnum with separate
18889 src and dest rtxes. Handle the case in which they're different,
18890 including when the offset is zero. Replace scratchreg with an rtx.
18891 Use 2 additions if there is no spare register into which we can
18892 move a 16-bit constant.
18893 (aarch64_add_constant): Delete.
18894 (aarch64_add_offset): Replace reg with separate src and dest
18895 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
18896 Use aarch64_add_offset_1.
18897 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18898 an rtx rather than an int. Take the delta as a poly_int64
18899 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18900 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18901 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18902 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18903 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18904 and aarch64_add_sp.
18905 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18906 aarch64_add_constant.
18908 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18910 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18911 Use scalar_float_mode.
18913 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18915 * config/aarch64/aarch64-simd.md
18916 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18917 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18918 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18919 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18920 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18921 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18922 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18923 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18924 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18925 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18927 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18930 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18931 targ_options->x_arm_arch_string is non NULL.
18933 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18935 * config/aarch64/aarch64.h
18936 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18938 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18941 * expmed.c (emit_store_flag_force): Swap if const op0
18942 and change VOIDmode to mode of op0.
18944 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18946 PR rtl-optimization/83761
18947 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18948 than bytes to mode_for_size.
18950 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18952 PR middle-end/83189
18953 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18954 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18957 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18959 PR middle-end/83575
18960 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18961 when in layout mode.
18962 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18963 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18966 2018-01-10 Michael Collison <michael.collison@arm.com>
18968 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18969 * config/aarch64/aarch64-option-extension.def: Add
18970 AARCH64_OPT_EXTENSION of 'fp16fml'.
18971 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18972 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18973 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18974 * config/aarch64/constraints.md (Ui7): New constraint.
18975 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18976 (VFMLA_SEL_W): Ditto.
18979 (VFMLA16_LOW): New int iterator.
18980 (VFMLA16_HIGH): Ditto.
18981 (UNSPEC_FMLAL): New unspec.
18982 (UNSPEC_FMLSL): Ditto.
18983 (UNSPEC_FMLAL2): Ditto.
18984 (UNSPEC_FMLSL2): Ditto.
18985 (f16mac): New code attribute.
18986 * config/aarch64/aarch64-simd-builtins.def
18987 (aarch64_fmlal_lowv2sf): Ditto.
18988 (aarch64_fmlsl_lowv2sf): Ditto.
18989 (aarch64_fmlalq_lowv4sf): Ditto.
18990 (aarch64_fmlslq_lowv4sf): Ditto.
18991 (aarch64_fmlal_highv2sf): Ditto.
18992 (aarch64_fmlsl_highv2sf): Ditto.
18993 (aarch64_fmlalq_highv4sf): Ditto.
18994 (aarch64_fmlslq_highv4sf): Ditto.
18995 (aarch64_fmlal_lane_lowv2sf): Ditto.
18996 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18997 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18998 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18999 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19000 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19001 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19002 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19003 (aarch64_fmlal_lane_highv2sf): Ditto.
19004 (aarch64_fmlsl_lane_highv2sf): Ditto.
19005 (aarch64_fmlal_laneq_highv2sf): Ditto.
19006 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19007 (aarch64_fmlalq_lane_highv4sf): Ditto.
19008 (aarch64_fmlsl_lane_highv4sf): Ditto.
19009 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19010 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19011 * config/aarch64/aarch64-simd.md:
19012 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19013 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19014 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19015 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19016 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19017 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19018 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19019 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19020 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19021 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19022 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19023 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19024 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19025 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19026 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19027 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19028 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19029 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19030 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19031 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19032 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19033 (vfmlsl_low_u32): Ditto.
19034 (vfmlalq_low_u32): Ditto.
19035 (vfmlslq_low_u32): Ditto.
19036 (vfmlal_high_u32): Ditto.
19037 (vfmlsl_high_u32): Ditto.
19038 (vfmlalq_high_u32): Ditto.
19039 (vfmlslq_high_u32): Ditto.
19040 (vfmlal_lane_low_u32): Ditto.
19041 (vfmlsl_lane_low_u32): Ditto.
19042 (vfmlal_laneq_low_u32): Ditto.
19043 (vfmlsl_laneq_low_u32): Ditto.
19044 (vfmlalq_lane_low_u32): Ditto.
19045 (vfmlslq_lane_low_u32): Ditto.
19046 (vfmlalq_laneq_low_u32): Ditto.
19047 (vfmlslq_laneq_low_u32): Ditto.
19048 (vfmlal_lane_high_u32): Ditto.
19049 (vfmlsl_lane_high_u32): Ditto.
19050 (vfmlal_laneq_high_u32): Ditto.
19051 (vfmlsl_laneq_high_u32): Ditto.
19052 (vfmlalq_lane_high_u32): Ditto.
19053 (vfmlslq_lane_high_u32): Ditto.
19054 (vfmlalq_laneq_high_u32): Ditto.
19055 (vfmlslq_laneq_high_u32): Ditto.
19056 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19057 (AARCH64_FL_FOR_ARCH8_4): New.
19058 (AARCH64_ISA_F16FML): New ISA flag.
19059 (TARGET_F16FML): New feature flag for fp16fml.
19060 (doc/invoke.texi): Document new fp16fml option.
19062 2018-01-10 Michael Collison <michael.collison@arm.com>
19064 * config/aarch64/aarch64-builtins.c:
19065 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19066 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19067 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19068 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19069 (AARCH64_ISA_SHA3): New ISA flag.
19070 (TARGET_SHA3): New feature flag for sha3.
19071 * config/aarch64/iterators.md (sha512_op): New int attribute.
19072 (CRYPTO_SHA512): New int iterator.
19073 (UNSPEC_SHA512H): New unspec.
19074 (UNSPEC_SHA512H2): Ditto.
19075 (UNSPEC_SHA512SU0): Ditto.
19076 (UNSPEC_SHA512SU1): Ditto.
19077 * config/aarch64/aarch64-simd-builtins.def
19078 (aarch64_crypto_sha512hqv2di): New builtin.
19079 (aarch64_crypto_sha512h2qv2di): Ditto.
19080 (aarch64_crypto_sha512su0qv2di): Ditto.
19081 (aarch64_crypto_sha512su1qv2di): Ditto.
19082 (aarch64_eor3qv8hi): Ditto.
19083 (aarch64_rax1qv2di): Ditto.
19084 (aarch64_xarqv2di): Ditto.
19085 (aarch64_bcaxqv8hi): Ditto.
19086 * config/aarch64/aarch64-simd.md:
19087 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19088 (aarch64_crypto_sha512su0qv2di): Ditto.
19089 (aarch64_crypto_sha512su1qv2di): Ditto.
19090 (aarch64_eor3qv8hi): Ditto.
19091 (aarch64_rax1qv2di): Ditto.
19092 (aarch64_xarqv2di): Ditto.
19093 (aarch64_bcaxqv8hi): Ditto.
19094 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19095 (vsha512h2q_u64): Ditto.
19096 (vsha512su0q_u64): Ditto.
19097 (vsha512su1q_u64): Ditto.
19098 (veor3q_u16): Ditto.
19099 (vrax1q_u64): Ditto.
19100 (vxarq_u64): Ditto.
19101 (vbcaxq_u16): Ditto.
19102 * config/arm/types.md (crypto_sha512): New type attribute.
19103 (crypto_sha3): Ditto.
19104 (doc/invoke.texi): Document new sha3 option.
19106 2018-01-10 Michael Collison <michael.collison@arm.com>
19108 * config/aarch64/aarch64-builtins.c:
19109 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19110 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19111 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19112 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19113 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19114 (AARCH64_ISA_SM4): New ISA flag.
19115 (TARGET_SM4): New feature flag for sm4.
19116 * config/aarch64/aarch64-simd-builtins.def
19117 (aarch64_sm3ss1qv4si): Ditto.
19118 (aarch64_sm3tt1aq4si): Ditto.
19119 (aarch64_sm3tt1bq4si): Ditto.
19120 (aarch64_sm3tt2aq4si): Ditto.
19121 (aarch64_sm3tt2bq4si): Ditto.
19122 (aarch64_sm3partw1qv4si): Ditto.
19123 (aarch64_sm3partw2qv4si): Ditto.
19124 (aarch64_sm4eqv4si): Ditto.
19125 (aarch64_sm4ekeyqv4si): Ditto.
19126 * config/aarch64/aarch64-simd.md:
19127 (aarch64_sm3ss1qv4si): Ditto.
19128 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19129 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19130 (aarch64_sm4eqv4si): Ditto.
19131 (aarch64_sm4ekeyqv4si): Ditto.
19132 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19133 (sm3part_op): Ditto.
19134 (CRYPTO_SM3TT): Ditto.
19135 (CRYPTO_SM3PART): Ditto.
19136 (UNSPEC_SM3SS1): New unspec.
19137 (UNSPEC_SM3TT1A): Ditto.
19138 (UNSPEC_SM3TT1B): Ditto.
19139 (UNSPEC_SM3TT2A): Ditto.
19140 (UNSPEC_SM3TT2B): Ditto.
19141 (UNSPEC_SM3PARTW1): Ditto.
19142 (UNSPEC_SM3PARTW2): Ditto.
19143 (UNSPEC_SM4E): Ditto.
19144 (UNSPEC_SM4EKEY): Ditto.
19145 * config/aarch64/constraints.md (Ui2): New constraint.
19146 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19147 * config/arm/types.md (crypto_sm3): New type attribute.
19148 (crypto_sm4): Ditto.
19149 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19150 (vsm3tt1aq_u32): Ditto.
19151 (vsm3tt1bq_u32): Ditto.
19152 (vsm3tt2aq_u32): Ditto.
19153 (vsm3tt2bq_u32): Ditto.
19154 (vsm3partw1q_u32): Ditto.
19155 (vsm3partw2q_u32): Ditto.
19156 (vsm4eq_u32): Ditto.
19157 (vsm4ekeyq_u32): Ditto.
19158 (doc/invoke.texi): Document new sm4 option.
19160 2018-01-10 Michael Collison <michael.collison@arm.com>
19162 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19163 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19164 (AARCH64_FL_FOR_ARCH8_4): New.
19165 (AARCH64_FL_V8_4): New flag.
19166 (doc/invoke.texi): Document new armv8.4-a option.
19168 2018-01-10 Michael Collison <michael.collison@arm.com>
19170 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19171 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19172 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19173 * config/aarch64/aarch64-option-extension.def: Add
19174 AARCH64_OPT_EXTENSION of 'sha2'.
19175 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19176 (crypto): Disable sha2 and aes if crypto disabled.
19177 (crypto): Enable aes and sha2 if enabled.
19178 (simd): Disable sha2 and aes if simd disabled.
19179 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19181 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19182 (TARGET_SHA2): New feature flag for sha2.
19183 (TARGET_AES): New feature flag for aes.
19184 * config/aarch64/aarch64-simd.md:
19185 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19186 conditional on TARGET_AES.
19187 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19188 (aarch64_crypto_sha1hsi): Make pattern conditional
19190 (aarch64_crypto_sha1hv4si): Ditto.
19191 (aarch64_be_crypto_sha1hv4si): Ditto.
19192 (aarch64_crypto_sha1su1v4si): Ditto.
19193 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19194 (aarch64_crypto_sha1su0v4si): Ditto.
19195 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19196 (aarch64_crypto_sha256su0v4si): Ditto.
19197 (aarch64_crypto_sha256su1v4si): Ditto.
19198 (doc/invoke.texi): Document new aes and sha2 options.
19200 2018-01-10 Martin Sebor <msebor@redhat.com>
19202 PR tree-optimization/83781
19203 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19206 2018-01-11 Martin Sebor <msebor@gmail.com>
19207 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19209 PR tree-optimization/83501
19210 PR tree-optimization/81703
19212 * tree-ssa-strlen.c (get_string_cst): Rename...
19213 (get_string_len): ...to this. Handle global constants.
19214 (handle_char_store): Adjust.
19216 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19217 Jim Wilson <jimw@sifive.com>
19219 * config/riscv/riscv-protos.h (riscv_output_return): New.
19220 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19221 (riscv_attribute_table, riscv_output_return),
19222 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19223 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19224 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19226 (riscv_expand_prologue): Add early return for naked function.
19227 (riscv_expand_epilogue): Likewise.
19228 (riscv_function_ok_for_sibcall): Return false for naked function.
19229 (riscv_set_current_function): New.
19230 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19231 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19232 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19233 * doc/extend.texi (RISC-V Function Attributes): New.
19235 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19237 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19238 check for 128-bit long double before checking TCmode.
19239 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19240 128-bit long doubles before checking TFmode or TCmode.
19241 (FLOAT128_IBM_P): Likewise.
19243 2018-01-10 Martin Sebor <msebor@redhat.com>
19245 PR tree-optimization/83671
19246 * builtins.c (c_strlen): Unconditionally return zero for the empty
19248 Use -Warray-bounds for warnings.
19249 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19250 for non-constant array indices with COMPONENT_REF, arrays of
19251 arrays, and pointers to arrays.
19252 (gimple_fold_builtin_strlen): Determine and set length range for
19253 non-constant character arrays.
19255 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19257 PR middle-end/81897
19258 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19261 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19263 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19265 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19268 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19269 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19270 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19271 indexed_or_indirect_operand predicate.
19272 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19273 (*vsx_le_perm_load_v8hi): Likewise.
19274 (*vsx_le_perm_load_v16qi): Likewise.
19275 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19276 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19277 (*vsx_le_perm_store_v8hi): Likewise.
19278 (*vsx_le_perm_store_v16qi): Likewise.
19279 (eight unnamed splitters): Likewise.
19281 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19283 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19284 * config/rs6000/emmintrin.h: Likewise.
19285 * config/rs6000/mmintrin.h: Likewise.
19286 * config/rs6000/xmmintrin.h: Likewise.
19288 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19291 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19293 * tree.c (tree_nop_conversion): Return true for location wrapper
19295 (maybe_wrap_with_location): New function.
19296 (selftest::check_strip_nops): New function.
19297 (selftest::test_location_wrappers): New function.
19298 (selftest::tree_c_tests): Call it.
19299 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19300 (maybe_wrap_with_location): New decl.
19301 (EXPR_LOCATION_WRAPPER_P): New macro.
19302 (location_wrapper_p): New inline function.
19303 (tree_strip_any_location_wrapper): New inline function.
19305 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19308 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19309 stack_realign_offset for the largest alignment of stack slot
19311 (ix86_find_max_used_stack_alignment): New function.
19312 (ix86_finalize_stack_frame_flags): Use it. Set
19313 max_used_stack_alignment if we don't realign stack.
19314 * config/i386/i386.h (machine_function): Add
19315 max_used_stack_alignment.
19317 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19319 * config/arm/arm.opt (-mbranch-cost): New option.
19320 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19323 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19326 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19327 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19329 2018-01-10 Richard Biener <rguenther@suse.de>
19332 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19333 early out so it also covers the case where we have a non-NULL
19336 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19338 PR tree-optimization/83753
19339 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19340 for non-strided grouped accesses if the number of elements is 1.
19342 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19345 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19346 * i386.h (TARGET_USE_GATHER): Define.
19347 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19349 2018-01-10 Martin Liska <mliska@suse.cz>
19352 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19353 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19355 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19356 CLEANUP_NO_PARTITIONING is not set.
19358 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19360 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19361 for vectors, as a partial revert of r254296.
19362 * rtl.h (const_vec_p): Delete.
19363 (const_vec_duplicate_p): Don't test for vector CONSTs.
19364 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19365 * expmed.c (make_tree): Likewise.
19368 * common.md (E, F): Use CONSTANT_P instead of checking for
19370 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19371 checking for CONST_VECTOR.
19373 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19375 PR middle-end/83575
19376 * predict.c (force_edge_cold): Handle in more sane way edges
19377 with no prediction.
19379 2018-01-09 Carl Love <cel@us.ibm.com>
19381 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19383 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19384 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19385 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19386 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19387 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19388 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19389 * config/rs6000/rs6000-protos.h: Add extern defition for
19390 rs6000_generate_float2_double_code.
19391 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19393 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19394 (float2_v2df): Add define_expand.
19396 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19399 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19400 op_mode in the force_to_mode call.
19402 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19404 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19405 instead of checking each element individually.
19406 (aarch64_evpc_uzp): Likewise.
19407 (aarch64_evpc_zip): Likewise.
19408 (aarch64_evpc_ext): Likewise.
19409 (aarch64_evpc_rev): Likewise.
19410 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19411 instead of checking each element individually. Return true without
19413 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19414 whether all selected elements come from the same input, instead of
19415 checking each element individually. Remove calls to gen_rtx_REG,
19416 start_sequence and end_sequence and instead assert that no rtl is
19419 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19421 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19422 order of HIGH and CONST checks.
19424 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19426 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19427 if the destination isn't an SSA_NAME.
19429 2018-01-09 Richard Biener <rguenther@suse.de>
19431 PR tree-optimization/83668
19432 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19434 (canonicalize_loop_form): ... here, renamed from ...
19435 (canonicalize_loop_closed_ssa_form): ... this and amended to
19436 swap successor edges for loop exit blocks to make us use
19437 the RPO order we need for initial schedule generation.
19439 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19441 PR tree-optimization/64811
19442 * match.pd: When optimizing comparisons with Inf, avoid
19443 introducing or losing exceptions from comparisons with NaN.
19445 2018-01-09 Martin Liska <mliska@suse.cz>
19448 * asan.c (shadow_mem_size): Add gcc_assert.
19450 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19452 Don't save registers in main().
19455 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19456 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19457 * config/avr/avr.c (avr_set_current_function): Don't error if
19458 naked, OS_task or OS_main are specified at the same time.
19459 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19461 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19463 * common/config/avr/avr-common.c (avr_option_optimization_table):
19464 Switch on -mmain-is-OS_task for optimizing compilations.
19466 2018-01-09 Richard Biener <rguenther@suse.de>
19468 PR tree-optimization/83572
19469 * graphite.c: Include cfganal.h.
19470 (graphite_transform_loops): Connect infinite loops to exit
19471 and remove fake edges at the end.
19473 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19475 * ipa-inline.c (edge_badness): Revert accidental checkin.
19477 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19480 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19481 symbols; not inline clones.
19483 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19486 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19487 hard registers. Formatting fixes.
19489 PR preprocessor/83722
19490 * gcc.c (try_generate_repro): Pass
19491 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19492 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19495 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19496 Kito Cheng <kito.cheng@gmail.com>
19498 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19499 (riscv_leaf_function_p): Delete.
19500 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19502 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19504 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19506 (do_ifelse): New function.
19507 (do_isel): New function.
19508 (do_sub3): New function.
19509 (do_add3): New function.
19510 (do_load_mask_compare): New function.
19511 (do_overlap_load_compare): New function.
19512 (expand_compare_loop): New function.
19513 (expand_block_compare): Call expand_compare_loop() when appropriate.
19514 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19515 option description.
19516 (-mblock-compare-inline-loop-limit): New option.
19518 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19521 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19522 Reverse order of second and third operands in first alternative.
19523 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19524 of first and second elements in UNSPEC_VPERMR vector.
19525 (altivec_expand_vec_perm_le): Likewise.
19527 2018-01-08 Jeff Law <law@redhat.com>
19529 PR rtl-optimizatin/81308
19530 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19531 (process_switch): If group_case_labels makes a change, then set
19533 (pass_convert_switch::execute): If a switch is converted, then
19534 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19536 PR rtl-optimization/81308
19537 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19540 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19542 PR target/83663 - Revert r255946
19543 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19544 generation for cases where splatting a value is not useful.
19545 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19546 across a vec_duplicate and a paradoxical subreg forming a vector
19547 mode to a vec_concat.
19549 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19551 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19552 -march=armv8.3-a variants.
19553 * config/arm/t-multilib: Likewise.
19554 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19556 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19558 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19560 (cceq_ior_compare_complement): Give it a name so I can use it, and
19561 change boolean_or_operator predicate to boolean_operator so it can
19562 be used to generate a crand.
19563 (eqne): New code iterator.
19564 (bd/bd_neg): New code_attrs.
19565 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19566 a single define_insn.
19567 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19568 decrement (bdnzt/bdnzf/bdzt/bdzf).
19569 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19570 with the new names of the branch decrement patterns, and added the
19571 names of the branch decrement conditional patterns.
19573 2018-01-08 Richard Biener <rguenther@suse.de>
19575 PR tree-optimization/83563
19576 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19579 2018-01-08 Richard Biener <rguenther@suse.de>
19581 PR middle-end/83713
19582 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19584 2018-01-08 Richard Biener <rguenther@suse.de>
19586 PR tree-optimization/83685
19587 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19588 references to abnormals.
19590 2018-01-08 Richard Biener <rguenther@suse.de>
19593 * dwarf2out.c (output_indirect_strings): Handle empty
19594 skeleton_debug_str_hash.
19595 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19597 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19599 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19600 (emit_store_direct): Likewise.
19601 (arc_trampoline_adjust_address): Likewise.
19602 (arc_asm_trampoline_template): New function.
19603 (arc_initialize_trampoline): Use asm_trampoline_template.
19604 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19605 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19606 * config/arc/arc.md (flush_icache): Delete pattern.
19608 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19610 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19611 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19614 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19617 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19618 by not USED_FOR_TARGET.
19619 (make_pass_resolve_sw_modes): Likewise.
19621 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19623 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19626 2018-01-08 Richard Biener <rguenther@suse.de>
19628 PR middle-end/83580
19629 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19631 2018-01-08 Richard Biener <rguenther@suse.de>
19633 PR middle-end/83517
19634 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19636 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19638 PR middle-end/81897
19639 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19640 basic blocks with a small number of successors.
19641 (convert_control_dep_chain_into_preds): Improve handling of
19643 (dump_predicates): Split apart into...
19644 (dump_pred_chain): ...here...
19645 (dump_pred_info): ...and here.
19646 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19647 (can_chain_union_be_invalidated_p): Improve check for invalidation
19649 (uninit_uses_cannot_happen): Avoid unnecessary if
19650 convert_control_dep_chain_into_preds yielded nothing.
19652 2018-01-06 Martin Sebor <msebor@redhat.com>
19654 PR tree-optimization/83640
19655 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19656 subtracting negative offset from size.
19657 (builtin_access::overlap): Adjust offset bounds of the access to fall
19658 within the size of the object if possible.
19660 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19662 PR rtl-optimization/83699
19663 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19664 extract_bit_field_as_subreg to cases in which the extracted
19665 value is also a vector.
19667 * lra-constraints.c (process_alt_operands): Test for the equivalence
19668 substitutions when detecting a possible reload cycle.
19670 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19673 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19674 by default if flag_selective_schedling{,2}. Formatting fixes.
19676 PR rtl-optimization/83682
19677 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19678 if it has non-VECTOR_MODE element mode.
19679 (vec_duplicate_p): Likewise.
19681 PR middle-end/83694
19682 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19683 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19685 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19688 * config/i386/i386-builtin.def
19689 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19690 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19691 Require also OPTION_MASK_ISA_AVX512F in addition to
19692 OPTION_MASK_ISA_GFNI.
19693 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19694 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19695 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19696 to OPTION_MASK_ISA_GFNI.
19697 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19698 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19699 OPTION_MASK_ISA_AVX512BW.
19700 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19701 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19702 addition to OPTION_MASK_ISA_GFNI.
19703 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19704 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19705 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19706 to OPTION_MASK_ISA_GFNI.
19707 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19708 a requirement for all ISAs rather than any of them with a few
19710 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19712 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19713 bitmasks to be enabled with 3 exceptions, instead of requiring any
19714 enabled ISA with lots of exceptions.
19715 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19716 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19717 Change avx512bw in isa attribute to avx512f.
19718 * config/i386/sgxintrin.h: Add license boilerplate.
19719 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19720 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19721 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19722 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19724 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19725 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19726 temporarily sse2 rather than sse if not enabled already.
19729 * config/i386/sse.md (VI248_VLBW): Rename to ...
19730 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19731 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19732 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19733 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19734 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19735 mode iterator instead of VI248_VLBW.
19737 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19739 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19740 (record_modified): Skip clobbers; add debug output.
19741 (param_change_prob): Use sreal frequencies.
19743 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19745 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19746 punt for user-aligned variables.
19748 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19750 * tree-chrec.c (chrec_contains_symbols): Return true for
19753 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19756 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19757 of (x|y) == x for BICS pattern.
19759 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19761 PR tree-optimization/83605
19762 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19763 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19766 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19768 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19769 * config/epiphany/rtems.h: New file.
19771 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19772 Uros Bizjak <ubizjak@gmail.com>
19775 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19776 QIreg_operand instead of register_operand predicate.
19777 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19778 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19779 comments instead of -fmitigate[-_]rop.
19781 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19784 * cgraphunit.c (symbol_table::compile): Switch to text_section
19785 before calling assembly_start debug hook.
19786 * run-rtl-passes.c (run_rtl_passes): Likewise.
19789 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19791 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19792 range_int_cst_p rather than !symbolic_range_p before calling
19793 extract_range_from_multiplicative_op_1.
19795 2018-01-04 Jeff Law <law@redhat.com>
19797 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19798 redundant test in assertion.
19800 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19802 * doc/rtl.texi: Document machine_mode wrapper classes.
19804 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19806 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19807 using tree_to_uhwi.
19809 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19811 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19812 the VEC_PERM_EXPR fold to fail.
19814 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19817 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19818 to switched_sections.
19820 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19823 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19824 test for d.testing.
19826 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
19829 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19830 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19832 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19835 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19836 is BLKmode and bitpos not zero or mode change is needed.
19838 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19841 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19844 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
19847 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19848 instead of MULT rtx. Update all corresponding splitters.
19849 (*saddl_se): Ditto.
19850 (*ssub<modesuffix>): Ditto.
19851 (*ssubl_se): Ditto.
19852 (*cmp_sadd_di): Update split patterns.
19853 (*cmp_sadd_si): Ditto.
19854 (*cmp_sadd_sidi): Ditto.
19855 (*cmp_ssub_di): Ditto.
19856 (*cmp_ssub_si): Ditto.
19857 (*cmp_ssub_sidi): Ditto.
19858 * config/alpha/predicates.md (const23_operand): New predicate.
19859 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19860 Look for ASHIFT, not MULT inner operand.
19861 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19863 2018-01-04 Martin Liska <mliska@suse.cz>
19865 PR gcov-profile/83669
19866 * gcov.c (output_intermediate_file): Add version to intermediate
19868 * doc/gcov.texi: Document new field 'version' in intermediate
19869 file format. Fix location of '-k' option of gcov command.
19871 2018-01-04 Martin Liska <mliska@suse.cz>
19874 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19876 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19878 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19880 2018-01-03 Martin Sebor <msebor@redhat.com>
19882 PR tree-optimization/83655
19883 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19884 checking calls with invalid arguments.
19886 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19888 * tree-vect-stmts.c (vect_get_store_rhs): New function.
19889 (vectorizable_mask_load_store): Delete.
19890 (vectorizable_call): Return false for masked loads and stores.
19891 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
19892 instead of gimple_assign_rhs1.
19893 (vectorizable_load): Handle IFN_MASK_LOAD.
19894 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19896 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19898 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19900 (vectorizable_mask_load_store): ...here.
19901 (vectorizable_load): ...and here.
19903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19905 * tree-vect-stmts.c (vect_build_all_ones_mask)
19906 (vect_build_zero_merge_argument): New functions, split out from...
19907 (vectorizable_load): ...here.
19909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19911 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19913 (vectorizable_mask_load_store): ...here.
19914 (vectorizable_store): ...and here.
19916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19918 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19920 (vectorizable_mask_load_store): ...here.
19922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19924 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19925 (vect_model_store_cost): Take a vec_load_store_type instead of a
19927 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19928 (vect_model_store_cost): Take a vec_load_store_type instead of a
19930 (vectorizable_mask_load_store): Update accordingly.
19931 (vectorizable_store): Likewise.
19932 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19936 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19937 IFN_MASK_LOAD calls here rather than...
19938 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19941 Alan Hayward <alan.hayward@arm.com>
19942 David Sherwood <david.sherwood@arm.com>
19944 * expmed.c (extract_bit_field_1): For vector extracts,
19945 fall back to extract_bit_field_as_subreg if vec_extract
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 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19953 they are variable or constant sized.
19954 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19955 slots for constant-sized data.
19957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19958 Alan Hayward <alan.hayward@arm.com>
19959 David Sherwood <david.sherwood@arm.com>
19961 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19962 handling COND_EXPRs with boolean comparisons, try to find a better
19963 basis for the mask type than the boolean itself.
19965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19967 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19968 is calculated and how it can be overridden.
19969 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19970 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19972 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19976 Alan Hayward <alan.hayward@arm.com>
19977 David Sherwood <david.sherwood@arm.com>
19979 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19980 Remove the mode argument.
19981 (aarch64_simd_valid_immediate): Remove the mode and inverse
19983 * config/aarch64/iterators.md (bitsize): New iterator.
19984 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19985 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19986 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19987 aarch64_simd_valid_immediate.
19988 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19989 (aarch64_reg_or_bic_imm): Likewise.
19990 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19991 with an insn_type enum and msl with a modifier_type enum.
19992 Replace element_width with a scalar_mode. Change the shift
19993 to unsigned int. Add constructors for scalar_float_mode and
19994 scalar_int_mode elements.
19995 (aarch64_vect_float_const_representable_p): Delete.
19996 (aarch64_can_const_movi_rtx_p)
19997 (aarch64_simd_scalar_immediate_valid_for_move)
19998 (aarch64_simd_make_constant): Update call to
19999 aarch64_simd_valid_immediate.
20000 (aarch64_advsimd_valid_immediate_hs): New function.
20001 (aarch64_advsimd_valid_immediate): Likewise.
20002 (aarch64_simd_valid_immediate): Remove mode and inverse
20003 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20004 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20005 and aarch64_float_const_representable_p on the result.
20006 (aarch64_output_simd_mov_immediate): Remove mode argument.
20007 Update call to aarch64_simd_valid_immediate and use of
20008 simd_immediate_info.
20009 (aarch64_output_scalar_simd_mov_immediate): Update call
20012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20013 Alan Hayward <alan.hayward@arm.com>
20014 David Sherwood <david.sherwood@arm.com>
20016 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20017 (mode_nunits): Likewise CONST_MODE_NUNITS.
20018 * machmode.def (ADJUST_NUNITS): Document.
20019 * genmodes.c (mode_data::need_nunits_adj): New field.
20020 (blank_mode): Update accordingly.
20021 (adj_nunits): New variable.
20022 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20024 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20025 listed in adj_nunits.
20026 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20027 listed in adj_nunits. Don't emit case statements for such modes.
20028 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20029 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20030 nothing if adj_nunits is nonnull.
20031 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20032 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20033 (emit_mode_fbit): Update use of print_maybe_const_decl.
20034 (emit_move_size): Likewise. Treat the array as non-const
20036 (emit_mode_adjustments): Handle adj_nunits.
20038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20040 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20041 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20042 (VECTOR_MODES): Use it.
20043 (make_vector_modes): Take the prefix as an argument.
20045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20046 Alan Hayward <alan.hayward@arm.com>
20047 David Sherwood <david.sherwood@arm.com>
20049 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20050 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20051 for MODE_VECTOR_BOOL.
20052 * machmode.def (VECTOR_BOOL_MODE): Document.
20053 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20054 (make_vector_bool_mode): New function.
20055 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20057 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20058 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20060 * stor-layout.c (int_mode_for_mode): Likewise.
20061 * tree.c (build_vector_type_for_mode): Likewise.
20062 * varasm.c (output_constant_pool_2): Likewise.
20063 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20064 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20065 for MODE_VECTOR_BOOL.
20066 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20067 of mode class checks.
20068 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20069 instead of a list of mode class checks.
20070 (expand_vector_scalar_condition): Likewise.
20071 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20074 Alan Hayward <alan.hayward@arm.com>
20075 David Sherwood <david.sherwood@arm.com>
20077 * machmode.h (mode_size): Change from unsigned short to
20079 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20080 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20081 or if measurement_type is not polynomial.
20082 (fixed_size_mode::includes_p): Check for constant-sized modes.
20083 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20084 return a poly_uint16 rather than an unsigned short.
20085 (emit_mode_size): Change the type of mode_size from unsigned short
20086 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20087 (emit_mode_adjustments): Cope with polynomial vector sizes.
20088 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20090 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20092 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20093 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20094 * caller-save.c (setup_save_areas): Likewise.
20095 (replace_reg_with_saved_mem): Likewise.
20096 * calls.c (emit_library_call_value_1): Likewise.
20097 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20098 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20099 (gen_lowpart_for_combine): Likewise.
20100 * convert.c (convert_to_integer_1): Likewise.
20101 * cse.c (equiv_constant, cse_insn): Likewise.
20102 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20103 (cselib_subst_to_values): Likewise.
20104 * dce.c (word_dce_process_block): Likewise.
20105 * df-problems.c (df_word_lr_mark_ref): Likewise.
20106 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20107 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20108 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20109 (rtl_for_decl_location): Likewise.
20110 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20111 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20112 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20113 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20114 (expand_expr_real_1): Likewise.
20115 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20116 (pad_below): Likewise.
20117 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20118 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20119 * ira.c (get_subreg_tracking_sizes): Likewise.
20120 * ira-build.c (ira_create_allocno_objects): Likewise.
20121 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20122 (ira_sort_regnos_for_alter_reg): Likewise.
20123 * ira-costs.c (record_operand_costs): Likewise.
20124 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20125 (resolve_simple_move): Likewise.
20126 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20127 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20128 (lra_constraints): Likewise.
20129 (CONST_POOL_OK_P): Reject variable-sized modes.
20130 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20131 (add_pseudo_to_slot, lra_spill): Likewise.
20132 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20133 * optabs-query.c (get_best_extraction_insn): Likewise.
20134 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20135 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20136 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20137 * recog.c (offsettable_address_addr_space_p): Likewise.
20138 * regcprop.c (maybe_mode_change): Likewise.
20139 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20140 * regrename.c (build_def_use): Likewise.
20141 * regstat.c (dump_reg_info): Likewise.
20142 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20143 (find_reloads, find_reloads_subreg_address): Likewise.
20144 * reload1.c (eliminate_regs_1): Likewise.
20145 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20146 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20147 (simplify_binary_operation_1, simplify_subreg): Likewise.
20148 * targhooks.c (default_function_arg_padding): Likewise.
20149 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20150 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20151 (verify_gimple_assign_ternary): Likewise.
20152 * tree-inline.c (estimate_move_cost): Likewise.
20153 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20154 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20155 (get_address_cost_ainc): Likewise.
20156 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20157 (vect_supportable_dr_alignment): Likewise.
20158 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20159 (vectorizable_reduction): Likewise.
20160 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20161 (vectorizable_operation, vectorizable_load): Likewise.
20162 * tree.c (build_same_sized_truth_vector_type): Likewise.
20163 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20164 * var-tracking.c (emit_note_insn_var_location): Likewise.
20165 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20166 (ADDR_VEC_ALIGN): Likewise.
20168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20169 Alan Hayward <alan.hayward@arm.com>
20170 David Sherwood <david.sherwood@arm.com>
20172 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20174 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20175 or if measurement_type is polynomial.
20176 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20177 * combine.c (make_extraction): Likewise.
20178 * dse.c (find_shift_sequence): Likewise.
20179 * dwarf2out.c (mem_loc_descriptor): Likewise.
20180 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20181 (extract_bit_field, extract_low_bits): Likewise.
20182 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20183 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20184 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20185 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20186 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20187 * reload.c (find_reloads): Likewise.
20188 * reload1.c (alter_reg): Likewise.
20189 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20190 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20191 * tree-if-conv.c (predicate_mem_writes): Likewise.
20192 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20193 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20194 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20195 * valtrack.c (dead_debug_insert_temp): Likewise.
20196 * varasm.c (mergeable_constant_section): Likewise.
20197 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20200 Alan Hayward <alan.hayward@arm.com>
20201 David Sherwood <david.sherwood@arm.com>
20203 * expr.c (expand_assignment): Cope with polynomial mode sizes
20204 when assigning to a CONCAT.
20206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20207 Alan Hayward <alan.hayward@arm.com>
20208 David Sherwood <david.sherwood@arm.com>
20210 * machmode.h (mode_precision): Change from unsigned short to
20212 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20214 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20215 or if measurement_type is not polynomial.
20216 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20217 in which the mode is already known to be a scalar_int_mode.
20218 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20219 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20221 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20222 for GET_MODE_PRECISION.
20223 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20224 for GET_MODE_PRECISION.
20225 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20227 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20228 (expand_field_assignment, make_extraction): Likewise.
20229 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20230 (get_last_value): Likewise.
20231 * convert.c (convert_to_integer_1): Likewise.
20232 * cse.c (cse_insn): Likewise.
20233 * expr.c (expand_expr_real_1): Likewise.
20234 * lra-constraints.c (simplify_operand_subreg): Likewise.
20235 * optabs-query.c (can_atomic_load_p): Likewise.
20236 * optabs.c (expand_atomic_load): Likewise.
20237 (expand_atomic_store): Likewise.
20238 * ree.c (combine_reaching_defs): Likewise.
20239 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20240 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20241 * tree.h (type_has_mode_precision_p): Likewise.
20242 * ubsan.c (instrument_si_overflow): Likewise.
20244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20245 Alan Hayward <alan.hayward@arm.com>
20246 David Sherwood <david.sherwood@arm.com>
20248 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20249 polynomial numbers of units.
20250 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20251 (valid_vector_subparts_p): New function.
20252 (build_vector_type): Remove temporary shim and take the number
20253 of units as a poly_uint64 rather than an int.
20254 (build_opaque_vector_type): Take the number of units as a
20255 poly_uint64 rather than an int.
20256 * tree.c (build_vector_from_ctor): Handle polynomial
20257 TYPE_VECTOR_SUBPARTS.
20258 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20259 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20260 (build_vector_from_val): If the number of units is variable,
20261 use build_vec_duplicate_cst for constant operands and
20262 VEC_DUPLICATE_EXPR otherwise.
20263 (make_vector_type): Remove temporary is_constant ().
20264 (build_vector_type, build_opaque_vector_type): Take the number of
20265 units as a poly_uint64 rather than an int.
20266 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20268 * cfgexpand.c (expand_debug_expr): Likewise.
20269 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20270 (store_constructor, expand_expr_real_1): Likewise.
20271 (const_scalar_mask_from_tree): Likewise.
20272 * fold-const-call.c (fold_const_reduction): Likewise.
20273 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20274 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20275 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20276 (fold_relational_const): Likewise.
20277 (native_interpret_vector): Likewise. Change the size from an
20278 int to an unsigned int.
20279 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20280 TYPE_VECTOR_SUBPARTS.
20281 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20282 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20283 duplicating a non-constant operand into a variable-length vector.
20284 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20285 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20286 * ipa-icf.c (sem_variable::equals): Likewise.
20287 * match.pd: Likewise.
20288 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20289 * print-tree.c (print_node): Likewise.
20290 * stor-layout.c (layout_type): Likewise.
20291 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20292 * tree-cfg.c (verify_gimple_comparison): Likewise.
20293 (verify_gimple_assign_binary): Likewise.
20294 (verify_gimple_assign_ternary): Likewise.
20295 (verify_gimple_assign_single): Likewise.
20296 * tree-pretty-print.c (dump_generic_node): Likewise.
20297 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20298 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20299 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20300 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20301 (vect_shift_permute_load_chain): Likewise.
20302 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20303 (expand_vector_condition, optimize_vector_constructor): Likewise.
20304 (lower_vec_perm, get_compute_type): Likewise.
20305 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20306 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20307 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20308 (vect_recog_mask_conversion_pattern): Likewise.
20309 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20310 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20311 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20312 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20313 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20314 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20315 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20316 (supportable_widening_operation): Likewise.
20317 (supportable_narrowing_operation): Likewise.
20318 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20320 * varasm.c (output_constant): Likewise.
20322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20323 Alan Hayward <alan.hayward@arm.com>
20324 David Sherwood <david.sherwood@arm.com>
20326 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20327 so that both the length == 3 and length != 3 cases set up their
20328 own permute vectors. Add comments explaining why we know the
20329 number of elements is constant.
20330 (vect_permute_load_chain): Likewise.
20332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20333 Alan Hayward <alan.hayward@arm.com>
20334 David Sherwood <david.sherwood@arm.com>
20336 * machmode.h (mode_nunits): Change from unsigned char to
20338 (ONLY_FIXED_SIZE_MODES): New macro.
20339 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20340 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20341 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20343 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20344 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20345 or if measurement_type is not polynomial.
20346 * genmodes.c (ZERO_COEFFS): New macro.
20347 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20349 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20350 Use ZERO_COEFFS when emitting initializers.
20351 * data-streamer.h (bp_pack_poly_value): New function.
20352 (bp_unpack_poly_value): Likewise.
20353 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20354 for GET_MODE_NUNITS.
20355 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20356 for GET_MODE_NUNITS.
20357 * tree.c (make_vector_type): Remove temporary shim and make
20358 the real function take the number of units as a poly_uint64
20359 rather than an int.
20360 (build_vector_type_for_mode): Handle polynomial nunits.
20361 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20362 * emit-rtl.c (const_vec_series_p_1): Likewise.
20363 (gen_rtx_CONST_VECTOR): Likewise.
20364 * fold-const.c (test_vec_duplicate_folding): Likewise.
20365 * genrecog.c (validate_pattern): Likewise.
20366 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20367 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20368 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20369 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20370 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20371 * rtlanal.c (subreg_get_info): Likewise.
20372 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20373 (vect_grouped_load_supported): Likewise.
20374 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20375 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20376 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20377 (simplify_const_unary_operation, simplify_binary_operation_1)
20378 (simplify_const_binary_operation, simplify_ternary_operation)
20379 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20380 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20381 instead of CONST_VECTOR_NUNITS.
20382 * varasm.c (output_constant_pool_2): Likewise.
20383 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20384 explicit-encoded elements in the XVEC for variable-length vectors.
20386 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20388 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20391 Alan Hayward <alan.hayward@arm.com>
20392 David Sherwood <david.sherwood@arm.com>
20394 * coretypes.h (fixed_size_mode): Declare.
20395 (fixed_size_mode_pod): New typedef.
20396 * builtins.h (target_builtins::x_apply_args_mode)
20397 (target_builtins::x_apply_result_mode): Change type to
20398 fixed_size_mode_pod.
20399 * builtins.c (apply_args_size, apply_result_size, result_vector)
20400 (expand_builtin_apply_args_1, expand_builtin_apply)
20401 (expand_builtin_return): Update accordingly.
20403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20405 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20406 * cselib.c (cselib_hash_rtx): Likewise.
20407 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20408 CONST_VECTOR encoding.
20410 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20411 Jeff Law <law@redhat.com>
20414 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20415 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20416 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20417 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20420 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20421 explicitly probe *sp in a noreturn function if there were any callee
20422 register saves or frame pointer is needed.
20424 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20427 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20428 BLKmode for ternary, binary or unary expressions.
20431 * var-tracking.c (delete_vta_debug_insn): New inline function.
20432 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20433 insns from get_insns () to NULL instead of each bb separately.
20434 Use delete_vta_debug_insn. No longer static.
20435 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20436 delete_vta_debug_insns callers.
20437 * rtl.h (delete_vta_debug_insns): Declare.
20438 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20439 instead of variable_tracking_main.
20441 2018-01-03 Martin Sebor <msebor@redhat.com>
20443 PR tree-optimization/83603
20444 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20445 arguments past the endof the argument list in functions declared
20446 without a prototype.
20447 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20448 Avoid checking when arguments are null.
20450 2018-01-03 Martin Sebor <msebor@redhat.com>
20453 * doc/extend.texi (attribute const): Fix a typo.
20454 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20455 issuing -Wsuggest-attribute for void functions.
20457 2018-01-03 Martin Sebor <msebor@redhat.com>
20459 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20460 offset_int::from instead of wide_int::to_shwi.
20461 (maybe_diag_overlap): Remove assertion.
20462 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20463 * gimple-ssa-sprintf.c (format_directive): Same.
20464 (parse_directive): Same.
20465 (sprintf_dom_walker::compute_format_length): Same.
20466 (try_substitute_return_value): Same.
20468 2018-01-03 Jeff Law <law@redhat.com>
20470 PR middle-end/83654
20471 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20472 non-constant residual for zero at runtime and avoid probing in
20473 that case. Reorganize code for trailing problem to mirror handling
20476 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20478 PR tree-optimization/83501
20479 * tree-ssa-strlen.c (get_string_cst): New.
20480 (handle_char_store): Call get_string_cst.
20482 2018-01-03 Martin Liska <mliska@suse.cz>
20484 PR tree-optimization/83593
20485 * tree-ssa-strlen.c: Include tree-cfg.h.
20486 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20487 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20488 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20490 (strlen_dom_walker::before_dom_children): Call
20491 gimple_purge_dead_eh_edges. Dump tranformation with details
20493 (strlen_dom_walker::before_dom_children): Update call by adding
20494 new argument cleanup_eh.
20495 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20497 2018-01-03 Martin Liska <mliska@suse.cz>
20500 * cif-code.def (VARIADIC_THUNK): New enum value.
20501 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20504 2018-01-03 Jan Beulich <jbeulich@suse.com>
20506 * sse.md (mov<mode>_internal): Tighten condition for when to use
20507 vmovdqu<ssescalarsize> for TI and OI modes.
20509 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20511 Update copyright years.
20513 2018-01-03 Martin Liska <mliska@suse.cz>
20516 * ipa-visibility.c (function_and_variable_visibility): Skip
20517 functions with noipa attribure.
20519 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20521 * gcc.c (process_command): Update copyright notice dates.
20522 * gcov-dump.c (print_version): Ditto.
20523 * gcov.c (print_version): Ditto.
20524 * gcov-tool.c (print_version): Ditto.
20525 * gengtype.c (create_file): Ditto.
20526 * doc/cpp.texi: Bump @copying's copyright year.
20527 * doc/cppinternals.texi: Ditto.
20528 * doc/gcc.texi: Ditto.
20529 * doc/gccint.texi: Ditto.
20530 * doc/gcov.texi: Ditto.
20531 * doc/install.texi: Ditto.
20532 * doc/invoke.texi: Ditto.
20534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20536 * vector-builder.h (vector_builder::m_full_nelts): Change from
20537 unsigned int to poly_uint64.
20538 (vector_builder::full_nelts): Update prototype accordingly.
20539 (vector_builder::new_vector): Likewise.
20540 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20541 (vector_builder::operator ==): Likewise.
20542 (vector_builder::finalize): Likewise.
20543 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20544 Take the number of elements as a poly_uint64 rather than an
20546 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20547 from unsigned int to poly_uint64.
20548 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20549 (vec_perm_indices::new_vector): Likewise.
20550 (vec_perm_indices::length): Likewise.
20551 (vec_perm_indices::nelts_per_input): Likewise.
20552 (vec_perm_indices::input_nelts): Likewise.
20553 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20554 number of elements per input as a poly_uint64 rather than an
20555 unsigned int. Use the original encoding for variable-length
20556 vectors, rather than clamping each individual element.
20557 For the second and subsequent elements in each pattern,
20558 clamp the step and base before clamping their sum.
20559 (vec_perm_indices::series_p): Handle polynomial element counts.
20560 (vec_perm_indices::all_in_range_p): Likewise.
20561 (vec_perm_indices_to_tree): Likewise.
20562 (vec_perm_indices_to_rtx): Likewise.
20563 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20564 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20565 (tree_vector_builder::new_binary_operation): Handle polynomial
20566 element counts. Return false if we need to know the number
20567 of elements at compile time.
20568 * fold-const.c (fold_vec_perm): Punt if the number of elements
20569 isn't known at compile time.
20571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20573 * vec-perm-indices.h (vec_perm_builder): Change element type
20574 from HOST_WIDE_INT to poly_int64.
20575 (vec_perm_indices::element_type): Update accordingly.
20576 (vec_perm_indices::clamp): Handle polynomial element_types.
20577 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20578 (vec_perm_indices::all_in_range_p): Likewise.
20579 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20581 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20582 polynomial vec_perm_indices element types.
20583 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20584 * fold-const.c (fold_vec_perm): Likewise.
20585 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20586 * tree-vect-generic.c (lower_vec_perm): Likewise.
20587 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20588 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20589 element type to 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 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20596 rather than an int. Use plus_constant.
20597 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20598 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20600 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20601 Alan Hayward <alan.hayward@arm.com>
20602 David Sherwood <david.sherwood@arm.com>
20604 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20605 a HOST_WIDE_INT to a poly_int64.
20607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20608 Alan Hayward <alan.hayward@arm.com>
20609 David Sherwood <david.sherwood@arm.com>
20611 * calls.c (load_register_parameters): Cope with polynomial
20612 mode sizes. Require a constant size for BLKmode parameters
20613 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20614 forces a parameter to be padded at the lsb end in order to
20615 fill a complete number of words, require the parameter size
20616 to be ordered wrt UNITS_PER_WORD.
20618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20619 Alan Hayward <alan.hayward@arm.com>
20620 David Sherwood <david.sherwood@arm.com>
20622 * reload1.c (spill_stack_slot_width): Change element type
20623 from unsigned int to poly_uint64_pod.
20624 (alter_reg): Treat mode sizes as polynomial.
20626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20627 Alan Hayward <alan.hayward@arm.com>
20628 David Sherwood <david.sherwood@arm.com>
20630 * reload.c (complex_word_subreg_p): New function.
20631 (reload_inner_reg_of_subreg, push_reload): Use it.
20633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20634 Alan Hayward <alan.hayward@arm.com>
20635 David Sherwood <david.sherwood@arm.com>
20637 * lra-constraints.c (process_alt_operands): Reject matched
20638 operands whose sizes aren't ordered.
20639 (match_reload): Refer to this check here.
20641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20642 Alan Hayward <alan.hayward@arm.com>
20643 David Sherwood <david.sherwood@arm.com>
20645 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20646 that the mode size is in the set {1, 2, 4, 8, 16}.
20648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20649 Alan Hayward <alan.hayward@arm.com>
20650 David Sherwood <david.sherwood@arm.com>
20652 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20653 Use plus_constant instead of gen_rtx_PLUS.
20655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20656 Alan Hayward <alan.hayward@arm.com>
20657 David Sherwood <david.sherwood@arm.com>
20659 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20660 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20661 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20662 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20663 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20664 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20665 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20666 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20667 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20668 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20670 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20671 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20672 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20673 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20674 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20675 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20676 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20677 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20678 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20679 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20681 * expr.c (emit_move_resolve_push): Treat the input and result
20682 of PUSH_ROUNDING as a poly_int64.
20683 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20684 (emit_push_insn): Likewise.
20685 * lra-eliminations.c (mark_not_eliminable): Likewise.
20686 * recog.c (push_operand): Likewise.
20687 * reload1.c (elimination_effects): Likewise.
20688 * rtlanal.c (nonzero_bits1): Likewise.
20689 * calls.c (store_one_arg): Likewise. Require the padding to be
20690 known at compile time.
20692 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20693 Alan Hayward <alan.hayward@arm.com>
20694 David Sherwood <david.sherwood@arm.com>
20696 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20697 Use plus_constant instead of gen_rtx_PLUS.
20699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20700 Alan Hayward <alan.hayward@arm.com>
20701 David Sherwood <david.sherwood@arm.com>
20703 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20704 rather than an int.
20706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20707 Alan Hayward <alan.hayward@arm.com>
20708 David Sherwood <david.sherwood@arm.com>
20710 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20711 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20712 via stack temporaries. Treat the mode size as polynomial 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 * expr.c (expand_expr_real_2): When handling conversions involving
20719 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20720 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20721 as a poly_uint64 too.
20723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20724 Alan Hayward <alan.hayward@arm.com>
20725 David Sherwood <david.sherwood@arm.com>
20727 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20730 Alan Hayward <alan.hayward@arm.com>
20731 David Sherwood <david.sherwood@arm.com>
20733 * combine.c (can_change_dest_mode): Handle polynomial
20734 REGMODE_NATURAL_SIZE.
20735 * expmed.c (store_bit_field_1): Likewise.
20736 * expr.c (store_constructor): Likewise.
20737 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20738 and polynomial REGMODE_NATURAL_SIZE.
20739 (gen_lowpart_common): Likewise.
20740 * reginfo.c (record_subregs_of_mode): Likewise.
20741 * rtlanal.c (read_modify_subreg_p): Likewise.
20743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20744 Alan Hayward <alan.hayward@arm.com>
20745 David Sherwood <david.sherwood@arm.com>
20747 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20748 numbers of elements.
20750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20751 Alan Hayward <alan.hayward@arm.com>
20752 David Sherwood <david.sherwood@arm.com>
20754 * match.pd: Cope with polynomial numbers of vector elements.
20756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20757 Alan Hayward <alan.hayward@arm.com>
20758 David Sherwood <david.sherwood@arm.com>
20760 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20761 in a POINTER_PLUS_EXPR.
20763 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20764 Alan Hayward <alan.hayward@arm.com>
20765 David Sherwood <david.sherwood@arm.com>
20767 * omp-simd-clone.c (simd_clone_subparts): New function.
20768 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20769 (ipa_simd_modify_function_body): Likewise.
20771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20772 Alan Hayward <alan.hayward@arm.com>
20773 David Sherwood <david.sherwood@arm.com>
20775 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20776 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20777 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20778 (expand_vector_condition, vector_element): Likewise.
20779 (subparts_gt): New function.
20780 (get_compute_type): Use subparts_gt.
20781 (count_type_subparts): Delete.
20782 (expand_vector_operations_1): Use subparts_gt instead of
20783 count_type_subparts.
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-data-refs.c (vect_no_alias_p): Replace with...
20790 (vect_compile_time_alias): ...this new function. Do the calculation
20791 on poly_ints rather than trees.
20792 (vect_prune_runtime_alias_test_list): Update call accordingly.
20794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20795 Alan Hayward <alan.hayward@arm.com>
20796 David Sherwood <david.sherwood@arm.com>
20798 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20800 (vect_schedule_slp_instance): Likewise.
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-slp.c (vect_get_and_check_slp_defs): Reject
20807 constant and extern definitions for variable-length vectors.
20808 (vect_get_constant_vectors): Note that the number of units
20809 is known to be constant.
20811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20812 Alan Hayward <alan.hayward@arm.com>
20813 David Sherwood <david.sherwood@arm.com>
20815 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20816 of units as polynomial. Choose between WIDE and NARROW based
20819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20820 Alan Hayward <alan.hayward@arm.com>
20821 David Sherwood <david.sherwood@arm.com>
20823 * tree-vect-stmts.c (simd_clone_subparts): New function.
20824 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20826 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20827 Alan Hayward <alan.hayward@arm.com>
20828 David Sherwood <david.sherwood@arm.com>
20830 * tree-vect-stmts.c (vectorizable_call): Treat the number of
20831 vectors as polynomial. Use build_index_vector for
20832 IFN_GOMP_SIMD_LANE.
20834 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20835 Alan Hayward <alan.hayward@arm.com>
20836 David Sherwood <david.sherwood@arm.com>
20838 * tree-vect-stmts.c (get_load_store_type): Treat the number of
20839 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20840 for variable-length vectors.
20841 (vectorizable_mask_load_store): Treat the number of units as
20842 polynomial, asserting that it is constant if the condition has
20843 already been enforced.
20844 (vectorizable_store, vectorizable_load): Likewise.
20846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20847 Alan Hayward <alan.hayward@arm.com>
20848 David Sherwood <david.sherwood@arm.com>
20850 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20851 of units as polynomial. Punt if we can't tell at compile time
20852 which vector contains the final result.
20854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20855 Alan Hayward <alan.hayward@arm.com>
20856 David Sherwood <david.sherwood@arm.com>
20858 * tree-vect-loop.c (vectorizable_induction): Treat the number
20859 of units as polynomial. Punt on SLP inductions. Use an integer
20860 VEC_SERIES_EXPR for variable-length integer reductions. Use a
20861 cast of such a series for variable-length floating-point
20864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20865 Alan Hayward <alan.hayward@arm.com>
20866 David Sherwood <david.sherwood@arm.com>
20868 * tree.h (build_index_vector): Declare.
20869 * tree.c (build_index_vector): New function.
20870 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20871 of units as polynomial, forcibly converting it to a constant if
20872 vectorizable_reduction has already enforced the condition.
20873 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
20874 to create a {1,2,3,...} vector.
20875 (vectorizable_reduction): Treat the number of units as polynomial.
20876 Choose vectype_in based on the largest scalar element size rather
20877 than the smallest number of units. Enforce the restrictions
20880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20881 Alan Hayward <alan.hayward@arm.com>
20882 David Sherwood <david.sherwood@arm.com>
20884 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20885 number of units as polynomial.
20887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20888 Alan Hayward <alan.hayward@arm.com>
20889 David Sherwood <david.sherwood@arm.com>
20891 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20892 * target.def (autovectorize_vector_sizes): Return the vector sizes
20893 by pointer, using vector_sizes rather than a bitmask.
20894 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20895 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20896 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20898 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20899 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20900 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20901 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20902 * omp-general.c (omp_max_vf): Likewise.
20903 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20904 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20905 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20906 * tree-vect-slp.c (vect_slp_bb): Likewise.
20907 * doc/tm.texi: Regenerate.
20908 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20910 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20911 the vector size as a poly_uint64 rather than an unsigned int.
20912 (current_vector_size): Change from an unsigned int to a poly_uint64.
20913 (get_vectype_for_scalar_type): Update accordingly.
20914 * tree.h (build_truth_vector_type): Take the size and number of
20915 units as a poly_uint64 rather than an unsigned int.
20916 (build_vector_type): Add a temporary overload that takes
20917 the number of units as a poly_uint64 rather than an unsigned int.
20918 * tree.c (make_vector_type): Likewise.
20919 (build_truth_vector_type): Take the number of units as a poly_uint64
20920 rather than an unsigned int.
20922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20923 Alan Hayward <alan.hayward@arm.com>
20924 David Sherwood <david.sherwood@arm.com>
20926 * target.def (get_mask_mode): Take the number of units and length
20927 as poly_uint64s rather than unsigned ints.
20928 * targhooks.h (default_get_mask_mode): Update accordingly.
20929 * targhooks.c (default_get_mask_mode): Likewise.
20930 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20931 * doc/tm.texi: Regenerate.
20933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20934 Alan Hayward <alan.hayward@arm.com>
20935 David Sherwood <david.sherwood@arm.com>
20937 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20938 * omp-general.c (omp_max_vf): Likewise.
20939 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20940 (expand_omp_simd): Handle polynomial safelen.
20941 * omp-low.c (omplow_simd_context): Add a default constructor.
20942 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20943 (lower_rec_simd_input_clauses): Update accordingly.
20944 (lower_rec_input_clauses): Likewise.
20946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20947 Alan Hayward <alan.hayward@arm.com>
20948 David Sherwood <david.sherwood@arm.com>
20950 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20951 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20952 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20953 (vect_analyze_slp_cost): Likewise.
20954 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20955 (vect_model_load_cost): Likewise.
20957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20958 Alan Hayward <alan.hayward@arm.com>
20959 David Sherwood <david.sherwood@arm.com>
20961 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20962 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20963 from an unsigned int * to a poly_uint64_pod *.
20964 (calculate_unrolling_factor): New function.
20965 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20968 Alan Hayward <alan.hayward@arm.com>
20969 David Sherwood <david.sherwood@arm.com>
20971 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20972 from an unsigned int to a poly_uint64.
20973 (_loop_vec_info::slp_unrolling_factor): Likewise.
20974 (_loop_vec_info::vectorization_factor): Change from an int
20976 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20977 (vect_get_num_vectors): New function.
20978 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20979 (vect_get_num_copies): Use vect_get_num_vectors.
20980 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20981 to an unsigned int *.
20982 (vect_analyze_data_refs): Change min_vf from an int * to a
20984 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20985 than an unsigned HOST_WIDE_INT.
20986 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20987 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20988 to an unsigned int *.
20989 (vect_analyze_data_ref_dependences): Likewise.
20990 (vect_compute_data_ref_alignment): Handle polynomial vf.
20991 (vect_enhance_data_refs_alignment): Likewise.
20992 (vect_prune_runtime_alias_test_list): Likewise.
20993 (vect_shift_permute_load_chain): Likewise.
20994 (vect_supportable_dr_alignment): Likewise.
20995 (dependence_distance_ge_vf): Take the vectorization factor as a
20996 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20997 (vect_analyze_data_refs): Change min_vf from an int * to a
20999 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21000 vfm1 as a poly_uint64 rather than an int. Make the same change
21001 for the returned bound_scalar.
21002 (vect_gen_vector_loop_niters): Handle polynomial vf.
21003 (vect_do_peeling): Likewise. Update call to
21004 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21005 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21007 * tree-vect-loop.c (vect_determine_vectorization_factor)
21008 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21009 (vect_get_known_peeling_cost): Likewise.
21010 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21011 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21012 (vect_transform_loop): Likewise. Use the lowest possible VF when
21013 updating the upper bounds of the loop.
21014 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21015 rather than an int.
21016 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21017 polynomial unroll factors.
21018 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21019 (vect_make_slp_decision): Likewise.
21020 (vect_supported_load_permutation_p): Likewise, and polynomial
21022 (vect_analyze_slp_cost): Handle polynomial vf.
21023 (vect_slp_analyze_node_operations): Likewise.
21024 (vect_slp_analyze_bb_1): Likewise.
21025 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21026 than an unsigned HOST_WIDE_INT.
21027 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21028 (vectorizable_load): Handle polynomial vf.
21029 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21031 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21033 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21034 Alan Hayward <alan.hayward@arm.com>
21035 David Sherwood <david.sherwood@arm.com>
21037 * match.pd: Handle bit operations involving three constants
21038 and try to fold one pair.
21040 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21042 * tree-vect-loop-manip.c: Include gimple-fold.h.
21043 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21044 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21045 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21046 Add a path that uses a step of VF instead of 1, but disable it
21048 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21049 and niters_no_overflow parameters. Update calls to
21050 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21051 Create a new SSA name if the latter choses to use a ste other
21052 than zero, and return it via niters_vector_mult_vf_var.
21053 * tree-vect-loop.c (vect_transform_loop): Update calls to
21054 vect_do_peeling, vect_gen_vector_loop_niters and
21055 slpeel_make_loop_iterate_ntimes.
21056 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21057 (vect_gen_vector_loop_niters): Update declarations after above changes.
21059 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21061 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21062 128-bit round to integer instructions.
21063 (ceil<mode>2): Likewise.
21064 (btrunc<mode>2): Likewise.
21065 (round<mode>2): Likewise.
21067 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21069 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21070 unaligned VSX load/store on P8/P9.
21071 (expand_block_clear): Allow the use of unaligned VSX
21072 load/store on P8/P9.
21074 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21076 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21078 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21079 swap associated with both a load and a store.
21081 2018-01-02 Andrew Waterman <andrew@sifive.com>
21083 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21084 * config/riscv/riscv.md (clear_cache): Use it.
21086 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21088 * web.c: Remove out-of-date comment.
21090 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21092 * expr.c (fixup_args_size_notes): Check that any existing
21093 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21094 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21095 (emit_single_push_insn): ...here.
21097 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21099 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21100 (const_vector_encoded_nelts): New function.
21101 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21102 (const_vector_int_elt, const_vector_elt): Declare.
21103 * emit-rtl.c (const_vector_int_elt_1): New function.
21104 (const_vector_elt): Likewise.
21105 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21106 of CONST_VECTOR_ELT.
21108 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21110 * expr.c: Include rtx-vector-builder.h.
21111 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21112 directly on the tree encoding.
21113 (const_vector_from_tree): Likewise.
21114 * optabs.c: Include rtx-vector-builder.h.
21115 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21116 sequence of "u" values.
21117 * vec-perm-indices.c: Include rtx-vector-builder.h.
21118 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21119 directly on the vec_perm_indices encoding.
21121 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21123 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21124 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21125 * rtx-vector-builder.h: New file.
21126 * rtx-vector-builder.c: Likewise.
21127 * rtl.h (rtx_def::u2): Add a const_vector field.
21128 (CONST_VECTOR_NPATTERNS): New macro.
21129 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21130 (CONST_VECTOR_DUPLICATE_P): Likewise.
21131 (CONST_VECTOR_STEPPED_P): Likewise.
21132 (CONST_VECTOR_ENCODED_ELT): Likewise.
21133 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21134 (unwrap_const_vec_duplicate): Likewise.
21135 (const_vec_series_p): Check for a non-duplicated vector encoding.
21136 Say that the function only returns true for integer vectors.
21137 * emit-rtl.c: Include rtx-vector-builder.h.
21138 (gen_const_vec_duplicate_1): Delete.
21139 (gen_const_vector): Call gen_const_vec_duplicate instead of
21140 gen_const_vec_duplicate_1.
21141 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21142 (gen_const_vec_duplicate): Use rtx_vector_builder.
21143 (gen_const_vec_series): Likewise.
21144 (gen_rtx_CONST_VECTOR): Likewise.
21145 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21146 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21147 Build a new vector rather than modifying a CONST_VECTOR in-place.
21148 (handle_special_swappables): Update call accordingly.
21149 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21150 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21151 Build a new vector rather than modifying a CONST_VECTOR in-place.
21152 (handle_special_swappables): Update call accordingly.
21154 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21156 * simplify-rtx.c (simplify_const_binary_operation): Use
21157 CONST_VECTOR_ELT instead of XVECEXP.
21159 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21161 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21162 the selector elements to be different from the data elements
21163 if the selector is a VECTOR_CST.
21164 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21165 ssizetype for the selector.
21167 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21169 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21170 before testing each element individually.
21171 * tree-vect-generic.c (lower_vec_perm): Likewise.
21173 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21175 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21176 * selftest-run-tests.c (selftest::run_tests): Call it.
21177 * vector-builder.h (vector_builder::operator ==): New function.
21178 (vector_builder::operator !=): Likewise.
21179 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21180 (vec_perm_indices::all_from_input_p): New function.
21181 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21182 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21183 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21184 instead of reading the VECTOR_CST directly. Detect whether both
21185 vector inputs are the same before constructing the vec_perm_indices,
21186 and update the number of inputs argument accordingly. Use the
21187 utility functions added above. Only construct sel2 if we need to.
21189 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21191 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21192 the broadcast of the low byte.
21193 (expand_mult_highpart): Use an explicit encoding for the permutes.
21194 * optabs-query.c (can_mult_highpart_p): Likewise.
21195 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21196 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21197 (vectorizable_bswap): Likewise.
21198 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21199 explicit encoding for the power-of-2 permutes.
21200 (vect_permute_store_chain): Likewise.
21201 (vect_grouped_load_supported): Likewise.
21202 (vect_permute_load_chain): Likewise.
21204 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21206 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21207 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21208 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21209 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21210 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21211 (vect_gen_perm_mask_any): Likewise.
21213 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21215 * int-vector-builder.h: New file.
21216 * vec-perm-indices.h: Include int-vector-builder.h.
21217 (vec_perm_indices): Redefine as an int_vector_builder.
21218 (auto_vec_perm_indices): Delete.
21219 (vec_perm_builder): Redefine as a stand-alone class.
21220 (vec_perm_indices::vec_perm_indices): New function.
21221 (vec_perm_indices::clamp): Likewise.
21222 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21223 (vec_perm_indices::new_vector): New function.
21224 (vec_perm_indices::new_expanded_vector): Update for new
21225 vec_perm_indices class.
21226 (vec_perm_indices::rotate_inputs): New function.
21227 (vec_perm_indices::all_in_range_p): Operate directly on the
21228 encoded form, without computing elided elements.
21229 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21230 encoding. Update for new vec_perm_indices class.
21231 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21232 the given vec_perm_builder.
21233 (expand_vec_perm_var): Update vec_perm_builder constructor.
21234 (expand_mult_highpart): Use vec_perm_builder instead of
21235 auto_vec_perm_indices.
21236 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21237 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21238 or double series encoding as appropriate.
21239 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21240 vec_perm_indices instead of auto_vec_perm_indices.
21241 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21242 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21243 (vect_permute_store_chain): Likewise.
21244 (vect_grouped_load_supported): Likewise.
21245 (vect_permute_load_chain): Likewise.
21246 (vect_shift_permute_load_chain): Likewise.
21247 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21248 (vect_transform_slp_perm_load): Likewise.
21249 (vect_schedule_slp_instance): Likewise.
21250 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21251 (vectorizable_mask_load_store): Likewise.
21252 (vectorizable_bswap): Likewise.
21253 (vectorizable_store): Likewise.
21254 (vectorizable_load): Likewise.
21255 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21256 vec_perm_indices instead of auto_vec_perm_indices. Use
21257 tree_to_vec_perm_builder to read the vector from a tree.
21258 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21259 vec_perm_builder instead of a vec_perm_indices.
21260 (have_whole_vector_shift): Use vec_perm_builder and
21261 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21262 truncation to calc_vec_perm_mask_for_shift.
21263 (vect_create_epilog_for_reduction): Likewise.
21264 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21265 from auto_vec_perm_indices to vec_perm_indices.
21266 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21267 instead of changing individual elements.
21268 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21269 the vector in d.perm.
21270 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21271 from auto_vec_perm_indices to vec_perm_indices.
21272 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21273 instead of changing individual elements.
21274 (arm_vectorize_vec_perm_const): Use new_vector to install
21275 the vector in d.perm.
21276 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21277 Update vec_perm_builder constructor.
21278 (rs6000_expand_interleave): Likewise.
21279 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21280 (rs6000_expand_interleave): Likewise.
21282 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21284 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21285 to qimode could truncate the indices.
21286 * optabs.c (expand_vec_perm_var): Likewise.
21288 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21290 * Makefile.in (OBJS): Add vec-perm-indices.o.
21291 * vec-perm-indices.h: New file.
21292 * vec-perm-indices.c: Likewise.
21293 * target.h (vec_perm_indices): Replace with a forward class
21295 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21296 * optabs.h: Include vec-perm-indices.h.
21297 (expand_vec_perm): Delete.
21298 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21299 (expand_vec_perm_const): Declare.
21300 * target.def (vec_perm_const_ok): Replace with...
21301 (vec_perm_const): ...this new hook.
21302 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21303 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21304 * doc/tm.texi: Regenerate.
21305 * optabs.def (vec_perm_const): Delete.
21306 * doc/md.texi (vec_perm_const): Likewise.
21307 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21308 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21309 expand_vec_perm for constant permutation vectors. Assert that
21310 the mode of variable permutation vectors is the integer equivalent
21311 of the mode that is being permuted.
21312 * optabs-query.h (selector_fits_mode_p): Declare.
21313 * optabs-query.c: Include vec-perm-indices.h.
21314 (selector_fits_mode_p): New function.
21315 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21316 is defined, instead of checking whether the vec_perm_const_optab
21317 exists. Use targetm.vectorize.vec_perm_const instead of
21318 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21319 fit in the vector mode before using a variable permute.
21320 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21321 vec_perm_indices instead of an rtx.
21322 (expand_vec_perm): Replace with...
21323 (expand_vec_perm_const): ...this new function. Take the selector
21324 as a vec_perm_indices rather than an rtx. Also take the mode of
21325 the selector. Update call to shift_amt_for_vec_perm_mask.
21326 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21327 Use vec_perm_indices::new_expanded_vector to expand the original
21328 selector into bytes. Check whether the indices fit in the vector
21329 mode before using a variable permute.
21330 (expand_vec_perm_var): Make global.
21331 (expand_mult_highpart): Use expand_vec_perm_const.
21332 * fold-const.c: Includes vec-perm-indices.h.
21333 * tree-ssa-forwprop.c: Likewise.
21334 * tree-vect-data-refs.c: Likewise.
21335 * tree-vect-generic.c: Likewise.
21336 * tree-vect-loop.c: Likewise.
21337 * tree-vect-slp.c: Likewise.
21338 * tree-vect-stmts.c: Likewise.
21339 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21341 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21342 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21343 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21344 (aarch64_vectorize_vec_perm_const): ...this new function.
21345 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21346 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21347 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21348 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21349 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21350 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21351 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21353 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21354 check for NEON modes.
21355 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21356 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21357 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21358 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21360 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21361 the old VEC_PERM_CONST conditions.
21362 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21363 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21364 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21365 (ia64_vectorize_vec_perm_const_ok): Merge into...
21366 (ia64_vectorize_vec_perm_const): ...this new function.
21367 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21368 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21369 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21370 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21371 * config/mips/mips.c (mips_expand_vec_perm_const)
21372 (mips_vectorize_vec_perm_const_ok): Merge into...
21373 (mips_vectorize_vec_perm_const): ...this new function.
21374 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21375 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21376 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21377 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21378 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21379 (rs6000_expand_vec_perm_const): Delete.
21380 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21382 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21383 (altivec_expand_vec_perm_const_le): Take each operand individually.
21384 Operate on constant selectors rather than rtxes.
21385 (altivec_expand_vec_perm_const): Likewise. Update call to
21386 altivec_expand_vec_perm_const_le.
21387 (rs6000_expand_vec_perm_const): Delete.
21388 (rs6000_vectorize_vec_perm_const_ok): Delete.
21389 (rs6000_vectorize_vec_perm_const): New function.
21390 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21391 an element count and rtx array.
21392 (rs6000_expand_extract_even): Update call accordingly.
21393 (rs6000_expand_interleave): Likewise.
21394 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21395 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21396 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21397 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21398 (rs6000_expand_vec_perm_const): Delete.
21399 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21400 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21401 (altivec_expand_vec_perm_const_le): Take each operand individually.
21402 Operate on constant selectors rather than rtxes.
21403 (altivec_expand_vec_perm_const): Likewise. Update call to
21404 altivec_expand_vec_perm_const_le.
21405 (rs6000_expand_vec_perm_const): Delete.
21406 (rs6000_vectorize_vec_perm_const_ok): Delete.
21407 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21408 reference to the SPE evmerge intructions.
21409 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21410 an element count and rtx array.
21411 (rs6000_expand_extract_even): Update call accordingly.
21412 (rs6000_expand_interleave): Likewise.
21413 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21414 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21416 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21418 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21420 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21421 vector mode and that that mode matches the mode of the data
21423 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21424 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21425 directly using expand_vec_perm_1 when forcing selectors into
21427 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21429 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21431 * optabs-query.h (can_vec_perm_p): Delete.
21432 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21433 * optabs-query.c (can_vec_perm_p): Split into...
21434 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21435 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21436 particular selector is valid.
21437 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21438 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21439 (vect_grouped_load_supported): Likewise.
21440 (vect_shift_permute_load_chain): Likewise.
21441 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21442 (vect_transform_slp_perm_load): Likewise.
21443 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21444 (vectorizable_bswap): Likewise.
21445 (vect_gen_perm_mask_checked): Likewise.
21446 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21447 implementations of variable permutation vectors into account
21448 when deciding which selector to use.
21449 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21450 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21451 with a false third argument.
21452 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21453 to test whether the constant selector is valid and can_vec_perm_var_p
21454 to test whether a variable selector is valid.
21456 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21458 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21459 * optabs-query.c (can_vec_perm_p): Likewise.
21460 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21461 instead of vec_perm_indices.
21462 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21463 (vect_gen_perm_mask_checked): Likewise,
21464 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21465 (vect_gen_perm_mask_checked): Likewise,
21467 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21469 * optabs-query.h (qimode_for_vec_perm): Declare.
21470 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21471 (qimode_for_vec_perm): ...this new function.
21472 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21474 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21476 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21477 does not have a conditional at the top.
21479 2018-01-02 Richard Biener <rguenther@suse.de>
21481 * ipa-inline.c (big_speedup_p): Fix expression.
21483 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21486 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21489 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21493 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21494 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21495 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21496 cond_taken_branch_cost 3->4.
21498 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21500 PR tree-optimization/83581
21501 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21502 TODO_cleanup_cfg if any changes have been made.
21504 PR middle-end/83608
21505 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21506 convert_modes if target mode has the right side, but different mode
21509 PR middle-end/83609
21510 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21511 last argument when extracting from CONCAT. If either from_real or
21512 from_imag is NULL, use expansion through memory. If result is not
21513 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21514 the parts directly to inner mode, if even that fails, use expansion
21517 PR middle-end/83623
21518 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21519 check for bswap in mode rather than HImode and use that in expand_unop
21522 Copyright (C) 2018 Free Software Foundation, Inc.
21524 Copying and distribution of this file, with or without modification,
21525 are permitted in any medium without royalty provided the copyright
21526 notice and this notice are preserved.