1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
4 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
5 (vec_info::free_stmt_vec_info): New private member functions.
6 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8 * tree-parloops.c (gather_scalar_reductions): Remove calls to
9 set_stmt_vec_info_vec and free_stmt_vec_infos.
10 * tree-vect-loop.c (_loop_vec_info): Remove call to
11 set_stmt_vec_info_vec.
12 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
14 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
15 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
16 (vec_info::free_stmt_vec_info): ...these new functions. Remove
17 assignments in {vec_info::,}new_stmt_vec_info that are redundant
18 with the clearing in the xcalloc.
19 (stmt_vec_info_vec): Delete.
20 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
21 (vectorize_loops): Likewise.
22 (vec_info::~vec_info): Remove argument from call to
24 (vec_info::add_stmt): Remove vinfo argument from call to
27 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
29 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
30 rather than a gimple stmt.
31 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
32 information for pattern statements when passed the original
33 statement; instead wait to be passed the pattern statement itself.
34 Don't call set_vinfo_for_stmt here.
35 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
36 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
38 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
39 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
42 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
44 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
45 * tree-vectorizer.c (vec_info::replace_stmt): New function.
46 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
47 * tree-vect-stmts.c (vectorizable_call): Likewise.
48 (vectorizable_simd_clone_call): Likewise.
50 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
52 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
53 * tree-vectorizer.c (vec_info::remove_stmt): New function.
54 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
55 * tree-vect-loop.c (vect_transform_loop): Likewise.
56 * tree-vect-slp.c (vect_schedule_slp): Likewise.
57 * tree-vect-stmts.c (vect_remove_stores): Likewise.
59 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
61 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
62 (vect_dr_stmt): Delete.
63 * tree-vectorizer.c (vec_info::lookup_dr): New function.
64 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
66 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
67 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
68 (vect_verify_datarefs_alignment, vect_peeling_supportable)
69 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
70 (vect_analyze_data_refs): Likewise.
71 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
73 (vect_find_same_alignment_drs): Likewise.
74 (vect_slp_analyze_node_dependences): Update calls accordingly.
75 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
76 instead of DR_VECT_AUX.
77 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
78 of a vector data references. Use vec_info::lookup_dr instead of
80 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
81 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
82 instead of DR_VECT_AUX.
84 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
86 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
88 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
90 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
91 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
92 (vect_gen_prolog_loop_niters): Likewise.
94 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
96 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
97 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
98 (vect_known_alignment_in_bytes, vect_dr_behavior)
99 (vect_get_scalar_dr_size): Take references as dr_vec_infos
100 instead of data_references. Update calls to other routines for
101 which the same change has been made.
102 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
103 dr_vec_infos instead of stmt_vec_infos.
104 (vect_analyze_data_ref_dependence): Update call accordingly.
105 (vect_slp_analyze_data_ref_dependence)
106 (vect_record_base_alignments): Use DR_VECT_AUX.
107 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
108 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
109 (vector_alignment_reachable_p, vect_get_data_access_cost)
110 (vect_peeling_supportable, vect_analyze_group_access_1)
111 (vect_analyze_group_access, vect_analyze_data_ref_access)
112 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
113 (vect_compile_time_alias, vect_small_gap_p)
114 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
115 (vect_supportable_dr_alignment): Take references as dr_vec_infos
116 instead of data_references. Update calls to other routines for
117 which the same change has been made.
118 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
119 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
120 (vect_slp_analyze_and_verify_node_alignment)
121 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
122 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
123 (vect_setup_realignment): Use dr_vec_infos. Update calls after
125 (_vect_peel_info::dr): Replace with...
126 (_vect_peel_info::dr_info): ...this new field.
127 (vect_peeling_hash_get_most_frequent)
128 (vect_peeling_hash_choose_best_peeling): Update accordingly.
129 (vect_peeling_hash_get_lowest_cost):
130 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
131 routines for which the same change has been made.
132 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
134 * tree-vect-loop-manip.c (get_misalign_in_elems)
135 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
137 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
138 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
139 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
140 (get_group_load_store_type, get_negative_load_store_type)
141 (vect_get_data_ptr_increment, vectorizable_store)
142 (vectorizable_load): Likewise.
143 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
144 Update calls to other routines for which the same change has been made.
146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
148 * tree-vectorizer.h (vec_info::move_dr): New member function.
149 (dataref_aux): Rename to...
150 (dr_vec_info): ...this and add "dr" and "stmt" fields.
151 (_stmt_vec_info::dr_aux): Update accordingly.
152 (_stmt_vec_info::data_ref_info): Delete.
153 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
154 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
155 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
156 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
158 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
159 (STMT_VINFO_DR_INFO): New macro.
160 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
161 (set_dr_misalignment): Update after rename of dataref_aux.
162 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
163 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
164 initialization of STMT_VINFO_DATA_REF.
165 * tree-vectorizer.c (vec_info::move_dr): New function.
166 * tree-vect-patterns.c (vect_recog_bool_pattern)
167 (vect_recog_mask_conversion_pattern)
168 (vect_recog_gather_scatter_pattern): Use it.
169 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
170 the "dr" and "stmt" fields of dr_vec_info instead of
173 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
175 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
176 (is_pattern_stmt_p): Use it.
177 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
178 on pattern statements.
180 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
182 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
183 original stmt as a stmt_vec_info rather than a gimple stmt.
184 (vect_pattern_recog_1): Take the statement directly as a
185 stmt_vec_info, rather than via a gimple_stmt_iterator.
186 Update call to vect_mark_pattern_stmts.
187 (vect_pattern_recog): Update calls accordingly.
189 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
191 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
192 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
193 a vect_def_type for the first argument.
194 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
195 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
196 operand if it isn't defined by a vectorized statement.
197 (vect_build_gather_load_calls): Remove the mask_dt argument and
198 update calls to vect_get_vec_def_for_stmt_copy.
199 (vectorizable_bswap): Likewise the dt argument.
200 (vectorizable_call): Update calls to vectorizable_bswap and
201 vect_get_vec_def_for_stmt_copy.
202 (vectorizable_simd_clone_call, vectorizable_assignment)
203 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
204 (vectorizable_comparison): Update calls to
205 vect_get_vec_def_for_stmt_copy.
206 (vectorizable_store): Likewise. Remove now-unnecessary calls to
208 (vect_get_loop_based_defs): Remove dt argument and update call
209 to vect_get_vec_def_for_stmt_copy.
210 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
211 and vect_get_vec_def_for_stmt_copy.
212 (vectorizable_load): Update calls to vect_build_gather_load_calls
213 and vect_get_vec_def_for_stmt_copy.
214 * tree-vect-loop.c (vect_create_epilog_for_reduction)
215 (vectorizable_reduction, vectorizable_live_operation): Update calls
216 to vect_get_vec_def_for_stmt_copy.
218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
220 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
221 and gimple stmt arguments with a stmt_vec_info.
222 (vect_record_base_alignments): Update calls accordingly.
223 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
224 and gimple stmt arguments with a stmt_vec_info.
225 (vect_build_slp_tree_1): Remove vinfo argument and update call
226 to vect_record_max_nunits.
227 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
228 and vect_record_max_nunits.
230 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
232 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
233 file and take a stmt_vec_info instead of a gimple stmt.
234 (supportable_widening_operation, vect_finish_replace_stmt)
235 (vect_finish_stmt_generation, vect_get_store_rhs)
236 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
237 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
238 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
239 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
240 (vect_create_data_ref_ptr, bump_vector_ptr)
241 (vect_permute_store_chain, vect_setup_realignment)
242 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
243 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
244 (vectorizable_reduction, vectorizable_induction)
245 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
246 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
247 than gimple stmts as arguments.
248 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
249 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
250 (can_group_stmts_p, vect_check_gather_scatter)
251 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
252 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
253 (vect_permute_load_chain, vect_shift_permute_load_chain)
254 (vect_transform_grouped_load)
255 (vect_record_grouped_load_vectors): Likewise.
256 * tree-vect-loop.c (vect_fixup_reduc_chain)
257 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
258 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
259 (vectorizable_reduction, vectorizable_induction)
260 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
261 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
262 (vect_get_load_store_mask): Likewise.
263 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
264 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
265 * tree-vect-stmts.c (vect_mark_relevant)
266 (is_simple_and_all_uses_invariant)
267 (exist_non_indexing_operands_for_use_p, process_use)
268 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
269 (vect_get_vec_def_for_operand, vect_get_vec_defs)
270 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
271 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
272 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
273 (get_negative_load_store_type, get_load_store_type)
274 (vect_check_load_store_mask, vect_check_store_rhs)
275 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
276 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
277 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
278 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
279 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
280 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
281 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
282 (supportable_widening_operation): Likewise.
284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
286 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
287 a stmt_vec_info instead of a gcall.
288 (vect_check_gather_scatter): Update call accordingly.
289 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
291 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
292 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
293 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
294 instead of a gimple stmt.
295 (vect_transform_loop): Update calls accordingly.
296 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
297 stmt_vec_infos instead of gimple stmts.
298 (vect_analyze_slp_instance): Update use accordingly.
299 * tree-vect-stmts.c (read_vector_array, write_vector_array)
300 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
301 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
302 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
303 (vect_gen_widened_results_half, vect_get_loop_based_defs)
304 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
305 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
310 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
311 of the worklist from a vector of gimple stmts to a vector of
313 * tree-vect-stmts.c (vect_mark_relevant, process_use)
314 (vect_mark_stmts_to_be_vectorized): Likewise
316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
318 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
319 statement before passing it to vect_analyze_stmt.
320 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
321 the chain of phi vector definitions. Track the exit phi via its
323 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
324 STMT_VINFO_REDUC_DEF.
325 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
326 stmt_vec_infos to handle the statement chains.
327 (vect_get_slp_defs): Record the first statement in the node
328 using a stmt_vec_info.
329 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
330 statements here and pass their stmt_vec_info down to subroutines.
331 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
332 down to vect_finish_stmt_generation.
333 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
334 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
335 stmt_vec_infos to subroutines.
336 (vect_remove_stores): Use stmt_vec_infos to handle the statement
339 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
341 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
342 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
343 (vect_permute_store_chain, vect_setup_realignment)
344 (vect_permute_load_chain, vect_shift_permute_load_chain)
345 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
346 stmts internally, and when passing values to other vectorizer routines.
347 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
348 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
349 (vect_analyze_loop_operations, get_initial_def_for_reduction)
350 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
351 (vectorizable_reduction, vectorizable_induction)
352 (vectorizable_live_operation, vect_transform_loop_stmt)
353 (vect_transform_loop): Likewise.
354 * tree-vect-patterns.c (vect_reassociating_reduction_p)
355 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
356 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
357 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
358 (vect_slp_analyze_node_operations_1): Likewise.
359 * tree-vect-stmts.c (vect_mark_relevant, process_use)
360 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
361 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
362 (vect_finish_stmt_generation_1, get_group_load_store_type)
363 (get_load_store_type, vect_build_gather_load_calls)
364 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
365 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
366 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
367 (vectorizable_store, vectorizable_load, vectorizable_condition)
368 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
369 (supportable_widening_operation): Likewise.
370 (vect_get_vector_types_for_stmt): Likewise.
371 * tree-vectorizer.h (vect_dr_behavior): Likewise.
373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
375 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
376 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
377 (vect_permute_store_chain, vect_permute_load_chain)
378 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
379 repeated stmt_vec_info lookups.
380 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
381 (vect_update_ivs_after_vectorizer): Likewise.
382 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
383 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
384 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
385 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
386 (vect_bb_slp_scalar_cost): Likewise.
387 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
389 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
391 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
392 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
393 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
394 to get gassigns and gcalls, rather than operating on generc gimple
396 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
397 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
398 (vectorizable_load, vect_analyze_stmt): Likewise.
399 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
401 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
403 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
404 return stmt_vec_infos rather than gimple stmts. Do not accept
406 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
408 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
409 Update use of get_later_stmt.
410 (vect_get_constant_vectors): Update call accordingly.
411 (vect_schedule_slp_instance): Likewise
412 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
413 (vect_slp_analyze_instance_dependence): Likewise.
414 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
418 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
419 (stmt_info_for_cost::stmt_info): ...this new field.
420 (add_stmt_costs): Update accordingly.
421 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
422 (vect_get_known_peeling_cost): Likewise.
423 (vect_estimate_min_profitable_iters): Likewise.
424 * tree-vect-stmts.c (record_stmt_cost): Likewise.
426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
428 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
429 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
430 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
432 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
434 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
436 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
437 a gimple stmt to a stmt_vec_info.
438 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
440 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
442 * tree-vectorizer.h (vec_info::grouped_stores): Change from
443 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
444 (_loop_vec_info::reduction_chains): Likewise.
445 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
447 * tree-vect-slp.c (vect_analyze_slp): Likewise.
449 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
451 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
452 a gimple stmt to a stmt_vec_info.
453 (_stmt_vec_info::next_element): Likewise.
454 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
455 (vect_slp_analyze_and_verify_node_alignment)
456 (vect_analyze_group_access_1, vect_analyze_group_access)
457 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
458 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
459 (vect_supportable_dr_alignment): Update accordingly.
460 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
461 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
462 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
463 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
464 * tree-vect-slp.c (vect_build_slp_tree_1)
465 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
466 (vect_split_slp_store_group, vect_analyze_slp_instance)
467 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
468 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
469 (get_group_load_store_type, get_load_store_type)
470 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
471 (vect_transform_stmt, vect_remove_stores): Likewise.
473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
475 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
477 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
478 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
479 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
480 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
481 (vector_alignment_reachable_p, vect_get_data_access_cost)
482 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
483 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
484 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
485 (vect_analyze_group_access_1, vect_analyze_group_access)
486 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
487 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
488 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
489 result of vect_dr_stmt and use the stmt_vec_info instead of
490 the associated gimple stmt.
491 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
492 (vect_gen_prolog_loop_niters): Likewise.
493 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
495 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
497 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
498 to a vec<stmt_vec_info>.
499 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
500 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
502 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
503 to a vec<stmt_vec_info>.
504 (bst_traits::value_type, bst_traits::value_type): Likewise.
505 (bst_traits::hash): Update accordingly.
506 (vect_get_and_check_slp_defs): Change the stmts parameter from
507 a vec<gimple *> to a vec<stmt_vec_info>.
508 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
509 (vect_build_slp_tree): Likewise.
510 (vect_build_slp_tree_2): Likewise. Update uses of
511 SLP_TREE_SCALAR_STMTS.
512 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
513 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
514 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
515 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
516 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
517 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
518 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
519 (vect_get_constant_vectors, vect_get_slp_defs)
520 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
521 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
522 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
523 instead of gimple stmts.
524 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
525 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
526 (vect_slp_analyze_instance_dependence): Update uses of
527 SLP_TREE_SCALAR_STMTS.
528 (vect_slp_analyze_and_verify_node_alignment): Likewise.
529 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
530 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
531 (get_initial_defs_for_reduction): Likewise.
532 (vect_create_epilog_for_reduction): Likewise.
533 (vectorize_fold_left_reduction): Likewise.
534 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
535 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
536 (can_vectorize_live_stmts): Likewise.
538 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
540 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
541 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
542 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
544 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
546 (gather_scalar_reductions): Update after above interface changes.
547 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
548 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
550 (vect_force_simple_reduction): Likewise.
551 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
552 LOOP_VINFO_REDUCTIONS.
553 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
555 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
557 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
558 a gimple stmt to a stmt_vec_info.
559 * tree-vect-loop.c (vect_active_double_reduction_p)
560 (vect_force_simple_reduction, vectorizable_reduction): Update
563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
565 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
566 vec<gimple *> to a vec<stmt_vec_info>.
567 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
568 the reduction_phis argument from a vec<gimple *> to a
570 (vectorizable_reduction): Likewise the phis local variable that
571 is passed to vect_create_epilog_for_reduction. Update for new type
572 of SLP_TREE_VEC_STMTS.
573 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
574 (vectorizable_live_operation): Likewise.
575 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
576 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
578 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
580 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
581 a gimple stmt to a stmt_vec_info.
582 (vectorizable_condition, vectorizable_live_operation)
583 (vectorizable_reduction, vectorizable_induction): Pass back the
584 vectorized statement as a stmt_vec_info.
585 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
586 use of STMT_VINFO_VEC_STMT.
587 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
588 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
589 as stmt_vec_infos rather than gimple stmts.
590 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
592 (vectorizable_live_operation): Likewise.
593 (vectorizable_reduction, vectorizable_induction): Likewise,
594 updating use of STMT_VINFO_VEC_STMT.
595 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
596 of STMT_VINFO_VEC_STMT.
597 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
598 (vectorizable_simd_clone_call, vectorizable_conversion)
599 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
600 (vectorizable_store, vectorizable_load, vectorizable_condition)
601 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
602 from a gimple stmt to a stmt_vec_info.
603 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
604 pointer to a stmt_vec_info to the vectorizable_* routines.
606 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
608 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
609 a gimple stmt to a stmt_vec_info.
610 (is_pattern_stmt_p): Update accordingly.
611 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
612 (vect_record_grouped_load_vectors): Likewise.
613 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
614 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
615 (vect_model_reduction_cost): Likewise.
616 (vect_create_epilog_for_reduction): Likewise.
617 (vectorizable_reduction, vectorizable_induction): Likewise.
618 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
619 Return the stmt_vec_info for the pattern statement.
620 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
621 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
622 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
623 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
624 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
625 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
626 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
627 (free_stmt_vec_info, vect_is_simple_use): Likewise.
629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
631 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
632 (vect_finish_stmt_generation): Likewise.
633 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
634 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
635 (vect_build_gather_load_calls): Use the return value of the above
636 functions instead of a separate call to vinfo_for_stmt. Use narrow
637 scopes for the input gimple stmt and wider scopes for the associated
638 stmt_vec_info. Use vec_info::lookup_def when setting these
639 stmt_vec_infos from an SSA_NAME definition.
640 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
641 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
642 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
643 (vectorizable_store, vectorizable_load, vectorizable_condition)
644 (vectorizable_comparison): Likewise.
645 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
646 (vectorizable_reduction): Likewise.
648 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
650 * tree-vectorizer.h (vect_is_simple_use): Add an optional
651 stmt_vec_info * parameter before the optional gimple **.
652 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
653 (process_use, vect_get_vec_def_for_operand_1): Update callers.
654 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
655 * tree-vect-loop.c (vectorizable_reduction): Likewise.
656 (vectorizable_live_operation): Likewise.
657 * tree-vect-patterns.c (type_conversion_p): Likewise.
658 (vect_look_through_possible_promotion): Likewise.
659 (vect_recog_rotate_pattern): Likewise.
660 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
662 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
664 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
665 a typedef to a wrapper class.
666 (NULL_STMT_VEC_INFO): New macro.
667 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
668 (stmt_vec_info::operator*): New function.
669 (stmt_vec_info::operator gimple *): Likewise.
670 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
671 (add_stmt_costs): Likewise.
672 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
673 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
674 (vect_get_known_peeling_cost): Likewise.
675 (vect_estimate_min_profitable_iters): Likewise.
676 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
677 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
678 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
679 (vectorizable_store, free_stmt_vec_infos): Likewise.
680 (new_stmt_vec_info): Change return type of xcalloc to
683 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
685 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
686 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
687 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
688 a single_imm_use-based sequence.
689 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
691 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
693 * tree-vectorizer.h (vec_info::lookup_def): Declare.
694 * tree-vectorizer.c (vec_info::lookup_def): New function.
695 * tree-vect-patterns.c (vect_get_internal_def): Use it.
696 (vect_widened_op_tree): Likewise.
697 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
698 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
699 (vectorizable_reduction): Likewise.
700 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
702 (vect_is_slp_reduction): Update calls accordingly. Use
703 vec_info::lookup_def.
704 (vect_is_simple_reduction): Likewise
705 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
709 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
710 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
711 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
713 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
714 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
715 (vect_update_vf_for_slp, vect_analyze_loop_operations)
716 (vect_is_slp_reduction, vectorizable_induction)
717 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
718 * tree-vect-patterns.c (vect_init_pattern_stmt):
719 (vect_determine_min_output_precision_1, vect_determine_precisions)
720 (vect_pattern_recog): Likewise.
721 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
722 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
723 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
724 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
725 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
726 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
727 info field from a loop to a loop_vec_info.
729 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
731 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
732 (vec_info::add_stmt): Declare.
733 * tree-vectorizer.c (vec_info::add_stmt): New function.
734 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
735 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
736 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
737 (vectorizable_induction): Likewise.
738 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
739 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
740 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
741 (vectorizable_load): Likewise.
742 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
743 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
744 (vect_recog_gather_scatter_pattern): Likewise.
745 (append_pattern_def_seq): Likewise. Remove a check that is
746 performed by add_stmt itself.
748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
750 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
751 which make_ssa_name was called with new_stmt before new_stmt
754 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
756 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
758 (vect_is_slp_reduction): ...here...
759 (vect_is_simple_reduction): ...and here. Remove repetition of tests
760 that are already known to be false.
762 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
764 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
765 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
766 STMT_VINFO_NUM_SLP_USES when it's true.
767 (vect_free_slp_instance): Add a final_p parameter and pass it to
769 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
770 (vect_analyze_slp_instance): Likewise.
771 (vect_slp_analyze_operations): Likewise.
772 (vect_slp_analyze_bb_1): Likewise.
773 * tree-vectorizer.c (vec_info): Likewise.
774 * tree-vect-loop.c (vect_transform_loop): Likewise.
776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
778 * tree-vect-loop.c (vectorizable_reduction): Assert that the
779 function is not called for second and subsequent members of
782 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
784 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
785 cases for nested loops from here to ...
786 (vect_create_epilog_for_reduction): ...here. Only call
787 vect_is_simple_use for inner-loop reductions.
789 2018-07-31 Martin Liska <mliska@suse.cz>
791 PR gcov-profile/85338
792 PR gcov-profile/85350
793 PR gcov-profile/85372
794 * profile.c (struct location_triplet): New.
795 (struct location_triplet_hash): Likewise.
796 (output_location): Do not output a BB that
797 is already recorded for a line.
798 (branch_prob): Use streamed_locations.
800 2018-07-31 Martin Liska <mliska@suse.cz>
802 PR gcov-profile/85370
803 * coverage.c (coverage_begin_function): Do not mark target
804 clones as artificial functions.
806 2018-07-31 Martin Liska <mliska@suse.cz>
808 PR gcov-profile/83813
809 PR gcov-profile/84758
810 PR gcov-profile/85217
811 PR gcov-profile/85332
812 * profile.c (branch_prob): Do not record GOTO expressions
813 for GIMPLE statements which locations are already streamed.
815 2018-07-31 Olivier Hainque <hainque@adacore.com>
817 * gcc.c (handle_spec_function): Accept a soft_matched_part
818 argument, as do_spec_1. Pass it down to ...
819 (eval_spec_function): Accept a soft_matched_part argument,
820 and pass it down to ...
821 (do_spec_2): Accept a soft_matched_part argument, and pass
822 it down to do_spec_1.
823 (do_spec_1): Pass soft_matched_part to handle_spec_function.
824 (handle_braces): Update call to handle_spec_function.
825 (driver::set_up_specs): Update calls to do_spec_2.
826 (compare_debug_dump_opt_spec_function): Likewise.
827 (compare_debug_self_opt_spec_function): Likewise.
829 2018-07-31 Olivier Hainque <hainque@adacore.com>
831 * common.opt (nolibc): New option.
832 * doc/invoke.texi (Link Options): Document it.
833 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
834 * config/alpha/linux.h: Likewise.
835 * config/arc/elf.h: Likewise.
836 * config/arm/uclinux-elf.h: Likewise.
837 * config/arm/unknown-elf.h: Likewise.
838 * config/avr/avrlibc.h: Likewise.
839 * config/bfin/bfin.h: Likewise.
840 * config/bfin/linux.h: Likewise.
841 * config/bfin/uclinux.h: Likewise.
842 * config/darwin.h: Likewise.
843 * config/darwin10.h: Likewise.
844 * config/darwin12.h: Likewise.
845 * config/gnu-user.h: Likewise.
846 * config/lm32/uclinux-elf.h: Likewise.
847 * config/pa/pa-hpux11.h: Likewise.
848 * config/pa/pa64-hpux.h: Likewise.
849 * config/sparc/sparc.h: Likewise.
851 2018-07-31 Olivier Hainque <hainque@adacore.com>
853 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
856 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
859 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
862 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
864 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
865 terminated string literal.
867 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
869 PR rtl-optimization/85160
870 * combine.c (is_just_move): New function.
871 (try_combine): Allow combining two instructions into two if neither of
872 the original instructions was a move.
874 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
877 * doc/extend.texi (Global Register Variables): Discourage use of type
879 (Local Register Variables): Likewise.
881 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
883 PR tree-optimization/86506
884 * hwint.h (ceil_log2): Resync with hwint.c implementation.
886 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
889 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
890 hard_regno, make sure no insn between `from` and `to` clobbers it.
892 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
893 Tom de Vries <tdevries@suse.de>
895 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
896 (PTX_DEFAULT_RUNTIME_DIM): ... this.
897 (nvptx_goacc_validate_dims): Set default worker and gang dims to
898 PTX_DEFAULT_RUNTIME_DIM.
899 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
901 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
903 * config/pa/pa.c (pa_output_addr_vec): Align address table.
904 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
905 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
907 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
909 * config/rs6000/constraints.md (wG constraint): Delete, no longer
911 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
912 predicate to reflect toc fusion has been deleted.
913 (toc_fusion_mem_raw): Delete, no longer used.
914 (toc_fusion_mem_wrapped): Likewise.
915 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
917 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
918 Delete, no longer used.
919 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
920 meant to be used for toc fusion.
921 (rs6000_debug_print_mode): Delete toc fusion debugging.
922 (rs6000_debug_reg_global): Likewise.
923 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
924 fusion and secondary reload support that were never used.
925 (rs6000_option_override_internal): Delete TOC fusion, that was only
926 partially defined, and it did not work unless you also used the
928 (rs6000_legitimate_address_p): Delete TOC fusion support.
929 (rs6000_opt_masks): Likewise.
930 (fusion_wrap_memory_address): Delete function, no longer used.
931 (fusion_split_address); Delete TOC fusion support.
932 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
933 longer used with toc fusion being deleted.
934 (TARGET_TOC_FUSION_FP): Likewise.
935 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
937 (toc fusion spliter): Delete TOC fusion support.
938 (toc_fusionload_<mode>): Likewise.
939 (toc_fusionload_di): Likewise.
940 (fusion_gpr_load_<mode>): Delete generator function, this insn no
941 longer needs to be named. Rename predicate to delete TOC fusion.
942 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
943 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
944 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
945 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
946 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
948 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
950 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
951 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
952 __int128 in built-in function prototypes.
953 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
954 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
956 2018-07-27 Martin Sebor <msebor@redhat.com>
958 PR tree-optimization/86696
959 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
960 types, including enums.
961 (handle_char_store): Be prepared for the above function to fail.
963 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
965 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
966 when optimization level is lower than 2 or optimize for size.
968 2018-07-26 Martin Sebor <msebor@redhat.com>
970 PR tree-optimization/86043
971 PR tree-optimization/86042
972 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
973 (get_string_cst_length): Rename...
974 (get_min_string_length): ...to this. Add argument.
975 (handle_char_store): Extend to handle multi-character stores by
977 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
978 * tree.h (initializer_zerop): Add argument.
980 2018-07-26 Jakub Jelinek <jakub@redhat.com>
983 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
984 declare target to variables if they have always,{to,from,tofrom} map
987 2018-07-26 Martin Liska <mliska@suse.cz>
990 * lto-wrapper.c: Add linker_output as prefix
991 for ltrans_output_file.
993 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
995 PR rtl-optimization/85805
996 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
997 value for hard registers if that was written in the same mode.
999 2018-07-26 Martin Liska <mliska@suse.cz>
1001 PR gcov-profile/86536
1002 * gcov.c (format_gcov): Use printf format %.*f directly
1003 and do not handle special values.
1005 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1007 * common/config/arc/arc-common.c (arc_option_optimization_table):
1008 Update default optimizations for size.
1010 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1012 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1013 * config/arc/constraints.md (CfZ): New constraint.
1014 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1015 (subsf3_fpu): Likewise.
1016 (cmpsf_fpu): Likewise.
1017 (cmpsf_fpu_uneq): Likewise.
1019 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1021 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1023 (arc_is_uncached_mem_p): uncached applies to both the variable and
1026 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1028 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1031 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1033 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1034 field "m_scopes" from vec to auto_vec.
1036 2018-07-25 Martin Liska <mliska@suse.cz>
1038 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1041 2018-07-25 Richard Biener <rguenther@suse.de>
1044 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1045 special wrt context_die late.
1046 (gen_subprogram_die): Re-use DIEs in local scope.
1048 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1050 PR tree-optimization/86644
1051 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1053 2018-07-25 Martin Liska <mliska@suse.cz>
1056 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1057 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1059 2018-07-25 Martin Liska <mliska@suse.cz>
1062 * params.def: Explain ASan abbreviation and provide
1063 a documentation link.
1065 2018-07-24 Martin Sebor <msebor@redhat.com>
1067 PR tree-optimization/86622
1068 PR tree-optimization/86532
1069 * builtins.h (string_length): Declare.
1070 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1071 (check_access): Be prepared for non-constant length ranges.
1072 (string_length): Make extern.
1073 * expr.c (string_constant): Only handle the minor non-constant
1074 array index. Use string_constant to compute the length of
1075 a generic string constant.
1077 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1079 PR tree-optimization/86618
1080 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1081 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1083 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1085 PR tree-optimization/86636
1086 * json.cc (json::object::set): Fix comment. Add assertions.
1087 (json::array::append): Move here from json.h. Add comment and an
1089 (json::string::string): Likewise.
1090 * json.h (json::array::append): Move to json.cc.
1091 (json::string::string): Likewise.
1092 * optinfo-emit-json.cc
1093 (optrecord_json_writer::impl_location_to_json): Assert that we
1094 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1095 wrapper around it. Expand the location once, rather than three
1097 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1098 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1100 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1101 places. Fix some overlong lines.
1103 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1105 * config/aarch64/aarch64-simd.md
1106 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1107 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1108 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1109 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1110 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1111 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1112 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1113 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1114 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1116 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1119 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1120 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1121 and abs_d == d, do the power of two handling if profitable.
1123 2018-07-24 Richard Biener <rguenther@suse.de>
1125 * match.pd: Add BIT_FIELD_REF canonicalizations.
1127 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1130 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1132 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1134 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1135 terminated STRING_CST object.
1137 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1139 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1141 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1143 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1144 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1145 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1146 the elements into a register.
1147 (rs6000_split_v4si_init_di_reg): Delete.
1148 (rs6000_split_v4si_init): Delete.
1149 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1150 (vsx_init_v4si): Rewrite as a define_expand.
1152 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1154 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1155 zero_extend argument from memory): New.
1157 2018-07-22 Martin Sebor <msebor@redhat.com>
1160 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1161 diagnosing calls with unknown arguments unless -Walloca-larger-than
1162 is restricted to less than PTRDIFF_MAX bytes.
1164 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1166 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1168 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1170 * pretty-print.c (text_info::set_location): Remove redundant
1171 "line_table" parameter from call to rich_location::set_range.
1173 2018-07-20 Martin Sebor <msebor@redhat.com>
1176 * builtins.c (expand_builtin_alloca): Adjust.
1177 * calls.c (alloc_max_size): Simplify.
1178 * cgraphunit.c (cgraph_node::expand): Adjust.
1179 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1181 (frame_larger_than_size): Same.
1182 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1183 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1185 * doc/invoke.texi (GCC Command Options): Document option arguments.
1186 Explain byte-size arguments and suffixes.
1187 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1188 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1189 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1190 * doc/options.texi (UInteger): Expand.
1191 (Host_Wide_Int, ByteSize): Document new properties.
1192 * final.c (final_start_function_1): Include sizes in an error message.
1193 * function.c (frame_offset_overflow): Same.
1194 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1195 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1196 Diagnose unbounded alloca calls only for limits of less than
1198 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1199 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1201 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1202 only for limits of less than PTRDIFF_MAX.
1203 * langhooks-def.h (lhd_handle_option): Change function argument
1205 * langhooks.c (lhd_handle_option): Same.
1206 * langhooks.h (handle_option): Same.
1207 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1209 (var_type, var_type_struct): Same.
1210 (var_set): Handle ByteSize flag.
1211 * optc-gen.awk: Add comments to output to ease debugging. Make
1212 use of HOST_WIDE_INT where appropriate.
1213 * opts-gen-save.awk: Use %lx to format unsigned long.
1214 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1215 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1216 arguments. Parse bytes-size suffixes.
1217 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1218 (enum_value_to_arg): Same.
1219 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1220 (handle_option): Adjust.
1221 (generate_option): Change function argument to HOST_WIDE_INT.
1222 (cmdline_handle_error): Adjust.
1223 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1224 (set_option): Change function argument to HOST_WIDE_INT.
1225 (option_enabled): Handle cl_host_wide_int.
1226 (get_option_state): Handle CLVC_SIZE.
1227 (control_warning_option): Same.
1228 * opts.c (common_handle_option): Change function argument to
1229 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1230 OPT_Wvla_larger_than_.
1231 * opts.h (enum cl_var_type): Add an enumerator.
1232 * stor-layout.c (layout_decl): Print a more meaningful warning.
1233 * toplev.c (output_stack_usage): Adjust.
1235 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1237 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1238 call to inline_expand_builtin_string_cmp.
1239 (expand_builtin_strcmp): Likewise.
1240 (expand_builtin_strncmp): Likewise.
1241 (inline_string_cmp): Delete the last parameter, change char_type_node
1242 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1244 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1245 the inlining expansion on target where the type of the call has same or
1246 narrower precision than unsigned char.
1248 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1250 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1251 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1252 * common.opt (fsave-optimization-record): New option.
1253 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1254 * doc/invoke.texi (-fsave-optimization-record): New option.
1255 * dumpfile.c: Include "optinfo-emit-json.h".
1256 (struct kv_pair): Move to coretypes.h.
1257 (optgroup_options): Make non-static.
1258 (dump_context::end_scope): Call
1259 optimization_records_maybe_pop_dump_scope.
1260 * dumpfile.h (optgroup_options): New decl.
1261 * json.cc: New file.
1263 * optinfo-emit-json.cc: New file.
1264 * optinfo-emit-json.h: New file.
1265 * optinfo.cc: Include "optinfo-emit-json.h".
1266 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1267 (optinfo_enabled_p): Check optimization_records_enabled_p.
1268 (optinfo_wants_inlining_info_p): Likewise.
1269 * optinfo.h: Update comment.
1270 * profile-count.c (profile_quality_as_string): New function.
1271 * profile-count.h (profile_quality_as_string): New decl.
1272 (profile_count::quality): New accessor.
1273 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1274 and optinfo_emit_json_cc_tests.
1275 * selftest.h (selftest::json_cc_tests): New decl.
1276 (selftest::optinfo_emit_json_cc_tests): New decl.
1277 * toplev.c: Include "optinfo-emit-json.h".
1278 (compile_file): Call optimization_records_finish.
1279 (do_compile): Call optimization_records_start.
1280 * tree-ssa-live.c: Include optinfo.h.
1281 (remove_unused_scope_block_p): Retain inlining information if
1282 optinfo_wants_inlining_info_p returns true.
1284 2018-07-20 Richard Biener <rguenther@suse.de>
1287 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1288 to cover -flto-partition=none.
1290 2018-07-20 Martin Liska <mliska@suse.cz>
1292 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1293 (get_decl_source_range): Remove unused function.
1295 2018-07-20 Richard Biener <rguenther@suse.de>
1297 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1298 (struct vn_phi_s): Likewise.
1299 (struct vn_reference_s): Likewise.
1300 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1301 for searching the slot of an entry known to be in the hash itself.
1302 (vn_phi_hasher::equal): Likewise.
1303 (vn_reference_hasher::equal): Likewise.
1304 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1306 (optimistic_info, current_info): Remove, keeping only valid_info.
1307 (vn_reference_lookup_1): Remove fallback lookup.
1308 (vn_reference_lookup_2): Likewise.
1309 (vn_nary_op_lookup_1): Likewise.
1310 (vn_phi_lookup): Likewise.
1311 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1313 (vn_reference_insert): Adjust, chain the inserted hash element
1314 at last_inserted_ref.
1315 (vn_reference_insert_pieces): Likewise.
1316 (visit_reference_op_call): Likewise.
1317 (vn_nary_op_insert_into): Chain the inserted hash element at
1319 (vn_nary_op_insert_pieces): Adjust.
1320 (vn_nary_op_insert): Likewise.
1321 (vn_nary_op_insert_stmt): Likewise.
1322 (vn_phi_insert): Adjust, chain the inserted hash element at
1324 (process_scc): Remove clearing and copying the optimistic
1325 table. Instead remove elements inserted during an optimistic
1326 iteration from the single table we maintain.
1327 (init_scc_vn): Adjust.
1328 (free_scc_vn): Likewise.
1329 (sccvn_dom_walker::record_cond): Likewise.
1330 (sccvn_dom_walker::after_dom_children): Likewise.
1332 2018-07-19 Martin Sebor <msebor@redhat.com>
1334 PR tree-optimization/84047
1335 PR tree-optimization/83776
1336 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1337 (check_array_bounds): Call it.
1339 2018-07-19 Martin Sebor <msebor@redhat.com>
1341 * align.h (align_flags): Use member initialization.
1343 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1345 * Makefile.in (OBJS): Add optinfo.o.
1346 * coretypes.h (class symtab_node): New forward decl.
1347 (struct cgraph_node): New forward decl.
1348 (class varpool_node): New forward decl.
1349 * dump-context.h: New file.
1350 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1352 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1353 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1354 (set_alt_dump_file): Likewise.
1355 (dump_context::~dump_context): New dtor.
1356 (dump_gimple_stmt): Move implementation to...
1357 (dump_context::dump_gimple_stmt): ...this new member function.
1358 Add the stmt to any pending optinfo, creating one if need be.
1359 (dump_gimple_stmt_loc): Move implementation to...
1360 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1361 Start a new optinfo and add the stmt to it.
1362 (dump_gimple_expr): Move implementation to...
1363 (dump_context::dump_gimple_expr): ...this new member function.
1364 Add the stmt to any pending optinfo, creating one if need be.
1365 (dump_gimple_expr_loc): Move implementation to...
1366 (dump_context::dump_gimple_expr_loc): ...this new member function.
1367 Start a new optinfo and add the stmt to it.
1368 (dump_generic_expr): Move implementation to...
1369 (dump_context::dump_generic_expr): ...this new member function.
1370 Add the tree to any pending optinfo, creating one if need be.
1371 (dump_generic_expr_loc): Move implementation to...
1372 (dump_context::dump_generic_expr_loc): ...this new member
1373 function. Add the tree to any pending optinfo, creating one if
1375 (dump_printf): Move implementation to...
1376 (dump_context::dump_printf_va): ...this new member function. Add
1377 the text to any pending optinfo, creating one if need be.
1378 (dump_printf_loc): Move implementation to...
1379 (dump_context::dump_printf_loc_va): ...this new member function.
1380 Start a new optinfo and add the stmt to it.
1381 (dump_dec): Move implementation to...
1382 (dump_context::dump_dec): ...this new member function. Add the
1383 value to any pending optinfo, creating one if need be.
1384 (dump_context::dump_symtab_node): New member function.
1385 (dump_context::get_scope_depth): New member function.
1386 (dump_context::begin_scope): New member function.
1387 (dump_context::end_scope): New member function.
1388 (dump_context::ensure_pending_optinfo): New member function.
1389 (dump_context::begin_next_optinfo): New member function.
1390 (dump_context::end_any_optinfo): New member function.
1391 (dump_context::s_current): New global.
1392 (dump_context::s_default): New global.
1393 (dump_scope_depth): Delete global.
1394 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1395 (dump_symtab_node): New function.
1396 (get_dump_scope_depth): Reimplement in terms of dump_context.
1397 (dump_begin_scope): Likewise.
1398 (dump_end_scope): Likewise.
1399 (selftest::temp_dump_context::temp_dump_context): New ctor.
1400 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1401 (selftest::verify_item): New function.
1402 (ASSERT_IS_TEXT): New macro.
1403 (ASSERT_IS_TREE): New macro.
1404 (ASSERT_IS_GIMPLE): New macro.
1405 (selftest::test_capture_of_dump_calls): New test.
1406 (selftest::dumpfile_c_tests): Call it.
1407 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1408 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1409 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1410 descriptive comment.
1411 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1412 (dump_node, dump_bb): Move these unrelated decls.
1413 (class dump_manager): Add leading comment.
1414 * optinfo.cc: New file.
1415 * optinfo.h: New file.
1417 2018-07-19 Michael Collison <michael.collison@arm.com>
1418 Richard Henderson <rth@redhat.com>
1420 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1421 (subti): Handle op1 zero.
1422 (subvti4, usub4ti4): New.
1423 (*sub<GPI>3_compare1_imm): New.
1424 (sub<GPI>3_carryinCV): New.
1425 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1426 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1428 2018-07-19 Michael Collison <michael.collison@arm.com>
1429 Richard Henderson <rth@redhat.com>
1431 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1432 (addti3): Create simpler code if low part is already known to be 0.
1433 (addvti4, uaddvti4): New.
1434 (*add<GPI>3_compareC_cconly_imm): New.
1435 (*add<GPI>3_compareC_cconly): New.
1436 (*add<GPI>3_compareC_imm): New.
1437 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1438 handle constants within this pattern..
1439 (*add<GPI>3_compareV_cconly_imm): New.
1440 (*add<GPI>3_compareV_cconly): New.
1441 (*add<GPI>3_compareV_imm): New.
1442 (add<GPI>3_compareV): New.
1443 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1444 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1445 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1446 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1447 with 'comparison' operator.
1448 (*add<GPI>3_compareV_cconly_imm): Ditto.
1449 (*add<GPI>3_compareV_cconly): Ditto.
1450 (*add<GPI>3_compareV_imm): Ditto.
1451 (add<GPI>3_compareV): Ditto.
1452 (add<mode>3_carryinC): Ditto.
1453 (*add<mode>3_carryinC_zero): Ditto.
1454 (*add<mode>3_carryinC): Ditto.
1455 (add<mode>3_carryinV): Ditto.
1456 (*add<mode>3_carryinV_zero): Ditto.
1457 (*add<mode>3_carryinV): Ditto.
1459 2018-07-19 Michael Collison <michael.collison@arm.com>
1460 Richard Henderson <rth@redhat.com>
1462 * config/aarch64/aarch64-modes.def (CC_V): New.
1463 * config/aarch64/aarch64-protos.h
1464 (aarch64_addti_scratch_regs): Declare
1465 (aarch64_subvti_scratch_regs): Declare.
1466 (aarch64_expand_subvti): Declare.
1467 (aarch64_gen_unlikely_cbranch): Declare
1468 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1469 for signed overflow using CC_Vmode.
1470 (aarch64_get_condition_code_1): Handle CC_Vmode.
1471 (aarch64_gen_unlikely_cbranch): New function.
1472 (aarch64_addti_scratch_regs): New function.
1473 (aarch64_subvti_scratch_regs): New function.
1474 (aarch64_expand_subvti): New function.
1476 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1478 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1480 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1481 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1484 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1487 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1488 address check not strict.
1490 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1492 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1494 (store_pair_lanes<mode>): Likewise.
1495 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1496 enum value 'ADDR_QUERY_LDP_STP_N'.
1497 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1498 (aarch64_print_address_internal): Add declaration.
1499 (aarch64_print_ldpstp_address): Remove.
1500 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1501 (aarch64_print_operand): Change printing of 'y'.
1502 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1503 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1504 'true' rather than '1'.
1505 * config/aarch64/constraints.md (Uml): Likewise.
1506 (Uml): Rename to Umn.
1509 2018-07-19 Richard Biener <rguenther@suse.de>
1511 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1513 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1514 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1515 (vn_reference_hasher): Likewise.
1516 (struct vn_tables_s): Remove obstack and alloc-pool members.
1517 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1518 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1519 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1520 (vn_reference_insert_pieces): Likewise.
1521 (alloc_vn_nary_op_noinit): Adjust.
1522 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1523 (vn_phi_eq): Adjust.
1524 (shared_lookup_phiargs): Remove.
1525 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1526 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1527 (visit_reference_op_call): Likewise.
1528 (copy_nary, copy_phi, copy_reference): Remove.
1529 (process_scc): Rewind the obstack when iterating. Do not
1530 copy the elements to valid_info but just move them from one
1531 hashtable to the other.
1532 (allocate_vn_table): Adjust.
1533 (free_vn_table): Likewise.
1534 (init_scc_vn): Likewise.
1535 (free_scc_vn): Likewise.
1537 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1540 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1541 indirect_return as function type attribute.
1542 (ix86_attribute_table): Change indirect_return to function
1544 * doc/extend.texi: Update indirect_return attribute.
1546 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1548 * wide-int.h (widest2_int): New.
1549 * gimple-fold.c (arith_overflowed_p): Use it.
1550 * tree.h (widest2_int_cst): New.
1551 * tree-vrp.c (wide_int_binop_overflow): Rename from
1552 vrp_int_const_binop.
1553 Rewrite to work on trees.
1554 (extract_range_from_multiplicative_op_1): Abstract code to...
1555 (wide_int_range_min_max): ...here.
1556 (wide_int_range_cross_product): ...and here.
1557 (extract_range_from_binary_expr_1): Abstract overflow code to...
1558 (wide_int_range_mult_wrapping): ...here.
1559 * tree-vrp.h (wide_int_range_cross_product): New.
1560 (wide_int_range_mult_wrapping): New.
1562 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1563 Julia Koval <julia.koval@intel.com>
1565 * config/i386/x86-tune-costs.h (skylake_memcpy,
1566 skylake_memset): Replace rep_prefix with unrolling for size 512.
1568 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1571 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1574 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1576 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1577 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1578 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1579 previously known as "PowerPC AltiVec Built-in Functions". Move
1580 some material to new subsubsections "PowerPC AltiVec Built-in
1581 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1583 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1584 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1585 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1586 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1588 2018-07-18 Richard Biener <rguenther@suse.de>
1590 PR tree-optimization/86557
1591 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1594 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1596 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1598 2018-07-17 Jeff Law <law@redhat.com>
1600 * config/arm/arm.c (get_label_padding): Update for recent
1601 changes to label_to_alignment.
1603 PR tree-optimization/86010
1604 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1606 * config/mips/mips.c (vr4130_align_insns): Update for recent
1607 changes to label_to_alignment.
1609 * config/frv/frv.c (frv_label_align): Update for recent changes
1610 to label_to_alignment.
1612 * config/nios2/nios2.c (nios2_label_align): Update for recent
1613 changes which dropped ALIGN_LABELS_LOG.
1615 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1617 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1618 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1620 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1622 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1623 deprecated align_labels_log.
1625 2018-07-17 Richard Biener <rguenther@suse.de>
1628 * dwarf2out.c (init_sections_and_labels): Always generate
1629 a debug_line_str_section for early LTO debug.
1630 (dwarf2out_finish): Reset debug_line_str_hash output early.
1631 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1633 (dwarf2out_early_finish): Output debug_line_str.
1635 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1637 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1638 index register on z196 or later.
1640 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1642 * config/s390/s390.c (s390_default_align): Set default function
1644 (s390_override_options_after_change): Call s390_default align.
1645 (s390_option_override_internal): Call s390_default_align.
1646 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1648 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1651 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1652 to _looptemp_ clauses, other than the first two.
1654 2018-07-17 Martin Liska <mliska@suse.cz>
1656 * opts.c: Do not enable OPT_falign_* for -Os.
1658 2018-07-17 Martin Liska <mliska@suse.cz>
1660 * align.h (MAX_CODE_ALIGN): New.
1661 (MAX_CODE_ALIGN_VALUE): New.
1662 * common/config/i386/i386-common.c (ix86_handle_option):
1663 (MAX_CODE_ALIGN): Moved to align.h.
1664 * final.c (MAX_CODE_ALIGN): Likewise.
1665 * opts.c (parse_and_check_align_values):
1666 (MAX_CODE_ALIGN): Likewise.
1667 (MAX_CODE_ALIGN_VALUE): Likewise.
1669 2018-07-17 Martin Liska <mliska@suse.cz>
1671 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1672 in order to fulfil coding style.
1673 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1674 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1675 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1676 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1677 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1678 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1679 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1680 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1681 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1683 2018-07-17 Martin Liska <mliska@suse.cz>
1685 * align.h: New file.
1686 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1687 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1688 align_flags of label_to_alignment.
1689 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1691 * config/m68k/m68k.c: Do not use removed align_labels_value and
1693 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1694 (LOOP_ALIGN): Likewise.
1695 (LABEL_ALIGN): Likewise.
1696 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1697 Remove not used macro.
1698 (rs6000_loop_align): Change return type to align_flags.
1699 (rs6000_loop_align_max_skip): Remove.
1700 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1701 Change return type to align_flags.
1702 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1703 Remove not used macro.
1704 (rs6000_loop_align): Change return type to align_flags.
1705 (rs6000_loop_align_max_skip): Remove.
1706 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1707 * config/rx/rx-protos.h (rx_align_for_label): Make it
1709 * config/rx/rx.c (rx_align_for_label): Change return type
1711 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1713 into align_flags class.
1714 (LABEL_ALIGN): Likewise.
1715 (LOOP_ALIGN): Likewise.
1716 * config/s390/s390.c (s390_label_align): Use align_flags
1718 (s390_asm_output_function_label): Likewise.
1719 * config/sh/sh.c (sh_override_options_after_change):
1720 Use align_flags class directly without macros.
1721 (find_barrier): Likewise.
1722 (barrier_align): Likewise.
1723 (sh_loop_align): Likewise.
1724 * config/spu/spu.c (spu_option_override):
1725 Use align_flags_tuple::get_value instead of removed macros.
1726 (spu_sched_init): Likewise.
1727 * config/spu/spu.h (GTY): Likewise.
1728 * config/visium/visium.c (visium_option_override):
1729 Set "8" as default secondary alignment.
1730 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1731 in order to guarantee secondary alignment of 8.
1732 * coretypes.h: Include align.h header file.
1733 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1734 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1735 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1736 * doc/tm.texi.in: Likewise.
1737 * final.c (struct label_alignment): Remove not used structure.
1738 (LABEL_ALIGN): Change type to align_flags.
1739 (LOOP_ALIGN): Likewise.
1740 (JUMP_ALIGN): Likewise.
1741 (default_loop_align_max_skip): Remove.
1742 (default_label_align_max_skip): Likewise.
1743 (default_jump_align_max_skip): Likewise.
1744 (default_label_align_after_barrier_max_skip):
1745 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1746 (LABEL_TO_MAX_SKIP): Remove.
1747 (label_to_alignment): Return align_flags type instead of integer.
1748 (label_to_max_skip): Remove.
1749 (align_fuzz): Use align_flags type.
1750 (compute_alignments): Use align_flags type and use align_flags::max
1751 to combine multiple alignments.
1752 (grow_label_align): Grow vec instead of C array.
1753 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1754 (shorten_branches): Use align_flags type and use align_flags::max
1755 to combine multiple alignments.
1756 (final_scan_insn_1): Remove usage of secondary alignment that comes
1757 from label alignment, but instead use proper secondary alignment
1758 which is computed in grow_label_align.
1759 * flags.h (struct align_flags_tuple): Move to align.h.
1760 (struct align_flags): Likewise.
1761 (state_align_loops): Rename to align_loops.
1762 (state_align_jumps): Rename to align_jumps.
1763 (state_align_labels): Rename to align_labels.
1764 (state_align_functions): Rename to align_functions.
1765 (align_loops_log): Remove.
1766 (align_jumps_log): Remove.
1767 (align_labels_log): Remove.
1768 (align_functions_log): Remove.
1769 (align_loops_max_skip): Remove.
1770 (align_jumps_max_skip): Remove.
1771 (align_labels_max_skip): Remove.
1772 (align_functions_max_skip): Remove.
1773 (align_loops_value): Remove.
1774 (align_jumps_value): Remove.
1775 (align_labels_value): Remove.
1776 (align_functions_value): Remove.
1777 * output.h (label_to_alignment): Change return type to align_flags.
1778 (label_to_max_skip): Remove.
1779 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1780 jump_align_max_skip macros.
1781 * targhooks.h (default_loop_align_max_skip): Remove.
1782 (default_label_align_max_skip): Likewise.
1783 (default_jump_align_max_skip): Likewise.
1784 (default_label_align_after_barrier_max_skip): Remove.
1785 * toplev.c (read_log_maxskip): Use ::normalize function.
1786 (parse_N_M): Remove not used argument and also call ::normalize.
1787 (parse_alignment_opts): Do not pass unused arguments.
1788 * varasm.c (assemble_start_function): Use directly align_functions
1789 instead of removed macros.
1790 * system.h: Do not poison removed macros.
1792 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1795 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1796 and cond temporaries don't have reference type if iterator has
1797 pointer type. For init use &for_pre_body instead of pre_p if
1798 for_pre_body is non-empty.
1800 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1802 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1803 double-double modes to SFmode directly directly.
1804 (trunc<mode>sf2_fprs): Delete.
1806 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1808 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1809 for conversions between IFmode and the decimal floating point modes.
1810 (init_float128_ieee): Use the correct names for conversions between
1811 KFmode and the decimal floating point modes.
1813 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1815 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1816 for the conversions between TDmode and IFmode.
1817 (init_float128_ieee): Use more correct names for the conversions
1818 between TDmode and KFmode.
1820 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1822 PR tree-optimization/86526
1823 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1824 (inline_expand_builtin_string_cmp): Likewise.
1825 (inline_string_cmp): Likewise. Use c_readstr instead of
1826 builtin_memcpy_read_str. Add unit_mode temporary.
1828 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1831 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1832 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1834 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1836 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1837 Alphabetize prototypes of built-in functions, separating out
1838 built-in functions that are listed in this section but should be
1839 described elsewhere.
1841 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1844 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1845 conditional move when trapping comparison was split to a
1846 non-trapping one (and vice versa).
1848 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1850 * config/s390/s390.c (s390_function_profiler): Generate nops
1851 instead of profiler call sequences.
1852 * config/s390/s390.opt: Add the new option.
1854 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1856 * config/s390/s390.c (s390_function_profiler): Generate
1857 __mcount_loc section.
1858 * config/s390/s390.opt: Add the new option.
1860 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1862 * common.opt: Add the new warning.
1863 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1864 %r0,__fentry__" when -mfentry is specified.
1865 (s390_option_override_internal): Disallow -mfentry for 31-bit
1867 * config/s390/s390.opt: Add the new option.
1869 2018-07-16 Richard Biener <rguenther@suse.de>
1872 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1873 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1875 2018-07-16 Martin Liska <mliska@suse.cz>
1878 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1881 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1883 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1885 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1887 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1889 * config/arc/arc-cpus.def (hs4x): New cpu.
1891 * config/arc/arc-tables.opt: Regenerate.
1892 * config/arc/arc.c (arc_sched_issue_rate): New function.
1893 (TARGET_SCHED_ISSUE_RATE): Define.
1894 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1895 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1897 (attr tune): Add ARCHS4x tune values.
1898 (attr tune_dspmpy): Define.
1899 (*tst): Correct instruction type.
1900 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1901 * config/arc/arcHS4x.md: New file.
1902 * config/arc/fpu.md: Update instruction type attributes.
1903 * config/arc/t-multilib: Regenerate.
1905 2018-07-16 Tom de Vries <tdevries@suse.de>
1908 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1910 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1912 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1915 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1917 PR tree-optimization/86514
1918 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1919 conversion to a boolean type from a type with greater precision.
1921 2018-07-16 Tom de Vries <tdevries@suse.de>
1923 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1924 dump_flags request TDF_SLIM.
1926 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1928 * fold-const.c (int_const_binop_1): Abstract...
1929 (wide_int_binop): ...wide int code here.
1930 (poly_int_binop): ...poly int code here.
1931 Abstract the rest of int_const_binop_1 into int_const_binop.
1932 * fold-const.h (wide_int_binop): New.
1933 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1934 Remove useless PLUS/MINUS_EXPR case.
1935 (zero_nonzero_bits_from_vr): Move wide int code...
1936 (zero_nonzero_bits_from_bounds): ...here.
1937 (extract_range_from_binary_expr_1): Move mask optimization code...
1938 (range_easy_mask_min_max): ...here.
1939 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1940 (range_easy_mask_min_max): New.
1942 2018-07-15 Jeff Law <law@redhat.com>
1945 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1948 2018-07-14 Jim Wilson <jimw@sifive.com>
1950 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1952 2018-07-14 Paul Koning <ni1d@arrl.net>
1954 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1956 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1958 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1961 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1962 Steve Munroe <munroesj52@gmail.com>
1964 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1965 (_mm_andnot_si128): Likewise.
1966 (_mm_or_si128): Likewise.
1967 (_mm_xor_si128): Likewise.
1969 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1972 * builtins.c (expand_builtin_memcmp): Inline the calls first
1973 when result_eq is false.
1974 (expand_builtin_strcmp): Inline the calls first.
1975 (expand_builtin_strncmp): Likewise.
1976 (inline_string_cmp): New routine. Expand a string compare
1977 call by using a sequence of char comparison.
1978 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1979 a call to str(n)cmp/memcmp.
1980 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1982 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1984 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1986 * config/arm/driver-arm.c: Include arm-native.h.
1987 (host_detect_local_cpu): Use auto-generated data tables.
1988 (vendors, arm_cpu_table): Delete. Move part information to ...
1989 * config/arm/arm-cpus.in: ... here.
1990 * config/arm/parsecpu.awk (gen_native): New function.
1991 (vendor, part): New CPU fields.
1992 (END): Add support for building the native CPU detection tables.
1993 * config/arm/t-arm (arm-native.h): Add build rule.
1994 (driver-arm.o): Add dependency on arm-native.h.
1996 2018-07-13 Richard Biener <rguenther@suse.de>
1999 * match.pd (addr1 - addr2): Allow either of the operand to
2002 2018-07-13 Tom de Vries <tdevries@suse.de>
2004 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2007 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2009 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2010 arrays instead of numbered variables.
2012 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2014 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2015 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2017 2018-07-13 Richard Biener <rguenther@suse.de>
2020 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2021 instead of get_context_die.
2023 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2024 Richard Biener <rguenther@suse.de>
2027 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2028 that the loop latch destination where phi is defined.
2030 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2032 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2033 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2034 (riscv_set_current_function): Extract getting interrupt type to new
2036 (riscv_get_interrupt_type): New function.
2037 (riscv_merge_decl_attributes): New function, checking interrupt type is
2039 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2041 2018-07-12 Paul Koning <ni1d@arrl.net>
2043 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2046 2018-07-12 Paul Koning <ni1d@arrl.net>
2048 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2049 zero reference, add doloop_end instead.
2050 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2051 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2052 detail for doloop_end.
2054 2018-07-12 Martin Sebor <msebor@redhat.com>
2057 * attribs.c (decl_attributes): Reject conflicting attributes before
2058 calling attribute handlers.
2060 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2062 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2064 (gcc::dump_manager::get_dump_file_name): likewise.
2065 (dump_begin): Likewise.
2066 * dumpfile.h (dump_begin): Update prototype.
2067 (gcc::dump_manager::get_dump_file_name,
2068 gcc::dump_manager::get_dump_file_name): Update prototype.
2070 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2072 * internal-fn.h (vectorizable_internal_fn_p): New function.
2073 * tree-vect-slp.c (compatible_calls_p): Likewise.
2074 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2075 to internal functions.
2076 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2078 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2080 * fold-const.h (inverse_conditions_p): Declare.
2081 * fold-const.c (inverse_conditions_p): New function.
2082 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2083 that test the inverse condition of a conditional internal function.
2084 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2085 * internal-fn.c (internal_fn_mask_index): Handle conditional
2087 (vectorized_internal_fn_supported_p): New function.
2088 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2089 (any_pred_load_store): Replace with...
2090 (need_to_predicate): ...this new variable.
2091 (redundant_ssa_names): New variable.
2092 (ifcvt_can_use_mask_load_store): Move initial checks to...
2093 (ifcvt_can_predicate): ...this new function. Handle tree codes
2094 for which a conditional internal function exists.
2095 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2096 instead of ifcvt_can_use_mask_load_store. Update after variable
2098 (predicate_load_or_store): New function, split out from
2099 predicate_mem_writes.
2100 (check_redundant_cond_expr): New function.
2101 (value_available_p): Likewise.
2102 (predicate_rhs_code): Likewise.
2103 (predicate_mem_writes): Rename to...
2104 (predicate_statements): ...this. Use predicate_load_or_store
2105 and predicate_rhs_code.
2106 (combine_blocks, tree_if_conversion): Update after above name changes.
2107 (ifcvt_local_dce): Handle redundant_ssa_names.
2108 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2109 general conditional functions.
2110 * tree-vect-stmts.c (vectorizable_call): Likewise.
2112 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2113 Alan Hayward <alan.hayward@arm.com>
2114 David Sherwood <david.sherwood@arm.com>
2116 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2117 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2118 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2119 plus and minus and convert them into IFN_COND_FMA-based sequences.
2120 (convert_mult_to_fma): Handle conditional plus and minus.
2122 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2124 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2125 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2126 (cond_fnms_optab): New optabs.
2127 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2129 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2130 * internal-fn.h (get_conditional_internal_fn): Declare.
2131 (get_unconditional_internal_fn): Likewise.
2132 * internal-fn.c (cond_ternary_direct): New macro.
2133 (expand_cond_ternary_optab_fn): Likewise.
2134 (direct_cond_ternary_optab_supported_p): Likewise.
2135 (FOR_EACH_COND_FN_PAIR): Likewise.
2136 (get_conditional_internal_fn): New function.
2137 (get_unconditional_internal_fn): Likewise.
2138 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2139 (gimple_match_op::gimple_match_op): Add a new overload for 5
2141 (gimple_match_op::set_op): Likewise.
2142 (gimple_resimplify5): Declare.
2143 * genmatch.c (decision_tree::gen): Generate simplifications for
2145 * gimple-match-head.c (gimple_simplify): Define an overload for
2146 5 operands. Handle calls with 5 arguments in the top-level overload.
2147 (convert_conditional_op): Handle conversions from unconditional
2148 internal functions to conditional ones.
2149 (gimple_resimplify5): New function.
2150 (build_call_internal): Pass a fifth operand.
2151 (maybe_push_res_to_seq): Likewise.
2152 (try_conditional_simplification): Try converting conditional
2153 internal functions to unconditional internal functions.
2154 Handle 3-operand unconditional forms.
2155 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2156 Define ternary equivalents of the current rules for binary conditional
2158 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2160 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2161 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2162 (optab): Handle them.
2163 (SVE_COND_FP_TERNARY): New int iterator.
2164 (sve_fmla_op, sve_fmad_op): New int attributes.
2165 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2166 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2167 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2169 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2171 * target.def (preferred_else_value): New target hook.
2172 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2173 * doc/tm.texi: Regenerate.
2174 * targhooks.h (default_preferred_else_value): Declare.
2175 * targhooks.c (default_preferred_else_value): New function.
2176 * internal-fn.h (conditional_internal_fn_code): Declare.
2177 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2178 (get_conditional_internal_fn): Use it.
2179 (conditional_internal_fn_code): New function.
2180 * gimple-match.h (gimple_match_cond): New struct.
2181 (gimple_match_op): Add a cond member function.
2182 (gimple_match_op::gimple_match_op): Update all forms to take a
2184 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2185 for the suboperation, but don't specify a particular else_value.
2186 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2187 (visit_nary_op, visit_reference_op_load): Pass
2188 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2189 * gimple-match-head.c: Include tree-eh.h
2190 (convert_conditional_op): New function.
2191 (maybe_resimplify_conditional_op): Likewise.
2192 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2193 (gimple_resimplify2): Likewise.
2194 (gimple_resimplify3): Likewise.
2195 (gimple_resimplify4): Likewise.
2196 (maybe_push_res_to_seq): Return null for conditional operations.
2197 (try_conditional_simplification): New function.
2198 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2200 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2202 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2204 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2206 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2208 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2210 (hash_tree): Do not hash DECL_FCONTEXT
2211 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2212 Do not stream DECL_FCONTEXT.
2213 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2214 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2216 2018-07-12 Richard Biener <rguenther@suse.de>
2219 * dwarf2out.c (gen_block_die): Only output blocks when they have
2220 at least one !DECL_IGNORED_P variable.
2222 2018-07-12 Richard Biener <rguenther@suse.de>
2225 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2226 Remove -mieee-fp handling.
2228 2018-07-12 Richard Biener <rguenther@suse.de>
2230 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2231 left-over from last patch.
2233 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2235 PR tree-optimization/86492
2236 * gimple-ssa-store-merging.c
2237 (imm_store_chain_info::coalesce_immediate_stores): Call
2238 check_no_overlap even for the merge_overlapping case. Formatting fix.
2240 2018-07-12 Richard Biener <rguenther@suse.de>
2243 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2244 move possibly trapping operations into the conditional.
2246 2018-07-12 Richard Biener <rguenther@suse.de>
2248 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2249 (vn_lookup_simplify_result): Remove recursion limit applied
2251 (vn_nary_build_or_lookup_1): Adjust.
2252 (try_to_simplify): Likewise.
2253 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2255 (gimple_resimplify2): Likewise.
2256 (gimple_resimplify3): Likewise.
2257 (gimple_resimplify4): Likewise.
2259 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2261 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2262 Use __mmask64 type instead of __mmask8 for __M argument.
2263 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2264 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2266 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2267 __mmask16 for __M argument.
2268 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2269 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2270 to __mmask16 instead of __mmask8.
2271 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2272 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2273 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2274 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2275 instead of __mmask16 for __U argument.
2276 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2277 __mmask16 instead of __mmask8 for __U argument.
2278 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2280 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2282 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2284 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2286 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2288 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2290 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2292 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2294 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2296 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2298 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2299 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2300 return type as well as __M argument type and all casts from __mmask8
2302 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2303 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2304 return type as well as __M argument type and all casts from __mmask8
2306 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2307 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2308 return type as well as __M argument type and all casts from __mmask8
2310 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2311 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2312 return type as well as __M argument type and all casts from __mmask8
2314 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2315 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2318 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2320 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2321 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2324 2018-07-11 Paul Koning <ni1d@arrl.net>
2326 * doc/md.texi (define_subst): Document how multiple occurrences of
2327 the same argument in the replacement pattern are handled.
2329 2018-07-11 Paul Koning <ni1d@arrl.net>
2331 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2333 (Common Type Attributes): Add "mode" attribute.
2335 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2337 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2338 stream DECL_ORIGINAL_TYPE.
2339 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2340 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2341 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2342 Do not walk original type.
2343 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2345 (write_ts_decl_non_common_tree_pointers): Do not stream
2347 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2348 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2350 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2352 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2353 thread twice from the same starting edge.
2355 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2357 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2358 * gimple.c (gimple_call_nonnull_result_p): ...here...
2359 (gimple_call_nonnull_arg): ...and here.
2360 * gimple.h (gimple_call_nonnull_result_p): New.
2361 (gimple_call_nonnull_arg): New.
2363 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2365 * config/arm/arm-cpus.in: Move information from fpu field of each
2366 cpu definition to the isa field.
2367 * config/arm/parsecpu.awk (fpu): Delete match rule.
2368 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2370 2018-07-11 Richard Biener <rguenther@suse.de>
2373 * dwarf2out.c (init_sections_and_labels): Use
2374 output_asm_line_debug_info consistently.
2375 (dwarf2out_early_finish): Likewise.
2376 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2379 2018-07-11 Richard Biener <rguenther@suse.de>
2381 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2382 Rework father_bb setting in a way to avoid propagating constants
2383 multiple times on a loop body.
2385 2018-07-10 Mark Wielaard <mark@klomp.org>
2388 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2390 2018-07-10 Richard Biener <rguenther@suse.de>
2392 * hash-map.h (hash_map::iterator::operator*): Return
2393 references to key and value.
2395 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2398 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2399 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2400 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2401 (gimplify_omp_for): For composite loops, move outer
2402 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2403 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2404 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2405 TREE_LIST for both the original class iterator and the "last" helper
2406 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2407 loop, remember has_decl_expr from outer composite loops for the
2408 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2410 2018-07-09 Martin Sebor <msebor@redhat.com>
2414 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2415 accessing implicitly initialized array elements.
2416 * expr.c (string_constant): Handle string initializers of
2417 character arrays within aggregates.
2418 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2419 Store element offset. As a special case, handle zero size.
2420 (fold_nonarray_ctor_reference): Same.
2421 (fold_ctor_reference): Add argument. Store subobject offset.
2422 * gimple-fold.h (fold_ctor_reference): Add argument.
2424 2018-07-09 Paul Koning <ni1d@arrl.net>
2426 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2427 (pdp11_insn_cost): New function.
2428 (pdp11_md_asm_adjust): New function.
2429 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2430 (pdp11_rtx_costs): Update to match machine better.
2431 (output_addr_const_pdp11): Correct format mismatch warnings.
2432 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2433 * config/pdp11/pdp11.md: General change to add base_cost and/or
2434 length attributes for use by new pdp11_insn_cost function.
2435 (MIN_BRANCH): Correct definition.
2437 (doloop_end): Use standard pattern name for looping pattern.
2438 (doloop_end_nocc): New.
2439 (movsf): Add another constraint alternative.
2440 (zero_extendqihi2): Add constraint alternatives for not in place
2442 (zero_extendhisi2): Remove.
2443 (shift patterns): Add CC handling variants.
2447 (define_peephole2): New peephole to recognize mov that sets CC for
2450 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2452 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2453 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2456 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2459 * real.c (real_nextafter): Return true if result is denormal.
2461 2018-07-09 Martin Liska <mliska@suse.cz>
2463 * common.opt: Add back wrongly removed attribute.
2465 2018-07-09 Richard Biener <rguenther@suse.de>
2468 * dwarf2out.c (gen_block_die): For an early generated DIE
2469 always output high/low PC attributes.
2471 2018-07-09 Tom de Vries <tdevries@suse.de>
2473 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2474 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2475 onto VAR_DECL with abstract origin.
2477 2018-07-07 Jim Wilson <jimw@sifive.com>
2479 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2481 2018-07-07 Tom de Vries <tdevries@suse.de>
2483 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2485 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2487 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2489 (combine_bound): Use wide-int overflow calculation instead of
2491 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2493 * fold-const.c (int_const_binop_2): Same.
2494 (extract_muldiv_1): Same.
2495 (fold_div_compare): Same.
2496 (fold_abs_const): Same.
2498 * poly-int.h (add): Same.
2502 * predict.c (predict_iv_comparison): Same.
2503 * profile-count.c (slow_safe_scale_64bit): Same.
2504 * simplify-rtx.c (simplify_const_binary_operation): Same.
2505 * tree-chrec.c (tree_fold_binomial): Same.
2506 * tree-data-ref.c (split_constant_offset_1): Same.
2507 * tree-if-conv.c (idx_within_array_bound): Same.
2508 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2509 * tree-ssa-phiopt.c (minmax_replacement): Same.
2510 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2511 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2512 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2513 * wide-int.cc (wi::add_large): Same.
2514 (wi::mul_internal): Same.
2515 (wi::sub_large): Same.
2516 (wi::divmod_internal): Same.
2517 * wide-int.h: Change overflow type to overflow_type for neg, add,
2518 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2519 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2520 mul_internal, divmod_internal.
2521 (overflow_type): New enum.
2522 (accumulate_overflow): New.
2524 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2526 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2527 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2529 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2531 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2532 argument is checked for zero before entering loop, avoid checking again.
2534 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2536 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2537 * gimplify.h (generic_expr_could_trap_p): Likwise.
2538 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2540 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2542 PR tree-optimization/86401
2543 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2544 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2545 (fold_bit_and_mask): ... here. New helper function for match.pd.
2546 * fold-const.h (fold_bit_and_mask): Declare.
2547 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2549 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2552 * target.def (translate_mode_attribute): New hook.
2553 * targhooks.h (default_translate_mode_attribute): Declare.
2554 * targhooks.c (default_translate_mode_attribute): New function.
2555 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2556 * doc/tm.texi: Regenerate.
2557 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2558 (rs6000_translate_mode_attribute): New function.
2560 2018-07-06 Paul Koning <ni1d@arrl.net>
2562 * doc/md.texi (define_split): Document DONE and FAIL.
2563 (define_peephole2): Ditto.
2565 2018-07-05 Jeff Law <law@redhat.com>
2567 PR tree-optimization/86010
2568 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2569 both the head and tail of mem* and str* calls.
2571 2018-07-05 Jim Wilson <jimw@sifive.com>
2573 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2575 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2577 * config/aarch64/aarch64-simd.md: correct flags text for
2578 MIN_EXPR replacement.
2580 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2582 * configure: Regenerated.
2584 2018-07-05 Carl Love <cel@us.ibm.com>
2586 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2587 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2588 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2589 VSX_BUILTIN_DOUBLEL_V4SF.
2591 2018-07-05 Martin Sebor <msebor@redhat.com>
2594 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2595 than its domain to compute its the upper bound of a char array.
2597 2018-07-05 Nathan Sidwell <nathan@acm.org>
2599 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2600 * doc/cpp.texi: Update comment.
2601 * doc/tm.texi: Rebuilt.
2602 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2603 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2604 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2605 headers affected by extern "C".
2606 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2607 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2608 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2609 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2610 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2611 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2612 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2613 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2614 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2615 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2616 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2617 config/sparc/sp64-elf.h, config/spu/spu.h,
2618 config/stormy16/stormy16.h, config/v850/v850.h,
2619 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2620 define NO_IMPLICIT_EXTERN_C.
2621 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2623 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2626 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2627 instead of GET_MODE_SIZE when comparing Units.
2629 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2632 * rtlanal.c (set_noop_p): Constrain on mode change,
2633 include hard-reg-set.h
2635 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2637 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2639 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2642 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2645 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2647 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2649 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2652 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2654 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2656 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2659 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2661 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2663 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2664 neg_*_op* variables.
2666 2018-07-04 Martin Liska <mliska@suse.cz>
2668 * tree-switch-conversion.c: Define
2669 max_ratio_for_speed and max_ratio_for_size constants.
2671 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2672 Martin Liska <mliska@suse.cz>
2677 * common.opt: Rename align options with 'str_' prefix.
2678 * common/config/i386/i386-common.c (set_malign_value): New
2680 (ix86_handle_option): Use it to set -falign-* options/
2681 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2682 type from int to string.
2683 * config/aarch64/aarch64.c: Update default values from int
2685 * config/alpha/alpha.c (alpha_override_options_after_change):
2687 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2688 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2689 max skip conditionally.
2690 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2691 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2692 max skip conditionally.
2693 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2694 max skip conditionally.
2695 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2696 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2697 max skip conditionally.
2698 * config/i386/i386.c (struct ptt): Change type from int to
2700 (ix86_default_align): Set default values.
2701 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2702 max skip conditionally.
2703 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2704 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2705 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2706 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2707 max skip conditionally.
2708 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2709 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2710 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2711 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2712 max skip conditionally.
2713 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2714 * config/ia64/ia64.c (ia64_option_override): Set default values
2715 for alignment options.
2716 * config/m68k/m68k.c: Handle new str_align_* options.
2717 * config/mips/mips.c (mips_set_compression_mode): Change
2719 (mips_option_override): Set default values for options.
2720 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2722 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2724 * config/rx/rx.c (rx_option_override): Likewise.
2725 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2726 (LABEL_ALIGN): Use align_labels_log.
2727 (LOOP_ALIGN): Use align_loops_align.
2728 * config/s390/s390.c (s390_asm_output_function_label): Use new
2730 * config/sh/sh.c (sh_override_options_after_change):
2731 Change type of constants.
2732 * config/spu/spu.c (spu_sched_init): Likewise.
2733 * config/sparc/sparc.c (sparc_option_override): Set default
2735 * config/visium/visium.c (visium_option_override): Likewise.
2736 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2737 emit p2align format with last argument if it's not needed.
2738 * doc/invoke.texi: Document extended format of -falign-*.
2739 * final.c: Use align_labels alignment.
2740 * flags.h (struct target_flag_state): Change type to use
2742 (struct align_flags_tuple): New.
2743 (struct align_flags): Likewise.
2744 (align_loops_log): Redefine macro to use new types.
2745 (align_loops_max_skip): Redefine macro to use new types.
2746 (align_jumps_log): Redefine macro to use new types.
2747 (align_jumps_max_skip): Redefine macro to use new types.
2748 (align_labels_log): Redefine macro to use new types.
2749 (align_labels_max_skip): Redefine macro to use new types.
2750 (align_functions_log): Redefine macro to use new types.
2751 (align_loops): Redefine macro to use new types.
2752 (align_jumps): Redefine macro to use new types.
2753 (align_labels): Redefine macro to use new types.
2754 (align_functions): Redefine macro to use new types.
2755 (align_functions_max_skip): Redefine macro to use new types.
2756 (align_loops_value): New macro.
2757 (align_jumps_value): New macro.
2758 (align_labels_value): New macro.
2759 (align_functions_value): New macro.
2760 * function.c (invoke_set_current_function_hook): Propagate
2761 alignment values from flags to global variables default in
2763 * ipa-icf.c (sem_function::equals_wpa): Use
2764 cl_optimization_option_eq instead of memcmp.
2765 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2767 (cl_optimization_stream_in): Likewise.
2768 * optc-save-gen.awk: Support strings in cl_optimization.
2769 * opth-gen.awk: Likewise.
2770 * opts.c (finish_options): Remove error checking of invalid
2772 (MAX_CODE_ALIGN): Remove.
2773 (MAX_CODE_ALIGN_VALUE): Likewise.
2774 (parse_and_check_align_values): New function.
2775 (check_alignment_argument): Likewise.
2776 (common_handle_option): Use check_alignment_argument.
2777 * opts.h (parse_and_check_align_values): Declare.
2778 * toplev.c (init_alignments): Remove.
2779 (read_log_maxskip): New.
2780 (parse_N_M): Likewise.
2781 (parse_alignment_opts): Likewise.
2782 (backend_init_target): Remove usage of init_alignments.
2783 * toplev.h (parse_alignment_opts): Declare.
2784 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2786 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2787 * tree.c (cl_option_hasher::equal): New.
2788 * varasm.c: Use new global macros.
2790 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2792 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2793 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2794 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2795 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2796 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2797 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2798 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2799 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2800 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2801 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2802 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2803 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2804 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2806 2018-07-04 Martin Liska <mliska@suse.cz>
2807 Jonathan Wakely <jwakely@redhat.com>
2809 * coverage.c: Use correct type.
2810 * doc/invoke.texi: Language correction.
2812 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2815 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2816 ENDBRANCH for non-tail call which may return via indirect branch.
2817 * doc/extend.texi: Document indirect_return attribute.
2819 2018-07-03 Martin Sebor <msebor@redhat.com>
2821 PR tree-optimization/86274
2822 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2824 (format_floating): Correct handling of infinities and NaNs.
2826 2018-07-03 Martin Sebor <msebor@redhat.com>
2828 * print-tree.c (print_real_cst): New function.
2829 (print_node_brief): Call it.
2830 (print_node): Ditto.
2832 2018-07-03 Jeff Law <law@redhat.com>
2834 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2835 into a single pattern.
2837 * config/h8300/h8300.md (ors code_iterator): New.
2838 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2839 a single pattern and single splitter.
2840 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2841 (iorqi3_1, xorqi3_1): Likewise.
2842 (iorqi3, xorqi3 expanders): Similarly.
2844 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2845 (movmd_internal) into a single pattern using the P mode iterator.
2846 (movmd splitters): Similarly.
2847 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2848 (movsd splitters): Similarly.
2850 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2851 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2852 right table based on the size of the operand.
2853 * config/h8300/h8300.md (length_table): Corresponding changes. All
2854 references to "addb", "addw" and "addl" changed to "add".
2855 (btst patterns): Merge two variants into a single pattern.
2856 (tstqi, tsthi): Likewise.
2857 (addhi3_incdec, addsi3_incdec): Likewise.
2858 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2859 (mulhi3, mulsi3): Likewise.
2860 (udivhi3, udivsi3): Likewise.
2861 (divhi3, divsi3): Likewise.
2862 (andorqi3, andorhi3, andorsi3): Likewise.
2864 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2867 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2868 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2870 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2872 PR tree-optimization/85694
2873 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2874 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2876 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2877 (<u>avg<mode>3_ceil): New patterns.
2879 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2881 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2882 scan-tree-dump directive.
2883 * gcc.dg/vect/slp-perm-2.c: Likewise.
2884 * gcc.dg/vect/slp-perm-3.c: Likewise.
2885 * gcc.dg/vect/slp-perm-5.c: Likewise.
2886 * gcc.dg/vect/slp-perm-6.c: Likewise.
2887 * gcc.dg/vect/slp-perm-7.c: Likewise.
2888 * gcc.dg/vect/slp-perm-8.c: Likewise.
2890 2018-07-03 Marek Polacek <polacek@redhat.com>
2893 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2895 2018-07-03 Richard Biener <rguenther@suse.de>
2898 * tree-ssa-structalias.c (find_func_clobbers): Properly
2899 handle indirect calls.
2901 2018-07-03 Jeff Law <law@redhat.com>
2903 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2904 (shifts): New code iterator.
2905 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2906 expander. Fix HImode handling on H8/SX.
2907 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2908 (subqi3, subhi3, subsi3 expanders): Likewise.
2909 (andqi3, andhi3, andsi3 expanders): Likewise.
2910 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2911 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2912 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2913 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2914 (zero_extendqihi2, zero_extendqisi2): Likewise.
2915 (extendqihi2, extendqisi2): Likewise.
2916 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2917 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2918 (rotlqi3_1, rotlhi3_1): Likewise.
2919 (logicalhi3_sn, logicalsi3_sn): Likewise.
2920 (logicalhi3, logicalsi3): Likewise.
2922 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2924 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2925 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2926 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2927 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2928 type to append_pattern_def_seq instead of creating a stmt_vec_info
2930 (build_mask_conversion): Likewise. Remove vinfo argument.
2931 (vect_add_conversion_to_patterm): Likewise, renaming to...
2932 (vect_add_conversion_to_pattern): ...this.
2933 (vect_recog_mask_conversion_pattern): Update call to
2934 build_mask_conversion. Pass the vector type to
2935 append_pattern_def_seq here too.
2936 (vect_recog_gather_scatter_pattern): Update call to
2937 vect_add_conversion_to_pattern.
2939 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2941 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2942 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2943 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2944 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2945 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2946 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2947 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2948 append_pattern_def_seq instead of new_pattern_def_seq.
2949 (vect_recog_divmod_pattern): Do both of the above.
2950 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2953 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2955 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2956 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2957 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2958 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2959 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2960 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2961 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2962 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2963 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2964 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2965 parameter with a single stmt_vec_info.
2966 (vect_recog_func_ptr): Likewise.
2967 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2968 (vect_try_gather_scatter_pattern): ...this.
2969 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2970 the stmt_vec_info of the statement to be matched. Don't clear
2971 STMT_VINFO_RELATED_STMT.
2972 (vect_pattern_recog): Update call accordingly.
2974 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2976 PR tree-optimization/85694
2977 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2978 (uavgM3_ceil): Document new optabs.
2979 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2980 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2982 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2983 (savg_ceil_optab): New optabs.
2984 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2985 (vect_vect_recog_func_ptrs): Add it.
2986 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2987 constant directly from the associated lhs.
2989 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2991 * tree-vect-patterns.c (vect_split_statement): New function.
2992 (vect_convert_input): Use it to try to split an existing cast.
2994 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2996 * poly-int.h (print_hex): New function.
2997 * dumpfile.h (dump_dec, dump_hex): Declare.
2998 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2999 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3000 min_input_precision, operation_precision and operation_sign.
3001 * tree-vect-patterns.c (vect_get_range_info): New function.
3002 (vect_same_loop_or_bb_p, vect_single_imm_use)
3003 (vect_operation_fits_smaller_type): Delete.
3004 (vect_look_through_possible_promotion): Add an optional
3005 single_use_p parameter.
3006 (vect_recog_over_widening_pattern): Rewrite to use new
3007 stmt_vec_info infomration. Handle one operation at a time.
3008 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3009 (vect_truncatable_operation_p, vect_set_operation_type)
3010 (vect_set_min_input_precision): New functions.
3011 (vect_determine_min_output_precision_1): Likewise.
3012 (vect_determine_min_output_precision): Likewise.
3013 (vect_determine_precisions_from_range): Likewise.
3014 (vect_determine_precisions_from_users): Likewise.
3015 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3016 (vect_vect_recog_func_ptrs): Put over_widening first.
3018 (vect_pattern_recog): Call vect_determine_precisions.
3020 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3022 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3023 statements that have been replaced by further pattern statements.
3024 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3026 2018-07-03 Richard Biener <rguenther@suse.de>
3028 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3029 always set *dt. Dump vectype in vectype overload.
3030 * dumpfile.h (dump_gimple_expr): New function.
3031 (dump_gimple_expr_loc): Likewise.
3032 * dumpfile.c (dump_gimple_expr): New function.
3033 (dump_gimple_expr_loc): Likewise.
3035 2018-07-02 Jeff Law <law@redhat.com>
3037 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3038 the H8/300, H8/300H and H8/S variants into a single pattern.
3039 (movhi_h8300, movqi_h8300hs): Similarly.
3040 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3041 (QHI mode iterator): New.
3043 * config/h8300/h8300.md: Remove trailing whitespace.
3045 2018-07-02 Jim Wilson <jimw@sifive.com>
3047 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3048 instead of emit_insn for interrupt returns.
3049 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3050 (riscv_sret, riscv_uret): Likewise.
3052 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3054 * pretty-print.c (selftest::test_pp_format): Move save and restore
3055 of quotes to class auto_fix_quotes, and add an instance.
3056 * selftest.c: Include "intl.h".
3057 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3058 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3059 * selftest.h (selftest::auto_fix_quotes): New class.
3061 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3063 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3064 (aarch64_sve_prepare_conditional_op): Remove.
3065 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3066 Allow aarch64_simd_reg_or_zero as select operand; remove
3067 the aarch64_sve_prepare_conditional_op call.
3068 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3069 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3070 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3071 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3072 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3073 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3074 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3075 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3076 and a splitters to match all of the *_any patterns.
3077 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3079 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3080 (SVE_COND_FP_BINARY_REV): Remove.
3081 (sve_int_op_rev, sve_fp_op_rev): New.
3082 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3083 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3084 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3085 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3086 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3087 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3088 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3089 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3090 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3092 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3093 Remove match_dup 1 from the inner unspec.
3094 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3096 * config/aarch64/aarch64.md (movprfx): New attr.
3097 (length): Default movprfx to 8.
3098 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3099 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3100 (*<su>mul<SVE_I>3_highpart): Likewise.
3101 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3102 (*v<ASHIFT><SVE_I>3): Likewise.
3103 (*<su><MAXMIN><SVE_I>3): Likewise.
3104 (*<su><MAXMIN><SVE_F>3): Likewise.
3105 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3106 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3107 (*div<SVE_F>4): Likewise.
3109 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3111 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3114 2018-07-02 Richard Biener <rguenther@suse.de>
3116 PR tree-optimization/86363
3117 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3118 memset argument refers to a non-variable address.
3120 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3122 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3123 {PLUS,MINUS}_EXPR code to...
3124 (adjust_symbolic_bound): ...here,
3125 (combine_bound): ...here,
3126 (set_value_range_with_overflow): ...and here.
3128 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3130 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3132 (extract_range_from_abs_expr): ...here.
3134 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3136 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3137 -fno-omit-frame-pointer when not optimizing.
3139 2018-07-02 Martin Liska <mliska@suse.cz>
3142 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3143 (propagate_nothrow): Likewise.
3145 2018-07-02 Martin Liska <mliska@suse.cz>
3148 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3150 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3152 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3153 function in r262149, changing "loc" param from source_location to
3154 const dump_location_t &.
3155 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3156 declaration, as above.
3158 2018-07-01 Paul Koning <ni1d@arrl.net>
3160 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3161 -munit-asm, -mgnu-asm, -mdec-asm.
3162 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3163 (pdp11_output_labelref): New.
3164 (pdp11_output_def): New.
3165 (pdp11_output_addr_vec_elt): New.
3166 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3167 %# and %@ format codes.
3168 (pdp11_option_override): New.
3169 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3170 (pdp11_output_ident): New.
3171 (pdp11_asm_named_section): New.
3172 (pdp11_asm_init_sections): New.
3173 (pdp11_file_start): New.
3174 (pdp11_file_end): New.
3175 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3176 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3177 %o, like %c but octal.
3178 (pdp11_option_override): New.
3179 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3181 (DATA_SECTION_ASM_OP): Ditto.
3182 (READONLY_DATA_SECTION_ASM_OP): New.
3183 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3184 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3185 (ASM_OUTPUT_LABELREF): Ditto.
3186 (ASM_OUTPUT_DEF): Ditto.
3187 (ASM_OUTPUT_EXTERNAL): New.
3188 (ASM_OUTPUT_SOURCE_FILENAME): New.
3189 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3190 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3191 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3192 %# and %@ format codes.
3193 * config/pdp11/pdp11.opt (mgnu-asm): New.
3194 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3195 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3196 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3198 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3200 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3201 dereferencing path[] beyond its length.
3203 (debug_all_paths): New.
3204 (rewire_first_differing_edge): New.
3205 (adjust_paths_after_duplication): New.
3206 (duplicate_thread_path): Call adjust_paths_after_duplication.
3208 (thread_through_all_blocks): Add new argument to
3209 duplicate_thread_path.
3211 2018-06-30 Jim Wilson <jimw@sifive.com>
3213 * config/riscv/predicates.md (p2m1_shift_operand): New.
3214 (high_mask_shift_operand): New.
3215 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3216 pattern using p2m1_shift_operand.
3217 (lshsi3_zero_extend_3+2): New combiner pattern using
3218 high_mask_shift_operand.
3220 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3222 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3224 (vect_recog_rotate_pattern): ...here.
3225 (vect_convert_input): Try to insert casts of invariants in the
3227 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3228 preheader to be empty.
3230 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3232 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3233 vector type. If given, install it in the new statement's
3235 (vect_element_precision): New function.
3236 (vect_unpromoted_value): New struct.
3237 (vect_unpromoted_value::vect_unpromoted_value): New function.
3238 (vect_unpromoted_value::set_op): Likewise.
3239 (vect_look_through_possible_promotion): Likewise.
3240 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3241 (vect_widened_op_tree, vect_convert_input): Likewise.
3242 (vect_convert_inputs, vect_convert_output): Likewise.
3243 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3244 to handle the optional cast of the multiplication result and
3245 vect_widened_op_tree to detect the widened multiplication itself.
3246 Do not require the input and output of promotion casts to have
3247 the same sign, but base the signedness of the operation on the
3248 input rather than the result. If the pattern includes two
3249 promotions, check that those promotions have the same sign.
3250 Do not restrict the MULT_EXPR handling to a double-width result;
3251 handle quadruple-width results and wider. Use vect_convert_inputs
3252 to convert the inputs to the common type.
3253 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3254 to handle the optional cast of the ABS result. Also allow a sign
3255 change or a sign extension between the ABS and MINUS.
3256 Use vect_widened_op_tree to detect the widened subtraction and use
3257 vect_convert_inputs to convert the inputs to the common type.
3258 (vect_handle_widen_op_by_const): Delete.
3259 (vect_recog_widen_op_pattern): New function.
3260 (vect_recog_widen_mult_pattern): Use it.
3261 (vect_recog_widen_shift_pattern): Likewise.
3262 (vect_recog_widen_sum_pattern): Use
3263 vect_look_through_possible_promotion to handle the promoted
3266 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3268 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3269 the containing gimple_seq *.
3270 * gimple-iterator.h (gsi_for_stmt): Declare it.
3271 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3272 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3273 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3274 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3275 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3277 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3279 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3280 statement being replaced is part of an existing pattern
3281 definition sequence, inserting the new pattern statements before
3283 (vect_pattern_recog_1): Don't return a bool. If the statement
3284 is already part of a pattern, instead apply pattern matching
3285 to the pattern definition statements. Don't clear the
3286 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3287 (vect_pattern_recog): Don't break after the first match;
3288 continue processing the pattern definition statements instead.
3289 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3291 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3293 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3294 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3295 (vect_recog_widen_sum_pattern): Use it.
3297 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3299 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3300 phi is not a pattern statement and has not been replaced by
3301 a pattern statement.
3302 * tree-vect-patterns.c (type_conversion_p): Don't check
3303 STMT_VINFO_IN_PATTERN_P.
3304 (vect_recog_vector_vector_shift_pattern): Likewise.
3305 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3306 the pattern statement rather than the original statement; check
3307 directly for a WIDEN_MULT_EXPR here.
3308 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3309 vect_is_simple_use to return the pattern statement rather
3310 than the original statement; use is_pattern_stmt_p to check
3311 for such a pattern statement.
3312 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3313 to return the pattern statement rather than the original statement;
3314 don't do the same transformation here.
3315 (vect_is_simple_use): If the defining statement has been replaced
3316 by a pattern statement, return the pattern statement instead.
3317 Remove the corresponding (local) transformation from the vectype
3320 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3322 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3323 end and default to null.
3324 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3325 (vectorizable_reduction): Update calls accordingly, dropping the
3326 gimple ** argument if the passed-back statement isn't needed.
3327 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3328 (vect_recog_rotate_pattern): Likewise.
3329 (vect_recog_mask_conversion_pattern): Likewise.
3330 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3331 (vect_mask_constant_operand_p): Likewise.
3332 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3333 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3334 (get_group_load_store_type, get_load_store_type): Likewise.
3335 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3336 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3337 (vectorizable_conversion, vectorizable_assignment): Likewise.
3338 (vectorizable_shift, vectorizable_operation): Likewise.
3339 (vectorizable_store, vect_is_simple_cond): Likewise.
3340 (vectorizable_condition, vectorizable_comparison): Likewise.
3341 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3342 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3343 and move it to the end. Cope with null def_stmt_outs.
3345 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3347 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3349 2018-06-29 Jeff Law <law@redhat.com>
3351 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3352 displacements for TARGET_V850E2V3 and newer.
3353 (TARGET_LRA_P): Remove. Defaults to LRA now.
3354 * config/v850/v850.md (sign23byte_load): Remove.
3355 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3356 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3358 2018-06-29 Martin Liska <mliska@suse.cz>
3361 * coverage.c (coverage_init): Mangle full path name.
3362 * doc/invoke.texi: Document the change.
3363 * gcov-io.c (mangle_path): New.
3364 * gcov-io.h (mangle_path): Likewise.
3365 * gcov.c (mangle_name): Use mangle_path for path mangling.
3367 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3369 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3370 if starting source register is not even.
3372 2018-06-29 Martin Liska <mliska@suse.cz>
3374 PR tree-optimization/86263
3375 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3376 Make edge redirection.
3378 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3380 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3381 (dump_scope_depth): New variable.
3382 (get_dump_scope_depth): New function.
3383 (dump_begin_scope): New function.
3384 (dump_end_scope): New function.
3385 * dumpfile.h (get_dump_scope_depth): New declaration.
3386 (dump_begin_scope): New declaration.
3387 (dump_end_scope): New declaration.
3388 (class auto_dump_scope): New class.
3389 (AUTO_DUMP_SCOPE): New macro.
3390 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3393 2018-06-29 Richard Biener <rguenther@suse.de>
3395 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3396 compute_all_dependences succeeds.
3397 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3398 exceed --param loop-max-datarefs-for-datadeps.
3400 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3402 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3404 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3407 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3408 alternative 0 in preferred_for_speed attribute.
3410 2018-06-28 Paul Koning <ni1d@arrl.net>
3412 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3413 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3414 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3415 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3416 for shift insn patterns.
3418 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3420 * cgraph.c (cgraph_node::get_body): Replace assignments to
3421 "dump_file" with calls to set_dump_file.
3422 * dumpfile.c (alt_dump_file): Make static, and group with...
3423 (alt_flags): ...this definition.
3424 (dumps_are_enabled): New variable.
3425 (refresh_dumps_are_enabled): New function.
3426 (set_dump_file): New function.
3427 (set_alt_dump_file): New function.
3428 (gcc::dump_manager::dump_start): Replace assignments to
3429 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3431 (gcc::dump_manager::dump_finish): Likewise.
3432 * dumpfile.h (alt_dump_file): Delete decl.
3433 (dumps_are_enabled): New variable decl.
3434 (set_dump_file): New function decl.
3435 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3437 * tree-nested.c (lower_nested_functions): Replace assignments to
3438 "dump_file" with calls to set_dump_file.
3440 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3442 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3443 goto_locus of each outgoing edge of each basic block.
3445 2018-06-28 Richard Biener <rguenther@suse.de>
3447 * dwarf2out.c (decl_scope_table): Remove.
3448 (push_decl_scope): Likewise.
3449 (pop_decl_scope): Likewise.
3450 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3451 (gen_struct_or_union_type_die): Likewise.
3452 (gen_tagged_type_die): Likewise.
3453 (dwarf2out_init): Do not initialize decl_scope_table.
3454 (dwarf2out_c_finalize): Do not free it.
3456 2018-06-28 Richard Biener <rguenther@suse.de>
3458 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3459 deciding whether to not re-use a DIE.
3461 2018-06-28 Richard Biener <rguenther@suse.de>
3463 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3464 DW_AT_abstract_origin attribute.
3466 2018-06-28 Martin Liska <mliska@suse.cz>
3468 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3469 Use newly introduced constants.
3470 * tree-switch-conversion.h (struct jump_table_cluster):
3471 Define max_ratio_for_size and max_ratio_for_speed.
3473 2018-06-28 Martin Liska <mliska@suse.cz>
3475 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3476 Add new checking assert to catch invalid state.
3477 (jump_table_cluster::can_be_handled): Handle single case
3479 (jump_table_cluster::is_beneficial): Bail out for such case.
3480 (bit_test_cluster::find_bit_tests):
3481 Add new checking assert to catch invalid state.
3482 (bit_test_cluster::can_be_handled): Handle single case
3484 (bit_test_cluster::is_beneficial): Bail out for such case.
3485 (switch_decision_tree::analyze_switch_statement):
3488 2018-06-28 Martin Liska <mliska@suse.cz>
3490 * common.opt: Introduce -completion option.
3491 * gcc.c (driver_handle_option): Handle it.
3492 (driver::main): Print completions if completion
3494 * opt-suggestions.c (option_proposer::get_completions):
3496 (option_proposer::suggest_completion): Likewise.
3497 (option_proposer::find_param_completions): Likewise.
3498 (verify_autocompletions): Likewise.
3499 (test_completion_valid_options): Likewise.
3500 (test_completion_valid_params): Likewise.
3501 (in_completion_p): Likewise.
3502 (empty_completion_p): Likewise.
3503 (test_completion_partial_match): Likewise.
3504 (test_completion_garbage): Likewise.
3505 (opt_proposer_c_tests): Likewise.
3506 * opt-suggestions.h: Declare new functions.
3507 * opts.c (common_handle_option): Handle OPT__completion_.
3508 * selftest-run-tests.c (selftest::run_tests): Add
3509 opt_proposer_c_tests.
3510 * selftest.c (assert_str_startswith): New.
3511 * selftest.h (assert_str_startswith): Likewise.
3512 (opt_proposer_c_tests): New.
3513 (ASSERT_STR_STARTSWITH): Likewise.
3515 2018-06-28 Martin Liska <mliska@suse.cz>
3517 * Makefile.in: Add opt-suggestions.o.
3518 * gcc-main.c: Include opt-suggestions.h.
3519 * gcc.c (driver::driver): Likewise.
3520 (driver::~driver): Remove m_option_suggestions.
3521 (driver::build_option_suggestions): Moved to option_proposer.
3522 (driver::suggest_option): Likewise.
3523 (driver::handle_unrecognized_options): Use option_proposer.
3524 * gcc.h (class driver): Add new memver m_option_proposer.
3525 * opt-suggestions.c: New file.
3526 * opt-suggestions.h: New file.
3528 2018-06-28 Martin Liska <mliska@suse.cz>
3530 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3531 (auto_string_vec::~auto_string_vec): Likewise.
3533 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3535 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3536 prevent_decl_creation_for_types fields up and add reset_location field.
3537 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3538 statement if id->reset_location is true.
3539 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3540 id->reset_location is true.
3541 (copy_phis_for_bb): Force input_location on the arguments if
3542 id->reset_location is true.
3543 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3544 is set on the function to be inlined.
3546 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3548 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3550 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3552 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3553 registers for Pmode.
3554 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3555 hard registers for the clobbered pseudo.
3557 2018-06-27 Paul Koning <ni1d@arrl.net>
3559 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3560 mutually exclusive options.
3561 * config/pdp11/constraints.md (h): New constraint.
3562 (O): Update definition to match shift code generation.
3563 (D): New constraint.
3564 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3566 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3568 (output_jump): Change arguments.
3569 (pdp11_fixed_cc_regs): New function.
3570 (pdp11_cc_mode): Ditto.
3571 (pdp11_expand_shift): Ditto.
3572 (pdp11_assemble_shift): Ditto.
3573 (pdp11_small_shift): Ditto.
3574 (pdp11_branch_cost): Remove.
3575 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3577 (pdp11_register_move_cost): Update for CC registers.
3578 (pdp11_rtx_costs): Add case for LSHIFTRT.
3579 (pdp11_output_jump): Add CCNZ mode conditional branches.
3580 (notice_update_cc_on_set): Remove.
3581 (pdp11_cc_mode): New function.
3582 (simple_memory_operand): Correct pre/post decrement case.
3583 (no_side_effect_operand): New function.
3584 (pdp11_regno_reg_class): Add CC_REGS class.
3585 (pdp11_fixed_cc_regs): New function.
3586 (pdp11_small_shift): New function.
3587 (pdp11_expand_shift): New function to expand shift insns.
3588 (pdp11_assemble_shift): New function to output shifts.
3589 (pdp11_branch_cost): Remove.
3590 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3591 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3592 (WCHAR_TYPE): Ditto.
3593 (PTRDIFF_TYPE): Ditto.
3594 (ADJUST_INSN_LENGTH): New macro.
3595 (FIXED_REGISTERS): Add CC registers.
3596 (CALL_USED_REGISTERS): Ditto.
3598 (REG_CLASS_NAMES): Ditto.
3599 (REG_CLASS_CONTENTS): Ditto.
3600 (SELECT_CC_MODE): Use new function.
3601 (TARGET_FLAGS_REGNUM): New macro.
3602 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3603 (cc0_reg_rtx): Remove.
3604 (CC_STATUS_MDEP): Remove.
3605 (CC_STATUS_MDEFP_INIT): Remove.
3606 (CC_IN_FPU): Remove.
3607 (NOTICE_UPDATE_CC): Remove.
3608 (REGISTER_NAMES): Add CC registers.
3609 (BRANCH_COST): Change to constant 1.
3610 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3612 * config/pdp11/pdp11.opt (mbcopy): Remove.
3613 (mbcopy-builtin): Remove.
3614 (mbranch-cheap): Remove.
3615 (mbranch-expensive): Remove.
3616 * config/pdp11/predicates.md (expand_shift_operand): Update to
3617 match shift code generation.
3618 (ccnz_operator): New predicate.
3619 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3620 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3621 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3623 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3624 description of O constraint.
3626 2018-06-27 Jeff Law <law@redhat.com>
3627 Austin Law <austinklaw@gmail.com>
3629 * config/v850/v850.md (addsi3_set_flags): New pattern.
3630 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3631 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3632 (zero_extendhisi2_v850_set_flags): Likewise.
3633 (zero_extendqisi2_v850_set_flags): Likewise.
3634 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3635 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3636 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3638 * config/v850/v850-protos.h (notice_update_cc): Remove.
3639 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3640 (v850_print_operand): Handle 'D' and "d".
3641 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3642 Add handling of arithmetic/logical operations compared against zero.
3643 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3644 Do not look at v850_compare_op, instead get mode from last argument.
3645 (v850_gen_compare): Remove
3646 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3647 after reload for prologue insns.
3648 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3650 (construct_save_jarl): Likewise.
3651 (TARGET_FLAGS_REGNUM): Define.
3652 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3653 (NOTICE_UPDATE_CC): Remove.
3654 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3655 than cc0. Conditionalize on reload_completed.
3656 (cmpsi_insn, setfcc_insn): Likewise.
3657 (tst1 splitter): Turn into define_and_split which sets the flags
3659 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3660 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3661 (cstoresf4, cstoredf4): Clobber the flags.
3662 (cmpsi, cmpsf, cmpdf): Remove expanders.
3663 (setf_insn): Remove pattern.
3664 (addsi3): Turn into define_and_split which clobbers the flags after
3665 reload and a suitable pattern (addsi3_clobber_flags) for use after
3667 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3668 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3669 (ashrsi3, ashrsi3_v850e2): Likewise.
3670 (bins): Clobber the flags.
3671 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3672 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3673 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3674 (call_value_internal_short, call_value_internal_long): Likewise.
3675 (callt_save_interrupt, callt_return_interrupt): Likewise.
3676 (save_interrupt, return_interrupt): Likewise.
3677 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3678 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3679 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3680 (All FP comparisons): Only allow after reload has completed.
3682 (divh, divhu): Tweak output template.
3683 (branch_z_normal, branch_z_invert): Remove
3684 (branch_nz_normal, branch_nz_invert): Likewise.
3685 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3687 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3688 * config/v850/v850.c (notice_update_cc): Remove.
3689 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3690 (CC_NO_CARRY): Likewise.
3691 (NOTICE_UPDATE_CC): Define to nothing.
3692 * config/v850/v850.md: Remove block comment on cc0 handling
3693 Remove "cc" attribute from all patterns. Remove cc_status handling
3694 from all patterns. Minor formatting fixes.
3696 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3698 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3699 (cortex-a76.cortex-a55): Likewise.
3700 * config/aarch64/aarch64-tune.md: Regenerate.
3701 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3702 cortex-a76.cortex-a55.
3704 2018-06-27 Jeff Law <law@redhat.com>
3706 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3707 (MULTILIB_DIRNAMES): Similarly.
3709 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3711 * gimple.h (gimple_return_retbnd): Delete.
3712 (gimple_return_set_retbnd): Likewise.
3713 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3714 gimple_return_set_retbnd.
3715 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3716 gimple_return_retbnd and adjust.
3717 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3718 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3719 Explicitly return NULL in a couple more cases. Move assertion
3720 on debug statements and remove unreachable code.
3721 (reset_debug_binding): Do not test id->retbnd.
3722 (expand_call_inline): Do not set it.
3724 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3726 * configure.ac: Add --disable-gcov option.
3727 * configure: Regenerate.
3728 * Makefile.in: Honour @enable_gcov@.
3729 * doc/install.texi: Document --disable-gcov.
3731 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3733 * config/arm/arm-cpus.in (cortex-a76): New entry.
3734 (cortex-a76.cortex-a55): Likewise.
3735 * config/arm/arm-tables.opt: Regenerate.
3736 * config/arm/arm-tune.md: Likewise.
3737 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3738 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3739 cortex-a76.cortex-a55.
3741 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3744 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3746 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3748 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3750 (EPILOGUE_USES): Likewise.
3752 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3754 * tree-inline.c (remap_location): New function extracted from...
3755 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3756 (copy_phis_for_bb): ...here. Call remap_location.
3757 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3759 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3761 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3762 unaligned vsx for 16B memset.
3764 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3767 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3768 ieee128_float_type_node to long_double_type_node unless
3769 TARGET_LONG_DOUBLE_128 is set.
3771 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3773 * cfgloop.c (get_loop_location): Convert return type from
3774 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3775 by implicit construction from rtx_insn *, and using
3776 dump_user_location_t::from_function_decl for the fallback case.
3777 * cfgloop.h (get_loop_location): Convert return type from
3778 location_t to dump_user_location_t.
3779 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3780 dump_printf_loc to pass in a dump_location_t rather than a
3781 location_t, via the gimple stmt.
3782 * coverage.c (get_coverage_counts): Update calls to
3783 dump_printf_loc to pass in dump_location_t rather than a
3785 * doc/optinfo.texi (Dump types): Convert example of
3786 dump_printf_loc from taking "locus" to taking "insn". Update
3787 description of the "_loc" calls to cover dump_location_t.
3788 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3790 (dump_user_location_t::dump_user_location_t): New constructors,
3791 from gimple *stmt and rtx_insn *.
3792 (dump_user_location_t::from_function_decl): New function.
3793 (dump_loc): Make static.
3794 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3795 const dump_location_t &.
3796 (dump_generic_expr_loc): Delete.
3797 (dump_printf_loc): Convert param "loc" from location_t to
3798 const dump_location_t &.
3799 (selftest::test_impl_location): New function.
3800 (selftest::dumpfile_c_tests): New function.
3801 * dumpfile.h: Include "profile-count.h".
3802 (class dump_user_location_t): New class.
3803 (struct dump_impl_location_t): New struct.
3804 (class dump_location_t): New class.
3805 (dump_printf_loc): Convert 2nd param from source_location to
3806 const dump_location_t &.
3807 (dump_generic_expr_loc): Delete.
3808 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3809 const dump_location_t &.
3810 * gimple-fold.c (fold_gimple_assign): Update call to
3811 dump_printf_loc to pass in a dump_location_t rather than a
3812 location_t, via the gimple stmt.
3813 (gimple_fold_call): Likewise.
3814 * gimple-loop-interchange.cc
3815 (loop_cand::analyze_iloop_reduction_var): Update for change to
3816 check_reduction_path.
3817 (tree_loop_interchange::interchange): Update for change to
3819 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3820 change in return-type of find_loop_location.
3821 (graphite_regenerate_ast_isl): Likewise.
3822 * graphite-optimize-isl.c (optimize_isl): Likewise.
3823 * graphite.c (graphite_transform_loops): Likewise.
3824 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3825 pass in a dump_location_t rather than a location_t, via the
3827 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3828 * ipa.c (walk_polymorphic_call_targets): Likewise.
3829 * loop-unroll.c (report_unroll): Convert "locus" param from
3830 location_t to dump_location_t.
3831 (decide_unrolling): Update for change to get_loop_location's
3833 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3834 location_t to dump_user_location_t.
3835 (grid_find_single_omp_among_assignments_1): Updates calls to
3836 dump_printf_loc to pass in a dump_location_t rather than a
3837 location_t, via the gimple stmt.
3838 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3839 location_t to dump_location_t. Updates calls to dump_printf_loc
3840 to pass in a dump_location_t rather than a location_t, via the
3842 (grid_inner_loop_gridifiable_p): Likewise.
3843 (grid_dist_follows_simple_pattern): Likewise.
3844 (grid_gfor_follows_tiling_pattern): Likewise.
3845 (grid_target_follows_gridifiable_pattern): Likewise.
3846 (grid_attempt_target_gridification): Convert initialization
3847 of local "grid" from memset to zero-initialization; FIXME: does
3848 this require C++11? Update call to dump_printf_loc to pass in a
3849 optinfo_location rather than a location_t, via the gimple stmt.
3850 * profile.c (read_profile_edge_counts): Updates call to
3851 dump_printf_loc to pass in a dump_location_t rather than a
3853 (compute_branch_probabilities): Likewise.
3854 * selftest-run-tests.c (selftest::run_tests): Call
3856 * selftest.h (dumpfile_c_tests): New decl.
3857 * tree-loop-distribution.c (pass_loop_distribution::execute):
3858 Update for change in return type of find_loop_location.
3859 * tree-parloops.c (parallelize_loops): Likewise.
3860 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3861 "locus" from location_t to dump_user_location_t.
3862 (canonicalize_loop_induction_variables): Likewise.
3863 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3864 for change in return type of find_loop_location.
3865 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3866 to dump_printf_loc to pass in a dump_location_t rather than a
3867 location_t, via the stmt.
3868 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3870 * tree-vect-loop-manip.c (find_loop_location): Convert return
3871 type from source_location to dump_user_location_t.
3872 (vect_do_peeling): Update for above change.
3873 (vect_loop_versioning): Update for change in type of
3875 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3876 from location_t to dump_user_location_t.
3877 (vect_estimate_min_profitable_iters): Update for change in type
3879 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3880 location_t to dump_location_t.
3881 (vect_slp_bb): Update for change in type of vect_location.
3882 * tree-vectorizer.c (vect_location): Convert from source_location
3883 to dump_user_location_t.
3884 (try_vectorize_loop_1): Update for change in vect_location's type.
3885 (vectorize_loops): Likewise.
3886 (increase_alignment): Likewise.
3887 * tree-vectorizer.h (vect_location): Convert from source_location
3888 to dump_user_location_t.
3889 (find_loop_location): Convert return type from source_location to
3890 dump_user_location_t.
3891 (check_reduction_path): Convert 1st param from location_t to
3892 dump_user_location_t.
3893 * value-prof.c (check_counter): Update call to dump_printf_loc to
3894 pass in a dump_user_location_t rather than a location_t; update
3895 call to error_at for change in type of "locus".
3896 (check_ic_target): Update call to dump_printf_loc to
3897 pass in a dump_user_location_t rather than a location_t, via the
3900 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3902 * config/s390/s390.h (enum processor_flags): Do not use
3903 default tune parameter when -march was specified.
3905 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3908 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3909 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3912 2018-06-26 Richard Biener <rguenther@suse.de>
3914 PR tree-optimization/86287
3916 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3917 (vect_analyze_loop): Initialize n_stmts.
3919 2018-06-26 Richard Biener <rguenther@suse.de>
3922 * fold-const.c (fold_convertible_p): Pointer extension
3925 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3928 * dwarf2out.c (loc_list_has_views): Adjust comments.
3929 (dw_loc_list): Split single cross-partition range with
3932 2018-06-25 Jeff Law <law@redhat.com>
3934 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3935 on -mbig-switch by default.
3937 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3939 (const_float_0_operand): Remove unused predicate.
3940 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3941 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3942 (recipsf2): New expander. Original pattern now called
3944 (recipdf2, recipdf2_insn): Similarly.
3945 (rsqrtsf2, rsqrtsf2_insn): Similarly
3946 (rsqrtdf2, rsqrtdf2_insn): Similarly
3948 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3950 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3951 Simplify logic for FreeBSD (twice).
3953 2018-06-25 Martin Sebor <msebor@redhat.com>
3955 PR tree-optimization/86204
3956 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3957 a strnlen result if it's less than the length of the string.
3959 2018-06-25 Martin Sebor <msebor@redhat.com>
3961 PR tree-optimization/85700
3962 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3963 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3964 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3966 2018-06-25 Martin Sebor <msebor@redhat.com>
3968 * doc/extend.texi (Zero-length arrays): Update and clarify.
3970 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3972 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3973 added IEEE/IBM long double multilib support on PowerPC little
3974 endian Linux systems.
3975 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3976 (MULTILIB_DEFAULTS): Likewise.
3977 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3979 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3980 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3981 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3983 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3986 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3987 (REORDER_45): Likewise.
3989 2018-06-25 Jeff Law <law@redhat.com>
3991 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3992 dividend to 32 bits. Adjust length.
3993 (udivmodhi4): Cleanup output template. Fix length.
3995 2018-06-25 Carl Love <cel@us.ibm.com>
3997 * config/rs6000/vsx.md: Change word selector to prefered location.
3999 2018-06-25 Richard Biener <rguenther@suse.de>
4001 PR tree-optimization/86304
4002 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4003 epilogue-if-converted loops as well.
4005 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4007 * lto-section-out.c (lto_begin_section): Do not print section
4008 name for noaddr and unnumbered dumps.
4010 2018-06-25 Richard Biener <rguenther@suse.de>
4012 * tree-vectorizer.h (struct vec_info_shared): New structure
4013 with parts split out from struct vec_info and loop_nest from
4014 struct _loop_vec_info.
4015 (struct vec_info): Adjust accordingly.
4016 (struct _loop_vec_info): Likewise.
4017 (LOOP_VINFO_LOOP_NEST): Adjust.
4018 (LOOP_VINFO_DATAREFS): Likewise.
4019 (LOOP_VINFO_DDRS): Likewise.
4020 (struct _bb_vec_info): Likewise.
4021 (BB_VINFO_DATAREFS): Likewise.
4022 (BB_VINFO_DDRS): Likewise.
4023 (struct _stmt_vec_info): Add dr_aux member.
4024 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4025 (DR_MISALIGNMENT_UNINITIALIZED): New.
4026 (set_dr_misalignment): Adjust.
4027 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4028 (vect_analyze_loop): Adjust prototype.
4029 (vect_analyze_loop_form): Likewise.
4030 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4031 Compute dependences lazily.
4032 (vect_record_base_alignments): Use shared datarefs/ddrs.
4033 (vect_verify_datarefs_alignment): Likewise.
4034 (vect_analyze_data_refs_alignment): Likewise.
4035 (vect_analyze_data_ref_accesses): Likewise.
4036 (vect_analyze_data_refs): Likewise.
4037 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4038 constructor parameter for shared part.
4039 (vect_analyze_loop_form): Pass in shared part and adjust.
4040 (vect_analyze_loop_2): Pass in storage for the number of
4041 stmts. Move loop nest finding to the caller. Compute
4043 (vect_analyze_loop): Pass in shared part.
4044 (vect_transform_loop): Verify shared datarefs are unchanged.
4045 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4046 constructor parameter for shared part.
4047 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4048 (vect_slp_bb): Verify shared datarefs are unchanged before
4050 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4052 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4053 DR_MISALIGNMENT_UNINITIALIZED.
4054 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4055 parameter for shared part.
4056 (vec_info::~vec_info): Adjust.
4057 (vec_info_shared::vec_info_shared): New.
4058 (vec_info_shared::~vec_info_shared): Likewise.
4059 (vec_info_shared::save_datarefs): Likewise.
4060 (vec_info_shared::check_datarefs): Likewise.
4061 (try_vectorize_loop_1): Construct shared part live for analyses
4062 of a single loop for multiple vector sizes.
4063 * tree-parloops.c (gather_scalar_reductions): Adjust.
4065 2018-06-25 Richard Biener <rguenther@suse.de>
4067 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4068 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4069 (vect_analyze_data_refs): Remove similar code from here and
4070 simplify accordingly.
4072 2018-06-25 Richard Biener <rguenther@suse.de>
4074 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4075 for reverse storage order accesses rather than asserting
4076 they cannot happen here.
4078 2018-06-25 Tom de Vries <tdevries@suse.de>
4081 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4082 Use data16 instead of .byte for insn prefix.
4084 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4087 * parser.c (make_char_string_pack): Pass this literal chars
4088 through cpp_interpret_string.
4089 (cp_parser_userdef_numeric_literal): Check the result of
4090 make_char_string_pack.
4092 2018-06-24 Maya Rashish <coypu@sdf.org>
4094 * ginclude/stddef.h: Simplify conditions around avoiding
4095 re-definition of __size_t.
4097 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4099 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4100 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4102 2018-06-22 Maya Rashish <coypu@sdf.org>
4104 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4105 made to OpenBSD and NetBSD through the years.
4107 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4109 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4110 behavior of vec_pack (vector double, vector double) to match
4111 behavior of vec_float2 (vector double, vector double).
4113 2018-06-22 Olivier Hainque <hainque@adacore.com>
4115 * gimplify.c (gimplify_function_tree): Prevent creation
4116 of a trampoline for the address of the current function
4117 passed to entry/exit instrumentation hooks.
4119 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4122 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4125 2018-06-22 Martin Liska <mliska@suse.cz>
4127 PR tree-optimization/86263
4128 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4129 Bail out if is_enabled is false.
4130 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4132 (jump_table_cluster::is_enabled): New function.
4134 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4136 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4137 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4138 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4139 (lto_input_ts_binfo_tree_pointers): Likewise.
4140 * tree-streamer-out.c (streamer_write_tree_bitfields,
4141 write_ts_binfo_tree_pointers): Likewise.
4142 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4144 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4146 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4148 2018-06-22 Martin Liska <mliska@suse.cz>
4150 * symbol-summary.h (get): Make it pure and inline move
4151 functionality from ::get function.
4152 (get): Remove and inline into ::get and ::get_create.
4153 (get_create): Move code from ::get function.
4155 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4158 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4159 -x assembler-with-cpp.
4161 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4163 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4164 _FILE_OFFSET_BITS=64 for C++.
4166 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4168 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4169 conversion insn that shows up when pr85657-3.c is compiled using
4170 IEEE 128-bit long double.
4171 (neg<mode>2_internal): Use the correct mode to check whether the
4172 mode is IBM extended.
4173 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4174 multiply and divide external functions from being created more
4177 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4179 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4181 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4182 the edge can be forwarded.
4183 (cfg_layout_merge_blocks): Likewise.
4185 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4187 * except.c (finish_eh_generation): Commit edge insertions only after
4188 the EH edges have been redirected from post-landing to landing pads.
4190 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4192 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4193 create_tmp_var_for to create the FRAME decl.
4194 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4196 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4198 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4199 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4200 debug statement when resetting its value.
4201 (expand_call_inline): Copy the locus of the call onto the assignment
4202 of the return value, if any. Use local variable in more cases.
4204 2018-06-21 Martin Liska <mliska@suse.cz>
4206 * ipa-pure-const.c (propagate_nothrow): Use
4207 funct_state_summaries->get.
4208 (dump_malloc_lattice): Likewise.
4209 (propagate_malloc): Likewise.
4211 2018-06-21 Richard Biener <rguenther@suse.de>
4213 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4214 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4215 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4217 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4218 BLOCK_ABSTRACT_ORIGIN unconditionally.
4220 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4222 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4224 * ipa-reference.c (ipa_reference_c_finalize): Delete
4225 ipa_ref_opt_sum_summaries and set it to NULL.
4227 2018-06-21 Tom de Vries <tdevries@suse.de>
4229 PR tree-optimization/85859
4230 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4231 test with comment from bb_no_side_effects_p.
4233 2018-06-21 Richard Biener <rguenther@suse.de>
4235 PR tree-optimization/86232
4236 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4237 max for constant niter.
4239 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4241 * config/aarch64/aarch64-simd.md
4242 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4244 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4246 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4247 Make opernads of the unspec commutative.
4249 2018-06-21 Richard Biener <rguenther@suse.de>
4251 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4252 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4253 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4254 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4256 (vect_record_base_alignments): Do not record base alignment
4257 for gathers or scatters.
4258 (vect_compute_data_ref_alignment): Drop return value that is always
4259 true. Bail out early for gathers or scatters.
4260 (vect_enhance_data_refs_alignment): Bail out early for gathers
4262 (vect_find_same_alignment_drs): Likewise.
4263 (vect_analyze_data_refs_alignment): Remove dead code.
4264 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4265 (vect_analyze_data_refs): For possible gathers or scatters do
4266 not create an alternate DR, just check their possible validity
4267 and mark them. Adjust DECL_NONALIASED handling to not rely
4269 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4270 update inits of gathers or scatters.
4271 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4272 Also copy gather/scatter flag to pattern vinfo.
4274 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4276 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4277 behavior of vec_packsu (vector unsigned long long, vector unsigned
4278 long long) to match behavior of vec_packs with same signature.
4280 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4281 Thomas Schwinge <thomas@codesourcery.com>
4282 Cesar Philippidis <cesar@codesourcery.com>
4284 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4285 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4286 (gimplify_adjust_omp_clauses): Likewise.
4287 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4288 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4289 (gimplify_omp_target_update): Update handling of acc update and
4291 * omp-low.c (install_var_field): Remove unused parameter
4292 base_pointers_restrict.
4293 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4294 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4296 (omp_target_base_pointers_restrict_p): Delete.
4297 (scan_omp_target): Update call to scan_sharing_clauses.
4298 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4300 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4301 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4302 (convert_local_omp_clauses): Likewise.
4303 * tree-pretty-print.c (dump_omp_clause): Likewise.
4304 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4306 (omp_clause_code_name): Likewise.
4308 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4311 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4314 PR tree-optimization/86231
4315 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4316 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4318 2018-06-20 Tom de Vries <tdevries@suse.de>
4320 PR tree-optimization/86097
4321 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4322 iv type if signedness of iv type is not the same as that of *nit.
4324 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4326 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4327 EDGE_EH edges, verify they are all EDGE_EH.
4329 2018-06-20 Maya Rashish <coypu@sdf.org>
4331 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4333 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4335 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4336 * config/aarch64/aarch64.c (xgene1_tunings): Add
4337 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4338 (aarch64_mode_valid_for_sched_fusion_p):
4339 Allow 16-byte modes.
4340 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4341 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4343 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4345 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4346 * config/aarch64/iterators.md (VQ2): New mode iterator.
4348 2018-06-20 Martin Liska <mliska@suse.cz>
4350 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4351 Change default ratio from 10 to 8.
4353 2018-06-20 Martin Liska <mliska@suse.cz>
4355 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4357 (bit_test_cluster::find_bit_tests): Likewise.
4358 (switch_decision_tree::analyze_switch_statement): Find clusters.
4359 * tree-switch-conversion.h (struct jump_table_cluster): Document
4362 2018-06-20 Martin Liska <mliska@suse.cz>
4364 * tree-switch-conversion.c (switch_conversion::collect):
4365 Record m_uniq property.
4366 (switch_conversion::expand): Bail out for special conditions.
4367 (group_cluster::~group_cluster): New.
4368 (group_cluster::group_cluster): Likewise.
4369 (group_cluster::dump): Likewise.
4370 (jump_table_cluster::emit): New.
4371 (switch_decision_tree::fix_phi_operands_for_edges): New.
4372 (struct case_node): Remove struct.
4373 (jump_table_cluster::can_be_handled): New.
4374 (case_values_threshold): Moved to header.
4375 (reset_out_edges_aux): Likewise.
4376 (jump_table_cluster::is_beneficial): New.
4377 (bit_test_cluster::can_be_handled): Likewise.
4378 (add_case_node): Remove.
4379 (bit_test_cluster::is_beneficial): New.
4380 (case_bit_test::cmp): New.
4381 (bit_test_cluster::emit): New.
4382 (expand_switch_as_decision_tree_p): Remove.
4383 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4384 (fix_phi_operands_for_edge): Likewise.
4385 (switch_decision_tree::analyze_switch_statement): New.
4386 (compute_cases_per_edge): Move ...
4387 (switch_decision_tree::compute_cases_per_edge): ... here.
4388 (try_switch_expansion): Likewise.
4389 (switch_decision_tree::try_switch_expansion): Likewise.
4390 (record_phi_operand_mapping): Likewise.
4391 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4392 (emit_case_decision_tree): Likewise.
4393 (switch_decision_tree::emit): Likewise.
4394 (balance_case_nodes): Likewise.
4395 (switch_decision_tree::balance_case_nodes): Likewise.
4396 (dump_case_nodes): Likewise.
4397 (switch_decision_tree::dump_case_nodes): Likewise.
4398 (emit_jump): Likewise.
4399 (switch_decision_tree::emit_jump): Likewise.
4400 (emit_cmp_and_jump_insns): Likewise.
4401 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4402 (emit_case_nodes): Likewise.
4403 (switch_decision_tree::emit_case_nodes): Likewise.
4404 (conditional_probability): Remove.
4405 * tree-switch-conversion.h (enum cluster_type): New.
4407 (struct cluster): Likewise.
4408 (cluster::cluster): Likewise.
4409 (struct simple_cluster): Likewise.
4410 (simple_cluster::simple_cluster): Likewise.
4411 (struct group_cluster): Likewise.
4412 (struct jump_table_cluster): Likewise.
4413 (struct bit_test_cluster): Likewise.
4414 (struct min_cluster_item): Likewise.
4415 (struct case_tree_node): Likewise.
4416 (case_tree_node::case_tree_node): Likewise.
4417 (jump_table_cluster::case_values_threshold): Likewise.
4418 (struct case_bit_test): Likewise.
4419 (struct switch_decision_tree): Likewise.
4420 (struct switch_conversion): Likewise.
4421 (switch_decision_tree::reset_out_edges_aux): Likewise.
4423 2018-06-20 Martin Liska <mliska@suse.cz>
4425 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4426 (hoist_edge_and_branch_if_true): Likewise.
4427 (expand_switch_using_bit_tests_p): Likewise.
4428 (struct case_bit_test): Likewise.
4429 (case_bit_test_cmp): Likewise.
4430 (emit_case_bit_tests): Likewise.
4431 (switch_conversion::switch_conversion): New class.
4432 (struct switch_conv_info): Remove old struct.
4433 (collect_switch_conv_info): More to ...
4434 (switch_conversion::collect): ... this.
4435 (check_range): Likewise.
4436 (switch_conversion::check_range): Likewise.
4437 (check_all_empty_except_final): Likewise.
4438 (switch_conversion::check_all_empty_except_final): Likewise.
4439 (check_final_bb): Likewise.
4440 (switch_conversion::check_final_bb): Likewise.
4441 (create_temp_arrays): Likewise.
4442 (switch_conversion::create_temp_arrays): Likewise.
4443 (free_temp_arrays): Likewise.
4444 (gather_default_values): Likewise.
4445 (switch_conversion::gather_default_values): Likewise.
4446 (build_constructors): Likewise.
4447 (switch_conversion::build_constructors): Likewise.
4448 (constructor_contains_same_values_p): Likewise.
4449 (switch_conversion::contains_same_values_p): Likewise.
4450 (array_value_type): Likewise.
4451 (switch_conversion::array_value_type): Likewise.
4452 (build_one_array): Likewise.
4453 (switch_conversion::build_one_array): Likewise.
4454 (build_arrays): Likewise.
4455 (switch_conversion::build_arrays): Likewise.
4456 (gen_def_assigns): Likewise.
4457 (switch_conversion::gen_def_assigns): Likewise.
4458 (prune_bbs): Likewise.
4459 (switch_conversion::prune_bbs): Likewise.
4460 (fix_phi_nodes): Likewise.
4461 (switch_conversion::fix_phi_nodes): Likewise.
4462 (gen_inbound_check): Likewise.
4463 (switch_conversion::gen_inbound_check): Likewise.
4464 (process_switch): Use the newly created class.
4465 (switch_conversion::expand): New.
4466 (switch_conversion::~switch_conversion): New.
4467 * tree-switch-conversion.h: New file.
4469 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4471 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4472 tree-vect-patterns.c.
4473 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4474 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4475 (vect_recog_sad_pattern): Likewise.
4476 (vect_recog_widen_sum_pattern): Likewise.
4477 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4478 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4479 (vect_recog_rotate_pattern): Likewise.
4480 (vect_recog_mult_pattern): Likewise.
4481 (vect_recog_vector_vector_shift_pattern): Likewise.
4482 (vect_recog_divmod_pattern): Likewise.
4483 (vect_recog_mixed_size_cond_pattern): Likewise.
4484 (vect_recog_bool_pattern): Likewise.
4485 (vect_recog_mask_conversion_pattern): Likewise.
4486 (vect_try_gather_scatter_pattern): Likewise.
4487 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4488 (vect_recog_over_widening_pattern): Likewise.
4489 (vect_recog_gather_scatter_pattern): Likewise.
4490 (vect_recog_func_ptr): Move from tree-vectorizer.h
4491 (vect_vect_recog_func_ptrs): Move further down the file.
4492 (vect_recog_func): Likewise. Remove the third argument.
4493 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4494 (vect_pattern_recog_1): Expect the pattern function to do any
4495 necessary target tests. Also expect it to provide a vector type.
4496 Remove the type_in handling.
4498 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4500 * tree-vect-patterns.c (vect_pattern_detected): New function.
4501 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4502 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4503 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4504 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4505 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4506 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4507 (vect_recog_mask_conversion_pattern)
4508 (vect_try_gather_scatter_pattern): Likewise.
4510 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4512 * tree-vect-patterns.c (vect_get_internal_def): New function.
4513 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4514 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4515 (search_type_for_mask_1): Use it.
4517 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4519 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4520 redundant WIDEN_SUM_EXPR handling.
4521 (vect_recog_sad_pattern): Likewise.
4523 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4525 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4526 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4527 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4528 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4529 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4531 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4533 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4534 use the stmt_vec_info of the original bb statement for the
4535 new zero assignment, even if the call is part of a pattern.
4537 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4539 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4540 that the sequence is attached to the original statement rather
4541 than the pattern statement.
4542 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4543 PATTERN_DEF_SEQ from the original statement rather than
4544 the main pattern statement.
4545 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4546 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4547 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4549 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4551 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4552 definition statements before the early exit for statements that aren't
4554 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4556 (vect_transform_loop): ...here. Process pattern definition
4557 statements without first checking whether the main pattern
4558 statement is live or relevant.
4560 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4562 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4563 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4565 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4567 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4568 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4569 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4570 (expand_block_compare): Change select_block_compare_mode call.
4571 (expand_strncmp_align_check): Use new functions, fix comment.
4572 (emit_final_str_compare_gpr): New function.
4573 (expand_strn_compare): Refactor and clean up code.
4574 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4576 2018-06-19 Tony Reix <tony.reix@atos.com>
4577 Damien Bergamini <damien.bergamini@atos.com>
4578 David Edelsohn <dje.gcc@gmail.com>
4580 * collect2.c (static_obj): New variable.
4581 (static_libs): New variable.
4582 (is_in_list): Uncomment declaration.
4583 (main): Track AIX libraries linked statically.
4584 (is_in_list): Uncomment definition.
4585 (scan_prog_file): Don't add AIX shared libraries initializer
4586 to constructor list if linking statically.
4588 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4590 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4592 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4594 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4596 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4599 2018-06-19 Martin Liska <mliska@suse.cz>
4601 * config/i386/i386.c (ix86_can_inline_p): Do not use
4602 ipa_fn_summaries::get_create.
4603 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4605 (devirtualization_time_bonus): Likewise.
4606 (ipcp_propagate_stage): Likewise.
4607 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4608 (edge_set_predicate): Likewise.
4609 (evaluate_conditions_for_known_args): Likewise.
4610 (evaluate_properties_for_edge): Likewise.
4611 (ipa_call_summary::reset): Tranform to ...
4612 (ipa_call_summary::~ipa_call_summary): ... this.
4613 (ipa_fn_summary::reset): Transform to ...
4614 (ipa_fn_summary::~ipa_fn_summary): ... this.
4615 (ipa_fn_summary_t::remove): Rename to ...
4616 (ipa_fn_summary_t::remove_callees): ... this.
4617 (ipa_fn_summary_t::duplicate): Use placement new
4618 instead of memory copy.
4619 (ipa_call_summary_t::duplicate): Likewise.
4620 (ipa_call_summary_t::remove): Remove.
4621 (dump_ipa_call_summary): Change get_create to get.
4622 (ipa_dump_fn_summary): Dump only when summary exists.
4623 (analyze_function_body): Use symbol_summary::get instead
4625 (compute_fn_summary): Likewise.
4626 (estimate_edge_devirt_benefit): Likewise.
4627 (estimate_edge_size_and_time): Likewise.
4628 (inline_update_callee_summaries): Likewise.
4629 (remap_edge_change_prob): Likewise.
4630 (remap_edge_summaries): Likewise.
4631 (ipa_merge_fn_summary_after_inlining): Likewise.
4632 (write_ipa_call_summary): Likewise.
4633 (ipa_fn_summary_write): Likewise.
4634 (ipa_free_fn_summary): Likewise.
4635 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4636 (struct ipa_call_summary): Likewise.
4637 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4639 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4640 (estimate_size_after_inlining): Likewise.
4641 (estimate_growth): Likewise.
4642 (growth_likely_positive): Likewise.
4643 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4644 (inline_call): Likewise.
4645 * ipa-inline.c (caller_growth_limits): Likewise.
4646 (can_inline_edge_p): Likewise.
4647 (can_inline_edge_by_limits_p): Likewise.
4648 (compute_uninlined_call_time): Likewise.
4649 (compute_inlined_call_time): Likewise.
4650 (want_inline_small_function_p): Likewise.
4651 (edge_badness): Likewise.
4652 (update_caller_keys): Likewise.
4653 (update_callee_keys): Likewise.
4654 (inline_small_functions): Likewise.
4655 (inline_to_all_callers_1): Likewise.
4656 (dump_overall_stats): Likewise.
4657 (early_inline_small_functions): Likewise.
4658 (early_inliner): Likewise.
4659 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4660 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4661 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4662 * ipa-split.c (execute_split_functions): Likewise.
4663 * symbol-summary.h: Likewise.
4664 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4666 2018-06-19 Richard Biener <rguenther@suse.de>
4668 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4669 (vectorize_loops): ... here. Fix dbgcnt handling.
4670 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4672 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4675 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4676 ieee128 argument takes up only one (vector) register, not two (floating
4679 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4681 * gimplify.c (gimplify_init_constructor): Really never clear for an
4682 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4684 2018-06-19 Richard Biener <rguenther@suse.de>
4686 PR tree-optimization/86179
4687 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4688 after failed recognition.
4690 2018-06-18 Martin Sebor <msebor@redhat.com>
4693 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4694 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4695 Handle integer subtraction.
4696 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4697 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4699 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4701 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4702 param from rtx to rtx_insn *.
4703 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4705 (frv_ifcvt_modify_insn): Likwise.
4706 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4707 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4708 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4709 as_a <rtx_insn *> cast to local "unprotected_region" once
4710 it's been established that it's not NULL or pc_rtx.
4711 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4712 param "sethi" from rtx to rtx_insn *.
4713 (nds32_group_float_insns): Likewise for param "insn".
4714 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4716 (vax_output_int_subtract): Likewise.
4717 * config/vax/vax.c (vax_output_int_add): Likewise for param
4719 (vax_output_int_subtract): Likewise.
4720 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4721 (emit_pattern_after): Likewise for param "after".
4722 (emit_insn_after): Likewise.
4723 (emit_jump_insn_after): Likewise.
4724 (emit_call_insn_after): Likewise.
4725 (emit_debug_insn_after): Likewise.
4726 (emit_pattern_before): Likewise for param "before".
4727 (emit_insn_before): Likewise.
4728 (emit_jump_insn_before): Likewise.
4729 * final.c (get_insn_template): Likewise for param "insn", removing
4731 * output.h (get_insn_template): Likewise for 2nd param.
4732 * rtl.h (emit_insn_before): Likewise.
4733 (emit_jump_insn_before): Likewise.
4734 (emit_debug_insn_before_noloc): Likewise.
4735 (emit_insn_after): Likewise.
4736 (emit_jump_insn_after): Likewise.
4737 (emit_call_insn_after): Likewise.
4738 (emit_debug_insn_after): Likewise.
4739 (set_insn_deleted): Likewise for param.
4741 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4744 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4745 floating point modes, so that IFmode is numerically greater than
4746 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4747 to declare the ordering. This prevents IFmode from being
4748 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4749 machine. Include rs6000-modes.h to share the fractional values
4750 between genmodes* and the rest of the compiler.
4754 * config/rs6000/rs6000-modes.h: New file.
4755 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4756 meaning of rs6000_long_double_size so that 126..128 selects an
4757 appropriate 128-bit floating point type.
4758 (rs6000_option_override_internal): Likewise.
4759 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4760 (TARGET_LONG_DOUBLE_128): Change the meaning of
4761 rs6000_long_double_size so that 126..128 selects an appropriate
4762 128-bit floating point type.
4763 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4764 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4765 source and destination to match the standard usage.
4766 (truncifkf2): Likewise.
4767 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4768 ISA 2.07 to use an explicit clobber, instead of passing in a
4770 (copysign<mode>3_soft): Likewise.
4772 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4774 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4775 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4776 (vect_slp_analyze_instance_dependence): Likewise.
4777 (vect_enhance_data_refs_alignment): Likewise.
4778 (vect_analyze_data_refs_alignment): Likewise.
4779 (vect_slp_analyze_and_verify_instance_alignment
4780 (vect_analyze_data_ref_accesses): Likewise.
4781 (vect_prune_runtime_alias_test_list): Likewise.
4782 (vect_analyze_data_refs): Likewise.
4783 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4784 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4785 (vect_analyze_scalar_cycles_1): Likewise.
4786 (vect_get_loop_niters): Likewise.
4787 (vect_analyze_loop_form_1): Likewise.
4788 (vect_update_vf_for_slp): Likewise.
4789 (vect_analyze_loop_operations): Likewise.
4790 (vect_analyze_loop): Likewise.
4791 (vectorizable_induction): Likewise.
4792 (vect_transform_loop): Likewise.
4793 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4794 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4795 (vect_make_slp_decision): Likewise.
4796 (vect_detect_hybrid_slp): Likewise.
4797 (vect_slp_analyze_operations): Likewise.
4798 (vect_slp_bb): Likewise.
4799 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4800 (vectorizable_bswap): Likewise.
4801 (vectorizable_call): Likewise.
4802 (vectorizable_simd_clone_call): Likewise.
4803 (vectorizable_conversion): Likewise.
4804 (vectorizable_assignment): Likewise.
4805 (vectorizable_shift): Likewise.
4806 (vectorizable_operation): Likewise.
4807 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4809 2018-06-18 Martin Sebor <msebor@redhat.com>
4811 PR tree-optimization/81384
4812 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4813 * builtins.c (expand_builtin_strnlen): New function.
4814 (expand_builtin): Call it.
4815 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4816 * builtins.def (BUILT_IN_STRNLEN): New.
4817 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4818 Warn for bounds in excess of maximum object size.
4819 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4820 single-value ranges. Handle strnlen.
4821 (handle_builtin_strlen): Handle strnlen.
4822 (strlen_check_and_optimize_stmt): Same.
4823 * doc/extend.texi (Other Builtins): Document strnlen.
4825 2018-06-18 Maya Rashish <coypu@sdf.org>
4827 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4828 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4829 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4831 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4833 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4835 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4837 * tree.c (escaped_string::escape): Replace cast to char * by
4838 const_cast<char *> (unescaped).
4840 2018-06-18 Nick Clifton <nickc@redhat.com>
4843 * tree.c (escaped_string): New class. Converts an unescaped
4844 string into its escaped equivalent.
4845 (warn_deprecated_use): Use the new class to convert the
4846 deprecation message, if present.
4847 (test_escaped_strings): New self test.
4848 (test_c_tests): Add test_escaped_strings.
4849 * doc/extend.texi (deprecated): Add a note that the
4850 deprecation message is affected by the -fmessage-length
4851 option, and that control characters will be escaped.
4852 (#pragma GCC error): Document this pragma.
4853 (#pragma GCC warning): Likewise.
4854 * doc/invoke.texi (-fmessage-length): Document this option's
4855 effect on the #warning and #error preprocessor directives and
4856 the deprecated attribute.
4858 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4860 * tree.c (decl_value_expr_lookup): Revert latest change.
4861 (decl_value_expr_insert): Likewise.
4863 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4865 * gimplify.c (nonlocal_vlas): Delete.
4866 (nonlocal_vla_vars): Likewise.
4867 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4869 (gimplify_body): Do not create and destroy nonlocal_vlas.
4870 * tree-nested.c: Include diagnostic.h.
4871 (use_pointer_in_frame): Tweak.
4872 (lookup_field_for_decl): Add assertion and declare the transformation.
4873 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4874 internal error when the reference is in a wrong context. Do not
4875 create a debug decl by default.
4876 (note_nonlocal_block_vlas): Delete.
4877 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4878 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4879 create a debug decl by default.
4880 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4881 call is in a wrong context.
4882 (fixup_vla_decls): New function.
4883 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4884 debug variables were created.
4885 * tree.c (decl_value_expr_lookup): Add checking assertion.
4886 (decl_value_expr_insert): Likewise.
4888 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4891 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4892 * tree-scalar-evolution.c (interpret_expr): Likewise.
4893 (expression_expensive_p): Likewise.
4894 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4895 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4896 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4897 (ssa_defined_by_minus_one_stmt_p): New.
4899 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4902 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4903 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4904 * dojump.c (do_jump): Likewise.
4905 * expr.c (expand_expr_real_2): Check operand type's sign.
4906 * fold-const.c (const_unop): Handle ABSU_EXPR.
4907 (fold_abs_const): Likewise.
4908 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4909 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4910 (strip_sign_op_1): Likesise.
4911 * match.pd: Add new pattern to generate ABSU_EXPR.
4912 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4913 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4914 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4915 * tree-inline.c (estimate_operator_cost): Likewise.
4916 * tree-pretty-print.c (dump_generic_node): Likewise.
4917 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4918 * tree.def (ABSU_EXPR): New.
4920 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4923 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4924 documented as preserved for backward compatibility only.
4925 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4927 PR rtl-optimization/86108
4928 * bb-reorder.c (create_forwarder_block): Renamed to ...
4929 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4930 jump from new landing pad to the second part.
4931 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4934 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4937 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4938 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4939 Only call store_expr for halves if the mode is the same.
4942 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4943 Fix up comment formatting.
4945 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4947 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4948 (typed_splay_tree::closure,
4949 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4950 (typed_splay_tree::typed_splay_tree,
4951 typed_splay_tree::operator =): Declared private.
4952 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4953 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4954 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4955 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4956 typed_splay_tree::splay_tree_splay,
4957 typed_splay_tree::splay_tree_foreach_helper,
4958 typed_splay_tree::splay_tree_insert,
4959 typed_splay_tree::splay_tree_remove,
4960 typed_splay_tree::splay_tree_lookup,
4961 typed_splay_tree::splay_tree_predecessor,
4962 typed_splay_tree::splay_tree_successor,
4963 typed_splay_tree::splay_tree_min,
4964 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4965 (typed_splay_tree::root, typed_splay_tree::comp,
4966 typed_splay_tree::delete_key,
4967 typed_splay_tree::delete_value): New data members.
4968 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4969 typed_splay_tree::remove.
4971 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4973 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4974 -mginv and -mno-ginv to the assembler.
4975 * config/mips/mips.opt (-mcrc): New option.
4977 * doc/invoke.text (-mcrc): Document.
4980 2018-06-15 Nick Clifton <nickc@redhat.com>
4983 * tree.c (escaped_string): New class. Converts an unescaped
4984 string into its escaped equivalent.
4985 (warn_deprecated_use): Use the new class to convert the
4986 deprecation message, if present.
4987 (test_escaped_strings): New self test.
4988 (test_c_tests): Add test_escaped_strings.
4989 * doc/extend.texi (deprecated): Add a note that the
4990 deprecation message is affected by the -fmessage-length
4991 option, and that control characters will be escaped.
4992 (#pragma GCC error): Document this pragma.
4993 (#pragma GCC warning): Likewise.
4994 * doc/invoke.texi (-fmessage-length): Document this option's
4995 effect on the #warning and #error preprocessor directives and
4996 the deprecated attribute.
4998 2018-06-15 Richard Biener <rguenther@suse.de>
5000 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5001 here, also noting vector size used.
5002 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5003 size used in MSG_OPTIMIZED_LOCATIONS dump.
5004 (pass_slp_vectorize::execute): Adjust.
5006 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5009 * config/arc/arc.c (arc_return_address_register): Fix
5012 2018-06-15 Richard Biener <rguenther@suse.de>
5015 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5016 leave useless conversion stripping to force_gimple_operand_gsi.
5017 (gimplify_build2): Likewise.
5018 (gimplify_build1): Likewise.
5020 2018-06-15 Richard Biener <rguenther@suse.de>
5023 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5024 before adjusting their block.
5026 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5028 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5029 multilibs for *-*-rtems*.
5030 * config/riscv/t-rtems: New file.
5032 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5035 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5036 unsigned_type_for returns NULL.
5039 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5040 subregs of multi-word pseudos unless the float mode has word size.
5042 2018-06-14 Richard Biener <rguenther@suse.de>
5045 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5046 duplicate and harmful type_hash_canon.
5047 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5049 2018-06-14 Richard Biener <rguenther@suse.de>
5052 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5055 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5057 * config/rtems.h (STDINT_LONG32): Define.
5059 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5060 Prachi Godbole <prachi.godbole@imgtec.com>
5062 * config/mips/mips-cpus.def: Define P6600.
5063 * config/mips/mips-tables.opt: Regenerate.
5064 * config/mips/mips.c (mips_ucbranch_type): New enum.
5065 (mips_rtx_cost_data): Add support for P6600.
5066 (mips_issue_rate): Likewise.
5067 (mips_multipass_dfa_lookahead): Likewise.
5068 (mips_avoid_hazard): Likewise.
5069 (mips_reorg_process_insns): Likewise.
5070 (mips_classify_branch_p6600): New function.
5071 * config/mips/mips.h (TUNE_P6600): New define.
5072 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5073 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5074 * config/mips/mips.md: Include p6600.md.
5075 (processor): Add p6600.
5076 * config/mips/p6600.md: New file.
5077 * doc/invoke.texi: Add p6600 to supported architectures.
5079 2018-06-13 Martin Sebor <msebor@redhat.com>
5081 PR tree-optimization/86114
5082 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5084 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5086 2018-06-13 Richard Biener <rguenther@suse.de>
5088 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5089 Properly set vector type of the intermediate stmt.
5090 * tree-vect-stmts.c (vectorizable_operation): The destination
5091 var always has vectype_out type.
5093 2018-06-13 Jeff Law <law@redhat.com>
5095 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5096 integer 0 for argument to print_rtl_with_bb.
5097 (rl78_reorg): Likewise.
5099 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5101 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5102 from rtx to rtx_insn *.
5103 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5105 (add_sched_insns_for_speculation): Likewise for local "target",
5106 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5107 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5108 from rtx_insn ** to rtx_code_label **.
5109 (reorg_emit_nops): Likewise.
5110 (c6x_reorg): Likewise for local "call_labels".
5111 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5113 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5114 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5115 the loops over LABEL_REFS.
5116 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5118 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5119 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5120 (split_branches): Strengthen local "olabel" from rtx to
5121 rtx_insn *, adding a safe_as_a cast.
5122 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5124 (add_insn_after): Likewise for first two params.
5125 (add_insn_before): Likewise.
5126 (remove_insn): Likewise for param.
5127 (emit_pattern_before_noloc): Likewise for second and third params.
5128 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5129 (emit_call_insn_before_noloc): Likewise.
5130 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5132 (emit_barrier_before): Likewise.
5133 (emit_label_before): Strengthen "label" param from "rtx" to
5134 "rtx_code_label *". Strengthen "before" param from "rtx" to
5136 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5138 (emit_pattern_after_noloc): Likewise.
5139 (emit_insn_after_noloc): Likewise.
5140 (emit_jump_insn_after_noloc): Likewise.
5141 (emit_call_insn_after_noloc): Likewise.
5142 (emit_debug_insn_after_noloc): Likewise.
5143 (emit_barrier_after): Likewise.
5144 (emit_label_after): Likewise for both params.
5145 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5146 "loc" param from "int" to "location_t".
5147 (emit_insn_after_setloc): Likewise.
5148 (emit_jump_insn_after_setloc): Likewise.
5149 (emit_call_insn_after_setloc): Likewise.
5150 (emit_debug_insn_after_setloc): Likewise.
5151 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5152 "loc" param from "int" to "location_t".
5153 (emit_pattern_before): Convert NULL_RTX to NULL.
5154 (emit_insn_before_setloc): Convert "loc" param from "int" to
5156 (emit_jump_insn_before_setloc): Likewise.
5157 (emit_call_insn_before_setloc): Likewise.
5158 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5159 rtx_insn *. Convert "loc" param from "int" to "location_t".
5160 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5161 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5162 Convert 3rd param from "int" to "location_t".
5163 (emit_barrier_before, emit_barrier_after, next_real_insn):
5164 Strengthen param from rtx to rtx_insn *.
5165 (emit_label_before): Strengthen 1st param from "rtx" to
5166 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5168 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5169 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5170 Strengthen 2nd param from "rtx" to "rtx_insn *".
5171 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5172 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5173 Likewise. Convert 3rd param from "int" to "location_t".
5174 (emit_label_after): Strengthen 1st param from "rtx" to
5176 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5178 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5179 from "rtx" to "rtx_insn *".
5181 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5183 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5184 bodies streamed in with -Q.
5185 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5186 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5187 * gimple-streamer-out.c: Include gimple-pretty-print.h
5188 (output_bb): Dump stmts streamed.
5189 * lto-section-out.c: Include print-tree.h
5190 (lto_begin_section): Dump sections created.
5191 (lto_output_decl_index): Dump decl encoded.
5192 * lto-streamer-out.c: Include print-tree.h
5193 (create_output_block): Dump output block created.
5194 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5195 (output_function): Dump function output.
5196 (output_constructor): Dump constructor streamed.
5197 (write_global_stream): Output indexes encoded.
5198 (produce_asm_for_decls): Dump streams encoded.
5199 * lto-streamer.c (streamer_dump_file): New global var.
5200 * lto-streamer.h (streamer_dump_file): Declare.
5201 * passes.c (ipa_write_summaries): Initialize streamer dump.
5202 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5205 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5208 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5209 offsets for register save directives. Emit a second batch of save
5210 directives, if need be, when the function accesses prior frames.
5212 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5214 * config/arc/fpu.md (fmasf4): Force operand to register.
5215 (fnmasf4): Likewise.
5217 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5219 * config/arc/arc-protos.h (arc_pad_return): Remove.
5220 * config/arc/arc.c (machine_function): Remove force_short_suffix
5222 (arc_print_operand): Adjust printing of '&'.
5223 (arc_verify_short): Remove conditional printing of short suffix.
5224 (arc_final_prescan_insn): Remove reference to size_reason.
5225 (pad_return): New function.
5226 (arc_reorg): Call pad_return.
5227 (arc_pad_return): Remove.
5228 (arc_init_machine_status): Remove reference to force_short_suffix.
5229 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5230 (attr length): When attribute iscompact is true force to 2
5231 regardless; in the case of maybe check if we want to force the
5232 instruction to have 4 bytes length.
5233 (nopv): Change it to generate 4 byte long nop as well.
5234 (blockage): New pattern.
5235 (simple_return): Remove call to arc_pad_return.
5236 (p_return_i): Likewise.
5238 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5240 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5242 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5244 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5247 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5249 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5250 for ARC700 and ARCv2.
5252 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5255 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5256 operands[2] instead of operands[1].
5259 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5261 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5262 case, check whether the outer register overlaps an unallocatable
5263 register, not just whether it fits the required class.
5265 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5267 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5269 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5270 (memrefs_conflict_p): Likewise.
5271 (init_alias_analysis): Likewise.
5272 * cfgexpand.c (expand_debug_expr): Likewise.
5273 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5274 * cse.c (fold_rtx): Likewise.
5275 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5276 * expr.c (emit_block_move_hints): Likewise.
5277 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5278 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5279 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5280 (emit_group_store): Likewise.
5281 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5282 to read the PRE/POST_MODIFY increment.
5283 * calls.c (store_one_arg): Use strip_offset.
5284 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5286 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5288 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5289 (simplify_binary_operation_1): Extend CONST_INT handling to
5291 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5292 than a HOST_WIDE_INT.
5293 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5295 (adjust_mems, add_stores): Update accodingly.
5296 (vt_canonicalize_addr): Track polynomial offsets.
5297 (emit_note_insn_var_location): Likewise.
5298 (vt_add_function_parameter): Likewise.
5299 (vt_initialize): Likewise.
5301 2018-06-12 Jeff Law <law@redhat.com>
5303 * config.gcc (alpha*-*-freebsd*): Remove.
5304 * config/alpha/freebsd.h: Remove.
5306 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5309 * spellcheck-tree.c (levenshtein_distance): Rename to...
5310 (get_edit_distance): ...this, and update for underlying renaming.
5311 * spellcheck-tree.h (levenshtein_distance): Rename to...
5312 (get_edit_distance): ...this.
5313 * spellcheck.c (levenshtein_distance): Rename to...
5314 (get_edit_distance): ...this. Convert from Levenshtein distance
5315 to Damerau-Levenshtein distance by supporting transpositions of
5316 adjacent characters. Rename "v1" to "v_next" and "v0" to
5318 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5319 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5320 update for underlying renaming.
5321 (selftest::levenshtein_distance_unit_test): Rename to...
5322 (selftest::test_get_edit_distance_unit): ...this, and update for
5323 underlying renaming.
5324 (selftest::test_find_closest_string): Add example from PR 69968
5325 where transposition helps
5326 (selftest::test_metric_conditions): Update for renaming.
5327 (selftest::test_metric_conditions): Likewise.
5328 (selftest::spellcheck_c_tests): Likewise.
5329 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5330 (get_edit_distance): ...this.
5331 (best_match::consider): Update for renaming.
5333 2018-06-12 Martin Sebor <msebor@redhat.com>
5335 PR tree-optimization/85259
5336 * builtins.c (compute_objsize): Handle constant offsets.
5337 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5338 true iff a warning has been issued.
5339 * gimple.h (gimple_nonartificial_location): New function.
5340 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5341 gimple_nonartificial_location and handle -Wno-system-headers.
5342 (handle_builtin_stxncpy): Same.
5344 2018-06-12 Martin Sebor <msebor@redhat.com>
5347 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5349 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5351 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5352 BUILTIN_VEC_XST entries for pointer to double and long long.
5354 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5357 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5359 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5362 2018-06-12 Martin Liska <mliska@suse.cz>
5364 * doc/options.texi: Document IntegerRange.
5366 2018-06-12 Martin Liska <mliska@suse.cz>
5368 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5369 * opt-functions.awk: Handle Deprecated flag.
5370 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5372 (read_cmdline_option): Report warning for a deprecated option.
5373 * opts.h (struct cl_option): Add new field cl_deprecated.
5374 (CL_ERR_DEPRECATED): New.
5376 2018-06-12 Martin Liska <mliska@suse.cz>
5378 * doc/options.texi: Document Deprecated option flag.
5380 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5382 * config/arc/arc-arch.h (arc_extras): New enum.
5383 (arc_cpu_t):Add field extra.
5384 (arc_cpu_types): Consider the extras.
5385 * config/arc/arc-cpus.def: Add extras info.
5386 * config/arc/arc-opts.h (processor_type): Consider extra field.
5387 * config/arc/arc.c (arc_override_options): Handle extra field.
5389 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5391 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5392 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5394 * config/arc/arc.c (arc_init): Update pic warning.
5395 (irq_range): Update irq range parsing warnings.
5396 (arc_override_options): Update various warning messages.
5397 (arc_handle_aux_attribute): Likewise.
5399 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5401 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5403 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5405 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5406 compiler messages directives.
5408 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5410 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5411 * config/mips/mips-tables.opt: Regenerate.
5412 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5414 * doc/invoke.texi: Document -march=i6500.
5416 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5418 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5419 (i6400_gpmul): Add cpu_unit.
5420 (i6400_gpdiv): Likewise.
5421 (i6400_msa_add_d): Update reservations.
5422 (i6400_msa_int_add) Likewise.
5423 (i6400_msa_short_logic3) Likewise.
5424 (i6400_msa_short_logic2) Likewise.
5425 (i6400_msa_short_logic) Likewise.
5426 (i6400_msa_move) Likewise.
5427 (i6400_msa_cmp) Likewise.
5428 (i6400_msa_short_float2) Likewise.
5429 (i6400_msa_div_d) Likewise.
5430 (i6400_msa_long_logic1) Likewise.
5431 (i6400_msa_long_logic2) Likewise.
5432 (i6400_msa_mult) Likewise.
5433 (i6400_msa_long_float2) Likewise.
5434 (i6400_msa_long_float4) Likewise.
5435 (i6400_msa_long_float5) Likewise.
5436 (i6400_msa_long_float8) Likewise.
5437 (i6400_fpu_fadd): Include frint type.
5438 (i6400_fpu_store): New define_insn_reservation.
5439 (i6400_fpu_load): Likewise.
5440 (i6400_fpu_move): Likewise.
5441 (i6400_fpu_fcmp): Likewise.
5442 (i6400_fpu_fmadd): Likewise.
5443 (i6400_int_mult): Include imul3nc type and update reservation.
5444 (i6400_int_div): Include idiv3 type and update reservation.
5445 (i6400_int_load): Update to check type not move_type.
5446 (i6400_int_store): Likewise.
5447 (i6400_int_prefetch): Set zero latency.
5449 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5451 * gcc.c: Document new %@{...} sequence.
5452 (LINK_COMMAND_SPEC): Use it for the -L switches.
5453 (cpp_unique_options): Use it for the -I switches.
5454 (at_file_argbuf): New global variable.
5455 (in_at_file): Likewise.
5456 (alloc_args): Create at_file_argbuf.
5457 (clear_args): Truncate at_file_argbuf.
5458 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5459 (open_at_file): New function.
5460 (close_at_file): Likewise.
5461 (create_at_file): Delete.
5462 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5465 (validate_switches_from_spec): Deal with %@{...} sequence.
5466 (validate_switches): Likewise.
5467 (driver::finalize): Call clear_args.
5469 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5471 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5473 2018-06-11 Martin Sebor <msebor@redhat.com>
5475 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5476 (Wno-class-memaccess): Add @opindex.
5477 (Wno-templates, Wno-multiple-inheritance): Same.
5478 (Wno-virtual-inheritance, Wno-namespaces): Same.
5479 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5480 (Wno-format-overflow, Wno-format-truncation): Same.
5481 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5482 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5483 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5484 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5485 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5486 (Wno-misspelled-isr): Same.
5488 2018-06-11 Martin Sebor <msebor@redhat.com>
5490 * PR tree-optimization/86083
5491 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5493 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5495 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5497 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5500 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5501 on the correct operand.
5502 (*movdi_internal64): Ditto.
5504 2018-06-11 Martin Liska <mliska@suse.cz>
5506 PR tree-optimization/86089
5507 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5509 2018-06-11 Julia Koval <julia.koval@intel.com>
5511 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5512 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5513 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5515 2018-06-11 Olivier Hainque <hainque@adacore.com>
5517 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5518 for Ada with strict dwarf2.
5520 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5523 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5526 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5528 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5530 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5532 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5535 2018-06-08 Martin Liska <mliska@suse.cz>
5537 * tree-cfg.h (debug_function): Fix argument type to match
5540 2018-06-08 Martin Liska <mliska@suse.cz>
5542 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5543 Remove usage of MPX-related (and removed) fields.
5544 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5546 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5548 * cfg.c (debug): Use TDF_NONE rather than 0.
5549 * cfghooks.c (debug): Likewise.
5550 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5551 (struct dump_option_value_info): Convert to...
5552 (struct kv_pair): ...this template type.
5553 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5555 (optinfo_verbosity_options): Likewise.
5556 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5558 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5559 than int for "optgroup_flags" param.
5560 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5562 (dump_dec): Likewise.
5563 (dump_finish): Use TDF_NONE rather than 0.
5564 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5565 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5566 than 0. Update for change to option_ptr.
5567 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5568 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5569 0. Update for changes to optinfo_verbosity_options and
5571 (opt_info_switch_p): Convert optgroup_flags from int to
5573 (dump_basic_block): Use dump_flags_t rather than int
5574 for "dump_kind" param.
5575 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5576 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5577 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5578 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5579 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5580 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5581 TDF_NONE): Convert from macros to...
5582 (enum dump_flag): ...this new enum.
5583 (dump_flags_t): Update to use enum.
5584 (operator|, operator&, operator~, operator|=, operator&=):
5585 Implement for dump_flags_t.
5586 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5587 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5588 Convert from macros to...
5589 (enum optgroup_flag): ...this new enum.
5590 (optgroup_flags_t): New typedef.
5591 (operator|, operator|=): Implement for optgroup_flags_t.
5592 (struct dump_file_info): Convert field "alt_flags" to
5593 dump_flags_t. Convert field "optgroup_flags" to
5595 (dump_basic_block): Use dump_flags_t rather than int for param.
5596 (dump_generic_expr_loc): Likewise.
5597 (dump_dec): Likewise.
5598 (dump_register): Convert param "optgroup_flags" to
5600 (opt_info_enable_passes): Likewise.
5601 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5603 * gimple-pretty-print.c (debug): Likewise.
5604 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5605 (merged_store_group::apply_stores): Likewise.
5606 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5607 * gimple.c (verify_gimple_pp): Likewise.
5608 * graphite-poly.c (print_pbb_body): Likewise.
5609 * passes.c (pass_manager::register_one_dump_file): Convert
5610 local "optgroup_flags" to optgroup_flags_t.
5611 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5613 (debug_body): Likewise.
5614 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5615 to optgroup_flags_t.
5616 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5618 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5619 (convert_mult_to_fma): Likewise.
5620 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5621 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5622 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5623 "dump_kind" to dump_flags_t.
5625 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5627 * config/rs6000/rs6000.c (min, max): Delete.
5629 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5631 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5632 -mabi=spe and -mabi=no-spe.
5634 2018-06-08 Martin Liska <mliska@suse.cz>
5636 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5637 where we expect an existing summary.
5639 2018-06-08 Martin Liska <mliska@suse.cz>
5641 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5642 * ipa-inline.h (estimate_edge_growth): Likewise.
5644 2018-06-08 Martin Liska <mliska@suse.cz>
5646 * cgraph.c (function_version_hasher::hash): Use
5647 cgraph_node::get_uid ().
5648 (function_version_hasher::equal):
5649 * cgraph.h (cgraph_node::get_uid): New method.
5650 * ipa-inline.c (update_caller_keys): Use
5651 cgraph_node::get_uid ().
5652 (update_callee_keys): Likewise.
5653 * ipa-utils.c (searchc): Likewise.
5654 (ipa_reduced_postorder): Likewise.
5655 * lto-cgraph.c (input_node): Likewise.
5656 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5657 * symbol-summary.h (symtab_insertion): Likewise.
5658 (symtab_removal): Likewise.
5659 (symtab_duplication): Likewise.
5660 * tree-pretty-print.c (dump_function_header): Likewise.
5661 * tree-sra.c (convert_callers_for_node): Likewise.
5663 2018-06-08 Martin Liska <mliska@suse.cz>
5665 * cgraph.c (symbol_table::create_edge): Always assign a new
5667 (symbol_table::free_edge): Do not recycle numbers.
5668 * cgraph.h (cgraph_edge::get): New method.
5669 * symbol-summary.h (symtab_removal): Use it.
5670 (symtab_duplication): Likewise.
5671 (call_summary::hashable_uid): Remove.
5673 2018-06-08 Martin Liska <mliska@suse.cz>
5675 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5676 (initialize_growth_caches): Remove.
5677 (free_growth_caches): Likewise.
5678 (do_estimate_edge_time): Use edge_growth_cache.
5679 (do_estimate_edge_size): Likewise.
5680 (do_estimate_edge_hints): Likewise.
5681 * ipa-inline.c (reset_edge_caches): Likewise.
5682 (recursive_inlining): Likewise.
5683 (inline_small_functions): Likewise.
5684 * ipa-inline.h (initialize_growth_caches): Remove.
5685 (estimate_edge_size): Likewise.
5686 (estimate_edge_time): Likewise.
5687 (estimate_edge_hints): Likewise.
5688 (reset_edge_growth_cache): Likewise.
5689 * symbol-summary.h (call_summary::remove): New method.
5691 2018-06-08 Martin Liska <mliska@suse.cz>
5693 * ipa-cp.c (class edge_clone_summary): New summary.
5694 (grow_edge_clone_vectors): Remove.
5695 (ipcp_edge_duplication_hook): Remove.
5696 (class edge_clone_summary_t): New call_summary class.
5697 (ipcp_edge_removal_hook): Remove.
5698 (edge_clone_summary_t::duplicate): New function.
5699 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5700 (create_specialized_node): Likewise.
5701 (ipcp_driver): Initialize edge_clone_summaries and do not
5704 2018-06-08 Martin Liska <mliska@suse.cz>
5706 * symbol-summary.h (get): New function.
5707 (call_summary::m_initialize_when_cloning): New class member.
5709 2018-06-08 Martin Liska <mliska@suse.cz>
5711 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5712 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5713 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5714 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5715 (remove_cgraph_node_from_order): Use the removed_nodes set.
5716 (do_per_function_toporder): Likwise.
5717 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5718 instead of summary_uid.
5719 (symtab_removal): Likewise.
5720 (symtab_duplication): Likewise.
5722 2018-06-08 Martin Liska <mliska@suse.cz>
5724 * ipa-cp.c (ipcp_store_bits_results): Use
5725 ipcp_transformation_sum.
5726 (ipcp_store_vr_results): Likewise.
5727 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5729 (ipcp_transformation_initialize): ... this.
5730 (ipa_set_node_agg_value_chain):
5731 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5732 (write_ipcp_transformation_info): Likewise.
5733 (read_ipcp_transformation_info): Likewise.
5734 (ipcp_update_bits): Likewise.
5735 (ipcp_update_vr): Likewise.
5736 (ipcp_transform_function): Likewise.
5737 * ipa-prop.h: Rename ipcp_transformation_summary to
5738 ipcp_transformation.
5739 (class ipcp_transformation_t): New function summary.
5740 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5741 (ipa_get_agg_replacements_for_node): Likewise.
5743 2018-06-08 Martin Liska <mliska@suse.cz>
5745 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5747 (class funct_state_summary_t): New function_summary class.
5748 (has_function_state): Remove.
5749 (get_function_state): Likewise.
5750 (set_function_state): Likewise.
5751 (add_new_function): Likewise.
5752 (funct_state_summary_t::insert): New function.
5753 (duplicate_node_data): Remove.
5754 (remove_node_data): Remove.
5755 (funct_state_summary_t::duplicate): New function.
5756 (register_hooks): Create new funct_state_summaries.
5757 (pure_const_generate_summary): Use it.
5758 (pure_const_write_summary): Likewise.
5759 (pure_const_read_summary): Likewise.
5760 (propagate_pure_const): Likewise.
5761 (propagate_nothrow): Likewise.
5762 (dump_malloc_lattice): Likewise.
5763 (propagate_malloc): Likewise.
5764 (execute): Do not register hooks, just remove summary
5766 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5769 2018-06-08 Martin Liska <mliska@suse.cz>
5771 * ipa-reference.c (remove_node_data): Remove.
5772 (duplicate_node_data): Likewise.
5773 (class ipa_ref_var_info_summary_t): New class.
5774 (class ipa_ref_opt_summary_t): Likewise.
5775 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5776 (get_reference_optimization_summary): Use
5777 ipa_ref_opt_sum_summaries.
5778 (set_reference_vars_info): Remove.
5779 (set_reference_optimization_summary): Likewise.
5780 (ipa_init): Create summaries.
5781 (init_function_info): Use function summary.
5782 (ipa_ref_opt_summary_t::duplicate): New function.
5783 (ipa_ref_opt_summary_t::remove): New function.
5784 (get_read_write_all_from_node): Fix GNU coding style.
5785 (propagate): Use function summary.
5786 (write_node_summary_p): Fix GNU coding style.
5787 (stream_out_bitmap): Likewise.
5788 (ipa_reference_read_optimization_summary): Use function summary.
5789 (ipa_reference_c_finalize): Do not release hooks.
5791 2018-06-08 Martin Liska <mliska@suse.cz>
5793 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5794 (analyze_function_body): Extract multiple calls of get_create.
5795 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5796 * ipa-inline.c (recursive_inlining): Use ::get method.
5797 * ipa-inline.h (estimate_edge_growth): Likewise.
5799 2018-06-08 Martin Liska <mliska@suse.cz>
5801 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5803 (hsa_function_summary::hsa_function_summary): Use the new enum
5805 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5806 * hsa-gen.c (hsa_get_host_function): Likewise.
5807 (get_brig_function_name): Likewise.
5808 * ipa-hsa.c (process_hsa_functions): Likewise.
5809 (ipa_hsa_write_summary): Likewise.
5810 * symbol-summary.h (symtab_duplication): Use ::get function/
5811 (get): New function.
5813 2018-06-08 Martin Liska <mliska@suse.cz>
5815 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5817 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5818 (hsa_register_kernel): Likewise.
5819 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5820 * hsa-gen.c (hsa_get_host_function): Likewise.
5821 (get_brig_function_name): Likewise.
5822 (generate_hsa): Likewise.
5823 (pass_gen_hsail::execute): Likewise.
5824 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5825 (devirtualization_time_bonus): Likewise.
5826 (ipcp_propagate_stage): Likewise.
5827 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5828 (edge_set_predicate): Likewise.
5829 (evaluate_conditions_for_known_args): Likewise.
5830 (evaluate_properties_for_edge): Likewise.
5831 (ipa_fn_summary::reset): Likewise.
5832 (ipa_fn_summary_t::duplicate): Likewise.
5833 (dump_ipa_call_summary): Likewise.
5834 (ipa_dump_fn_summary): Likewise.
5835 (analyze_function_body): Likewise.
5836 (compute_fn_summary): Likewise.
5837 (estimate_edge_devirt_benefit): Likewise.
5838 (estimate_edge_size_and_time): Likewise.
5839 (estimate_calls_size_and_time): Likewise.
5840 (estimate_node_size_and_time): Likewise.
5841 (inline_update_callee_summaries): Likewise.
5842 (remap_edge_change_prob): Likewise.
5843 (remap_edge_summaries): Likewise.
5844 (ipa_merge_fn_summary_after_inlining): Likewise.
5845 (ipa_update_overall_fn_summary): Likewise.
5846 (read_ipa_call_summary): Likewise.
5847 (inline_read_section): Likewise.
5848 (write_ipa_call_summary): Likewise.
5849 (ipa_fn_summary_write): Likewise.
5850 (ipa_free_fn_summary): Likewise.
5851 * ipa-hsa.c (process_hsa_functions): Likewise.
5852 (ipa_hsa_write_summary): Likewise.
5853 (ipa_hsa_read_section): Likewise.
5854 * ipa-icf.c (sem_function::merge): Likewise.
5855 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5856 (do_estimate_edge_time): Likewise.
5857 (estimate_size_after_inlining): Likewise.
5858 (estimate_growth): Likewise.
5859 (growth_likely_positive): Likewise.
5860 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5861 (inline_call): Likewise.
5862 * ipa-inline.c (caller_growth_limits): Likewise.
5863 (can_inline_edge_p): Likewise.
5864 (can_inline_edge_by_limits_p): Likewise.
5865 (compute_uninlined_call_time): Likewise.
5866 (compute_inlined_call_time): Likewise.
5867 (want_inline_small_function_p): Likewise.
5868 (edge_badness): Likewise.
5869 (update_caller_keys): Likewise.
5870 (update_callee_keys): Likewise.
5871 (recursive_inlining): Likewise.
5872 (inline_small_functions): Likewise.
5873 (inline_to_all_callers_1): Likewise.
5874 (dump_overall_stats): Likewise.
5875 (early_inline_small_functions): Likewise.
5876 (early_inliner): Likewise.
5877 * ipa-inline.h (estimate_edge_growth): Likewise.
5878 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5879 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5880 * ipa-prop.h (IPA_NODE_REF): Likewise.
5881 (IPA_EDGE_REF): Likewise.
5882 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5883 (propagate_malloc): Likewise.
5884 * ipa-split.c (execute_split_functions): Likewise.
5885 * symbol-summary.h: Rename get to get_create.
5887 (get_create): Likewise.
5888 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5890 2018-06-08 Martin Liska <mliska@suse.cz>
5892 * symbol-summary.h (release): Move definition out of class
5894 (symtab_removal): Likewise.
5895 (symtab_duplication): Likewise.
5897 2018-06-08 Martin Liska <mliska@suse.cz>
5899 * symbol-summary.h (function_summary): Move constructor
5900 implementation out of class declaration.
5901 (release): Likewise.
5902 (symtab_insertion): Likewise.
5903 (symtab_removal): Likewise.
5904 (symtab_duplication): Likewise.
5907 2018-06-08 Martin Liska <mliska@suse.cz>
5909 * Makefile.in: Remove support for MPX (macros, related functions,
5910 fields in cgraph_node, ...).
5911 * builtin-types.def (BT_BND): Likewise.
5912 (BT_FN_BND_CONST_PTR): Likewise.
5913 (BT_FN_CONST_PTR_BND): Likewise.
5914 (BT_FN_VOID_PTR_BND): Likewise.
5915 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5916 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5917 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5918 (expand_builtin_mempcpy_with_bounds): Likewise.
5919 (expand_builtin_memset_with_bounds): Likewise.
5920 (expand_builtin_memset_args): Likewise.
5921 (std_expand_builtin_va_start): Likewise.
5922 (expand_builtin): Likewise.
5923 (expand_builtin_with_bounds): Likewise.
5924 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5925 (DEF_LIB_BUILTIN_CHKP): Likewise.
5926 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5927 (DEF_CHKP_BUILTIN): Likewise.
5928 (BUILT_IN_MEMCPY): Likewise.
5929 (BUILT_IN_MEMMOVE): Likewise.
5930 (BUILT_IN_MEMPCPY): Likewise.
5931 (BUILT_IN_MEMSET): Likewise.
5932 (BUILT_IN_STPCPY): Likewise.
5933 (BUILT_IN_STRCAT): Likewise.
5934 (BUILT_IN_STRCHR): Likewise.
5935 (BUILT_IN_STRCPY): Likewise.
5936 (BUILT_IN_STRLEN): Likewise.
5937 (BUILT_IN_MEMCPY_CHK): Likewise.
5938 (BUILT_IN_MEMMOVE_CHK): Likewise.
5939 (BUILT_IN_MEMPCPY_CHK): Likewise.
5940 (BUILT_IN_MEMSET_CHK): Likewise.
5941 (BUILT_IN_STPCPY_CHK): Likewise.
5942 (BUILT_IN_STRCAT_CHK): Likewise.
5943 (BUILT_IN_STRCPY_CHK): Likewise.
5944 * calls.c (store_bounds): Likewise.
5945 (emit_call_1): Likewise.
5946 (special_function_p): Likewise.
5947 (maybe_warn_nonstring_arg): Likewise.
5948 (initialize_argument_information): Likewise.
5949 (finalize_must_preallocate): Likewise.
5950 (compute_argument_addresses): Likewise.
5951 (expand_call): Likewise.
5952 * cfgexpand.c (expand_call_stmt): Likewise.
5953 (expand_return): Likewise.
5954 (expand_gimple_stmt_1): Likewise.
5955 (pass_expand::execute): Likewise.
5956 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5957 (cgraph_node::remove): Likewise.
5958 (cgraph_node::dump): Likewise.
5959 (cgraph_node::verify_node): Likewise.
5960 * cgraph.h (chkp_function_instrumented_p): Likewise.
5961 (symtab_node::get_alias_target): Likewise.
5962 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5963 (cgraph_local_p): Likewise.
5964 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5965 (cgraph_edge::rebuild_references): Likewise.
5966 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5967 (walk_polymorphic_call_targets): Likewise.
5968 (cgraph_node::expand_thunk): Likewise.
5969 (symbol_table::output_weakrefs): Likewise.
5970 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5971 (ix86_handle_option): Likewise.
5972 * config/i386/constraints.md: Likewise.
5973 * config/i386/i386-builtin-types.def (BND): Likewise.
5977 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5978 (BDESC_FIRST): Likewise.
5980 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5981 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5982 * config/i386/i386.c (enum reg_class): Likewise.
5983 (ix86_target_string): Likewise.
5984 (ix86_option_override_internal): Likewise.
5985 (ix86_conditional_register_usage): Likewise.
5986 (ix86_valid_target_attribute_inner_p): Likewise.
5987 (ix86_set_indirect_branch_type): Likewise.
5988 (ix86_set_current_function): Likewise.
5989 (ix86_function_arg_regno_p): Likewise.
5990 (init_cumulative_args): Likewise.
5991 (ix86_function_arg_advance): Likewise.
5992 (ix86_function_arg): Likewise.
5993 (ix86_pass_by_reference): Likewise.
5994 (ix86_function_value_regno_p): Likewise.
5995 (ix86_function_value_1): Likewise.
5996 (ix86_function_value_bounds): Likewise.
5997 (ix86_return_in_memory): Likewise.
5998 (ix86_setup_incoming_vararg_bounds): Likewise.
5999 (ix86_va_start): Likewise.
6000 (indirect_thunk_need_prefix): Likewise.
6001 (print_reg): Likewise.
6002 (ix86_print_operand): Likewise.
6003 (ix86_expand_call): Likewise.
6004 (ix86_output_function_return): Likewise.
6005 (reg_encoded_number): Likewise.
6006 (BDESC_VERIFYS): Likewise.
6007 (ix86_init_mpx_builtins): Likewise.
6008 (ix86_init_builtins): Likewise.
6009 (ix86_emit_cmove): Likewise.
6010 (ix86_emit_move_max): Likewise.
6011 (ix86_expand_builtin): Likewise.
6012 (ix86_builtin_mpx_function): Likewise.
6013 (ix86_get_arg_address_for_bt): Likewise.
6014 (ix86_load_bounds): Likewise.
6015 (ix86_store_bounds): Likewise.
6016 (ix86_load_returned_bounds): Likewise.
6017 (ix86_store_returned_bounds): Likewise.
6018 (ix86_class_likely_spilled_p): Likewise.
6019 (ix86_hard_regno_mode_ok): Likewise.
6020 (x86_order_regs_for_local_alloc): Likewise.
6021 (ix86_mitigate_rop): Likewise.
6022 (ix86_bnd_prefixed_insn_p): Likewise.
6023 (ix86_mpx_bound_mode): Likewise.
6024 (ix86_make_bounds_constant): Likewise.
6025 (ix86_initialize_bounds): Likewise.
6026 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6027 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6028 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6029 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6030 (TARGET_CHKP_BOUND_MODE): Likewise.
6031 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6032 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6033 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6034 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6035 * config/i386/i386.h (TARGET_MPX): Likewise.
6036 (TARGET_MPX_P): Likewise.
6037 (VALID_BND_REG_MODE): Likewise.
6038 (FIRST_BND_REG): Likewise.
6039 (LAST_BND_REG): Likewise.
6040 (enum reg_class): Likewise.
6041 (BND_REG_P): Likewise.
6042 (BND_REGNO_P): Likewise.
6043 (BNDmode): Likewise.
6044 (ADJUST_INSN_LENGTH): Likewise.
6045 * config/i386/i386.md: Likewise.
6046 * config/i386/i386.opt: Likewise.
6047 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6048 (defined): Likewise.
6049 (LINK_MPX): Likewise.
6050 (MPX_SPEC): Likewise.
6051 (LIBMPX_SPEC): Likewise.
6052 (LIBMPXWRAPPERS_SPEC): Likewise.
6053 (CHKP_SPEC): Likewise.
6054 * config/i386/predicates.md: Likewise.
6055 * dbxout.c (dbxout_type): Likewise.
6056 * doc/extend.texi: Likewise.
6057 * doc/invoke.texi: Likewise.
6058 * doc/md.texi: Likewise.
6059 * doc/tm.texi: Likewise.
6060 * doc/tm.texi.in: Likewise.
6061 * dwarf2out.c (is_base_type): Likewise.
6062 (gen_formal_types_die): Likewise.
6063 (gen_subprogram_die): Likewise.
6064 (gen_type_die_with_usage): Likewise.
6065 (gen_decl_die): Likewise.
6066 (dwarf2out_late_global_decl): Likewise.
6067 * expr.c (expand_assignment): Likewise.
6068 (emit_storent_insn): Likewise.
6069 (store_expr_with_bounds): Likewise.
6070 (store_expr): Likewise.
6071 (expand_expr_real_1): Likewise.
6072 * expr.h (store_expr_with_bounds): Likewise.
6073 * function.c (use_register_for_decl): Likewise.
6074 (struct bounds_parm_data): Likewise.
6075 (assign_parms_augmented_arg_list): Likewise.
6076 (assign_parm_find_entry_rtl): Likewise.
6077 (assign_parm_is_stack_parm): Likewise.
6078 (assign_parm_load_bounds): Likewise.
6079 (assign_bounds): Likewise.
6080 (assign_parms): Likewise.
6081 (expand_function_start): Likewise.
6082 * gcc.c (CHKP_SPEC): Likewise.
6083 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6084 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6085 (wrestrict_dom_walker::check_call): Likewise.
6086 * gimple.c (gimple_build_call_from_tree): Likewise.
6087 * gimple.h (enum gf_mask): Likewise.
6088 (gimple_call_with_bounds_p): Likewise.
6089 (gimple_call_set_with_bounds): Likewise.
6090 * gimplify.c (gimplify_init_constructor): Likewise.
6091 * ipa-cp.c (initialize_node_lattices): Likewise.
6092 (propagate_constants_across_call): Likewise.
6093 (find_more_scalar_values_for_callers_subset): Likewise.
6094 * ipa-hsa.c (process_hsa_functions): Likewise.
6095 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6096 * ipa-icf.c (sem_function::merge): Likewise.
6097 * ipa-inline.c (early_inliner): Likewise.
6098 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6099 (warn_function_cold): Likewise.
6100 (propagate_pure_const): Likewise.
6101 * ipa-ref.h (enum GTY): Likewise.
6102 * ipa-split.c (find_retbnd): Likewise.
6103 (consider_split): Likewise.
6104 (split_function): Likewise.
6105 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6106 * ipa.c (walk_polymorphic_call_targets): Likewise.
6107 (symbol_table::remove_unreachable_nodes): Likewise.
6108 (process_references): Likewise.
6109 (cgraph_build_static_cdtor_1): Likewise.
6110 * lto-cgraph.c (lto_output_node): Likewise.
6111 (output_refs): Likewise.
6112 (compute_ltrans_boundary): Likewise.
6113 (input_overwrite_node): Likewise.
6114 (input_node): Likewise.
6115 (input_cgraph_1): Likewise.
6116 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6117 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6118 (class pass_chkp_instrumentation_passes): Likewise.
6119 (make_pass_chkp_instrumentation_passes): Likewise.
6120 * passes.def: Likewise.
6121 * rtl.h (struct GTY): Likewise.
6122 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6123 * stor-layout.c (layout_type): Likewise.
6124 * symtab.c: Likewise.
6125 * target.def: Likewise.
6126 * targhooks.c (default_chkp_bound_type): Likewise.
6127 (default_chkp_bound_mode): Likewise.
6128 (default_builtin_chkp_function): Likewise.
6129 (default_chkp_function_value_bounds): Likewise.
6130 (default_chkp_make_bounds_constant): Likewise.
6131 (default_chkp_initialize_bounds): Likewise.
6132 * targhooks.h (default_chkp_bound_type): Likewise.
6133 (default_chkp_bound_mode): Likewise.
6134 (default_builtin_chkp_function): Likewise.
6135 (default_chkp_function_value_bounds): Likewise.
6136 (default_chkp_make_bounds_constant): Likewise.
6137 (default_chkp_initialize_bounds): Likewise.
6138 * toplev.c (compile_file): Likewise.
6139 (process_options): Likewise.
6140 * tree-core.h (DEF_BUILTIN): Likewise.
6141 (DEF_BUILTIN_CHKP): Likewise.
6142 * tree-inline.c (declare_return_variable): Likewise.
6143 (remap_gimple_stmt): Likewise.
6144 (copy_bb): Likewise.
6145 (initialize_inlined_parameters): Likewise.
6146 (expand_call_inline): Likewise.
6147 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6148 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6149 (make_pass_ipa_chkp_produce_thunks): Likewise.
6150 (make_pass_chkp): Likewise.
6151 (make_pass_chkp_opt): Likewise.
6152 (make_pass_chkp_instrumentation_passes): Likewise.
6153 * tree-pretty-print.c (dump_generic_node): Likewise.
6154 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6155 * tree-ssa-dce.c (propagate_necessity): Likewise.
6156 (eliminate_unnecessary_stmts): Likewise.
6157 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6158 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6159 * tree-ssa-sccvn.h: Likewise.
6160 * tree-ssa-strlen.c (get_string_length): Likewise.
6161 (valid_builtin_call): Likewise.
6162 (adjust_last_stmt): Likewise.
6163 (handle_builtin_strchr): Likewise.
6164 (handle_builtin_strcpy): Likewise.
6165 (handle_builtin_stxncpy): Likewise.
6166 (handle_builtin_memcpy): Likewise.
6167 (handle_builtin_strcat): Likewise.
6168 (strlen_check_and_optimize_stmt): Likewise.
6169 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6170 * tree-streamer-in.c: Likewise.
6171 * tree-streamer.c (record_common_node): Likewise.
6172 * tree.c (tree_code_size): Likewise.
6173 (wide_int_to_tree_1): Likewise.
6174 (type_contains_placeholder_1): Likewise.
6175 (build_common_tree_nodes): Likewise.
6176 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6177 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6178 (POINTER_BOUNDS_P): Likewise.
6179 (BOUNDED_TYPE_P): Likewise.
6180 (BOUNDED_P): Likewise.
6181 (CALL_WITH_BOUNDS_P): Likewise.
6182 (pointer_bounds_type_node): Likewise.
6183 * value-prof.c (gimple_ic): Likewise.
6184 * var-tracking.c (vt_add_function_parameters): Likewise.
6185 * varasm.c (make_decl_rtl): Likewise.
6186 (assemble_start_function): Likewise.
6187 (output_constant): Likewise.
6188 (maybe_assemble_visibility): Likewise.
6189 * varpool.c (ctor_for_folding): Likewise.
6190 * chkp-builtins.def: Remove.
6191 * ipa-chkp.c: Remove.
6192 * ipa-chkp.h: Remove.
6193 * rtl-chkp.c: Remove.
6194 * rtl-chkp.h: Remove.
6195 * tree-chkp-opt.c: Remove.
6196 * tree-chkp.c: Remove.
6197 * tree-chkp.h: Remove.
6199 2018-06-07 Carl Love <cel@us.ibm.com>
6201 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6202 vextract_fp_from_shortl): Add BE support.
6204 2018-06-07 Paul Koning <ni1d@arrl.net>
6206 * compare-elim.c (try_merge_compare): Don't merge compare if
6207 address contains a side effect.
6208 (try_eliminate_compare): Likewise.
6210 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6212 * config.gcc: Support "tremont".
6213 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6214 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6216 * config/i386/i386.c (m_TREMONT): Define.
6217 (processor_target_table): Add "tremont".
6218 (PTA_TREMONT): Define.
6219 (ix86_lea_outperforms): Add TARGET_TREMONT.
6220 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6221 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6222 and M_INTEL_GOLDMONT_PLUS.
6223 (fold_builtin_cpu): Add "tremont".
6224 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6225 (ix86_option_override_internal): Add "tremont".
6226 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6227 (processor_type): Add PROCESSOR_TREMONT.
6228 * config/i386/x86-tune.def: Add m_TREMONT.
6229 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6231 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6233 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6234 symbol defined for msp430i* devices to be lower case.
6236 2018-06-07 Richard Biener <rguenther@suse.de>
6238 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6239 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6240 Properly wrap signed arithmetic if overflow wraps.
6242 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6244 PR tree-optimization/69615
6245 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6246 of a cast from a same precision integral SSA_NAME in a bb dominated
6247 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6248 cast to utype if rhs2 has already a compatible type.
6250 2018-06-07 Richard Biener <rguenther@suse.de>
6252 PR tree-optimization/85935
6253 * graphite-scop-detection.c (find_params_in_bb): Analyze
6254 condition operands with respect to the correct loop. Assert
6255 the analysis doesn't fail.
6257 2018-06-04 Carl Love <cel@us.ibm.com>
6259 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6260 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6261 as it is slightly cheaper.
6262 (first_match_or_eos_index_<mode>):
6263 Calculate index using natural element order.
6264 (first_match_index_<mode>):
6265 Calculate index using natural element order.
6266 (first_match_or_eos_index_<mode>):
6267 Calculate index using natural order.
6268 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6269 for BE and LE modes.
6270 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6271 P9V_BUILTIN_VCLZLSBB_V16QI.
6272 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6275 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6277 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6278 indentation and line wrap for many prototypes. Add missing
6279 @smallexample directives around block of prototypes for vec_xl and
6282 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6284 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6285 track if we pass or return IEEE 128-bit floating point.
6286 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6287 C++ mangling that is compatible with GCC 8.1.
6288 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6289 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6290 floating point types.
6291 (rs6000_function_arg_advance_1): Likewise.
6292 (rs6000_mangle_type): Optionally generate mangled names that match
6293 what GCC 8.1 generated for IEEE 128-bit floating point types.
6294 (rs6000_globalize_decl_name): If we have an external function that
6295 passes or returns IEEE 128-bit types, generate a weak reference
6296 from the mangled name used in GCC 8.1 to the current mangled
6298 (rs6000_init_builtins): Make __ibm128 use the long double type if
6299 long double is IBM extended double. Make __float128 use the long
6300 double type if long double is IEEE 128-bit.
6303 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6304 macro for __ibm128 built-in functions.
6305 (PACK_IF): Add __ibm128 pack/unpack functions.
6306 (UNPACK_IF): Likewise.
6307 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6308 enable long double built-in functions if long double is IEEE
6309 128-bit floating point.
6310 (rs6000_invalid_builtin): Update long double built-in function
6312 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6313 functions, adjust the built-in function to use the long double
6314 built-in function if __ibm128 and long double are the same type.
6315 * doc/extend.texi (PowerPC builtins): Update documention for
6316 __builtin_{,un}pack_longdouble. Add documentation for
6317 __builtin_{,un}pack_ibm128.
6319 2018-06-06 Jim Wilson <jimw@sifive.com>
6321 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6322 (struct machine_function): New field interrupt_mode.
6323 (riscv_handle_type_attribute): New function. Add forward declaration.
6324 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6325 (riscv_expand_epilogue): Check interrupt_mode field.
6326 (riscv_set_current_function): Check interrupt attribute args and
6327 set interrupt_mode field.
6328 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6329 (riscv_sret, riscv_uret): New.
6330 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6331 new arguments to interrupt attribute.
6333 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6336 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6337 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6339 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6341 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6342 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6343 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6344 several redundant entries.
6346 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6348 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6349 type from "rtx" to "rtx_insn *".
6350 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6351 for local "call_insn", removing cast.
6352 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6354 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6356 PR tree-optimization/86066
6357 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6358 for BIT_INSERT_EXPR stores.
6360 2018-06-06 Richard Biener <rguenther@suse.de>
6362 PR tree-optimization/86062
6363 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6364 component refs ontop
6365 of to be offsetted base.
6367 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6369 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6370 to be static and remove check on interrupt attribute name.
6372 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6374 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6375 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6377 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6380 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6382 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6383 Remove second argument, change how error is called.
6384 (aarch64_layout_arg): Remove second argument from
6385 aarch64_err_no_fpadvsimd call.
6386 (aarch64_init_cumulative_args): Ditto.
6387 (aarch64_gimplify_va_arg_expr): Ditto.
6388 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6390 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6392 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6393 (*simple_return_indirect_internal<mode>): Rename from
6394 simple_return_indirect_internal. Use W mode iterator.
6395 (rstorssp): New expander.
6396 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6397 (clrssbsy): New expander.
6398 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6400 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6402 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6404 (cmse_check_pointed_object): Likewise.
6406 2018-06-05 Martin Liska <mliska@suse.cz>
6408 PR gcov-profile/47618
6409 * doc/invoke.texi: Document how -fprofile-dir format
6412 2018-06-05 Richard Biener <rguenther@suse.de>
6414 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6415 removal pretend DOM info isn't available so we do not update
6416 it and only remove edges, not dominated blocks. Actually free
6417 DOM info in case we removed something. Remove unreachable blocks.
6418 (mfb_keep_latches): Work with either DOM info or marked backedges.
6419 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6420 first. Mark backedges if DOM info isn't available.
6421 (Re-)compute DOM info after cleanup_control_flow_pre.
6423 2018-06-05 Richard Biener <rguenther@suse.de>
6425 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6426 (locus_discrim_hasher::hash): Adjust.
6427 (locus_discrim_hasher::equal): Likewise.
6428 (next_discriminator_for_locus): Work on line directly.
6429 (same_line_p): Pass in expanded locus1 as well.
6430 (assign_discriminators): Avoid redundant location expansions.
6432 2018-06-05 Richard Biener <rguenther@suse.de>
6434 PR tree-optimization/86046
6435 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6436 if required after clearing TREE_ADDRESSABLE.
6438 2018-06-05 Richard Biener <rguenther@suse.de>
6440 PR tree-optimization/86047
6441 * tree-ssa-loop.c (for_each_index): Glob handling of all
6442 decls and constants and really handle all of them.
6444 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6447 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6448 qualifier_void_pointer and qualifier_const_void_pointer.
6449 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6450 (arm_init_builtins): Handle the above.
6451 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6452 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6453 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6456 2018-06-05 Martin Liska <mliska@suse.cz>
6458 * auto-profile.c (read_autofdo_file): Do not use
6459 gcov_ctr_summary struct.
6460 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6461 * coverage.c (struct counts_entry): Likewise.
6462 (read_counts_file): Read just single summary entry.
6463 (get_coverage_counts): Use gcov_summary struct.
6464 * coverage.h (get_coverage_counts): Likewise.
6465 * gcov-dump.c (dump_working_sets): Likewise.
6466 (tag_summary): Dump just single summary.
6467 * gcov-io.c (gcov_write_summary): Write just histogram
6469 (gcov_read_summary): Read just single summary.
6470 (compute_working_sets): Use gcov_summary struct.
6471 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6472 of GCOV_COUNTERS_SUMMABLE.
6473 (GCOV_COUNTERS_SUMMABLE): Remove.
6474 (GCOV_FIRST_VALUE_COUNTER): Replace with
6475 GCOV_COUNTER_V_INTERVAL.
6476 (struct gcov_ctr_summary): Remove.
6477 (struct gcov_summary): Directly use fields of former
6479 (compute_working_sets): Use gcov_summary struct.
6480 * gcov.c (read_count_file): Do not use ctrs fields.
6481 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6483 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6485 * profile.c: Likewise.
6486 * profile.h: Likewise.
6488 2018-06-05 Martin Liska <mliska@suse.cz>
6490 PR gcov-profile/84846
6491 * gcov.c (output_lines): Print working directory only
6492 in intermediate format.
6494 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6496 * config/s390/s390-builtin-types.def: Add void function type.
6497 * config/s390/s390-builtins.def: Use the function type for the
6500 2018-06-04 Jim Wilson <jimw@sifive.com>
6502 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6504 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6505 and maybe_eh_return. Change regno to unsigned int. Use new args to
6506 handle EH_RETURN_DATA_REGNO registers properly.
6507 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6508 (riscv_expand_epilogue): Update comment. Change argument name and
6509 type. Update code to use new name and type. Pass new args to
6510 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6512 * config/riscv/riscv.md (NORMAL_RETURN): New.
6513 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6514 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6515 (eh_return): Call gen_eh_return_internal and emit barrier.
6516 (eh_return_internal): Call riscv_expand_epilogue.
6518 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6520 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6521 bit_insertion field and declare can_be_merged_into method.
6522 (merged_store_group::can_be_merged_into): New method.
6523 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6524 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6525 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6527 2018-06-04 Richard Biener <rguenther@suse.de>
6529 PR tree-optimization/85955
6530 * builtins.c (fold_builtin_sincos): Convert pointers to
6531 destination to appropriate type before dereferencing.
6533 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6535 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6537 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6539 * expr.c (expand_expr_real_1): Force the operand into memory if
6540 its TYPE_MODE is BLKmode and if there is no integer mode for
6541 the number of bits being extracted.
6543 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6547 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6548 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6550 2018-06-04 Richard Biener <rguenther@suse.de>
6552 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6553 (cleanup_tree_cfg_noloop): ... single caller. Do
6554 start_recording_case_labels later.
6556 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6558 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6559 to _IMMINTRIN_H_INCLUDED.
6560 * config/i386/pconfigintrin.h: Ditto.
6561 * config/i386/waitpkgintrin.h: Ditto.
6562 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6563 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6564 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6565 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6566 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6567 waitpkgintrin.h and cldemoteintrin.h.
6569 2018-06-04 Richard Biener <rguenther@suse.de>
6571 PR tree-optimization/86038
6572 * tracer.c (find_best_successor): Check probability for
6573 being initialized, bail out if not.
6575 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6578 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6579 of bits to ignore when comparing architectures.
6581 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6583 PR tree-optimization/69615
6584 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6585 maximum or minimum of the type, try to merge it also as if
6586 range1 is + [-, x - 1] or + [x + 1, -].
6589 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6591 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6593 PR tree-optimization/86034
6594 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6595 the unsigned bitfield type in a bit insertion sequence if it does not
6596 have a larger precision than the bitfield size.
6597 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6599 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6601 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6603 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6605 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6606 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6607 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6608 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6610 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6612 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6613 Disable -fdelete-null-pointer-checks for ELF toolchain.
6615 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6616 Kito Cheng <kito.cheng@gmail.com>
6618 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6619 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6620 (nds32*-*-*): Add glibc and uclibc conditions.
6621 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6622 (TARGET_EXCEPT_UNWIND_INFO): Define.
6623 * config/nds32/elf.h: New file.
6624 * config/nds32/linux.h: New file.
6625 * config/nds32/nds32-elf.opt: New file.
6626 * config/nds32/nds32-linux.opt: New file.
6627 * config/nds32/nds32-fp-as-gp.c
6628 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6629 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6631 (nds32_asm_file_end): Ditto.
6632 (nds32_print_operand): Ditto.
6633 (nds32_insert_attributes): Ditto.
6634 (nds32_init_libfuncs): New function.
6635 (TARGET_HAVE_TLS): Define.
6636 (TARGET_INIT_LIBFUNCS): Define.
6637 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6639 (TARGET_ELF): Apply different mcmodel setting.
6640 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6641 been migrated into elf.h and linux.h files.
6642 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6643 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6644 (mcmodel): The content has been migrated into nds32-elf.opt and
6645 nds32-linux.opt files.
6646 * config/nds32/t-elf: New file.
6647 * config/nds32/t-linux: New file.
6649 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6650 Shiva Chen <shiva0217@gmail.com>
6652 * config/nds32/constants.md (unspec_volatile_element): Add
6653 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6654 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6656 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6657 (make_pass_nds32_fp_as_gp): Declare.
6658 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6660 (nds32_asm_function_end_prologue): Remove unused asm output.
6661 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6662 (nds32_asm_file_start): Output necessary fp_as_gp information.
6663 (nds32_option_override): Adjust register usage.
6664 (nds32_expand_prologue): Consider fp_as_gp situation.
6665 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6666 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6669 (simple_return): Ditto.
6670 (omit_fp_begin): Output special directive for fp_as_gp.
6671 (omit_fp_end): Output special directive for fp_as_gp.
6672 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6673 mforbid-fp-as-gp): New options.
6675 2018-06-01 Mark Wielaard <mark@klomp.org>
6677 * dwarf2out.c (dwarf2out_finish): Remove generation of
6678 DW_AT_loclists_base.
6680 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6682 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6683 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6684 (struct merged_store_group): Add bit_insertion field.
6685 (dump_char_array): Use standard hexadecimal format.
6686 (merged_store_group::merged_store_group): Set bit_insertion to false.
6687 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6688 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6689 also print the mask in the dump file.
6690 (pass_store_merging::gate): Minor tweak.
6691 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6692 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6693 stores with INTEGER_CST stores.
6694 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6695 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6696 and use it throughout. Generate bit insertion sequences if need be.
6697 (pass_store_merging::process_store): Remove redundant condition.
6698 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6700 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6702 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6703 the 128-bit floating point types. Fix function comment.
6705 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6707 * config/aarch64/aarch64-simd.md
6708 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6710 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6713 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6715 PR tree-optimization/85989
6716 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6718 (backprop::intersect_uses): Check it when deciding whether this
6719 is a backedge reference.
6720 (backprop::process_block): Add each phi to m_visited_phis
6721 after visiting it, then clear it at the end.
6723 2018-06-01 Richard Biener <rguenther@suse.de>
6725 * tree-vectorizer.h (vect_dr_stmt): New function.
6726 (vect_get_load_cost): Adjust.
6727 (vect_get_store_cost): Likewise.
6728 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6729 Use vect_dr_stmt instead of DR_SMTT.
6730 (vect_record_base_alignments): Likewise.
6731 (vect_calculate_target_alignment): Likewise.
6732 (vect_compute_data_ref_alignment): Likewise and make static.
6733 (vect_update_misalignment_for_peel): Likewise.
6734 (vect_verify_datarefs_alignment): Likewise.
6735 (vector_alignment_reachable_p): Likewise.
6736 (vect_get_data_access_cost): Likewise. Pass down
6737 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6738 (vect_get_peeling_costs_all_drs): Likewise.
6739 (vect_peeling_hash_get_lowest_cost): Likewise.
6740 (vect_enhance_data_refs_alignment): Likewise.
6741 (vect_find_same_alignment_drs): Likewise.
6742 (vect_analyze_data_refs_alignment): Likewise.
6743 (vect_analyze_group_access_1): Likewise.
6744 (vect_analyze_group_access): Likewise.
6745 (vect_analyze_data_ref_access): Likewise.
6746 (vect_analyze_data_ref_accesses): Likewise.
6747 (vect_vfa_segment_size): Likewise.
6748 (vect_small_gap_p): Likewise.
6749 (vectorizable_with_step_bound_p): Likewise.
6750 (vect_prune_runtime_alias_test_list): Likewise.
6751 (vect_analyze_data_refs): Likewise.
6752 (vect_supportable_dr_alignment): Likewise.
6753 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6754 (vect_gen_prolog_loop_niters): Likewise.
6755 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6756 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6758 (vect_recog_mask_conversion_pattern): Likewise.
6759 (vect_try_gather_scatter_pattern): Likewise.
6760 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6761 to vect_get_store_cost.
6762 (vect_get_store_cost): Get stmt_info instead of DR.
6763 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6764 (vect_get_load_cost): Get stmt_info instead of DR.
6766 2018-06-01 Richard Biener <rguenther@suse.de>
6769 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6770 vars wrapped in MEM_REFs.
6772 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6774 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6775 Fix subreg tests so that we only return a choice between
6776 GENERAL_REGS and FP_REGS if the original classes included both.
6778 2018-06-01 Richard Biener <rguenther@suse.de>
6781 * tree-ssa-structalias.c (get_function_part_constraint):
6782 Handle NULL fi->decl.
6783 (find_func_aliases_for_call): Properly handle indirect
6784 fi from direct call.
6785 (find_func_clobbers): Likewise.
6786 (ipa_pta_execute): Likewise.
6787 (create_variable_info_for): For functions that are ifunc_resolver
6788 resolve to a varinfo that contains the result of the resolver call.
6789 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6792 2018-05-31 Michael Collison <michael.collison@arm.com>
6794 * config/aarch64/aarch64.md:
6795 (*fix_to_zero_extenddfdi2): New pattern.
6796 * gcc.target/aarch64/fix_extend1.c: New testcase.
6798 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6802 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6803 and BUILT_IN_STRNCMP_EQ.
6804 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6805 BUILT_IN_STRNCMP_EQ.
6806 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6807 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6808 (gimple_fold_builtin): Likewise.
6809 * tree-ssa-strlen.c (compute_string_length): New function.
6810 (determine_min_obsize): New function.
6811 (handle_builtin_string_cmp): New function to handle calls to
6812 string compare functions.
6813 (strlen_optimize_stmt): Add handling to builtin string compare
6815 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6816 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6817 * tree.c (build_common_builtin_nodes): Add new defines of
6818 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6820 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6823 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6824 functions with naked attribute.
6826 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6828 * config/i386/sse.md (avx_vec_concat<mode>):
6829 Substitute concat_tg_mode mode attribute with xtg_mode.
6830 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6831 (concat_tg_mode): Remove mode attribute.
6833 2018-05-31 Martin Sebor <msebor@redhat.com>
6836 * calls.c (alloc_max_size): Correct a logic error/typo.
6837 Treat excessive arguments as infinite. Warn for invalid arguments.
6838 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6840 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6843 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6844 and movx for Haswell.
6846 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6847 Cesar Philippidis <cesar@codesourcery.com>
6850 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6851 when emitting error on private/firstprivate reductions.
6852 * omp-low.c (lower_omp_target): Avoid reference-type processing
6853 on pointers for firstprivate clause.
6855 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6857 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6860 * config/aarch64/aarch64-simd.md
6861 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6862 (aarch64_ld1_x3_<mode>): Likewise
6863 (aarch64_st1x2<VALLDIF:mode>): Likewise
6864 (aarch64_st1_x2_<mode>): Likewise
6865 (aarch64_st1x3<VALLDIF:mode>): Likewise
6866 (aarch64_st1_x3_<mode>): Likewise
6867 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6868 (vld1_s8_x3): Likewise.
6869 (vld1_u16_x3): Likewise.
6870 (vld1_s16_x3): Likewise.
6871 (vld1_u32_x3): Likewise.
6872 (vld1_s32_x3): Likewise.
6873 (vld1_u64_x3): Likewise.
6874 (vld1_s64_x3): Likewise.
6875 (vld1_f16_x3): Likewise.
6876 (vld1_f32_x3): Likewise.
6877 (vld1_f64_x3): Likewise.
6878 (vld1_p8_x3): Likewise.
6879 (vld1_p16_x3): Likewise.
6880 (vld1_p64_x3): Likewise.
6881 (vld1q_u8_x3): Likewise.
6882 (vld1q_s8_x3): Likewise.
6883 (vld1q_u16_x3): Likewise.
6884 (vld1q_s16_x3): Likewise.
6885 (vld1q_u32_x3): Likewise.
6886 (vld1q_s32_x3): Likewise.
6887 (vld1q_u64_x3): Likewise.
6888 (vld1q_s64_x3): Likewise.
6889 (vld1q_f16_x3): Likewise.
6890 (vld1q_f32_x3): Likewise.
6891 (vld1q_f64_x3): Likewise.
6892 (vld1q_p8_x3): Likewise.
6893 (vld1q_p16_x3): Likewise.
6894 (vld1q_p64_x3): Likewise.
6895 (vst1_s64_x2): Likewise.
6896 (vst1_u64_x2): Likewise.
6897 (vst1_f64_x2): Likewise.
6898 (vst1_s8_x2): Likewise.
6899 (vst1_p8_x2): Likewise.
6900 (vst1_s16_x2): Likewise.
6901 (vst1_p16_x2): Likewise.
6902 (vst1_s32_x2): Likewise.
6903 (vst1_u8_x2): Likewise.
6904 (vst1_u16_x2): Likewise.
6905 (vst1_u32_x2): Likewise.
6906 (vst1_f16_x2): Likewise.
6907 (vst1_f32_x2): Likewise.
6908 (vst1_p64_x2): Likewise.
6909 (vst1q_s8_x2): Likewise.
6910 (vst1q_p8_x2): Likewise.
6911 (vst1q_s16_x2): Likewise.
6912 (vst1q_p16_x2): Likewise.
6913 (vst1q_s32_x2): Likewise.
6914 (vst1q_s64_x2): Likewise.
6915 (vst1q_u8_x2): Likewise.
6916 (vst1q_u16_x2): Likewise.
6917 (vst1q_u32_x2): Likewise.
6918 (vst1q_u64_x2): Likewise.
6919 (vst1q_f16_x2): Likewise.
6920 (vst1q_f32_x2): Likewise.
6921 (vst1q_f64_x2): Likewise.
6922 (vst1q_p64_x2): Likewise.
6923 (vst1_s64_x3): Likewise.
6924 (vst1_u64_x3): Likewise.
6925 (vst1_f64_x3): Likewise.
6926 (vst1_s8_x3): Likewise.
6927 (vst1_p8_x3): Likewise.
6928 (vst1_s16_x3): Likewise.
6929 (vst1_p16_x3): Likewise.
6930 (vst1_s32_x3): Likewise.
6931 (vst1_u8_x3): Likewise.
6932 (vst1_u16_x3): Likewise.
6933 (vst1_u32_x3): Likewise.
6934 (vst1_f16_x3): Likewise.
6935 (vst1_f32_x3): Likewise.
6936 (vst1_p64_x3): Likewise.
6937 (vst1q_s8_x3): Likewise.
6938 (vst1q_p8_x3): Likewise.
6939 (vst1q_s16_x3): Likewise.
6940 (vst1q_p16_x3): Likewise.
6941 (vst1q_s32_x3): Likewise.
6942 (vst1q_s64_x3): Likewise.
6943 (vst1q_u8_x3): Likewise.
6944 (vst1q_u16_x3): Likewise.
6945 (vst1q_u32_x3): Likewise.
6946 (vst1q_u64_x3): Likewise.
6947 (vst1q_f16_x3): Likewise.
6948 (vst1q_f32_x3): Likewise.
6949 (vst1q_f64_x3): Likewise.
6950 (vst1q_p64_x3): Likewise.
6952 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6954 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6955 user_label_prefix to name.
6957 * tree-core.h: Update comment about the format of NAME string
6958 passed to handler in attribute_spec.
6960 * config/msp430/msp430.md: Remove erroneous subreg expression from
6961 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6962 zero_extend{q,h}isi2.
6964 2018-05-30 Borislav Petkov <bp@suse.de>
6966 * doc/extend.texi: Document some architecture specific
6967 constraints and sort entries.
6969 2018-05-30 Martin Sebor <msebor@redhat.com>
6972 * builtins.c (expand_builtin_stpcpy_1): New function.
6973 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6974 only if the former succeeds.
6976 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6978 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6981 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6983 * doc/invoke.texi (-flinker-output): Document
6985 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6987 * passes.c (ipa_write_summaries): Only modify statements if body
6989 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6990 incrementally linking.
6991 (ipa_passes): Likewise.
6992 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6993 pass down resolution info.
6994 * common.opt (flag_incremental_link): Update info.
6995 * gcc.c (plugin specs): Turn flinker-output=* to
6996 -plugin-opt=-linker-output-known
6997 * toplev.c (compile_file): Also cut compilation when doing incremental
6999 * flag-types. (enum lto_partition_model): Add
7000 LTO_LINKER_OUTPUT_NOLTOREL.
7001 (invoke.texi): Add -flinker-output docs.
7002 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7003 link same way as WPA; do not stream in dead initializers.
7005 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7006 darf2out_register_external_decl): Support incremental link.
7008 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7010 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7012 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7014 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7015 it down to simple_object_copy_lto_debug_sections.
7016 (run_gcc): Determine incremental LTO link time and configure
7017 lto1 into non-wpa mode, disable renaming of debug sections.
7019 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7021 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7022 descriptions of various incorrectly documented functions.
7024 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7027 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7028 address check not strict.
7030 2018-05-30 Richard Biener <rguenther@suse.de>
7032 PR tree-optimization/85964
7033 * tracer.c (better_p): Drop initialized count check, we only
7034 call the function with initialized counts now.
7035 (find_best_successor): Do find a best edge if one
7036 has uninitialized count.
7037 (find_best_predecessor): Likewise. Do BB frequency check only
7038 if count is initialized.
7040 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7042 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7043 (aarch64_ldrstr_offset_compare): New.
7044 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7045 load/store orderings.
7046 (aarch64_gen_adjusted_ldpstp): Likewise.
7048 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7050 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7051 Check for subset of GENERAL_REGS and FP_REGS.
7052 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7055 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7057 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7058 and wi::to_poly_offset. Add the current offset and then check
7059 whether the sum fits, rather than using an unchecked addition of
7060 a checked term. Check for a shwi rather than a uhwi.
7061 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7062 (store_constructor): Use poly_int_tree_p.
7063 (expand_expr_real_1): Likewise.
7064 * function.c (assign_temp): Likewise.
7065 * fold-const.c (const_binop): Use poly_int_tree_p and
7067 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7069 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7070 to_poly_offset for MEM offsets.
7071 * ipa-icf.c (sem_variable::equals): Likewise.
7072 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7073 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7074 wi::to_poly_offset for BIT_FIELD_REF offsets.
7075 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7077 * var-tracking.c (emit_note_insn_var_location): Use
7078 tree_to_poly_uint64.
7080 2018-05-29 Jim Wilson <jimw@sifive.com>
7082 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7084 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7087 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7088 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7090 (sse4_1_round<mode>2): Use nonimmediate_operand
7091 for operand 1 predicate.
7093 2018-05-29 Martin Sebor <msebor@redhat.com>
7094 Richard Biener <rguenther@suse.de>
7097 * calls.c (get_size_range): Call determine_value_range instead
7098 of get_value_range..
7099 * tree-vrp.h (determine_value_range): Declared new function.
7100 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7102 2018-05-29 Richard Biener <rguenther@suse.de>
7104 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7105 sure to use non-pattern stmts for get_earlier_stmt arguments.
7106 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7107 called on pattern stmts.
7108 (get_later_stmt): Likewise.
7110 2018-05-29 Martin Liska <mliska@suse.cz>
7112 PR gcov-profile/85759
7113 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7116 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7118 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7120 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7124 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7125 VEC_PACK_FLOAT_EXPR): New tree codes.
7126 * tree-pretty-print.c (op_code_prio): Handle
7127 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7128 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7129 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7130 * tree-inline.c (estimate_operator_cost): Likewise.
7131 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7132 * fold-const.c (const_binop): Likewise.
7133 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7134 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7135 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7136 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7137 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7138 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7139 * expr.c (expand_expr_real_2): Likewise.
7140 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7141 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7142 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7144 * optabs.c (expand_widen_pattern_expr): For
7145 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7146 sign from result type rather than operand's type.
7147 (expand_binop_directly): For vec_packu_float_optab and
7148 vec_packs_float_optab allow result type to be different from operand's
7150 * optabs-tree.c (optab_for_tree_code): Handle
7151 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7152 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7153 * tree-vect-generic.c (expand_vector_operations_1): Handle
7154 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7155 VEC_PACK_FLOAT_EXPR.
7156 * tree-vect-stmts.c (supportable_widening_operation): Handle
7158 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7159 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7160 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7161 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7162 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7164 (vec_pack<floatprefix>_float_<mode>): New expander.
7165 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7167 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7168 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7169 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7170 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7171 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7173 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7174 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7175 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7176 VEC_PACK_FLOAT_EXPR): Document.
7178 2018-05-29 Richard Biener <rguenther@suse.de>
7180 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7182 (stmt_vec_info_vec): Make pointer.
7183 (init_stmt_vec_info_vec): Remove.
7184 (free_stmt_vec_info_vec): Likewise.
7185 (set_stmt_vec_info_vec): New function.
7186 (free_stmt_vec_infos): Likewise.
7187 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7188 (set_vinfo_for_stmt): Likewise.
7189 (get_earlier_stmt): Likewise.
7190 (get_later_stmt): Likewise.
7191 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7192 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7193 (vec_info::~vec_info): Free stmt_vec_infos.
7194 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7195 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7196 (pass_slp_vectorize::execute): Likewise.
7197 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7198 (free_stmt_vec_info_vec): Likewise.
7199 (set_stmt_vec_info_vec): New function.
7200 (free_stmt_vec_infos): Likewise.
7201 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7202 the global stmt_vec_info_vec.
7203 * tree-parloops.c (gather_scalar_reductions): Use
7204 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7207 2018-05-29 Richard Biener <rguenther@suse.de>
7209 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7211 2018-05-29 Martin Liska <mliska@suse.cz>
7212 David Malcolm <dmalcolm@redhat.com>
7214 * vec.c (test_reverse): New.
7215 (vec_c_tests): Add new test.
7216 * vec.h (vl_ptr>::reverse): New function.
7218 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7220 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7222 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7225 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7227 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7229 2018-05-28 Richard Biener <rguenther@suse.de>
7231 PR tree-optimization/85933
7232 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7233 look at stmts marked as vectorizable.
7235 2018-05-28 Richard Biener <rguenther@suse.de>
7237 PR tree-optimization/85934
7238 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7239 vector boolean check before scalar optimization.
7241 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7243 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7246 2018-05-28 Mark Wielaard <mark@klomp.org>
7248 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7249 if it is an expression containing a minus sign.
7251 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7253 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7255 2018-05-27 Paul Koning <ni1d@arrl.net>
7257 * config/pdp11/pdp11.md (truncsihi2): Remove.
7259 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7260 Chung-Ju Wu <jasonwucj@gmail.com>
7262 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7264 (unaligned_store_dw): Ditto.
7265 * config/nds32/nds32-memory-manipulation.c
7266 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7267 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7268 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7269 (emit_setmem_word_loop): Rename to ...
7270 (emit_setmem_doubleword_loop): ... this.
7271 (nds32_gen_dup_4_byte_to_word_value): New function.
7272 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7273 (nds32_expand_setmem_loop): Refine implementation.
7274 (nds32_expand_setmem_loop_v3m): Ditto.
7275 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7278 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7280 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7282 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7284 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7285 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7286 machine->attr_no_prologue_p.
7287 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7288 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7289 (nds32_expand_epilogue): Consider attr_naked_p.
7290 (nds32_expand_epilogue_v3pop): Likewise.
7291 (nds32_can_use_return_insn): Likewise.
7292 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7293 attr_no_prologue_p fields.
7294 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7296 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7299 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7301 * config/i386/sse.md
7302 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7304 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7306 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7308 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7310 (*<floatsuffix>floatv2div2sf2): Rename to ...
7311 (*float<floatunssuffix>v2div2sf2): ... this.
7312 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7313 (float<floatunssuffix>v2div2sf2_mask): ... this.
7314 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7315 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7316 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7318 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7320 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7322 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7324 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7326 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7328 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7329 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7330 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7331 gen_ufix_truncv8dfv8si2.
7332 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7333 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7334 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7335 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7336 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7337 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7338 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7339 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7341 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7345 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7347 2018-05-25 Jim Wilson <jimw@sifive.com>
7349 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7350 * config/riscv/riscv.c (struct machine_function): Add
7351 interrupt_handler_p and attribute_checked_p fields.
7352 (riscv_attribute_table): Add interrupt.
7353 (riscv_interrupt_type_p): New.
7354 (riscv_save_reg_p): Save extra regs for interrupt handler.
7355 (riscv_use_save_libcall): Return false for interrupt handler.
7356 (riscv_first_stack_step): Add forward declaration.
7357 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7358 for interrupt handler with large frame. Use it for saved reg list.
7359 (riscv_expand_prologue): Move flag_stack_usage_info support to
7360 eliminate duplication.
7361 (riscv_expand_epilogue): Generate mret for interrupt handler.
7362 (riscv_epilogue_uses): New.
7363 (riscv_can_use_return_insn): Return false for interrupt handler.
7364 (riscv_function_ok_for_sibcall): Likewise.
7365 (riscv_set_current_function): Add interrupt handler support.
7366 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7367 * config/riscv/riscv.md (UNSPECV_MRET): New.
7369 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7371 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7373 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7375 PR tree-optimization/85712
7376 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7377 this candidate has already been replaced in-situ by a copy.
7379 2018-05-25 Jason Merrill <jason@redhat.com>
7381 PR c++/80485 - inline function non-zero address.
7382 * symtab.c (nonzero_address): Check DECL_COMDAT.
7384 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7387 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7388 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7389 extension of SImode operation. Use const123_operand predicate.
7390 (*saddsi_1): Remove.
7391 (*saddl_se_1): Ditto.
7393 (*ssubl_se_1): Ditto.
7394 * config/alpha/predicates.md (const123_operand): New predicate.
7395 * config/alpha/constraints.md (P): Use IN_RANGE.
7397 2018-05-25 Richard Biener <rguenther@suse.de>
7399 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7401 (ref_maybe_used_by_stmt_p): Likewise.
7402 (stmt_may_clobber_ref_p): Likewise.
7403 (stmt_may_clobber_ref_p_1): Likewise.
7404 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7406 (ref_maybe_used_by_stmt_p): Likewise.
7407 (stmt_may_clobber_ref_p): Likewise.
7408 (stmt_may_clobber_ref_p_1): Likewise.
7409 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7410 the alias oracle to disambiguate DRs with stmts DR analysis
7412 (vect_analyze_data_refs): Do not give up on not analyzable
7413 DRs for BB vectorization. Remove code truncating the dataref
7416 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7419 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7420 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7421 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7423 2018-05-25 Richard Biener <rguenther@suse.de>
7425 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7426 function, combining stmt data ref gathering and fatal analysis
7428 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7429 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7430 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7431 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7432 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7434 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7436 PR tree-optimization/85720
7437 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7438 SCC if all partitions are builtins.
7439 (version_loop_by_alias_check): New parameter. Generate cancelable
7440 runtime alias check if all partitions are builtins.
7441 (distribute_loop): Update call to above function.
7443 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7445 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7446 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7447 (parm_default_def_partition_arg): Ditto.
7448 (set_parm_default_def_partition): Ditto.
7449 (get_parm_default_def_partitions): Ditto and make it static.
7450 (get_undefined_value_partitions): Ditto and make it static.
7451 (remove_ssa_form): Refactor call to init_var_map here.
7452 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7453 computation for loop region.
7454 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7455 (register_default_def): Delete.
7456 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7457 (parm_default_def_partition_arg): Ditto.
7458 (set_parm_default_def_partition): Ditto.
7459 (get_parm_default_def_partitions): Ditto and make it static.
7460 (get_undefined_value_partitions): Ditto and make it static.
7461 (coalesce_with_default, coalesce_with_default): Update comment.
7462 (create_coalesce_list_for_region): New func factored out from
7463 create_outofssa_var_map.
7464 (populate_coalesce_list_for_outofssa): New func factored out from
7465 create_outofssa_var_map and coalesce_ssa_name.
7466 (create_outofssa_var_map): Delete.
7467 (coalesce_ssa_name): Refactor to support live range computation.
7468 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7469 (get_parm_default_def_partitions): Delete.
7470 (get_undefined_value_partitions): Ditto.
7471 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7472 computation for loop region.
7473 (new_tree_live_info, loe_visit_block): Ditto.
7474 (live_worklist, set_var_live_on_entry): Ditto.
7475 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7476 * tree-ssa-live.h (struct _var_map): New fields.
7477 (init_var_map): Change decl.
7478 (region_contains_p): New.
7480 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7482 * tree-ssa-live.h (live_merge_and_clear): Delete.
7484 2018-05-25 Richard Biener <rguenther@suse.de>
7487 * tree-dump.c (dequeue_and_dump): Remove access to removed
7488 operand 2 of a SWITCH_EXPR.
7490 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7492 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7493 multiplication and division.
7494 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7495 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7496 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7497 (cond_udiv_optab, cond_umod_optab): New optabs.
7498 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7499 (IFN_COND_RDIV): New internal functions.
7500 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7501 TRUNC_MOD_EXPR and RDIV_EXPR.
7502 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7503 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7505 (SVE_INT_BINARY): Include mult.
7506 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7507 (optab, sve_int_op): Handle mult.
7508 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7510 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7511 for SVE_INT_BINARY_SD.
7513 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7515 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7516 (optab, sve_int_op): Handle div and udiv.
7517 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7518 for SVE_INT_BINARY_SD.
7519 (*<optab><mode>3): New insn for the same.
7521 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7523 * tree-vect-patterns.c: Include predict.h.
7524 (vect_recog_divmod_pattern): Restrict check for division support
7525 to when optimizing for size.
7527 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7529 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7530 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7531 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7532 (gimple_match_op::set_op): Likewise.
7533 (gimple_resimplify4): Declare.
7534 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7535 (expr::gen_transform): Likewise.
7536 (decision_tree::gen): Generate a simplification routine for 4 operands.
7537 * gimple-match-head.c (gimple_simplify): Add an overload for
7538 4 operands. In the top-level function, handle up to 4 call
7539 arguments and call gimple_resimplify4.
7540 (gimple_resimplify4): New function.
7541 (build_call_internal): Pass a fourth operand.
7542 (maybe_push_to_seq): Likewise.
7543 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7544 Fold VEC_COND_EXPRs of an operation and a default value into
7545 an IFN_COND_* function if possible.
7546 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7548 (SVE_COND_FP_BINARY): Include them.
7549 (optab, sve_fp_op): Handle them.
7550 (SVE_INT_BINARY_REV): New code iterator.
7551 (SVE_COND_FP_BINARY_REV): New int iterator.
7552 (commutative): New int attribute.
7553 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7555 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7557 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7558 (*cond_<optab><mode>): New patterns for reversed operands.
7560 2018-05-25 Richard Biener <rguenther@suse.de>
7562 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7563 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7564 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7565 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7566 * tree-vect-data-refs.c (everywhere): Adjust users.
7567 * tree-vect-loop.c (everywhere): Likewise.
7568 * tree-vect-slp.c (everywhere): Likewise.
7569 * tree-vect-stmts.c (everywhere): Likewise.
7570 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7572 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7574 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7576 (gcc_cv_as_section_exclude): ... this.
7577 Try Solaris as #exclude syntax.
7578 * configure: Regenerate.
7579 * config.in: Regenerate.
7580 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7582 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7583 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7585 * varasm.c (default_elf_asm_named_section): Don't check if
7586 HAVE_GAS_SECTION_EXCLUDE is defined.
7588 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7590 * doc/md.texi: Update the documentation of the cond_* optabs
7591 to mention the new final operand. Fix GET_MODE_NUNITS call.
7592 Describe the scalar case too.
7593 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7594 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7596 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7597 (get_conditional_internal_fn): Update comment.
7598 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7599 accumulator value as a final argument to conditional functions.
7600 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7601 a define_expand and add an "else" operand. Assert for now that
7602 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7603 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7604 (*cond_<optab><mode>): New patterns.
7605 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7606 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7607 (UNSPEC_COND_EOR): Delete.
7608 (optab): Remove associated mappings.
7609 (SVE_INT_BINARY): New code iterator.
7610 (sve_int_op): Remove int attribute and add "minus" to the code
7612 (SVE_COND_INT_OP): Delete.
7613 (SVE_COND_FP_OP): Rename to...
7614 (SVE_COND_FP_BINARY): ...this.
7616 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7618 * optabs.c (can_reuse_operands_p): New function.
7619 (maybe_legitimize_operands): Try to reuse the results for
7622 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7624 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7625 Add {q} suffix to insn mnemonic.
7627 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7629 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7630 (msp430_warn_func_return): New.
7632 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7634 * fold-const.c (tree_nonzero_bits): New function.
7635 * fold-const.h (tree_nonzero_bits): Likewise.
7636 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7637 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7639 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7643 * varasm.c (assemble_alias): Check ifunc_resolver only on
7646 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7649 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7650 when memory input operand is handled.
7652 2018-05-24 Luis Machado <luis.machado@linaro.org>
7654 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7656 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7658 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7660 * match.pd: Delay FMA folds until after vectorization.
7662 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7665 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7666 address check not strict.
7668 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7670 * gimple-match.h (gimple_match_op): New class.
7671 (mprts_hook): Replace parameters with a gimple_match_op *.
7672 (maybe_build_generic_op): Likewise.
7673 (gimple_simplified_result_is_gimple_val): Replace parameters with
7674 a const gimple_match_op *.
7675 (gimple_simplify): Replace code_helper * and tree * parameters with
7676 a gimple_match_op * parameter.
7677 (gimple_resimplify1): Replace code_helper *, tree and tree *
7678 parameters with a gimple_match_op * parameter.
7679 (gimple_resimplify2): Likewise.
7680 (gimple_resimplify3): Likewise.
7681 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7682 parameters with a gimple_match_op * parameter.
7683 * gimple-match-head.c (gimple_simplify): Change prototypes of
7684 auto-generated functions to take a gimple_match_op * instead of
7685 separate code_helper * and tree * parameters. Make the same
7686 change in the top-level overload and update calls to the
7687 gimple_resimplify routines. Update calls to the auto-generated
7688 functions and to maybe_push_res_to_seq in the publicly-facing
7689 operation-specific gimple_simplify overloads.
7690 (gimple_match_op::MAX_NUM_OPS): Define.
7691 (gimple_resimplify1): Replace rcode and ops with a single res_op
7692 parameter. Update call to gimple_simplify.
7693 (gimple_resimplify2): Likewise.
7694 (gimple_resimplify3): Likewise.
7695 (mprts_hook): Replace parameters with a gimple_match_op *.
7696 (maybe_build_generic_op): Likewise.
7697 (build_call_internal): Replace type, nargs and ops with
7698 a gimple_match_op *.
7699 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7700 with a single gimple_match_op *. Update calls to mprts_hook,
7701 build_call_internal and gimple_simplified_result_is_gimple_val.
7702 Factor out code that is common to the tree_code and combined_fn cases.
7703 * genmatch.c (expr::gen_transform): Replace tem_code and
7704 tem_ops with a gimple_match_op called tem_op. Update calls
7705 to the gimple_resimplify functions and maybe_push_res_to_seq.
7706 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7707 res_ops. Update call to the gimple_resimplify functions.
7708 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7709 (decision_tree::gen): Make the functions take a gimple_match_op *
7710 called res_op instead of separate res_code and res_ops parameters.
7711 Update call accordingly.
7712 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7713 and ops with a single res_op parameter. Update calls to
7714 maybe_build_generic_op and maybe_push_res_to_seq.
7715 (fold_stmt_1): Update calls to gimple_simplify and
7716 replace_stmt_with_simplification.
7717 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7718 and gimple_simplified_result_is_gimple_val.
7719 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7721 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7722 with a gimple_match_op *.
7723 (vn_nary_build_or_lookup): Likewise. Update call to
7724 vn_nary_build_or_lookup_1.
7725 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7726 gimple_match_op *. Update calls to the gimple_resimplify routines
7727 and to gimple_simplified_result_is_gimple_val.
7728 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7729 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7730 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7731 (visit_nary_op): Likewise.
7732 (visit_reference_op_load): Likewise.
7734 2018-05-23 Luis Machado <luis.machado@linaro.org>
7736 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7737 modifier for printing the step amount.
7739 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7742 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7745 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7747 * doc/sourcebuild.texi (Endianness): New subsubsection.
7749 2018-05-23 Luis Machado <luis.machado@linaro.org>
7751 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7752 <prefetch_dynamic_strides>: New const bool field.
7753 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7754 prefetch_dynamic_strides.
7755 (exynosm1_prefetch_tune): Likewise.
7756 (thunderxt88_prefetch_tune): Likewise.
7757 (thunderx_prefetch_tune): Likewise.
7758 (thunderx2t99_prefetch_tune): Likewise.
7759 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7761 (aarch64_override_options_internal): Update to set
7762 PARAM_PREFETCH_DYNAMIC_STRIDES.
7763 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7764 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7765 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7766 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7767 prefetch-dynamic-strides setting.
7769 2018-05-23 Luis Machado <luis.machado@linaro.org>
7771 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7772 <minimum_stride>: New const int field.
7773 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7774 minimum_stride field defaulting to -1.
7775 (exynosm1_prefetch_tune): Likewise.
7776 (thunderxt88_prefetch_tune): Likewise.
7777 (thunderx_prefetch_tune): Likewise.
7778 (thunderx2t99_prefetch_tune): Likewise.
7779 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7780 <default_opt_level>: Set to 3.
7781 (aarch64_override_options_internal): Update to set
7782 PARAM_PREFETCH_MINIMUM_STRIDE.
7783 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7784 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7785 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7786 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7787 stride is constant and is below the minimum stride threshold.
7789 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7791 * config/arm/arm-cpus.in (mode26): Delete.
7792 (armv4): Delete mode26 reference.
7793 * config/arm/arm.c (arm_configure_build_target): Delete use of
7796 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7798 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7800 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7801 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7803 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7804 (floatunsdidf2): Ditto.
7806 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7808 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7809 (fixuns_trunc<mode>si2_avx512f): Ditto.
7810 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7811 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7812 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7814 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7816 PR rtl-optimization/79985
7817 * df-scan.c (df_insn_refs_collect): Remove special case for
7818 global registers and asm statements.
7820 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7822 * extend.texi (Global Register Variables): Rewrite the bullet list.
7823 Note that the register is available for allocation. Note that access
7824 via inline asm must use constraints. Add note about async-signal
7825 handlers. Remove paragraph about automagic register selection.
7827 2018-05-23 Richard Biener <rguenther@suse.de>
7829 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7830 of fixed offset from memset VN.
7832 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7834 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7836 (alloc_cand_and_find_basis): Initialize first_interp field.
7837 (slsr_process_mul): Modify first_interp field.
7838 (slsr_process_add): Likewise.
7839 (slsr_process_cast): Modify first_interp field for each new
7841 (slsr_process_copy): Likewise.
7842 (dump_candidate): Dump first_interp field.
7843 (replace_mult_candidate): Process all interpretations, not just
7845 (replace_rhs_if_not_dup): Likewise.
7846 (replace_one_candidate): Likewise.
7848 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7850 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7852 (aarch64_needs_frame_chain): New function.
7853 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7855 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7858 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7859 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7860 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7861 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7862 as true for strict-align.
7863 (aarch64_can_inline_p): Perform checks even when callee has no
7864 attributes to check for strict alignment.
7865 * doc/extend.texi (AArch64 Function Attributes): Document
7867 * doc/invoke.texi: (AArch64 Options): Likewise.
7869 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7871 PR tree-optimization/85853
7872 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7873 the handling of the root of the node to...
7874 (vect_slp_analyze_node_operations_1): ...this new function,
7875 and run the whole thing with the child nodes' def types
7876 set according to their SLP node's def type.
7878 2018-05-23 Richard Biener <rguenther@suse.de>
7881 * tree-data-ref.c (create_runtime_alias_checks): Defer
7882 and ignore overflow warnings.
7884 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7886 PR tree-optimization/85822
7887 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7890 2018-05-23 Richard Biener <rguenther@suse.de>
7892 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7893 memset constants via native_interpret_expr.
7895 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7898 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7900 (cgraph_node::create_alias): Likewise.
7901 (cgraph_node::get_availability): Check ifunc_resolver instead
7902 of looking up ifunc attribute.
7903 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7904 * varasm.c (do_assemble_alias): Likewise.
7905 (assemble_alias): Likewise.
7906 (default_binds_local_p_3): Likewise.
7907 * cgraph.h (cgraph_node): Add ifunc_resolver.
7908 (cgraph_node::only_called_directly_or_aliased_p): Return false
7910 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7912 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7913 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7914 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7915 instead of looking up ifunc attribute.
7917 2018-05-22 Luis Machado <luis.machado@linaro.org>
7919 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7921 2018-05-22 Martin Sebor <msebor@redhat.com>
7924 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7925 only when expasion succeeds.
7926 (expand_builtin_strcmp): Same.
7927 (expand_builtin_strncmp): Same.
7929 2018-05-22 Martin Sebor <msebor@redhat.com>
7931 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7933 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7934 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7936 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7937 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7939 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7940 Add check for legitimate_address.
7941 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7942 (aarch64_swap_ldrstr_operands): New.
7943 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7946 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7947 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7949 * config/aarch64/aarch64.md: New patterns to generate stp
7951 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7952 single words and double words.
7953 (load_pair_sw, load_pair_dw): Likewise.
7954 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7956 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7958 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7959 for different mode ldpstp and add peephole for merged zero stores.
7961 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7963 (aarch64_gen_store_pair): Rename calls to match new patterns.
7964 (aarch64_gen_load_pair): Rename calls to match new patterns.
7965 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7966 (load_pair<DREG:mode><DREG2:mode>): ... This.
7967 (store_pair<mode>): Rename to...
7968 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7969 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7971 (V_INT_EQUIV): Handle SImode.
7972 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7975 2018-05-22 Martin Sebor <msebor@redhat.com>
7978 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7979 or ajust the presumed bound on an operation to avoid unnecessary
7982 2018-05-22 Martin Sebor <msebor@redhat.com>
7984 PR tree-optimization/85826
7985 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7986 assuming that a DECL necesarily has a constant size.
7988 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7991 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7993 2018-05-22 Richard Biener <rguenther@suse.de>
7995 PR tree-optimization/85834
7996 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7997 non-constant and non-zero memset arguments.
7999 2018-05-22 Martin Liska <mliska@suse.cz>
8002 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8004 2018-05-22 Richard Biener <rguenther@suse.de>
8006 PR tree-optimization/85863
8007 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8008 comparisons when vectype is specified.
8009 (vectorizable_condition): Do not specify vectype for
8010 vect_is_simple_cond when SLP vectorizing.
8012 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8015 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8016 define __ibm128 as long double.
8017 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8018 as a distinct type when IEEE 128-bit support is enabled.
8019 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8020 128-bit types to use the correct functions.
8021 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8022 convert between 128-bit floating point types that have different
8023 modes but the same representation, instead of using gen_lowpart to
8025 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8027 (IFKF_reg): New attributes to give the register constraints for
8029 (extend<mode>tf2_internal): New insns to mark an explicit
8030 conversion between 128-bit floating point types that have a
8031 different mode but share the same representation.
8033 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8035 PR tree-optimization/85814
8036 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8037 a null return from get_strinfo when unsharing the next
8038 strinfo in the chain.
8040 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8043 * varasm.c (weak_finish): Clean up weak_decls.
8045 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8047 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8048 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8049 UNSPEC_UADALP values.
8050 * config/aarch64/iterators.md (ABAL): New int iterator.
8053 (sur): Add mappings for the above.
8054 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8056 (aarch64_<sur>abal<mode>_4): Likewise.
8057 (aarch64_<sur>adalp<mode>_3): Likewise.
8058 (<sur>sadv16qi): New define_expand.
8060 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8062 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8063 (*movdf_internal): Ditto.
8064 (*rcpsf2_sse): Ditto.
8065 (*rsqrtsf2_sse): Ditto.
8066 (*sqrt<mode>2_sse): Ditto.
8068 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8070 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8072 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8073 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8074 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8075 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8077 * config/aarch64/arm_neon.h: Likewise.
8078 * config/aarch64/iterators.md (VQ_I): New.
8080 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8082 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8084 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8087 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8089 * config/nds32/constraints.md (S): New constraint.
8090 * config/nds32/nds32.md (call_internal): Use constraint S.
8091 (call_value_internal): Likewise.
8092 (sibcall_internal): Likewise.
8093 (sibcall_value_internal): Likewise.
8095 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8096 Chung-Ju Wu <jasonwucj@gmail.com>
8098 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8101 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8102 Chung-Ju Wu <jasonwucj@gmail.com>
8104 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8105 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8106 (nds32_rtx_costs_impl): Simplify.
8107 (nds32_address_cost_impl): Simplify.
8108 (nds32_init_rtx_costs): New function.
8109 (nds32_rtx_costs_speed_prefer): Likewise.
8110 (nds32_rtx_costs_size_prefer): Likewise.
8111 (nds32_address_cost_speed_prefer): Likewise.
8112 (nds32_address_cost_speed_fwprop): Likewise.
8113 (nds32_address_cost_size_prefer): Likewise.
8114 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8115 * config/nds32/nds32.c (nds32_option_override): Use
8116 nds32_init_rtx_costs function.
8118 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8120 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8121 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8122 (TARGET_PIPELINE_N8): Likewise.
8123 (TARGET_PIPELINE_N10): Likewise.
8124 (TARGET_PIPELINE_N13): Likewise.
8125 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8127 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8129 * config/nds32/nds32-fpu.md: Update copyright year.
8131 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8133 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8135 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8137 * config/nds32/nds32.c
8138 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8139 * config/nds32/nds32.opt (minline-asm-r15): New option.
8141 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8143 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8145 * config/nds32/nds32.md (abssi2): New pattern.
8147 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8149 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8150 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8151 Merge insn pattern from sse_cvtsi2ss<round_name> and
8152 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8153 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8154 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8155 using SWI48 mode iterator.
8156 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8157 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8158 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8159 pattern from sse_cvttss2si<round_saeonly_name>
8160 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8161 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8162 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8163 using SWI48 mode iterator.
8164 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8165 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8166 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8167 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8168 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8169 using SWI48 mode iterator.
8170 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8171 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8172 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8173 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8174 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8175 SWI48 mode iterator.
8176 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8177 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8178 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8179 pattern from sse_cvttsd2si<round_saeonly_name>
8180 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8182 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8184 * config/nds32/nds32-md-auxiliary.c
8185 (nds32_valid_smw_lwm_base_p): Refine.
8186 (nds32_output_smw_single_word): Refine.
8187 (nds32_output_smw_double_word): New.
8188 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8190 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8192 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8193 (nds32_output_stack_pop): Refine.
8194 (nds32_expand_unaligned_load): Refine.
8195 (nds32_expand_unaligned_store): Refine.
8197 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8198 Chung-Ju Wu <jasonwucj@gmail.com>
8200 * config/nds32/constants.md: Add TP_REGNUM constant.
8201 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8202 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8204 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8205 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8206 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8207 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8208 and PIC code generation.
8209 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8211 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8213 * config/nds32/nds32.md: Support TLS and PIC.
8214 * config/nds32/nds32.c: Support TLS and PIC.
8215 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8216 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8219 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8221 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8222 mode with E_ prefix.
8224 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8225 Chung-Ju Wu <jasonwucj@gmail.com>
8227 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8228 * config/nds32/nds32-md-auxiliary.c
8229 (symbolic_reference_mentioned_p): New.
8230 (nds32_legitimize_ict_address): New.
8231 (nds32_expand_ict_move): New.
8232 (nds32_indirect_call_referenced_p): New.
8233 (nds32_symbol_binds_local_p): Delete.
8234 (nds32_long_call_p): Modify.
8235 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8236 * config/nds32/nds32-protos.h
8237 (symbolic_reference_mentioned_p): Declare.
8238 (nds32_legitimize_ict_address): Declare.
8239 (nds32_expand_ict_move): Declare.
8240 (nds32_indirect_call_referenced_p): Declare.
8241 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8242 (nds32_relax_group): Use nds32_ict_const_p as condition.
8243 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8244 (nds32_asm_file_start): Output ict_model directive in asm code.
8245 (nds32_legitimate_address_p): Consider indirect call.
8246 (nds32_print_operand): Consider indirect call.
8247 (nds32_print_operand_address): Consider indirect call.
8248 (nds32_insert_attributes): Handle "indirect_call" attribute.
8249 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8250 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8251 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8252 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8253 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8254 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8255 (TARGET_ICT_MODEL_SMALL): Define.
8256 (TARGET_ICT_MODEL_LARGE): Define.
8257 * config/nds32/nds32.md (movsi): Consider ict model.
8258 (call, call_value): Consider ict model.
8259 (sibcall, sibcall_value): Consider ict model.
8260 * config/nds32/nds32.opt (mict-model): New option.
8261 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8264 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8265 Monk Chiang <sh.chiang04@gmail.com>
8266 Jim Wilson <jimw@sifive.com>
8268 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8269 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8270 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8271 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8272 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8273 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8274 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8275 compute save_libcall_adjustment properly.
8276 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8277 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8278 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8279 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8280 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8281 (ABI_SPEC): Handle mabi=ilp32e.
8282 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8283 (RVE): Add RVE mask.
8284 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8285 <-march>: Add rv32e as an example.
8287 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8290 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8291 (intra_create_variable_infos): Handle C++ constructors.
8293 2018-05-18 Martin Liska <mliska@suse.cz>
8295 * passes.def: Remove a redundant pass.
8297 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8300 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8302 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8304 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8306 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8308 (armv2, armv2a, armv3, armv3m): Delete architectures.
8309 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8310 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8311 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8313 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8314 (*mulsidi3adddi): Likewise.
8315 (mulsidi3): Likewise.
8316 (*mulsidi3_nov6): Likewise.
8317 (umulsidi3): Likewise.
8318 (umulsidi3_nov6): Likewise.
8319 (umaddsidi4): Likewise.
8320 (*umulsidi3adddi): Likewise.
8321 (smulsi3_highpart): Likewise.
8322 (*smulsi3_highpart_nov6): Likewise.
8323 (umulsi3_highpart): Likewise.
8324 (*umulsi3_highpart_nov6): Likewise.
8325 * config/arm/arm.h (arm_arch3m): Delete.
8326 * config/arm/arm.c (arm_arch3m): Delete.
8327 (arm_option_override_internal): Update armv3-related comment.
8328 (arm_configure_build_target): Delete use of isa_bit_mode32.
8329 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8330 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8331 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8333 (mulusa3): Likewise.
8334 * config/arm/arm-protos.h (arm_arch3m): Delete.
8335 * config/arm/arm-tables.opt: Regenerate.
8336 * config/arm/arm-tune.md: Likewise.
8337 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8338 deleted architectures.
8340 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8342 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8343 (armv5t, armv5te): New features.
8344 (ARMv5, ARMv5e): Delete fgroups.
8345 (ARMv5t, ARMv5te): Adjust for above changes.
8347 (armv5, armv5e): Delete arches.
8348 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8350 (*call_reg_arm): Likewise.
8351 (*call_value_reg_armv5): Likewise.
8352 (*call_value_reg_arm): Likewise.
8353 (*call_symbol): Likewise.
8354 (*call_value_symbol): Likewise.
8355 (*sibcall_insn): Likewise.
8356 (*sibcall_value_insn): Likewise.
8358 (prefetch): Likewise.
8359 (define_split and define_peephole2 dependent on arm_arch5):
8361 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8363 (TARGET_ARM_QBIT): Likewise.
8364 (TARGET_DSP_MULTIPLY): Likewise.
8365 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8366 (arm_arch5, arm_arch5e): Delete.
8367 (arm_arch5t, arm_arch5te): Declare.
8368 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8369 (arm_arch5t): Declare.
8370 (arm_option_reconfigure_globals): Update for the above.
8371 (arm_options_perform_arch_sanity_checks): Update comment, replace
8372 use of arm_arch5 with arm_arch5t.
8373 (use_return_insn): Likewise.
8374 (arm_emit_call_insn): Likewise.
8375 (output_return_instruction): Likewise.
8376 (arm_final_prescan_insn): Likewise.
8377 (arm_coproc_builtin_available): Likewise.
8378 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8379 arm_arch5e with arm_arch5t and arm_arch5te.
8380 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8381 (arm_arch5t, arm_arch5te): Declare.
8382 * config/arm/arm-tables.opt: Regenerate.
8383 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8384 * config/arm/t-multilib: Likewise.
8385 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8386 instead of arm_arch5.
8387 (*call_reg_thumb1): Likewise.
8388 (*call_value_reg_thumb1_v5): Likewise.
8389 (*call_value_reg_thumb1): Likewise.
8390 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8392 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8394 2018-05-18 Martin Liska <mliska@suse.cz>
8396 PR gcov-profile/84846
8397 * doc/gcov.texi: Document -t option of gcov tool.
8399 2018-05-18 Martin Liska <mliska@suse.cz>
8401 PR gcov-profile/84846
8402 * gcov.c (print_usage): Add new -t option.
8403 (process_args): Handle the option.
8404 (generate_results): Use stdout as output when requested by
8407 2018-05-18 Martin Liska <mliska@suse.cz>
8409 PR gcov-profile/84846
8410 * coverage.c (coverage_init): Write PWD to .gcno file.
8411 * doc/gcov.texi: Document how working directory is printed.
8412 * gcov-dump.c (dump_gcov_file): Print PWD.
8413 * gcov.c (output_intermediate_file): Likewise.
8414 (read_graph_file): Read PWD string.
8415 (output_lines): Print PWD.
8417 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8420 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8421 for retval and return false if all args to phi are zero.
8423 2018-05-18 Richard Biener <rguenther@suse.de>
8425 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8427 (evrp_dom_walker::before_dom_children): Call it.
8429 2018-05-18 Richard Biener <rguenther@suse.de>
8431 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8432 results when processing array refs with variable index.
8434 2018-05-18 Toon Moene <toon@moene.org>
8436 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8437 directly after that of -floop-interchange. Indicate that both
8438 options are enabled by default when specifying -O3.
8440 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8442 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8443 iterator. Delete separate integer-mode vec_set<mode> expander.
8444 (aarch64_simd_vec_setv2di): Delete.
8445 (vec_setv2di): Delete.
8446 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8447 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8448 the "w, r" alternative.
8450 2018-05-18 Martin Liska <mliska@suse.cz>
8452 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8453 * tree-pass.h (make_pass_lower_switch_O0): New function.
8454 * tree-switch-conversion.c (node_has_low_bound): Remove.
8455 (node_has_high_bound): Likewise.
8456 (node_is_bounded): Likewise.
8457 (class pass_lower_switch): Make it a template type and create
8459 (pass_lower_switch::execute): Add template argument.
8460 (make_pass_lower_switch): New function.
8461 (make_pass_lower_switch_O0): New function.
8462 (do_jump_if_equal): Remove.
8463 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8464 all the hard work to tree optimization passes.
8466 2018-05-18 Martin Liska <mliska@suse.cz>
8468 * dbgcnt.c (limit_low): Renamed from limit.
8469 (limit_high): New variable.
8470 (dbg_cnt_is_enabled): Check for upper limit.
8471 (dbg_cnt): Adjust dumping.
8472 (dbg_cnt_set_limit_by_index): Add new argument for high
8474 (dbg_cnt_set_limit_by_name): Likewise.
8475 (dbg_cnt_process_single_pair): Parse new format.
8476 (dbg_cnt_process_opt): Use strtok.
8477 (dbg_cnt_list_all_counters): Remove 'value' and add
8479 * doc/invoke.texi: Document changes.
8481 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8483 * doc/sourcebuild.texi (scalar_all_fma): Document.
8484 * tree.def (FMA_EXPR): Delete.
8485 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8486 * internal-fn.c (ternary_direct): New macro.
8487 (expand_ternary_optab_fn): Likewise.
8488 (direct_ternary_optab_supported_p): Likewise.
8489 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8490 * builtins.c (fold_builtin_fma): Delete.
8491 (fold_builtin_3): Don't call it.
8492 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8493 * expr.c (expand_expr_real_2): Likewise.
8494 * fold-const.c (operand_equal_p): Likewise.
8495 (fold_ternary_loc): Likewise.
8496 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8497 * gimple.c (DEFTREECODE): Likewise.
8498 * gimplify.c (gimplify_expr): Likewise.
8499 * optabs-tree.c (optab_for_tree_code): Likewise.
8500 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8501 * tree-eh.c (operation_could_trap_p): Likewise.
8502 (stmt_could_throw_1_p): Likewise.
8503 * tree-inline.c (estimate_operator_cost): Likewise.
8504 * tree-pretty-print.c (dump_generic_node): Likewise.
8505 (op_code_prio): Likewise.
8506 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8507 * tree-ssa-operands.c (get_expr_operands): Likewise.
8508 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8509 * fold-const-call.h (fold_fma): Delete.
8510 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8511 CFN_FNMA and CFN_FNMS.
8513 * genmatch.c (combined_fn): New enum.
8514 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8515 (commutative_op): New function.
8516 (commutate): Use it. Handle more than 2 operands.
8517 (dt_operand::gen_gimple_expr): Use commutative_op.
8518 (parser::parse_expr): Allow :c to be used with non-binary
8519 operators if the commutative operand is known.
8520 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8521 CFN_FMS, CFN_FNMA and CFN_FNMS.
8522 (backprop::process_assign_use): Remove FMA_EXPR handling.
8523 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8524 (gen_hsa_fma): New function.
8525 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8526 IFN_FNMA and IFN_FNMS.
8527 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8528 * gimple-fold.h (follow_all_ssa_edges): Declare.
8529 * gimple-fold.c (follow_all_ssa_edges): New function.
8530 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8531 gimple_build interface and use follow_all_ssa_edges to fold the result.
8532 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8533 instead of checking for optabs directly.
8534 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8535 rather than FMA_EXPRs.
8536 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8537 call to IFN_FMA instead of an FMA_EXPR.
8539 2018-05-17 Jim Wilson <jimw@sifive.com>
8541 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8542 sign extended promoted subreg, and the range does not have the sign bit
8543 set, then do a sign extend.
8545 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8546 test, check for sign extended subreg and/or constant operands, and
8547 do a sign extend in that case.
8549 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8551 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8552 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8554 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8555 Change logics_shift_reg to logics_shift_imm.
8556 (thunderx2t99_fp_loadpair_basic): Delete.
8557 (thunderx2t99_fp_storepair_basic): Delete.
8558 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8559 (thunderx2t99_asimd_polynomial): Delete.
8560 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8561 and neon_fp_mul_d_scalar_q.
8562 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8563 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8564 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8565 (thunderx2t99_asimd_lut): Add missing tbl types.
8566 (thunderx2t99_asimd_ext): Delete.
8567 (thunderx2t99_asimd_load1_1_mult): Delete.
8568 (thunderx2t99_asimd_load1_2_mult): Delete.
8569 (thunderx2t99_asimd_load1_ldp): New.
8570 (thunderx2t99_asimd_load1): New.
8571 (thunderx2t99_asimd_load2): Add missing *load2* types.
8572 (thunderx2t99_asimd_load3): New.
8573 (thunderx2t99_asimd_load4): New.
8574 (thunderx2t99_asimd_store1_1_mult): Delete.
8575 (thunderx2t99_asimd_store1_2_mult): Delete.
8576 (thunderx2t99_asimd_store2_mult): Delete.
8577 (thunderx2t99_asimd_store2_onelane): Delete.
8578 (thunderx2t99_asimd_store_stp): New.
8579 (thunderx2t99_asimd_store1): New.
8580 (thunderx2t99_asimd_store2): New.
8581 (thunderx2t99_asimd_store3): New.
8582 (thunderx2t99_asimd_store4): New.
8584 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8586 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8587 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8589 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8590 Segher Boessenkool <segher@kernel.crashing.org>
8593 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8596 2018-05-17 Richard Biener <rguenther@suse.de>
8598 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8599 for pruning loop and prune defs feeding only already visited PHIs.
8601 2018-05-17 Richard Biener <rguenther@suse.de>
8603 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8605 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8606 Richard Biener <rguenther@suse.de>
8608 PR tree-optimization/85793
8609 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8610 for VMAT_ELEMENTWISE.
8612 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8614 * internal-fn.h (lookup_internal_fn): Declare
8615 * internal-fn.c (lookup_internal_fn): New function.
8616 * gimple.c (gimple_build_call_from_tree): Handle calls to
8618 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8619 internal function names.
8620 * tree-pretty-print.c (dump_generic_node): Likewise.
8621 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8623 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8625 * gimple-fold.h (gimple_build): Make the function forms take
8626 combined_fn rather than built_in_function.
8627 (gimple_simplify): Likewise.
8628 * gimple-match-head.c (gimple_simplify): Likewise.
8629 * gimple-fold.c (gimple_build): Likewise.
8630 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8631 rather than gimple_build_call_internal.
8632 (get_initial_defs_for_reduction): Likewise.
8633 (vect_create_epilog_for_reduction): Likewise.
8634 (vectorizable_live_operation): Likewise.
8636 2018-05-17 Martin Liska <mliska@suse.cz>
8638 * gimple-ssa-sprintf.c (format_directive): Do not use
8639 space in between 'G_' and '('.
8641 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8644 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8645 even if the mask is not all ones.
8648 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8650 (ix86_gimple_fold_builtin): Likewise.
8653 * config/i386/i386.c: Include tree-vector-builder.h.
8654 (ix86_vector_shift_count): New function.
8655 (ix86_fold_builtin): Fold shift builtins by scalar count.
8656 (ix86_gimple_fold_builtin): Likewise.
8658 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8659 _mm512_setzero): New intrinsics.
8661 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8662 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8664 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8665 code generation for cases where splatting a value is not useful.
8666 * simplify-rtx.c (simplify_ternary_operation): Simplify
8667 vec_merge across a vec_duplicate and a paradoxical subreg forming
8668 a vector mode to a vec_concat.
8670 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8672 * config.gcc: Support "goldmont-plus".
8673 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8675 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8676 PROCESSOR_GOLDMONT_PLUS.
8677 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8678 (processor_target_table): Add "goldmont-plus".
8679 (PTA_GOLDMONT_PLUS): Define.
8680 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8681 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8682 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8683 (fold_builtin_cpu): Add "goldmont-plus".
8684 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8685 (ix86_option_override_internal): Add "goldmont-plus".
8686 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8687 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8688 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8689 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8691 2018-05-17 Richard Biener <rguenther@suse.de>
8693 PR tree-optimization/85757
8694 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8695 remove defs that only feed that PHI from further processing.
8697 2018-05-16 Jim Wilson <jimw@sifive.com>
8699 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8701 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8703 2018-05-16 Mark Wielaard <mark@klomp.org>
8705 * dwarf2out.c (count_index_strings): New function.
8706 (output_indirect_strings): Call count_index_strings and generate
8707 header for dwarf_version >= 5.
8709 2018-05-16 Mark Wielaard <mark@klomp.org>
8711 * dwarf2out.c (dwarf_FORM): New function.
8712 (set_indirect_string): Use dwarf_FORM.
8713 (reset_indirect_string): Likewise.
8714 (size_of_die): Likewise.
8715 (value_format): Likewise.
8716 (output_die): Likewise.
8717 (add_skeleton_AT_string): Likewise.
8718 (output_macinfo_op): Likewise.
8719 (index_string): Likewise.
8720 (output_index_string_offset): Likewise.
8721 (output_index_string): Likewise.
8722 (count_index_strings): Likewise.
8724 2018-05-16 Carl Love <cel@us.ibm.com>
8726 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8727 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8729 2018-05-16 Martin Jambor <mjambor@suse.cz>
8731 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8732 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8734 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8736 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8737 (fnma<mode>4): Likewise.
8738 (fms<mode>4): Likewise.
8739 (fnms<mode>4): Likewise.
8740 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8741 (aarch64_fnma<mode>4): Likewise.
8742 (aarch64_fms<mode>4): Likewise.
8743 (aarch64_fnms<mode>4): Likewise.
8744 (aarch64_fnmadd<mode>4): Likewise.
8746 2018-05-16 Jason Merrill <jason@redhat.com>
8748 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8750 2018-05-16 Richard Biener <rguenther@suse.de>
8752 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8753 (dump_stmt_cost): Declare.
8754 (add_stmt_cost): Dump cost we add.
8755 (add_stmt_costs): New function.
8756 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8758 (vect_analyze_stmt): Adjust prototype.
8759 (vectorizable_condition): Likewise.
8760 (vectorizable_live_operation): Likewise.
8761 (vectorizable_reduction): Likewise.
8762 (vectorizable_induction): Likewise.
8763 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8764 cost vector to pass to vectorizable_ and record afterwards.
8765 (vect_model_reduction_cost): Take cost vector argument and adjust.
8766 (vect_model_induction_cost): Likewise.
8767 (vectorizable_reduction): Likewise.
8768 (vectorizable_induction): Likewise.
8769 (vectorizable_live_operation): Likewise.
8770 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8771 SLP_TREE_NUMBER_OF_VEC_STMTS.
8772 (vect_analyze_slp_cost_1): Remove.
8773 (vect_analyze_slp_cost): Likewise.
8774 (vect_slp_analyze_node_operations): Take visited args and
8775 a target cost vector. Avoid processing already visited stmt sets.
8776 (vect_slp_analyze_operations): Use a local cost vector to gather
8777 costs and register those of non-discarded instances.
8778 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8779 (vect_schedule_slp_instance): Remove copying of
8780 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8782 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8783 adding cost. Record cost entry location.
8784 (vect_prologue_cost_for_slp_op): Function to compute cost of
8785 a constant or invariant generated for SLP vect in the prologue,
8786 split out from vect_analyze_slp_cost_1.
8787 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8788 (vect_model_promotion_demotion_cost): Likewise.
8789 (vect_model_store_cost): Likewise, make static.
8790 (vect_model_load_cost): Likewise.
8791 (vectorizable_bswap): Add cost vector arg and adjust.
8792 (vectorizable_call): Likewise.
8793 (vectorizable_simd_clone_call): Likewise.
8794 (vectorizable_conversion): Likewise.
8795 (vectorizable_assignment): Likewise.
8796 (vectorizable_shift): Likewise.
8797 (vectorizable_operation): Likewise.
8798 (vectorizable_store): Likewise.
8799 (vectorizable_load): Likewise.
8800 (vectorizable_condition): Likewise.
8801 (vectorizable_comparison): Likewise.
8802 (can_vectorize_live_stmts): Likewise.
8803 (vect_analyze_stmt): Likewise.
8804 (vect_transform_stmt): Adjust calls to vectorizable_*.
8805 * tree-vectorizer.c: Include gimple-pretty-print.h.
8806 (dump_stmt_cost): New function.
8808 2018-05-16 Richard Biener <rguenther@suse.de>
8810 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8811 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8812 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8813 (check_name): New callback.
8814 (dse_classify_store): Track cycles via a visited bitmap of PHI
8815 defs and simplify handling of in-loop and across loop dead stores
8816 and properly fail for loop-variant refs. Handle byte-tracking with
8817 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8820 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8822 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8823 (vect_get_mask_type_for_stmt): Likewise.
8824 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8826 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8827 to determine the statement's vector type and the vector type that
8828 should be used for calculating nunits. Deal with cases in which
8829 the type has to be deferred.
8830 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8831 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8832 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8833 (vect_determine_vf_for_stmt): New functions, split out from...
8834 (vect_determine_vectorization_factor): ...here.
8835 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8836 (vect_get_mask_type_for_stmt): New functions, split out from
8837 vect_determine_vectorization_factor.
8839 2018-05-16 Richard Biener <rguenther@suse.de>
8841 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8842 verify the [VEC_]COND_EXPR embedded comparison.
8844 2018-05-15 Martin Sebor <msebor@redhat.com>
8846 PR tree-optimization/85753
8847 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8848 RECORD_TYPE in addition to ARRAY_TYPE.
8850 2018-05-15 Martin Sebor <msebor@redhat.com>
8853 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8855 2018-05-15 Richard Biener <rguenther@suse.de>
8857 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8858 add by_clobber_p one. Change algorithm to collect all defs
8859 representing uses we need to walk and try reducing them to
8860 a single one before failing.
8861 (dse_dom_walker::dse_optimize_stmt): Adjust.
8863 2018-05-13 Mark Wielaard <mark@klomp.org>
8865 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8866 (size_of_loc_descr): Likewise.
8867 (output_loc_operands): Likewise.
8868 (output_loc_operands_raw): Likewise.
8869 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8870 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8871 (hash_loc_operands): Likewise.
8872 (compare_loc_operands): Likewise.
8874 2018-05-14 Mark Wielaard <mark@klomp.org>
8876 * dwarf2out.c (count_index_addrs): New function.
8877 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8879 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8881 PR tree-optimization/83648
8882 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8883 return value as malloc candidate.
8885 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8888 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8889 param as true in call to suggest_attribute.
8891 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8893 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8894 -mreadonly-in-sdata.
8896 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8898 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8900 (aarch64_crypto_aesd_fused): Likewise.
8902 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8904 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8905 (movsi_aarch64): Likewise.
8906 (load_pairsi): Likewise.
8907 (load_pairdi): Likewise.
8908 (store_pairsi): Likewise.
8909 (store_pairdi): Likewise.
8910 (load_pairsf): Likewise.
8911 (load_pairdf): Likewise.
8912 (store_pairsf): Likewise.
8913 (store_pairdf): Likewise.
8914 (zero_extend): Likewise.
8915 (trunc): Swap alternatives.
8916 (fcvt_target): Add '?' to prefer w over r.
8918 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8921 * config/i386/i386.md: Disallow non-commutative arithmetics in
8922 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8923 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8924 in the peephole2 before it.
8926 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8928 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8929 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8930 (ix86_handle_option): Handle -mcldemote.
8931 * config.gcc: New header.
8932 * config/i386/cldemoteintrin.h: New file.
8933 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8934 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8936 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8937 OPTION_MASK_ISA_CLDEMOTE.
8938 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8939 (ix86_valid_target_attribute_inner_p): Ditto.
8940 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8941 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8942 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8943 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8944 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8946 * config/i386/i386.opt: Add -mcldemote.
8947 * config/i386/x86intrin.h: New header.
8948 * doc/invoke.texi: Add -mcldemote.
8950 2018-05-14 Richard Biener <rguenther@suse.de>
8952 * doc/match-and-simplify.texi: Adjust :s documentation.
8954 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8956 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8957 intended memcpy size.
8958 (REORDER_45): Likewise.
8960 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8962 * sort.cc: New file.
8963 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8964 * vec.c (qsort_chk): Use gcc_qsort.
8965 * Makefile.in (OBJS-libcommon): Add sort.o.
8966 (build/sort.o): New target. Use it...
8967 (BUILD_RTL): ... here, and...
8968 (build/gencfn-macros): ... here, and...
8969 (build/genmatch): ... here.
8971 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8972 Chung-Ju Wu <jasonwucj@gmail.com>
8974 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8975 * config/nds32/nds32-graywolf.md: New file.
8976 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8977 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8979 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8980 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8981 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8982 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8983 * config/nds32/pipelines.md: Include n15 settings.
8985 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8986 Chung-Ju Wu <jasonwucj@gmail.com>
8988 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8989 * config/nds32/nds32-n13.md: New file.
8990 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8991 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8993 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8994 * config/nds32/nds32.md (pipeline_model): Add n13.
8995 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8996 * config/nds32/pipelines.md: Include n13 settings.
8998 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8999 Chung-Ju Wu <jasonwucj@gmail.com>
9001 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9002 * config/nds32/nds32-n10.md: New file.
9003 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9004 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9006 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9007 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9008 * config/nds32/nds32.md (pipeline_model): Add n10.
9009 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9010 * config/nds32/pipelines.md: Include n10 settings.
9012 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9013 Kito Cheng <kito.cheng@gmail.com>
9014 Chung-Ju Wu <jasonwucj@gmail.com>
9016 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9017 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9018 Add enum values for DSP extension instructions.
9019 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9021 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9022 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9024 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9025 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9026 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9027 * config/nds32/nds32-intrinsic.md: Likewise.
9028 * config/nds32/nds32_intrinsic.h: Likewise.
9029 * config/nds32/nds32-md-auxiliary.c: Likewise.
9030 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9031 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9032 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9033 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9034 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9035 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9036 TYPE_DMAC in switch statement.
9037 * config/nds32/nds32.c: New checking and implementation for DSP
9038 extension instructions.
9039 * config/nds32/nds32.h: Likewise.
9040 * config/nds32/nds32.md: Likewise.
9041 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9042 * config/nds32/predicates.md: Implement new predicates for DSP
9045 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9047 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9048 Reformat alternatives and attributes so it is easier to identify
9049 which constraints/attributes go with which instruction.
9050 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9051 (mov<mode>_softfloat32, FMOVE64): Likewise.
9052 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9053 (mov<mode>_softfloat64, FMOVE64): Likewise.
9055 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9057 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9059 (Basic PowerPC Built-in Functions): The new name of the
9060 subsection previously known as "PowerPC Built-in Functions".
9061 (Basic PowerPC Built-in Functions Available on all Configurations):
9063 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9064 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9065 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9066 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9068 2018-05-11 Martin Jambor <mjambor@suse.cz>
9071 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9074 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9077 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9079 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9081 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9082 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9083 (ix86_handle_option): Handle -mwaitpkg.
9084 * config.gcc: New header.
9085 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9086 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9087 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9089 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9090 OPTION_MASK_ISA_WAITPKG.
9091 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9092 (ix86_option_override_internal): Add PTA_WAITPKG.
9093 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9094 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9095 IX86_BUILTIN_TPAUSE.
9096 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9097 __builtin_ia32_umwait and __builtin_ia32_tpause.
9098 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9099 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9100 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9101 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9102 UNSPECV_TPAUSE): New.
9103 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9104 * config/i386/i386.opt: Add -mwaitpkg.
9105 * config/i386/waitpkgintrin.h: New file.
9106 * config/i386/x86intrin.h: New header.
9107 * doc/invoke.texi: Add -mwaitpkg.
9109 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9112 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9114 (cortex-m0): Use armv6s-m isa.
9115 (cortex-m0plus): Likewise.
9116 (cortex-m1): Likewise.
9117 (cortex-m0.small-multiply): Likewise.
9118 (cortex-m0plus.small-multiply): Likewise.
9119 (cortex-m1.small-multiply): Likewise.
9121 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9122 Jakub Jelinek <jakub@redhat.com>
9124 PR tree-optimization/85692
9125 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9126 source permute as well.
9128 2018-05-11 Martin Liska <mliska@suse.cz>
9131 * doc/extend.texi: Document LLVM style format for no_sanitize
9134 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9136 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9137 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9138 (mode_supports_vsx_dform_quad): Likewise.
9139 (mode_supports_vmx_dform): Move these functions to be next to the
9140 other mode_supports functions.
9141 (mode_supports_dq_form): Likewise.
9142 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9143 mode_supports_dq_form.
9144 (reg_offset_addressing_ok_p): Likewise.
9145 (offsettable_ok_by_alignment): Likewise.
9146 (rs6000_legitimate_offset_address_p): Likewise.
9147 (legitimate_lo_sum_address_p): Likewise.
9148 (rs6000_legitimize_address): Likewise.
9149 (rs6000_legitimize_reload_address): Likewise.
9150 (rs6000_secondary_reload_inner): Likewise.
9151 (rs6000_preferred_reload_class): Likewise.
9152 (rs6000_output_move_128bit): Likewise.
9154 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9156 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9157 Generate SImode target register for null target.
9158 <case IX86_BUILTIN_XGETBV>: Ditto.
9159 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9160 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9162 2018-05-10 Carl Love <cel@us.ibm.com>
9164 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9165 dcbtt and dcbtstt if operands[2] is 0.
9167 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9170 * config/i386/sse.md (usadv64qi): New expander.
9172 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9174 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9175 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9176 -maltivec=be support.
9177 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9178 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9179 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9180 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9181 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9182 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9183 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9184 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9185 altivec_vsumsws): Adjust.
9186 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9187 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9188 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9190 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9191 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9192 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9193 (altivec_lve<VI_char>x): Delete expand.
9194 (*altivec_lve<VI_char>x_internal): Rename to...
9195 (altivec_lve<VI_char>x): ... this.
9196 (altivec_lvxl_<mode>): Delete expand.
9197 (*altivec_lvxl_<mode>_internal): Rename to ...
9198 (altivec_lvxl_<mode>): ... this.
9199 (altivec_stvxl_<mode>): Delete expand.
9200 (*altivec_stvxl_<mode>_internal): Rename to ...
9201 (altivec_stvxl_<mode>): ... this.
9202 (altivec_stve<VI_char>x): Delete expand.
9203 (*altivec_stve<VI_char>x_internal): Rename to ...
9204 (altivec_stve<VI_char>x): ... this.
9205 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9206 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9207 reduc_plus_scal_<mode>): Adjust.
9208 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9210 (rs6000_cpu_cpp_builtins): Adjust.
9211 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9212 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9213 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9214 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9215 -maltivec=be support.
9216 (rs6000_split_vec_extract_var): Adjust.
9217 (rs6000_split_v4si_init): Adjust.
9218 (swap_selector_for_mode): Delete.
9219 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9220 altivec_expand_stvex_be): Delete.
9221 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9222 -maltivec=be support.
9223 (rs6000_gimple_fold_builtin): Ditto.
9224 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9226 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9227 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9228 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9229 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9230 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9231 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9232 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9233 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9234 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9235 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9236 anonymous split): Adjust.
9237 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9238 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9240 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9242 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9243 when --with-gxx-include-dir is also specified.
9244 * configure: Regenerate.
9246 2018-05-09 Jim Wilson <jimw@sifive.com>
9249 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9250 * config/riscv/t-withmultilib: New.
9251 * config/riscv/withmultilib.h: New.
9252 * doc/install.texi: Document RISC-V --with-multilib-list support.
9254 2018-05-09 Richard Biener <rguenther@suse.de>
9256 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9258 (vect_bb_vectorization_profitable_p): Adjust. Compute
9259 actual scalar cost using the cost vector and the add_stmt_cost
9262 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9264 PR rtl-optimization/85645
9265 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9266 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9268 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9270 PR rtl-optimization/85645
9271 * shrink-wrap.c (spread_components): Return a boolean saying if
9272 anything was changed.
9273 (try_shrink_wrapping_separate): Iterate spread_components until
9274 nothing changes anymore.
9276 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9278 PR rtl-optimization/85645
9279 * regrename.c (build_def_use): Also kill the chains that include the
9280 destination of a REG_CFA_REGISTER note.
9282 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9284 PR rtl-optimization/85645
9285 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9286 insn that has a REG_CFA_REGISTER note.
9288 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9290 * cfgexpand.c (expand_clobber): New function.
9291 (expand_gimple_stmt_1): Use it.
9292 * tree-vect-stmts.c (vect_clobber_variable): New function,
9294 (vectorizable_simd_clone_call): ...here.
9295 (vectorizable_store): Emit a clobber either side of an
9296 IFN_STORE_LANES sequence.
9297 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9299 2018-05-09 Tom de Vries <tom@codesourcery.com>
9302 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9303 (define_insn "trap_if_false"): Add exit after trap.
9305 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9307 PR rtl-optimization/85638
9308 * bb-reorder.c: Include common/common-target.h.
9309 (create_forwarder_block): New function extracted from...
9310 (fix_up_crossing_landing_pad): ...here. Rename into...
9311 (dw2_fix_up_crossing_landing_pad): ...this.
9312 (sjlj_fix_up_crossing_landing_pad): New function.
9313 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9314 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9315 from both partitions and exit the loop after one iteration.
9317 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9320 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9322 (Basic PowerPC Built-in Functions): The new name of the
9323 subsection previously known as "PowerPC Built-in Functions".
9324 (Basic PowerPC Built-in Functions Available on all Configurations):
9326 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9328 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9330 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9332 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9335 2018-05-08 Jim Wilson <jimw@sifive.com>
9337 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9338 (LD_EMUL_SUFFIX): New.
9339 (LINK_SPEC): Use it.
9341 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9343 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9345 (Basic PowerPC Built-in Functions): The new name of the
9346 subsection previously known as "PowerPC Built-in Functions".
9347 (Basic PowerPC Built-in Functions Available on all Configurations):
9349 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9351 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9353 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9355 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9358 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9361 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9362 after cmpelim optimization.
9364 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9366 * config.gcc: Support "goldmont".
9367 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9368 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9370 * config/i386/i386.c (m_GOLDMONT): Define.
9371 (processor_target_table): Add "goldmont".
9372 (PTA_GOLDMONT): Define.
9373 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9374 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9375 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9376 (fold_builtin_cpu): Add "goldmont".
9377 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9378 (ix86_option_override_internal): Add "goldmont".
9379 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9380 (processor_type): Add PROCESSOR_GOLDMONT.
9381 * config/i386/i386.md: Add CPU "glm".
9382 * config/i386/glm.md: New file.
9383 * config/i386/x86-tune.def: Add m_GOLDMONT.
9384 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9386 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9389 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9391 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9392 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9393 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9396 * config/i386/i386.c (ix86_fold_builtin): Handle
9397 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9400 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9401 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9403 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9406 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9407 (check_arch): Likewise.
9408 (check_fpu): Return the result rather than printing it.
9409 (end arch): Fix operator precedence.
9410 (end cpu): Likewise.
9411 (END): Print the result from check_fpu.
9413 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9414 Alan Hayward <alan.hayward@arm.com>
9415 David Sherwood <david.sherwood@arm.com>
9417 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9418 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9419 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9420 (*fcmuo<mode>_and): New patterns.
9422 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9424 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9425 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9426 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9427 (cmp_op, sve_imm_con): New code attributes.
9428 (SVE_COND_INT_CMP, imm_con): Delete.
9429 (cmp_op): Remove above unspecs from int attribute.
9430 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9432 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9433 comparison-specific unspecs.
9434 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9435 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9436 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9437 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9438 (*vec_fcm<cmp_op><mode>): Rename to...
9439 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9440 (*vec_fcmuo<mode>): Rename to...
9441 (*fcmuo<mode>): ...this and adjust likewise.
9442 (*pred_fcm<cmp_op><mode>): New pattern.
9443 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9444 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9446 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9448 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9449 (aarch64_emit_sve_predicated_cond): New function.
9450 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9451 (aarch64_emit_unspec_cond_or): Replace with...
9452 (aarch64_emit_sve_or_conds): ...this new function. Use
9453 aarch64_emit_sve_ptrue_op for the individual comparisons and
9454 aarch64_emit_binop to OR them together.
9455 (aarch64_emit_inverted_unspec_cond): Replace with...
9456 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9457 aarch64_emit_sve_ptrue_op for the comparison and
9458 aarch64_emit_unop to invert the result.
9459 (aarch64_expand_sve_vec_cmp_float): Update after the above
9460 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9462 2018-05-07 Nathan Sidwell <nathan@acm.org>
9464 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9465 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9466 (Backwards Compatibility): Likewise.
9468 2018-05-07 Luis Machado <luis.machado@linaro.org>
9472 2018-05-07 Luis Machado <luis.machado@linaro.org>
9474 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9475 <prefetch_dynamic_strides>: New const bool field.
9476 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9477 prefetch_dynamic_strides.
9478 (exynosm1_prefetch_tune): Likewise.
9479 (thunderxt88_prefetch_tune): Likewise.
9480 (thunderx_prefetch_tune): Likewise.
9481 (thunderx2t99_prefetch_tune): Likewise.
9482 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9484 (aarch64_override_options_internal): Update to set
9485 PARAM_PREFETCH_DYNAMIC_STRIDES.
9486 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9487 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9488 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9489 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9490 prefetch-dynamic-strides setting.
9492 2018-05-07 Luis Machado <luis.machado@linaro.org>
9494 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9495 <minimum_stride>: New const int field.
9496 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9497 minimum_stride field.
9498 (exynosm1_prefetch_tune): Likewise.
9499 (thunderxt88_prefetch_tune): Likewise.
9500 (thunderx_prefetch_tune): Likewise.
9501 (thunderx2t99_prefetch_tune): Likewise.
9502 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9503 (aarch64_override_options_internal): Update to set
9504 PARAM_PREFETCH_MINIMUM_STRIDE.
9505 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9506 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9507 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9508 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9509 stride is constant and is below the minimum stride threshold.
9511 2018-05-07 Luis Machado <luis.machado@linaro.org>
9513 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9516 2018-05-07 Luis Machado <luis.machado@linaro.org>
9518 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9519 <prefetch_dynamic_strides>: New const bool field.
9520 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9521 prefetch_dynamic_strides.
9522 (exynosm1_prefetch_tune): Likewise.
9523 (thunderxt88_prefetch_tune): Likewise.
9524 (thunderx_prefetch_tune): Likewise.
9525 (thunderx2t99_prefetch_tune): Likewise.
9526 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9528 (aarch64_override_options_internal): Update to set
9529 PARAM_PREFETCH_DYNAMIC_STRIDES.
9530 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9531 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9532 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9533 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9534 prefetch-dynamic-strides setting.
9536 2018-05-07 Luis Machado <luis.machado@linaro.org>
9538 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9539 <minimum_stride>: New const int field.
9540 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9541 minimum_stride field.
9542 (exynosm1_prefetch_tune): Likewise.
9543 (thunderxt88_prefetch_tune): Likewise.
9544 (thunderx_prefetch_tune): Likewise.
9545 (thunderx2t99_prefetch_tune): Likewise.
9546 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9547 (aarch64_override_options_internal): Update to set
9548 PARAM_PREFETCH_MINIMUM_STRIDE.
9549 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9550 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9551 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9552 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9553 stride is constant and is below the minimum stride threshold.
9555 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9558 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9559 the type is addressable. Don't force op into register if it has
9562 2018-05-05 Roland McGrath <mcgrathr@google.com>
9565 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9566 any section for which we don't know a specific type it should have,
9567 regardless of name. Previously this was done only for the exact
9568 names ".init_array", ".fini_array", and ".preinit_array".
9569 (default_elf_asm_named_section): Add comment about
9570 relationship with default_section_type_flags and SECTION_NOTYPE.
9571 (get_section): Don't consider it a type conflict if one side has
9572 SECTION_NOTYPE and the other doesn't, as long as neither has the
9573 SECTION_BSS et al used in the default_section_type_flags logic.
9575 2018-05-05 Tom de Vries <tom@codesourcery.com>
9578 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9579 (workaround_barsyncs): New function.
9580 (nvptx_reorg): Use workaround_barsyncs.
9581 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9582 (define_expand "nvptx_membar_cta"): New define_expand.
9583 (define_insn "*nvptx_membar_cta"): New insn.
9585 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9587 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9588 To improve optimization opportunities.
9589 * builtin-types.def: The new needed builtin types for the above.
9591 2018-05-04 Richard Biener <rguenther@suse.de>
9593 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9594 * gimple-ssa-store-merging.c
9595 (imm_store_chain_info::output_merged_store): Remove redundant create,
9596 release split_store vector contents on failure.
9597 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9598 scalar stmt vector on cache hit.
9600 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9602 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9604 * config.gcc (powerpc-xilinx-eabi*): Remove.
9605 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9607 (fusion_addis_mem_combo_load): Ditto.
9608 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9610 (rs6000_cpu_cpp_builtins): Ditto.
9611 * config/rs6000/rs6000-linux.c
9612 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9613 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9614 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9616 (rs6000_setup_reg_addr_masks): Ditto.
9617 (rs6000_init_hard_regno_mode_ok): Ditto.
9618 (rs6000_option_override_internal): Ditto.
9619 (legitimate_lo_sum_address_p): Ditto.
9620 (rs6000_legitimize_address): Ditto.
9621 (rs6000_legitimize_reload_address): Ditto.
9622 (rs6000_legitimate_address_p): Ditto.
9623 (abi_v4_pass_in_fpr): Ditto.
9624 (setup_incoming_varargs): Ditto.
9625 (rs6000_gimplify_va_arg): Ditto.
9626 (rs6000_split_multireg_move): Ditto.
9627 (rs6000_savres_strategy): Ditto.
9628 (rs6000_emit_prologue_components): Ditto.
9629 (rs6000_emit_epilogue_components): Ditto.
9630 (rs6000_emit_prologue): Ditto.
9631 (rs6000_emit_epilogue): Ditto.
9632 (rs6000_elf_file_end): Ditto.
9633 (rs6000_function_value): Ditto.
9634 (rs6000_libcall_value): Ditto.
9635 * config/rs6000/rs6000.h: Ditto.
9636 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9637 (TARGET_MINMAX): ... this. New.
9638 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9639 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9640 (*movsi_internal1_single): Delete.
9641 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9642 mfpu=, mxilinx-fpu): Delete.
9643 * config/rs6000/singlefp.h: Delete.
9644 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9645 * config/rs6000/t-rs6000: Ditto.
9646 * config/rs6000/t-xilinx: Delete.
9647 * config/rs6000/titan.md: Adjust for fp_type removal.
9648 * config/rs6000/vsx.md: Remove Xilinx FP support.
9649 (VStype_simple): Delete.
9650 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9651 * config/rs6000/xfpu.h: Delete.
9652 * config/rs6000/xfpu.md: Delete.
9653 * config/rs6000/xilinx.h: Delete.
9654 * config/rs6000/xilinx.opt: Delete.
9655 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9656 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9658 2018-05-04 Tom de Vries <tom@codesourcery.com>
9661 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9664 2018-05-04 Richard Biener <rguenther@suse.de>
9667 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9668 (expand_complex_div_wide): Likewise.
9669 (expand_complex_operations_1): Likewise.
9670 (expand_complex_libcall): Preserve EH info of the original stmt.
9671 (tree_lower_complex): Handle removed blocks.
9672 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9673 on complex multiplication and division libcall builtins.
9675 2018-05-04 Richard Biener <rguenther@suse.de>
9678 * fold-const.c (negate_expr_p): Restrict negation of operand
9679 zero of a division to when we know that can happen without
9681 (fold_negate_expr_1): Likewise.
9683 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9686 * real.h (real_nextafter): Declare.
9687 * real.c (real_nextafter): New function.
9688 * fold-const-call.c (fold_const_nextafter): New function.
9689 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9690 CASE_CFN_NEXTTOWARD.
9691 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9692 even when arg1_mode is different from arg0_mode.
9694 2018-05-03 Nathan Sidwell <nathan@acm.org>
9696 * doc/extend.texi (Deprecated Features): Remove
9698 (Backwards Compatibility): Likewise.
9699 * doc/invoke.texi (C++ Language Options): Likewise.
9700 (C++ Dialect Options): Likewise.
9702 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9705 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9706 _mm512_mask_mullox_epi64): New intrinsics.
9708 2018-05-03 Tom de Vries <tom@codesourcery.com>
9711 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9712 dump files): Add offload-tree.
9714 2018-05-03 Richard Biener <rguenther@suse.de>
9716 PR tree-optimization/85615
9717 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9718 to loops not nested in BBs loop father to avoid creating multi-entry
9721 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9723 PR tree-optimization/70291
9724 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9725 arguments. Change return type to tree. Emit libcall as a new
9726 statement rather than replacing existing one when inplace_p is true.
9727 (expand_complex_multiplication_components): New function.
9728 (expand_complex_multiplication): Expand floating-point complex
9729 multiplication using the above.
9730 (expand_complex_division): Rename inner_type parameter to type.
9731 Update expand_complex_libcall call-site.
9732 (expand_complex_operations_1): Update expand_complex_multiplication
9733 and expand_complex_division call-sites.
9735 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9738 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9739 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9740 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9741 the highest significant bit of the shift count mask is clear. In
9742 check whether and[sq]i3 is needed verify that all significant bits
9743 of the shift count other than the highest are set.
9745 2018-05-02 Tom de Vries <tom@codesourcery.com>
9748 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9749 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9750 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9751 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9752 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9753 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9754 __builtin_goacc_parlevel_size.
9756 2018-05-02 Richard Biener <rguenther@suse.de>
9758 PR tree-optimization/85597
9759 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9760 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9763 2018-05-02 Tom de Vries <tom@codesourcery.com>
9766 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9767 dump files): Add ltrans-tree.
9769 2018-05-02 Tom de Vries <tom@codesourcery.com>
9772 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9773 dump files): Add wpa-ipa.
9775 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9777 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9778 powerpc*-*-linux*paired* target.
9779 * config/rs6000/750cl.h: Delete.
9780 * config/rs6000/paired.h: Delete.
9781 * config/rs6000/paired.md: Delete.
9782 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9784 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9785 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9786 comment. Remove paired float support.
9787 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9788 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9790 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9791 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9793 * config/rs6000/rs6000.c: Remove paired float support.
9794 (paired_expand_vector_init, paired_expand_vector_move,
9795 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9796 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9797 paired_expand_builtin, paired_expand_predicate_builtin,
9798 paired_init_builtins): Delete.
9799 * config/rs6000/rs6000.h: Remove paired float support.
9800 * config/rs6000/rs6000.md: Remove paired float support.
9801 (move_from_CR_ov_bit): Delete.
9802 * config/rs6000/rs6000.opt (mpaired): Delete.
9803 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9804 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9806 2018-05-02 Richard Biener <rguenther@suse.de>
9809 * gimplify.c (gimplify_save_expr): When in SSA form allow
9810 SAVE_EXPRs to compute to SSA vars.
9812 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9815 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9816 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9817 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9818 clobber operands[2], instead use a new pseudo. Formatting fixes.
9820 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9822 PR tree-optimization/85586
9823 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9824 exit early for statements in the same group if the accesses are
9827 2018-05-02 Tom de Vries <tom@codesourcery.com>
9830 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9833 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9835 PR tree-optimization/85143
9836 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9838 2018-05-01 Tom de Vries <tom@codesourcery.com>
9841 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9842 not found" error message.
9844 2018-05-01 Tom de Vries <tom@codesourcery.com>
9847 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9848 * vec.c (test_ordered_remove_if): New function.
9849 (vec_c_tests): Call test_ordered_remove_if.
9850 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9851 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9852 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9853 VEC_ORDERED_REMOVE_IF.
9855 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9857 PR tree-optimization/82665
9858 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9859 pointer subtraction where arguments come from a memchr call.
9861 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9863 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9864 --push-state --as-needed and --pop-state instead of --as-needed and
9865 --no-as-needed if ld supports it.
9866 * configure: Regenerated.
9869 * doc/install.texi2html: Replace _002d with - and _002a with * in
9870 generated html files using sed.
9872 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9875 * gcc-rich-location.c (blank_line_before_p): New function.
9876 (use_new_line): New function.
9877 (gcc_rich_location::add_fixit_insert_formatted): New function.
9878 * gcc-rich-location.h
9879 (gcc_rich_location::add_fixit_insert_formatted): New function.
9881 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9883 * selftest.c (assert_streq): Rename "expected" and "actual" to
9884 "val1" and "val2". Extend NULL-handling to cover both inputs
9885 symmetrically, while still requiring both to be non-NULL for a pass.
9886 * selftest.h (assert_streq): Rename "expected" and "actual" to
9888 (ASSERT_EQ): Likewise.
9889 (ASSERT_EQ_AT): Likewise.
9890 (ASSERT_KNOWN_EQ): Likewise.
9891 (ASSERT_KNOWN_EQ_AT): Likewise.
9892 (ASSERT_NE): Likewise.
9893 (ASSERT_MAYBE_NE): Likewise.
9894 (ASSERT_MAYBE_NE_AT): Likewise.
9895 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9896 the assertion to pass.
9897 (ASSERT_STREQ_AT): Likewise.
9899 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9901 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9902 interaction with -pie.
9904 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9906 * selftest.h: Fix alphabetization of per-source-file selftest
9909 2018-04-30 Jason Merrill <jason@redhat.com>
9911 PR c++/61982 - dead stores to destroyed objects.
9912 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9915 2018-04-30 Jason Merrill <jason@redhat.com>
9917 * tree.c (build_clobber): New.
9918 * tree.h: Declare it.
9919 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9921 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9923 * diagnostic-show-locus.c (layout::layout): Update for
9924 location_get_source_line returning a char_span.
9925 (struct char_span): Move to input.h.
9926 (struct correction): Update for fields in char_span becoming
9928 (struct source_line): Update for location_get_source_line
9929 returning a char_span.
9930 (layout::print_line): Likewise.
9931 * edit-context.c (edited_file::print_content): Likewise.
9932 (edited_file::print_diff_hunk): Likewise.
9933 (edited_file::print_run_of_changed_lines): Likewise.
9934 (edited_file::get_num_lines): Likewise.
9935 (edited_line::edited_line): Likewise.
9936 * final.c (asm_show_source): Likewise.
9937 * input.c (location_get_source_line): Convert return type
9938 from const char * to char_span, losing the final "line_len"
9940 (dump_location_info): Update for the above.
9941 (get_substring_ranges_for_loc): Likewise. Use a char_span
9942 when handling the literal within the line.
9943 (test_reading_source_line): Update for location_get_source_line
9944 returning a char_span.
9945 * input.h (class char_span): Move here from
9946 diagnostic-show-locus.c, converting from a struct to a class.
9947 Make data members private.
9948 (char_span::operator bool): New.
9949 (char_span::length): New.
9950 (char_span::get_buffer): New.
9951 (char_span::operator[]): New.
9952 (char_span::subspan): Make const.
9953 (char_span::xstrdup): New.
9954 (location_get_source_line): Convert return type from const char *
9955 to char_span, losing the final "line_size" param.
9957 2018-04-30 Jan Hubicka <jh@suse.cz>
9959 * lto-wrapper.c (ltrans_priorities): New static var.
9960 (cmp_priority): New.
9961 (run_gcc): Read priorities and if doing parallel build order
9962 the Makefile by them.
9964 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9966 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9968 2018-04-30 Richard Biener <rguenther@suse.de>
9970 * tree-cfg.c (verify_address): Remove base argument, add
9971 flag whether to check TREE_ADDRESSABLE and do that.
9972 (verify_expr): Remove.
9973 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9974 (verify_gimple_assign_single): Likewise.
9975 (verify_gimple_switch): Likewise.
9976 (verify_expr_location_1): Dereference tp once. Add (disabled)
9977 piece from verify_expr.
9978 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9980 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9982 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9984 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9986 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9987 (small_data_pattern): Likewise.
9988 (arc_rewrite_small_data): Likewise.
9989 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9990 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9991 (get_symbol_alignment): New function.
9992 (legitimate_small_data_address_p): Likewise.
9993 (legitimate_scaled_address): Update, call
9994 legitimate_small_data_address_p.
9995 (output_sdata): New static variable.
9996 (arc_print_operand): Update how we handle small data operands.
9997 (arc_print_operand_address): Likewise.
9998 (arc_legitimate_address_p): Update, use
9999 legitimate_small_data_address_p.
10000 (arc_rewrite_small_data_p): Remove.
10001 (arc_rewrite_small_data_1): Likewise.
10002 (arc_rewrite_small_data): Likewise.
10003 (small_data_pattern): Likewise.
10004 (compact_sda_memory_operand): Update to use
10005 legitimate_small_data_address_p and get_symbol_alignment.
10006 (prepare_move_operands): Don't rewite sdata pattern.
10007 (prepare_extend_operands): Remove.
10008 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10010 (zero_extendqisi2): Likewise.
10011 (zero_extendhisi2): Likewise.
10012 (extendqihi2): Likewise.
10013 (extendqisi2): Likewise.
10014 (extendhisi2): Likewise.
10015 (addsi3): Likewise.
10016 (subsi3): Likewise.
10017 (andsi3): Likewise.
10018 * config/arc/constraints.md (Usd): Change it to memory constraint.
10020 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10022 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10023 as source of std instructions.
10024 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10025 allow 6-bit constants as source for store instructions.
10026 (movdi_insn): Update instruction pattern to allow 6-bit constants
10027 as source for store instructions.
10029 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10031 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10033 2018-04-30 Nathan Sidwell <nathan@acm.org>
10034 Sandra Loosemore <sandra@codesourcery.com>
10036 * dumpfile.c (dump_open): Allow '-' for stdout.
10037 * doc/invoke.texi (Developer Options): Document dump filename
10038 determination early. Document stdin/stdout selection.
10040 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10042 Microblaze Target: PIC data text relative
10044 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10045 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10047 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10048 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10049 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10050 New addressing mode for data-text relative position indepenedent code.
10051 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10052 'ADDRESS_SYMBOLIC_TXT_REL'.
10053 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10054 (microblaze_legitimate_pic_operand): Exclude function calls from
10055 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10056 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10058 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10059 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10060 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10061 for 'address + offset'.
10062 (microblaze_expand_prologue): Add new function prologue call for
10064 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10065 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10066 table in case of TARGET_PIC_DATA_TEXT_REL.
10067 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10068 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10069 Add new macros 'UNSPEC_TEXT',
10070 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10071 + exclude function calls from 'UNSPEC_PLT' in case of data text
10073 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10074 new target hook for generating address diff vector tables in case of
10076 * doc/tm.texi : Regenerate.
10077 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10078 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10079 of addr diff vector generation.
10080 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10081 target hook definition.
10082 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10083 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10084 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10085 option for data text relative.
10087 2018-04-30 Richard Biener <rguenther@suse.de>
10089 * tree-chrec.h (evolution_function_is_constant_p): Remove
10091 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10093 2018-04-30 Richard Biener <rguenther@suse.de>
10096 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10098 2018-04-30 Richard Biener <rguenther@suse.de>
10100 PR tree-optimization/28364
10101 PR tree-optimization/85275
10102 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10103 copying first exit test.
10105 2018-04-28 Mark Wielaard <mark@klomp.org>
10107 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10108 dwarf_version >= 5.
10109 (dwarf_AT): Handle DW_AT_addr_base.
10110 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10112 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10115 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10116 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10117 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10118 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10120 2018-04-28 Richard Biener <rguenther@suse.de>
10122 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10123 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10124 to reflect use. Only add interesting stmts.
10126 2018-04-27 Martin Jambor <mjambor@suse.cz>
10129 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10130 the jump function allows for passing through aggregate values.
10132 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10134 * input.h (in_system_header_at): Convert from macro to inline
10136 (from_macro_expansion_at): Likewise.
10137 (from_macro_definition_at): Likewise.
10139 2018-04-27 Jeff Law <law@redhat.com>
10141 * config.gcc: Mark tile* targets as deprecated/obsolete.
10143 2018-04-27 Richard Biener <rguenther@suse.de>
10145 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10148 2018-04-27 Richard Biener <rguenther@suse.de>
10150 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10152 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10154 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10155 with Yd constraint. Set "preferred_for_speed" attribute from
10156 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10157 with Yd constraint.
10158 (*movdi_internal): Ditto.
10159 (movti_interunit splitters): Remove
10160 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10161 (movdi_interunit splitters): Ditto.
10162 * config/i386/constraints.md (Ye): Remove.
10163 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10165 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10168 * config/aarch64/constraints.md (Usg): Limit to 31.
10169 (Usj): Limit to 63.
10171 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10173 PR tree-optimization/85529
10174 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10175 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10176 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10177 zero extension or masking of the MSB bit.
10178 (optimize_range_tests): Add FIRST_BB argument, pass it through
10179 to optimize_range_tests_var_bound.
10180 (maybe_optimize_range_tests, reassociate_bb): Adjust
10181 optimize_range_tests callers.
10183 2018-04-26 Richard Biener <rguenther@suse.de>
10184 Jakub Jelinek <jakub@redhat.com>
10186 * cgraph.h (symbol_table): Just declare debug method here.
10187 * symtab.c (symbol_table::debug): Define.
10189 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10191 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10193 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10195 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10196 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10197 (*movdi_internal): Substitute Yi and Yj constraint with x
10198 and Ym and Yn constraint with y constraint. Update "isa"
10199 attribute and set "preferred_for_speed" attribute from
10200 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10201 (*movsi_internal): Ditto.
10202 (*movdf_internal): Ditto.
10203 (*movsf_internal): Ditto.
10204 (*zero_extendsidi2): Ditto.
10205 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10206 (sse2_loadld): Ditto.
10207 (*vec_extract<ssevecmodelower>_0): Ditto.
10208 (*vec_extractv4si_0_zext_sse4): Ditto.
10209 (vec_concatv2di): Ditto.
10210 (*vec_dup<mode>): Ditto.
10211 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10212 * config/i386/constraints.md (Yi): Remove.
10217 2018-04-26 Nathan Sidwell <nathan@acm.org>
10219 * dumpfile.c (dump_open): New.
10220 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10221 (dump_finish): Detect stdio/stderr by value not name.
10223 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10225 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10227 2018-04-26 Tom de Vries <tom@codesourcery.com>
10230 * config/nvptx/nvptx.c (verify_neutering_jumps)
10231 (verify_neutering_labels): New function
10232 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10234 2018-04-26 Tom de Vries <tom@codesourcery.com>
10237 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10238 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10241 2018-04-26 Richard Biener <rguenther@suse.de>
10242 Tom de Vries <tom@codesourcery.com>
10245 * lto-streamer-out.c (output_function): Fixup loops if required to match
10246 discovery done in the reader.
10248 2018-04-26 Richard Biener <rguenther@suse.de>
10250 PR tree-optimization/85116
10251 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10252 have a loop exit from the single latch predecessor. Remove
10253 case of header with just condition.
10254 (ch_base::copy_headers): Exclude infinite loops from any
10256 (pass_ch::execute): Record exits.
10258 2018-04-26 Richard Biener <rguenther@suse.de>
10260 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10261 prologue cost vector and pass it to vect_get_load_cost.
10262 (vect_get_peeling_costs_all_drs): Likewise.
10263 (vect_peeling_hash_get_lowest_cost): Likewise.
10264 (vect_enhance_data_refs_alignment): Likewise.
10266 2018-04-26 Richard Biener <rguenther@suse.de>
10268 PR middle-end/85450
10269 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10270 checking of integer<->pointer conversions.
10271 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10272 sign-/zero-extending pointer types.
10273 (expand_omp_for_static_chunk): Likewise.
10275 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10276 Jean Lee <xiaoyur347@gmail.com>
10278 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10279 (TARGET_ASAN_SHADOW_OFFSET): Define.
10280 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10281 true for -fsanitize=address.
10283 2018-04-25 Mark Wielaard <mark@klomp.org>
10285 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10288 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10290 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10291 than "alu", remove explicit "memory" and "imm_disp" attributes.
10292 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10294 PR middle-end/85414
10295 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10296 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10297 gen_lowpart_no_emit.
10299 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10302 * config/i386/i386.c (ix86_expand_builtin): Change memory
10303 operand to XI, extend p0 to Pmode.
10304 * config/i386/i386.md: Change unspec volatile and operand
10305 1 mode to XI, change operand 0 mode to P.
10307 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10309 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10310 GET_MODE_MASK before any checking.
10311 (nds32_can_use_bset_p): Likewise.
10312 (nds32_can_use_btgl_p): Likewise.
10314 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10316 * config/nds32/nds32-doubleword.md: New define_split pattern for
10317 illegal register number.
10319 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10321 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10323 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10325 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10327 2018-04-25 Richard Biener <rguenther@suse.de>
10329 * lto-streamer.h (LTO_major_version): Bump to 8.
10331 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10333 * BASE-VER: Set to 9.0.0.
10335 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10337 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10338 in __abskf2 and __powikf2.
10340 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10343 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10344 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10345 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10346 Use the above on operand 2. Reindent.
10347 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10349 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10352 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10354 * config/i386/i386.opt (mcet): Removed.
10355 * doc/install.texi: Remove -mcet documentation.
10356 * doc/invoke.texi: Likewise.
10358 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10361 * doc/install.texi: Remove -mcet from bootstrap-cet.
10363 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10366 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10367 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10371 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10372 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10373 containing a CONST_VECTOR.
10375 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10377 * doc/install.texi: Update newlib dependency for nvptx.
10379 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10382 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10383 instead of INTVAL when shifting x left.
10385 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10387 PR tree-optimization/85478
10388 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10389 vect_grouped_store_supported for single element vectors.
10391 2018-04-24 Richard Biener <rguenther@suse.de>
10394 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10395 load cost increase to the case of non-constant step.
10397 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10400 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10401 destination if any_malformed_asm.
10403 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10405 PR middle-end/85496
10406 * expr.c (store_field): In the bitfield case, if the value comes from
10407 a function call and is returned in registers by means of a PARALLEL,
10408 do not change the mode of the temporary unless BLKmode and VOIDmode.
10410 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10412 PR rtl-optimization/85423
10413 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10414 dependencies to debug insns when the previous insn is non-debug.
10416 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10418 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10419 enums into a single definition.
10420 (fls): Fix predicates and printing.
10423 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10425 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10426 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10427 and short u6 immediate.
10428 (check_if_valid_sleep_operand): Remove.
10429 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10431 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10433 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10434 flag_always_save_lp condition.
10435 * config/nds32/nds32.opt (malways-save-lp): New option.
10437 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10439 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10440 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10441 * config/nds32/nds32.h
10442 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10443 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10445 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10447 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10448 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10450 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10451 Chung-Ju Wu <jasonwucj@gmail.com>
10453 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10455 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10456 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10458 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10460 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10462 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10464 * config/nds32/nds32-protos.h (nds32_data_alignment,
10465 nds32_local_alignment): Declare.
10466 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10467 nds32_local_alignment): New functions.
10468 (TARGET_CONSTANT_ALIGNMENT): Define.
10469 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10471 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10473 * config/nds32/nds32.c
10474 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10475 (TARGET_MODES_TIEABLE_P): Likewise.
10477 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10479 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10480 level Ofast and Og.
10482 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10483 Chung-Ju Wu <jasonwucj@gmail.com>
10485 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10486 for unaligned access.
10487 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10489 * config/nds32/nds32-intrinsic.md: Likewise.
10490 * config/nds32/nds32_intrinsic.h: Likewise.
10491 * config/nds32/nds32.h (nds32_builtins): Likewise.
10492 * config/nds32/nds32.opt (munaligned-access): New option.
10493 * config/nds32/nds32.c (nds32_asm_file_start): Display
10494 flag_unaligned_access status.
10496 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10498 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10499 -mno-relax is present.
10500 * config/riscv/linux.h (LINK_SPEC): Ditto.
10502 2018-04-20 Martin Sebor <msebor@redhat.com>
10505 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10507 (gimple_fold_builtin_stxcpy_chk): Same.
10508 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10510 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10513 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10514 __powikf2 when long double is IEEE 128-bit.
10516 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10518 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10519 step to make sure stack always aligned.
10521 2018-04-20 Carl Love <cel@us.ibm.com>
10524 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10525 size check for arg0.
10527 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10528 Tom de Vries <tom@codesourcery.com>
10531 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10532 Emit insns for calls too.
10533 (nvptx_find_par): Always look for worker-level predecessor insn.
10534 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10536 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10537 (nvptx_process_pars): Propagate frames for calls.
10539 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10542 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10544 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10545 (ix86_handle_option): Don't handle OPT_mibt.
10546 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10548 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10550 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10551 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10552 (ix86_target_macros): Define __CET__ with flag_cf_protection
10553 for -fcf-protection.
10554 * config/i386/i386.c (isa2_opts): Remove -mibt.
10555 * config/i386/i386.h (TARGET_IBT): Removed.
10556 (TARGET_IBT_P): Likewise.
10557 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10558 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10559 * config/i386/i386.opt (mcet): Update help message.
10560 (mshstk): Likewise.
10562 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10563 -mcet as an alias for -mshstk.
10565 2018-04-20 Richard Biener <rguenther@suse.de>
10567 PR middle-end/85475
10568 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10569 complexity by forcing a single use of the multiply operand.
10571 2018-04-20 Martin Jambor <mjambor@suse.cz>
10574 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10575 recursion dependency to only apply to non-clones.
10577 2018-04-20 Martin Jambor <mjambor@suse.cz>
10580 * ipa-cp.c (create_specialized_node): Check that clones of
10581 self-recursive edges exist during IPA-CP.
10583 2018-04-19 Toon Moene <toon@moene.org>
10585 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10588 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10590 PR tree-optimization/85467
10591 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10592 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10593 VECTOR_CST element to type.
10595 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10598 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10599 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10600 (builtin_longjmp): Likewise.
10601 (save_stack_nonlocal): New pattern.
10602 (restore_stack_nonlocal): Likewise.
10604 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10607 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10608 Replace ASM_OUTPUT_LABEL with fprintf.
10610 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10613 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10614 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10615 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10616 define __IBT__ and __SHSTK__ for -fcf-protection.
10617 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10619 (ix86_trampoline_init): Likewise.
10620 (x86_output_mi_thunk): Likewise.
10621 (ix86_notrack_prefixed_insn_p): Likewise.
10622 (ix86_option_override_internal): Don't disallow -fcf-protection.
10623 * config/i386/i386.md (rdssp<mode>): Also enable for
10625 (incssp<mode>): Likewise.
10626 (nop_endbr): Likewise.
10627 * config/i386/i386.opt (mcet): Change help message to built-in
10630 (mshstk): Likewise.
10631 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10632 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10633 enable CET built-in functions.
10635 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10637 * common/config/i386/i386-common.c
10638 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10639 OPTION_MASK_ISA_MOVDIRI_UNSET,
10640 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10641 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10642 * config.gcc (movdirintrin.h): New header.
10643 * config/i386/cpuid.h (bit_MOVDIRI,
10644 bit_MOVDIR64B): New bits.
10645 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10647 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10648 (VOID, PVOID, PCVOID)): New function types.
10649 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10650 __builtin_ia32_directstoreu_u64,
10651 __builtin_ia32_movdir64b): New builtins.
10652 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10653 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10655 (ix86_valid_target_attribute_inner_p): Ditto.
10656 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10657 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10658 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10659 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10660 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10661 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10662 (movdiri<mode>, movdir64b_<mode>): New.
10663 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10664 * config/i386/immintrin.h: Include movdirintrin.h.
10665 * config/i386/movdirintrin.h: New file.
10666 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10668 2018-04-19 Richard Biener <rguenther@suse.de>
10670 PR middle-end/85455
10671 * cfg.c (clear_bb_flags): When loop state says we have
10672 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10674 2018-04-19 Richard Biener <rguenther@suse.de>
10676 PR tree-optimization/84737
10677 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10678 copying restrict info.
10679 (vect_setup_realignment): Use it.
10680 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10681 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10682 the first DR to all generated stores.
10683 (vectorizable_load): Likewise for loads.
10685 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10687 PR tree-optimization/85446
10688 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10689 the integral and pointer types to have the same precision.
10691 * doc/install.texi: Document --disable-cet being the default and
10694 2018-04-18 Martin Liska <mliska@suse.cz>
10696 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10699 2018-04-18 Martin Liska <mliska@suse.cz>
10702 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10705 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10706 arguments if they are comparable.
10708 2018-04-18 Martin Liska <mliska@suse.cz>
10711 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10714 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10717 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10720 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10721 ENDBR after calling __morestack.
10723 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10726 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10727 by using gcc_base_ver to generate a gcc_driver_version, and use
10728 it when generating GCC_DRIVER_NAME.
10729 * configure: Regenerate.
10731 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10734 * config.gcc: Obsolete powerpc*-*-*spe*.
10736 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10739 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10740 (stabstr_D): Change type of unum from unsigned int to
10741 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10744 2018-04-17 Jim Wilson <jimw@sifive.com>
10747 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10748 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10749 Set arg_pointer_offset after using pretend_args_size.
10751 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10753 PR rtl-optimization/85431
10754 * dse.c (record_store): Ignore zero width stores.
10757 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10758 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10759 __builtin_stack_restore rather than after it.
10760 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10761 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10762 argument instead of virtual_dynamic_stack_rtx.
10764 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10766 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10768 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10769 Add note to error message to explain internal mapping of overloaded
10770 built-in function name to non-overloaded built-in function name.
10771 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10774 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10777 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10778 where the inputs overlap with the output.
10780 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10782 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10783 (=v, v) alternative and explicit "memory" attribute.
10784 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10785 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10787 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10788 "sselog1" type instead of "sselog".
10789 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10790 "sselog". Remove explicit "memory" attribute.
10791 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10792 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10794 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10795 "sselog1" type instead of "sselog". Remove explicit "memory"
10797 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10798 use "sselog1" type instead of "sselog". Remove explicit "memory"
10800 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10801 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10803 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10804 "sselog1" type instead of "sselog". Remove explicit "memory"
10806 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10807 use "sselog1" type instead of "sselog". Remove explicit "memory"
10811 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10813 PR middle-end/85414
10814 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10817 2018-04-17 Martin Jambor <mjambor@suse.cz>
10820 * ipa-cp.c (create_specialized_node): Call
10821 expand_all_artificial_thunks if necessary.
10823 2018-04-17 Martin Liska <mliska@suse.cz>
10826 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10827 in message, remote space in between '_G' and '('.
10829 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10832 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10833 avx512f_vmcmp<mode>3<round_saeonly_name>,
10834 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10835 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10836 avx512f_rndscale<mode><round_saeonly_name>,
10837 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10838 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10839 Use %<iptr>2 instead of %2 for -masm=intel.
10840 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10841 avx512f_vcvttss2usi<round_saeonly_name>,
10842 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10844 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10845 avx512f_vcvttsd2usi<round_saeonly_name>,
10846 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10847 Use %q1 instead of %1 for -masm=intel.
10848 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10849 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10850 of %3 for -masm=intel.
10851 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10853 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10855 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10857 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10858 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10860 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10862 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10863 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10864 %g1 and one with %0 and %1.
10865 (avx512er_vmrcp28<mode><round_saeonly_name>,
10866 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10867 %1 for -masm=intel.
10868 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10869 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10870 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10871 of %0 and %{%4%} for -masm=intel.
10872 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10873 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10874 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10875 order of %0 and %{%5%}%{z%} for -masm=intel.
10877 2018-04-17 Jan Hubicka <jh@suse.cz>
10880 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10882 2018-04-17 Martin Liska <mliska@suse.cz>
10885 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10886 for target_clone error message. Make default implementation
10887 clone to be a local declaration.
10888 (separate_attrs): Add new argument and check for an empty
10890 (expand_target_clones): Handle it.
10891 (ipa_target_clone): Make redirection just for target_clones
10894 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10895 Tom de Vries <tom@codesourcery.com>
10897 PR middle-end/84955
10898 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10899 tiled basic blocks without omp continue statements.
10901 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10904 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10905 vec_extract expression as having side effects to make sure it gets
10908 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10911 * config/i386/i386.c (get_builtin_code_for_version): Check
10914 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10917 * config.gcc: Support "skylake".
10918 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10920 * config/i386/i386.c (m_SKYLAKE): Define.
10921 (processor_target_table): Add "skylake".
10922 (ix86_option_override_internal): Add "skylake".
10923 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10924 PROCESSOR_CANNONLAKE.
10925 (get_builtin_code_for_version): Fix priority for
10926 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10927 PROCESSOR_SKYLAKE-AVX512.
10928 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10929 (processor_type): Add PROCESSOR_SKYLAKE.
10931 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10932 Jason Merrill <jason@redhat.com>
10935 * convert.c (convert_to_integer_1): Use direct recursion for
10936 enumeral types and types with a precision less than the number
10937 of bits in their mode.
10939 2018-04-16 Julia Koval <julia.koval@intel.com>
10942 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10943 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10945 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10948 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10949 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10950 and -mno-direct-move.
10952 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10955 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10956 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10957 Ensure negative shifts result in {0}.
10959 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10961 PR rtl-optimization/79916
10962 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10963 regs (if any) to define how to gnerate SD moves when LRA is in
10966 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10968 PR rtl-optimization/85393
10969 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10970 * except.c (expand_dw2_landing_pad_for_region): Make static.
10971 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10972 a label and unconditional jump to old_bb, rather than
10973 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10976 PR rtl-optimization/85376
10977 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10978 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10979 instead of a specific value.
10981 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10982 Bin Cheng <bin.cheng@arm.com>
10984 PR tree-optimization/82965
10985 PR tree-optimization/83991
10986 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10987 by_profile_only parameter.
10988 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10989 information if the loop was predicted to iterate too many times.
10990 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10992 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10995 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10998 2018-04-13 Martin Liska <mliska@suse.cz>
10999 Jakub Jelinek <jakub@redhat.com>
11001 PR middle-end/81657
11002 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11003 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11004 * builtins.c (expand_builtin_memory_copy_args): Use
11005 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11006 handle dest_addr == pc_rtx.
11008 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11011 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11012 asked to not generate direct moves.
11013 (fix_trunc<mode>si2_stfiwx): Similar.
11014 (fix_trunc<mode>si2_internal): Similar.
11016 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11019 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11020 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11021 lookup if dest in some wider mode is known to be const0_rtx and
11022 if so, record permanent equivalence for it to be ZERO_EXTEND of
11023 the narrower mode destination.
11025 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11027 * lto-streamer-out.c (output_function): Revert 259346.
11028 * omp-expand.c (expand_oacc_for): Likewise.
11030 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11032 PR rtl-optimization/85354
11033 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11034 * sel-sched.c (sel_global_init): ... here.
11036 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11039 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11040 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11041 mode for PE-COFF targets.
11042 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11043 (i386_pe_asm_lto_end): Likewise.
11044 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11045 (TARGET_ASM_LTO_END): Likewise.
11046 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11047 (i386_pe_asm_lto_start): New function.
11048 (i386_pe_asm_lto_end): Likewise.
11050 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11051 Richard Biener <rguenther@suse.de>
11053 PR middle-end/84955
11054 * lto-streamer-out.c (output_function): Fix CFG loop state before
11056 * omp-expand.c (expand_oacc_for): Handle calls to internal
11057 functions like regular functions.
11059 2018-04-12 Richard Biener <rguenther@suse.de>
11062 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11063 for the early LTO debug to properly generate references to it
11064 during DIE emission. Do not re-use that for the skeleton for
11066 (dwarf2out_early_finish): Likewise.
11068 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11071 * config/i386/sse.md
11072 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11073 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11074 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11075 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11076 and output is a reg, avoid creating invalid lowpart subreg, but
11077 instead split into a 512-bit move. Don't split if not AVX512VL,
11078 input is xmm16+ reg and output is a mem.
11079 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11080 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11081 xmm16+ reg and output is a mem.
11083 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11085 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11086 also for flag_dwarf2_cfi_asm.
11088 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11090 PR rtl-optimization/85342
11091 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11092 a bool scalar var inside of the loop instead. Don't try to update
11093 recog_data.operand after failed apply_change_group.
11095 2018-04-12 Tom de Vries <tom@codesourcery.com>
11098 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11099 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11100 array with flexible array member as array without given dimension.
11101 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11102 argument for undefined param to true.
11104 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11107 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11108 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11109 from PowerPC section.
11110 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11111 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11112 help text that is too long.
11113 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11114 help text that is too long.
11115 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11116 help text that is too long.
11118 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11120 * config/alpha/alpha.md (stack_probe_internal): Rename
11121 from "probe_stack". Update all callers.
11123 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11125 PR rtl-optimization/84566
11126 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11127 sched_macro_fuse_insns.
11129 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11132 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11133 (compute_block_dependences): ... from here.
11135 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11137 PR tree-optimization/85331
11138 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11139 from int to HOST_WIDE_INT.
11141 2018-04-11 Martin Jambor <mjambor@suse.cz>
11144 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11145 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11146 not the same as the source val.
11147 (cgraph_edge_brings_value_p): New parameter.
11148 (gather_edges_for_value): Pass destination value to
11149 cgraph_edge_brings_value_p.
11150 (perhaps_add_new_callers): Likewise.
11151 (get_info_about_necessary_edges): Likewise and exclude values brought
11152 only by self-recursive edges.
11153 (create_specialized_node): Redirect only clones of self-calling edges.
11154 (+self_recursive_pass_through_p): New function.
11155 (find_more_scalar_values_for_callers_subset): Use it.
11156 (find_aggregate_values_for_callers_subset): Likewise.
11157 (known_aggs_to_agg_replacement_list): Removed.
11158 (decide_whether_version_node): Re-calculate known constants for all
11159 remaining context clones.
11161 2018-04-11 Richard Biener <rguenther@suse.de>
11164 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11165 from early DWARF output.
11166 (dwarf2out_early_finish): Output line info unconditionally into
11167 early DWARF and add reference to it.
11169 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11172 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11173 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11174 other than V2DFmode using iptr mode attribute.
11175 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11177 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11179 PR rtl-optimization/84659
11180 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11182 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11185 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11187 (output_loc_list): Pass address of a dummy size variable even in the
11188 locview handling loop.
11189 (index_location_lists): Add comment on why skip_loc_list_entry can't
11192 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11195 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11198 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11201 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11202 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11203 and -mstring-compare-inline-limit.
11205 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11208 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11209 for stack clash protection in a register whenever we need it to be in
11212 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11214 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11215 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11217 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11220 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11222 (mlong-double-): Ditto.
11223 * config/rs6000/sysv4.opt (msdata=): Ditto.
11224 (mtls-size=): Ditto.
11226 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11228 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11229 erroneous entries for
11230 "vector int vec_ldl (int, long int *)", and
11231 "vector unsigned int vec_ldl (int, unsigned long int *)".
11232 Add comments and entries for
11233 "vector bool char vec_ldl (int, bool char *)",
11234 "vector bool short vec_ldl (int, bool short *)",
11235 "vector bool int vec_ldl (int, bool int *)",
11236 "vector bool long long vec_ldl (int, bool long long *)",
11237 "vector pixel vec_ldl (int, pixel *)",
11238 "vector long long vec_ldl (int, long long *)",
11239 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11240 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11241 type tree bool_long_long_type_node and correct definition of
11242 bool_V2DI_type_node to make reference to this new type tree.
11243 (rs6000_mangle_type): Replace erroneous reference to
11244 bool_long_type_node with bool_long_long_type_node.
11245 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11246 comments to emphasize sign distinctions for char and int types and
11247 replace RS6000_BTI_bool_long constant with
11248 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11249 use of RS6000_BTI_pixel.
11250 (bool_long_type_node): Remove this macro definition.
11251 (bool_long_long_type_node): New macro definition
11253 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11255 PR rtl-optimization/85300
11256 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11257 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11258 simplify_unary_operation fails.
11260 2018-04-10 Martin Liska <mliska@suse.cz>
11262 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11263 cgraph_edge and ipa_ref.
11265 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11269 * config/i386/sse.md
11270 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11271 computation of the VEC_MERGE selector from mask.
11272 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11273 Fix decoding of the VEC_MERGE selector into mask.
11275 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11277 PR tree-optimization/85286
11278 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11280 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11282 * final.c (final_1): Set insn_last_address as well as
11283 insn_current_address.
11285 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11288 * explow.c (emit_stack_probe): Call validize_mem on memory location
11289 before passing it to gen_probe_stack. Create address operand and
11290 legitimize it for the probe_stack_address case.
11292 2018-04-09 Jan Hubicka <jh@suse.cz>
11295 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11296 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11297 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11299 (free_lang_data): Rebuild type inheritance graph.
11301 2018-04-09 Martin Sebor <msebor@redhat.com>
11303 * invoke.texi (-finline-small-functions): Mention other optimization
11305 (-findirect-inlining, -fpartial-inlining): Same.
11306 (-finline-functions-called-once): Same.
11307 (-freorder-blocks-and-partition): Same.
11309 2018-04-09 Jan Hubicka <jh@suse.cz>
11312 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11313 jumps; choose last target that matches the criteria (i.e.
11314 no partition changes for non-crossing jumps).
11315 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11316 support for redirecting crossing jumps to non-crossing.
11318 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11320 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11321 also for naked functions.
11323 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11325 * config/arc/arc.md (add_shift): New pattern.
11326 (add_shift2): Likewise.
11327 (sub_shift): Likewise.
11328 (sub_shift_cmp0_noout): Likewise.
11329 (compare_si_ashiftsi): Likewise.
11330 (xbfu_cmp0_noout): New combine pattern.
11331 (xbfu_cmp0"): Likewise.
11332 (movsi_set_cc_insn): Place the predicable variant first.
11333 (commutative_binary_cmp0_noout): Remove clobber.
11334 (commutative_binary_cmp0): New pattern.
11335 (noncommutative_binary_cmp0): Likewise.
11336 (noncommutative_binary_cmp0_noout): Likewise.
11337 (noncommutative_binary_comparison_result_used): Removed.
11338 (rsub_cmp0): New pattern.
11339 (rsub_cmp0_noout): Likewise.
11340 (extzvsi): Changed, keep only meaningful variants.
11341 (SQH, SEZ): New iterators.
11342 (SQH_postfix): New mode attribute.
11343 (SEZ_prefix): New code attribute.
11344 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11345 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11346 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11347 of numerical value.
11348 (noncommutative_operator): Check the availability of barrel
11351 2018-04-09 Richard Biener <rguenther@suse.de>
11353 PR tree-optimization/85284
11354 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11355 Only use the niter constraining form of simple_iv when the exit
11356 is always executed.
11358 2018-04-09 Tom de Vries <tom@codesourcery.com>
11361 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11362 (define_expand "*memory_barrier"): New define_expand.
11363 (define_insn "memory_barrier"): New insn.
11365 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11367 PR rtl-optimization/80463
11368 PR rtl-optimization/83972
11369 PR rtl-optimization/83480
11371 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11372 correct producer for the insn.
11373 (tidy_control_flow): Fixup seqnos in case of debug insns.
11375 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11377 PR rtl-optimization/83913
11379 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11380 different sched-times when merging exprs.
11382 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11384 PR rtl-optimization/83962
11386 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11387 tidy_fallthru_edge and tidy_control_flow.
11389 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11391 PR rtl-optimization/83530
11393 * sel-sched.c (force_next_insn): New global variable.
11394 (remove_insn_for_debug): When force_next_insn is true, also leave only
11395 next insn in the ready list.
11396 (sel_sched_region): When the region wasn't scheduled, make another pass
11397 over it with force_next_insn set to 1.
11399 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11401 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11403 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11404 for interrupt control.
11405 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11406 functions for interrupt control.
11407 * config/nds32/nds32-intrinsic.md: Likewise.
11408 * config/nds32/nds32_intrinsic.h: Likewise.
11409 * config/nds32/nds32.h (nds32_builtins): Likewise.
11411 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11413 * config/nds32/nds32.c (nds32_init_machine_status,
11414 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11415 strict_aligned_p field.
11416 (nds32_expand_to_rtl_hook): New function.
11417 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11418 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11420 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11421 Chung-Ju Wu <jasonwucj@gmail.com>
11423 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11424 * config/nds32/nds32-n7.md: New file.
11425 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11426 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11428 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11429 * config/nds32/nds32.md (pipeline_model): Add n7.
11430 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11431 * config/nds32/pipelines.md: Include n7 settings.
11433 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11434 Chung-Ju Wu <jasonwucj@gmail.com>
11436 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11437 * config/nds32/nds32-e8.md: New file.
11438 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11439 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11441 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11442 * config/nds32/nds32.md (pipeline_model): Add e8.
11443 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11444 * config/nds32/pipelines.md: Include e8 settings.
11446 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11447 Chung-Ju Wu <jasonwucj@gmail.com>
11449 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11450 * config/nds32/nds32-n8.md: New file.
11451 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11452 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11454 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11455 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11456 * config/nds32/nds32.md (pipeline_model): Add n8.
11457 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11458 * config/nds32/pipelines.md: Include n8 settings.
11460 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11461 Chung-Ju Wu <jasonwucj@gmail.com>
11463 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11464 * config/nds32/nds32-n9-2r1w.md: New file.
11465 * config/nds32/nds32-n9-3r2w.md: New file.
11466 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11467 nds32_register_ports): New or modify for cpu n9.
11468 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11470 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11471 * config/nds32/nds32-utils.c: New file.
11472 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11473 TARGET_MUL_SLOW): Define.
11474 * config/nds32/nds32.md (pipeline_model): New attribute.
11475 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11476 New options that support cpu n9.
11477 * config/nds32/pipelines.md: Include n9 settings.
11478 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11480 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11482 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11483 information if necessary.
11484 (output_cond_branch_compare_zero): Likewise.
11485 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11486 (nds32_target_alignment): Refine for alignment.
11487 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11488 (FUNCTION_BOUNDARY): Modify.
11489 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11491 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11493 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11495 * config/nds32/constants.md (unspec_volatile_element): Add values for
11496 TLB operation and data prefetch.
11497 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11498 functions for TLB operation and data prefetch.
11499 * config/nds32/nds32-intrinsic.md: Likewise.
11500 * config/nds32/nds32_intrinsic.h: Likewise.
11501 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11502 (nds32_print_operand): Likewise.
11503 * config/nds32/nds32.h (nds32_builtins): Likewise.
11505 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11506 Andrew Pinski <pinsika@gcc.gnu.org>
11508 PR middle-end/82976
11509 * match.pd: Use constant_boolean_node of correct type instead of
11510 boolean_true_node or boolean_false_node for simplifying
11511 pointer comparisons to zero.
11513 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11515 PR tree-optimization/80021
11516 * tree.c (verify_type_variant): Make error call in verify_variant_match
11517 translatable and remove final full stop.
11519 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11521 * config/nds32/constants.md (unspec_volatile_element): Add
11522 UNSPEC_VOLATILE_EH_RETURN.
11523 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11524 nds32_output_stack_pop): Support dwarf exception handling process.
11525 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11526 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11527 exception handling process.
11528 (nds32_compute_stack_frame): Likewise.
11529 (nds32_return_addr_rtx): Likewise.
11530 (nds32_initial_elimination_offset): Likewise.
11531 (nds32_expand_prologue): Likewise.
11532 (nds32_expand_epilogue): Likewise.
11533 (nds32_dynamic_chain_address): New function.
11534 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11535 exception handling.
11536 (DYNAMIC_CHAIN_ADDRESS): Define.
11537 (EH_RETURN_DATA_REGNO): Define.
11538 (EH_RETURN_STACKADJ_RTX): Define.
11539 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11540 patterns for dwarf exception handling.
11542 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11544 * config/nds32/nds32.h: Clean up obsolete macros.
11546 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11548 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11549 Add enum values for particular instructions.
11550 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11551 particular intrinsic functions.
11552 * config/nds32/nds32-intrinsic.md: Likewise.
11553 * config/nds32/nds32_intrinsic.h: Likewise.
11554 * config/nds32/nds32.h (nds32_builtins): Likewise.
11555 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11556 (btst, ave): New patterns for particular instructions.
11558 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11560 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11561 Add enum values for atomic load/store and memory sync.
11562 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11564 * config/nds32/nds32-intrinsic.md: Likewise.
11565 * config/nds32/nds32_intrinsic.h: Likewise.
11566 * config/nds32/nds32.h (nds32_builtins): Likewise.
11568 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11570 PR tree-optimization/85257
11571 * fold-const.c (native_encode_vector): If not all elts could fit
11572 and off is -1, return 0 rather than offset.
11573 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11574 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11575 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11576 adjust buffer in native_interpret_expr call.
11578 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11580 * config/nds32/constants.md (unspec_volatile_element): Add cache
11581 control enum values.
11582 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11583 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11584 * config/nds32/nds32.c (nds32_cctl_names): New.
11585 (nds32_print_operand): Handle cache control register names.
11586 * config/nds32/nds32.h (nds32_builtins): New enum values.
11587 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11589 * config/nds32/nds32.md (type): Add mmu.
11590 * config/nds32/pipelines.md (simple_insn): Add mmu.
11592 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11594 * config/nds32/nds32.md (type): Remove call.
11595 * config/nds32/pipelines.md (simple_insn): Likewise.
11597 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11599 * config/nds32/constants.md (unspec_volatile_element): Add
11600 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11601 UNSPEC_VOLATILE_FMFCFG.
11602 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11603 description for fmfcfg and fmfcsr.
11604 (bdesc_1arg): Add fmtcsr.
11605 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11606 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11607 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11608 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11609 unspec_fmfcfg): New patterns.
11610 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11611 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11612 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11613 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11614 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11615 __nds32__fmfcfg): Define.
11617 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11619 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11620 intrinsic register names.
11621 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11622 intrinsic register enum values and macros.
11624 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11626 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11627 for load/store addressing form.
11628 (nds32_print_operand_address): Likewise.
11630 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11633 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11634 based on LABEL_REF. Remove useless assertion.
11635 (pic_address_needs_scratch): Fix formatting.
11636 (sparc_legitimize_pic_address): Minor tweaks.
11637 (sparc_delegitimize_address): Adjust assertion accordingly.
11638 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11639 into symbolic_operand.
11640 (movsi_high_pic_label_ref): Likewise.
11641 (movsi_lo_sum_pic_label_ref): Likewise.
11642 (movdi_pic_label_ref): Likewise.
11643 (movdi_high_pic_label_ref): Likewise.
11644 (movdi_lo_sum_pic_label_ref): Likewise.
11646 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11648 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11649 custom LIB_SPEC setup.
11651 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11652 Kito Cheng <kito.cheng@gmail.com>
11654 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11655 * config/riscv/freebsd.h: New.
11657 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11659 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11660 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11663 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11664 Kito Cheng <kito.cheng@gmail.com>
11666 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11667 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11668 * config/nds32/nds32-protos.h (nds32_output_call,
11669 nds32_output_return): Declare.
11670 * config/nds32/nds32.md: Refine all the call and return patterns.
11672 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11675 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11676 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11678 PR rtl-optimization/84872
11679 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11680 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11681 EDGE_CROSSING edge.
11683 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11685 * expr.c (copy_blkmode_to_reg): Revert 254862.
11686 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11688 2018-04-06 Richard Biener <rguenther@suse.de>
11690 PR middle-end/85244
11691 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11692 after seeing a component reference with an adjacent field. Treat
11693 refs to arrays at struct end of external decls similar to
11694 refs to unconstrained commons.
11696 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11699 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11700 look through SAVE_EXPRs with non-side-effects argument. Adjust
11702 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11705 2018-04-06 Richard Biener <rguenther@suse.de>
11707 PR middle-end/85180
11708 * alias.c (find_base_term): New wrapper around find_base_term
11709 unwinding CSELIB_VAL_PTR changes.
11710 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11713 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11715 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11717 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11718 constant definitions.
11719 ("nop"): lr 0,0 -> nopr r0
11720 ("nop_lr0", "nop_lr1"): New insn definitions.
11722 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11724 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11725 NDS32_V3PUSH_AVAILABLE_P macro.
11727 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11728 Chung-Ju Wu <jasonwucj@gmail.com>
11730 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11731 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11732 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11733 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11734 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11735 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11736 * config/nds32/constraints.md: New constraints and checking for hard
11737 float configuration.
11738 * config/nds32/iterators.md: New mode iterator and attribute for hard
11739 float configuration.
11740 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11742 * config/nds32/nds32-fpu.md: New file.
11743 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11744 deal with hard float code generation.
11745 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11747 (abi_type, float_reg_number): New enum type.
11748 * config/nds32/nds32-predicates.c: New predicates for hard float.
11749 * config/nds32/nds32-protos.h: Declare functions for hard float.
11750 * config/nds32/nds32.c: Implementation for hard float configuration.
11751 * config/nds32/nds32.h: Definitions for hard float configuration.
11752 * config/nds32/nds32.md: Include hard float machine description and
11753 modify patterns for hard float configuration.
11754 * config/nds32/nds32.opt: New options for hard float configuration.
11755 * config/nds32/predicates.md: New predicates for hard float
11758 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11760 * common/config/nds32/nds32-common.c
11761 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11763 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11765 PR middle-end/85195
11766 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11767 CONSTRUCTOR_ELT (ctor, ...)->value.
11769 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11772 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11774 2018-04-05 Tom de Vries <tom@codesourcery.com>
11777 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11780 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11781 Kito Cheng <kito.cheng@gmail.com>
11783 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11784 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11785 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11786 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11788 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11789 Kito Cheng <kito.cheng@gmail.com>
11791 * config/nds32/constraints.md (Ufe): New memory constraint.
11792 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11793 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11794 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11796 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11797 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11799 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11801 * config/nds32/nds32.md: Use optimize_size in the condition for
11802 alu-shift instructions.
11804 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11806 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11808 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11810 * config/nds32/nds32.md (negsi2): Refine pattern.
11812 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11813 Chung-Ju Wu <jasonwucj@gmail.com>
11815 * config/nds32/iterators.md (shift_rotate): New code iterator.
11816 (shift): New code attribute.
11817 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11818 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11819 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11820 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11821 bit-wise operations.
11822 (andsi3, *andsi3): Ditto.
11823 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11824 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11825 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11826 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11827 nds32_ior_operand, nds32_xor_operand): New predicates.
11829 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11831 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11832 (addsi3, subsi3): ... this.
11834 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11836 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11838 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11840 * config/nds32/nds32.md: Adjust indention.
11842 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11844 * config/nds32/nds32.md (feature): New attribute.
11846 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11848 * config/nds32/nds32.md (subtype): New attribute.
11850 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11853 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11854 expansion to perform a bitwise AND of the argument followed by a
11855 boolean negation of the result.
11857 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11859 PR rtl-optimization/84878
11860 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11861 the basic block. Assert the use reference is not artificial and that
11862 it has an associated insn.
11864 2018-04-04 Michael Matz <matz@suse.de>
11866 * builtins.c (compute_objsize): Pass correct operand
11867 to array_at_struct_end_p.
11869 2018-04-04 Richard Biener <rguenther@suse.de>
11872 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11873 from contexts for DINFO_LEVEL_TERSE and below.
11875 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11877 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11878 resiter_operand condition.
11879 * config/nds32/nds32.md (*move<mode>): Ditto.
11881 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11882 Monk Chiang <sh.chiang04@gmail.com>
11884 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11886 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11888 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11890 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11891 Kito Cheng <kito.cheng@gmail.com>
11893 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11894 nds32_cond_code_str, output_cond_branch,
11895 output_cond_branch_compare_zero, nds32_expand_cbranch,
11896 nds32_expand_cstore, nds32_expand_movcc,
11897 nds32_output_cbranchsi4_equality_zero,
11898 nds32_output_cbranchsi4_equality_reg,
11899 nds32_output_cbranchsi4_equality_reg_or_const_int,
11900 nds32_output_cbranchsi4_greater_less_zero: New functions.
11901 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11902 nds32_expand_cstore, nds32_expand_movcc,
11903 nds32_output_cbranchsi4_equality_zero,
11904 nds32_output_cbranchsi4_equality_reg,
11905 nds32_output_cbranchsi4_equality_reg_or_const_int,
11906 nds32_output_cbranchsi4_greater_less_zero): Declare.
11907 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11908 nds32_rimm11s_operand): New predicates.
11909 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11910 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11913 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11915 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11916 * config/nds32/nds32.md: Ditto.
11917 * config/nds32/pipelines.md: Ditto.
11919 2018-04-04 Richard Biener <rguenther@suse.de>
11921 PR tree-optimization/85168
11922 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11923 propagating abnormals.
11925 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11927 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11929 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11930 Kito Cheng <kito.cheng@gmail.com>
11932 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11933 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11934 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11935 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11936 * config/nds32/nds32.md (sibcall_internal): New.
11937 (sibcall_register): Remove.
11938 (sibcall_immediate): Remove.
11939 (sibcall_value_internal): New.
11940 (sibcall_value_register): Remove.
11941 (sibcall_value_immediate): Remove.
11942 * config/nds32/predicates.md (nds32_general_register_operand): New.
11943 (nds32_call_address_operand): New.
11945 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11947 PR rtl-optimization/85167
11948 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11949 bb_defs if *split_p, instead preinitialize it to NULL.
11951 PR tree-optimization/85156
11952 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11953 evaluating the argument multiple times.
11955 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11957 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11959 (_mm_cvtpd_ps): Likewise.
11960 (_mm_cvttpd_epi32): Likewise.
11961 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11962 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11963 vector, pixel, and bool following altivec.h include.
11965 2018-04-03 Martin Sebor <msebor@redhat.com>
11967 * doc/extend.texi (Common Function Attributes): Clarify.
11968 (const attribute): Likewise.
11969 (pure attribute): Likewise.
11971 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11974 * config/i386/i386.c (ix86_expand_vector_set): Use
11975 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11977 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11979 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11980 instructions when changing rounding bits to preserve precision bits
11981 in the x87 control word.
11983 2018-04-03 Martin Liska <mliska@suse.cz>
11985 PR tree-optimization/82491
11986 * rtl.h (strip_offset_and_add): Replace += suboffset with
11987 poly_uint64 () + suboffset.
11989 2018-03-29 Martin Liska <mliska@suse.cz>
11990 Martin Jambor <mjambor@suse.cz>
11993 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11994 param_type is not an integral or pointer type.
11996 2018-04-03 Richard Biener <rguenther@suse.de>
11998 * sese.h (recompute_all_dominators): Remove.
12000 2018-04-02 Martin Sebor <msebor@redhat.com>
12002 * doc/invoke.texi (-Wrestrict): Fix typos.
12004 2018-04-02 Jim Wilson <jimw@sifive.com>
12006 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12007 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12008 (<optab>di3, <optab>si3_extend): Likewise.
12009 (<optab>si3_mask, <optab>si3_mask_1): New.
12010 (<optab>di3_mask, <optab>di3_mask_1): New.
12011 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12012 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12013 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12015 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12017 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12020 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12022 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12023 (nds32_canonicalize_comparison): New function.
12025 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12026 Kito Cheng <kito.cheng@gmail.com>
12027 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12029 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12030 * config/nds32/constants.md (unspec_volatile_element): Add
12031 UNSPEC_VOLATILE_RELAX_GROUP.
12032 * config/nds32/nds32-relax-opt.c: New file.
12033 * config/nds32/nds32-predicates.c
12034 (nds32_symbol_load_store_p): New function.
12035 * config/nds32/nds32-protos.h
12036 (nds32_symbol_load_store_p): Declare function.
12037 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12038 * config/nds32/nds32.c
12039 (nds32_register_pass): New function to register pass.
12040 (nds32_register_passes): New function to register passes.
12041 * config/nds32/nds32.md (relax_group): New pattern.
12042 * config/nds32/nds32.opt (mrelax-hint): New option.
12043 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12045 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12047 * config/nds32/t-nds32: Modify files dependency.
12049 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12051 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12052 (PROFILE_HOOK): Define its implementation.
12054 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12056 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12057 type and 32-bit size.
12059 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12061 PR middle-end/85090
12062 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12063 (V_128_256): New mode iterator.
12064 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12065 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12066 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12068 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12069 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12071 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12074 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12075 NaN inputs correctly.
12077 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12080 * config/rs6000/vsx.md (??r): New mode attribute.
12081 (*vsx_mov<mode>_64bit): Use it.
12082 (*vsx_mov<mode>_32bit): Likewise.
12084 2018-03-30 Martin Sebor <msebor@redhat.com>
12086 PR tree-optimization/84818
12087 * builtins.c (check_access): Use warning_n.
12089 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12092 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12094 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12097 2018-03-30 Julia Koval <julia.koval@intel.com>
12100 * x86-tune.def (movx, partial_reg_dependency): Enable for
12103 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12105 PR inline-asm/84985
12106 * lra-constraints.c (process_alt_operands): Move setting
12107 this_alternative_matches below.
12109 2018-03-29 Martin Liska <mliska@suse.cz>
12112 * doc/invoke.texi: Document how LTO works with debug info.
12113 Describe auto-load support of binutils. Mention 'x86-64'
12114 as valid option value of -march option.
12116 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12118 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12121 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12122 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12123 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12126 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12129 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12130 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12131 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12132 for RS6000_BTM_POWERPC64.
12133 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12134 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12135 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12138 (DIVDEU): Likewise.
12140 2018-03-28 Carl Love <cel@us.ibm.com>
12143 2017-09-27 Carl Love <cel@us.ibm.com>
12145 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12146 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12147 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12150 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12152 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12153 instead of __vector bool.
12154 (_mm_max_pu8): Likewise.
12155 (_mm_min_pi16): Likewise.
12157 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12160 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12161 (DIVWEUO): Likewise.
12162 (DIVDEO): Likewise.
12163 (DIVDEUO): Likewise.
12164 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12165 DIVWEUO and DIVDEUO.
12166 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12167 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12168 (div_extend): Likewise.
12169 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12171 (__builtin_divweuo): Likewise.
12172 (__builtin_divdeo): Likewise.
12173 (__builtin_divdeuo): Likewise.
12175 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12178 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12179 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12181 PR tree-optimization/82004
12182 * gimple-match-head.c (optimize_pow_to_exp): New function.
12183 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12184 Don't fold to exp if optimize_pow_to_exp is false.
12186 2018-03-28 Martin Liska <mliska@suse.cz>
12189 * calls.c (initialize_argument_information): Fix trailing space.
12190 * common.opt: Fix typo and provide better explanation for
12191 -fsanitize-coverage option.
12192 * config/i386/i386.opt: Fix typo.
12194 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12195 Martin Liska <mliska@suse.cz>
12198 * gimplify.c (asan_poison_variable): Don't do the check for
12199 gimplify_omp_ctxp here.
12200 (gimplify_decl_expr): Do it here.
12201 (gimplify_target_expr): Likewise.
12203 2018-03-28 Martin Liska <mliska@suse.cz>
12206 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12207 chkp_type_bounds_count if MPX is not enabled.
12209 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12211 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12213 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12216 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12217 function to create the function decl for complex long double
12218 multiply and divide for -mabi=ieeelongdouble.
12219 (init_float128_ieee): Call it.
12221 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12224 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12225 -fcf-protection=branch -mibt.
12226 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12228 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12231 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12232 arm_word_relocations.
12234 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12237 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12238 extern array declarations.
12240 2018-03-27 Richard Biener <rguenther@suse.de>
12242 PR middle-end/84067
12243 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12244 explicit single_use checks.
12246 2018-03-27 Richard Biener <rguenther@suse.de>
12248 PR tree-optimization/85082
12249 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12252 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12254 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12255 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12256 Turn on fasynchronous-unwind-tables and funwind-tables.
12258 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12261 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12262 (*bmi_blsr_<mode>_ccz): Ditto.
12264 2018-03-26 Tom de Vries <tom@codesourcery.com>
12266 PR tree-optimization/85063
12267 * omp-general.c (offloading_function_p): New function. Factor out
12269 * omp-offload.c (pass_omp_target_link::gate): ... here.
12270 * omp-general.h (offloading_function_p): Declare.
12271 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12272 with attribute omp declare target for offloading functions.
12274 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12276 PR tree-optimization/84005
12277 * tree-data-ref.h (get_base_for_alignment): Declare.
12278 * tree-data-ref.c (get_base_for_alignment_1): New function.
12279 (get_base_for_alignment): Likewise.
12280 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12281 get_base_for_alignment to find a suitable base object, instead
12282 of always using drb->base_address.
12284 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12286 PR inline-asm/85022
12287 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12288 known size by default.
12290 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12292 PR inline-asm/85030
12293 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12294 and non BLKmode operands.
12296 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12299 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12300 Clean up attributes.
12302 2018-03-23 Richard Biener <rguenther@suse.de>
12305 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12306 we are going to emit early debug for LTO.
12308 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12310 PR inline-asm/85034
12311 * function.c (match_asm_constraints_1): Don't optimize if input
12312 doesn't satisfy general_operand predicate for output's mode.
12314 PR inline-asm/85022
12315 * alias.c (write_dependence_p): Don't require for x_canonicalized
12316 non-VOIDmode if x has VOIDmode.
12319 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12320 just don't try to optimize it rather than assert it never happens.
12322 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12324 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12325 macro expansions for definition of ST_INTERNAL_<mode> and
12326 LD_INTERNAL_<mode> builtins.
12327 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12329 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12331 (altivec_expand_st_builtin): Likewise.
12332 (altivec_expand_builtin): Remove calls to deleted functions.
12333 (rs6000_address_for_altivec): Delete this function.
12334 * config/rs6000/vector.md: Remove expands for
12335 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12337 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12340 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12341 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12342 re-computing once computed.
12343 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12344 (arm_init_machine_status): Initialize
12345 machine->static_chain_stack_bytes.
12347 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12350 * doc/extend.texi: Add four new prototypes for vec_ld.
12351 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12352 definitions for more logical presentation.
12353 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12354 entries for V1TI variants of __builtin_altivec_ld builtin.
12355 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12356 handling of V1TI variant of LVX icode pattern.
12357 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12358 (rs6000_gimple_fold_builtin): Likewise.
12359 (altivec_init_builtins): Add code to define
12360 __builtin_altivec_lvx_v1ti function.
12362 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12364 PR inline-asm/84941
12365 * function.c (match_asm_constraints_1): Don't do the optimization
12366 if input isn't a REG, SUBREG, MEM or constant.
12368 2018-03-22 Tom de Vries <tom@codesourcery.com>
12370 PR tree-optimization/84956
12371 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12372 bb_has_abnormal_pred.
12374 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12377 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12378 DECL_INITIAL (decl) to decl at the end.
12379 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12380 adjust the comment.
12382 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12384 * doc/extend.texi (__builtin_tgmath): Document when complex
12385 integer types are treated as _Complex _Float64.
12387 2018-03-21 Tom de Vries <tom@codesourcery.com>
12389 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12391 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12393 PR tree-optimization/84960
12394 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12395 if it is ENTRY block, move them into single succ of ENTRY in that case.
12397 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12399 PR tree-optimization/84811
12400 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12401 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12402 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12403 (known_subrange_p): Update accordingly. Cast each value involved
12404 in the size comparison, rather than casting the result of the
12407 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12409 PR tree-optimization/84982
12410 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12411 by flipping the least significant bit rather than all bits from
12412 bitpos to bitpos + bitsize - 1.
12414 2018-03-21 Nathan Sidwell <nathan@acm.org>
12416 * doc/extend.texi (Deprecated Features): Remove mention of
12417 long-deleted deprecations.
12419 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12422 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12423 * configure: Regenerate.
12425 2018-03-21 Tom de Vries <tom@codesourcery.com>
12427 PR tree-optimization/83126
12428 * tree-parloops.c (num_phis): New function.
12429 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12431 2018-03-21 Nathan Sidwell <nathan@acm.org>
12433 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12434 mention anon-struct/union members and trailing attributes.
12436 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12438 PR tree-optimization/84969
12439 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12440 builtin memset partitions if they set different rhs values.
12442 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12444 PR rtl-optimization/84989
12445 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12446 VEC_DUPLICATE with scalar result mode.
12448 2018-03-21 Martin Liska <mliska@suse.cz>
12451 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12452 not intended return statement.
12454 2018-03-21 Martin Liska <mliska@suse.cz>
12457 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12458 (chkp_find_bound_slots_1): Limit number of iterations.
12460 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12463 * Minor grammar fixes for x86 options.
12465 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12468 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12469 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12471 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12474 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12475 (altivec_lvx_<mode>_1op): Likewise.
12476 (altivec_stvx_<mode>_2op): Likewise.
12477 (altivec_stvx_<mode>_1op): Likewise.
12478 (altivec_lvx_<VM2:mode>): New define_expand.
12479 (altivec_stvx_<VM2:mode>): Likewise.
12480 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12481 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12482 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12483 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12484 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12485 (rs6000_gen_lvx): Likewise.
12486 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12487 (altivec_expand_stv_builtin): Likewise.
12488 (altivec_expand_builtin): Likewise.
12489 * config/rs6000/vector.md: Likewise.
12491 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12494 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12497 2018-03-20 Richard Biener <rguenther@suse.de>
12500 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12501 sign-conversions as zero, fall back to standard scalar_stmt
12504 2018-03-20 Martin Liska <mliska@suse.cz>
12507 * predict.c (rebuild_frequencies): Handle case when we have
12508 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12510 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12513 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12514 flag_section_anchors.
12515 * varasm.c (use_blocks_for_decl_p): Remove hack for
12516 dw2_force_const_mem.
12519 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12521 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12522 be created, use lowpart_subreg of operands[0] rather than operands[0]
12524 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12525 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12526 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12527 and n constraint instead of aarch64_shift_imm_di and Usd.
12528 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12529 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12531 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12534 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12535 to favor GPR over NEON registers.
12536 (<shift>di3_neon): Likewise.
12538 2018-03-20 Tom de Vries <tom@codesourcery.com>
12541 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12542 (nvptx_process_pars): Emit bar.sync asap and alap.
12544 2018-03-20 Tom de Vries <tom@codesourcery.com>
12547 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12548 seen_label if seen_label is already set.
12550 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12553 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12554 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12555 Use 1U instead of 1. Formatting fixes.
12558 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12559 instead of TREE_TYPE (s1) for the return value.
12561 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12563 PR tree-optimization/84946
12564 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12565 bitsize + bitsize in poly_uint64 rather than poly_int64.
12568 * dwarf2asm.c: Include fold-const.c.
12569 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12570 of decl rather than decl itself.
12572 PR rtl-optimization/84643
12573 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12575 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12578 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12579 calling assemble_variable.
12581 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12584 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12585 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12587 2018-03-19 Jim Wilson <jimw@sifive.com>
12590 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12591 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12592 (riscv_first_stack_step): Likewise.
12593 (riscv_option_override): Use STACK_BOUNDARY instead of
12594 MIN_STACK_BOUNDARY.
12595 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12596 MIN_STACK_BOUNDARY.
12597 (BIGGEST_ALIGNMENT): Set to 128.
12598 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12599 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12602 2018-03-19 Richard Biener <rguenther@suse.de>
12604 PR tree-optimization/84933
12605 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12606 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12608 2018-03-19 Richard Biener <rguenther@suse.de>
12610 PR tree-optimization/84859
12611 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12612 (cond_if_else_store_replacement): Perform sinking operation on
12613 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12614 Generalize what a BB with a single eligible store is.
12616 2018-03-19 Richard Biener <rguenther@suse.de>
12618 PR tree-optimization/84929
12619 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12620 chrec_is_positive against non-chrec arg.
12622 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12625 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12627 2018-03-18 Martin Liska <mliska@suse.cz>
12629 PR rtl-optimization/84635
12630 * regrename.c (build_def_use): Use matches_mode only when
12633 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12635 PR tree-optimization/84913
12636 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12637 vectorize chains of COND_EXPRs.
12639 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12641 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12643 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12645 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12647 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12649 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12651 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12652 Kito Cheng <kito.cheng@gmail.com>
12654 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12655 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12656 (nds32_adjust_reg_alloc_order): New function.
12657 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12659 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12661 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12662 nds32_print_operand, nds32_print_operand_address): Use
12663 HOST_WIDE_INT_PRINT_DEC instead.
12665 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12667 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12669 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12672 * config/i386/i386.c (initial_ix86_tune_features,
12673 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12674 unsigned long long.
12675 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12676 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12677 rather than 1u << ix86_tune. Formatting fix.
12678 (ix86_option_override_internal): Change ix86_arch_mask from
12679 unsigned int to unsigned HOST_WIDE_INT, initialize to
12680 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12681 (ix86_function_specific_restore): Likewise.
12683 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12686 * postreload.c (reload_combine_recognize_pattern): Perform
12687 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12688 truncate_int_for_mode the result for the destination's mode.
12691 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12692 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12694 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12697 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12700 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12701 regno_allocno_class_array and sorted_pseudos.
12702 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12703 insns where regno is used.
12705 2018-03-16 Martin Liska <mliska@suse.cz>
12708 * multiple_target.c (create_dispatcher_calls): Redirect
12709 reference in the symbol table.
12711 2018-03-16 Martin Liska <mliska@suse.cz>
12714 * multiple_target.c (create_dispatcher_calls): Redirect also
12717 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12721 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12722 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12723 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12725 2018-03-16 Julia Koval <julia.koval@intel.com>
12727 * doc/invoke.texi (Skylake Server): Add CLWB.
12728 Cannonlake): Remove CLWB.
12730 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12732 PR tree-optimization/84841
12733 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12735 (FLOAT_ONE_CONST_TYPE): Define.
12736 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12737 (sort_by_operand_rank): Put entries with higher constant_type last
12738 rather than first to match comments.
12740 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12742 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12745 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12748 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12749 check and use address of target always.
12751 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12754 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12755 (indirect_thunk_bnd_needed): Likewise.
12756 (indirect_thunks_used): Likewise.
12757 (indirect_thunks_bnd_used): Likewise.
12758 (indirect_return_needed): New.
12759 (indirect_return_bnd_needed): Likewise.
12760 (output_indirect_thunk_function): Add a bool argument for
12762 (output_indirect_thunk_function): Don't generate alias for
12763 function return thunk.
12764 (ix86_code_end): Call output_indirect_thunk_function to generate
12765 function return thunks.
12766 (ix86_output_function_return): Set indirect_return_bnd_needed
12767 and indirect_return_needed instead of indirect_thunk_bnd_needed
12768 and indirect_thunk_needed.
12770 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12772 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12773 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12774 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12776 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12777 Paul Hua <paul.hua.gm@gmail.com>
12780 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12782 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12784 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12785 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12786 resp. SFmode cases.
12788 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12791 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12792 instead of GET_MODE_SIZE when comparing Units.
12794 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12797 * varasm.c (hash_section): Return an unchangeble hash value
12798 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12799 Return !aarch64_can_use_per_function_literal_pools_p ().
12801 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12804 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12805 rather than address of cmode as last argument to prepare_cmp_insn.
12807 2018-03-15 Julia Koval <julia.koval@intel.com>
12809 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12810 F_AVX512VNNI, F_AVX512BITALG): New.
12812 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12815 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12816 insn for floating-point loads and stores.
12818 2018-03-14 Carl Love <cel@us.ibm.com>
12820 * config/rs6000/rs6000-c.c: Add macro definitions for
12821 ALTIVEC_BUILTIN_VEC_PERMXOR.
12822 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12823 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12824 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12825 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12827 * config/doc/extend.texi: Add prototypes for vec_permxor.
12829 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12832 * diagnostic-show-locus.c (class layout_point): Convert m_line
12833 from int to linenum_type.
12834 (line_span::comparator): Use linenum "compare" function when
12835 comparing line numbers.
12836 (test_line_span): New function.
12837 (layout_range::contains_point): Convert param "row" from int to
12839 (layout_range::intersects_line_p): Likewise.
12840 (layout::will_show_line_p): Likewise.
12841 (layout::print_source_line): Likewise.
12842 (layout::should_print_annotation_line_p): Likewise.
12843 (layout::print_annotation_line): Likewise.
12844 (layout::print_leading_fixits): Likewise.
12845 (layout::annotation_line_showed_range_p): Likewise.
12846 (struct line_corrections): Likewise for field m_row.
12847 (line_corrections::line_corrections): Likewise for param "row".
12848 (layout::print_trailing_fixits): Likewise.
12849 (layout::get_state_at_point): Likewise.
12850 (layout::get_x_bound_for_row): Likewise.
12851 (layout::print_line): Likewise.
12852 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12853 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12854 * input.c (selftest::test_linenum_comparisons): New function.
12855 (selftest::input_c_tests): Call it.
12856 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12857 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12858 * selftest.h (ASSERT_GT): New macro.
12859 (ASSERT_GT_AT): New macro.
12860 (ASSERT_LT): New macro.
12861 (ASSERT_LT_AT): New macro.
12863 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12865 PR rtl-optimization/84780
12866 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12868 2018-03-14 Martin Liska <mliska@suse.cz>
12870 * tree.c (record_node_allocation_statistics): Use
12871 get_stats_node_kind.
12872 (get_stats_node_kind): New function extracted from
12873 record_node_allocation_statistics.
12874 (free_node): Use get_stats_node_kind.
12876 2018-03-14 Richard Biener <rguenther@suse.de>
12878 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12879 that the value-set of ANTIC_IN doesn't grow.
12882 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12884 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12885 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12887 2018-03-14 Julia Koval <julia.koval@intel.com>
12889 * config.gcc (icelake-client, icelake-server): New.
12891 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12892 (initial_ix86_arch_features): Ditto.
12893 (PTA_SKYLAKE): Add SGX.
12894 (PTA_ICELAKE): Remove.
12895 (PTA_ICELAKE_CLIENT): New.
12896 (PTA_ICELAKE_SERVER): New.
12897 (ix86_option_override_internal): Split up icelake on icelake client and
12899 (get_builtin_code_for_version): Ditto.
12900 (fold_builtin_cpu): Ditto.
12901 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12902 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12903 * config/i386/i386.h (processor_type): Ditto.
12904 * doc/invoke.texi: Ditto.
12906 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12909 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12910 INTEGER_CST offset, add it together with bitpos / 8 and
12911 sign extend based on POINTER_SIZE.
12915 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12918 * config/i386/constraints.md (Yc): New register constraint.
12919 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12920 Use Yc constraint for alternative 2 of operand 0. Remove
12921 preferred_for_speed attribute.
12923 2018-03-14 Richard Biener <rguenther@suse.de>
12925 PR tree-optimization/84830
12926 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12927 with the old one to avoid oscillations.
12929 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12932 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12934 (assign_by_spills): Return a flag of reload assignment failure.
12935 Do not process the reload assignment failures. Do not spill other
12936 reload pseudos if they has the same reg class. Update n if
12938 (lra_assign): Add a return arg. Set up from the result of
12939 assign_by_spills call.
12940 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12941 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12942 usage_insns if it is not NULL.
12943 (spill_hard_reg_in_range): New function.
12944 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12945 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12946 function prototypes.
12947 (lra_assign): Change prototype.
12948 * lra.c (lra): Add code to deal with fails by splitting hard reg
12951 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12953 * config/riscv/riscv.opt (mrelax): New option.
12954 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12955 "norelax" when riscv_mrelax is disabled.
12956 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12958 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12961 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12962 reassociation for int modes.
12964 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12966 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12967 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12969 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12970 * config/aarch64/aarch64-sve.md
12971 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12972 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12973 (*extend<mode><Vwide>2): Rename to...
12974 (aarch64_sve_extend<mode><Vwide>2): ...this.
12975 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12976 renaming the old pattern to...
12977 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12979 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12980 define_expand, renaming the old pattern to...
12981 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12982 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12983 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12984 account when deciding which SVE instruction the optab should use.
12985 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12987 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12989 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12990 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12991 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12992 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12993 (tlsdesc_small_<mode>): Turn a define_expand and use
12994 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12995 (tlsdesc_small_advsimd_<mode>): ...this.
12996 (tlsdesc_small_sve_<mode>): New pattern.
12998 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13000 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13001 (UNSPEC_UMUL_HIGHPART): New constants.
13002 (MUL_HIGHPART): New int iteraor.
13003 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13004 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13006 (*<su>mul<mode>3_highpart): New define_insn.
13008 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13011 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13014 2018-03-13 Martin Liska <mliska@suse.cz>
13017 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13019 (sem_item_optimizer::~sem_item_optimizer): Release it.
13020 (sem_item_optimizer::merge_classes): Register variable aliases.
13021 (sem_item_optimizer::fixup_pt_set): New function.
13022 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13023 * ipa-icf.h: Declare new variables and functions.
13025 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13027 PR middle-end/84834
13028 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13029 integer_pow2p@2 and test integer_pow2p in condition.
13030 (A < 0 ? C : 0): Similarly for @1.
13032 PR middle-end/84831
13033 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13034 characters starting at p contain '\0' character, don't look beyond
13038 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13039 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13042 * reg-stack.c (change_stack): Change update_end var from int to
13043 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13044 also call set_block_for_insn on the newly added insns and rescan.
13047 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13048 on the last operand.
13051 * tree.c (stabilize_reference_1): Return save_expr (e) for
13052 STATEMENT_LIST even if it doesn't have side-effects.
13054 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13056 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13058 2018-03-12 Renlin Li <renlin.li@arm.com>
13060 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13061 aarch64_output_scalar_simd_mov_immediate.
13063 2018-03-12 Martin Sebor <msebor@redhat.com>
13065 PR tree-optimization/83456
13066 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13067 for perfectly overlapping calls to memcpy.
13068 (gimple_fold_builtin_memory_chk): Same.
13069 (gimple_fold_builtin_strcpy): Handle no-warning.
13070 (gimple_fold_builtin_stxcpy_chk): Same.
13071 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13073 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13075 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13076 parameter. Use it for SFmode.
13077 (rs6000_function_arg_advance_1): Adjust.
13078 (rs6000_function_arg): Adjust.
13079 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13081 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13083 PR rtl-optimization/84169
13084 PR rtl-optimization/84780
13085 * combine.c (can_combine_p): Check for a 2-insn combination whether
13086 the destination register is used between the two insns, too.
13088 2018-03-12 Richard Biener <rguenther@suse.de>
13090 PR tree-optimization/84803
13091 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13092 for refs DR analysis didn't process.
13094 2018-03-12 Richard Biener <rguenther@suse.de>
13096 PR tree-optimization/84777
13097 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13098 force-vectorize loops ignore whether we are optimizing for size.
13100 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13102 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13103 (TARGET_MD_ASM_ADJUST): Define.
13105 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13106 Kito Cheng <kito.cheng@gmail.com>
13107 Chung-Ju Wu <jasonwucj@gmail.com>
13109 * config/nds32/nds32.c (nds32_compute_stack_frame,
13110 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13111 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13112 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13113 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13114 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13115 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13116 * config/nds32/nds32.md (prologue, epilogue): Use macro
13117 NDS32_V3PUSH_AVAILABLE_P to do checking.
13119 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13122 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13123 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13124 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13125 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13126 addition of most attributes on !orig_type_die or the attribute not
13127 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13129 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13130 Chung-Ju Wu <jasonwucj@gmail.com>
13132 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13133 __NDS32_VH__ macro.
13134 * config/nds32/nds32.opt (mvh): New option.
13136 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13137 Chung-Ju Wu <jasonwucj@gmail.com>
13139 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13141 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13142 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13145 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13146 Chung-Ju Wu <jasonwucj@gmail.com>
13148 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13150 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13151 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13153 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13154 Kito Cheng <kito.cheng@gmail.com>
13155 Chung-Ju Wu <jasonwucj@gmail.com>
13157 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13158 UNSPEC_FFMISM and UNSPEC_FLMISM.
13159 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13160 for ffb, ffmism and flmism.
13161 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13162 (unspec_ffmism): Ditto.
13163 (unspec_flmism): Ditto.
13164 (nds32_expand_builtin_impl): Check if string extension is available.
13165 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13166 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13168 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13171 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13174 * lra-assigns.c (assign_by_spills): Return a flag of reload
13175 assignment failure. Do not process the reload assignment
13176 failures. Do not spill other reload pseudos if they has the same
13178 (lra_assign): Add a return arg. Set up from the result of
13179 assign_by_spills call.
13180 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13181 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13182 usage_insns if it is not NULL.
13183 (spill_hard_reg_in_range): New function.
13184 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13185 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13186 function prototypes.
13187 (lra_assign): Change prototype.
13188 * lra.c (lra): Add code to deal with fails by splitting hard reg
13191 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13194 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13196 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13199 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13200 (dw_val_node): Add val_symbolic_view.
13201 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13202 (symview_upper_bound): New.
13203 (new_line_info_table): Initialize symviews_since_reset.
13204 (dwarf2out_source_line): Count symviews_since_reset and set
13205 symview_upper_bound.
13206 (dw_val_equal_p): Handle symview.
13207 (add_AT_symview): New.
13208 (print_dw_val): Handle symview.
13209 (attr_checksum, attr_checksum_ordered): Likewise.
13210 (same_dw_val_p, size_of_die): Likewise.
13211 (value_format, output_die): Likewise.
13212 (add_high_low_attributes): Use add_AT_symview for entry_view.
13213 (dwarf2out_finish): Reset symview_upper_bound, clear
13216 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13219 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13220 Add strict argument and use it.
13221 (rs6000_split_multireg_move): Update for new strict argument.
13222 (mem_operand_gpr): Disallow all non-offsettable addresses.
13223 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13225 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13228 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13229 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13230 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13233 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13234 decl, use remap_type if we want to use the type.
13236 2018-03-09 Martin Sebor <msebor@redhat.com>
13238 PR tree-optimization/84526
13239 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13241 (builtin_access::generic_overlap): Be prepared to handle non-array
13244 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13246 PR rtl-optimization/84682
13247 * lra-constraints.c (process_address_1): Check is_address flag
13248 for address constraints.
13249 (process_alt_operands): Likewise.
13250 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13251 preprocess_constraints.
13252 * recog.h (preprocess_constraints): Add oploc parameter.
13254 * recog.c (preprocess_constraints): Test address_operand for
13255 CT_ADDRESS constraints.
13257 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13260 * lra-assigns.c (assign_by_spills): Return a flag of reload
13261 assignment failure. Do not process the reload assignment
13262 failures. Do not spill other reload pseudos if they has the same
13264 (lra_assign): Add a return arg. Set up from the result of
13265 assign_by_spills call.
13266 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13267 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13268 usage_insns if it is not NULL.
13269 (spill_hard_reg_in_range): New function.
13270 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13271 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13272 function prototypes.
13273 (lra_assign): Change prototype.
13274 * lra.c (lra): Add code to deal with fails by splitting hard reg
13277 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13280 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13281 Accept complain bool parameter. Only emit errors if it is true.
13282 (arm_parse_cpu_option_name): Likewise.
13283 (arm_target_thumb_only): Adjust callers of the above.
13284 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13285 prototype to take a default true bool parameter.
13286 (arm_parse_arch_option_name): Likewise.
13288 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13289 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13293 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13294 * configure: Regenerate.
13295 * configure.ac ("linker --version-script option"): New.
13296 ("linker soname option"): New.
13298 2018-03-09 Richard Biener <rguenther@suse.de>
13300 PR tree-optimization/84775
13301 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13302 immediate uses of predicate stmts and mark them modified.
13305 PR tree-optimization/84178
13306 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13308 (version_loop_for_if_conversion): Delay update_ssa call.
13309 (tree_if_conversion): Delay update_ssa until after predicate
13312 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13315 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13316 when the function accesses prior frames.
13318 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13321 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13322 gen_llsym, otherwise call maybe_gen_llsym.
13324 PR inline-asm/84742
13325 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13326 has ',' character inside of it.
13328 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13331 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13332 as clobbering CC_REGNUM.
13334 2018-03-08 Richard Biener <rguenther@suse.de>
13336 PR middle-end/84552
13337 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13338 (follow_copies_to_constant): Do not follow SSA names registered
13341 2018-03-08 Richard Biener <rguenther@suse.de>
13343 PR tree-optimization/84178
13344 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13346 (version_loop_for_if_conversion): Delay update_ssa call.
13347 (tree_if_conversion): Delay update_ssa until after predicate
13350 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13352 PR tree-optimization/84178
13353 * tree-if-conv.c (release_bb_predicate): Remove the
13354 the assertion that the stmts have NULL use_ops.
13355 Discard the statements, asserting that they haven't
13356 yet been added to a BB.
13358 2018-03-08 Richard Biener <rguenther@suse.de>
13360 PR tree-optimization/84746
13361 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13362 (phi_translate): Pass in destination ANTIC_OUT set.
13363 (phi_translate_1): Likewise. For a simplified result lookup
13364 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13365 (phi_translate_set): Adjust.
13366 (do_pre_regular_insertion): Likewise.
13367 (do_pre_partial_partial_insertion): Likewise.
13369 2018-03-08 Martin Liska <mliska@suse.cz>
13371 PR gcov-profile/84735
13372 * doc/gcov.texi: Document usage of profile files.
13373 * gcov-io.h: Document changes in the format.
13375 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13379 * dwarf2out.c (struct dw_line_info_table): Update comments for
13381 (FORCE_RESET_NEXT_VIEW): New.
13382 (FORCE_RESETTING_VIEW_P): New.
13383 (RESETTING_VIEW_P): Check for -1 too.
13384 (ZERO_VIEW_P): Likewise.
13385 (new_line_info_table): Force-reset next view.
13386 (dwarf2out_begin_function): Likewise.
13387 (dwarf2out_source_line): Simplify zero_view_p initialization.
13388 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13389 view directly. Omit view when omitting .loc at line 0.
13391 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13393 PR tree-optimization/84740
13394 * tree-switch-conversion.c (process_switch): Call build_constructors
13395 only if info.phi_count is non-zero.
13397 PR tree-optimization/84739
13398 * tree-tailcall.c (find_tail_calls): Check call arguments against
13399 DECL_ARGUMENTS (current_function_decl) rather than
13400 DECL_ARGUMENTS (func) when checking for tail recursion.
13402 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13404 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13405 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13406 Volker Reichelt's entry and add entries for people that perform
13407 GCC fuzzy testing and report numerous bugs.
13409 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13412 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13413 readonly data in sdata, if that is disabled.
13414 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13415 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13416 -mreadonly-in-sdata option.
13418 2018-03-07 Martin Sebor <msebor@redhat.com>
13420 PR tree-optimization/84468
13421 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13422 basic block when looking for nul assignment.
13424 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13427 * except.h (output_function_exception_table): Adjust prototype.
13428 * except.c (output_function_exception_table): Remove FNNAME parameter
13429 and add SECTION parameter. Ouput one part of the table at a time.
13430 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13431 the first part of the exception table and emit unwind directives.
13432 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13433 (i386_pe_seh_cold_init): Likewise.
13434 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13435 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13436 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13437 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13438 * config/i386/winnt.c: Include except.h.
13439 (struct seh_frame_state): Add reg_offset, after_prologue and
13440 in_cold_section fields.
13441 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13442 (i386_pe_seh_cold_init): New function.
13443 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13444 to seh->in_cold_section.
13445 (seh_emit_push): Record the offset of the push.
13446 (seh_emit_save): Record the offet of the save.
13447 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13448 Test seh->after_prologue to disregard the epilogue.
13449 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13450 (i386_pe_end_cold_function): New function.
13452 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13455 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13456 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13459 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13461 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13462 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13464 PR middle-end/84723
13465 * multiple_target.c: Include tree-inline.h and intl.h.
13466 (expand_target_clones): Diagnose and fail if node->definition and
13467 !tree_versionable_function_p (node->decl).
13469 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13471 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13473 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13474 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13475 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13477 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13480 * combine.c (try_combine): Use reg_or_subregno instead of handling
13481 just paradoxical SUBREGs and REGs.
13483 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13485 * config/arc/arc.c (arc_finalize_pic): Remove function.
13486 (arc_must_save_register): We use single base PIC register, remove
13487 checks to save/restore the PIC register.
13488 (arc_expand_prologue): Likewise.
13489 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13491 (arc_verify_short): Likewise.
13492 (arc_attr_type): Likewise.
13493 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13494 (walk_stores): Likewise.
13495 (arc_address_cost): Make it static.
13496 (arc_verify_short): Likewise.
13497 (branch_dest): Likewise.
13498 (arc_attr_type): Likewise.
13499 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13500 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13501 (arc_final_prescan_insn): Remove inserting the nops due to
13502 hardware hazards. It is done in reorg step.
13503 (insn_length_variant_t): Remove.
13504 (insn_length_parameters_t): Likewise.
13505 (arc_insn_length_parameters): Likewise.
13506 (arc_get_insn_variants): Likewise.
13507 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13509 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13511 PR inline-asm/84683
13512 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13515 PR tree-optimization/84687
13516 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13518 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13520 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13522 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13523 Rename to ppc_speculation_barrier.
13524 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13525 __builtin_ppc_speculation_barrier.
13527 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13530 * combine.c (combine_simplify_rtx): Don't try to simplify if
13531 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13534 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13536 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13537 to 32 bytes when compiling for POWER9.
13539 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13542 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13543 regparm >= 3 with no arg reg available also for calls with
13544 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13547 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13549 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13551 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13554 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13556 2018-03-05 Richard Biener <rguenther@suse.de>
13558 PR tree-optimization/84486
13559 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13560 When inserting a __builtin_assume_aligned call set the LHS
13561 SSA name alignment info accordingly.
13563 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13565 PR tree-optimization/84114
13566 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13567 Avoid reassociation of FLOAT_MODE addition.
13569 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13571 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13572 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13573 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13574 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13575 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13576 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13577 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13579 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13580 __builtin_ia32_wbinvd): New builtins.
13581 (SPECIAL_ARGS2): New.
13582 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13583 (SPECIAL_ARGS2): New.
13584 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13585 (ix86_valid_target_attribute_inner_p): Ditto.
13586 (ix86_init_mmx_sse_builtins): Add special_args2.
13587 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13588 TARGET_WBNOINVD_P): New.
13589 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13590 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13591 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13592 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13593 * config/i386/pconfigintrin.h: New file.
13594 * config/i386/wbnoinvdintrin.h: Ditto.
13595 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13597 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13599 2018-03-05 Richard Biener <rguenther@suse.de>
13601 PR tree-optimization/84670
13602 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13604 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13605 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13606 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13607 doesn't grow if all successors (recursively) were visited at least
13610 2018-03-05 Richard Biener <rguenther@suse.de>
13612 PR tree-optimization/84650
13613 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13614 if executed in the loop pipeline.
13616 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13618 * doc/configfiles.texi (Configuration Files): Move info about
13619 conditionalizing $target-protos.h to...
13620 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13621 differs from $target-protos.h.
13623 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13624 Chung-Ju Wu <jasonwucj@gmail.com>
13626 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13627 * config/nds32/nds32-multiple.md (setmemsi): Define.
13628 * config/nds32/nds32-memory-manipulation.c
13629 (nds32_gen_dup_4_byte_to_word_value): New.
13630 (emit_setmem_word_loop): New.
13631 (emit_setmem_byte_loop): New.
13632 (nds32_expand_setmem_loop): New.
13633 (nds32_expand_setmem_loop_v3m): New.
13634 (nds32_expand_setmem_unroll): New.
13635 (nds32_expand_setmem): New.
13637 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13638 Chung-Ju Wu <jasonwucj@gmail.com>
13640 * config/nds32/nds32-memory-manipulation.c
13641 (nds32_emit_load_store): New.
13642 (nds32_emit_post_inc_load_store): New.
13643 (nds32_emit_mem_move): New.
13644 (nds32_emit_mem_move_block): New.
13645 (nds32_expand_movmemsi_loop_unknown_size): New.
13646 (nds32_expand_movmemsi_loop_known_size): New.
13647 (nds32_expand_movmemsi_loop): New.
13648 (nds32_expand_movmemsi_unroll): New.
13649 (nds32_expand_movmemqi): Rename ...
13650 (nds32_expand_movmemsi): ... to this.
13651 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13652 (movmemsi): ... to this.
13653 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13654 (nds32_expand_movmemsi): ... to this.
13656 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13657 Monk Chiang <sh.chiang04@gmail.com>
13658 Chung-Ju Wu <jasonwucj@gmail.com>
13660 * config/nds32/nds32-protos.h
13661 (nds32_expand_load_multiple): New arguments.
13662 (nds32_expand_store_multiple): Ditto.
13663 (nds32_valid_multiple_load_store): Rename ...
13664 (nds32_valid_multiple_load_store_p): ... to this.
13665 * config/nds32/nds32-memory-manipulation.c
13666 (nds32_expand_load_multiple): Refine implementation.
13667 (nds32_expand_store_multiple): Ditto.
13668 * config/nds32/nds32-multiple.md
13669 (load_multiple): Update nds32_expand_load_multiple interface.
13670 (store_multiple): Update nds32_expand_store_multiple interface.
13671 * config/nds32/nds32-predicates.c
13672 (nds32_valid_multiple_load_store): Rename ...
13673 (nds32_valid_multiple_load_store_p): ... to this and refine
13675 * config/nds32/predicates.md
13676 (nds32_load_multiple_and_update_address_operation): New predicate.
13677 (nds32_store_multiple_and_update_address_operation): New predicate.
13679 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13680 Chung-Ju Wu <jasonwucj@gmail.com>
13682 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13683 (combo): New attribute.
13684 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13686 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13688 * config/nds32/nds32.opt: Change -mcmodel= default value.
13690 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13691 Monk Chiang <sh.chiang04@gmail.com>
13692 Chung-Ju Wu <jasonwucj@gmail.com>
13694 * config/nds32/constants.md (unspec_element): New enum.
13695 * config/nds32/constraints.md (Umw): New constraint.
13696 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13697 * config/nds32/nds32-intrinsic.md: Likewise.
13698 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13699 (nds32_valid_smw_lwm_base_p): New.
13700 (nds32_output_smw_single_word): New.
13701 (nds32_output_lmw_single_word): New.
13702 (nds32_expand_unaligned_load): New.
13703 (nds32_expand_unaligned_store): New.
13704 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13705 (nds32_output_smw_single_word): Declare.
13706 (nds32_output_lmw_single_word): Declare.
13707 (nds32_expand_unaligned_load): Declare.
13708 (nds32_expand_unaligned_store): Declare.
13709 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13710 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13711 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13712 NDS32_BUILTIN_UASTORE_DW.
13713 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13716 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13717 Kito Cheng <kito.cheng@gmail.com>
13718 Chung-Ju Wu <jasonwucj@gmail.com>
13720 * config/nds32/nds32-intrinsic.c
13721 (nds32_expand_builtin_null_ftype_reg): Delete.
13722 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13723 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13724 (nds32_read_argument): New.
13725 (nds32_legitimize_target): Ditto.
13726 (nds32_legitimize_argument): Ditto.
13727 (nds32_check_constant_argument): Ditto.
13728 (nds32_expand_unop_builtin): Ditto.
13729 (nds32_expand_unopimm_builtin): Ditto.
13730 (nds32_expand_binop_builtin): Ditto.
13731 (nds32_builtin_decl_impl): Ditto.
13732 (builtin_description): Ditto.
13733 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13734 (nds32_init_builtins_impl): Ditto.
13735 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13736 (nds32_builtin_decl): New.
13737 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13738 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13740 2018-03-02 Jeff Law <law@redhat.com>
13742 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13743 (redundant_insn, fill_simple_delay_slots): Likewise.
13744 (fill_slots_from_thread): Likewise.
13745 * resource.c (mark_referenced_resources): Likewise.
13746 (mark_set_resources, find_dead_or_set_registers): Likewise.
13748 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13750 * substring-locations.h (format_warning_va): Formatting fix for
13751 ATTRIBUTE_GCC_DIAG.
13752 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13754 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13755 * substring-locations.c: Include intl.h.
13756 (format_warning_va): Turned into small wrapper around
13757 format_warning_n_va, renamed to ...
13758 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13759 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13761 (format_warning_at_substring_n): New function.
13762 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13763 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13764 format_warning_at_substring with just a shorter name instead of
13765 const function pointer.
13766 (fmtwarn_n): New function.
13767 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13768 appropriate, get rid of all the fmtstr temporaries, move conditionals
13769 with G_() wrapped string literals directly into fmtwarn arguments,
13770 cast dir.len to (int), formatting fixes.
13772 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13774 * doc/invoke.texi: Remove "Cilk Plus" references.
13776 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13777 Richard Biener <rguenther@suse.de>
13780 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13781 for error or warning attributes if CALL_FROM_THUNK_P is set.
13784 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13787 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13788 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13791 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13792 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13794 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13795 instead of -1U in last predictors element's probability member.
13797 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13800 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13801 arguments if they are comparable.
13803 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13805 PR tree-optimization/84634
13806 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13807 masks and masked_loop_p with a single loop_masks, making sure it's
13808 null for bb vectorization.
13810 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13812 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13813 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13814 loop->force_vectorize to check whether there is no alias.
13816 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13819 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13821 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13823 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13824 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13825 instead of a loop around prev_real_insn.
13826 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13829 PR inline-asm/84625
13830 * config/i386/i386.c (ix86_print_operand): Use conditional
13831 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13834 2018-03-02 Richard Biener <rguenther@suse.de>
13836 PR tree-optimization/84427
13837 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13838 (bitmap_set_subtract_values): Rewrite to handle multiple
13841 (prune_clobbered_mems): Likewise.
13842 (phi_translate): Take edge instead of pred/phiblock.
13843 (phi_translate_1): Likewise.
13844 (phi_translate_set): Likewise. Insert all translated
13845 exprs for a value into the set, keeping possibly multiple
13846 expressions per value.
13847 (compute_antic_aux): Adjust for phi_translate changes.
13848 When intersecting union the expressions and prune those
13849 not in the final value set, keeping possibly multiple
13850 expressions per value. Do not use value-insertion
13851 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13852 all expressions. Add verification that the value-sets
13853 only shrink during iteration.
13854 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13855 (do_pre_regular_insertion): Likewise.
13856 (do_pre_partial_partial_insertion): Likewise.
13858 2018-03-02 Richard Biener <rguenther@suse.de>
13861 * config/darwin.c (saved_debug_info_level): New static global.
13862 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13863 (darwin_asm_lto_end): Restore debug info generation settings.
13865 2018-03-01 Martin Liska <mliska@suse.cz>
13868 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13869 volatile arguments.
13871 2018-03-01 Richard Biener <rguenther@suse.de>
13874 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13875 type annotation with LTO when debug was disabled at compile-time.
13877 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13879 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13881 (mips_final_postscan_insn): Likewise.
13883 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13885 PR rtl-optimization/84528
13886 * alias.c (init_alias_target): Add commentary.
13887 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13888 a unique base value if the frame pointer is not eliminated
13889 to the stack pointer.
13891 2018-03-01 Tom de Vries <tom@codesourcery.com>
13893 PR rtl-optimization/83327
13894 * lra-int.h (hard_regs_spilled_into): Declare.
13895 * lra.c (hard_regs_spilled_into): Define.
13896 (init_reg_info): Init hard_regs_spilled_into.
13897 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13898 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13899 (process_bb_lives): Handle hard_regs_spilled_into.
13900 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13901 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13903 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13905 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13906 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13907 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13908 * config/rs6000/aix72.h: New file.
13910 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13912 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13913 instead of warning_at with conditional singular and plural messages
13917 * stor-layout.c (update_alignment_for_field): For
13918 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13919 && !DECL_PACKED (field), do the alignment update, just use
13920 only desired_align instead of MAX (type_align, desired_align)
13922 (place_field): Don't do known_align < desired_align handling
13923 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13924 is non-NULL, instead do it after rli->prev_field handling and
13925 only if not within a bitfield word. For DECL_PACKED (field)
13926 use type_align of BITS_PER_UNIT.
13928 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13930 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13931 superfluous parentheses and trailing spaces.
13933 2018-02-28 Richard Biener <rguenther@suse.de>
13935 PR tree-optimization/84584
13936 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13937 SCoPs with fake exit edge.
13939 2018-02-28 Martin Liska <mliska@suse.cz>
13942 * timevar.c (timer::print): Fix format to properly print 100%
13945 2018-02-28 Richard Biener <rguenther@suse.de>
13947 PR middle-end/84607
13948 * genmatch.c (capture_info::walk_match): Do not mark
13949 captured expressions without operands as expr_p given
13950 they act more like predicates and should be subject to
13951 "lost tail" side-effect preserving.
13953 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13955 PR rtl-optimization/81611
13956 * auto-inc-dec.c (attempt_change): Move dead note from
13957 mem_insn if it's the next use of regno
13958 (find_address): Take address use of reg holding
13959 non-incremented value. Add parm to limit search to the named
13961 (merge_in_block): Attempt to use a mem insn that is the next
13962 use of the original regno.
13964 2018-02-27 Martin Sebor <msebor@redhat.com>
13967 * doc/invoke.texi (-Wmissing-attributes): New option.
13968 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13970 2018-02-27 Martin Sebor <msebor@redhat.com>
13972 PR translation/84207
13973 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13974 n argument to unsigned HOST_WIDE_INT.
13975 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13976 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13977 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13978 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13980 2018-02-27 Richard Biener <rguenther@suse.de>
13982 PR tree-optimization/84512
13983 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13984 Do not use the estimate returned from record_stmt_cost for
13985 the scalar iteration cost but sum properly using add_stmt_cost.
13987 2018-02-27 Richard Biener <rguenther@suse.de>
13989 PR tree-optimization/84466
13990 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13991 Adjust last change to less strictly validate use operands.
13993 2018-02-27 Martin Liska <mliska@suse.cz>
13995 PR gcov-profile/84548
13996 * gcov.c (process_file): Allow partial overlap and consider it
13997 also as group functions.
13998 (output_lines): Properly calculate range of lines for a group.
14000 2018-02-27 Martin Liska <mliska@suse.cz>
14002 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14003 'ggc' suffixes. Change first column width.
14004 (timer::print): Fix formatting of the column.
14006 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14008 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14009 preserve inline entry blocks for the sake of debug inline
14010 entry point markers alone.
14011 (remove_unused_locals): Suggest in comments a better place to
14012 force the preservation of inline entry blocks that are
14013 otherwise unused, but do not preserve them.
14015 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14017 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14019 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14022 * config/i386/constraints.md (Bs): Replace
14023 ix86_indirect_branch_register with
14024 TARGET_INDIRECT_BRANCH_REGISTER.
14026 * config/i386/i386.md (indirect_jump): Likewise.
14027 (tablejump): Likewise.
14028 (*sibcall_memory): Likewise.
14029 (*sibcall_value_memory): Likewise.
14030 Peepholes of indirect call and jump via memory: Likewise.
14031 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14032 (*sibcall_value_GOT_32): Likewise.
14033 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14034 (GOT_memory_operand): Likewise.
14035 (call_insn_operand): Likewise.
14036 (sibcall_insn_operand): Likewise.
14037 (GOT32_symbol_operand): Likewise.
14038 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14040 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14042 PR rtl-optimization/83496
14043 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14044 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14045 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14046 redundant insn, if any.
14047 (relax_delay_slots): Likewise.
14048 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14050 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14052 PR tree-optimization/83965
14053 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14054 that grouped statements are part of a reduction chain. Return
14055 true if the statement is not marked as a reduction itself but
14056 is part of a group.
14057 (vect_recog_dot_prod_pattern): Don't check whether the statement
14058 is part of a group here.
14059 (vect_recog_sad_pattern): Likewise.
14060 (vect_recog_widen_sum_pattern): Likewise.
14062 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14065 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14067 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14070 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14072 (ix86_output_indirect_function_return): New prototype.
14073 (ix86_split_simple_return_pop_internal): Likewise.
14074 * config/i386/i386.c (indirect_return_via_cx): New.
14075 (indirect_return_via_cx_bnd): Likewise.
14076 (indirect_thunk_name): Handle return va CX_REG.
14077 (output_indirect_thunk_function): Create alias for
14078 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14079 (ix86_output_indirect_jmp): Remove the bool argument.
14080 (ix86_output_indirect_function_return): New function.
14081 (ix86_split_simple_return_pop_internal): Likewise.
14082 * config/i386/i386.md (*indirect_jump): Don't pass false
14083 to ix86_output_indirect_jmp.
14084 (*tablejump_1): Likewise.
14085 (simple_return_pop_internal): Change it to define_insn_and_split.
14086 Call ix86_split_simple_return_pop_internal to split it for
14087 -mfunction-return=.
14088 (simple_return_indirect_internal): Call
14089 ix86_output_indirect_function_return instead of
14090 ix86_output_indirect_jmp.
14092 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14095 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14096 memset and value initialization afterwards.
14098 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14100 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14102 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14105 * common/config/aarch64/aarch64-common.c
14106 (aarch_option_optimization_table[]): Switch
14107 off fomit-frame-pointer
14109 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14110 Chung-Ju Wu <jasonwucj@gmail.com>
14112 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14114 (store_multiple): Ditto.
14116 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14118 * config.gcc: Add --with-cpu support for nds32 target.
14119 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14120 * config/nds32/nds32.opt: Add -mcpu= option.
14122 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14124 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14125 isel=yes): Warn for these deprecated options.
14127 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14129 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14130 ISA_2_5_MASKS_EMBEDDED.
14132 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14134 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14135 p->max as pointers rather than using iterative_hash_expr.
14137 2018-02-23 Carl Love <cel@us.ibm.com>
14139 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14140 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14142 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14143 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14144 P8V_BUILTIN_VEC_VUNSIGNED2.
14146 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14149 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14150 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14152 * lra-constraints.c (curr_insn_transform): Set up
14153 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14155 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14156 * lra-eliminations.c (spill_pseudos): Ditto.
14157 (process_insn_for_elimination): Ditto.
14158 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14159 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14160 LRA_NON_CLOBBERED_ALT.
14162 2018-02-22 Martin Sebor <msebor@redhat.com>
14164 PR tree-optimization/84480
14165 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14166 to maybe_diag_stxncpy_trunc. Call it.
14167 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14168 from gimple_fold_builtin_strcpy. Print inlining stack.
14169 (handle_builtin_stxncpy): Print inlining stack.
14170 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14172 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14175 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14176 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14177 and -fcheck-pointer-bounds are used together.
14178 (indirect_thunk_prefix): New enum.
14179 (indirect_thunk_need_prefix): New function.
14180 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14181 "_nt" instead of "_bnd" for NOTRACK prefix.
14182 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14183 (output_indirect_thunk_function): Likewise.
14185 (ix86_code_end): Update output_indirect_thunk_function calls.
14186 (ix86_output_indirect_branch_via_reg): Replace
14187 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14188 (ix86_output_indirect_branch_via_push): Likewise.
14189 (ix86_output_function_return): Likewise.
14190 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14191 incompatible with -fcf-protection=branch and
14192 -fcheck-pointer-bounds.
14194 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14197 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14198 Change gcc_assert call to output_operand_lossage.
14200 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14202 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14204 2018-02-22 DJ Delorie <dj@redhat.com>
14205 Sebastian Perta <sebastian.perta@renesas.com>
14206 Oleg Endo <olegendo@gcc.gnu.org>
14208 * config/rx/rx.c (rx_rtx_costs): New function.
14209 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14211 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14213 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14215 2018-02-22 Martin Liska <mliska@suse.cz>
14218 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14219 Add "native" as a possible value.
14221 2018-02-22 Martin Liska <mliska@suse.cz>
14224 * config/i386/i386.c (ix86_option_override_internal):
14225 Add "native" as a possible value for -march and -mtune.
14227 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14230 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14231 to all type variants.
14233 PR tree-optimization/84503
14234 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14235 width as info->bitpos + info->bitsize - start.
14236 (merged_store_group::merge_overlapping): Simplify width computation.
14237 (check_no_overlap): New function.
14238 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14239 start + width and last_order of the group, fail if check_no_overlap
14241 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14242 to group if check_no_overlap fails.
14244 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14246 * config/rs6000/altivec.md: Delete contraint arguments to
14247 define_expand, define_split, and define_peephole2, and in
14248 define_insn_and_split if always unused.
14249 * config/rs6000/darwin.md: Ditto.
14250 * config/rs6000/dfp.md: Ditto.
14251 * config/rs6000/rs6000.md: Ditto.
14252 * config/rs6000/sync.md: Ditto.
14253 * config/rs6000/vector.md: Ditto.
14254 * config/rs6000/vsx.md: Ditto.
14256 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14258 * config/rs6000/altivec.md: Write output control strings as braced
14259 blocks instead of double-quoted strings.
14260 * config/rs6000/darwin.md: Ditto.
14261 * config/rs6000/rs6000.md: Ditto.
14262 * config/rs6000/vector.md: Ditto.
14263 * config/rs6000/vsx.md: Ditto.
14265 2018-02-21 Jason Merrill <jason@redhat.com>
14267 PR c++/84314 - ICE with templates and fastcall attribute.
14268 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14270 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14272 * ipa-cp.c (determine_versionability): Fix comment typos.
14274 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14277 * ipa-cp.c (determine_versionability): Do not version functions caling
14280 2018-02-21 Martin Liska <mliska@suse.cz>
14283 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14284 Add "native" as a possible value.
14285 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14286 the macro when native cpu detection is available.
14288 2018-02-21 Martin Liska <mliska@suse.cz>
14291 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14292 Add "native" as a possible value.
14293 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14294 when native cpu detection is available.
14296 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14297 Martin Sebor <msebor@redhat.com>
14299 PR tree-optimization/84478
14300 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14302 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14303 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14304 support which is conservatively correct, for 2 only stay conservative
14305 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14306 argument to the 2 argument get_range_strlen, adjust 6 arg
14307 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14309 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14310 (gimple_fold_builtin_strlen): Pass true as last argument to
14313 2018-02-20 Martin Sebor <msebor@redhat.com>
14315 PR middle-end/84095
14316 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14317 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14318 (builtin_memref::builtin_memref): Factor out parts into
14319 set_base_and_offset and call it.
14321 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14323 PR middle-end/84406
14324 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14325 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14326 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14327 search at the associated MODE_INT.
14329 2018-02-20 Jeff Law <law@redhat.com>
14331 PR middle-end/82123
14332 PR tree-optimization/81592
14333 PR middle-end/79257
14334 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14335 for range data rather than using global data.
14336 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14337 range data rather than using global data.
14338 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14339 pass it to children as needed.
14340 (struct directive::fmtresult): Similarly.
14341 (struct directive::set_width): Similarly.
14342 (struct directive::set_precision): Similarly.
14343 (format_integer, format_directive, parse_directive): Similarly.
14344 (format_none): Accept unnamed vr_values parameter.
14345 (format_percent, format_floating, format_character): Similarly.
14346 (format_string, format_plain): Similarly.
14347 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14348 the EVRP range analyzer for range data rather than using global data.
14349 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14350 gimple-ssa-evrp-analyze.h
14351 (class sprintf_dom_walker): Add after_dom_children member function.
14352 Add evrp_range_analyzer member.
14353 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14354 range analyzer as needed.
14355 (sprintf_dom_walker::after_dom_children): New member function.
14356 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14358 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14359 (evrp_range_analyzer::pop_to_marker): Likewise.
14361 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14363 PR tree-optimization/84419
14364 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14365 with the required type if its current type is compatible but
14368 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14370 PR middle-end/82004
14371 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14372 after vectorization.
14374 2018-02-20 Martin Liska <mliska@suse.cz>
14377 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14378 possible values if we don't have a hint.
14380 2018-02-20 Martin Liska <mliska@suse.cz>
14384 * final.c (shorten_branches): Build align_tab array with one
14386 * opts.c (finish_options): Add alignment option limit check.
14387 (MAX_CODE_ALIGN): Likewise.
14388 (MAX_CODE_ALIGN_VALUE): Likewise.
14389 * doc/invoke.texi: Document maximum allowed option value for
14390 all -falign-* options.
14392 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14395 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14396 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14397 * var-tracking.c (emit_note_insn_var_location): Remove all references
14398 to NOTE_INSN_CALL_ARG_LOCATION.
14399 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14400 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14401 Use copy_rtx_if_shared.
14402 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14403 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14404 (dwarf2out_var_location): Remove handling of
14405 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14407 * final.c (final_scan_insn): Remove all references to
14408 NOTE_INSN_CALL_ARG_LOCATION.
14409 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14410 before dumping final insns.
14411 * except.c (emit_note_eh_region_end): Remove all references to
14412 NOTE_INSN_CALL_ARG_LOCATION.
14413 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14414 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14415 * config/arc/arc.c (hwloop_optimize): Likewise.
14416 * config/arm/arm.c (create_fix_barrier): Likewise.
14417 * config/s390/s390.c (s390_chunkify_start): Likewise.
14418 * config/sh/sh.c (find_barrier): Likewise.
14419 * config/i386/i386.c (rest_of_insert_endbranch,
14420 ix86_seh_fixup_eh_fallthru): Likewise.
14421 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14422 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14423 * config/frv/frv.c (frv_function_prologue): Likewise.
14424 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14426 (note_outside_basic_block_p): Remove all references to
14427 NOTE_INSN_CALL_ARG_LOCATION.
14428 * gengtype.c (adjust_field_rtx_def): Likewise.
14429 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14431 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14432 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14435 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14438 PR tree-optimization/84452
14439 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14440 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14443 2018-02-19 Martin Liska <mliska@suse.cz>
14446 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14448 2018-02-19 Martin Liska <mliska@suse.cz>
14449 Richard Sandiford <richard.sandiford@linaro.org>
14451 PR tree-optimization/82491
14452 * gimple-fold.c (get_base_constructor): Make earlier bail out
14455 2018-02-19 Carl Love <cel@us.ibm.com>
14457 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14458 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14460 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14461 P8V_BUILTIN_VEC_NEG.
14463 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14465 * config/rl78/rl78.md (movdf): New define expand.
14467 2018-02-19 Martin Liska <mliska@suse.cz>
14470 * doc/invoke.texi: Fix typo.
14471 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14473 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14475 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14476 handle rs6000_single_float and rs6000_double_float specially for
14479 2018-02-16 Jeff Law <law@redhat.com>
14481 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14482 (pop_regs): Use it.
14484 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14487 * ipa-inline.c (inline_small_functions): Fix a typo.
14489 2018-02-16 Nathan Sidwell <nathan@acm.org>
14491 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14493 2018-02-16 Carl Love <cel@us.ibm.com>
14495 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14496 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14497 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14498 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14499 expansion to P8V_BUILTIN_VEC_FLOAT2.
14501 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14503 PR rtl-optimization/70023
14504 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14505 src_regno into account.
14507 2018-02-16 Carl Love <cel@us.ibm.com>
14509 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14510 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14511 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14512 * config/rs6000/rs6000.c: Remove case statements for
14513 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14514 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14515 and P9V_BUILTIN_VEC_VINSERT4B.
14516 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14517 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14518 * config/rs6000/vsx.md:
14519 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14522 2018-02-16 Carl Love <cel@us.ibm.com>
14524 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14526 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14528 * config/rs6000/rs6000-c.c: Add the definitions for
14529 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14530 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14531 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14532 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14533 definition for insert4b and define insn *insert3b_internal.
14534 * doc/extend.texi: Add documentation for vec_extract4b.
14536 2018-02-16 Nathan Sidwell <nathan@acm.org>
14538 * doc/extend.texi (Backwards Compatibility): Mention friend
14539 injection. Note for-scope is deprecated.
14540 * doc/invoke.texi (-ffriend-injection): Deprecate.
14542 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14544 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14545 that moved to I2, also allow destinations that are a paradoxical
14546 subreg (instead of a normal reg).
14548 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14551 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14554 2018-02-16 Richard Biener <rguenther@suse.de>
14556 PR tree-optimization/84037
14557 PR tree-optimization/84016
14559 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14560 Adjust vec_construct for the fact we need additional higher latency
14561 128bit inserts for AVX256 and AVX512 vector builds.
14562 (ix86_add_stmt_cost): Scale vector construction cost for
14565 2018-02-16 Richard Biener <rguenther@suse.de>
14567 PR tree-optimization/84417
14568 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14569 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14570 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14572 2018-02-16 Martin Liska <mliska@suse.cz>
14575 * internal-fn.def (ASAN_CHECK): Set proper flags.
14576 (ASAN_MARK): Likewise.
14578 2018-02-16 Julia Koval <julia.koval@intel.com>
14580 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14581 from PTA_CANNONLAKE.
14583 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14586 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14587 Use ++iter rather than iter++ for std::list iterators.
14588 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14589 defer deleting them until all nodes in the forest are processed. Do
14590 free even leaf nodes. Change to_process into auto_vec.
14593 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14594 * vec.h (vec_default_construct): Use memset instead of placement new
14595 if BROKEN_VALUE_INITIALIZATION is defined.
14596 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14597 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14600 PR rtl-optimization/83723
14601 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14602 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14603 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14605 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14607 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14609 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14611 PR rtl-optimization/81443
14612 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14613 from inner REGs to paradoxical SUBREGs.
14615 2018-02-16 Richard Biener <rguenther@suse.de>
14617 PR tree-optimization/84399
14618 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14619 For operands we can analyze at their definition make sure we can
14620 analyze them at each use as well.
14622 2018-02-16 Richard Biener <rguenther@suse.de>
14624 PR tree-optimization/84190
14625 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14626 volatile accesses if the decl isn't volatile.
14628 2018-02-15 Jason Merrill <jason@redhat.com>
14630 PR c++/84314 - ICE with templates and fastcall attribute.
14631 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14632 TYPE_CANONICAL on an existing type.
14634 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14636 PR tree-optimization/84383
14637 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14638 dstoff nor call operand_equal_p if dstbase is NULL.
14640 PR tree-optimization/84334
14641 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14642 also a CONSTANT_CLASS_P, punt.
14644 2018-02-14 Jim Wilson <jimw@sifive.com>
14646 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14647 first SMALL_OPERAND check. New local min_second_step. Move assert
14648 to where locals are set. Add TARGET_RVC support.
14649 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14651 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14653 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14655 2018-02-14 Martin Sebor <msebor@redhat.com>
14657 PR tree-optimization/83698
14658 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14659 arrays constrain the offset range to their bounds.
14660 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14661 (builtin_access::overlap): Avoid setting the size of overlap if it's
14663 (maybe_diag_overlap): Also consider arrays when deciding what values
14664 of offsets to include in diagnostics.
14666 2018-02-14 Martin Sebor <msebor@redhat.com>
14669 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14670 that correspond to the kind of a declaration.
14672 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14675 * config/pa/pa.md: Load address of PIC label using the linkage table
14676 if the label is nonlocal.
14678 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14680 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14681 warning message if user requests -maltivec=be.
14682 * doc/invoke.texi: Document deprecation of -maltivec=be.
14684 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14687 * config/rs6000/rs6000-c.c: Update definitions for
14688 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14689 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14691 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14694 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14695 add _get_ssp intrinsics. Remove argument from
14696 __builtin_ia32_rdssp[d|q].
14697 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14698 * config/i386/i386-builtin.def: Remove argument from
14699 __builtin_ia32_rdssp[d|q].
14700 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14701 ix86_expand_special_args_builtin for _rdssp[d|q].
14702 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14703 Clear register before usage.
14704 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14705 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14707 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14709 PR tree-optimization/84357
14710 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14711 operand 1 of an ARRAY_REF too.
14713 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14716 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14717 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14719 (set_of_reg): New struct.
14720 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14721 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14722 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14724 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14725 Split into bitclr, bitset, bitinvert patterns if appropriate.
14726 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14727 use rx_fuse_in_memory_bitop.
14728 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14729 to named insn, correct maximum insn length.
14731 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14734 * machmode.def: Define a complex mode for PARTIAL_INT.
14735 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14737 * doc/rtl.texi: Document CSPImode.
14738 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14740 (msp430_hard_regno_nregs_with_padding): Likewise.
14742 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14745 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14747 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14749 PR rtl-optimization/84169
14750 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14751 we generated a parallel as new i3 and we split that to new i2 and i3
14752 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14753 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14754 those to i2, not i1. Partially rewrite this scan code.
14756 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14759 * stor-layout.c (place_field): For variable length fields, adjust
14760 offset_align afterwards not just based on the field's alignment,
14761 but also on the size.
14763 PR middle-end/84309
14764 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14765 of exps and logs in the use_exp2 case.
14767 2018-02-13 Jeff Law <law@redhat.com>
14769 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14770 entry for "vector".
14772 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14775 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14779 * common.opt (gas-loc-support, gas-locview-support): New.
14780 (ginline-points, ginternal-reset-location-views): New.
14781 * doc/invoke.texi: Document them. Use @itemx where intended.
14782 (gvariable-location-views): Adjust.
14783 * target.def (reset_location_view): New.
14784 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14785 (TARGET_RESET_LOCATION_VIEW): New.
14786 * doc/tm.texi: Rebuilt.
14787 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14788 (dwarf2out_default_as_locview_support): New.
14789 (output_asm_line_debug_info): Use option variables.
14790 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14791 (output_loc_list): Likewise.
14792 (add_high_low_attributes): Check option variables.
14793 Don't output entry view attribute in strict mode.
14794 (gen_inlined_subroutine_die): Check option variables.
14795 (dwarf2out_inline_entry): Likewise.
14796 (init_sections_and_labels): Likewise.
14797 (dwarf2out_early_finish): Likewise.
14798 (maybe_reset_location_view): New, from...
14799 (dwarf2out_var_location): ... here. Call it.
14800 * debug.h (dwarf2out_default_as_loc_support): Declare.
14801 (dwarf2out_default_as_locview_support): Declare.
14802 * hooks.c (hook_int_rtx_insn_0): New.
14803 * hooks.h (hook_int_rtx_insn_0): Declare.
14804 * toplev.c (process_options): Take -gas-loc-support and
14805 -gas-locview-support from dwarf2out. Enable
14806 -gvariable-location-views by default only with locview
14807 assembler support. Enable -ginternal-reset-location-views by
14808 default only if the target defines the corresponding hook.
14809 Enable -ginline-points by default if location views are
14810 enabled; force it disabled if statement frontiers are
14812 * tree-inline.c (expand_call_inline): Check option variables.
14813 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14815 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14817 PR tree-optimization/84321
14818 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14819 handling. Also check whether the anti-range contains any values
14820 that satisfy the mask; switch to a VR_RANGE if not.
14822 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14825 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14827 2018-02-13 Martin Jambor <mjambor@suse.cz>
14830 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14831 of call statements, also set location of a load to a temporary.
14833 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14835 * config/rl78/rl78.c (add_vector_labels): New function.
14836 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14837 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14838 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14839 which checks that no arguments are passed.
14840 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14841 * doc/extend.texi: Documentation for the new attribute.
14843 2018-02-13 Andreas Schwab <schwab@suse.de>
14845 * config/riscv/linux.h (CPP_SPEC): Define.
14847 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14850 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14851 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14852 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14853 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14854 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14855 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14856 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14857 temporarily for AES and PCLMUL builtins.
14859 PR tree-optimization/84339
14860 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14861 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14864 PR middle-end/84309
14865 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14866 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14867 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14869 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14871 * omp-simd-clone.h: New file.
14872 * omp-simd-clone.c: Include omp-simd-clone.h.
14873 (expand_simd_clones): No longer static.
14874 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14875 cgraph.h and omp-simd-clone.h.
14876 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14877 (vect_recog_widen_shift_pattern): Formatting fix.
14878 (vect_pattern_recog_1): Don't check optab for calls.
14881 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14882 operands[2] into a REG before using gen_lowpart on it.
14884 2018-02-12 Jeff Law <law@redhat.com>
14887 * config/sh/sh.c (find_barrier): Consider a sibling call
14890 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14891 successfully back substituting a reg.
14893 2018-02-12 Richard Biener <rguenther@suse.de>
14895 PR tree-optimization/84037
14896 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14897 parameter, move visited init to caller.
14898 (vect_slp_analyze_operations): Separate cost from validity
14899 check, initialize visited once for all instances.
14900 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14902 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14904 (vect_model_promotion_demotion_cost): Likewise.
14905 (vectorizable_bswap): Guard cost modeling with !slp_node
14906 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14908 (vectorizable_call): Likewise.
14909 (vectorizable_conversion): Likewise.
14910 (vectorizable_assignment): Likewise.
14911 (vectorizable_shift): Likewise.
14912 (vectorizable_operation): Likewise.
14913 (vectorizable_store): Likewise.
14914 (vectorizable_load): Likewise.
14915 (vectorizable_condition): Likewise.
14916 (vectorizable_comparison): Likewise.
14918 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14921 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14922 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14923 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14925 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14927 PR middle-end/83665
14928 * params.def (inline-min-speedup): Increase from 8 to 15.
14929 (max-inline-insns-auto): Decrease from 40 to 30.
14930 * ipa-split.c (consider_split): Add some buffer for function to
14931 be considered inlining candidate.
14932 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14935 2018-02-12 Richard Biener <rguenther@suse.de>
14937 PR tree-optimization/84037
14938 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14939 matched stmts if we cannot swap the non-matched ones.
14941 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14943 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14944 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14945 _mm_maskz_scalef_round_ss): New intrinsics.
14946 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14947 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14948 __builtin_ia32_scalefss_round): Remove.
14949 (__builtin_ia32_scalefsd_mask_round,
14950 __builtin_ia32_scalefss_mask_round): New intrinsics.
14951 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14952 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14953 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14954 "<round_constraint>")): Changed to ...
14955 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14956 "<round_scalar_constraint>")): ... this.
14957 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14958 %0, %1, %2<round_op3>}"): Changed to ...
14959 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14960 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14961 %2<round_scalar_mask_op3>}"): ... this.
14962 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14964 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14966 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14967 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14968 (_mm_maskz_sqrt_round_ss): New intrinsics.
14969 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14970 (__builtin_ia32_sqrtsd_mask_round)
14971 (__builtin_ia32_sqrtss_mask_round): New builtins.
14972 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14973 (__builtin_ia32_sqrtss_round): Remove.
14974 (__builtin_ia32_sqrtsd_mask_round)
14975 (__builtin_ia32_sqrtss_mask_round): New builtins.
14976 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14977 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14978 ((match_operand:VF_128 1 "vector_operand"
14979 "xBm,<round_constraint>")): Changed to ...
14980 ((match_operand:VF_128 1 "vector_operand"
14981 "xBm,<round_scalar_constraint>")): ... this.
14982 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14983 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14984 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14985 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14986 %<iptr>1<round_scalar_mask_op3>}): ... this.
14987 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14988 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14990 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14993 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14994 Cast vec_cmpeq result to correct type.
14995 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14996 Cast vec_cmpgt result to correct type.
14998 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15000 * final.c (final_scan_insn_1): Renamed from...
15001 (final_scan_insn): ... this. New wrapper, to recover
15002 seen from the outermost call in recursive ones.
15003 * config/sparc/sparc.c (output_return): Drop seen from call.
15004 (output_sibcall): Likewise.
15005 * config/visium/visium.c (output_branch): Likewise.
15007 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15009 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15012 2018-02-10 Alan Modra <amodra@gmail.com>
15015 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15016 Specify LR as an input.
15018 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15021 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15022 remove_member_access_dummy_vars): New functions.
15023 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15024 lower_omp_1, execute_lower_omp): Use them.
15026 PR rtl-optimization/84308
15027 * shrink-wrap.c (spread_components): Release todo vector.
15029 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15031 PR rtl-optimization/57193
15032 * ira-color.c (struct allocno_color_data): Add member
15033 conflict_allocno_hard_prefs.
15034 (update_conflict_allocno_hard_prefs): New.
15035 (bucket_allocno_compare_func): Add a preference based on
15036 conflict_allocno_hard_prefs.
15037 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15038 (color_allocnos): Remove a dead code. Initiate
15039 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15041 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15044 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15045 constraint from =wa to wa. Avoid a subreg on the output operand,
15046 instead use a pseudo and subreg it in a move.
15047 (p9_xxbrd_<mode>): Changed to ...
15048 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15049 (p9_xxbrd_v2df): New expander.
15050 (p9_xxbrw_<mode>): Changed to ...
15051 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15052 (p9_xxbrw_v4sf): New expander.
15054 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15056 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15058 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15061 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15062 multiply in 32-bit mode.
15063 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15064 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15067 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15069 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15070 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15071 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15072 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15074 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15077 * dwarf2out.c (is_trivial_indirect_ref): New function.
15078 (dwarf2out_late_global_decl): Do not generate a location
15079 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15080 and that are not defined in the current unit.
15082 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15084 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15085 instead of a libcall for UNORDERED.
15087 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15090 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15091 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15093 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15096 * config/s390/s390.c (s390_set_current_function): Invoke
15097 s390_indirect_branch_settings also if fndecl didn't change.
15099 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15101 * config/rs6000/rs6000.md (blockage): Set length to zero.
15103 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15105 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15107 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15110 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15111 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15115 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15116 PARALLEL incoming that failed vt_get_decl_and_offset check.
15118 PR middle-end/84237
15119 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15120 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15122 (get_variable_section): For decls in named .bss* sections pass true as
15123 second argument to bss_initializer_p.
15125 2018-02-09 Marek Polacek <polacek@redhat.com>
15126 Jakub Jelinek <jakub@redhat.com>
15129 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15130 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15131 Sync some changes from cxx_fold_indirect_ref.
15133 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15135 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15137 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15138 (BLOCK_INLINE_ENTRY_LABEL): New.
15139 (dwarf2out_var_location): Disregard inline entry markers.
15140 (inline_entry_data): New struct.
15141 (inline_entry_data_hasher): New hashtable type.
15142 (inline_entry_data_hasher::hash): New.
15143 (inline_entry_data_hasher::equal): New.
15144 (inline_entry_data_table): New variable.
15145 (add_high_low_attributes): Add DW_AT_entry_pc and
15146 DW_AT_GNU_entry_view attributes if a pending entry is found
15147 in inline_entry_data_table. Add old entry_pc attribute only
15148 if debug nonbinding markers are disabled.
15149 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15150 markers are enabled.
15151 (block_within_block_p, dwarf2out_inline_entry): New.
15152 (dwarf2out_finish): Check that no entries remained in
15153 inline_entry_data_table.
15154 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15155 (final_scan_insn, notice_source_line): Likewise.
15156 (rest_of_clean_state): Skip inline entry markers.
15157 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15159 * gimple.c (gimple_build_debug_inline_entry): New.
15160 * gimple.h (enum gimple_debug_subcode): Add
15161 GIMPLE_DEBUG_INLINE_ENTRY.
15162 (gimple_build_debug_inline_entry): Declare.
15163 (gimple_debug_inline_entry_p): New.
15164 (gimple_debug_nonbind_marker_p): Adjust.
15165 * insn-notes.def (INLINE_ENTRY): New.
15166 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15167 inline entry marker notes.
15168 (print_insn): Likewise.
15169 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15170 (INSN_DEBUG_MARKER_KIND): Likewise.
15171 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15172 * tree-inline.c (expand_call_inline): Build and insert
15173 debug_inline_entry stmt.
15174 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15175 inline entry blocks early, if nonbind markers are enabled.
15176 (dump_scope_block): Dump fragment info.
15177 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15178 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15179 (gimple_build_debug_inline_entry): New.
15180 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15181 Enable/disable inline entry points too.
15182 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15183 (DEBUG_INSN): Describe inline entry markers.
15185 * common.opt (gvariable-location-views): New.
15186 (gvariable-location-views=incompat5): New.
15187 * config.in: Rebuilt.
15188 * configure: Rebuilt.
15189 * configure.ac: Test assembler for view support.
15190 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15191 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15192 * dwarf2out.c (var_loc_view): New typedef.
15193 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15194 (dwarf2out_locviews_in_attribute): New.
15195 (dwarf2out_locviews_in_loclist): New.
15196 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15197 (enum dw_line_info_opcode): Add LI_adv_address.
15198 (struct dw_line_info_table): Add view.
15199 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15200 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15201 (zero_view_p): New variable.
15202 (ZERO_VIEW_P): New macro.
15203 (output_asm_line_debug_info): New.
15204 (struct var_loc_node): Add view.
15205 (add_AT_view_list, AT_loc_list): New.
15206 (add_var_loc_to_decl): Add view param. Test it against last.
15207 (new_loc_list): Add view params. Record them.
15208 (AT_loc_list_ptr): Handle loc and view lists.
15209 (view_list_to_loc_list_val_node): New.
15210 (print_dw_val): Handle dw_val_class_view_list.
15211 (size_of_die): Likewise.
15212 (value_format): Likewise.
15213 (loc_list_has_views): New.
15214 (gen_llsym): Set vl_symbol too.
15215 (maybe_gen_llsym, skip_loc_list_entry): New.
15216 (dwarf2out_maybe_output_loclist_view_pair): New.
15217 (output_loc_list): Output view list or entries too.
15218 (output_view_list_offset): New.
15219 (output_die): Handle dw_val_class_view_list.
15220 (output_dwarf_version): New.
15221 (output_compilation_unit_header): Use it.
15222 (output_skeleton_debug_sections): Likewise.
15223 (output_rnglists, output_line_info): Likewise.
15224 (output_pubnames, output_aranges): Update version comments.
15225 (output_one_line_info_table): Output view numbers in asm comments.
15226 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15227 Call maybe_gen_llsym.
15228 (loc_list_from_tree_1): Adjust.
15229 (add_AT_location_description): Create view list attribute if
15230 needed, check it's absent otherwise.
15231 (convert_cfa_to_fb_loc_list): Adjust.
15232 (maybe_emit_file): Call output_asm_line_debug_info for test.
15233 (dwarf2out_var_location): Reset views as needed. Precompute
15234 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15235 attribute. Set view.
15236 (new_line_info_table): Reset next view.
15237 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15238 (dwarf2out_source_line): Likewise. Output view resets and labels to
15239 the assembler, or select appropriate line info opcodes.
15240 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15241 (optimize_string_length): Catch it. Adjust.
15242 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15243 dw_val_class_view_list, and remove it if no longer needed.
15244 (hash_loc_list): Hash view numbers.
15245 (loc_list_hasher::equal): Compare them.
15246 (optimize_location_lists): Check whether a view list symbol is
15247 needed, and whether the locview attribute is present, and
15248 whether they match. Remove the locview attribute if no longer
15250 (index_location_lists): Call skip_loc_list_entry for test.
15251 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15252 Use output_dwarf_version.
15253 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15254 (struct dw_val_node): Add val_view_list.
15255 * final.c (SEEN_NEXT_VIEW): New.
15256 (set_next_view_needed): New.
15257 (clear_next_view_needed): New.
15258 (maybe_output_next_view): New.
15259 (final_start_function): Rename to...
15260 (final_start_function_1): ... this. Take pointer to FIRST,
15261 add SEEN parameter. Emit param bindings in the initial view.
15262 (final_start_function): Reintroduce SEEN-less interface.
15263 (final): Rename to...
15264 (final_1): ... this. Take SEEN parameter. Output final pending
15265 next view at the end.
15266 (final): Reintroduce seen-less interface.
15267 (final_scan_insn): Output pending next view before switching
15268 sections or ending a block. Mark the next view as needed when
15269 outputting variable locations. Notify debug backend of section
15270 changes, and of location view changes.
15271 (rest_of_handle_final): Adjust.
15272 * toplev.c (process_options): Autodetect value for debug variable
15273 location views option. Warn on incompat5 without -gdwarf-5.
15274 * doc/invoke.texi (gvariable-location-views): New.
15275 (gvariable-location-views=incompat5): New.
15276 (gno-variable-location-views): New.
15278 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15280 PR tree-optimization/84136
15281 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15282 that the result of find_edge is non-NULL.
15284 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15287 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15288 storing integer register in SImode. Fix cost of 256 and 512
15289 byte aligned SSE register store.
15291 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15293 * config/i386/i386.c (ix86_multiplication_cost): Fix
15294 multiplication cost for TARGET_AVX512DQ.
15296 2018-02-08 Marek Polacek <polacek@redhat.com>
15298 PR tree-optimization/84238
15299 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15302 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15304 PR tree-optimization/84265
15305 * tree-vect-stmts.c (vectorizable_store): Don't treat
15306 VMAT_CONTIGUOUS accesses as grouped.
15307 (vectorizable_load): Likewise.
15309 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15311 PR tree-optimization/81635
15312 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15313 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15314 (test_round_for_mask): New functions.
15315 (wide_int_cc_tests): Call test_round_for_mask.
15316 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15317 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15318 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15319 range returned by get_range_info.
15321 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15324 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15325 * symtab.c: Include builtins.h
15326 (symtab_node::output_to_lto_symbol_table_p): Move here
15327 from lto-streamer-out.c:output_symbol_p.
15328 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15329 (output_symbol_p): Move all logic to symtab.c
15330 (produce_symtab): Update.
15332 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15334 * config/s390/s390-opts.h (enum indirect_branch): Define.
15335 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15336 (s390_indirect_branch_via_thunk)
15337 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15338 (enum s390_indirect_branch_type): Define.
15339 * config/s390/s390.c (struct s390_frame_layout, struct
15340 machine_function): Remove.
15341 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15342 (indirect_branch_table_label_no, indirect_branch_table_name):
15344 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15345 (enum s390_indirect_branch_option): Define.
15346 (s390_return_addr_from_memory): New function.
15347 (s390_handle_string_attribute): New function.
15348 (s390_attribute_table): Add new attribute handler.
15349 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15350 (s390_indirect_branch_via_thunk): New function.
15351 (s390_indirect_branch_via_inline_thunk): New function.
15352 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15353 sibling call optimization for non z10 compiles.
15354 (s390_emit_call): Force indirect branch target to be a single
15355 register. Add r1 clobber for non-z10 compiles.
15356 (s390_emit_epilogue): Emit return jump via return_use expander.
15357 (s390_reorg): Handle JUMP_INSNs as execute targets.
15358 (s390_option_override_internal): Perform validity checks for the
15359 new command line options.
15360 (s390_indirect_branch_attrvalue): New function.
15361 (s390_indirect_branch_settings): New function.
15362 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15363 (s390_output_indirect_thunk_function): New function.
15364 (s390_code_end): Implement target hook.
15365 (s390_case_values_threshold): Implement target hook.
15366 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15368 * config/s390/s390.h (struct s390_frame_layout)
15369 (struct machine_function): Move here from s390.c.
15370 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15371 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15372 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15373 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15374 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15375 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15376 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15377 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15378 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15379 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15380 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15381 (mnemonic attribute): Add values which aren't recognized
15383 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15384 pattern for branch conversion. Fix mnemonic attribute.
15385 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15386 indirect branch via thunk if requested.
15387 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15388 ("*indirect_jump"): Disable for branch conversion using out of
15390 ("indirect_jump_via_thunk<mode>_z10")
15391 ("indirect_jump_via_thunk<mode>")
15392 ("indirect_jump_via_inlinethunk<mode>_z10")
15393 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15394 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15395 ("casesi_jump_via_inlinethunk<mode>_z10")
15396 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15397 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15398 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15399 ("*indirect2_jump"): Disable for branch conversion.
15400 ("casesi_jump"): Turn into expander and expand patterns for branch
15402 ("return_use"): New expander.
15403 ("*return"): Emit return via thunk and rename it to ...
15404 ("*return<mode>"): ... this one.
15405 * config/s390/s390.opt: Add new options and and enum for the
15408 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15410 * lra-constraints.c (match_reload): Unconditionally use
15411 gen_lowpart_SUBREG, rather than selecting between that
15412 and equivalent gen_rtx_SUBREG code.
15414 2018-02-08 Richard Biener <rguenther@suse.de>
15416 PR tree-optimization/84233
15417 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15418 changed flag instead of boguously re-using phi_inserted.
15420 2018-02-08 Martin Jambor <mjambor@suse.cz>
15422 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15423 static local variables.
15425 2018-02-08 Richard Biener <rguenther@suse.de>
15427 PR tree-optimization/84278
15428 * tree-vect-stmts.c (vectorizable_store): When looking for
15429 smaller vector types to perform grouped strided loads/stores
15430 make sure the mode is supported by the target.
15431 (vectorizable_load): Likewise.
15433 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15435 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15436 Increase LDP/STP opportunities by adding adjacent callee-saves.
15438 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15440 PR rtl-optimization/84068
15441 PR rtl-optimization/83459
15442 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15444 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15446 PR tree-optimization/84224
15447 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15448 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15449 non-zero arguments.
15451 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15454 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15455 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15456 count, remove one USE.
15458 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15460 * doc/install.texi (Configuration): Document the
15461 --with-long-double-format={ibm,ieee} PowerPC configuration
15465 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15466 Convert from define_expand to be define_insn_and_split. Rework
15467 float/double/_Float128 conversions to QI/HI/SImode to work with
15468 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15469 conversions to QI/HImode types did a store and then a load to
15470 truncate the value. For conversions to VSX registers, don't split
15471 the insn, instead emit the code directly. Use the code iterator
15472 any_fix to combine signed and unsigned conversions.
15473 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15474 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15475 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15476 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15477 (fix_<mode>di2_hw): Likewise.
15478 (fixuns_<mode>di2_hw): Likewise.
15479 (fix_<mode>si2_hw): Likewise.
15480 (fixuns_<mode>si2_hw): Likewise.
15481 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15482 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15483 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15484 fix<uns>_trunc<SFDF:mode>si2_p8.
15485 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15486 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15487 (fix<uns>_<mode>_mem): Likewise.
15488 (fctiw<u>z_<mode>_mem): Likewise.
15489 (fix<uns>_<mode>_mem): Likewise.
15490 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15491 the register allocator from doing a direct move to the GPRs to do
15492 a store, and instead use the ISA 3.0 store byte/half-word from
15493 vector register instruction. For IEEE 128-bit floating point,
15494 also optimize stores of 32-bit ints.
15495 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15497 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15499 * genextract.c (push_pathstr_operand): New function to support
15501 (walk_rtx): Call push_pathstr_operand.
15502 (print_path): Support [a-zA-Z].
15504 2018-02-07 Richard Biener <rguenther@suse.de>
15506 PR tree-optimization/84037
15507 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15508 (cse_and_gimplify_to_preheader): Declare.
15509 (vect_get_place_in_interleaving_chain): Likewise.
15510 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15512 (_loop_vec_info::~_loop_vec_info): Delete it.
15513 (cse_and_gimplify_to_preheader): New function.
15514 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15515 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15516 (vectorizable_load): Likewise. For grouped stores always base
15517 the IV on the first element.
15518 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15519 condition before gimplifying.
15521 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15523 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15524 *DIV_EXPR and *MOD_EXPR.
15526 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15529 * config/i386/i386.c (ix86_option_override_internal): Mask out
15530 the CF_SET bit when checking -fcf-protection.
15532 2018-02-07 Tom de Vries <tom@codesourcery.com>
15535 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15538 2018-02-07 Richard Biener <rguenther@suse.de>
15540 PR tree-optimization/84204
15541 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15544 PR tree-optimization/84205
15545 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15546 special-case isl_ast_op_zdiv_r.
15548 PR tree-optimization/84223
15549 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15550 Only add conditions from within the region.
15551 (gather_bbs::after_dom_children): Adjust.
15553 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15556 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15557 * config/avr/avr.md: Only post-reload split REG-REG moves if
15558 either register is GENERAL_REG_P.
15560 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15562 PR tree-optimization/84235
15563 * tree-ssa-scopedtables.c
15564 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15565 if the subtraction is performed in floating point type where NaNs are
15566 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15567 build 1. Formatting fix.
15569 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15572 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15573 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15574 and skip it regardless of bb boundaries. Use CALL_P macro,
15575 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15576 unnecessarily, formatting fix.
15578 2018-02-06 Michael Collison <michael.collison@arm.com>
15580 * config/arm/thumb2.md:
15581 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15582 (*thumb_mov_notscc): Ditto.
15584 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15587 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15588 unsigned_fix, not "s".
15590 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15592 * configure.ac (gcc_fn_eh_frame_ro): New function.
15593 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15594 correct .eh_frame permissions.
15595 * configure: Regenerate.
15597 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15599 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15600 irrelevant options.
15602 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15604 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15605 Display warning message for -mno-speculate-indirect-jumps.
15607 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15609 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15611 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15613 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15615 PR tree-optimization/84225
15616 * tree-eh.c (find_trapping_overflow): Only call
15617 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15619 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15622 * config/i386/i386.c: Reimplement the check of possible options
15623 -mibt/-mshstk conbination. Change error messages.
15624 * doc/invoke.texi: Fix a typo: remove extra '='.
15626 2018-02-06 Marek Polacek <polacek@redhat.com>
15628 PR tree-optimization/84228
15629 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15631 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15634 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15635 emitted arch directives.
15636 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15637 __ARM_FEATURE_COPROC before changing architectures.
15639 2018-02-06 Richard Biener <rguenther@suse.de>
15641 * config/i386/i386.c (print_reg): Fix typo.
15642 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15644 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15646 * configure: Regenerate.
15648 2018-02-05 Martin Sebor <msebor@redhat.com>
15650 PR tree-optimization/83369
15651 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15654 2018-02-05 Martin Liska <mliska@suse.cz>
15656 * doc/invoke.texi: Cherry-pick upstream r323995.
15658 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15660 * ira.c (ira_init_register_move_cost): Adjust comment.
15662 2018-02-05 Martin Liska <mliska@suse.cz>
15664 PR gcov-profile/84137
15665 * doc/gcov.texi: Fix typo in documentation.
15667 2018-02-05 Martin Liska <mliska@suse.cz>
15669 PR gcov-profile/83879
15670 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15671 using dlopen functionality.
15673 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15675 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15676 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15677 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15678 _mm_maskz_range_round_ss): New intrinsics.
15679 (__builtin_ia32_rangesd128_round)
15680 (__builtin_ia32_rangess128_round): Remove.
15681 (__builtin_ia32_rangesd128_mask_round,
15682 __builtin_ia32_rangess128_mask_round): New builtins.
15683 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15684 __builtin_ia32_rangess128_round): Remove.
15685 (__builtin_ia32_rangesd128_mask_round,
15686 __builtin_ia32_rangess128_mask_round): New builtins.
15687 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15688 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15689 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15690 "<round_saeonly_constraint>")): Changed to ...
15691 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15692 "<round_saeonly_scalar_constraint>")): ... this.
15693 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15694 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15695 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15696 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15697 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15699 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15701 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15703 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15704 Remove all values except native, 8540 and 8548.
15706 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15708 * config/i386/i386.c (ix86_output_function_return): Pass
15709 INVALID_REGNUM, instead of -1, as invalid register number to
15710 indirect_thunk_name and output_indirect_thunk.
15712 2018-02-02 Julia Koval <julia.koval@intel.com>
15714 * config.gcc: Add -march=icelake.
15715 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15716 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15717 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15718 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15719 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15720 (processor_target_table): Add icelake.
15721 (ix86_option_override_internal): Handle new PTAs.
15722 (get_builtin_code_for_version): Handle icelake.
15723 (M_INTEL_COREI7_ICELAKE): New.
15724 (fold_builtin_cpu): Handle icelake.
15725 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15726 * doc/invoke.texi: Add -march=icelake.
15728 2018-02-02 Julia Koval <julia.koval@intel.com>
15730 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15731 to wide_int_bitmask.
15732 * wide-int-bitmask.h: New.
15734 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15737 * config/i386/i386.md: Replace Pmode with word_mode in
15738 builtin_setjmp_setup and builtin_longjmp to support x32.
15740 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15744 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15746 (rs6000_supported_cpu_names): New static variable.
15747 (linux_cpu_translation_table): Likewise.
15748 (elf_platform) <cpu>: Define new static variable and use it.
15749 Translate kernel AT_PLATFORM name to canonical name if needed.
15750 Error if platform name is unknown.
15752 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15755 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15757 2018-02-01 Jeff Law <law@redhat.com>
15760 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15761 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15762 the scratch if RELEASE_VIA_POP is false.
15763 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15764 If we have to save a temporary register, decrement SIZE appropriately.
15765 Pass new arguments to release_scratch_register_on_entry.
15766 (ix86_adjust_stack_and_probe): Likewise.
15767 (ix86_emit_probe_stack_range): Pass new arguments to
15768 release_scratch_register_on_entry.
15770 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15772 PR rtl-optimization/84157
15773 * combine.c (change_zero_ext): Use REG_P predicate in
15774 front of HARD_REGISTER_P predicate.
15776 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15778 * config/avr/avr.c (avr_option_override): Move disabling of
15779 -fdelete-null-pointer-checks to...
15780 * common/config/avr/avr-common.c (avr_option_optimization_table):
15783 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15785 PR tree-optimization/81635
15786 * tree-data-ref.c (split_constant_offset_1): For types that
15787 wrap on overflow, try to use range info to prove that wrapping
15790 2018-02-01 Renlin Li <renlin.li@arm.com>
15793 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15794 TAILCALL_ADDR_REGS.
15795 (aarch64_register_move_cost): Likewise.
15796 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15797 TAILCALL_ADDR_REGS.
15798 (REG_CLASS_NAMES): Likewise.
15799 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15800 TAILCALL_ADDR_REGS. Remove IP registers.
15801 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15803 2018-02-01 Richard Biener <rguenther@suse.de>
15805 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15806 for specifying RPO order and allow NULL for that.
15807 * domwalk.c (dom_walker::dom_walker): Likewise.
15808 (dom_walker::walk): Handle NULL RPO order.
15809 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15811 (rewrite_update_dom_walker): Likewise.
15812 (mark_def_dom_walker): Likewise.
15814 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15816 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15817 (aarch64_maybe_expand_sve_subreg_move): Declare.
15818 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15819 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15821 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15822 that are semantically a reverse operation.
15823 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15824 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15825 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15827 (aarch64_can_change_mode_class): For big-endian, forbid changes
15828 between two SVE modes if they have different element sizes.
15830 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15832 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15833 the TImode handling for big-endian targets.
15835 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15837 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15838 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15840 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15841 Remove BSWAP handing for big-endian targets and use the form of
15842 LD1RQ appropariate for the mode.
15844 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15846 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15847 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15848 duplicated element.
15850 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15853 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15854 check for operands that need to go through aarch64_sve_reload_be.
15856 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15858 PR tree-optimization/81661
15859 PR tree-optimization/84117
15860 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15861 * tree-eh.c: Include gimplify.h.
15862 (find_trapping_overflow, replace_trapping_overflow,
15863 rewrite_to_non_trapping_overflow): New functions.
15864 * tree-vect-loop.c: Include tree-eh.h.
15865 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15866 * tree-data-ref.c: Include tree-eh.h.
15867 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15869 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15871 PR rtl-optimization/84123
15872 * combine.c (change_zero_ext): Check if hard register satisfies
15873 can_change_dest_mode before calling gen_lowpart_SUBREG.
15875 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15878 * ira.c (ira_init_register_move_cost): Remove assert.
15880 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15882 PR rtl-optimization/84071
15883 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15884 * doc/tm.texi: Regenerate.
15886 2018-01-31 Richard Biener <rguenther@suse.de>
15888 PR tree-optimization/84132
15889 * tree-data-ref.c (analyze_miv_subscript): Properly
15890 check whether evolution_function_is_affine_multivariate_p
15891 before calling gcd_of_steps_may_divide_p.
15893 2018-01-31 Julia Koval <julia.koval@intel.com>
15896 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15897 * config/i386/i386.md (rdpid_rex64) New.
15898 (rdpid): Make 32bit only.
15900 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15903 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15904 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15906 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15909 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15911 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15913 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15915 PR rtl-optimization/84071
15916 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15917 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15919 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15921 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15922 (arc_attribute_table): Add 'aux' attribute.
15923 (arc_in_small_data_p): Consider aux like variables.
15924 (arc_is_aux_reg_p): New function.
15925 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15926 (arc_get_aux_arg): New function.
15927 (prepare_move_operands): Handle aux-register access.
15928 (arc_handle_aux_attribute): New function.
15929 * doc/extend.texi (ARC Variable attributes): Add subsection.
15931 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15933 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15934 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15935 (arc_attribute_table): Add 'uncached' attribute.
15936 (arc_print_operand): Print '.di' flag for uncached memory
15938 (arc_in_small_data_p): Do not consider for small data the uncached
15940 (arc_is_uncached_mem_p): New function.
15941 * config/arc/predicates.md (compact_store_memory_operand): Check
15942 for uncached memory accesses.
15943 (nonvol_nonimm_operand): Likewise.
15944 * doc/extend.texi (ARC Type Attribute): New subsection.
15946 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15949 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15950 falign-loops=): Add Optimization flag.
15952 2018-01-30 Jeff Law <law@redhat.com>
15955 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15956 INT_REGISTERS_SAVED. Check it prior to calling
15957 get_scratch_register_on_entry.
15958 (ix86_adjust_stack_and_probe): Similarly.
15959 (ix86_emit_probe_stack_range): Similarly.
15960 (ix86_expand_prologue): Corresponding changes.
15962 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15965 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15966 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15968 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15971 * lra-constraints.c (curr_insn_transform): Process AND in the
15974 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15976 PR rtl-optimization/83986
15977 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15978 dependence against last_pending_memory_flush in addition to
15979 pending_jump_insns.
15981 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15983 PR tree-optimization/81611
15984 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15987 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15990 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15993 2018-01-30 Richard Biener <rguenther@suse.de>
15994 Jakub Jelinek <jakub@redhat.com>
15996 PR tree-optimization/84111
15997 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15998 inner loops added during recursion, as they don't have up-to-date
16001 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16004 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16005 (can_inline_edge_by_limits_p): ... here.
16006 (can_early_inline_edge_p, check_callers,
16007 update_caller_keys, update_callee_keys, recursive_inlining,
16008 add_new_edges_to_heap, speculation_useful_p,
16009 inline_small_functions,
16010 inline_small_functions, flatten_function,
16011 inline_to_all_callers_1): Update.
16013 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16015 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16018 2018-01-30 Richard Biener <rguenther@suse.de>
16020 PR tree-optimization/83008
16021 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16022 invariant and constant vector uses in stmts when they need
16023 more than one stmt.
16025 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16028 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16029 * configure: Regenerate.
16031 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16033 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16035 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16036 Use gen_rtx_REG rather than gen_lowpart.
16038 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16040 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16041 rather than 0 when creating partial subregs.
16043 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16045 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16048 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16051 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16052 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16053 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16054 flags. This restores the settings used before the 2017-07-24.
16055 Turning off pre increment/decrement/modify allows IVOPTS to
16056 optimize DF/SF loops where the index is an int.
16058 2018-01-29 Richard Biener <rguenther@suse.de>
16059 Kelvin Nilsen <kelvin@gcc.gnu.org>
16062 * tree-vect-stmts.c (vectorizable_call): Don't call
16063 targetm.vectorize_builtin_md_vectorized_function if callee is
16066 2018-01-22 Carl Love <cel@us.ibm.com>
16068 * doc/extend.tex: Fix typo in second arg in
16069 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16071 2018-01-29 Richard Biener <rguenther@suse.de>
16073 PR tree-optimization/84086
16074 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16075 (flush_ssaname_freelist): When SSA names were released reset
16076 the SCEV hash table.
16078 2018-01-29 Richard Biener <rguenther@suse.de>
16080 PR tree-optimization/84057
16081 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16082 removed paths when removing edges.
16084 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16086 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16087 -mfunction-return=@var{choice}.
16089 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16091 PR diagnostic/84034
16092 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16093 Handle CR like TAB.
16094 (layout::print_source_line): Likewise.
16095 (test_get_line_width_without_trailing_whitespace): Add test cases.
16097 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16099 PR middle-end/84040
16100 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16103 2018-01-26 Jim Wilson <jimw@sifive.com>
16105 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16107 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16110 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16112 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16113 and CMP + SUB-immediate -> SUBS.
16115 2018-01-26 Martin Sebor <msebor@redhat.com>
16117 PR tree-optimization/83896
16118 * tree-ssa-strlen.c (get_string_len): Rename...
16119 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16120 Avoid assuming length is constant.
16121 (handle_char_store): Use HOST_WIDE_INT for string length.
16123 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16126 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16127 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16129 2018-01-26 Richard Biener <rguenther@suse.de>
16131 PR rtl-optimization/84003
16132 * dse.c (record_store): Only record redundant stores when
16133 the earlier store aliases at least all accesses the later one does.
16135 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16137 PR rtl-optimization/83985
16138 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16139 REG_CFA_RESTORE insns.
16140 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16141 REG_CFA_RESTORE insns here.
16144 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16145 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16147 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16149 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16150 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16151 (arc_init): Likewise.
16152 (arc_override_options): Likewise.
16153 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16155 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16157 * config/arc/arc.h (TARGET_DBNZ): Define.
16158 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16159 properly set the tune attribute.
16160 (dbnz): Use TARGET_DBNZ guard.
16161 * config/arc/arc.opt (mtune): Add core3 option.
16163 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16165 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16166 recognize new pic like addresses.
16167 (arc_delegitimize_address): Clean up.
16169 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16171 * config/arc/arc-arches.def: Option mrf16 valid for all
16173 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16174 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16175 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16176 * config/arc/arc-tables.opt: Regenerate.
16177 * config/arc/arc.c (arc_conditional_register_usage): Handle
16178 reduced register file case.
16179 (arc_file_start): Set must have build attributes.
16180 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16181 mrf16 option value.
16182 * config/arc/arc.opt (mrf16): Add new option.
16183 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16184 * config/arc/genmultilib.awk: Handle new mrf16 option.
16185 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16186 * config/arc/t-multilib: Regenerate.
16187 * doc/invoke.texi (ARC Options): Document mrf16 option.
16189 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16191 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16192 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16193 (arc_attribute_table): Add 'secure_call' attribute.
16194 (arc_print_operand): Print secure call operand.
16195 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16197 (arc_is_secure_call_p): New function. * config/arc/arc.md
16198 (call_i): Add support for sjli instruction.
16199 (call_value_i): Likewise.
16200 * config/arc/constraints.md (Csc): New constraint.
16202 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16203 John Eric Martin <John.Martin@emmicro-us.com>
16205 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16206 * config/arc/arc.c (_arc_jli_section): New struct.
16207 (arc_jli_section): New type.
16208 (rc_jli_sections): New static variable.
16209 (arc_handle_jli_attribute): New function.
16210 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16211 (arc_file_end): New function.
16212 (TARGET_ASM_FILE_END): Define.
16213 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16214 (arc_add_jli_section): New function.
16215 (jli_call_scan): Likewise.
16216 (arc_reorg): Call jli_call_scan.
16217 (arc_output_addsi): Remove 'S' from printing asm operand.
16218 (arc_is_jli_call_p): New function.
16219 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16221 (movhi_insn): Likewise.
16222 (movsi_insn): Likewise.
16223 (movsi_set_cc_insn): Likewise.
16224 (loadqi_update): Likewise.
16225 (load_zeroextendqisi_update): Likewise.
16226 (load_signextendqisi_update): Likewise.
16227 (loadhi_update): Likewise.
16228 (load_zeroextendhisi_update): Likewise.
16229 (load_signextendhisi_update): Likewise.
16230 (loadsi_update): Likewise.
16231 (loadsf_update): Likewise.
16232 (movsicc_insn): Likewise.
16233 (bset_insn): Likewise.
16234 (bxor_insn): Likewise.
16235 (bclr_insn): Likewise.
16236 (bmsk_insn): Likewise.
16237 (bicsi3_insn): Likewise.
16238 (cmpsi_cc_c_insn): Likewise.
16239 (movsi_ne): Likewise.
16240 (movsi_cond_exec): Likewise.
16241 (clrsbsi2): Likewise.
16242 (norm_f): Likewise.
16252 (call_i): Remove 'S' asm letter, add jli instruction.
16253 (call_value_i): Likewise.
16254 * config/arc/arc.op (mjli-always): New option.
16255 * config/arc/constraints.md (Cji): New constraint.
16256 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16258 (subsf3_fpx): Likewise.
16259 (mulsf3_fpx): Likewise.
16260 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16262 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16263 function attrbutes.
16264 * doc/invoke.texi (ARC): Document mjli-always option.
16266 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16268 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16269 avoid addition with 0 and use incw and decw where possible.
16271 2018-01-26 Richard Biener <rguenther@suse.de>
16273 PR tree-optimization/81082
16274 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16275 association if it requires casting to unsigned.
16276 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16277 from fold_plusminus_mult_expr to catch important cases late when
16278 range info is available.
16280 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16282 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16283 * configure.ac (hidden_linkonce): New test.
16284 * configure: Regenerate.
16285 * config.in: Regenerate.
16287 2018-01-26 Julia Koval <julia.koval@intel.com>
16289 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16290 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16291 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16292 _mm_mask_bitshuffle_epi64_mask): Fix type.
16293 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16294 USI_FTYPE_V4DI_V4DI_USI): Remove.
16295 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16296 __builtin_ia32_vpshufbitqmb256_mask,
16297 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16298 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16299 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16301 2018-01-26 Alan Modra <amodra@gmail.com>
16304 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16305 UNSPEC_VBPERMQ. Sort other unspecs.
16307 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16309 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16311 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16313 PR middle-end/83055
16314 * predict.c (drop_profile): Do not push/pop cfun; update also
16316 (handle_missing_profiles): Fix logic looking for zero profiles.
16318 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16320 PR middle-end/83977
16321 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16322 on functions with #pragma omp declare simd or functions with simd
16324 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16325 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16326 Remove trailing \n from warning_at calls.
16328 2018-01-25 Tom de Vries <tom@codesourcery.com>
16331 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16332 for neutered workers.
16334 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16337 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16338 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16340 2018-01-24 Jeff Law <law@redhat.com>
16343 * i386.c (get_probe_interval): Move to earlier point.
16344 (ix86_compute_frame_layout): If -fstack-clash-protection and
16345 the frame is larger than the probe interval, then use pushes
16346 to save registers rather than reg->mem moves.
16347 (ix86_expand_prologue): Remove conditional for int_registers_saved
16350 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16353 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16354 min/max for never referenced object.
16356 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16358 PR middle-end/83977
16359 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16361 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16362 attributes from DECL_ATTRIBUTES (decl) without affecting
16363 DECL_ATTRIBUTES (current_function_decl).
16364 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16365 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16367 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16369 PR tree-optimization/83979
16370 * fold-const.c (fold_comparison): Use constant_boolean_node
16371 instead of boolean_{true,false}_node.
16373 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16375 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16378 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16380 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16381 Simplify the clause that sets the length attribute.
16382 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16383 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16384 clause that sets the length attribute.
16385 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16387 2018-01-24 Tom de Vries <tom@codesourcery.com>
16390 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16391 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16392 Add strict parameter.
16393 (prevent_branch_around_nothing): Insert dummy insn between branch to
16394 label and label with no ptx insn inbetween.
16395 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16397 2018-01-24 Tom de Vries <tom@codesourcery.com>
16400 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16401 for neutered threads in warp.
16402 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16404 2018-01-24 Richard Biener <rguenther@suse.de>
16406 PR tree-optimization/83176
16407 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16410 2018-01-24 Richard Biener <rguenther@suse.de>
16412 PR tree-optimization/82819
16413 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16414 code generating pluses that are no-ops in the target precision.
16416 2018-01-24 Richard Biener <rguenther@suse.de>
16418 PR middle-end/84000
16419 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16421 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16423 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16424 to merge probabilities.
16425 * predict.c (probably_never_executed): Also mark as cold functions
16426 with global 0 profile and guessed local profile.
16427 * profile-count.c (profile_probability::combine_with_count): New
16429 * profile-count.h (profile_probability::operator*,
16430 profile_probability::operator*=, profile_probability::operator/,
16431 profile_probability::operator/=): Reduce precision to adjusted
16432 and set value to guessed on contradictory divisions.
16433 (profile_probability::combine_with_freq): Remove.
16434 (profile_probability::combine_wiht_count): Declare.
16435 (profile_count::force_nonzero):: Set to adjusted.
16436 (profile_count::probability_in):: Set quality to adjusted.
16437 * tree-ssa-tail-merge.c (replace_block_by): Use
16438 combine_with_count.
16440 2018-01-23 Andrew Waterman <andrew@sifive.com>
16441 Jim Wilson <jimw@sifive.com>
16443 * config/riscv/riscv.c (riscv_stack_boundary): New.
16444 (riscv_option_override): Set riscv_stack_boundary. Handle
16445 riscv_preferred_stack_boundary_arg.
16446 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16447 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16448 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16449 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16450 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16451 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16453 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16456 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16457 of struct ix86_frame.
16458 (ix86_expand_epilogue): Likewise. Add a local variable for
16459 the reg_save_offset field in struct ix86_frame.
16461 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16463 PR tree-optimization/82604
16464 * tree-loop-distribution.c (enum partition_kind): New enum item
16465 PKIND_PARTIAL_MEMSET.
16466 (partition_builtin_p): Support above new enum item.
16467 (generate_code_for_partition): Ditto.
16468 (compute_access_range): Differentiate cases that equality can be
16469 proven at all loops, the innermost loops or no loops.
16470 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16471 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16472 (finalize_partitions, distribute_loop): Don't fuse partition of
16473 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16474 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16475 parloop is enabled.
16477 2018-01-23 Martin Liska <mliska@suse.cz>
16479 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16480 order to ignore the predictor.
16481 (PRED_POLYMORPHIC_CALL): Likewise.
16482 (PRED_RECURSIVE_CALL): Likewise.
16484 2018-01-23 Martin Liska <mliska@suse.cz>
16486 * tree-profile.c (tree_profiling): Print function header to
16487 aware reader which function we are working on.
16488 * value-prof.c (gimple_find_values_to_profile): Do not print
16489 not interesting value histograms.
16491 2018-01-23 Martin Liska <mliska@suse.cz>
16493 * profile-count.h (enum profile_quality): Add
16494 profile_uninitialized as the first value. Do not number values
16495 as they are zero based.
16496 (profile_count::verify): Update sanity check.
16497 (profile_probability::verify): Likewise.
16499 2018-01-23 Nathan Sidwell <nathan@acm.org>
16501 * doc/invoke.texi (ffor-scope): Deprecate.
16503 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16505 PR tree-optimization/83510
16506 * domwalk.c (set_all_edges_as_executable): New function.
16507 (dom_walker::dom_walker): Convert bool param
16508 "skip_unreachable_blocks" to enum reachability. Move setup of
16509 edge flags to set_all_edges_as_executable and only do it when
16510 reachability is REACHABLE_BLOCKS.
16511 * domwalk.h (enum dom_walker::reachability): New enum.
16512 (dom_walker::dom_walker): Convert bool param
16513 "skip_unreachable_blocks" to enum reachability.
16514 (set_all_edges_as_executable): New decl.
16515 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16516 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16518 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16519 but converting true to REACHABLE_BLOCKS.
16520 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16522 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16523 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16524 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16526 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16527 if check_all_array_refs will be called.
16529 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16531 * tree.c (selftest::test_location_wrappers): Add more test
16534 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16536 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16537 (selftest::test_bit_in_range): Likewise.
16539 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16542 * doc/sourcebuild.texi (vect_float): Say that the selector
16543 only describes the situation when -funsafe-math-optimizations is on.
16544 (vect_float_strict): Document.
16546 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16548 PR tree-optimization/83965
16549 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16550 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16551 instead of checking only for a reduction.
16552 (vect_recog_widen_sum_pattern): Likewise.
16554 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16556 * predict.c (probably_never_executed): Only use precise profile info.
16557 (compute_function_frequency): Skip after inlining hack since we now
16558 have quality checking.
16560 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16562 * profile-count.h (profile_probability::very_unlikely,
16563 profile_probability::unlikely, profile_probability::even): Set
16564 precision to guessed.
16566 2018-01-23 Richard Biener <rguenther@suse.de>
16568 PR tree-optimization/83963
16569 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16570 Properly terminate dominator walk when crossing the exit edge not
16571 when visiting its source block.
16573 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16576 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16577 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16579 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16581 PR tree-optimization/83957
16582 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16583 semicolon after for body surrounded by braces.
16585 PR tree-optimization/83081
16586 * profile-count.h (profile_probability::split): New method.
16587 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16588 Use profile_probability::split.
16589 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16590 when splitting a single conditional jump into 2.
16592 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16594 PR tree-optimization/69452
16595 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16598 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16600 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16601 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16602 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16604 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16606 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16608 * config/rl78/rl78.md (movdi): New define_expand.
16609 * config/rl78/rl78.c (rl78_split_movdi): New function.
16611 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16614 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16616 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16617 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16618 128-bit to produce an UNSPEC move to get the double word with the
16619 signbit and then a shift directly to do signbit.
16620 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16621 implementation with a new version that just does either a direct
16622 move or a regular move. Move memory interface to separate insns.
16623 Move insns so they are next to the expander.
16624 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16625 with signbit move. Split big and little endian case.
16626 (signbit<mode>2_dm_mem_le): Likewise.
16627 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16628 (signbit<mode>2_dm2): Likewise.
16630 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16632 * config/rl78/rl78.md (anddi3): New define_expand.
16634 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16636 * config/rl78/rl78.md (umindi3): New define_expand.
16638 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16640 * config/rl78/rl78.md (smindi3): New define_expand.
16642 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16644 * config/rl78/rl78.md (smaxdi3): New define_expand.
16646 2018-01-22 Carl Love <cel@us.ibm.com>
16648 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16649 LVX_V1TI): Add macro expansion.
16650 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16651 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16652 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16653 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16654 Change check to determine if the instruction is a byte reversing
16655 entry. Fix typo in comment.
16656 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16657 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16658 Add def_builtin calls for new builtins.
16659 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16660 Add define_insn expansion.
16662 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16664 * config/rl78/rl78.md (umaxdi3): New define_expand.
16666 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16668 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16669 for non-QImode registers.
16671 2018-01-22 Richard Biener <rguenther@suse.de>
16673 PR tree-optimization/83963
16674 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16675 including the loop exit block.
16676 (scop_detection::merge_sese): Likewise.
16677 (scop_detection::add_scop): Do it here instead.
16679 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16681 * doc/sourcebuild.texi (arm_softfloat): Document.
16683 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16686 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16687 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16688 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16690 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16691 David Edelsohn <dje.gcc@gmail.com>
16694 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16695 Change "crset eq" to "crset 2".
16696 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16697 (*call_indirect_aix<mode>_nospec): Likewise.
16698 (*call_value_indirect_aix<mode>_nospec): Likewise.
16699 (*call_indirect_elfv2<mode>_nospec): Likewise.
16700 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16701 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16702 change assembly output from . to $.
16703 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16704 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16705 (*tablejump<mode>_internal1_nospec): Likewise.
16707 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16710 * config/sh/sh_optimize_sett_clrt.cc:
16711 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16713 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16715 PR tree-optimization/83940
16716 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16717 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16718 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16719 use it to pass back the definition type.
16720 (vect_check_store_rhs): Likewise rhs_dt_out.
16721 (vect_build_gather_load_calls): Add a mask_dt argument and use
16722 it instead of a call to vect_is_simple_use.
16723 (vectorizable_store): Update calls to vect_check_load_store_mask
16724 and vect_check_store_rhs. Use the dt returned by the latter instead
16725 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16726 instead of calls to vect_is_simple_use. Pass the scalar rather
16727 than the vector operand to vect_is_simple_use when handling
16728 second and subsequent copies of an rhs value.
16729 (vectorizable_load): Update calls to vect_check_load_store_mask
16730 and vect_build_gather_load_calls. Use the cached mask_dt and
16731 gs_info.offset_dt instead of calls to vect_is_simple_use.
16733 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16735 PR middle-end/83945
16736 * tree-emutls.c: Include gimplify.h.
16737 (lower_emutls_2): New function.
16738 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16739 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16740 it before further processing.
16743 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16744 UINTVAL (trueop1) instead of INTVAL (op1).
16746 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16750 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16751 INCOMING_FRAME_SP_OFFSET if not defined.
16752 (scan_trace): Add ENTRY argument. If true and
16753 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16754 emit a note to adjust the CFA offset.
16755 (create_cfi_notes): Adjust scan_trace callers.
16756 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16757 INCOMING_FRAME_SP_OFFSET in the CIE.
16758 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16759 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16761 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16762 * doc/tm.texi: Regenerated.
16764 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16766 PR rtl-optimization/83147
16767 * lra-constraints.c (remove_inheritance_pseudos): Use
16768 lra_substitute_pseudo_within_insn.
16770 2018-01-19 Tom de Vries <tom@codesourcery.com>
16771 Cesar Philippidis <cesar@codesourcery.com>
16774 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16776 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16779 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16780 spaces for function labels.
16782 2018-01-19 Martin Liska <mliska@suse.cz>
16784 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16785 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16786 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16787 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16788 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16789 (PRED_CONST_RETURN): Change from 69 to 65.
16790 (PRED_NULL_RETURN): Change from 91 to 71.
16791 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16792 (PRED_LOOP_GUARD): Change from 66 to 73.
16794 2018-01-19 Martin Liska <mliska@suse.cz>
16796 * predict.c (predict_insn_def): Add new assert.
16797 (struct branch_predictor): Change type to signed integer.
16798 (test_prediction_value_range): Amend test to cover
16799 PROB_UNINITIALIZED.
16800 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16801 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16802 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16803 (PRED_LOOP_IV_COMPARE): Likewise.
16804 * predict.h (PROB_UNINITIALIZED): Define new constant.
16806 2018-01-19 Martin Liska <mliska@suse.cz>
16808 * predict.c (dump_prediction): Add new format for
16809 analyze_brprob.py script which is enabled with -details
16811 * profile-count.h (precise_p): New function.
16813 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16815 PR tree-optimization/83922
16816 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16817 there are no statements that need masking.
16818 (vect_active_double_reduction_p): New function.
16819 (vect_analyze_loop_operations): Use it when handling phis that
16820 are not in the loop header.
16822 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16824 PR tree-optimization/83914
16825 * tree-vect-loop.c (vectorizable_induction): Don't convert
16826 init_expr or apply the peeling adjustment for inductions
16827 that are nested within the vectorized loop.
16829 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16831 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16834 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16838 * function.h (gimplify_parameters): Add gimple_seq * argument.
16839 * function.c: Include gimple.h and options.h.
16840 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16841 for the added local temporaries if needed.
16842 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16843 if there are any parameter cleanups, wrap whole body into a
16844 try/finally with the cleanups.
16846 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16849 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16850 Use GET_MODE_CLASS for scalar floating point.
16852 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16856 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16857 Fix call of call_cgraph_insertion_hooks.
16859 2018-01-18 Martin Sebor <msebor@redhat.com>
16861 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16863 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16866 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16869 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16872 * common.opt: (-ffile-prefix-map): New option.
16873 * opts.c (common_handle_option): Defer it.
16874 * opts-global.c (handle_common_deferred_options): Handle it.
16875 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16876 * file-prefix-map.h: New file.
16877 (remap_debug_filename, add_debug_prefix_map): ...here.
16878 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16879 * final.c (debug_prefix_map, add_debug_prefix_map
16880 remap_debug_filename): Move to...
16881 * file-prefix-map.c: New file.
16882 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16883 generalize, get rid of alloca(), use strrchr() instead of strchr().
16884 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16885 Implement in terms of add_prefix_map().
16886 (remap_macro_filename, remap_debug_filename): Implement in term of
16888 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16889 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16890 * dbxout.c: Include file-prefix-map.h.
16891 * varasm.c: Likewise.
16892 * vmsdbgout.c: Likewise.
16893 * xcoffout.c: Likewise.
16894 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16895 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16896 * doc/invoke.texi (-ffile-prefix-map): Document.
16897 (-fdebug-prefix-map): Update description.
16899 2018-01-18 Martin Liska <mliska@suse.cz>
16901 * config/i386/i386.c (indirect_thunk_name): Document that also
16903 (output_indirect_thunk): Document why both instructions
16904 (pause and lfence) are generated.
16906 2018-01-18 Richard Biener <rguenther@suse.de>
16908 PR tree-optimization/83887
16909 * graphite-scop-detection.c
16910 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16911 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16912 (scop_detection::merge_sese): Re-implement with a flood-fill
16913 algorithm that properly finds a SESE region if it exists.
16915 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16918 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16919 pointer_diff optimizations use view_convert instead of convert.
16921 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16923 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16924 Generate different code for -mno-speculate-indirect-jumps.
16925 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16926 (*call_indirect_aix<mode>): Disable for
16927 -mno-speculate-indirect-jumps.
16928 (*call_indirect_aix<mode>_nospec): New define_insn.
16929 (*call_value_indirect_aix<mode>): Disable for
16930 -mno-speculate-indirect-jumps.
16931 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16932 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16933 -mno-speculate-indirect-jumps.
16934 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16936 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16938 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16939 long double type, set the flags for noting the default long double
16940 type, even if we don't pass or return a long double type.
16942 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16945 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16948 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16950 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16951 support for merge[hl].
16952 (fold_mergehl_helper): New helper function.
16953 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16954 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16955 (altivec_vmrglw_direct): Add xxmrglw insn.
16957 2018-01-17 Andrew Waterman <andrew@sifive.com>
16959 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16960 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16962 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16965 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16966 call the lto_location_cache before reading the
16967 DECL_SOURCE_LOCATION of the types.
16969 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16970 Richard Sandiford <richard.sandiford@linaro.org>
16972 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16973 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16974 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16975 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16976 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16978 * config/aarch64/constraints.md (aarch64_movti_operand):
16980 * config/aarch64/predicates.md (Uti): Add new constraint.
16982 2018-01-17 Carl Love <cel@us.ibm.com>
16984 * config/rs6000/vsx.md (define_expand xl_len_r,
16985 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16986 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16988 (define_expand, define_insn): Move the shift left from the
16989 define_insn to the define_expand for lxvl and stxvl instructions.
16990 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16991 and XL_LEN_R definitions to PURE.
16993 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16995 * config/i386/i386.c (indirect_thunk_name): Declare regno
16996 as unsigned int. Compare regno with INVALID_REGNUM.
16997 (output_indirect_thunk): Ditto.
16998 (output_indirect_thunk_function): Ditto.
16999 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17000 in the call to output_indirect_thunk_function.
17002 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17004 PR middle-end/83884
17005 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17006 rather than the size of inner_type to determine the stack slot size
17007 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17009 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17012 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17015 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17017 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17018 endian Linux systems to optionally enable multilibs for selecting
17019 the long double type if the user configured an explicit type.
17020 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17021 have no long double multilibs if not defined.
17022 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17023 warn if the user used -mabi={ieee,ibm}longdouble and we built
17024 multilibs for long double.
17025 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17026 appropriate multilib option.
17027 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17029 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17030 for building long double multilibs.
17031 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17033 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17035 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17038 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17040 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17043 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17046 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17049 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17051 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17052 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17054 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17056 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17057 different rtl trees depending on TARGET_64BIT.
17058 (rs6000_gen_lvx): Likewise.
17060 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17062 * config/visium/visium.md (nop): Tweak comment.
17063 (hazard_nop): Likewise.
17065 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17067 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17068 -mspeculate-indirect-jumps.
17069 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17070 for -mno-speculate-indirect-jumps.
17071 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17072 (*call_value_indirect_elfv2<mode>): Disable for
17073 -mno-speculate-indirect-jumps.
17074 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17075 (indirect_jump): Emit different RTL for
17076 -mno-speculate-indirect-jumps.
17077 (*indirect_jump<mode>): Disable for
17078 -mno-speculate-indirect-jumps.
17079 (*indirect_jump<mode>_nospec): New define_insn.
17080 (tablejump): Emit different RTL for
17081 -mno-speculate-indirect-jumps.
17082 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17083 (tablejumpsi_nospec): New define_expand.
17084 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17085 (tablejumpdi_nospec): New define_expand.
17086 (*tablejump<mode>_internal1): Disable for
17087 -mno-speculate-indirect-jumps.
17088 (*tablejump<mode>_internal1_nospec): New define_insn.
17089 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17092 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17094 * caller-save.c (insert_save): Drop unnecessary parameter. All
17097 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17098 Richard Biener <rguenth@suse.de>
17101 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17102 return early, inline manually is_gimple_sizepos. Make sure if we
17103 call gimplify_expr we don't end up with a gimple constant.
17104 * tree.c (variably_modified_type_p): Don't return true for
17105 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17106 * gimplify.h (is_gimple_sizepos): Remove.
17108 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17110 PR tree-optimization/83857
17111 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17112 vectorizable_live_operation for pure SLP statements.
17113 (vectorizable_live_operation): Handle PHIs.
17115 2018-01-16 Richard Biener <rguenther@suse.de>
17117 PR tree-optimization/83867
17118 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17119 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17121 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17124 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17125 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17126 If off is not INTEGER_CST, issue a may not be aligned warning
17127 rather than isn't aligned. Use isn%'t rather than isn't.
17128 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17130 <case MULT_EXPR>: Improve the case when bottom and one of the
17131 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17132 operand, in that case check if the other operand is multiple of
17133 bottom divided by the INTEGER_CST operand.
17135 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17138 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17139 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17140 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17141 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17142 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17143 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17144 (pa_function_arg_size): New function.
17146 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17148 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17149 in a separate statement.
17151 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17153 PR tree-optimization/83847
17154 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17155 group gathers and scatters.
17157 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17159 PR rtl-optimization/86620
17160 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17162 PR rtl-optimization/83213
17163 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17164 to last if both are JUMP_INSNs.
17166 PR tree-optimization/83843
17167 * gimple-ssa-store-merging.c
17168 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17169 store_immediate_info for bswap/nop orig_stores.
17171 2018-01-15 Andrew Waterman <andrew@sifive.com>
17173 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17175 <UDIV>: Increase cost if !TARGET_DIV.
17177 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17179 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17180 (define_attr "cr_logical_3op"): New.
17181 (cceq_ior_compare): Adjust.
17182 (cceq_ior_compare_complement): Adjust.
17183 (*cceq_rev_compare): Adjust.
17184 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17185 (is_cracked_insn): Adjust.
17186 (insn_must_be_first_in_group): Adjust.
17187 * config/rs6000/40x.md: Adjust.
17188 * config/rs6000/440.md: Adjust.
17189 * config/rs6000/476.md: Adjust.
17190 * config/rs6000/601.md: Adjust.
17191 * config/rs6000/603.md: Adjust.
17192 * config/rs6000/6xx.md: Adjust.
17193 * config/rs6000/7450.md: Adjust.
17194 * config/rs6000/7xx.md: Adjust.
17195 * config/rs6000/8540.md: Adjust.
17196 * config/rs6000/cell.md: Adjust.
17197 * config/rs6000/e300c2c3.md: Adjust.
17198 * config/rs6000/e500mc.md: Adjust.
17199 * config/rs6000/e500mc64.md: Adjust.
17200 * config/rs6000/e5500.md: Adjust.
17201 * config/rs6000/e6500.md: Adjust.
17202 * config/rs6000/mpc.md: Adjust.
17203 * config/rs6000/power4.md: Adjust.
17204 * config/rs6000/power5.md: Adjust.
17205 * config/rs6000/power6.md: Adjust.
17206 * config/rs6000/power7.md: Adjust.
17207 * config/rs6000/power8.md: Adjust.
17208 * config/rs6000/power9.md: Adjust.
17209 * config/rs6000/rs64.md: Adjust.
17210 * config/rs6000/titan.md: Adjust.
17212 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17214 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17215 ix86_indirect_branch_register logic.
17217 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17219 * config/i386/constraints.md (Bs): Update
17220 ix86_indirect_branch_register check. Don't check
17221 ix86_indirect_branch_register with GOT_memory_operand.
17223 * config/i386/predicates.md (GOT_memory_operand): Don't check
17224 ix86_indirect_branch_register here.
17225 (GOT32_symbol_operand): Likewise.
17227 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17229 * config/i386/predicates.md (constant_call_address_operand):
17230 Rewrite ix86_indirect_branch_register logic.
17231 (sibcall_insn_operand): Likewise.
17233 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17235 * config/i386/constraints.md (Bs): Replace
17236 ix86_indirect_branch_thunk_register with
17237 ix86_indirect_branch_register.
17239 * config/i386/i386.md (indirect_jump): Likewise.
17240 (tablejump): Likewise.
17241 (*sibcall_memory): Likewise.
17242 (*sibcall_value_memory): Likewise.
17243 Peepholes of indirect call and jump via memory: Likewise.
17244 * config/i386/i386.opt: Likewise.
17245 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17246 (GOT_memory_operand): Likewise.
17247 (call_insn_operand): Likewise.
17248 (sibcall_insn_operand): Likewise.
17249 (GOT32_symbol_operand): Likewise.
17251 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17253 PR middle-end/83837
17254 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17255 type rather than type addr's type points to.
17256 (expand_omp_atomic_mutex): Likewise.
17257 (expand_omp_atomic): Likewise.
17259 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17262 * config/i386/i386.c (output_indirect_thunk_function): Use
17263 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17264 for __x86_return_thunk.
17266 2018-01-15 Richard Biener <rguenther@suse.de>
17268 PR middle-end/83850
17269 * expmed.c (extract_bit_field_1): Fix typo.
17271 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17274 * config/arm/iterators.md (VF): New mode iterator.
17275 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17276 Remove integer-related logic from pattern.
17277 (neon_vabd<mode>_3): Likewise.
17279 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17281 PR middle-end/82694
17282 * common.opt (fstrict-overflow): No longer an alias.
17283 (fwrapv-pointer): New option.
17284 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17285 also for pointer types based on flag_wrapv_pointer.
17286 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17287 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17288 opts->x_flag_wrapv got set.
17289 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17290 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17291 POINTER_TYPE_OVERFLOW_UNDEFINED.
17292 * match.pd: Likewise in address comparison pattern.
17293 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17295 2018-01-15 Richard Biener <rguenther@suse.de>
17298 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17299 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17300 Reset type names to their identifier if their TYPE_DECL doesn't
17301 have linkage (and thus is used for ODR and devirt).
17302 (save_debug_info_for_decl): Remove.
17303 (save_debug_info_for_type): Likewise.
17304 (add_tree_to_fld_list): Adjust.
17305 * tree-pretty-print.c (dump_generic_node): Make dumping of
17306 type names more robust.
17308 2018-01-15 Richard Biener <rguenther@suse.de>
17310 * BASE-VER: Bump to 8.0.1.
17312 2018-01-14 Martin Sebor <msebor@redhat.com>
17315 * builtins.c (check_access): Avoid warning when the no-warning bit
17318 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17320 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17321 * ira-color (allocno_hard_regs_compare): Likewise.
17323 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17326 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17327 Use .pushsection/.popsection.
17329 2018-01-14 Martin Sebor <msebor@redhat.com>
17332 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17334 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17336 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17337 entry from extra_headers.
17338 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17339 extra_headers, make the list bitwise identical to the i?86-*-* one.
17341 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17343 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17344 -mcmodel=large with -mindirect-branch=thunk,
17345 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17346 -mfunction-return=thunk-extern.
17347 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17348 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17349 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17351 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17353 * config/i386/i386.c (print_reg): Print the name of the full
17354 integer register without '%'.
17355 (ix86_print_operand): Handle 'V'.
17356 * doc/extend.texi: Document 'V' modifier.
17358 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17360 * config/i386/constraints.md (Bs): Disallow memory operand for
17361 -mindirect-branch-register.
17363 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17364 (GOT_memory_operand): Likewise.
17365 (call_insn_operand): Likewise.
17366 (sibcall_insn_operand): Likewise.
17367 (GOT32_symbol_operand): Likewise.
17368 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17369 for -mindirect-branch-register.
17370 (tablejump): Likewise.
17371 (*sibcall_memory): Likewise.
17372 (*sibcall_value_memory): Likewise.
17373 Disallow peepholes of indirect call and jump via memory for
17374 -mindirect-branch-register.
17375 (*call_pop): Replace m with Bw.
17376 (*call_value_pop): Likewise.
17377 (*sibcall_pop_memory): Replace m with Bs.
17378 * config/i386/i386.opt (mindirect-branch-register): New option.
17379 * doc/invoke.texi: Document -mindirect-branch-register option.
17381 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17383 * config/i386/i386-protos.h (ix86_output_function_return): New.
17384 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17385 set function_return_type.
17386 (indirect_thunk_name): Add ret_p to indicate thunk for function
17388 (output_indirect_thunk_function): Pass false to
17389 indirect_thunk_name.
17390 (ix86_output_indirect_branch_via_reg): Likewise.
17391 (ix86_output_indirect_branch_via_push): Likewise.
17392 (output_indirect_thunk_function): Create alias for function
17393 return thunk if regno < 0.
17394 (ix86_output_function_return): New function.
17395 (ix86_handle_fndecl_attribute): Handle function_return.
17396 (ix86_attribute_table): Add function_return.
17397 * config/i386/i386.h (machine_function): Add
17398 function_return_type.
17399 * config/i386/i386.md (simple_return_internal): Use
17400 ix86_output_function_return.
17401 (simple_return_internal_long): Likewise.
17402 * config/i386/i386.opt (mfunction-return=): New option.
17403 (indirect_branch): Mention -mfunction-return=.
17404 * doc/extend.texi: Document function_return function attribute.
17405 * doc/invoke.texi: Document -mfunction-return= option.
17407 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17409 * config/i386/i386-opts.h (indirect_branch): New.
17410 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17411 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17412 with local indirect jump when converting indirect call and jump.
17413 (ix86_set_indirect_branch_type): New.
17414 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17415 (indirectlabelno): New.
17416 (indirect_thunk_needed): Likewise.
17417 (indirect_thunk_bnd_needed): Likewise.
17418 (indirect_thunks_used): Likewise.
17419 (indirect_thunks_bnd_used): Likewise.
17420 (INDIRECT_LABEL): Likewise.
17421 (indirect_thunk_name): Likewise.
17422 (output_indirect_thunk): Likewise.
17423 (output_indirect_thunk_function): Likewise.
17424 (ix86_output_indirect_branch_via_reg): Likewise.
17425 (ix86_output_indirect_branch_via_push): Likewise.
17426 (ix86_output_indirect_branch): Likewise.
17427 (ix86_output_indirect_jmp): Likewise.
17428 (ix86_code_end): Call output_indirect_thunk_function if needed.
17429 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17431 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17432 (ix86_attribute_table): Add indirect_branch.
17433 * config/i386/i386.h (machine_function): Add indirect_branch_type
17434 and has_local_indirect_jump.
17435 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17437 (tablejump): Likewise.
17438 (*indirect_jump): Use ix86_output_indirect_jmp.
17439 (*tablejump_1): Likewise.
17440 (simple_return_indirect_internal): Likewise.
17441 * config/i386/i386.opt (mindirect-branch=): New option.
17442 (indirect_branch): New.
17445 (thunk-inline): Likewise.
17446 (thunk-extern): Likewise.
17447 * doc/extend.texi: Document indirect_branch function attribute.
17448 * doc/invoke.texi: Document -mindirect-branch= option.
17450 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17453 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17455 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17457 * ipa-inline.c (want_inline_small_function_p): Return false if
17458 inlining has already failed with CIF_FINAL_ERROR.
17459 (update_caller_keys): Call want_inline_small_function_p before
17461 (update_callee_keys): Likewise.
17463 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17465 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17467 (rs6000_quadword_masked_address_p): Likewise.
17468 (quad_aligned_load_p): Likewise.
17469 (quad_aligned_store_p): Likewise.
17470 (const_load_sequence_p): Add comment to describe the outer-most loop.
17471 (mimic_memory_attributes_and_flags): New function.
17472 (rs6000_gen_stvx): Likewise.
17473 (replace_swapped_aligned_store): Likewise.
17474 (rs6000_gen_lvx): Likewise.
17475 (replace_swapped_aligned_load): Likewise.
17476 (replace_swapped_load_constant): Capitalize argument name in
17477 comment describing this function.
17478 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17479 and stores that access quad-word aligned addresses and replace
17480 with stvx or lvx instructions when appropriate.
17481 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17482 New function prototype.
17483 (rs6000_quadword_masked_address_p): Likewise.
17484 (rs6000_gen_lvx): Likewise.
17485 (rs6000_gen_stvx): Likewise.
17486 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17487 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17488 when memory address is aligned.
17489 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17490 this split to select lvx instruction when memory address is aligned.
17491 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17492 instruction when memory address is aligned.
17493 (*vsx_le_perm_load_v16qi): Likewise.
17494 (four unnamed splitters): Modify to select the stvx instruction
17495 when memory is aligned.
17497 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17499 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17500 which appears in the queue multiple times.
17502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17503 Alan Hayward <alan.hayward@arm.com>
17504 David Sherwood <david.sherwood@arm.com>
17506 * tree-vectorizer.h (vec_lower_bound): New structure.
17507 (_loop_vec_info): Add check_nonzero and lower_bounds.
17508 (LOOP_VINFO_CHECK_NONZERO): New macro.
17509 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17510 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17511 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17512 fields. Make seg_len the distance travelled, not including the
17514 (dr_direction_indicator): Declare.
17515 (dr_zero_step_indicator): Likewise.
17516 (dr_known_forward_stride_p): Likewise.
17517 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17519 (runtime_alias_check_p): Allow runtime alias checks with
17521 (operator ==): Compare access_size and align.
17522 (prune_runtime_alias_test_list): Rework for new distinction between
17523 the access_size and seg_len.
17524 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17526 (get_segment_min_max): New function.
17527 (create_intersect_range_checks): Use it.
17528 (dr_step_indicator): New function.
17529 (dr_direction_indicator): Likewise.
17530 (dr_zero_step_indicator): Likewise.
17531 (dr_known_forward_stride_p): Likewise.
17532 * tree-loop-distribution.c (data_ref_segment_size): Return
17533 DR_STEP * (niters - 1).
17534 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17536 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17537 (vect_preserves_scalar_order_p): New function, split out from...
17538 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17539 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17540 (vect_vfa_access_size): New function.
17541 (vect_vfa_align): Likewise.
17542 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17543 (dump_lower_bound): New function.
17544 (vect_check_lower_bound): Likewise.
17545 (vect_small_gap_p): Likewise.
17546 (vectorizable_with_step_bound_p): Likewise.
17547 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17548 depencies if the vectorization factor is 1. Convert the checks
17549 for nonzero steps into checks on the bounds of DR_STEP. Try using
17550 a bunds check for variable steps if the minimum required step is
17551 relatively small. Update calls to the dr_with_seg_len
17552 constructor and to vect_compile_time_alias.
17553 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17555 (vect_loop_versioning): Call it.
17556 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17558 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17561 Alan Hayward <alan.hayward@arm.com>
17562 David Sherwood <david.sherwood@arm.com>
17564 * doc/sourcebuild.texi (vect_scatter_store): Document.
17565 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17567 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17569 * genopinit.c (main): Add supports_vec_scatter_store and
17570 supports_vec_scatter_store_cached to target_optabs.
17571 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17572 IFN_MASK_SCATTER_STORE.
17573 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17575 * internal-fn.h (internal_store_fn_p): Declare.
17576 (internal_fn_stored_value_index): Likewise.
17577 * internal-fn.c (scatter_store_direct): New macro.
17578 (expand_scatter_store_optab_fn): New function.
17579 (direct_scatter_store_optab_supported_p): New macro.
17580 (internal_store_fn_p): New function.
17581 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17582 IFN_MASK_SCATTER_STORE.
17583 (internal_fn_mask_index): Likewise.
17584 (internal_fn_stored_value_index): New function.
17585 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17586 for scatter stores.
17587 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17588 * optabs-query.c (supports_vec_scatter_store_p): New function.
17589 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17590 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17591 true for scatter stores.
17592 (vect_gather_scatter_fn_p): Handle scatter stores too.
17593 (vect_check_gather_scatter): Consider using scatter stores if
17594 supports_vec_scatter_store_p.
17595 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17596 scatter stores too.
17597 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17598 internal_fn_stored_value_index.
17599 (check_load_store_masking): Handle scatter stores too.
17600 (vect_get_store_rhs): Make public.
17601 (vectorizable_call): Use internal_store_fn_p.
17602 (vectorizable_store): Handle scatter store internal functions.
17603 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17604 when deciding whether the end of the group has been reached.
17605 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17606 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17607 (mask_scatter_store<mode>): New insns.
17609 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17610 Alan Hayward <alan.hayward@arm.com>
17611 David Sherwood <david.sherwood@arm.com>
17613 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17614 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17615 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17617 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17618 Use vect_truncate_gather_scatter_offset if we can't treat the
17619 operation as a normal gather load or scatter store.
17620 (get_group_load_store_type): Take the gather_scatter_info
17621 as argument. Try using a gather load or scatter store for
17622 single-element groups.
17623 (get_load_store_type): Update calls to get_group_load_store_type
17624 and vect_use_strided_gather_scatters_p.
17626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17627 Alan Hayward <alan.hayward@arm.com>
17628 David Sherwood <david.sherwood@arm.com>
17630 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17631 optional tree argument.
17632 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17634 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17635 but continue to use the current value as a fallback.
17636 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17637 to compare the updates.
17638 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17639 (get_load_store_type): Use it when handling a strided access.
17640 (vect_get_strided_load_store_ops): New function.
17641 (vect_get_data_ptr_increment): Likewise.
17642 (vectorizable_load): Handle strided gather loads. Always pass
17643 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17646 Alan Hayward <alan.hayward@arm.com>
17647 David Sherwood <david.sherwood@arm.com>
17649 * doc/md.texi (gather_load@var{m}): Document.
17650 (mask_gather_load@var{m}): Likewise.
17651 * genopinit.c (main): Add supports_vec_gather_load and
17652 supports_vec_gather_load_cached to target_optabs.
17653 * optabs-tree.c (init_tree_optimization_optabs): Use
17654 ggc_cleared_alloc to allocate target_optabs.
17655 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17656 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17658 * internal-fn.h (internal_load_fn_p): Declare.
17659 (internal_gather_scatter_fn_p): Likewise.
17660 (internal_fn_mask_index): Likewise.
17661 (internal_gather_scatter_fn_supported_p): Likewise.
17662 * internal-fn.c (gather_load_direct): New macro.
17663 (expand_gather_load_optab_fn): New function.
17664 (direct_gather_load_optab_supported_p): New macro.
17665 (direct_internal_fn_optab): New function.
17666 (internal_load_fn_p): Likewise.
17667 (internal_gather_scatter_fn_p): Likewise.
17668 (internal_fn_mask_index): Likewise.
17669 (internal_gather_scatter_fn_supported_p): Likewise.
17670 * optabs-query.c (supports_at_least_one_mode_p): New function.
17671 (supports_vec_gather_load_p): Likewise.
17672 * optabs-query.h (supports_vec_gather_load_p): Declare.
17673 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17674 and memory_type field.
17675 (NUM_PATTERNS): Bump to 15.
17676 * tree-vect-data-refs.c: Include internal-fn.h.
17677 (vect_gather_scatter_fn_p): New function.
17678 (vect_describe_gather_scatter_call): Likewise.
17679 (vect_check_gather_scatter): Try using internal functions for
17680 gather loads. Recognize existing calls to a gather load function.
17681 (vect_analyze_data_refs): Consider using gather loads if
17682 supports_vec_gather_load_p.
17683 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17684 (vect_get_gather_scatter_offset_type): Likewise.
17685 (vect_convert_mask_for_vectype): Likewise.
17686 (vect_add_conversion_to_patterm): Likewise.
17687 (vect_try_gather_scatter_pattern): Likewise.
17688 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17689 (vect_vect_recog_func_ptrs): Add it.
17690 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17691 internal_fn_mask_index and internal_gather_scatter_fn_p.
17692 (check_load_store_masking): Take the gather_scatter_info as an
17693 argument and handle gather loads.
17694 (vect_get_gather_scatter_ops): New function.
17695 (vectorizable_call): Check internal_load_fn_p.
17696 (vectorizable_load): Likewise. Handle gather load internal
17698 (vectorizable_store): Update call to check_load_store_masking.
17699 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17700 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17701 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17702 (aarch64_gather_scale_operand_d): New predicates.
17703 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17704 (mask_gather_load<mode>): New insns.
17706 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17707 Alan Hayward <alan.hayward@arm.com>
17708 David Sherwood <david.sherwood@arm.com>
17710 * optabs.def (fold_left_plus_optab): New optab.
17711 * doc/md.texi (fold_left_plus_@var{m}): Document.
17712 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17713 * internal-fn.c (fold_left_direct): Define.
17714 (expand_fold_left_optab_fn): Likewise.
17715 (direct_fold_left_optab_supported_p): Likewise.
17716 * fold-const-call.c (fold_const_fold_left): New function.
17717 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17718 * tree-parloops.c (valid_reduction_p): New function.
17719 (gather_scalar_reductions): Use it.
17720 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17721 (vect_finish_replace_stmt): Declare.
17722 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17723 (needs_fold_left_reduction_p): New function, split out from...
17724 (vect_is_simple_reduction): ...here. Accept reductions that
17725 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17726 (vect_force_simple_reduction): Also store the reduction type in
17727 the assignment's STMT_VINFO_REDUC_TYPE.
17728 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17729 (merge_with_identity): New function.
17730 (vect_expand_fold_left): Likewise.
17731 (vectorize_fold_left_reduction): Likewise.
17732 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17733 scalar phi in place for it. Check for target support and reject
17734 cases that would reassociate the operation. Defer the transform
17735 phase to vectorize_fold_left_reduction.
17736 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17737 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17738 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17740 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17742 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17743 call to ifc_temp_var.
17745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17746 Alan Hayward <alan.hayward@arm.com>
17747 David Sherwood <david.sherwood@arm.com>
17749 * target.def (legitimize_address_displacement): Take the original
17750 offset as a poly_int.
17751 * targhooks.h (default_legitimize_address_displacement): Update
17753 * targhooks.c (default_legitimize_address_displacement): Likewise.
17754 * doc/tm.texi: Regenerate.
17755 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17756 as an argument, moving assert of ad->disp == ad->disp_term to...
17757 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17758 Try calling targetm.legitimize_address_displacement before expanding
17759 the address rather than afterwards, and adjust for the new interface.
17760 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17761 Match the new hook interface. Handle SVE addresses.
17762 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17763 new hook interface.
17765 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17767 * Makefile.in (OBJS): Add early-remat.o.
17768 * target.def (select_early_remat_modes): New hook.
17769 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17770 * doc/tm.texi: Regenerate.
17771 * targhooks.h (default_select_early_remat_modes): Declare.
17772 * targhooks.c (default_select_early_remat_modes): New function.
17773 * timevar.def (TV_EARLY_REMAT): New timevar.
17774 * passes.def (pass_early_remat): New pass.
17775 * tree-pass.h (make_pass_early_remat): Declare.
17776 * early-remat.c: New file.
17777 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17779 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
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 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17786 vfm1 with a bound_epilog parameter.
17787 (vect_do_peeling): Update calls accordingly, and move the prologue
17788 call earlier in the function. Treat the base bound_epilog as 0 for
17789 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17790 this base when peeling for gaps.
17791 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17792 with fully-masked loops.
17793 (vect_estimate_min_profitable_iters): Handle the single peeled
17794 iteration in that case.
17796 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17797 Alan Hayward <alan.hayward@arm.com>
17798 David Sherwood <david.sherwood@arm.com>
17800 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17801 single-element interleaving even if the size is not a power of 2.
17802 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17803 accesses for single-element interleaving if the group size is
17806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17807 Alan Hayward <alan.hayward@arm.com>
17808 David Sherwood <david.sherwood@arm.com>
17810 * doc/md.texi (fold_extract_last_@var{m}): Document.
17811 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17812 * optabs.def (fold_extract_last_optab): New optab.
17813 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17814 * internal-fn.c (fold_extract_direct): New macro.
17815 (expand_fold_extract_optab_fn): Likewise.
17816 (direct_fold_extract_optab_supported_p): Likewise.
17817 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17818 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17819 EXTRACT_LAST_REDUCTION.
17820 (get_initial_def_for_reduction): Do not create an initial vector
17821 for EXTRACT_LAST_REDUCTION reductions.
17822 (vectorizable_reduction): Leave the scalar phi in place for
17823 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17824 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17825 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17826 transform phase to vectorizable_condition.
17827 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17829 (vect_finish_stmt_generation): ...here.
17830 (vect_finish_replace_stmt): New function.
17831 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17832 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17834 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17836 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17837 Alan Hayward <alan.hayward@arm.com>
17838 David Sherwood <david.sherwood@arm.com>
17840 * doc/md.texi (extract_last_@var{m}): Document.
17841 * optabs.def (extract_last_optab): New optab.
17842 * internal-fn.def (EXTRACT_LAST): New internal function.
17843 * internal-fn.c (cond_unary_direct): New macro.
17844 (expand_cond_unary_optab_fn): Likewise.
17845 (direct_cond_unary_optab_supported_p): Likewise.
17846 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17847 loops using EXTRACT_LAST.
17848 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17849 (extract_last_<mode>): ...this optab.
17850 (vec_extract<mode><Vel>): Update accordingly.
17852 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17853 Alan Hayward <alan.hayward@arm.com>
17854 David Sherwood <david.sherwood@arm.com>
17856 * target.def (empty_mask_is_expensive): New hook.
17857 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17858 * doc/tm.texi: Regenerate.
17859 * targhooks.h (default_empty_mask_is_expensive): Declare.
17860 * targhooks.c (default_empty_mask_is_expensive): New function.
17861 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17862 if the target says that empty masks are expensive.
17863 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17865 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17867 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17868 Alan Hayward <alan.hayward@arm.com>
17869 David Sherwood <david.sherwood@arm.com>
17871 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17872 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17873 (vect_use_loop_mask_for_alignment_p): New function.
17874 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17875 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17876 niters_skip argument. Make sure that the first niters_skip elements
17877 of the first iteration are inactive.
17878 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17879 Update call to vect_set_loop_masks_directly.
17880 (get_misalign_in_elems): New function, split out from...
17881 (vect_gen_prolog_loop_niters): ...here.
17882 (vect_update_init_of_dr): Take a code argument that specifies whether
17883 the adjustment should be added or subtracted.
17884 (vect_update_init_of_drs): Likewise.
17885 (vect_prepare_for_masked_peels): New function.
17886 (vect_do_peeling): Skip prologue peeling if we're using a mask
17887 instead. Update call to vect_update_inits_of_drs.
17888 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17890 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17891 alignment. Do not include the number of peeled iterations in
17892 the minimum threshold in that case.
17893 (vectorizable_induction): Adjust the start value down by
17894 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17895 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17896 Take the number of skipped iterations into account when calculating
17898 * tree-vect-stmts.c (vect_gen_while_not): New function.
17900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17901 Alan Hayward <alan.hayward@arm.com>
17902 David Sherwood <david.sherwood@arm.com>
17904 * doc/sourcebuild.texi (vect_fully_masked): Document.
17905 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17906 default value to 0.
17907 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17909 (vect_analyze_loop_2): ...here. Don't check the vectorization
17910 factor against the number of loop iterations if the loop is
17913 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17914 Alan Hayward <alan.hayward@arm.com>
17915 David Sherwood <david.sherwood@arm.com>
17917 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17918 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17919 (dump_groups): Update accordingly.
17920 (iv_use::mem_type): New member variable.
17921 (address_p): New function.
17922 (record_use): Add a mem_type argument and initialize the new
17924 (record_group_use): Add a mem_type argument. Use address_p.
17925 Remove obsolete null checks of base_object. Update call to record_use.
17926 (find_interesting_uses_op): Update call to record_group_use.
17927 (find_interesting_uses_cond): Likewise.
17928 (find_interesting_uses_address): Likewise.
17929 (get_mem_type_for_internal_fn): New function.
17930 (find_address_like_use): Likewise.
17931 (find_interesting_uses_stmt): Try find_address_like_use before
17932 calling find_interesting_uses_op.
17933 (addr_offset_valid_p): Use the iv mem_type field as the type
17934 of the addressed memory.
17935 (add_autoinc_candidates): Likewise.
17936 (get_address_cost): Likewise.
17937 (split_small_address_groups_p): Use address_p.
17938 (split_address_groups): Likewise.
17939 (add_iv_candidate_for_use): Likewise.
17940 (autoinc_possible_for_pair): Likewise.
17941 (rewrite_groups): Likewise.
17942 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17943 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17944 (get_alias_ptr_type_for_ptr_address): New function.
17945 (rewrite_use_address): Rewrite address uses in calls that were
17946 identified by find_address_like_use.
17948 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17949 Alan Hayward <alan.hayward@arm.com>
17950 David Sherwood <david.sherwood@arm.com>
17952 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17954 * gimple-expr.h (is_gimple_addressable: Likewise.
17955 * gimple-expr.c (is_gimple_address): Likewise.
17956 * internal-fn.c (expand_call_mem_ref): New function.
17957 (expand_mask_load_optab_fn): Use it.
17958 (expand_mask_store_optab_fn): Likewise.
17960 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17961 Alan Hayward <alan.hayward@arm.com>
17962 David Sherwood <david.sherwood@arm.com>
17964 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17965 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17966 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17967 (cond_umax@var{mode}): Document.
17968 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17969 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17970 (cond_umin_optab, cond_umax_optab): New optabs.
17971 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17972 (COND_IOR, COND_XOR): New internal functions.
17973 * internal-fn.h (get_conditional_internal_fn): Declare.
17974 * internal-fn.c (cond_binary_direct): New macro.
17975 (expand_cond_binary_optab_fn): Likewise.
17976 (direct_cond_binary_optab_supported_p): Likewise.
17977 (get_conditional_internal_fn): New function.
17978 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17979 Cope with reduction statements that are vectorized as calls rather
17981 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17982 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17983 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17984 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17985 (UNSPEC_COND_EOR): New unspecs.
17986 (optab): Add mappings for them.
17987 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17988 (sve_int_op, sve_fp_op): New int attributes.
17990 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17991 Alan Hayward <alan.hayward@arm.com>
17992 David Sherwood <david.sherwood@arm.com>
17994 * optabs.def (while_ult_optab): New optab.
17995 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17996 * internal-fn.def (WHILE_ULT): New internal function.
17997 * internal-fn.h (direct_internal_fn_supported_p): New override
17998 that takes two types as argument.
17999 * internal-fn.c (while_direct): New macro.
18000 (expand_while_optab_fn): New function.
18001 (convert_optab_supported_p): Likewise.
18002 (direct_while_optab_supported_p): New macro.
18003 * wide-int.h (wi::udiv_ceil): New function.
18004 * tree-vectorizer.h (rgroup_masks): New structure.
18005 (vec_loop_masks): New typedef.
18006 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18007 and fully_masked_p.
18008 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18009 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18010 (vect_max_vf): New function.
18011 (slpeel_make_loop_iterate_ntimes): Delete.
18012 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18013 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18014 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18015 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18016 internal-fn.h, stor-layout.h and optabs-query.h.
18017 (vect_set_loop_mask): New function.
18018 (add_preheader_seq): Likewise.
18019 (add_header_seq): Likewise.
18020 (interleave_supported_p): Likewise.
18021 (vect_maybe_permute_loop_masks): Likewise.
18022 (vect_set_loop_masks_directly): Likewise.
18023 (vect_set_loop_condition_masked): Likewise.
18024 (vect_set_loop_condition_unmasked): New function, split out from
18025 slpeel_make_loop_iterate_ntimes.
18026 (slpeel_make_loop_iterate_ntimes): Rename to..
18027 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18028 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18029 (vect_do_peeling): Update call accordingly.
18030 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18032 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18033 mask_compare_type, can_fully_mask_p and fully_masked_p.
18034 (release_vec_loop_masks): New function.
18035 (_loop_vec_info): Use it to free the loop masks.
18036 (can_produce_all_loop_masks_p): New function.
18037 (vect_get_max_nscalars_per_iter): Likewise.
18038 (vect_verify_full_masking): Likewise.
18039 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18040 retries, and free the mask rgroups before retrying. Check loop-wide
18041 reasons for disallowing fully-masked loops. Make the final decision
18042 about whether use a fully-masked loop or not.
18043 (vect_estimate_min_profitable_iters): Do not assume that peeling
18044 for the number of iterations will be needed for fully-masked loops.
18045 (vectorizable_reduction): Disable fully-masked loops.
18046 (vectorizable_live_operation): Likewise.
18047 (vect_halve_mask_nunits): New function.
18048 (vect_double_mask_nunits): Likewise.
18049 (vect_record_loop_mask): Likewise.
18050 (vect_get_loop_mask): Likewise.
18051 (vect_transform_loop): Handle the case in which the final loop
18052 iteration might handle a partial vector. Call vect_set_loop_condition
18053 instead of slpeel_make_loop_iterate_ntimes.
18054 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18055 (check_load_store_masking): New function.
18056 (prepare_load_store_mask): Likewise.
18057 (vectorizable_store): Handle fully-masked loops.
18058 (vectorizable_load): Likewise.
18059 (supportable_widening_operation): Use vect_halve_mask_nunits for
18061 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18062 (vect_gen_while): New function.
18063 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18064 (aarch64_uqdec<mode>): New insn.
18066 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18067 Alan Hayward <alan.hayward@arm.com>
18068 David Sherwood <david.sherwood@arm.com>
18070 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18071 (reduc_xor_scal_optab): New optabs.
18072 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18073 (reduc_xor_scal_@var{m}): Document.
18074 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18075 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18076 internal functions.
18077 * fold-const-call.c (fold_const_call): Handle them.
18078 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18079 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18080 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18081 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18082 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18083 (UNSPEC_XORV): New unspecs.
18084 (optab): Add entries for them.
18085 (BITWISEV): New int iterator.
18086 (bit_reduc_op): New int attributes.
18088 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18089 Alan Hayward <alan.hayward@arm.com>
18090 David Sherwood <david.sherwood@arm.com>
18092 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18093 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18094 * optabs.def (vec_shl_insert_optab): New optab.
18095 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18096 (duplicate_and_interleave): Likewise.
18097 * tree-vect-loop.c: Include internal-fn.h.
18098 (neutral_op_for_slp_reduction): New function, split out from
18099 get_initial_defs_for_reduction.
18100 (get_initial_def_for_reduction): Handle option 2 for variable-length
18101 vectors by loading the neutral value into a vector and then shifting
18102 the initial value into element 0.
18103 (get_initial_defs_for_reduction): Replace the code argument with
18104 the neutral value calculated by neutral_op_for_slp_reduction.
18105 Use gimple_build_vector for constant-length vectors.
18106 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18107 but the first group_size elements have a neutral value.
18108 Use duplicate_and_interleave otherwise.
18109 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18110 Update call to get_initial_defs_for_reduction. Handle SLP
18111 reductions for variable-length vectors by creating one vector
18112 result for each scalar result, with the elements associated
18113 with other scalar results stubbed out with the neutral value.
18114 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18115 Require IFN_VEC_SHL_INSERT for double reductions on
18116 variable-length vectors, or SLP reductions that have
18117 a neutral value. Require can_duplicate_and_interleave_p
18118 support for variable-length unchained SLP reductions if there
18119 is no neutral value, such as for MIN/MAX reductions. Also require
18120 the number of vector elements to be a multiple of the number of
18121 SLP statements when doing variable-length unchained SLP reductions.
18122 Update call to vect_create_epilog_for_reduction.
18123 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18124 and remove initial values.
18125 (duplicate_and_interleave): Make public.
18126 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18127 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18129 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18130 Alan Hayward <alan.hayward@arm.com>
18131 David Sherwood <david.sherwood@arm.com>
18133 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18134 (can_duplicate_and_interleave_p): New function.
18135 (vect_get_and_check_slp_defs): Take the vector of statements
18136 rather than just the current one. Remove excess parentheses.
18137 Restriction rejectinon of vect_constant_def and vect_external_def
18138 for variable-length vectors to boolean types, or types for which
18139 can_duplicate_and_interleave_p is false.
18140 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18141 (duplicate_and_interleave): New function.
18142 (vect_get_constant_vectors): Use gimple_build_vector for
18143 constant-length vectors and suitable variable-length constant
18144 vectors. Use duplicate_and_interleave for other variable-length
18145 vectors. Don't defer the update when inserting new statements.
18147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18148 Alan Hayward <alan.hayward@arm.com>
18149 David Sherwood <david.sherwood@arm.com>
18151 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18152 min_profitable_iters doesn't go negative.
18154 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18155 Alan Hayward <alan.hayward@arm.com>
18156 David Sherwood <david.sherwood@arm.com>
18158 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18159 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18160 * optabs.def (vec_mask_load_lanes_optab): New optab.
18161 (vec_mask_store_lanes_optab): Likewise.
18162 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18163 (MASK_STORE_LANES): Likewise.
18164 * internal-fn.c (mask_load_lanes_direct): New macro.
18165 (mask_store_lanes_direct): Likewise.
18166 (expand_mask_load_optab_fn): Handle masked operations.
18167 (expand_mask_load_lanes_optab_fn): New macro.
18168 (expand_mask_store_optab_fn): Handle masked operations.
18169 (expand_mask_store_lanes_optab_fn): New macro.
18170 (direct_mask_load_lanes_optab_supported_p): Likewise.
18171 (direct_mask_store_lanes_optab_supported_p): Likewise.
18172 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18174 (vect_load_lanes_supported): Likewise.
18175 * tree-vect-data-refs.c (strip_conversion): New function.
18176 (can_group_stmts_p): Likewise.
18177 (vect_analyze_data_ref_accesses): Use it instead of checking
18178 for a pair of assignments.
18179 (vect_store_lanes_supported): Take a masked_p parameter.
18180 (vect_load_lanes_supported): Likewise.
18181 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18182 vect_store_lanes_supported and vect_load_lanes_supported.
18183 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18184 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18185 parameter. Don't allow gaps for masked accesses.
18186 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18187 and vect_load_lanes_supported.
18188 (get_load_store_type): Take a masked_p parameter and update
18189 call to get_group_load_store_type.
18190 (vectorizable_store): Update call to get_load_store_type.
18191 Handle IFN_MASK_STORE_LANES.
18192 (vectorizable_load): Update call to get_load_store_type.
18193 Handle IFN_MASK_LOAD_LANES.
18195 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18196 Alan Hayward <alan.hayward@arm.com>
18197 David Sherwood <david.sherwood@arm.com>
18199 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18201 * config/aarch64/aarch64-protos.h
18202 (aarch64_sve_struct_memory_operand_p): Declare.
18203 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18204 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18205 (VPRED, vpred): Handle SVE structure modes.
18206 * config/aarch64/constraints.md (Utx): New constraint.
18207 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18208 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18209 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18210 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18211 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18212 structure modes. Split into pieces after RA.
18213 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18214 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18216 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18217 SVE structure modes.
18218 (aarch64_classify_address): Likewise.
18219 (sizetochar): Move earlier in file.
18220 (aarch64_print_operand): Handle SVE register lists.
18221 (aarch64_array_mode): New function.
18222 (aarch64_sve_struct_memory_operand_p): Likewise.
18223 (TARGET_ARRAY_MODE): Redefine.
18225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18226 Alan Hayward <alan.hayward@arm.com>
18227 David Sherwood <david.sherwood@arm.com>
18229 * target.def (array_mode): New target hook.
18230 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18231 * doc/tm.texi: Regenerate.
18232 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18233 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18234 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18235 targetm.array_mode.
18236 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18239 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18240 Alan Hayward <alan.hayward@arm.com>
18241 David Sherwood <david.sherwood@arm.com>
18243 * fold-const.c (fold_binary_loc): Check the argument types
18244 rather than the result type when testing for a vector operation.
18246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18248 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18249 * doc/tm.texi: Regenerate.
18251 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18252 Alan Hayward <alan.hayward@arm.com>
18253 David Sherwood <david.sherwood@arm.com>
18255 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18256 (sve): Document new AArch64 extension.
18257 * doc/md.texi (w): Extend the description of the AArch64
18258 constraint to include SVE vectors.
18259 (Upl, Upa): Document new AArch64 predicate constraints.
18260 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18262 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18263 (msve-vector-bits=): New option.
18264 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18265 SVE when these are disabled.
18266 (sve): New extension.
18267 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18268 modes. Adjust their number of units based on aarch64_sve_vg.
18269 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18270 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18271 aarch64_addr_query_type.
18272 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18273 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18274 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18275 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18276 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18277 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18278 (aarch64_simd_imm_zero_p): Delete.
18279 (aarch64_check_zero_based_sve_index_immediate): Declare.
18280 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18281 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18282 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18283 (aarch64_sve_float_mul_immediate_p): Likewise.
18284 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18285 rather than an rtx.
18286 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18287 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18288 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18289 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18290 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18291 (aarch64_regmode_natural_size): Likewise.
18292 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18293 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18295 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18296 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18297 for VG and the SVE predicate registers.
18298 (V_ALIASES): Add a "z"-prefixed alias.
18299 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18300 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18301 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18302 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18303 (REG_CLASS_NAMES): Add entries for them.
18304 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18305 and the predicate registers.
18306 (aarch64_sve_vg): Declare.
18307 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18308 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18309 (REGMODE_NATURAL_SIZE): Define.
18310 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18312 * config/aarch64/aarch64.c: Include cfgrtl.h.
18313 (simd_immediate_info): Add a constructor for series vectors,
18314 and an associated step field.
18315 (aarch64_sve_vg): New variable.
18316 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18317 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18318 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18319 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18320 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18321 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18322 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18323 (aarch64_get_mask_mode): New functions.
18324 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18325 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18326 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18327 predicate modes and predicate registers. Explicitly restrict
18328 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18329 to store a vector mode if it is recognized by
18330 aarch64_classify_vector_mode.
18331 (aarch64_regmode_natural_size): New function.
18332 (aarch64_hard_regno_caller_save_mode): Return the original mode
18334 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18335 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18336 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18337 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18339 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18340 does not overlap dest if the function is frame-related. Handle
18342 (aarch64_split_add_offset): New function.
18343 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18344 them aarch64_add_offset.
18345 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18346 and update call to aarch64_sub_sp.
18347 (aarch64_add_cfa_expression): New function.
18348 (aarch64_expand_prologue): Pass extra temporary registers to the
18349 functions above. Handle the case in which we need to emit new
18350 DW_CFA_expressions for registers that were originally saved
18351 relative to the stack pointer, but now have to be expressed
18352 relative to the frame pointer.
18353 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18355 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18356 IP0 and IP1 values for SVE frames.
18357 (aarch64_expand_vec_series): New function.
18358 (aarch64_expand_sve_widened_duplicate): Likewise.
18359 (aarch64_expand_sve_const_vector): Likewise.
18360 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18361 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18362 into the register, rather than emitting a SET directly.
18363 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18364 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18365 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18366 (offset_9bit_signed_scaled_p): New functions.
18367 (aarch64_replicate_bitmask_imm): New function.
18368 (aarch64_bitmask_imm): Use it.
18369 (aarch64_cannot_force_const_mem): Reject expressions involving
18370 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18371 (aarch64_classify_index): Handle SVE indices, by requiring
18372 a plain register index with a scale that matches the element size.
18373 (aarch64_classify_address): Handle SVE addresses. Assert that
18374 the mode of the address is VOIDmode or an integer mode.
18375 Update call to aarch64_classify_symbol.
18376 (aarch64_classify_symbolic_expression): Update call to
18377 aarch64_classify_symbol.
18378 (aarch64_const_vec_all_in_range_p): New function.
18379 (aarch64_print_vector_float_operand): Likewise.
18380 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18381 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18382 and the FP immediates 1.0 and 0.5.
18383 (aarch64_print_address_internal): Handle SVE addresses.
18384 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18385 (aarch64_regno_regclass): Handle predicate registers.
18386 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18388 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18389 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18390 (aarch64_convert_sve_vector_bits): New function.
18391 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18392 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18393 rather than an rtx.
18394 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18395 Handle SVE vector and predicate modes. Accept VL-based constants
18396 that need only one temporary register, and VL offsets that require
18397 no temporary registers.
18398 (aarch64_conditional_register_usage): Mark the predicate registers
18399 as fixed if SVE isn't available.
18400 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18401 Return true for SVE vector and predicate modes.
18402 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18403 rather than an unsigned int. Handle SVE modes.
18404 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18406 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18408 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18409 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18410 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18411 (aarch64_sve_float_mul_immediate_p): New functions.
18412 (aarch64_sve_valid_immediate): New function.
18413 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18414 Explicitly reject structure modes. Check for INDEX constants.
18415 Handle PTRUE and PFALSE constants.
18416 (aarch64_check_zero_based_sve_index_immediate): New function.
18417 (aarch64_simd_imm_zero_p): Delete.
18418 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18419 vector modes. Accept constants in the range of CNT[BHWD].
18420 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18421 ask for an Advanced SIMD mode.
18422 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18423 (aarch64_simd_vector_alignment): Handle SVE predicates.
18424 (aarch64_vectorize_preferred_vector_alignment): New function.
18425 (aarch64_simd_vector_alignment_reachable): Use it instead of
18427 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18428 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18430 (MAX_VECT_LEN): Delete.
18431 (expand_vec_perm_d): Add a vec_flags field.
18432 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18433 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18434 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18436 (aarch64_evpc_rev): Rename to...
18437 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18438 (aarch64_evpc_rev_global): New function.
18439 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18440 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18442 (aarch64_evpc_sve_tbl): New function.
18443 (aarch64_expand_vec_perm_const_1): Update after rename of
18444 aarch64_evpc_rev. Handle SVE permutes too, trying
18445 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18446 than aarch64_evpc_tbl.
18447 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18448 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18449 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18450 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18451 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18452 (aarch64_expand_sve_vcond): New functions.
18453 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18454 of aarch64_vector_mode_p.
18455 (aarch64_dwarf_poly_indeterminate_value): New function.
18456 (aarch64_compute_pressure_classes): Likewise.
18457 (aarch64_can_change_mode_class): Likewise.
18458 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18459 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18460 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18461 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18462 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18463 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18464 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18465 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18467 (Dn, Dl, Dr): Accept const as well as const_vector.
18468 (Dz): Likewise. Compare against CONST0_RTX.
18469 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18470 of "vector" where appropriate.
18471 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18472 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18473 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18474 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18475 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18476 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18477 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18478 (v_int_equiv): Extend to SVE modes.
18479 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18481 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18482 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18483 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18484 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18485 (SVE_COND_FP_CMP): New int iterators.
18486 (perm_hilo): Handle the new unpack unspecs.
18487 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18489 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18490 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18491 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18492 (aarch64_equality_operator, aarch64_constant_vector_operand)
18493 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18494 (aarch64_sve_nonimmediate_operand): Likewise.
18495 (aarch64_sve_general_operand): Likewise.
18496 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18497 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18498 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18499 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18500 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18501 (aarch64_sve_float_arith_immediate): Likewise.
18502 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18503 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18504 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18505 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18506 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18507 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18508 (aarch64_sve_float_arith_operand): Likewise.
18509 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18510 (aarch64_sve_float_mul_operand): Likewise.
18511 (aarch64_sve_vec_perm_operand): Likewise.
18512 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18513 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18514 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18515 as well as const_vector.
18516 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18517 in file. Use CONST0_RTX and CONSTM1_RTX.
18518 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18519 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18520 Use aarch64_simd_imm_zero.
18521 * config/aarch64/aarch64-sve.md: New file.
18522 * config/aarch64/aarch64.md: Include it.
18523 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18524 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18525 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18526 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18527 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18528 (sve): New attribute.
18529 (enabled): Disable instructions with the sve attribute unless
18531 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18532 aarch64_expand_mov_immediate.
18533 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18534 CNT[BHSD] immediates.
18535 (movti): Split CONST_POLY_INT moves into two halves.
18536 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18537 Split additions that need a temporary here if the destination
18538 is the stack pointer.
18539 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18540 (*add<mode>3_poly_1): New instruction.
18541 (set_clobber_cc): New expander.
18543 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18545 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18546 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18547 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18548 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18549 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18550 Change innermode from fixed_mode_size to machine_mode.
18551 (simplify_subreg): Update call accordingly. Handle a constant-sized
18552 subreg of a variable-length CONST_VECTOR.
18554 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18555 Alan Hayward <alan.hayward@arm.com>
18556 David Sherwood <david.sherwood@arm.com>
18558 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18559 (add_offset_to_base): New function, split out from...
18560 (create_mem_ref): ...here. When handling a scale other than 1,
18561 check first whether the address is valid without the offset.
18562 Add it into the base if so, leaving the index and scale as-is.
18564 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18567 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18568 fold_for_warn before checking if arg2 is INTEGER_CST.
18570 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18572 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18573 (store_multiple_operation): Delete.
18574 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18575 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18576 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18577 guarded by TARGET_STRING.
18578 (rs6000_output_load_multiple): Delete.
18579 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18580 OPTION_MASK_STRING / TARGET_STRING handling.
18581 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18582 (const rs6000_opt_masks) <"string">: Change mask to 0.
18583 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18584 (MASK_STRING): Delete.
18585 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18587 (load_multiple): Delete.
18594 (store_multiple): Delete.
18601 (movmemsi_8reg): Delete.
18602 (corresponding unnamed define_insn): Delete.
18603 (movmemsi_6reg): Delete.
18604 (corresponding unnamed define_insn): Delete.
18605 (movmemsi_4reg): Delete.
18606 (corresponding unnamed define_insn): Delete.
18607 (movmemsi_2reg): Delete.
18608 (corresponding unnamed define_insn): Delete.
18609 (movmemsi_1reg): Delete.
18610 (corresponding unnamed define_insn): Delete.
18611 * config/rs6000/rs6000.opt (mno-string): New.
18612 (mstring): Replace by deprecation warning stub.
18613 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18615 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18617 * regrename.c (regrename_do_replace): If replacing the same
18618 reg multiple times, try to reuse last created gen_raw_REG.
18621 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18622 main to workaround a bug in GDB.
18624 2018-01-12 Tom de Vries <tom@codesourcery.com>
18627 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18629 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18631 PR rtl-optimization/80481
18632 * ira-color.c (get_cap_member): New function.
18633 (allocnos_conflict_by_live_ranges_p): Use it.
18634 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18635 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18637 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18640 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18641 (*saddl_se_1): Ditto.
18642 (*ssubsi_1): Ditto.
18643 (*ssubl_se_1): Ditto.
18645 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18647 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18648 rather than wi::to_widest for DR_INITs.
18649 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18650 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18651 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18653 (vect_analyze_group_access_1): Note that here.
18655 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18657 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18658 polynomial type sizes.
18660 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18662 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18663 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18664 (gimple_add_tmp_var): Likewise.
18666 2018-01-12 Martin Liska <mliska@suse.cz>
18668 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18669 (gimple_alloc_sizes): Likewise.
18670 (dump_gimple_statistics): Use PRIu64 in printf format.
18671 * gimple.h: Change uint64_t to int.
18673 2018-01-12 Martin Liska <mliska@suse.cz>
18675 * tree-core.h: Use uint64_t instead of int.
18676 * tree.c (tree_node_counts): Likewise.
18677 (tree_node_sizes): Likewise.
18678 (dump_tree_statistics): Use PRIu64 in printf format.
18680 2018-01-12 Martin Liska <mliska@suse.cz>
18682 * Makefile.in: As qsort_chk is implemented in vec.c, add
18683 vec.o to linkage of gencfn-macros.
18684 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18685 passing the info to record_node_allocation_statistics.
18686 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18688 * ggc-common.c (struct ggc_usage): Add operator== and use
18689 it in operator< and compare function.
18690 * mem-stats.h (struct mem_usage): Likewise.
18691 * vec.c (struct vec_usage): Remove operator< and compare
18692 function. Can be simply inherited.
18694 2018-01-12 Martin Jambor <mjambor@suse.cz>
18697 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18698 * tree-ssa-math-opts.c: Include domwalk.h.
18699 (convert_mult_to_fma_1): New function.
18700 (fma_transformation_info): New type.
18701 (fma_deferring_state): Likewise.
18702 (cancel_fma_deferring): New function.
18703 (result_of_phi): Likewise.
18704 (last_fma_candidate_feeds_initial_phi): Likewise.
18705 (convert_mult_to_fma): Added deferring logic, split actual
18706 transformation to convert_mult_to_fma_1.
18707 (math_opts_dom_walker): New type.
18708 (math_opts_dom_walker::after_dom_children): New method, body moved
18709 here from pass_optimize_widening_mul::execute, added deferring logic
18711 (pass_optimize_widening_mul::execute): Moved most of code to
18712 math_opts_dom_walker::after_dom_children.
18713 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18714 * config/i386/i386.c (ix86_option_override_internal): Added
18715 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18717 2018-01-12 Richard Biener <rguenther@suse.de>
18720 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18721 inline instance vars.
18723 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18726 * config/rx/rx.c (rx_is_restricted_memory_address):
18727 Handle SUBREG case.
18729 2018-01-12 Richard Biener <rguenther@suse.de>
18731 PR tree-optimization/80846
18732 * target.def (split_reduction): New target hook.
18733 * targhooks.c (default_split_reduction): New function.
18734 * targhooks.h (default_split_reduction): Declare.
18735 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18736 target requests first reduce vectors by combining low and high
18738 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18739 (get_vectype_for_scalar_type_and_size): Export.
18740 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18741 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18742 * doc/tm.texi: Regenerate.
18743 * config/i386/i386.c (ix86_split_reduction): Implement
18744 TARGET_VECTORIZE_SPLIT_REDUCTION.
18746 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18749 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18750 in PIC mode except for TARGET_VXWORKS_RTP.
18751 * config/sparc/sparc.c: Include cfgrtl.h.
18752 (TARGET_INIT_PIC_REG): Define.
18753 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18754 (sparc_pic_register_p): New predicate.
18755 (sparc_legitimate_address_p): Use it.
18756 (sparc_legitimize_pic_address): Likewise.
18757 (sparc_delegitimize_address): Likewise.
18758 (sparc_mode_dependent_address_p): Likewise.
18759 (gen_load_pcrel_sym): Remove 4th parameter.
18760 (load_got_register): Adjust call to above. Remove obsolete stuff.
18761 (sparc_expand_prologue): Do not call load_got_register here.
18762 (sparc_flat_expand_prologue): Likewise.
18763 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18764 (sparc_use_pseudo_pic_reg): New function.
18765 (sparc_init_pic_reg): Likewise.
18766 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18767 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18769 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18771 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18772 Add item for branch_cost.
18774 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18776 PR rtl-optimization/83565
18777 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18778 not extend the result to a larger mode for rotate operations.
18779 (num_sign_bit_copies1): Likewise.
18781 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18784 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18786 Use values-Xc.o for -pedantic.
18787 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18789 2018-01-12 Martin Liska <mliska@suse.cz>
18792 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18794 (possible_polymorphic_call_targets): Use it.
18795 (ipa_devirt): Likewise.
18797 2018-01-12 Martin Liska <mliska@suse.cz>
18799 * profile-count.h (enum profile_quality): Use 0 as invalid
18800 enum value of profile_quality.
18802 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18804 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18805 -mext-string options.
18807 2018-01-12 Richard Biener <rguenther@suse.de>
18809 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18810 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18811 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18813 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18815 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18817 * configure.ac (--with-long-double-format): Add support for the
18818 configuration option to change the default long double format on
18820 * config.gcc (powerpc*-linux*-*): Likewise.
18821 * configure: Regenerate.
18822 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18823 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18824 used without modification.
18826 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18828 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18829 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18830 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18831 MISC_BUILTIN_SPEC_BARRIER.
18832 (rs6000_init_builtins): Likewise.
18833 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18835 (speculation_barrier): New define_insn.
18836 * doc/extend.texi: Document __builtin_speculation_barrier.
18838 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18841 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18842 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18843 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18845 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18846 integral modes instead of "ss" and "sd".
18847 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18848 vectors with 32-bit and 64-bit elements.
18849 (vecdupssescalarmodesuffix): New mode attribute.
18850 (vec_dup<mode>): Use it.
18852 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18855 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18856 frame if argument is passed on stack.
18858 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18861 * ree.c (combine_reaching_defs): Optimize also
18862 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18863 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18865 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18867 PR middle-end/83189
18868 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18870 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18872 PR middle-end/83718
18873 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18874 after they are computed.
18876 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18878 PR tree-optimization/83695
18879 * gimple-loop-linterchange.cc
18880 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18881 reset cached scev information after interchange.
18882 (pass_linterchange::execute): Remove call to scev_reset_htab.
18884 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18886 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18887 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18888 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18889 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18890 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18891 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18892 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18893 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18894 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18895 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18896 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18897 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18898 (V_lane_reg): Likewise.
18899 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18901 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18902 (vfmal_lane_low<mode>_intrinsic,
18903 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18904 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18905 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18906 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18907 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18908 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18910 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18912 * config/arm/arm-cpus.in (fp16fml): New feature.
18913 (ALL_SIMD): Add fp16fml.
18914 (armv8.2-a): Add fp16fml as an option.
18915 (armv8.3-a): Likewise.
18916 (armv8.4-a): Add fp16fml as part of fp16.
18917 * config/arm/arm.h (TARGET_FP16FML): Define.
18918 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18920 * config/arm/arm-modes.def (V2HF): Define.
18921 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18922 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18923 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18924 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18925 vfmsl_low, vfmsl_high): New set of builtins.
18926 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18927 (vfml_op): New code attribute.
18928 (VFMLHALVES): New int iterator.
18929 (VFML, VFMLSEL): New mode attributes.
18930 (V_reg): Define mapping for V2HF.
18931 (V_hi, V_lo): New mode attributes.
18932 (VF_constraint): Likewise.
18933 (vfml_half, vfml_half_selector): New int attributes.
18934 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18936 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18937 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18939 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18940 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18941 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18942 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18944 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18945 Document new effective target and option set.
18947 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18949 * config/arm/arm-cpus.in (armv8_4): New feature.
18950 (ARMv8_4a): New fgroup.
18951 (armv8.4-a): New arch.
18952 * config/arm/arm-tables.opt: Regenerate.
18953 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18954 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18955 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18956 Add matching rules for -march=armv8.4-a and extensions.
18957 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18959 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18962 * config/rx/rx.md (BW): New mode attribute.
18963 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18965 2018-01-11 Richard Biener <rguenther@suse.de>
18967 PR tree-optimization/83435
18968 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18969 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18970 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18972 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18973 Alan Hayward <alan.hayward@arm.com>
18974 David Sherwood <david.sherwood@arm.com>
18976 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18978 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18979 (aarch64_print_address_internal): Use it to check for a zero offset.
18981 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18982 Alan Hayward <alan.hayward@arm.com>
18983 David Sherwood <david.sherwood@arm.com>
18985 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18986 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18987 Return a poly_int64 rather than a HOST_WIDE_INT.
18988 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18989 rather than a HOST_WIDE_INT.
18990 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18991 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18992 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18993 final_offset from HOST_WIDE_INT to poly_int64.
18994 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18995 to_constant when getting the number of units in an Advanced SIMD
18997 (aarch64_builtin_vectorized_function): Check for a constant number
18999 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19001 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19002 attribute instead of GET_MODE_NUNITS.
19003 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19004 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19005 GET_MODE_SIZE for fixed-size registers.
19006 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19007 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19008 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19009 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19010 (aarch64_print_operand, aarch64_print_address_internal)
19011 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19012 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19013 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19014 Handle polynomial GET_MODE_SIZE.
19015 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19016 wider than SImode without modification.
19017 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19018 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19019 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19020 passing and returning SVE modes.
19021 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19022 rather than GEN_INT.
19023 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19024 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19025 (aarch64_allocate_and_probe_stack_space): Likewise.
19026 (aarch64_layout_frame): Cope with polynomial offsets.
19027 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19028 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19029 polynomial offsets.
19030 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19031 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19032 poly_int64 rather than a HOST_WIDE_INT.
19033 (aarch64_get_separate_components, aarch64_process_components)
19034 (aarch64_expand_prologue, aarch64_expand_epilogue)
19035 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19036 (aarch64_anchor_offset): New function, split out from...
19037 (aarch64_legitimize_address): ...here.
19038 (aarch64_builtin_vectorization_cost): Handle polynomial
19039 TYPE_VECTOR_SUBPARTS.
19040 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19042 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19043 number of elements from the PARALLEL rather than the mode.
19044 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19045 rather than GET_MODE_BITSIZE.
19046 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19047 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19048 (aarch64_expand_vec_perm_const_1): Handle polynomial
19049 d->perm.length () and d->perm elements.
19050 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19051 Apply to_constant to d->perm elements.
19052 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19053 polynomial CONST_VECTOR_NUNITS.
19054 (aarch64_move_pointer): Take amount as a poly_int64 rather
19056 (aarch64_progress_pointer): Avoid temporary variable.
19057 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19058 the mode attribute instead of GET_MODE.
19060 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19061 Alan Hayward <alan.hayward@arm.com>
19062 David Sherwood <david.sherwood@arm.com>
19064 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19065 x exists before using it.
19066 (aarch64_add_constant_internal): Rename to...
19067 (aarch64_add_offset_1): ...this. Replace regnum with separate
19068 src and dest rtxes. Handle the case in which they're different,
19069 including when the offset is zero. Replace scratchreg with an rtx.
19070 Use 2 additions if there is no spare register into which we can
19071 move a 16-bit constant.
19072 (aarch64_add_constant): Delete.
19073 (aarch64_add_offset): Replace reg with separate src and dest
19074 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19075 Use aarch64_add_offset_1.
19076 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19077 an rtx rather than an int. Take the delta as a poly_int64
19078 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19079 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19080 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19081 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19082 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19083 and aarch64_add_sp.
19084 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19085 aarch64_add_constant.
19087 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19089 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19090 Use scalar_float_mode.
19092 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19094 * config/aarch64/aarch64-simd.md
19095 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19096 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19097 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19098 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19099 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19100 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19101 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19102 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19103 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19104 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19106 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19109 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19110 targ_options->x_arm_arch_string is non NULL.
19112 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19114 * config/aarch64/aarch64.h
19115 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19117 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19120 * expmed.c (emit_store_flag_force): Swap if const op0
19121 and change VOIDmode to mode of op0.
19123 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19125 PR rtl-optimization/83761
19126 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19127 than bytes to mode_for_size.
19129 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19131 PR middle-end/83189
19132 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19133 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19136 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19138 PR middle-end/83575
19139 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19140 when in layout mode.
19141 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19142 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19145 2018-01-10 Michael Collison <michael.collison@arm.com>
19147 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19148 * config/aarch64/aarch64-option-extension.def: Add
19149 AARCH64_OPT_EXTENSION of 'fp16fml'.
19150 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19151 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19152 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19153 * config/aarch64/constraints.md (Ui7): New constraint.
19154 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19155 (VFMLA_SEL_W): Ditto.
19158 (VFMLA16_LOW): New int iterator.
19159 (VFMLA16_HIGH): Ditto.
19160 (UNSPEC_FMLAL): New unspec.
19161 (UNSPEC_FMLSL): Ditto.
19162 (UNSPEC_FMLAL2): Ditto.
19163 (UNSPEC_FMLSL2): Ditto.
19164 (f16mac): New code attribute.
19165 * config/aarch64/aarch64-simd-builtins.def
19166 (aarch64_fmlal_lowv2sf): Ditto.
19167 (aarch64_fmlsl_lowv2sf): Ditto.
19168 (aarch64_fmlalq_lowv4sf): Ditto.
19169 (aarch64_fmlslq_lowv4sf): Ditto.
19170 (aarch64_fmlal_highv2sf): Ditto.
19171 (aarch64_fmlsl_highv2sf): Ditto.
19172 (aarch64_fmlalq_highv4sf): Ditto.
19173 (aarch64_fmlslq_highv4sf): Ditto.
19174 (aarch64_fmlal_lane_lowv2sf): Ditto.
19175 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19176 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19177 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19178 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19179 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19180 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19181 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19182 (aarch64_fmlal_lane_highv2sf): Ditto.
19183 (aarch64_fmlsl_lane_highv2sf): Ditto.
19184 (aarch64_fmlal_laneq_highv2sf): Ditto.
19185 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19186 (aarch64_fmlalq_lane_highv4sf): Ditto.
19187 (aarch64_fmlsl_lane_highv4sf): Ditto.
19188 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19189 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19190 * config/aarch64/aarch64-simd.md:
19191 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19192 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19193 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19194 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19195 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19196 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19197 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19198 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19199 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19200 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19201 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19202 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19203 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19204 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19205 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19206 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19207 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19208 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19209 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19210 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19211 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19212 (vfmlsl_low_u32): Ditto.
19213 (vfmlalq_low_u32): Ditto.
19214 (vfmlslq_low_u32): Ditto.
19215 (vfmlal_high_u32): Ditto.
19216 (vfmlsl_high_u32): Ditto.
19217 (vfmlalq_high_u32): Ditto.
19218 (vfmlslq_high_u32): Ditto.
19219 (vfmlal_lane_low_u32): Ditto.
19220 (vfmlsl_lane_low_u32): Ditto.
19221 (vfmlal_laneq_low_u32): Ditto.
19222 (vfmlsl_laneq_low_u32): Ditto.
19223 (vfmlalq_lane_low_u32): Ditto.
19224 (vfmlslq_lane_low_u32): Ditto.
19225 (vfmlalq_laneq_low_u32): Ditto.
19226 (vfmlslq_laneq_low_u32): Ditto.
19227 (vfmlal_lane_high_u32): Ditto.
19228 (vfmlsl_lane_high_u32): Ditto.
19229 (vfmlal_laneq_high_u32): Ditto.
19230 (vfmlsl_laneq_high_u32): Ditto.
19231 (vfmlalq_lane_high_u32): Ditto.
19232 (vfmlslq_lane_high_u32): Ditto.
19233 (vfmlalq_laneq_high_u32): Ditto.
19234 (vfmlslq_laneq_high_u32): Ditto.
19235 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19236 (AARCH64_FL_FOR_ARCH8_4): New.
19237 (AARCH64_ISA_F16FML): New ISA flag.
19238 (TARGET_F16FML): New feature flag for fp16fml.
19239 (doc/invoke.texi): Document new fp16fml option.
19241 2018-01-10 Michael Collison <michael.collison@arm.com>
19243 * config/aarch64/aarch64-builtins.c:
19244 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19245 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19246 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19247 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19248 (AARCH64_ISA_SHA3): New ISA flag.
19249 (TARGET_SHA3): New feature flag for sha3.
19250 * config/aarch64/iterators.md (sha512_op): New int attribute.
19251 (CRYPTO_SHA512): New int iterator.
19252 (UNSPEC_SHA512H): New unspec.
19253 (UNSPEC_SHA512H2): Ditto.
19254 (UNSPEC_SHA512SU0): Ditto.
19255 (UNSPEC_SHA512SU1): Ditto.
19256 * config/aarch64/aarch64-simd-builtins.def
19257 (aarch64_crypto_sha512hqv2di): New builtin.
19258 (aarch64_crypto_sha512h2qv2di): Ditto.
19259 (aarch64_crypto_sha512su0qv2di): Ditto.
19260 (aarch64_crypto_sha512su1qv2di): Ditto.
19261 (aarch64_eor3qv8hi): Ditto.
19262 (aarch64_rax1qv2di): Ditto.
19263 (aarch64_xarqv2di): Ditto.
19264 (aarch64_bcaxqv8hi): Ditto.
19265 * config/aarch64/aarch64-simd.md:
19266 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19267 (aarch64_crypto_sha512su0qv2di): Ditto.
19268 (aarch64_crypto_sha512su1qv2di): Ditto.
19269 (aarch64_eor3qv8hi): Ditto.
19270 (aarch64_rax1qv2di): Ditto.
19271 (aarch64_xarqv2di): Ditto.
19272 (aarch64_bcaxqv8hi): Ditto.
19273 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19274 (vsha512h2q_u64): Ditto.
19275 (vsha512su0q_u64): Ditto.
19276 (vsha512su1q_u64): Ditto.
19277 (veor3q_u16): Ditto.
19278 (vrax1q_u64): Ditto.
19279 (vxarq_u64): Ditto.
19280 (vbcaxq_u16): Ditto.
19281 * config/arm/types.md (crypto_sha512): New type attribute.
19282 (crypto_sha3): Ditto.
19283 (doc/invoke.texi): Document new sha3 option.
19285 2018-01-10 Michael Collison <michael.collison@arm.com>
19287 * config/aarch64/aarch64-builtins.c:
19288 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19289 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19290 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19291 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19292 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19293 (AARCH64_ISA_SM4): New ISA flag.
19294 (TARGET_SM4): New feature flag for sm4.
19295 * config/aarch64/aarch64-simd-builtins.def
19296 (aarch64_sm3ss1qv4si): Ditto.
19297 (aarch64_sm3tt1aq4si): Ditto.
19298 (aarch64_sm3tt1bq4si): Ditto.
19299 (aarch64_sm3tt2aq4si): Ditto.
19300 (aarch64_sm3tt2bq4si): Ditto.
19301 (aarch64_sm3partw1qv4si): Ditto.
19302 (aarch64_sm3partw2qv4si): Ditto.
19303 (aarch64_sm4eqv4si): Ditto.
19304 (aarch64_sm4ekeyqv4si): Ditto.
19305 * config/aarch64/aarch64-simd.md:
19306 (aarch64_sm3ss1qv4si): Ditto.
19307 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19308 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19309 (aarch64_sm4eqv4si): Ditto.
19310 (aarch64_sm4ekeyqv4si): Ditto.
19311 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19312 (sm3part_op): Ditto.
19313 (CRYPTO_SM3TT): Ditto.
19314 (CRYPTO_SM3PART): Ditto.
19315 (UNSPEC_SM3SS1): New unspec.
19316 (UNSPEC_SM3TT1A): Ditto.
19317 (UNSPEC_SM3TT1B): Ditto.
19318 (UNSPEC_SM3TT2A): Ditto.
19319 (UNSPEC_SM3TT2B): Ditto.
19320 (UNSPEC_SM3PARTW1): Ditto.
19321 (UNSPEC_SM3PARTW2): Ditto.
19322 (UNSPEC_SM4E): Ditto.
19323 (UNSPEC_SM4EKEY): Ditto.
19324 * config/aarch64/constraints.md (Ui2): New constraint.
19325 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19326 * config/arm/types.md (crypto_sm3): New type attribute.
19327 (crypto_sm4): Ditto.
19328 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19329 (vsm3tt1aq_u32): Ditto.
19330 (vsm3tt1bq_u32): Ditto.
19331 (vsm3tt2aq_u32): Ditto.
19332 (vsm3tt2bq_u32): Ditto.
19333 (vsm3partw1q_u32): Ditto.
19334 (vsm3partw2q_u32): Ditto.
19335 (vsm4eq_u32): Ditto.
19336 (vsm4ekeyq_u32): Ditto.
19337 (doc/invoke.texi): Document new sm4 option.
19339 2018-01-10 Michael Collison <michael.collison@arm.com>
19341 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19342 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19343 (AARCH64_FL_FOR_ARCH8_4): New.
19344 (AARCH64_FL_V8_4): New flag.
19345 (doc/invoke.texi): Document new armv8.4-a option.
19347 2018-01-10 Michael Collison <michael.collison@arm.com>
19349 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19350 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19351 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19352 * config/aarch64/aarch64-option-extension.def: Add
19353 AARCH64_OPT_EXTENSION of 'sha2'.
19354 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19355 (crypto): Disable sha2 and aes if crypto disabled.
19356 (crypto): Enable aes and sha2 if enabled.
19357 (simd): Disable sha2 and aes if simd disabled.
19358 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19360 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19361 (TARGET_SHA2): New feature flag for sha2.
19362 (TARGET_AES): New feature flag for aes.
19363 * config/aarch64/aarch64-simd.md:
19364 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19365 conditional on TARGET_AES.
19366 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19367 (aarch64_crypto_sha1hsi): Make pattern conditional
19369 (aarch64_crypto_sha1hv4si): Ditto.
19370 (aarch64_be_crypto_sha1hv4si): Ditto.
19371 (aarch64_crypto_sha1su1v4si): Ditto.
19372 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19373 (aarch64_crypto_sha1su0v4si): Ditto.
19374 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19375 (aarch64_crypto_sha256su0v4si): Ditto.
19376 (aarch64_crypto_sha256su1v4si): Ditto.
19377 (doc/invoke.texi): Document new aes and sha2 options.
19379 2018-01-10 Martin Sebor <msebor@redhat.com>
19381 PR tree-optimization/83781
19382 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19385 2018-01-11 Martin Sebor <msebor@gmail.com>
19386 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19388 PR tree-optimization/83501
19389 PR tree-optimization/81703
19391 * tree-ssa-strlen.c (get_string_cst): Rename...
19392 (get_string_len): ...to this. Handle global constants.
19393 (handle_char_store): Adjust.
19395 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19396 Jim Wilson <jimw@sifive.com>
19398 * config/riscv/riscv-protos.h (riscv_output_return): New.
19399 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19400 (riscv_attribute_table, riscv_output_return),
19401 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19402 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19403 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19405 (riscv_expand_prologue): Add early return for naked function.
19406 (riscv_expand_epilogue): Likewise.
19407 (riscv_function_ok_for_sibcall): Return false for naked function.
19408 (riscv_set_current_function): New.
19409 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19410 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19411 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19412 * doc/extend.texi (RISC-V Function Attributes): New.
19414 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19416 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19417 check for 128-bit long double before checking TCmode.
19418 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19419 128-bit long doubles before checking TFmode or TCmode.
19420 (FLOAT128_IBM_P): Likewise.
19422 2018-01-10 Martin Sebor <msebor@redhat.com>
19424 PR tree-optimization/83671
19425 * builtins.c (c_strlen): Unconditionally return zero for the empty
19427 Use -Warray-bounds for warnings.
19428 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19429 for non-constant array indices with COMPONENT_REF, arrays of
19430 arrays, and pointers to arrays.
19431 (gimple_fold_builtin_strlen): Determine and set length range for
19432 non-constant character arrays.
19434 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19436 PR middle-end/81897
19437 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19440 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19442 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19444 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19447 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19448 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19449 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19450 indexed_or_indirect_operand predicate.
19451 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19452 (*vsx_le_perm_load_v8hi): Likewise.
19453 (*vsx_le_perm_load_v16qi): Likewise.
19454 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19455 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19456 (*vsx_le_perm_store_v8hi): Likewise.
19457 (*vsx_le_perm_store_v16qi): Likewise.
19458 (eight unnamed splitters): Likewise.
19460 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19462 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19463 * config/rs6000/emmintrin.h: Likewise.
19464 * config/rs6000/mmintrin.h: Likewise.
19465 * config/rs6000/xmmintrin.h: Likewise.
19467 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19470 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19472 * tree.c (tree_nop_conversion): Return true for location wrapper
19474 (maybe_wrap_with_location): New function.
19475 (selftest::check_strip_nops): New function.
19476 (selftest::test_location_wrappers): New function.
19477 (selftest::tree_c_tests): Call it.
19478 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19479 (maybe_wrap_with_location): New decl.
19480 (EXPR_LOCATION_WRAPPER_P): New macro.
19481 (location_wrapper_p): New inline function.
19482 (tree_strip_any_location_wrapper): New inline function.
19484 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19487 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19488 stack_realign_offset for the largest alignment of stack slot
19490 (ix86_find_max_used_stack_alignment): New function.
19491 (ix86_finalize_stack_frame_flags): Use it. Set
19492 max_used_stack_alignment if we don't realign stack.
19493 * config/i386/i386.h (machine_function): Add
19494 max_used_stack_alignment.
19496 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19498 * config/arm/arm.opt (-mbranch-cost): New option.
19499 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19502 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19505 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19506 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19508 2018-01-10 Richard Biener <rguenther@suse.de>
19511 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19512 early out so it also covers the case where we have a non-NULL
19515 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19517 PR tree-optimization/83753
19518 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19519 for non-strided grouped accesses if the number of elements is 1.
19521 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19524 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19525 * i386.h (TARGET_USE_GATHER): Define.
19526 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19528 2018-01-10 Martin Liska <mliska@suse.cz>
19531 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19532 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19534 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19535 CLEANUP_NO_PARTITIONING is not set.
19537 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19539 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19540 for vectors, as a partial revert of r254296.
19541 * rtl.h (const_vec_p): Delete.
19542 (const_vec_duplicate_p): Don't test for vector CONSTs.
19543 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19544 * expmed.c (make_tree): Likewise.
19547 * common.md (E, F): Use CONSTANT_P instead of checking for
19549 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19550 checking for CONST_VECTOR.
19552 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19554 PR middle-end/83575
19555 * predict.c (force_edge_cold): Handle in more sane way edges
19556 with no prediction.
19558 2018-01-09 Carl Love <cel@us.ibm.com>
19560 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19562 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19563 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19564 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19565 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19566 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19567 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19568 * config/rs6000/rs6000-protos.h: Add extern defition for
19569 rs6000_generate_float2_double_code.
19570 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19572 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19573 (float2_v2df): Add define_expand.
19575 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19578 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19579 op_mode in the force_to_mode call.
19581 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19583 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19584 instead of checking each element individually.
19585 (aarch64_evpc_uzp): Likewise.
19586 (aarch64_evpc_zip): Likewise.
19587 (aarch64_evpc_ext): Likewise.
19588 (aarch64_evpc_rev): Likewise.
19589 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19590 instead of checking each element individually. Return true without
19592 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19593 whether all selected elements come from the same input, instead of
19594 checking each element individually. Remove calls to gen_rtx_REG,
19595 start_sequence and end_sequence and instead assert that no rtl is
19598 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19600 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19601 order of HIGH and CONST checks.
19603 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19605 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19606 if the destination isn't an SSA_NAME.
19608 2018-01-09 Richard Biener <rguenther@suse.de>
19610 PR tree-optimization/83668
19611 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19613 (canonicalize_loop_form): ... here, renamed from ...
19614 (canonicalize_loop_closed_ssa_form): ... this and amended to
19615 swap successor edges for loop exit blocks to make us use
19616 the RPO order we need for initial schedule generation.
19618 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19620 PR tree-optimization/64811
19621 * match.pd: When optimizing comparisons with Inf, avoid
19622 introducing or losing exceptions from comparisons with NaN.
19624 2018-01-09 Martin Liska <mliska@suse.cz>
19627 * asan.c (shadow_mem_size): Add gcc_assert.
19629 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19631 Don't save registers in main().
19634 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19635 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19636 * config/avr/avr.c (avr_set_current_function): Don't error if
19637 naked, OS_task or OS_main are specified at the same time.
19638 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19640 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19642 * common/config/avr/avr-common.c (avr_option_optimization_table):
19643 Switch on -mmain-is-OS_task for optimizing compilations.
19645 2018-01-09 Richard Biener <rguenther@suse.de>
19647 PR tree-optimization/83572
19648 * graphite.c: Include cfganal.h.
19649 (graphite_transform_loops): Connect infinite loops to exit
19650 and remove fake edges at the end.
19652 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19654 * ipa-inline.c (edge_badness): Revert accidental checkin.
19656 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19659 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19660 symbols; not inline clones.
19662 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19665 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19666 hard registers. Formatting fixes.
19668 PR preprocessor/83722
19669 * gcc.c (try_generate_repro): Pass
19670 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19671 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19674 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19675 Kito Cheng <kito.cheng@gmail.com>
19677 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19678 (riscv_leaf_function_p): Delete.
19679 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19681 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19683 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19685 (do_ifelse): New function.
19686 (do_isel): New function.
19687 (do_sub3): New function.
19688 (do_add3): New function.
19689 (do_load_mask_compare): New function.
19690 (do_overlap_load_compare): New function.
19691 (expand_compare_loop): New function.
19692 (expand_block_compare): Call expand_compare_loop() when appropriate.
19693 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19694 option description.
19695 (-mblock-compare-inline-loop-limit): New option.
19697 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19700 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19701 Reverse order of second and third operands in first alternative.
19702 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19703 of first and second elements in UNSPEC_VPERMR vector.
19704 (altivec_expand_vec_perm_le): Likewise.
19706 2018-01-08 Jeff Law <law@redhat.com>
19708 PR rtl-optimizatin/81308
19709 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19710 (process_switch): If group_case_labels makes a change, then set
19712 (pass_convert_switch::execute): If a switch is converted, then
19713 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19715 PR rtl-optimization/81308
19716 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19719 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19721 PR target/83663 - Revert r255946
19722 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19723 generation for cases where splatting a value is not useful.
19724 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19725 across a vec_duplicate and a paradoxical subreg forming a vector
19726 mode to a vec_concat.
19728 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19730 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19731 -march=armv8.3-a variants.
19732 * config/arm/t-multilib: Likewise.
19733 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19735 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19737 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19739 (cceq_ior_compare_complement): Give it a name so I can use it, and
19740 change boolean_or_operator predicate to boolean_operator so it can
19741 be used to generate a crand.
19742 (eqne): New code iterator.
19743 (bd/bd_neg): New code_attrs.
19744 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19745 a single define_insn.
19746 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19747 decrement (bdnzt/bdnzf/bdzt/bdzf).
19748 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19749 with the new names of the branch decrement patterns, and added the
19750 names of the branch decrement conditional patterns.
19752 2018-01-08 Richard Biener <rguenther@suse.de>
19754 PR tree-optimization/83563
19755 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19758 2018-01-08 Richard Biener <rguenther@suse.de>
19760 PR middle-end/83713
19761 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19763 2018-01-08 Richard Biener <rguenther@suse.de>
19765 PR tree-optimization/83685
19766 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19767 references to abnormals.
19769 2018-01-08 Richard Biener <rguenther@suse.de>
19772 * dwarf2out.c (output_indirect_strings): Handle empty
19773 skeleton_debug_str_hash.
19774 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19776 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19778 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19779 (emit_store_direct): Likewise.
19780 (arc_trampoline_adjust_address): Likewise.
19781 (arc_asm_trampoline_template): New function.
19782 (arc_initialize_trampoline): Use asm_trampoline_template.
19783 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19784 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19785 * config/arc/arc.md (flush_icache): Delete pattern.
19787 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19789 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19790 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19793 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19796 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19797 by not USED_FOR_TARGET.
19798 (make_pass_resolve_sw_modes): Likewise.
19800 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19802 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19805 2018-01-08 Richard Biener <rguenther@suse.de>
19807 PR middle-end/83580
19808 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19810 2018-01-08 Richard Biener <rguenther@suse.de>
19812 PR middle-end/83517
19813 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19815 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19817 PR middle-end/81897
19818 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19819 basic blocks with a small number of successors.
19820 (convert_control_dep_chain_into_preds): Improve handling of
19822 (dump_predicates): Split apart into...
19823 (dump_pred_chain): ...here...
19824 (dump_pred_info): ...and here.
19825 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19826 (can_chain_union_be_invalidated_p): Improve check for invalidation
19828 (uninit_uses_cannot_happen): Avoid unnecessary if
19829 convert_control_dep_chain_into_preds yielded nothing.
19831 2018-01-06 Martin Sebor <msebor@redhat.com>
19833 PR tree-optimization/83640
19834 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19835 subtracting negative offset from size.
19836 (builtin_access::overlap): Adjust offset bounds of the access to fall
19837 within the size of the object if possible.
19839 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19841 PR rtl-optimization/83699
19842 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19843 extract_bit_field_as_subreg to cases in which the extracted
19844 value is also a vector.
19846 * lra-constraints.c (process_alt_operands): Test for the equivalence
19847 substitutions when detecting a possible reload cycle.
19849 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19852 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19853 by default if flag_selective_schedling{,2}. Formatting fixes.
19855 PR rtl-optimization/83682
19856 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19857 if it has non-VECTOR_MODE element mode.
19858 (vec_duplicate_p): Likewise.
19860 PR middle-end/83694
19861 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19862 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19864 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19867 * config/i386/i386-builtin.def
19868 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19869 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19870 Require also OPTION_MASK_ISA_AVX512F in addition to
19871 OPTION_MASK_ISA_GFNI.
19872 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19873 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19874 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19875 to OPTION_MASK_ISA_GFNI.
19876 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19877 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19878 OPTION_MASK_ISA_AVX512BW.
19879 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19880 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19881 addition to OPTION_MASK_ISA_GFNI.
19882 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19883 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19884 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19885 to OPTION_MASK_ISA_GFNI.
19886 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19887 a requirement for all ISAs rather than any of them with a few
19889 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19891 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19892 bitmasks to be enabled with 3 exceptions, instead of requiring any
19893 enabled ISA with lots of exceptions.
19894 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19895 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19896 Change avx512bw in isa attribute to avx512f.
19897 * config/i386/sgxintrin.h: Add license boilerplate.
19898 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19899 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19900 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19901 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19903 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19904 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19905 temporarily sse2 rather than sse if not enabled already.
19908 * config/i386/sse.md (VI248_VLBW): Rename to ...
19909 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19910 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19911 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19912 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19913 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19914 mode iterator instead of VI248_VLBW.
19916 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19918 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19919 (record_modified): Skip clobbers; add debug output.
19920 (param_change_prob): Use sreal frequencies.
19922 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19924 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19925 punt for user-aligned variables.
19927 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19929 * tree-chrec.c (chrec_contains_symbols): Return true for
19932 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19935 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19936 of (x|y) == x for BICS pattern.
19938 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19940 PR tree-optimization/83605
19941 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19942 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19945 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19947 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19948 * config/epiphany/rtems.h: New file.
19950 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19951 Uros Bizjak <ubizjak@gmail.com>
19954 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19955 QIreg_operand instead of register_operand predicate.
19956 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19957 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19958 comments instead of -fmitigate[-_]rop.
19960 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19963 * cgraphunit.c (symbol_table::compile): Switch to text_section
19964 before calling assembly_start debug hook.
19965 * run-rtl-passes.c (run_rtl_passes): Likewise.
19968 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19970 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19971 range_int_cst_p rather than !symbolic_range_p before calling
19972 extract_range_from_multiplicative_op_1.
19974 2018-01-04 Jeff Law <law@redhat.com>
19976 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19977 redundant test in assertion.
19979 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19981 * doc/rtl.texi: Document machine_mode wrapper classes.
19983 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19985 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19986 using tree_to_uhwi.
19988 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19990 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19991 the VEC_PERM_EXPR fold to fail.
19993 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19996 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19997 to switched_sections.
19999 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20002 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20003 test for d.testing.
20005 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20008 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20009 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20011 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20014 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20015 is BLKmode and bitpos not zero or mode change is needed.
20017 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20020 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20023 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20026 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20027 instead of MULT rtx. Update all corresponding splitters.
20028 (*saddl_se): Ditto.
20029 (*ssub<modesuffix>): Ditto.
20030 (*ssubl_se): Ditto.
20031 (*cmp_sadd_di): Update split patterns.
20032 (*cmp_sadd_si): Ditto.
20033 (*cmp_sadd_sidi): Ditto.
20034 (*cmp_ssub_di): Ditto.
20035 (*cmp_ssub_si): Ditto.
20036 (*cmp_ssub_sidi): Ditto.
20037 * config/alpha/predicates.md (const23_operand): New predicate.
20038 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20039 Look for ASHIFT, not MULT inner operand.
20040 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20042 2018-01-04 Martin Liska <mliska@suse.cz>
20044 PR gcov-profile/83669
20045 * gcov.c (output_intermediate_file): Add version to intermediate
20047 * doc/gcov.texi: Document new field 'version' in intermediate
20048 file format. Fix location of '-k' option of gcov command.
20050 2018-01-04 Martin Liska <mliska@suse.cz>
20053 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20055 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20057 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20059 2018-01-03 Martin Sebor <msebor@redhat.com>
20061 PR tree-optimization/83655
20062 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20063 checking calls with invalid arguments.
20065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20067 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20068 (vectorizable_mask_load_store): Delete.
20069 (vectorizable_call): Return false for masked loads and stores.
20070 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20071 instead of gimple_assign_rhs1.
20072 (vectorizable_load): Handle IFN_MASK_LOAD.
20073 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20077 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20079 (vectorizable_mask_load_store): ...here.
20080 (vectorizable_load): ...and here.
20082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20084 * tree-vect-stmts.c (vect_build_all_ones_mask)
20085 (vect_build_zero_merge_argument): New functions, split out from...
20086 (vectorizable_load): ...here.
20088 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20090 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20092 (vectorizable_mask_load_store): ...here.
20093 (vectorizable_store): ...and here.
20095 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20097 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20099 (vectorizable_mask_load_store): ...here.
20101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20103 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20104 (vect_model_store_cost): Take a vec_load_store_type instead of a
20106 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20107 (vect_model_store_cost): Take a vec_load_store_type instead of a
20109 (vectorizable_mask_load_store): Update accordingly.
20110 (vectorizable_store): Likewise.
20111 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20115 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20116 IFN_MASK_LOAD calls here rather than...
20117 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20120 Alan Hayward <alan.hayward@arm.com>
20121 David Sherwood <david.sherwood@arm.com>
20123 * expmed.c (extract_bit_field_1): For vector extracts,
20124 fall back to extract_bit_field_as_subreg if vec_extract
20127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20128 Alan Hayward <alan.hayward@arm.com>
20129 David Sherwood <david.sherwood@arm.com>
20131 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20132 they are variable or constant sized.
20133 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20134 slots for constant-sized data.
20136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20137 Alan Hayward <alan.hayward@arm.com>
20138 David Sherwood <david.sherwood@arm.com>
20140 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20141 handling COND_EXPRs with boolean comparisons, try to find a better
20142 basis for the mask type than the boolean itself.
20144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20146 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20147 is calculated and how it can be overridden.
20148 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20149 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20151 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20154 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20155 Alan Hayward <alan.hayward@arm.com>
20156 David Sherwood <david.sherwood@arm.com>
20158 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20159 Remove the mode argument.
20160 (aarch64_simd_valid_immediate): Remove the mode and inverse
20162 * config/aarch64/iterators.md (bitsize): New iterator.
20163 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20164 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20165 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20166 aarch64_simd_valid_immediate.
20167 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20168 (aarch64_reg_or_bic_imm): Likewise.
20169 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20170 with an insn_type enum and msl with a modifier_type enum.
20171 Replace element_width with a scalar_mode. Change the shift
20172 to unsigned int. Add constructors for scalar_float_mode and
20173 scalar_int_mode elements.
20174 (aarch64_vect_float_const_representable_p): Delete.
20175 (aarch64_can_const_movi_rtx_p)
20176 (aarch64_simd_scalar_immediate_valid_for_move)
20177 (aarch64_simd_make_constant): Update call to
20178 aarch64_simd_valid_immediate.
20179 (aarch64_advsimd_valid_immediate_hs): New function.
20180 (aarch64_advsimd_valid_immediate): Likewise.
20181 (aarch64_simd_valid_immediate): Remove mode and inverse
20182 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20183 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20184 and aarch64_float_const_representable_p on the result.
20185 (aarch64_output_simd_mov_immediate): Remove mode argument.
20186 Update call to aarch64_simd_valid_immediate and use of
20187 simd_immediate_info.
20188 (aarch64_output_scalar_simd_mov_immediate): Update call
20191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20192 Alan Hayward <alan.hayward@arm.com>
20193 David Sherwood <david.sherwood@arm.com>
20195 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20196 (mode_nunits): Likewise CONST_MODE_NUNITS.
20197 * machmode.def (ADJUST_NUNITS): Document.
20198 * genmodes.c (mode_data::need_nunits_adj): New field.
20199 (blank_mode): Update accordingly.
20200 (adj_nunits): New variable.
20201 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20203 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20204 listed in adj_nunits.
20205 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20206 listed in adj_nunits. Don't emit case statements for such modes.
20207 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20208 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20209 nothing if adj_nunits is nonnull.
20210 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20211 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20212 (emit_mode_fbit): Update use of print_maybe_const_decl.
20213 (emit_move_size): Likewise. Treat the array as non-const
20215 (emit_mode_adjustments): Handle adj_nunits.
20217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20219 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20220 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20221 (VECTOR_MODES): Use it.
20222 (make_vector_modes): Take the prefix as an argument.
20224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20225 Alan Hayward <alan.hayward@arm.com>
20226 David Sherwood <david.sherwood@arm.com>
20228 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20229 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20230 for MODE_VECTOR_BOOL.
20231 * machmode.def (VECTOR_BOOL_MODE): Document.
20232 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20233 (make_vector_bool_mode): New function.
20234 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20236 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20237 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20239 * stor-layout.c (int_mode_for_mode): Likewise.
20240 * tree.c (build_vector_type_for_mode): Likewise.
20241 * varasm.c (output_constant_pool_2): Likewise.
20242 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20243 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20244 for MODE_VECTOR_BOOL.
20245 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20246 of mode class checks.
20247 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20248 instead of a list of mode class checks.
20249 (expand_vector_scalar_condition): Likewise.
20250 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20253 Alan Hayward <alan.hayward@arm.com>
20254 David Sherwood <david.sherwood@arm.com>
20256 * machmode.h (mode_size): Change from unsigned short to
20258 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20259 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20260 or if measurement_type is not polynomial.
20261 (fixed_size_mode::includes_p): Check for constant-sized modes.
20262 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20263 return a poly_uint16 rather than an unsigned short.
20264 (emit_mode_size): Change the type of mode_size from unsigned short
20265 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20266 (emit_mode_adjustments): Cope with polynomial vector sizes.
20267 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20269 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20271 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20272 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20273 * caller-save.c (setup_save_areas): Likewise.
20274 (replace_reg_with_saved_mem): Likewise.
20275 * calls.c (emit_library_call_value_1): Likewise.
20276 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20277 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20278 (gen_lowpart_for_combine): Likewise.
20279 * convert.c (convert_to_integer_1): Likewise.
20280 * cse.c (equiv_constant, cse_insn): Likewise.
20281 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20282 (cselib_subst_to_values): Likewise.
20283 * dce.c (word_dce_process_block): Likewise.
20284 * df-problems.c (df_word_lr_mark_ref): Likewise.
20285 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20286 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20287 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20288 (rtl_for_decl_location): Likewise.
20289 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20290 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20291 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20292 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20293 (expand_expr_real_1): Likewise.
20294 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20295 (pad_below): Likewise.
20296 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20297 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20298 * ira.c (get_subreg_tracking_sizes): Likewise.
20299 * ira-build.c (ira_create_allocno_objects): Likewise.
20300 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20301 (ira_sort_regnos_for_alter_reg): Likewise.
20302 * ira-costs.c (record_operand_costs): Likewise.
20303 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20304 (resolve_simple_move): Likewise.
20305 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20306 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20307 (lra_constraints): Likewise.
20308 (CONST_POOL_OK_P): Reject variable-sized modes.
20309 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20310 (add_pseudo_to_slot, lra_spill): Likewise.
20311 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20312 * optabs-query.c (get_best_extraction_insn): Likewise.
20313 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20314 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20315 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20316 * recog.c (offsettable_address_addr_space_p): Likewise.
20317 * regcprop.c (maybe_mode_change): Likewise.
20318 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20319 * regrename.c (build_def_use): Likewise.
20320 * regstat.c (dump_reg_info): Likewise.
20321 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20322 (find_reloads, find_reloads_subreg_address): Likewise.
20323 * reload1.c (eliminate_regs_1): Likewise.
20324 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20325 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20326 (simplify_binary_operation_1, simplify_subreg): Likewise.
20327 * targhooks.c (default_function_arg_padding): Likewise.
20328 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20329 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20330 (verify_gimple_assign_ternary): Likewise.
20331 * tree-inline.c (estimate_move_cost): Likewise.
20332 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20333 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20334 (get_address_cost_ainc): Likewise.
20335 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20336 (vect_supportable_dr_alignment): Likewise.
20337 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20338 (vectorizable_reduction): Likewise.
20339 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20340 (vectorizable_operation, vectorizable_load): Likewise.
20341 * tree.c (build_same_sized_truth_vector_type): Likewise.
20342 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20343 * var-tracking.c (emit_note_insn_var_location): Likewise.
20344 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20345 (ADDR_VEC_ALIGN): Likewise.
20347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20348 Alan Hayward <alan.hayward@arm.com>
20349 David Sherwood <david.sherwood@arm.com>
20351 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20353 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20354 or if measurement_type is polynomial.
20355 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20356 * combine.c (make_extraction): Likewise.
20357 * dse.c (find_shift_sequence): Likewise.
20358 * dwarf2out.c (mem_loc_descriptor): Likewise.
20359 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20360 (extract_bit_field, extract_low_bits): Likewise.
20361 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20362 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20363 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20364 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20365 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20366 * reload.c (find_reloads): Likewise.
20367 * reload1.c (alter_reg): Likewise.
20368 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20369 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20370 * tree-if-conv.c (predicate_mem_writes): Likewise.
20371 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20372 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20373 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20374 * valtrack.c (dead_debug_insert_temp): Likewise.
20375 * varasm.c (mergeable_constant_section): Likewise.
20376 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20379 Alan Hayward <alan.hayward@arm.com>
20380 David Sherwood <david.sherwood@arm.com>
20382 * expr.c (expand_assignment): Cope with polynomial mode sizes
20383 when assigning to a CONCAT.
20385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20386 Alan Hayward <alan.hayward@arm.com>
20387 David Sherwood <david.sherwood@arm.com>
20389 * machmode.h (mode_precision): Change from unsigned short to
20391 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20393 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20394 or if measurement_type is not polynomial.
20395 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20396 in which the mode is already known to be a scalar_int_mode.
20397 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20398 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20400 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20401 for GET_MODE_PRECISION.
20402 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20403 for GET_MODE_PRECISION.
20404 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20406 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20407 (expand_field_assignment, make_extraction): Likewise.
20408 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20409 (get_last_value): Likewise.
20410 * convert.c (convert_to_integer_1): Likewise.
20411 * cse.c (cse_insn): Likewise.
20412 * expr.c (expand_expr_real_1): Likewise.
20413 * lra-constraints.c (simplify_operand_subreg): Likewise.
20414 * optabs-query.c (can_atomic_load_p): Likewise.
20415 * optabs.c (expand_atomic_load): Likewise.
20416 (expand_atomic_store): Likewise.
20417 * ree.c (combine_reaching_defs): Likewise.
20418 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20419 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20420 * tree.h (type_has_mode_precision_p): Likewise.
20421 * ubsan.c (instrument_si_overflow): Likewise.
20423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20424 Alan Hayward <alan.hayward@arm.com>
20425 David Sherwood <david.sherwood@arm.com>
20427 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20428 polynomial numbers of units.
20429 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20430 (valid_vector_subparts_p): New function.
20431 (build_vector_type): Remove temporary shim and take the number
20432 of units as a poly_uint64 rather than an int.
20433 (build_opaque_vector_type): Take the number of units as a
20434 poly_uint64 rather than an int.
20435 * tree.c (build_vector_from_ctor): Handle polynomial
20436 TYPE_VECTOR_SUBPARTS.
20437 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20438 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20439 (build_vector_from_val): If the number of units is variable,
20440 use build_vec_duplicate_cst for constant operands and
20441 VEC_DUPLICATE_EXPR otherwise.
20442 (make_vector_type): Remove temporary is_constant ().
20443 (build_vector_type, build_opaque_vector_type): Take the number of
20444 units as a poly_uint64 rather than an int.
20445 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20447 * cfgexpand.c (expand_debug_expr): Likewise.
20448 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20449 (store_constructor, expand_expr_real_1): Likewise.
20450 (const_scalar_mask_from_tree): Likewise.
20451 * fold-const-call.c (fold_const_reduction): Likewise.
20452 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20453 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20454 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20455 (fold_relational_const): Likewise.
20456 (native_interpret_vector): Likewise. Change the size from an
20457 int to an unsigned int.
20458 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20459 TYPE_VECTOR_SUBPARTS.
20460 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20461 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20462 duplicating a non-constant operand into a variable-length vector.
20463 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20464 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20465 * ipa-icf.c (sem_variable::equals): Likewise.
20466 * match.pd: Likewise.
20467 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20468 * print-tree.c (print_node): Likewise.
20469 * stor-layout.c (layout_type): Likewise.
20470 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20471 * tree-cfg.c (verify_gimple_comparison): Likewise.
20472 (verify_gimple_assign_binary): Likewise.
20473 (verify_gimple_assign_ternary): Likewise.
20474 (verify_gimple_assign_single): Likewise.
20475 * tree-pretty-print.c (dump_generic_node): Likewise.
20476 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20477 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20478 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20479 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20480 (vect_shift_permute_load_chain): Likewise.
20481 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20482 (expand_vector_condition, optimize_vector_constructor): Likewise.
20483 (lower_vec_perm, get_compute_type): Likewise.
20484 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20485 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20486 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20487 (vect_recog_mask_conversion_pattern): Likewise.
20488 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20489 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20490 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20491 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20492 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20493 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20494 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20495 (supportable_widening_operation): Likewise.
20496 (supportable_narrowing_operation): Likewise.
20497 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20499 * varasm.c (output_constant): Likewise.
20501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20502 Alan Hayward <alan.hayward@arm.com>
20503 David Sherwood <david.sherwood@arm.com>
20505 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20506 so that both the length == 3 and length != 3 cases set up their
20507 own permute vectors. Add comments explaining why we know the
20508 number of elements is constant.
20509 (vect_permute_load_chain): Likewise.
20511 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20512 Alan Hayward <alan.hayward@arm.com>
20513 David Sherwood <david.sherwood@arm.com>
20515 * machmode.h (mode_nunits): Change from unsigned char to
20517 (ONLY_FIXED_SIZE_MODES): New macro.
20518 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20519 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20520 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20522 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20523 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20524 or if measurement_type is not polynomial.
20525 * genmodes.c (ZERO_COEFFS): New macro.
20526 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20528 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20529 Use ZERO_COEFFS when emitting initializers.
20530 * data-streamer.h (bp_pack_poly_value): New function.
20531 (bp_unpack_poly_value): Likewise.
20532 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20533 for GET_MODE_NUNITS.
20534 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20535 for GET_MODE_NUNITS.
20536 * tree.c (make_vector_type): Remove temporary shim and make
20537 the real function take the number of units as a poly_uint64
20538 rather than an int.
20539 (build_vector_type_for_mode): Handle polynomial nunits.
20540 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20541 * emit-rtl.c (const_vec_series_p_1): Likewise.
20542 (gen_rtx_CONST_VECTOR): Likewise.
20543 * fold-const.c (test_vec_duplicate_folding): Likewise.
20544 * genrecog.c (validate_pattern): Likewise.
20545 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20546 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20547 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20548 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20549 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20550 * rtlanal.c (subreg_get_info): Likewise.
20551 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20552 (vect_grouped_load_supported): Likewise.
20553 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20554 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20555 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20556 (simplify_const_unary_operation, simplify_binary_operation_1)
20557 (simplify_const_binary_operation, simplify_ternary_operation)
20558 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20559 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20560 instead of CONST_VECTOR_NUNITS.
20561 * varasm.c (output_constant_pool_2): Likewise.
20562 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20563 explicit-encoded elements in the XVEC for variable-length vectors.
20565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20567 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20569 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20570 Alan Hayward <alan.hayward@arm.com>
20571 David Sherwood <david.sherwood@arm.com>
20573 * coretypes.h (fixed_size_mode): Declare.
20574 (fixed_size_mode_pod): New typedef.
20575 * builtins.h (target_builtins::x_apply_args_mode)
20576 (target_builtins::x_apply_result_mode): Change type to
20577 fixed_size_mode_pod.
20578 * builtins.c (apply_args_size, apply_result_size, result_vector)
20579 (expand_builtin_apply_args_1, expand_builtin_apply)
20580 (expand_builtin_return): Update accordingly.
20582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20584 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20585 * cselib.c (cselib_hash_rtx): Likewise.
20586 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20587 CONST_VECTOR encoding.
20589 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20590 Jeff Law <law@redhat.com>
20593 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20594 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20595 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20596 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20599 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20600 explicitly probe *sp in a noreturn function if there were any callee
20601 register saves or frame pointer is needed.
20603 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20606 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20607 BLKmode for ternary, binary or unary expressions.
20610 * var-tracking.c (delete_vta_debug_insn): New inline function.
20611 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20612 insns from get_insns () to NULL instead of each bb separately.
20613 Use delete_vta_debug_insn. No longer static.
20614 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20615 delete_vta_debug_insns callers.
20616 * rtl.h (delete_vta_debug_insns): Declare.
20617 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20618 instead of variable_tracking_main.
20620 2018-01-03 Martin Sebor <msebor@redhat.com>
20622 PR tree-optimization/83603
20623 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20624 arguments past the endof the argument list in functions declared
20625 without a prototype.
20626 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20627 Avoid checking when arguments are null.
20629 2018-01-03 Martin Sebor <msebor@redhat.com>
20632 * doc/extend.texi (attribute const): Fix a typo.
20633 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20634 issuing -Wsuggest-attribute for void functions.
20636 2018-01-03 Martin Sebor <msebor@redhat.com>
20638 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20639 offset_int::from instead of wide_int::to_shwi.
20640 (maybe_diag_overlap): Remove assertion.
20641 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20642 * gimple-ssa-sprintf.c (format_directive): Same.
20643 (parse_directive): Same.
20644 (sprintf_dom_walker::compute_format_length): Same.
20645 (try_substitute_return_value): Same.
20647 2018-01-03 Jeff Law <law@redhat.com>
20649 PR middle-end/83654
20650 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20651 non-constant residual for zero at runtime and avoid probing in
20652 that case. Reorganize code for trailing problem to mirror handling
20655 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20657 PR tree-optimization/83501
20658 * tree-ssa-strlen.c (get_string_cst): New.
20659 (handle_char_store): Call get_string_cst.
20661 2018-01-03 Martin Liska <mliska@suse.cz>
20663 PR tree-optimization/83593
20664 * tree-ssa-strlen.c: Include tree-cfg.h.
20665 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20666 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20667 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20669 (strlen_dom_walker::before_dom_children): Call
20670 gimple_purge_dead_eh_edges. Dump tranformation with details
20672 (strlen_dom_walker::before_dom_children): Update call by adding
20673 new argument cleanup_eh.
20674 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20676 2018-01-03 Martin Liska <mliska@suse.cz>
20679 * cif-code.def (VARIADIC_THUNK): New enum value.
20680 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20683 2018-01-03 Jan Beulich <jbeulich@suse.com>
20685 * sse.md (mov<mode>_internal): Tighten condition for when to use
20686 vmovdqu<ssescalarsize> for TI and OI modes.
20688 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20690 Update copyright years.
20692 2018-01-03 Martin Liska <mliska@suse.cz>
20695 * ipa-visibility.c (function_and_variable_visibility): Skip
20696 functions with noipa attribure.
20698 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20700 * gcc.c (process_command): Update copyright notice dates.
20701 * gcov-dump.c (print_version): Ditto.
20702 * gcov.c (print_version): Ditto.
20703 * gcov-tool.c (print_version): Ditto.
20704 * gengtype.c (create_file): Ditto.
20705 * doc/cpp.texi: Bump @copying's copyright year.
20706 * doc/cppinternals.texi: Ditto.
20707 * doc/gcc.texi: Ditto.
20708 * doc/gccint.texi: Ditto.
20709 * doc/gcov.texi: Ditto.
20710 * doc/install.texi: Ditto.
20711 * doc/invoke.texi: Ditto.
20713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20715 * vector-builder.h (vector_builder::m_full_nelts): Change from
20716 unsigned int to poly_uint64.
20717 (vector_builder::full_nelts): Update prototype accordingly.
20718 (vector_builder::new_vector): Likewise.
20719 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20720 (vector_builder::operator ==): Likewise.
20721 (vector_builder::finalize): Likewise.
20722 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20723 Take the number of elements as a poly_uint64 rather than an
20725 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20726 from unsigned int to poly_uint64.
20727 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20728 (vec_perm_indices::new_vector): Likewise.
20729 (vec_perm_indices::length): Likewise.
20730 (vec_perm_indices::nelts_per_input): Likewise.
20731 (vec_perm_indices::input_nelts): Likewise.
20732 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20733 number of elements per input as a poly_uint64 rather than an
20734 unsigned int. Use the original encoding for variable-length
20735 vectors, rather than clamping each individual element.
20736 For the second and subsequent elements in each pattern,
20737 clamp the step and base before clamping their sum.
20738 (vec_perm_indices::series_p): Handle polynomial element counts.
20739 (vec_perm_indices::all_in_range_p): Likewise.
20740 (vec_perm_indices_to_tree): Likewise.
20741 (vec_perm_indices_to_rtx): Likewise.
20742 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20743 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20744 (tree_vector_builder::new_binary_operation): Handle polynomial
20745 element counts. Return false if we need to know the number
20746 of elements at compile time.
20747 * fold-const.c (fold_vec_perm): Punt if the number of elements
20748 isn't known at compile time.
20750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20752 * vec-perm-indices.h (vec_perm_builder): Change element type
20753 from HOST_WIDE_INT to poly_int64.
20754 (vec_perm_indices::element_type): Update accordingly.
20755 (vec_perm_indices::clamp): Handle polynomial element_types.
20756 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20757 (vec_perm_indices::all_in_range_p): Likewise.
20758 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20760 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20761 polynomial vec_perm_indices element types.
20762 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20763 * fold-const.c (fold_vec_perm): Likewise.
20764 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20765 * tree-vect-generic.c (lower_vec_perm): Likewise.
20766 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20767 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20768 element type to HOST_WIDE_INT.
20770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20771 Alan Hayward <alan.hayward@arm.com>
20772 David Sherwood <david.sherwood@arm.com>
20774 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20775 rather than an int. Use plus_constant.
20776 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20777 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20779 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20780 Alan Hayward <alan.hayward@arm.com>
20781 David Sherwood <david.sherwood@arm.com>
20783 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20784 a HOST_WIDE_INT to a poly_int64.
20786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20787 Alan Hayward <alan.hayward@arm.com>
20788 David Sherwood <david.sherwood@arm.com>
20790 * calls.c (load_register_parameters): Cope with polynomial
20791 mode sizes. Require a constant size for BLKmode parameters
20792 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20793 forces a parameter to be padded at the lsb end in order to
20794 fill a complete number of words, require the parameter size
20795 to be ordered wrt UNITS_PER_WORD.
20797 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20798 Alan Hayward <alan.hayward@arm.com>
20799 David Sherwood <david.sherwood@arm.com>
20801 * reload1.c (spill_stack_slot_width): Change element type
20802 from unsigned int to poly_uint64_pod.
20803 (alter_reg): Treat mode sizes as polynomial.
20805 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20806 Alan Hayward <alan.hayward@arm.com>
20807 David Sherwood <david.sherwood@arm.com>
20809 * reload.c (complex_word_subreg_p): New function.
20810 (reload_inner_reg_of_subreg, push_reload): Use it.
20812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20813 Alan Hayward <alan.hayward@arm.com>
20814 David Sherwood <david.sherwood@arm.com>
20816 * lra-constraints.c (process_alt_operands): Reject matched
20817 operands whose sizes aren't ordered.
20818 (match_reload): Refer to this check here.
20820 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20821 Alan Hayward <alan.hayward@arm.com>
20822 David Sherwood <david.sherwood@arm.com>
20824 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20825 that the mode size is in the set {1, 2, 4, 8, 16}.
20827 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20828 Alan Hayward <alan.hayward@arm.com>
20829 David Sherwood <david.sherwood@arm.com>
20831 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20832 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20839 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20840 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20841 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20842 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20843 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20844 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20845 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20846 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20847 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20849 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20850 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20851 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20852 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20853 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20854 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20855 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20856 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20857 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20858 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20860 * expr.c (emit_move_resolve_push): Treat the input and result
20861 of PUSH_ROUNDING as a poly_int64.
20862 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20863 (emit_push_insn): Likewise.
20864 * lra-eliminations.c (mark_not_eliminable): Likewise.
20865 * recog.c (push_operand): Likewise.
20866 * reload1.c (elimination_effects): Likewise.
20867 * rtlanal.c (nonzero_bits1): Likewise.
20868 * calls.c (store_one_arg): Likewise. Require the padding to be
20869 known at compile time.
20871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20872 Alan Hayward <alan.hayward@arm.com>
20873 David Sherwood <david.sherwood@arm.com>
20875 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20876 Use plus_constant instead of gen_rtx_PLUS.
20878 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20879 Alan Hayward <alan.hayward@arm.com>
20880 David Sherwood <david.sherwood@arm.com>
20882 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20883 rather than an int.
20885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20886 Alan Hayward <alan.hayward@arm.com>
20887 David Sherwood <david.sherwood@arm.com>
20889 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20890 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20891 via stack temporaries. Treat the mode size as polynomial too.
20893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20894 Alan Hayward <alan.hayward@arm.com>
20895 David Sherwood <david.sherwood@arm.com>
20897 * expr.c (expand_expr_real_2): When handling conversions involving
20898 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20899 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20900 as a poly_uint64 too.
20902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20903 Alan Hayward <alan.hayward@arm.com>
20904 David Sherwood <david.sherwood@arm.com>
20906 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20909 Alan Hayward <alan.hayward@arm.com>
20910 David Sherwood <david.sherwood@arm.com>
20912 * combine.c (can_change_dest_mode): Handle polynomial
20913 REGMODE_NATURAL_SIZE.
20914 * expmed.c (store_bit_field_1): Likewise.
20915 * expr.c (store_constructor): Likewise.
20916 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20917 and polynomial REGMODE_NATURAL_SIZE.
20918 (gen_lowpart_common): Likewise.
20919 * reginfo.c (record_subregs_of_mode): Likewise.
20920 * rtlanal.c (read_modify_subreg_p): Likewise.
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 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20927 numbers of elements.
20929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20930 Alan Hayward <alan.hayward@arm.com>
20931 David Sherwood <david.sherwood@arm.com>
20933 * match.pd: Cope with polynomial numbers of vector elements.
20935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20936 Alan Hayward <alan.hayward@arm.com>
20937 David Sherwood <david.sherwood@arm.com>
20939 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20940 in a POINTER_PLUS_EXPR.
20942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20943 Alan Hayward <alan.hayward@arm.com>
20944 David Sherwood <david.sherwood@arm.com>
20946 * omp-simd-clone.c (simd_clone_subparts): New function.
20947 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20948 (ipa_simd_modify_function_body): Likewise.
20950 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20951 Alan Hayward <alan.hayward@arm.com>
20952 David Sherwood <david.sherwood@arm.com>
20954 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20955 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20956 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20957 (expand_vector_condition, vector_element): Likewise.
20958 (subparts_gt): New function.
20959 (get_compute_type): Use subparts_gt.
20960 (count_type_subparts): Delete.
20961 (expand_vector_operations_1): Use subparts_gt instead of
20962 count_type_subparts.
20964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20965 Alan Hayward <alan.hayward@arm.com>
20966 David Sherwood <david.sherwood@arm.com>
20968 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20969 (vect_compile_time_alias): ...this new function. Do the calculation
20970 on poly_ints rather than trees.
20971 (vect_prune_runtime_alias_test_list): Update call accordingly.
20973 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20974 Alan Hayward <alan.hayward@arm.com>
20975 David Sherwood <david.sherwood@arm.com>
20977 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20979 (vect_schedule_slp_instance): Likewise.
20981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20982 Alan Hayward <alan.hayward@arm.com>
20983 David Sherwood <david.sherwood@arm.com>
20985 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20986 constant and extern definitions for variable-length vectors.
20987 (vect_get_constant_vectors): Note that the number of units
20988 is known to be constant.
20990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20991 Alan Hayward <alan.hayward@arm.com>
20992 David Sherwood <david.sherwood@arm.com>
20994 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20995 of units as polynomial. Choose between WIDE and NARROW based
20998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20999 Alan Hayward <alan.hayward@arm.com>
21000 David Sherwood <david.sherwood@arm.com>
21002 * tree-vect-stmts.c (simd_clone_subparts): New function.
21003 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21006 Alan Hayward <alan.hayward@arm.com>
21007 David Sherwood <david.sherwood@arm.com>
21009 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21010 vectors as polynomial. Use build_index_vector for
21011 IFN_GOMP_SIMD_LANE.
21013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21014 Alan Hayward <alan.hayward@arm.com>
21015 David Sherwood <david.sherwood@arm.com>
21017 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21018 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21019 for variable-length vectors.
21020 (vectorizable_mask_load_store): Treat the number of units as
21021 polynomial, asserting that it is constant if the condition has
21022 already been enforced.
21023 (vectorizable_store, vectorizable_load): Likewise.
21025 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21026 Alan Hayward <alan.hayward@arm.com>
21027 David Sherwood <david.sherwood@arm.com>
21029 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21030 of units as polynomial. Punt if we can't tell at compile time
21031 which vector contains the final result.
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 * tree-vect-loop.c (vectorizable_induction): Treat the number
21038 of units as polynomial. Punt on SLP inductions. Use an integer
21039 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21040 cast of such a series for variable-length floating-point
21043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21044 Alan Hayward <alan.hayward@arm.com>
21045 David Sherwood <david.sherwood@arm.com>
21047 * tree.h (build_index_vector): Declare.
21048 * tree.c (build_index_vector): New function.
21049 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21050 of units as polynomial, forcibly converting it to a constant if
21051 vectorizable_reduction has already enforced the condition.
21052 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21053 to create a {1,2,3,...} vector.
21054 (vectorizable_reduction): Treat the number of units as polynomial.
21055 Choose vectype_in based on the largest scalar element size rather
21056 than the smallest number of units. Enforce the restrictions
21059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21060 Alan Hayward <alan.hayward@arm.com>
21061 David Sherwood <david.sherwood@arm.com>
21063 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21064 number of units as polynomial.
21066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21067 Alan Hayward <alan.hayward@arm.com>
21068 David Sherwood <david.sherwood@arm.com>
21070 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21071 * target.def (autovectorize_vector_sizes): Return the vector sizes
21072 by pointer, using vector_sizes rather than a bitmask.
21073 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21074 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21075 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21077 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21078 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21079 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21080 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21081 * omp-general.c (omp_max_vf): Likewise.
21082 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21083 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21084 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21085 * tree-vect-slp.c (vect_slp_bb): Likewise.
21086 * doc/tm.texi: Regenerate.
21087 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21089 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21090 the vector size as a poly_uint64 rather than an unsigned int.
21091 (current_vector_size): Change from an unsigned int to a poly_uint64.
21092 (get_vectype_for_scalar_type): Update accordingly.
21093 * tree.h (build_truth_vector_type): Take the size and number of
21094 units as a poly_uint64 rather than an unsigned int.
21095 (build_vector_type): Add a temporary overload that takes
21096 the number of units as a poly_uint64 rather than an unsigned int.
21097 * tree.c (make_vector_type): Likewise.
21098 (build_truth_vector_type): Take the number of units as a poly_uint64
21099 rather than an unsigned int.
21101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21102 Alan Hayward <alan.hayward@arm.com>
21103 David Sherwood <david.sherwood@arm.com>
21105 * target.def (get_mask_mode): Take the number of units and length
21106 as poly_uint64s rather than unsigned ints.
21107 * targhooks.h (default_get_mask_mode): Update accordingly.
21108 * targhooks.c (default_get_mask_mode): Likewise.
21109 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21110 * doc/tm.texi: Regenerate.
21112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21113 Alan Hayward <alan.hayward@arm.com>
21114 David Sherwood <david.sherwood@arm.com>
21116 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21117 * omp-general.c (omp_max_vf): Likewise.
21118 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21119 (expand_omp_simd): Handle polynomial safelen.
21120 * omp-low.c (omplow_simd_context): Add a default constructor.
21121 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21122 (lower_rec_simd_input_clauses): Update accordingly.
21123 (lower_rec_input_clauses): Likewise.
21125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21126 Alan Hayward <alan.hayward@arm.com>
21127 David Sherwood <david.sherwood@arm.com>
21129 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21130 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21131 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21132 (vect_analyze_slp_cost): Likewise.
21133 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21134 (vect_model_load_cost): Likewise.
21136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21137 Alan Hayward <alan.hayward@arm.com>
21138 David Sherwood <david.sherwood@arm.com>
21140 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21141 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21142 from an unsigned int * to a poly_uint64_pod *.
21143 (calculate_unrolling_factor): New function.
21144 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21146 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21147 Alan Hayward <alan.hayward@arm.com>
21148 David Sherwood <david.sherwood@arm.com>
21150 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21151 from an unsigned int to a poly_uint64.
21152 (_loop_vec_info::slp_unrolling_factor): Likewise.
21153 (_loop_vec_info::vectorization_factor): Change from an int
21155 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21156 (vect_get_num_vectors): New function.
21157 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21158 (vect_get_num_copies): Use vect_get_num_vectors.
21159 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21160 to an unsigned int *.
21161 (vect_analyze_data_refs): Change min_vf from an int * to a
21163 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21164 than an unsigned HOST_WIDE_INT.
21165 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21166 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21167 to an unsigned int *.
21168 (vect_analyze_data_ref_dependences): Likewise.
21169 (vect_compute_data_ref_alignment): Handle polynomial vf.
21170 (vect_enhance_data_refs_alignment): Likewise.
21171 (vect_prune_runtime_alias_test_list): Likewise.
21172 (vect_shift_permute_load_chain): Likewise.
21173 (vect_supportable_dr_alignment): Likewise.
21174 (dependence_distance_ge_vf): Take the vectorization factor as a
21175 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21176 (vect_analyze_data_refs): Change min_vf from an int * to a
21178 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21179 vfm1 as a poly_uint64 rather than an int. Make the same change
21180 for the returned bound_scalar.
21181 (vect_gen_vector_loop_niters): Handle polynomial vf.
21182 (vect_do_peeling): Likewise. Update call to
21183 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21184 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21186 * tree-vect-loop.c (vect_determine_vectorization_factor)
21187 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21188 (vect_get_known_peeling_cost): Likewise.
21189 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21190 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21191 (vect_transform_loop): Likewise. Use the lowest possible VF when
21192 updating the upper bounds of the loop.
21193 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21194 rather than an int.
21195 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21196 polynomial unroll factors.
21197 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21198 (vect_make_slp_decision): Likewise.
21199 (vect_supported_load_permutation_p): Likewise, and polynomial
21201 (vect_analyze_slp_cost): Handle polynomial vf.
21202 (vect_slp_analyze_node_operations): Likewise.
21203 (vect_slp_analyze_bb_1): Likewise.
21204 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21205 than an unsigned HOST_WIDE_INT.
21206 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21207 (vectorizable_load): Handle polynomial vf.
21208 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21210 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21213 Alan Hayward <alan.hayward@arm.com>
21214 David Sherwood <david.sherwood@arm.com>
21216 * match.pd: Handle bit operations involving three constants
21217 and try to fold one pair.
21219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21221 * tree-vect-loop-manip.c: Include gimple-fold.h.
21222 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21223 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21224 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21225 Add a path that uses a step of VF instead of 1, but disable it
21227 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21228 and niters_no_overflow parameters. Update calls to
21229 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21230 Create a new SSA name if the latter choses to use a ste other
21231 than zero, and return it via niters_vector_mult_vf_var.
21232 * tree-vect-loop.c (vect_transform_loop): Update calls to
21233 vect_do_peeling, vect_gen_vector_loop_niters and
21234 slpeel_make_loop_iterate_ntimes.
21235 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21236 (vect_gen_vector_loop_niters): Update declarations after above changes.
21238 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21240 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21241 128-bit round to integer instructions.
21242 (ceil<mode>2): Likewise.
21243 (btrunc<mode>2): Likewise.
21244 (round<mode>2): Likewise.
21246 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21248 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21249 unaligned VSX load/store on P8/P9.
21250 (expand_block_clear): Allow the use of unaligned VSX
21251 load/store on P8/P9.
21253 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21255 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21257 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21258 swap associated with both a load and a store.
21260 2018-01-02 Andrew Waterman <andrew@sifive.com>
21262 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21263 * config/riscv/riscv.md (clear_cache): Use it.
21265 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21267 * web.c: Remove out-of-date comment.
21269 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21271 * expr.c (fixup_args_size_notes): Check that any existing
21272 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21273 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21274 (emit_single_push_insn): ...here.
21276 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21278 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21279 (const_vector_encoded_nelts): New function.
21280 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21281 (const_vector_int_elt, const_vector_elt): Declare.
21282 * emit-rtl.c (const_vector_int_elt_1): New function.
21283 (const_vector_elt): Likewise.
21284 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21285 of CONST_VECTOR_ELT.
21287 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21289 * expr.c: Include rtx-vector-builder.h.
21290 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21291 directly on the tree encoding.
21292 (const_vector_from_tree): Likewise.
21293 * optabs.c: Include rtx-vector-builder.h.
21294 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21295 sequence of "u" values.
21296 * vec-perm-indices.c: Include rtx-vector-builder.h.
21297 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21298 directly on the vec_perm_indices encoding.
21300 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21302 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21303 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21304 * rtx-vector-builder.h: New file.
21305 * rtx-vector-builder.c: Likewise.
21306 * rtl.h (rtx_def::u2): Add a const_vector field.
21307 (CONST_VECTOR_NPATTERNS): New macro.
21308 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21309 (CONST_VECTOR_DUPLICATE_P): Likewise.
21310 (CONST_VECTOR_STEPPED_P): Likewise.
21311 (CONST_VECTOR_ENCODED_ELT): Likewise.
21312 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21313 (unwrap_const_vec_duplicate): Likewise.
21314 (const_vec_series_p): Check for a non-duplicated vector encoding.
21315 Say that the function only returns true for integer vectors.
21316 * emit-rtl.c: Include rtx-vector-builder.h.
21317 (gen_const_vec_duplicate_1): Delete.
21318 (gen_const_vector): Call gen_const_vec_duplicate instead of
21319 gen_const_vec_duplicate_1.
21320 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21321 (gen_const_vec_duplicate): Use rtx_vector_builder.
21322 (gen_const_vec_series): Likewise.
21323 (gen_rtx_CONST_VECTOR): Likewise.
21324 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21325 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21326 Build a new vector rather than modifying a CONST_VECTOR in-place.
21327 (handle_special_swappables): Update call accordingly.
21328 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21329 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21330 Build a new vector rather than modifying a CONST_VECTOR in-place.
21331 (handle_special_swappables): Update call accordingly.
21333 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21335 * simplify-rtx.c (simplify_const_binary_operation): Use
21336 CONST_VECTOR_ELT instead of XVECEXP.
21338 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21340 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21341 the selector elements to be different from the data elements
21342 if the selector is a VECTOR_CST.
21343 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21344 ssizetype for the selector.
21346 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21348 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21349 before testing each element individually.
21350 * tree-vect-generic.c (lower_vec_perm): Likewise.
21352 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21354 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21355 * selftest-run-tests.c (selftest::run_tests): Call it.
21356 * vector-builder.h (vector_builder::operator ==): New function.
21357 (vector_builder::operator !=): Likewise.
21358 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21359 (vec_perm_indices::all_from_input_p): New function.
21360 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21361 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21362 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21363 instead of reading the VECTOR_CST directly. Detect whether both
21364 vector inputs are the same before constructing the vec_perm_indices,
21365 and update the number of inputs argument accordingly. Use the
21366 utility functions added above. Only construct sel2 if we need to.
21368 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21370 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21371 the broadcast of the low byte.
21372 (expand_mult_highpart): Use an explicit encoding for the permutes.
21373 * optabs-query.c (can_mult_highpart_p): Likewise.
21374 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21375 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21376 (vectorizable_bswap): Likewise.
21377 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21378 explicit encoding for the power-of-2 permutes.
21379 (vect_permute_store_chain): Likewise.
21380 (vect_grouped_load_supported): Likewise.
21381 (vect_permute_load_chain): Likewise.
21383 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21385 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21386 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21387 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21388 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21389 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21390 (vect_gen_perm_mask_any): Likewise.
21392 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21394 * int-vector-builder.h: New file.
21395 * vec-perm-indices.h: Include int-vector-builder.h.
21396 (vec_perm_indices): Redefine as an int_vector_builder.
21397 (auto_vec_perm_indices): Delete.
21398 (vec_perm_builder): Redefine as a stand-alone class.
21399 (vec_perm_indices::vec_perm_indices): New function.
21400 (vec_perm_indices::clamp): Likewise.
21401 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21402 (vec_perm_indices::new_vector): New function.
21403 (vec_perm_indices::new_expanded_vector): Update for new
21404 vec_perm_indices class.
21405 (vec_perm_indices::rotate_inputs): New function.
21406 (vec_perm_indices::all_in_range_p): Operate directly on the
21407 encoded form, without computing elided elements.
21408 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21409 encoding. Update for new vec_perm_indices class.
21410 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21411 the given vec_perm_builder.
21412 (expand_vec_perm_var): Update vec_perm_builder constructor.
21413 (expand_mult_highpart): Use vec_perm_builder instead of
21414 auto_vec_perm_indices.
21415 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21416 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21417 or double series encoding as appropriate.
21418 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21419 vec_perm_indices instead of auto_vec_perm_indices.
21420 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21421 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21422 (vect_permute_store_chain): Likewise.
21423 (vect_grouped_load_supported): Likewise.
21424 (vect_permute_load_chain): Likewise.
21425 (vect_shift_permute_load_chain): Likewise.
21426 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21427 (vect_transform_slp_perm_load): Likewise.
21428 (vect_schedule_slp_instance): Likewise.
21429 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21430 (vectorizable_mask_load_store): Likewise.
21431 (vectorizable_bswap): Likewise.
21432 (vectorizable_store): Likewise.
21433 (vectorizable_load): Likewise.
21434 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21435 vec_perm_indices instead of auto_vec_perm_indices. Use
21436 tree_to_vec_perm_builder to read the vector from a tree.
21437 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21438 vec_perm_builder instead of a vec_perm_indices.
21439 (have_whole_vector_shift): Use vec_perm_builder and
21440 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21441 truncation to calc_vec_perm_mask_for_shift.
21442 (vect_create_epilog_for_reduction): Likewise.
21443 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21444 from auto_vec_perm_indices to vec_perm_indices.
21445 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21446 instead of changing individual elements.
21447 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21448 the vector in d.perm.
21449 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21450 from auto_vec_perm_indices to vec_perm_indices.
21451 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21452 instead of changing individual elements.
21453 (arm_vectorize_vec_perm_const): Use new_vector to install
21454 the vector in d.perm.
21455 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21456 Update vec_perm_builder constructor.
21457 (rs6000_expand_interleave): Likewise.
21458 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21459 (rs6000_expand_interleave): Likewise.
21461 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21463 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21464 to qimode could truncate the indices.
21465 * optabs.c (expand_vec_perm_var): Likewise.
21467 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21469 * Makefile.in (OBJS): Add vec-perm-indices.o.
21470 * vec-perm-indices.h: New file.
21471 * vec-perm-indices.c: Likewise.
21472 * target.h (vec_perm_indices): Replace with a forward class
21474 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21475 * optabs.h: Include vec-perm-indices.h.
21476 (expand_vec_perm): Delete.
21477 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21478 (expand_vec_perm_const): Declare.
21479 * target.def (vec_perm_const_ok): Replace with...
21480 (vec_perm_const): ...this new hook.
21481 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21482 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21483 * doc/tm.texi: Regenerate.
21484 * optabs.def (vec_perm_const): Delete.
21485 * doc/md.texi (vec_perm_const): Likewise.
21486 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21487 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21488 expand_vec_perm for constant permutation vectors. Assert that
21489 the mode of variable permutation vectors is the integer equivalent
21490 of the mode that is being permuted.
21491 * optabs-query.h (selector_fits_mode_p): Declare.
21492 * optabs-query.c: Include vec-perm-indices.h.
21493 (selector_fits_mode_p): New function.
21494 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21495 is defined, instead of checking whether the vec_perm_const_optab
21496 exists. Use targetm.vectorize.vec_perm_const instead of
21497 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21498 fit in the vector mode before using a variable permute.
21499 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21500 vec_perm_indices instead of an rtx.
21501 (expand_vec_perm): Replace with...
21502 (expand_vec_perm_const): ...this new function. Take the selector
21503 as a vec_perm_indices rather than an rtx. Also take the mode of
21504 the selector. Update call to shift_amt_for_vec_perm_mask.
21505 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21506 Use vec_perm_indices::new_expanded_vector to expand the original
21507 selector into bytes. Check whether the indices fit in the vector
21508 mode before using a variable permute.
21509 (expand_vec_perm_var): Make global.
21510 (expand_mult_highpart): Use expand_vec_perm_const.
21511 * fold-const.c: Includes vec-perm-indices.h.
21512 * tree-ssa-forwprop.c: Likewise.
21513 * tree-vect-data-refs.c: Likewise.
21514 * tree-vect-generic.c: Likewise.
21515 * tree-vect-loop.c: Likewise.
21516 * tree-vect-slp.c: Likewise.
21517 * tree-vect-stmts.c: Likewise.
21518 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21520 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21521 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21522 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21523 (aarch64_vectorize_vec_perm_const): ...this new function.
21524 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21525 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21526 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21527 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21528 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21529 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21530 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21532 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21533 check for NEON modes.
21534 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21535 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21536 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21537 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21539 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21540 the old VEC_PERM_CONST conditions.
21541 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21542 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21543 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21544 (ia64_vectorize_vec_perm_const_ok): Merge into...
21545 (ia64_vectorize_vec_perm_const): ...this new function.
21546 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21547 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21548 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21549 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21550 * config/mips/mips.c (mips_expand_vec_perm_const)
21551 (mips_vectorize_vec_perm_const_ok): Merge into...
21552 (mips_vectorize_vec_perm_const): ...this new function.
21553 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21554 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21555 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21556 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21557 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21558 (rs6000_expand_vec_perm_const): Delete.
21559 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21561 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21562 (altivec_expand_vec_perm_const_le): Take each operand individually.
21563 Operate on constant selectors rather than rtxes.
21564 (altivec_expand_vec_perm_const): Likewise. Update call to
21565 altivec_expand_vec_perm_const_le.
21566 (rs6000_expand_vec_perm_const): Delete.
21567 (rs6000_vectorize_vec_perm_const_ok): Delete.
21568 (rs6000_vectorize_vec_perm_const): New function.
21569 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21570 an element count and rtx array.
21571 (rs6000_expand_extract_even): Update call accordingly.
21572 (rs6000_expand_interleave): Likewise.
21573 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21574 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21575 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21576 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21577 (rs6000_expand_vec_perm_const): Delete.
21578 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21579 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21580 (altivec_expand_vec_perm_const_le): Take each operand individually.
21581 Operate on constant selectors rather than rtxes.
21582 (altivec_expand_vec_perm_const): Likewise. Update call to
21583 altivec_expand_vec_perm_const_le.
21584 (rs6000_expand_vec_perm_const): Delete.
21585 (rs6000_vectorize_vec_perm_const_ok): Delete.
21586 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21587 reference to the SPE evmerge intructions.
21588 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21589 an element count and rtx array.
21590 (rs6000_expand_extract_even): Update call accordingly.
21591 (rs6000_expand_interleave): Likewise.
21592 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21593 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21595 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21597 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21599 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21600 vector mode and that that mode matches the mode of the data
21602 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21603 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21604 directly using expand_vec_perm_1 when forcing selectors into
21606 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21608 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21610 * optabs-query.h (can_vec_perm_p): Delete.
21611 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21612 * optabs-query.c (can_vec_perm_p): Split into...
21613 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21614 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21615 particular selector is valid.
21616 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21617 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21618 (vect_grouped_load_supported): Likewise.
21619 (vect_shift_permute_load_chain): Likewise.
21620 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21621 (vect_transform_slp_perm_load): Likewise.
21622 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21623 (vectorizable_bswap): Likewise.
21624 (vect_gen_perm_mask_checked): Likewise.
21625 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21626 implementations of variable permutation vectors into account
21627 when deciding which selector to use.
21628 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21629 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21630 with a false third argument.
21631 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21632 to test whether the constant selector is valid and can_vec_perm_var_p
21633 to test whether a variable selector is valid.
21635 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21637 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21638 * optabs-query.c (can_vec_perm_p): Likewise.
21639 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21640 instead of vec_perm_indices.
21641 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21642 (vect_gen_perm_mask_checked): Likewise,
21643 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21644 (vect_gen_perm_mask_checked): Likewise,
21646 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21648 * optabs-query.h (qimode_for_vec_perm): Declare.
21649 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21650 (qimode_for_vec_perm): ...this new function.
21651 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21653 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21655 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21656 does not have a conditional at the top.
21658 2018-01-02 Richard Biener <rguenther@suse.de>
21660 * ipa-inline.c (big_speedup_p): Fix expression.
21662 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21665 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21668 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21672 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21673 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21674 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21675 cond_taken_branch_cost 3->4.
21677 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21679 PR tree-optimization/83581
21680 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21681 TODO_cleanup_cfg if any changes have been made.
21683 PR middle-end/83608
21684 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21685 convert_modes if target mode has the right side, but different mode
21688 PR middle-end/83609
21689 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21690 last argument when extracting from CONCAT. If either from_real or
21691 from_imag is NULL, use expansion through memory. If result is not
21692 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21693 the parts directly to inner mode, if even that fails, use expansion
21696 PR middle-end/83623
21697 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21698 check for bswap in mode rather than HImode and use that in expand_unop
21701 Copyright (C) 2018 Free Software Foundation, Inc.
21703 Copying and distribution of this file, with or without modification,
21704 are permitted in any medium without royalty provided the copyright
21705 notice and this notice are preserved.