1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
5 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6 to get gassigns and gcalls, rather than operating on generc gimple
8 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10 (vectorizable_load, vect_analyze_stmt): Likewise.
11 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
15 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
16 return stmt_vec_infos rather than gimple stmts. Do not accept
18 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
20 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
21 Update use of get_later_stmt.
22 (vect_get_constant_vectors): Update call accordingly.
23 (vect_schedule_slp_instance): Likewise
24 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
25 (vect_slp_analyze_instance_dependence): Likewise.
26 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
28 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
30 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
31 (stmt_info_for_cost::stmt_info): ...this new field.
32 (add_stmt_costs): Update accordingly.
33 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
34 (vect_get_known_peeling_cost): Likewise.
35 (vect_estimate_min_profitable_iters): Likewise.
36 * tree-vect-stmts.c (record_stmt_cost): Likewise.
38 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
40 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
41 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
42 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
44 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
46 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
48 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
49 a gimple stmt to a stmt_vec_info.
50 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
52 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
54 * tree-vectorizer.h (vec_info::grouped_stores): Change from
55 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
56 (_loop_vec_info::reduction_chains): Likewise.
57 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
59 * tree-vect-slp.c (vect_analyze_slp): Likewise.
61 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
63 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
64 a gimple stmt to a stmt_vec_info.
65 (_stmt_vec_info::next_element): Likewise.
66 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
67 (vect_slp_analyze_and_verify_node_alignment)
68 (vect_analyze_group_access_1, vect_analyze_group_access)
69 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
70 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
71 (vect_supportable_dr_alignment): Update accordingly.
72 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
73 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
74 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
75 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
76 * tree-vect-slp.c (vect_build_slp_tree_1)
77 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
78 (vect_split_slp_store_group, vect_analyze_slp_instance)
79 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
80 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
81 (get_group_load_store_type, get_load_store_type)
82 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
83 (vect_transform_stmt, vect_remove_stores): Likewise.
85 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
87 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
89 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
90 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
91 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
92 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
93 (vector_alignment_reachable_p, vect_get_data_access_cost)
94 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
95 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
96 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
97 (vect_analyze_group_access_1, vect_analyze_group_access)
98 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
99 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
100 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
101 result of vect_dr_stmt and use the stmt_vec_info instead of
102 the associated gimple stmt.
103 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
104 (vect_gen_prolog_loop_niters): Likewise.
105 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
107 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
109 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
110 to a vec<stmt_vec_info>.
111 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
112 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
114 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
115 to a vec<stmt_vec_info>.
116 (bst_traits::value_type, bst_traits::value_type): Likewise.
117 (bst_traits::hash): Update accordingly.
118 (vect_get_and_check_slp_defs): Change the stmts parameter from
119 a vec<gimple *> to a vec<stmt_vec_info>.
120 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
121 (vect_build_slp_tree): Likewise.
122 (vect_build_slp_tree_2): Likewise. Update uses of
123 SLP_TREE_SCALAR_STMTS.
124 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
125 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
126 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
127 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
128 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
129 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
130 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
131 (vect_get_constant_vectors, vect_get_slp_defs)
132 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
133 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
134 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
135 instead of gimple stmts.
136 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
137 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
138 (vect_slp_analyze_instance_dependence): Update uses of
139 SLP_TREE_SCALAR_STMTS.
140 (vect_slp_analyze_and_verify_node_alignment): Likewise.
141 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
142 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
143 (get_initial_defs_for_reduction): Likewise.
144 (vect_create_epilog_for_reduction): Likewise.
145 (vectorize_fold_left_reduction): Likewise.
146 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
147 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
148 (can_vectorize_live_stmts): Likewise.
150 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
152 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
153 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
154 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
156 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
158 (gather_scalar_reductions): Update after above interface changes.
159 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
160 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
162 (vect_force_simple_reduction): Likewise.
163 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
164 LOOP_VINFO_REDUCTIONS.
165 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
169 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
170 a gimple stmt to a stmt_vec_info.
171 * tree-vect-loop.c (vect_active_double_reduction_p)
172 (vect_force_simple_reduction, vectorizable_reduction): Update
175 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
177 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
178 vec<gimple *> to a vec<stmt_vec_info>.
179 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
180 the reduction_phis argument from a vec<gimple *> to a
182 (vectorizable_reduction): Likewise the phis local variable that
183 is passed to vect_create_epilog_for_reduction. Update for new type
184 of SLP_TREE_VEC_STMTS.
185 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
186 (vectorizable_live_operation): Likewise.
187 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
188 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
192 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
193 a gimple stmt to a stmt_vec_info.
194 (vectorizable_condition, vectorizable_live_operation)
195 (vectorizable_reduction, vectorizable_induction): Pass back the
196 vectorized statement as a stmt_vec_info.
197 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
198 use of STMT_VINFO_VEC_STMT.
199 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
200 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
201 as stmt_vec_infos rather than gimple stmts.
202 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
204 (vectorizable_live_operation): Likewise.
205 (vectorizable_reduction, vectorizable_induction): Likewise,
206 updating use of STMT_VINFO_VEC_STMT.
207 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
208 of STMT_VINFO_VEC_STMT.
209 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
210 (vectorizable_simd_clone_call, vectorizable_conversion)
211 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
212 (vectorizable_store, vectorizable_load, vectorizable_condition)
213 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
214 from a gimple stmt to a stmt_vec_info.
215 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
216 pointer to a stmt_vec_info to the vectorizable_* routines.
218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
220 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
221 a gimple stmt to a stmt_vec_info.
222 (is_pattern_stmt_p): Update accordingly.
223 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
224 (vect_record_grouped_load_vectors): Likewise.
225 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
226 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
227 (vect_model_reduction_cost): Likewise.
228 (vect_create_epilog_for_reduction): Likewise.
229 (vectorizable_reduction, vectorizable_induction): Likewise.
230 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
231 Return the stmt_vec_info for the pattern statement.
232 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
233 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
234 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
235 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
236 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
237 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
238 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
239 (free_stmt_vec_info, vect_is_simple_use): Likewise.
241 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
243 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
244 (vect_finish_stmt_generation): Likewise.
245 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
246 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
247 (vect_build_gather_load_calls): Use the return value of the above
248 functions instead of a separate call to vinfo_for_stmt. Use narrow
249 scopes for the input gimple stmt and wider scopes for the associated
250 stmt_vec_info. Use vec_info::lookup_def when setting these
251 stmt_vec_infos from an SSA_NAME definition.
252 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
253 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
254 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
255 (vectorizable_store, vectorizable_load, vectorizable_condition)
256 (vectorizable_comparison): Likewise.
257 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
258 (vectorizable_reduction): Likewise.
260 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
262 * tree-vectorizer.h (vect_is_simple_use): Add an optional
263 stmt_vec_info * parameter before the optional gimple **.
264 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
265 (process_use, vect_get_vec_def_for_operand_1): Update callers.
266 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
267 * tree-vect-loop.c (vectorizable_reduction): Likewise.
268 (vectorizable_live_operation): Likewise.
269 * tree-vect-patterns.c (type_conversion_p): Likewise.
270 (vect_look_through_possible_promotion): Likewise.
271 (vect_recog_rotate_pattern): Likewise.
272 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
276 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
277 a typedef to a wrapper class.
278 (NULL_STMT_VEC_INFO): New macro.
279 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
280 (stmt_vec_info::operator*): New function.
281 (stmt_vec_info::operator gimple *): Likewise.
282 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
283 (add_stmt_costs): Likewise.
284 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
285 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
286 (vect_get_known_peeling_cost): Likewise.
287 (vect_estimate_min_profitable_iters): Likewise.
288 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
289 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
290 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
291 (vectorizable_store, free_stmt_vec_infos): Likewise.
292 (new_stmt_vec_info): Change return type of xcalloc to
295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
297 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
298 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
299 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
300 a single_imm_use-based sequence.
301 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
305 * tree-vectorizer.h (vec_info::lookup_def): Declare.
306 * tree-vectorizer.c (vec_info::lookup_def): New function.
307 * tree-vect-patterns.c (vect_get_internal_def): Use it.
308 (vect_widened_op_tree): Likewise.
309 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
310 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
311 (vectorizable_reduction): Likewise.
312 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
314 (vect_is_slp_reduction): Update calls accordingly. Use
315 vec_info::lookup_def.
316 (vect_is_simple_reduction): Likewise
317 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
319 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
321 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
322 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
323 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
325 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
326 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
327 (vect_update_vf_for_slp, vect_analyze_loop_operations)
328 (vect_is_slp_reduction, vectorizable_induction)
329 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
330 * tree-vect-patterns.c (vect_init_pattern_stmt):
331 (vect_determine_min_output_precision_1, vect_determine_precisions)
332 (vect_pattern_recog): Likewise.
333 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
334 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
335 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
336 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
337 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
338 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
339 info field from a loop to a loop_vec_info.
341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
343 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
344 (vec_info::add_stmt): Declare.
345 * tree-vectorizer.c (vec_info::add_stmt): New function.
346 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
347 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
348 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
349 (vectorizable_induction): Likewise.
350 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
351 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
352 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
353 (vectorizable_load): Likewise.
354 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
355 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
356 (vect_recog_gather_scatter_pattern): Likewise.
357 (append_pattern_def_seq): Likewise. Remove a check that is
358 performed by add_stmt itself.
360 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
362 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
363 which make_ssa_name was called with new_stmt before new_stmt
366 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
368 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
370 (vect_is_slp_reduction): ...here...
371 (vect_is_simple_reduction): ...and here. Remove repetition of tests
372 that are already known to be false.
374 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
376 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
377 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
378 STMT_VINFO_NUM_SLP_USES when it's true.
379 (vect_free_slp_instance): Add a final_p parameter and pass it to
381 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
382 (vect_analyze_slp_instance): Likewise.
383 (vect_slp_analyze_operations): Likewise.
384 (vect_slp_analyze_bb_1): Likewise.
385 * tree-vectorizer.c (vec_info): Likewise.
386 * tree-vect-loop.c (vect_transform_loop): Likewise.
388 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
390 * tree-vect-loop.c (vectorizable_reduction): Assert that the
391 function is not called for second and subsequent members of
394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
396 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
397 cases for nested loops from here to ...
398 (vect_create_epilog_for_reduction): ...here. Only call
399 vect_is_simple_use for inner-loop reductions.
401 2018-07-31 Martin Liska <mliska@suse.cz>
403 PR gcov-profile/85338
404 PR gcov-profile/85350
405 PR gcov-profile/85372
406 * profile.c (struct location_triplet): New.
407 (struct location_triplet_hash): Likewise.
408 (output_location): Do not output a BB that
409 is already recorded for a line.
410 (branch_prob): Use streamed_locations.
412 2018-07-31 Martin Liska <mliska@suse.cz>
414 PR gcov-profile/85370
415 * coverage.c (coverage_begin_function): Do not mark target
416 clones as artificial functions.
418 2018-07-31 Martin Liska <mliska@suse.cz>
420 PR gcov-profile/83813
421 PR gcov-profile/84758
422 PR gcov-profile/85217
423 PR gcov-profile/85332
424 * profile.c (branch_prob): Do not record GOTO expressions
425 for GIMPLE statements which locations are already streamed.
427 2018-07-31 Olivier Hainque <hainque@adacore.com>
429 * gcc.c (handle_spec_function): Accept a soft_matched_part
430 argument, as do_spec_1. Pass it down to ...
431 (eval_spec_function): Accept a soft_matched_part argument,
432 and pass it down to ...
433 (do_spec_2): Accept a soft_matched_part argument, and pass
434 it down to do_spec_1.
435 (do_spec_1): Pass soft_matched_part to handle_spec_function.
436 (handle_braces): Update call to handle_spec_function.
437 (driver::set_up_specs): Update calls to do_spec_2.
438 (compare_debug_dump_opt_spec_function): Likewise.
439 (compare_debug_self_opt_spec_function): Likewise.
441 2018-07-31 Olivier Hainque <hainque@adacore.com>
443 * common.opt (nolibc): New option.
444 * doc/invoke.texi (Link Options): Document it.
445 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
446 * config/alpha/linux.h: Likewise.
447 * config/arc/elf.h: Likewise.
448 * config/arm/uclinux-elf.h: Likewise.
449 * config/arm/unknown-elf.h: Likewise.
450 * config/avr/avrlibc.h: Likewise.
451 * config/bfin/bfin.h: Likewise.
452 * config/bfin/linux.h: Likewise.
453 * config/bfin/uclinux.h: Likewise.
454 * config/darwin.h: Likewise.
455 * config/darwin10.h: Likewise.
456 * config/darwin12.h: Likewise.
457 * config/gnu-user.h: Likewise.
458 * config/lm32/uclinux-elf.h: Likewise.
459 * config/pa/pa-hpux11.h: Likewise.
460 * config/pa/pa64-hpux.h: Likewise.
461 * config/sparc/sparc.h: Likewise.
463 2018-07-31 Olivier Hainque <hainque@adacore.com>
465 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
468 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
471 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
474 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
476 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
477 terminated string literal.
479 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
481 PR rtl-optimization/85160
482 * combine.c (is_just_move): New function.
483 (try_combine): Allow combining two instructions into two if neither of
484 the original instructions was a move.
486 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
489 * doc/extend.texi (Global Register Variables): Discourage use of type
491 (Local Register Variables): Likewise.
493 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
495 PR tree-optimization/86506
496 * hwint.h (ceil_log2): Resync with hwint.c implementation.
498 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
501 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
502 hard_regno, make sure no insn between `from` and `to` clobbers it.
504 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
505 Tom de Vries <tdevries@suse.de>
507 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
508 (PTX_DEFAULT_RUNTIME_DIM): ... this.
509 (nvptx_goacc_validate_dims): Set default worker and gang dims to
510 PTX_DEFAULT_RUNTIME_DIM.
511 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
513 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
515 * config/pa/pa.c (pa_output_addr_vec): Align address table.
516 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
517 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
519 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
521 * config/rs6000/constraints.md (wG constraint): Delete, no longer
523 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
524 predicate to reflect toc fusion has been deleted.
525 (toc_fusion_mem_raw): Delete, no longer used.
526 (toc_fusion_mem_wrapped): Likewise.
527 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
529 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
530 Delete, no longer used.
531 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
532 meant to be used for toc fusion.
533 (rs6000_debug_print_mode): Delete toc fusion debugging.
534 (rs6000_debug_reg_global): Likewise.
535 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
536 fusion and secondary reload support that were never used.
537 (rs6000_option_override_internal): Delete TOC fusion, that was only
538 partially defined, and it did not work unless you also used the
540 (rs6000_legitimate_address_p): Delete TOC fusion support.
541 (rs6000_opt_masks): Likewise.
542 (fusion_wrap_memory_address): Delete function, no longer used.
543 (fusion_split_address); Delete TOC fusion support.
544 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
545 longer used with toc fusion being deleted.
546 (TARGET_TOC_FUSION_FP): Likewise.
547 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
549 (toc fusion spliter): Delete TOC fusion support.
550 (toc_fusionload_<mode>): Likewise.
551 (toc_fusionload_di): Likewise.
552 (fusion_gpr_load_<mode>): Delete generator function, this insn no
553 longer needs to be named. Rename predicate to delete TOC fusion.
554 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
555 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
556 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
557 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
558 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
560 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
562 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
563 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
564 __int128 in built-in function prototypes.
565 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
566 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
568 2018-07-27 Martin Sebor <msebor@redhat.com>
570 PR tree-optimization/86696
571 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
572 types, including enums.
573 (handle_char_store): Be prepared for the above function to fail.
575 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
577 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
578 when optimization level is lower than 2 or optimize for size.
580 2018-07-26 Martin Sebor <msebor@redhat.com>
582 PR tree-optimization/86043
583 PR tree-optimization/86042
584 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
585 (get_string_cst_length): Rename...
586 (get_min_string_length): ...to this. Add argument.
587 (handle_char_store): Extend to handle multi-character stores by
589 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
590 * tree.h (initializer_zerop): Add argument.
592 2018-07-26 Jakub Jelinek <jakub@redhat.com>
595 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
596 declare target to variables if they have always,{to,from,tofrom} map
599 2018-07-26 Martin Liska <mliska@suse.cz>
602 * lto-wrapper.c: Add linker_output as prefix
603 for ltrans_output_file.
605 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
607 PR rtl-optimization/85805
608 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
609 value for hard registers if that was written in the same mode.
611 2018-07-26 Martin Liska <mliska@suse.cz>
613 PR gcov-profile/86536
614 * gcov.c (format_gcov): Use printf format %.*f directly
615 and do not handle special values.
617 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
619 * common/config/arc/arc-common.c (arc_option_optimization_table):
620 Update default optimizations for size.
622 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
624 * config/arc/arc.md (movsf_insn): Add short instruction selection.
625 * config/arc/constraints.md (CfZ): New constraint.
626 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
627 (subsf3_fpu): Likewise.
628 (cmpsf_fpu): Likewise.
629 (cmpsf_fpu_uneq): Likewise.
631 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
633 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
635 (arc_is_uncached_mem_p): uncached applies to both the variable and
638 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
640 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
643 2018-07-25 David Malcolm <dmalcolm@redhat.com>
645 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
646 field "m_scopes" from vec to auto_vec.
648 2018-07-25 Martin Liska <mliska@suse.cz>
650 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
653 2018-07-25 Richard Biener <rguenther@suse.de>
656 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
657 special wrt context_die late.
658 (gen_subprogram_die): Re-use DIEs in local scope.
660 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
662 PR tree-optimization/86644
663 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
665 2018-07-25 Martin Liska <mliska@suse.cz>
668 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
669 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
671 2018-07-25 Martin Liska <mliska@suse.cz>
674 * params.def: Explain ASan abbreviation and provide
675 a documentation link.
677 2018-07-24 Martin Sebor <msebor@redhat.com>
679 PR tree-optimization/86622
680 PR tree-optimization/86532
681 * builtins.h (string_length): Declare.
682 * builtins.c (c_strlen): Correct handling of non-constant offsets.
683 (check_access): Be prepared for non-constant length ranges.
684 (string_length): Make extern.
685 * expr.c (string_constant): Only handle the minor non-constant
686 array index. Use string_constant to compute the length of
687 a generic string constant.
689 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
691 PR tree-optimization/86618
692 * tree-vect-stmts.c (vectorizable_call): Don't take the address
693 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
695 2018-07-24 David Malcolm <dmalcolm@redhat.com>
697 PR tree-optimization/86636
698 * json.cc (json::object::set): Fix comment. Add assertions.
699 (json::array::append): Move here from json.h. Add comment and an
701 (json::string::string): Likewise.
702 * json.h (json::array::append): Move to json.cc.
703 (json::string::string): Likewise.
704 * optinfo-emit-json.cc
705 (optrecord_json_writer::impl_location_to_json): Assert that we
706 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
707 wrapper around it. Expand the location once, rather than three
709 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
710 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
712 (optrecord_json_writer::optinfo_to_json): Likewise, in four
713 places. Fix some overlong lines.
715 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
717 * config/aarch64/aarch64-simd.md
718 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
719 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
720 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
721 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
722 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
723 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
724 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
725 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
726 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
728 2018-07-24 Jakub Jelinek <jakub@redhat.com>
731 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
732 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
733 and abs_d == d, do the power of two handling if profitable.
735 2018-07-24 Richard Biener <rguenther@suse.de>
737 * match.pd: Add BIT_FIELD_REF canonicalizations.
739 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
742 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
744 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
746 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
747 terminated STRING_CST object.
749 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
751 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
753 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
755 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
756 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
757 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
758 the elements into a register.
759 (rs6000_split_v4si_init_di_reg): Delete.
760 (rs6000_split_v4si_init): Delete.
761 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
762 (vsx_init_v4si): Rewrite as a define_expand.
764 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
766 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
767 zero_extend argument from memory): New.
769 2018-07-22 Martin Sebor <msebor@redhat.com>
772 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
773 diagnosing calls with unknown arguments unless -Walloca-larger-than
774 is restricted to less than PTRDIFF_MAX bytes.
776 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
778 * doc/gcov.texi (Invoking Gcov): Editorial changes.
780 2018-07-20 David Malcolm <dmalcolm@redhat.com>
782 * pretty-print.c (text_info::set_location): Remove redundant
783 "line_table" parameter from call to rich_location::set_range.
785 2018-07-20 Martin Sebor <msebor@redhat.com>
788 * builtins.c (expand_builtin_alloca): Adjust.
789 * calls.c (alloc_max_size): Simplify.
790 * cgraphunit.c (cgraph_node::expand): Adjust.
791 * common.opt (larger_than_size, warn_frame_larger_than): Remove
793 (frame_larger_than_size): Same.
794 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
795 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
797 * doc/invoke.texi (GCC Command Options): Document option arguments.
798 Explain byte-size arguments and suffixes.
799 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
800 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
801 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
802 * doc/options.texi (UInteger): Expand.
803 (Host_Wide_Int, ByteSize): Document new properties.
804 * final.c (final_start_function_1): Include sizes in an error message.
805 * function.c (frame_offset_overflow): Same.
806 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
807 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
808 Diagnose unbounded alloca calls only for limits of less than
810 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
811 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
813 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
814 only for limits of less than PTRDIFF_MAX.
815 * langhooks-def.h (lhd_handle_option): Change function argument
817 * langhooks.c (lhd_handle_option): Same.
818 * langhooks.h (handle_option): Same.
819 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
821 (var_type, var_type_struct): Same.
822 (var_set): Handle ByteSize flag.
823 * optc-gen.awk: Add comments to output to ease debugging. Make
824 use of HOST_WIDE_INT where appropriate.
825 * opts-gen-save.awk: Use %lx to format unsigned long.
826 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
827 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
828 arguments. Parse bytes-size suffixes.
829 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
830 (enum_value_to_arg): Same.
831 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
832 (handle_option): Adjust.
833 (generate_option): Change function argument to HOST_WIDE_INT.
834 (cmdline_handle_error): Adjust.
835 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
836 (set_option): Change function argument to HOST_WIDE_INT.
837 (option_enabled): Handle cl_host_wide_int.
838 (get_option_state): Handle CLVC_SIZE.
839 (control_warning_option): Same.
840 * opts.c (common_handle_option): Change function argument to
841 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
842 OPT_Wvla_larger_than_.
843 * opts.h (enum cl_var_type): Add an enumerator.
844 * stor-layout.c (layout_decl): Print a more meaningful warning.
845 * toplev.c (output_stack_usage): Adjust.
847 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
849 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
850 call to inline_expand_builtin_string_cmp.
851 (expand_builtin_strcmp): Likewise.
852 (expand_builtin_strncmp): Likewise.
853 (inline_string_cmp): Delete the last parameter, change char_type_node
854 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
856 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
857 the inlining expansion on target where the type of the call has same or
858 narrower precision than unsigned char.
860 2018-07-20 David Malcolm <dmalcolm@redhat.com>
862 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
863 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
864 * common.opt (fsave-optimization-record): New option.
865 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
866 * doc/invoke.texi (-fsave-optimization-record): New option.
867 * dumpfile.c: Include "optinfo-emit-json.h".
868 (struct kv_pair): Move to coretypes.h.
869 (optgroup_options): Make non-static.
870 (dump_context::end_scope): Call
871 optimization_records_maybe_pop_dump_scope.
872 * dumpfile.h (optgroup_options): New decl.
875 * optinfo-emit-json.cc: New file.
876 * optinfo-emit-json.h: New file.
877 * optinfo.cc: Include "optinfo-emit-json.h".
878 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
879 (optinfo_enabled_p): Check optimization_records_enabled_p.
880 (optinfo_wants_inlining_info_p): Likewise.
881 * optinfo.h: Update comment.
882 * profile-count.c (profile_quality_as_string): New function.
883 * profile-count.h (profile_quality_as_string): New decl.
884 (profile_count::quality): New accessor.
885 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
886 and optinfo_emit_json_cc_tests.
887 * selftest.h (selftest::json_cc_tests): New decl.
888 (selftest::optinfo_emit_json_cc_tests): New decl.
889 * toplev.c: Include "optinfo-emit-json.h".
890 (compile_file): Call optimization_records_finish.
891 (do_compile): Call optimization_records_start.
892 * tree-ssa-live.c: Include optinfo.h.
893 (remove_unused_scope_block_p): Retain inlining information if
894 optinfo_wants_inlining_info_p returns true.
896 2018-07-20 Richard Biener <rguenther@suse.de>
899 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
900 to cover -flto-partition=none.
902 2018-07-20 Martin Liska <mliska@suse.cz>
904 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
905 (get_decl_source_range): Remove unused function.
907 2018-07-20 Richard Biener <rguenther@suse.de>
909 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
910 (struct vn_phi_s): Likewise.
911 (struct vn_reference_s): Likewise.
912 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
913 for searching the slot of an entry known to be in the hash itself.
914 (vn_phi_hasher::equal): Likewise.
915 (vn_reference_hasher::equal): Likewise.
916 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
918 (optimistic_info, current_info): Remove, keeping only valid_info.
919 (vn_reference_lookup_1): Remove fallback lookup.
920 (vn_reference_lookup_2): Likewise.
921 (vn_nary_op_lookup_1): Likewise.
922 (vn_phi_lookup): Likewise.
923 (vn_nary_build_or_lookup_1): Make sure to not chain the built
925 (vn_reference_insert): Adjust, chain the inserted hash element
926 at last_inserted_ref.
927 (vn_reference_insert_pieces): Likewise.
928 (visit_reference_op_call): Likewise.
929 (vn_nary_op_insert_into): Chain the inserted hash element at
931 (vn_nary_op_insert_pieces): Adjust.
932 (vn_nary_op_insert): Likewise.
933 (vn_nary_op_insert_stmt): Likewise.
934 (vn_phi_insert): Adjust, chain the inserted hash element at
936 (process_scc): Remove clearing and copying the optimistic
937 table. Instead remove elements inserted during an optimistic
938 iteration from the single table we maintain.
939 (init_scc_vn): Adjust.
940 (free_scc_vn): Likewise.
941 (sccvn_dom_walker::record_cond): Likewise.
942 (sccvn_dom_walker::after_dom_children): Likewise.
944 2018-07-19 Martin Sebor <msebor@redhat.com>
946 PR tree-optimization/84047
947 PR tree-optimization/83776
948 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
949 (check_array_bounds): Call it.
951 2018-07-19 Martin Sebor <msebor@redhat.com>
953 * align.h (align_flags): Use member initialization.
955 2018-07-19 David Malcolm <dmalcolm@redhat.com>
957 * Makefile.in (OBJS): Add optinfo.o.
958 * coretypes.h (class symtab_node): New forward decl.
959 (struct cgraph_node): New forward decl.
960 (class varpool_node): New forward decl.
961 * dump-context.h: New file.
962 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
964 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
965 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
966 (set_alt_dump_file): Likewise.
967 (dump_context::~dump_context): New dtor.
968 (dump_gimple_stmt): Move implementation to...
969 (dump_context::dump_gimple_stmt): ...this new member function.
970 Add the stmt to any pending optinfo, creating one if need be.
971 (dump_gimple_stmt_loc): Move implementation to...
972 (dump_context::dump_gimple_stmt_loc): ...this new member function.
973 Start a new optinfo and add the stmt to it.
974 (dump_gimple_expr): Move implementation to...
975 (dump_context::dump_gimple_expr): ...this new member function.
976 Add the stmt to any pending optinfo, creating one if need be.
977 (dump_gimple_expr_loc): Move implementation to...
978 (dump_context::dump_gimple_expr_loc): ...this new member function.
979 Start a new optinfo and add the stmt to it.
980 (dump_generic_expr): Move implementation to...
981 (dump_context::dump_generic_expr): ...this new member function.
982 Add the tree to any pending optinfo, creating one if need be.
983 (dump_generic_expr_loc): Move implementation to...
984 (dump_context::dump_generic_expr_loc): ...this new member
985 function. Add the tree to any pending optinfo, creating one if
987 (dump_printf): Move implementation to...
988 (dump_context::dump_printf_va): ...this new member function. Add
989 the text to any pending optinfo, creating one if need be.
990 (dump_printf_loc): Move implementation to...
991 (dump_context::dump_printf_loc_va): ...this new member function.
992 Start a new optinfo and add the stmt to it.
993 (dump_dec): Move implementation to...
994 (dump_context::dump_dec): ...this new member function. Add the
995 value to any pending optinfo, creating one if need be.
996 (dump_context::dump_symtab_node): New member function.
997 (dump_context::get_scope_depth): New member function.
998 (dump_context::begin_scope): New member function.
999 (dump_context::end_scope): New member function.
1000 (dump_context::ensure_pending_optinfo): New member function.
1001 (dump_context::begin_next_optinfo): New member function.
1002 (dump_context::end_any_optinfo): New member function.
1003 (dump_context::s_current): New global.
1004 (dump_context::s_default): New global.
1005 (dump_scope_depth): Delete global.
1006 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1007 (dump_symtab_node): New function.
1008 (get_dump_scope_depth): Reimplement in terms of dump_context.
1009 (dump_begin_scope): Likewise.
1010 (dump_end_scope): Likewise.
1011 (selftest::temp_dump_context::temp_dump_context): New ctor.
1012 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1013 (selftest::verify_item): New function.
1014 (ASSERT_IS_TEXT): New macro.
1015 (ASSERT_IS_TREE): New macro.
1016 (ASSERT_IS_GIMPLE): New macro.
1017 (selftest::test_capture_of_dump_calls): New test.
1018 (selftest::dumpfile_c_tests): Call it.
1019 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1020 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1021 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1022 descriptive comment.
1023 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1024 (dump_node, dump_bb): Move these unrelated decls.
1025 (class dump_manager): Add leading comment.
1026 * optinfo.cc: New file.
1027 * optinfo.h: New file.
1029 2018-07-19 Michael Collison <michael.collison@arm.com>
1030 Richard Henderson <rth@redhat.com>
1032 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1033 (subti): Handle op1 zero.
1034 (subvti4, usub4ti4): New.
1035 (*sub<GPI>3_compare1_imm): New.
1036 (sub<GPI>3_carryinCV): New.
1037 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1038 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1040 2018-07-19 Michael Collison <michael.collison@arm.com>
1041 Richard Henderson <rth@redhat.com>
1043 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1044 (addti3): Create simpler code if low part is already known to be 0.
1045 (addvti4, uaddvti4): New.
1046 (*add<GPI>3_compareC_cconly_imm): New.
1047 (*add<GPI>3_compareC_cconly): New.
1048 (*add<GPI>3_compareC_imm): New.
1049 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1050 handle constants within this pattern..
1051 (*add<GPI>3_compareV_cconly_imm): New.
1052 (*add<GPI>3_compareV_cconly): New.
1053 (*add<GPI>3_compareV_imm): New.
1054 (add<GPI>3_compareV): New.
1055 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1056 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1057 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1058 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1059 with 'comparison' operator.
1060 (*add<GPI>3_compareV_cconly_imm): Ditto.
1061 (*add<GPI>3_compareV_cconly): Ditto.
1062 (*add<GPI>3_compareV_imm): Ditto.
1063 (add<GPI>3_compareV): Ditto.
1064 (add<mode>3_carryinC): Ditto.
1065 (*add<mode>3_carryinC_zero): Ditto.
1066 (*add<mode>3_carryinC): Ditto.
1067 (add<mode>3_carryinV): Ditto.
1068 (*add<mode>3_carryinV_zero): Ditto.
1069 (*add<mode>3_carryinV): Ditto.
1071 2018-07-19 Michael Collison <michael.collison@arm.com>
1072 Richard Henderson <rth@redhat.com>
1074 * config/aarch64/aarch64-modes.def (CC_V): New.
1075 * config/aarch64/aarch64-protos.h
1076 (aarch64_addti_scratch_regs): Declare
1077 (aarch64_subvti_scratch_regs): Declare.
1078 (aarch64_expand_subvti): Declare.
1079 (aarch64_gen_unlikely_cbranch): Declare
1080 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1081 for signed overflow using CC_Vmode.
1082 (aarch64_get_condition_code_1): Handle CC_Vmode.
1083 (aarch64_gen_unlikely_cbranch): New function.
1084 (aarch64_addti_scratch_regs): New function.
1085 (aarch64_subvti_scratch_regs): New function.
1086 (aarch64_expand_subvti): New function.
1088 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1090 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1092 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1093 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1096 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1099 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1100 address check not strict.
1102 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1104 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1106 (store_pair_lanes<mode>): Likewise.
1107 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1108 enum value 'ADDR_QUERY_LDP_STP_N'.
1109 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1110 (aarch64_print_address_internal): Add declaration.
1111 (aarch64_print_ldpstp_address): Remove.
1112 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1113 (aarch64_print_operand): Change printing of 'y'.
1114 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1115 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1116 'true' rather than '1'.
1117 * config/aarch64/constraints.md (Uml): Likewise.
1118 (Uml): Rename to Umn.
1121 2018-07-19 Richard Biener <rguenther@suse.de>
1123 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1125 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1126 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1127 (vn_reference_hasher): Likewise.
1128 (struct vn_tables_s): Remove obstack and alloc-pool members.
1129 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1130 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1131 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1132 (vn_reference_insert_pieces): Likewise.
1133 (alloc_vn_nary_op_noinit): Adjust.
1134 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1135 (vn_phi_eq): Adjust.
1136 (shared_lookup_phiargs): Remove.
1137 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1138 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1139 (visit_reference_op_call): Likewise.
1140 (copy_nary, copy_phi, copy_reference): Remove.
1141 (process_scc): Rewind the obstack when iterating. Do not
1142 copy the elements to valid_info but just move them from one
1143 hashtable to the other.
1144 (allocate_vn_table): Adjust.
1145 (free_vn_table): Likewise.
1146 (init_scc_vn): Likewise.
1147 (free_scc_vn): Likewise.
1149 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1152 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1153 indirect_return as function type attribute.
1154 (ix86_attribute_table): Change indirect_return to function
1156 * doc/extend.texi: Update indirect_return attribute.
1158 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1160 * wide-int.h (widest2_int): New.
1161 * gimple-fold.c (arith_overflowed_p): Use it.
1162 * tree.h (widest2_int_cst): New.
1163 * tree-vrp.c (wide_int_binop_overflow): Rename from
1164 vrp_int_const_binop.
1165 Rewrite to work on trees.
1166 (extract_range_from_multiplicative_op_1): Abstract code to...
1167 (wide_int_range_min_max): ...here.
1168 (wide_int_range_cross_product): ...and here.
1169 (extract_range_from_binary_expr_1): Abstract overflow code to...
1170 (wide_int_range_mult_wrapping): ...here.
1171 * tree-vrp.h (wide_int_range_cross_product): New.
1172 (wide_int_range_mult_wrapping): New.
1174 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1175 Julia Koval <julia.koval@intel.com>
1177 * config/i386/x86-tune-costs.h (skylake_memcpy,
1178 skylake_memset): Replace rep_prefix with unrolling for size 512.
1180 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1183 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1186 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1188 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1189 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1190 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1191 previously known as "PowerPC AltiVec Built-in Functions". Move
1192 some material to new subsubsections "PowerPC AltiVec Built-in
1193 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1195 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1196 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1197 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1198 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1200 2018-07-18 Richard Biener <rguenther@suse.de>
1202 PR tree-optimization/86557
1203 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1206 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1208 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1210 2018-07-17 Jeff Law <law@redhat.com>
1212 * config/arm/arm.c (get_label_padding): Update for recent
1213 changes to label_to_alignment.
1215 PR tree-optimization/86010
1216 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1218 * config/mips/mips.c (vr4130_align_insns): Update for recent
1219 changes to label_to_alignment.
1221 * config/frv/frv.c (frv_label_align): Update for recent changes
1222 to label_to_alignment.
1224 * config/nios2/nios2.c (nios2_label_align): Update for recent
1225 changes which dropped ALIGN_LABELS_LOG.
1227 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1229 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1230 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1232 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1234 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1235 deprecated align_labels_log.
1237 2018-07-17 Richard Biener <rguenther@suse.de>
1240 * dwarf2out.c (init_sections_and_labels): Always generate
1241 a debug_line_str_section for early LTO debug.
1242 (dwarf2out_finish): Reset debug_line_str_hash output early.
1243 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1245 (dwarf2out_early_finish): Output debug_line_str.
1247 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1249 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1250 index register on z196 or later.
1252 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1254 * config/s390/s390.c (s390_default_align): Set default function
1256 (s390_override_options_after_change): Call s390_default align.
1257 (s390_option_override_internal): Call s390_default_align.
1258 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1260 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1263 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1264 to _looptemp_ clauses, other than the first two.
1266 2018-07-17 Martin Liska <mliska@suse.cz>
1268 * opts.c: Do not enable OPT_falign_* for -Os.
1270 2018-07-17 Martin Liska <mliska@suse.cz>
1272 * align.h (MAX_CODE_ALIGN): New.
1273 (MAX_CODE_ALIGN_VALUE): New.
1274 * common/config/i386/i386-common.c (ix86_handle_option):
1275 (MAX_CODE_ALIGN): Moved to align.h.
1276 * final.c (MAX_CODE_ALIGN): Likewise.
1277 * opts.c (parse_and_check_align_values):
1278 (MAX_CODE_ALIGN): Likewise.
1279 (MAX_CODE_ALIGN_VALUE): Likewise.
1281 2018-07-17 Martin Liska <mliska@suse.cz>
1283 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1284 in order to fulfil coding style.
1285 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1286 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1287 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1288 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1289 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1290 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1291 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1292 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1293 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1295 2018-07-17 Martin Liska <mliska@suse.cz>
1297 * align.h: New file.
1298 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1299 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1300 align_flags of label_to_alignment.
1301 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1303 * config/m68k/m68k.c: Do not use removed align_labels_value and
1305 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1306 (LOOP_ALIGN): Likewise.
1307 (LABEL_ALIGN): Likewise.
1308 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1309 Remove not used macro.
1310 (rs6000_loop_align): Change return type to align_flags.
1311 (rs6000_loop_align_max_skip): Remove.
1312 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1313 Change return type to align_flags.
1314 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1315 Remove not used macro.
1316 (rs6000_loop_align): Change return type to align_flags.
1317 (rs6000_loop_align_max_skip): Remove.
1318 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1319 * config/rx/rx-protos.h (rx_align_for_label): Make it
1321 * config/rx/rx.c (rx_align_for_label): Change return type
1323 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1325 into align_flags class.
1326 (LABEL_ALIGN): Likewise.
1327 (LOOP_ALIGN): Likewise.
1328 * config/s390/s390.c (s390_label_align): Use align_flags
1330 (s390_asm_output_function_label): Likewise.
1331 * config/sh/sh.c (sh_override_options_after_change):
1332 Use align_flags class directly without macros.
1333 (find_barrier): Likewise.
1334 (barrier_align): Likewise.
1335 (sh_loop_align): Likewise.
1336 * config/spu/spu.c (spu_option_override):
1337 Use align_flags_tuple::get_value instead of removed macros.
1338 (spu_sched_init): Likewise.
1339 * config/spu/spu.h (GTY): Likewise.
1340 * config/visium/visium.c (visium_option_override):
1341 Set "8" as default secondary alignment.
1342 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1343 in order to guarantee secondary alignment of 8.
1344 * coretypes.h: Include align.h header file.
1345 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1346 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1347 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1348 * doc/tm.texi.in: Likewise.
1349 * final.c (struct label_alignment): Remove not used structure.
1350 (LABEL_ALIGN): Change type to align_flags.
1351 (LOOP_ALIGN): Likewise.
1352 (JUMP_ALIGN): Likewise.
1353 (default_loop_align_max_skip): Remove.
1354 (default_label_align_max_skip): Likewise.
1355 (default_jump_align_max_skip): Likewise.
1356 (default_label_align_after_barrier_max_skip):
1357 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1358 (LABEL_TO_MAX_SKIP): Remove.
1359 (label_to_alignment): Return align_flags type instead of integer.
1360 (label_to_max_skip): Remove.
1361 (align_fuzz): Use align_flags type.
1362 (compute_alignments): Use align_flags type and use align_flags::max
1363 to combine multiple alignments.
1364 (grow_label_align): Grow vec instead of C array.
1365 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1366 (shorten_branches): Use align_flags type and use align_flags::max
1367 to combine multiple alignments.
1368 (final_scan_insn_1): Remove usage of secondary alignment that comes
1369 from label alignment, but instead use proper secondary alignment
1370 which is computed in grow_label_align.
1371 * flags.h (struct align_flags_tuple): Move to align.h.
1372 (struct align_flags): Likewise.
1373 (state_align_loops): Rename to align_loops.
1374 (state_align_jumps): Rename to align_jumps.
1375 (state_align_labels): Rename to align_labels.
1376 (state_align_functions): Rename to align_functions.
1377 (align_loops_log): Remove.
1378 (align_jumps_log): Remove.
1379 (align_labels_log): Remove.
1380 (align_functions_log): Remove.
1381 (align_loops_max_skip): Remove.
1382 (align_jumps_max_skip): Remove.
1383 (align_labels_max_skip): Remove.
1384 (align_functions_max_skip): Remove.
1385 (align_loops_value): Remove.
1386 (align_jumps_value): Remove.
1387 (align_labels_value): Remove.
1388 (align_functions_value): Remove.
1389 * output.h (label_to_alignment): Change return type to align_flags.
1390 (label_to_max_skip): Remove.
1391 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1392 jump_align_max_skip macros.
1393 * targhooks.h (default_loop_align_max_skip): Remove.
1394 (default_label_align_max_skip): Likewise.
1395 (default_jump_align_max_skip): Likewise.
1396 (default_label_align_after_barrier_max_skip): Remove.
1397 * toplev.c (read_log_maxskip): Use ::normalize function.
1398 (parse_N_M): Remove not used argument and also call ::normalize.
1399 (parse_alignment_opts): Do not pass unused arguments.
1400 * varasm.c (assemble_start_function): Use directly align_functions
1401 instead of removed macros.
1402 * system.h: Do not poison removed macros.
1404 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1407 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1408 and cond temporaries don't have reference type if iterator has
1409 pointer type. For init use &for_pre_body instead of pre_p if
1410 for_pre_body is non-empty.
1412 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1414 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1415 double-double modes to SFmode directly directly.
1416 (trunc<mode>sf2_fprs): Delete.
1418 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1420 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1421 for conversions between IFmode and the decimal floating point modes.
1422 (init_float128_ieee): Use the correct names for conversions between
1423 KFmode and the decimal floating point modes.
1425 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1427 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1428 for the conversions between TDmode and IFmode.
1429 (init_float128_ieee): Use more correct names for the conversions
1430 between TDmode and KFmode.
1432 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1434 PR tree-optimization/86526
1435 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1436 (inline_expand_builtin_string_cmp): Likewise.
1437 (inline_string_cmp): Likewise. Use c_readstr instead of
1438 builtin_memcpy_read_str. Add unit_mode temporary.
1440 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1443 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1444 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1446 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1448 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1449 Alphabetize prototypes of built-in functions, separating out
1450 built-in functions that are listed in this section but should be
1451 described elsewhere.
1453 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1456 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1457 conditional move when trapping comparison was split to a
1458 non-trapping one (and vice versa).
1460 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1462 * config/s390/s390.c (s390_function_profiler): Generate nops
1463 instead of profiler call sequences.
1464 * config/s390/s390.opt: Add the new option.
1466 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1468 * config/s390/s390.c (s390_function_profiler): Generate
1469 __mcount_loc section.
1470 * config/s390/s390.opt: Add the new option.
1472 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1474 * common.opt: Add the new warning.
1475 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1476 %r0,__fentry__" when -mfentry is specified.
1477 (s390_option_override_internal): Disallow -mfentry for 31-bit
1479 * config/s390/s390.opt: Add the new option.
1481 2018-07-16 Richard Biener <rguenther@suse.de>
1484 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1485 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1487 2018-07-16 Martin Liska <mliska@suse.cz>
1490 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1493 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1495 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1497 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1499 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1501 * config/arc/arc-cpus.def (hs4x): New cpu.
1503 * config/arc/arc-tables.opt: Regenerate.
1504 * config/arc/arc.c (arc_sched_issue_rate): New function.
1505 (TARGET_SCHED_ISSUE_RATE): Define.
1506 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1507 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1509 (attr tune): Add ARCHS4x tune values.
1510 (attr tune_dspmpy): Define.
1511 (*tst): Correct instruction type.
1512 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1513 * config/arc/arcHS4x.md: New file.
1514 * config/arc/fpu.md: Update instruction type attributes.
1515 * config/arc/t-multilib: Regenerate.
1517 2018-07-16 Tom de Vries <tdevries@suse.de>
1520 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1522 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1524 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1527 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1529 PR tree-optimization/86514
1530 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1531 conversion to a boolean type from a type with greater precision.
1533 2018-07-16 Tom de Vries <tdevries@suse.de>
1535 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1536 dump_flags request TDF_SLIM.
1538 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1540 * fold-const.c (int_const_binop_1): Abstract...
1541 (wide_int_binop): ...wide int code here.
1542 (poly_int_binop): ...poly int code here.
1543 Abstract the rest of int_const_binop_1 into int_const_binop.
1544 * fold-const.h (wide_int_binop): New.
1545 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1546 Remove useless PLUS/MINUS_EXPR case.
1547 (zero_nonzero_bits_from_vr): Move wide int code...
1548 (zero_nonzero_bits_from_bounds): ...here.
1549 (extract_range_from_binary_expr_1): Move mask optimization code...
1550 (range_easy_mask_min_max): ...here.
1551 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1552 (range_easy_mask_min_max): New.
1554 2018-07-15 Jeff Law <law@redhat.com>
1557 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1560 2018-07-14 Jim Wilson <jimw@sifive.com>
1562 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1564 2018-07-14 Paul Koning <ni1d@arrl.net>
1566 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1568 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1570 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1573 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1574 Steve Munroe <munroesj52@gmail.com>
1576 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1577 (_mm_andnot_si128): Likewise.
1578 (_mm_or_si128): Likewise.
1579 (_mm_xor_si128): Likewise.
1581 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1584 * builtins.c (expand_builtin_memcmp): Inline the calls first
1585 when result_eq is false.
1586 (expand_builtin_strcmp): Inline the calls first.
1587 (expand_builtin_strncmp): Likewise.
1588 (inline_string_cmp): New routine. Expand a string compare
1589 call by using a sequence of char comparison.
1590 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1591 a call to str(n)cmp/memcmp.
1592 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1594 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1596 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1598 * config/arm/driver-arm.c: Include arm-native.h.
1599 (host_detect_local_cpu): Use auto-generated data tables.
1600 (vendors, arm_cpu_table): Delete. Move part information to ...
1601 * config/arm/arm-cpus.in: ... here.
1602 * config/arm/parsecpu.awk (gen_native): New function.
1603 (vendor, part): New CPU fields.
1604 (END): Add support for building the native CPU detection tables.
1605 * config/arm/t-arm (arm-native.h): Add build rule.
1606 (driver-arm.o): Add dependency on arm-native.h.
1608 2018-07-13 Richard Biener <rguenther@suse.de>
1611 * match.pd (addr1 - addr2): Allow either of the operand to
1614 2018-07-13 Tom de Vries <tdevries@suse.de>
1616 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
1619 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
1621 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
1622 arrays instead of numbered variables.
1624 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
1626 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
1627 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
1629 2018-07-13 Richard Biener <rguenther@suse.de>
1632 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
1633 instead of get_context_die.
1635 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
1636 Richard Biener <rguenther@suse.de>
1639 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
1640 that the loop latch destination where phi is defined.
1642 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
1644 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
1645 (riscv_expand_epilogue): Add assertion to check interrupt mode.
1646 (riscv_set_current_function): Extract getting interrupt type to new
1648 (riscv_get_interrupt_type): New function.
1649 (riscv_merge_decl_attributes): New function, checking interrupt type is
1651 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
1653 2018-07-12 Paul Koning <ni1d@arrl.net>
1655 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
1658 2018-07-12 Paul Koning <ni1d@arrl.net>
1660 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
1661 zero reference, add doloop_end instead.
1662 * doc/md.texi (decrement_and_branch_until_zero): Remove.
1663 (Looping patterns): Remove decrement_and_branch_until_zero. Add
1664 detail for doloop_end.
1666 2018-07-12 Martin Sebor <msebor@redhat.com>
1669 * attribs.c (decl_attributes): Reject conflicting attributes before
1670 calling attribute handlers.
1672 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1674 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
1676 (gcc::dump_manager::get_dump_file_name): likewise.
1677 (dump_begin): Likewise.
1678 * dumpfile.h (dump_begin): Update prototype.
1679 (gcc::dump_manager::get_dump_file_name,
1680 gcc::dump_manager::get_dump_file_name): Update prototype.
1682 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1684 * internal-fn.h (vectorizable_internal_fn_p): New function.
1685 * tree-vect-slp.c (compatible_calls_p): Likewise.
1686 (vect_build_slp_tree_1): Remove nops argument. Handle calls
1687 to internal functions.
1688 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
1690 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1692 * fold-const.h (inverse_conditions_p): Declare.
1693 * fold-const.c (inverse_conditions_p): New function.
1694 * match.pd: Use inverse_conditions_p. Add folds of view_converts
1695 that test the inverse condition of a conditional internal function.
1696 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
1697 * internal-fn.c (internal_fn_mask_index): Handle conditional
1699 (vectorized_internal_fn_supported_p): New function.
1700 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
1701 (any_pred_load_store): Replace with...
1702 (need_to_predicate): ...this new variable.
1703 (redundant_ssa_names): New variable.
1704 (ifcvt_can_use_mask_load_store): Move initial checks to...
1705 (ifcvt_can_predicate): ...this new function. Handle tree codes
1706 for which a conditional internal function exists.
1707 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
1708 instead of ifcvt_can_use_mask_load_store. Update after variable
1710 (predicate_load_or_store): New function, split out from
1711 predicate_mem_writes.
1712 (check_redundant_cond_expr): New function.
1713 (value_available_p): Likewise.
1714 (predicate_rhs_code): Likewise.
1715 (predicate_mem_writes): Rename to...
1716 (predicate_statements): ...this. Use predicate_load_or_store
1717 and predicate_rhs_code.
1718 (combine_blocks, tree_if_conversion): Update after above name changes.
1719 (ifcvt_local_dce): Handle redundant_ssa_names.
1720 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
1721 general conditional functions.
1722 * tree-vect-stmts.c (vectorizable_call): Likewise.
1724 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1725 Alan Hayward <alan.hayward@arm.com>
1726 David Sherwood <david.sherwood@arm.com>
1728 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
1729 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
1730 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
1731 plus and minus and convert them into IFN_COND_FMA-based sequences.
1732 (convert_mult_to_fma): Handle conditional plus and minus.
1734 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1736 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
1737 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
1738 (cond_fnms_optab): New optabs.
1739 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
1741 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
1742 * internal-fn.h (get_conditional_internal_fn): Declare.
1743 (get_unconditional_internal_fn): Likewise.
1744 * internal-fn.c (cond_ternary_direct): New macro.
1745 (expand_cond_ternary_optab_fn): Likewise.
1746 (direct_cond_ternary_optab_supported_p): Likewise.
1747 (FOR_EACH_COND_FN_PAIR): Likewise.
1748 (get_conditional_internal_fn): New function.
1749 (get_unconditional_internal_fn): Likewise.
1750 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
1751 (gimple_match_op::gimple_match_op): Add a new overload for 5
1753 (gimple_match_op::set_op): Likewise.
1754 (gimple_resimplify5): Declare.
1755 * genmatch.c (decision_tree::gen): Generate simplifications for
1757 * gimple-match-head.c (gimple_simplify): Define an overload for
1758 5 operands. Handle calls with 5 arguments in the top-level overload.
1759 (convert_conditional_op): Handle conversions from unconditional
1760 internal functions to conditional ones.
1761 (gimple_resimplify5): New function.
1762 (build_call_internal): Pass a fifth operand.
1763 (maybe_push_res_to_seq): Likewise.
1764 (try_conditional_simplification): Try converting conditional
1765 internal functions to unconditional internal functions.
1766 Handle 3-operand unconditional forms.
1767 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
1768 Define ternary equivalents of the current rules for binary conditional
1770 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
1772 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
1773 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
1774 (optab): Handle them.
1775 (SVE_COND_FP_TERNARY): New int iterator.
1776 (sve_fmla_op, sve_fmad_op): New int attributes.
1777 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
1778 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
1779 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
1781 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
1783 * target.def (preferred_else_value): New target hook.
1784 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
1785 * doc/tm.texi: Regenerate.
1786 * targhooks.h (default_preferred_else_value): Declare.
1787 * targhooks.c (default_preferred_else_value): New function.
1788 * internal-fn.h (conditional_internal_fn_code): Declare.
1789 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
1790 (get_conditional_internal_fn): Use it.
1791 (conditional_internal_fn_code): New function.
1792 * gimple-match.h (gimple_match_cond): New struct.
1793 (gimple_match_op): Add a cond member function.
1794 (gimple_match_op::gimple_match_op): Update all forms to take a
1796 * genmatch.c (expr::gen_transform): Use the same condition as res_op
1797 for the suboperation, but don't specify a particular else_value.
1798 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
1799 (visit_nary_op, visit_reference_op_load): Pass
1800 gimple_match_cond::UNCOND to the gimple_match_op constructor.
1801 * gimple-match-head.c: Include tree-eh.h
1802 (convert_conditional_op): New function.
1803 (maybe_resimplify_conditional_op): Likewise.
1804 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
1805 (gimple_resimplify2): Likewise.
1806 (gimple_resimplify3): Likewise.
1807 (gimple_resimplify4): Likewise.
1808 (maybe_push_res_to_seq): Return null for conditional operations.
1809 (try_conditional_simplification): New function.
1810 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
1812 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
1814 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
1816 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
1818 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
1820 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1822 (hash_tree): Do not hash DECL_FCONTEXT
1823 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
1824 Do not stream DECL_FCONTEXT.
1825 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
1826 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
1828 2018-07-12 Richard Biener <rguenther@suse.de>
1831 * dwarf2out.c (gen_block_die): Only output blocks when they have
1832 at least one !DECL_IGNORED_P variable.
1834 2018-07-12 Richard Biener <rguenther@suse.de>
1837 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
1838 Remove -mieee-fp handling.
1840 2018-07-12 Richard Biener <rguenther@suse.de>
1842 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
1843 left-over from last patch.
1845 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1847 PR tree-optimization/86492
1848 * gimple-ssa-store-merging.c
1849 (imm_store_chain_info::coalesce_immediate_stores): Call
1850 check_no_overlap even for the merge_overlapping case. Formatting fix.
1852 2018-07-12 Richard Biener <rguenther@suse.de>
1855 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
1856 move possibly trapping operations into the conditional.
1858 2018-07-12 Richard Biener <rguenther@suse.de>
1860 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
1861 (vn_lookup_simplify_result): Remove recursion limit applied
1863 (vn_nary_build_or_lookup_1): Adjust.
1864 (try_to_simplify): Likewise.
1865 * gimple-match-head.c (gimple_resimplify1): Instead apply one
1867 (gimple_resimplify2): Likewise.
1868 (gimple_resimplify3): Likewise.
1869 (gimple_resimplify4): Likewise.
1871 2018-07-11 Jakub Jelinek <jakub@redhat.com>
1873 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
1874 Use __mmask64 type instead of __mmask8 for __M argument.
1875 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
1876 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
1878 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
1879 __mmask16 for __M argument.
1880 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
1881 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
1882 to __mmask16 instead of __mmask8.
1883 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
1884 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
1885 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
1886 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
1887 instead of __mmask16 for __U argument.
1888 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
1889 __mmask16 instead of __mmask8 for __U argument.
1890 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
1892 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
1894 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
1896 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
1898 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
1900 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
1902 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
1904 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
1906 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
1908 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
1910 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
1911 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
1912 return type as well as __M argument type and all casts from __mmask8
1914 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
1915 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
1916 return type as well as __M argument type and all casts from __mmask8
1918 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
1919 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
1920 return type as well as __M argument type and all casts from __mmask8
1922 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
1923 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
1924 return type as well as __M argument type and all casts from __mmask8
1926 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
1927 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
1930 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
1932 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
1933 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
1936 2018-07-11 Paul Koning <ni1d@arrl.net>
1938 * doc/md.texi (define_subst): Document how multiple occurrences of
1939 the same argument in the replacement pattern are handled.
1941 2018-07-11 Paul Koning <ni1d@arrl.net>
1943 * doc/extend.texi (Common Variable Attributes): Move "mode" into
1945 (Common Type Attributes): Add "mode" attribute.
1947 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
1949 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
1950 stream DECL_ORIGINAL_TYPE.
1951 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
1952 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
1953 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
1954 Do not walk original type.
1955 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
1957 (write_ts_decl_non_common_tree_pointers): Do not stream
1959 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
1960 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
1962 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1964 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
1965 thread twice from the same starting edge.
1967 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
1969 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
1970 * gimple.c (gimple_call_nonnull_result_p): ...here...
1971 (gimple_call_nonnull_arg): ...and here.
1972 * gimple.h (gimple_call_nonnull_result_p): New.
1973 (gimple_call_nonnull_arg): New.
1975 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
1977 * config/arm/arm-cpus.in: Move information from fpu field of each
1978 cpu definition to the isa field.
1979 * config/arm/parsecpu.awk (fpu): Delete match rule.
1980 (gen_comm_data): Don't add bits from the CPU's FPU entry.
1982 2018-07-11 Richard Biener <rguenther@suse.de>
1985 * dwarf2out.c (init_sections_and_labels): Use
1986 output_asm_line_debug_info consistently.
1987 (dwarf2out_early_finish): Likewise.
1988 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
1991 2018-07-11 Richard Biener <rguenther@suse.de>
1993 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
1994 Rework father_bb setting in a way to avoid propagating constants
1995 multiple times on a loop body.
1997 2018-07-10 Mark Wielaard <mark@klomp.org>
2000 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2002 2018-07-10 Richard Biener <rguenther@suse.de>
2004 * hash-map.h (hash_map::iterator::operator*): Return
2005 references to key and value.
2007 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2010 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2011 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2012 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2013 (gimplify_omp_for): For composite loops, move outer
2014 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2015 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2016 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2017 TREE_LIST for both the original class iterator and the "last" helper
2018 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2019 loop, remember has_decl_expr from outer composite loops for the
2020 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2022 2018-07-09 Martin Sebor <msebor@redhat.com>
2026 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2027 accessing implicitly initialized array elements.
2028 * expr.c (string_constant): Handle string initializers of
2029 character arrays within aggregates.
2030 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2031 Store element offset. As a special case, handle zero size.
2032 (fold_nonarray_ctor_reference): Same.
2033 (fold_ctor_reference): Add argument. Store subobject offset.
2034 * gimple-fold.h (fold_ctor_reference): Add argument.
2036 2018-07-09 Paul Koning <ni1d@arrl.net>
2038 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2039 (pdp11_insn_cost): New function.
2040 (pdp11_md_asm_adjust): New function.
2041 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2042 (pdp11_rtx_costs): Update to match machine better.
2043 (output_addr_const_pdp11): Correct format mismatch warnings.
2044 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2045 * config/pdp11/pdp11.md: General change to add base_cost and/or
2046 length attributes for use by new pdp11_insn_cost function.
2047 (MIN_BRANCH): Correct definition.
2049 (doloop_end): Use standard pattern name for looping pattern.
2050 (doloop_end_nocc): New.
2051 (movsf): Add another constraint alternative.
2052 (zero_extendqihi2): Add constraint alternatives for not in place
2054 (zero_extendhisi2): Remove.
2055 (shift patterns): Add CC handling variants.
2059 (define_peephole2): New peephole to recognize mov that sets CC for
2062 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2064 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2065 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2068 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2071 * real.c (real_nextafter): Return true if result is denormal.
2073 2018-07-09 Martin Liska <mliska@suse.cz>
2075 * common.opt: Add back wrongly removed attribute.
2077 2018-07-09 Richard Biener <rguenther@suse.de>
2080 * dwarf2out.c (gen_block_die): For an early generated DIE
2081 always output high/low PC attributes.
2083 2018-07-09 Tom de Vries <tdevries@suse.de>
2085 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2086 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2087 onto VAR_DECL with abstract origin.
2089 2018-07-07 Jim Wilson <jimw@sifive.com>
2091 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2093 2018-07-07 Tom de Vries <tdevries@suse.de>
2095 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2097 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2099 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2101 (combine_bound): Use wide-int overflow calculation instead of
2103 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2105 * fold-const.c (int_const_binop_2): Same.
2106 (extract_muldiv_1): Same.
2107 (fold_div_compare): Same.
2108 (fold_abs_const): Same.
2110 * poly-int.h (add): Same.
2114 * predict.c (predict_iv_comparison): Same.
2115 * profile-count.c (slow_safe_scale_64bit): Same.
2116 * simplify-rtx.c (simplify_const_binary_operation): Same.
2117 * tree-chrec.c (tree_fold_binomial): Same.
2118 * tree-data-ref.c (split_constant_offset_1): Same.
2119 * tree-if-conv.c (idx_within_array_bound): Same.
2120 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2121 * tree-ssa-phiopt.c (minmax_replacement): Same.
2122 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2123 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2124 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2125 * wide-int.cc (wi::add_large): Same.
2126 (wi::mul_internal): Same.
2127 (wi::sub_large): Same.
2128 (wi::divmod_internal): Same.
2129 * wide-int.h: Change overflow type to overflow_type for neg, add,
2130 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2131 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2132 mul_internal, divmod_internal.
2133 (overflow_type): New enum.
2134 (accumulate_overflow): New.
2136 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2138 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2139 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2141 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2143 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2144 argument is checked for zero before entering loop, avoid checking again.
2146 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2148 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2149 * gimplify.h (generic_expr_could_trap_p): Likwise.
2150 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2152 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2154 PR tree-optimization/86401
2155 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2156 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2157 (fold_bit_and_mask): ... here. New helper function for match.pd.
2158 * fold-const.h (fold_bit_and_mask): Declare.
2159 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2161 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2164 * target.def (translate_mode_attribute): New hook.
2165 * targhooks.h (default_translate_mode_attribute): Declare.
2166 * targhooks.c (default_translate_mode_attribute): New function.
2167 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2168 * doc/tm.texi: Regenerate.
2169 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2170 (rs6000_translate_mode_attribute): New function.
2172 2018-07-06 Paul Koning <ni1d@arrl.net>
2174 * doc/md.texi (define_split): Document DONE and FAIL.
2175 (define_peephole2): Ditto.
2177 2018-07-05 Jeff Law <law@redhat.com>
2179 PR tree-optimization/86010
2180 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2181 both the head and tail of mem* and str* calls.
2183 2018-07-05 Jim Wilson <jimw@sifive.com>
2185 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2187 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2189 * config/aarch64/aarch64-simd.md: correct flags text for
2190 MIN_EXPR replacement.
2192 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2194 * configure: Regenerated.
2196 2018-07-05 Carl Love <cel@us.ibm.com>
2198 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2199 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2200 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2201 VSX_BUILTIN_DOUBLEL_V4SF.
2203 2018-07-05 Martin Sebor <msebor@redhat.com>
2206 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2207 than its domain to compute its the upper bound of a char array.
2209 2018-07-05 Nathan Sidwell <nathan@acm.org>
2211 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2212 * doc/cpp.texi: Update comment.
2213 * doc/tm.texi: Rebuilt.
2214 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2215 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2216 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2217 headers affected by extern "C".
2218 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2219 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2220 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2221 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2222 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2223 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2224 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2225 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2226 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2227 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2228 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2229 config/sparc/sp64-elf.h, config/spu/spu.h,
2230 config/stormy16/stormy16.h, config/v850/v850.h,
2231 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2232 define NO_IMPLICIT_EXTERN_C.
2233 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2235 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2238 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2239 instead of GET_MODE_SIZE when comparing Units.
2241 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2244 * rtlanal.c (set_noop_p): Constrain on mode change,
2245 include hard-reg-set.h
2247 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2249 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2251 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2254 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2257 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2259 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2261 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2264 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2266 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2268 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2271 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2273 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2275 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2276 neg_*_op* variables.
2278 2018-07-04 Martin Liska <mliska@suse.cz>
2280 * tree-switch-conversion.c: Define
2281 max_ratio_for_speed and max_ratio_for_size constants.
2283 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2284 Martin Liska <mliska@suse.cz>
2289 * common.opt: Rename align options with 'str_' prefix.
2290 * common/config/i386/i386-common.c (set_malign_value): New
2292 (ix86_handle_option): Use it to set -falign-* options/
2293 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2294 type from int to string.
2295 * config/aarch64/aarch64.c: Update default values from int
2297 * config/alpha/alpha.c (alpha_override_options_after_change):
2299 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2300 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2301 max skip conditionally.
2302 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2303 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2304 max skip conditionally.
2305 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2306 max skip conditionally.
2307 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2308 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2309 max skip conditionally.
2310 * config/i386/i386.c (struct ptt): Change type from int to
2312 (ix86_default_align): Set default values.
2313 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2314 max skip conditionally.
2315 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2316 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2317 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2318 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2319 max skip conditionally.
2320 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2321 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2322 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2323 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2324 max skip conditionally.
2325 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2326 * config/ia64/ia64.c (ia64_option_override): Set default values
2327 for alignment options.
2328 * config/m68k/m68k.c: Handle new str_align_* options.
2329 * config/mips/mips.c (mips_set_compression_mode): Change
2331 (mips_option_override): Set default values for options.
2332 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2334 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2336 * config/rx/rx.c (rx_option_override): Likewise.
2337 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2338 (LABEL_ALIGN): Use align_labels_log.
2339 (LOOP_ALIGN): Use align_loops_align.
2340 * config/s390/s390.c (s390_asm_output_function_label): Use new
2342 * config/sh/sh.c (sh_override_options_after_change):
2343 Change type of constants.
2344 * config/spu/spu.c (spu_sched_init): Likewise.
2345 * config/sparc/sparc.c (sparc_option_override): Set default
2347 * config/visium/visium.c (visium_option_override): Likewise.
2348 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2349 emit p2align format with last argument if it's not needed.
2350 * doc/invoke.texi: Document extended format of -falign-*.
2351 * final.c: Use align_labels alignment.
2352 * flags.h (struct target_flag_state): Change type to use
2354 (struct align_flags_tuple): New.
2355 (struct align_flags): Likewise.
2356 (align_loops_log): Redefine macro to use new types.
2357 (align_loops_max_skip): Redefine macro to use new types.
2358 (align_jumps_log): Redefine macro to use new types.
2359 (align_jumps_max_skip): Redefine macro to use new types.
2360 (align_labels_log): Redefine macro to use new types.
2361 (align_labels_max_skip): Redefine macro to use new types.
2362 (align_functions_log): Redefine macro to use new types.
2363 (align_loops): Redefine macro to use new types.
2364 (align_jumps): Redefine macro to use new types.
2365 (align_labels): Redefine macro to use new types.
2366 (align_functions): Redefine macro to use new types.
2367 (align_functions_max_skip): Redefine macro to use new types.
2368 (align_loops_value): New macro.
2369 (align_jumps_value): New macro.
2370 (align_labels_value): New macro.
2371 (align_functions_value): New macro.
2372 * function.c (invoke_set_current_function_hook): Propagate
2373 alignment values from flags to global variables default in
2375 * ipa-icf.c (sem_function::equals_wpa): Use
2376 cl_optimization_option_eq instead of memcmp.
2377 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2379 (cl_optimization_stream_in): Likewise.
2380 * optc-save-gen.awk: Support strings in cl_optimization.
2381 * opth-gen.awk: Likewise.
2382 * opts.c (finish_options): Remove error checking of invalid
2384 (MAX_CODE_ALIGN): Remove.
2385 (MAX_CODE_ALIGN_VALUE): Likewise.
2386 (parse_and_check_align_values): New function.
2387 (check_alignment_argument): Likewise.
2388 (common_handle_option): Use check_alignment_argument.
2389 * opts.h (parse_and_check_align_values): Declare.
2390 * toplev.c (init_alignments): Remove.
2391 (read_log_maxskip): New.
2392 (parse_N_M): Likewise.
2393 (parse_alignment_opts): Likewise.
2394 (backend_init_target): Remove usage of init_alignments.
2395 * toplev.h (parse_alignment_opts): Declare.
2396 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2398 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2399 * tree.c (cl_option_hasher::equal): New.
2400 * varasm.c: Use new global macros.
2402 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2404 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2405 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2406 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2407 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2408 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2409 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2410 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2411 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2412 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2413 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2414 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2415 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2416 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2418 2018-07-04 Martin Liska <mliska@suse.cz>
2419 Jonathan Wakely <jwakely@redhat.com>
2421 * coverage.c: Use correct type.
2422 * doc/invoke.texi: Language correction.
2424 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2427 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2428 ENDBRANCH for non-tail call which may return via indirect branch.
2429 * doc/extend.texi: Document indirect_return attribute.
2431 2018-07-03 Martin Sebor <msebor@redhat.com>
2433 PR tree-optimization/86274
2434 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2436 (format_floating): Correct handling of infinities and NaNs.
2438 2018-07-03 Martin Sebor <msebor@redhat.com>
2440 * print-tree.c (print_real_cst): New function.
2441 (print_node_brief): Call it.
2442 (print_node): Ditto.
2444 2018-07-03 Jeff Law <law@redhat.com>
2446 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2447 into a single pattern.
2449 * config/h8300/h8300.md (ors code_iterator): New.
2450 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2451 a single pattern and single splitter.
2452 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2453 (iorqi3_1, xorqi3_1): Likewise.
2454 (iorqi3, xorqi3 expanders): Similarly.
2456 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2457 (movmd_internal) into a single pattern using the P mode iterator.
2458 (movmd splitters): Similarly.
2459 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2460 (movsd splitters): Similarly.
2462 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2463 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2464 right table based on the size of the operand.
2465 * config/h8300/h8300.md (length_table): Corresponding changes. All
2466 references to "addb", "addw" and "addl" changed to "add".
2467 (btst patterns): Merge two variants into a single pattern.
2468 (tstqi, tsthi): Likewise.
2469 (addhi3_incdec, addsi3_incdec): Likewise.
2470 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2471 (mulhi3, mulsi3): Likewise.
2472 (udivhi3, udivsi3): Likewise.
2473 (divhi3, divsi3): Likewise.
2474 (andorqi3, andorhi3, andorsi3): Likewise.
2476 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2479 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2480 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2482 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2484 PR tree-optimization/85694
2485 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2486 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2488 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2489 (<u>avg<mode>3_ceil): New patterns.
2491 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2493 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2494 scan-tree-dump directive.
2495 * gcc.dg/vect/slp-perm-2.c: Likewise.
2496 * gcc.dg/vect/slp-perm-3.c: Likewise.
2497 * gcc.dg/vect/slp-perm-5.c: Likewise.
2498 * gcc.dg/vect/slp-perm-6.c: Likewise.
2499 * gcc.dg/vect/slp-perm-7.c: Likewise.
2500 * gcc.dg/vect/slp-perm-8.c: Likewise.
2502 2018-07-03 Marek Polacek <polacek@redhat.com>
2505 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2507 2018-07-03 Richard Biener <rguenther@suse.de>
2510 * tree-ssa-structalias.c (find_func_clobbers): Properly
2511 handle indirect calls.
2513 2018-07-03 Jeff Law <law@redhat.com>
2515 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2516 (shifts): New code iterator.
2517 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2518 expander. Fix HImode handling on H8/SX.
2519 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2520 (subqi3, subhi3, subsi3 expanders): Likewise.
2521 (andqi3, andhi3, andsi3 expanders): Likewise.
2522 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2523 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2524 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2525 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2526 (zero_extendqihi2, zero_extendqisi2): Likewise.
2527 (extendqihi2, extendqisi2): Likewise.
2528 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2529 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2530 (rotlqi3_1, rotlhi3_1): Likewise.
2531 (logicalhi3_sn, logicalsi3_sn): Likewise.
2532 (logicalhi3, logicalsi3): Likewise.
2534 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2536 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2537 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2538 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2539 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2540 type to append_pattern_def_seq instead of creating a stmt_vec_info
2542 (build_mask_conversion): Likewise. Remove vinfo argument.
2543 (vect_add_conversion_to_patterm): Likewise, renaming to...
2544 (vect_add_conversion_to_pattern): ...this.
2545 (vect_recog_mask_conversion_pattern): Update call to
2546 build_mask_conversion. Pass the vector type to
2547 append_pattern_def_seq here too.
2548 (vect_recog_gather_scatter_pattern): Update call to
2549 vect_add_conversion_to_pattern.
2551 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2553 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2554 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2555 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2556 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2557 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2558 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2559 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2560 append_pattern_def_seq instead of new_pattern_def_seq.
2561 (vect_recog_divmod_pattern): Do both of the above.
2562 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2565 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2567 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2568 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2569 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2570 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2571 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2572 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2573 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2574 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2575 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2576 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2577 parameter with a single stmt_vec_info.
2578 (vect_recog_func_ptr): Likewise.
2579 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2580 (vect_try_gather_scatter_pattern): ...this.
2581 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2582 the stmt_vec_info of the statement to be matched. Don't clear
2583 STMT_VINFO_RELATED_STMT.
2584 (vect_pattern_recog): Update call accordingly.
2586 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2588 PR tree-optimization/85694
2589 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2590 (uavgM3_ceil): Document new optabs.
2591 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2592 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2594 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2595 (savg_ceil_optab): New optabs.
2596 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2597 (vect_vect_recog_func_ptrs): Add it.
2598 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2599 constant directly from the associated lhs.
2601 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2603 * tree-vect-patterns.c (vect_split_statement): New function.
2604 (vect_convert_input): Use it to try to split an existing cast.
2606 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2608 * poly-int.h (print_hex): New function.
2609 * dumpfile.h (dump_dec, dump_hex): Declare.
2610 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
2611 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
2612 min_input_precision, operation_precision and operation_sign.
2613 * tree-vect-patterns.c (vect_get_range_info): New function.
2614 (vect_same_loop_or_bb_p, vect_single_imm_use)
2615 (vect_operation_fits_smaller_type): Delete.
2616 (vect_look_through_possible_promotion): Add an optional
2617 single_use_p parameter.
2618 (vect_recog_over_widening_pattern): Rewrite to use new
2619 stmt_vec_info infomration. Handle one operation at a time.
2620 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
2621 (vect_truncatable_operation_p, vect_set_operation_type)
2622 (vect_set_min_input_precision): New functions.
2623 (vect_determine_min_output_precision_1): Likewise.
2624 (vect_determine_min_output_precision): Likewise.
2625 (vect_determine_precisions_from_range): Likewise.
2626 (vect_determine_precisions_from_users): Likewise.
2627 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
2628 (vect_vect_recog_func_ptrs): Put over_widening first.
2630 (vect_pattern_recog): Call vect_determine_precisions.
2632 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2634 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
2635 statements that have been replaced by further pattern statements.
2636 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2638 2018-07-03 Richard Biener <rguenther@suse.de>
2640 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
2641 always set *dt. Dump vectype in vectype overload.
2642 * dumpfile.h (dump_gimple_expr): New function.
2643 (dump_gimple_expr_loc): Likewise.
2644 * dumpfile.c (dump_gimple_expr): New function.
2645 (dump_gimple_expr_loc): Likewise.
2647 2018-07-02 Jeff Law <law@redhat.com>
2649 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
2650 the H8/300, H8/300H and H8/S variants into a single pattern.
2651 (movhi_h8300, movqi_h8300hs): Similarly.
2652 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
2653 (QHI mode iterator): New.
2655 * config/h8300/h8300.md: Remove trailing whitespace.
2657 2018-07-02 Jim Wilson <jimw@sifive.com>
2659 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
2660 instead of emit_insn for interrupt returns.
2661 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
2662 (riscv_sret, riscv_uret): Likewise.
2664 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2666 * pretty-print.c (selftest::test_pp_format): Move save and restore
2667 of quotes to class auto_fix_quotes, and add an instance.
2668 * selftest.c: Include "intl.h".
2669 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
2670 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
2671 * selftest.h (selftest::auto_fix_quotes): New class.
2673 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
2675 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
2676 (aarch64_sve_prepare_conditional_op): Remove.
2677 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
2678 Allow aarch64_simd_reg_or_zero as select operand; remove
2679 the aarch64_sve_prepare_conditional_op call.
2680 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
2681 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2682 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
2683 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
2684 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
2685 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
2686 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
2687 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
2688 and a splitters to match all of the *_any patterns.
2689 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
2691 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
2692 (SVE_COND_FP_BINARY_REV): Remove.
2693 (sve_int_op_rev, sve_fp_op_rev): New.
2694 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
2695 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
2696 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
2697 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
2698 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
2699 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
2700 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
2701 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
2702 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
2704 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
2705 Remove match_dup 1 from the inner unspec.
2706 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
2708 * config/aarch64/aarch64.md (movprfx): New attr.
2709 (length): Default movprfx to 8.
2710 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
2711 (*madd<SVE_I>, *msub<SVE_I): Likewise.
2712 (*<su>mul<SVE_I>3_highpart): Likewise.
2713 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
2714 (*v<ASHIFT><SVE_I>3): Likewise.
2715 (*<su><MAXMIN><SVE_I>3): Likewise.
2716 (*<su><MAXMIN><SVE_F>3): Likewise.
2717 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
2718 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
2719 (*div<SVE_F>4): Likewise.
2721 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
2723 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
2726 2018-07-02 Richard Biener <rguenther@suse.de>
2728 PR tree-optimization/86363
2729 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
2730 memset argument refers to a non-variable address.
2732 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2734 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
2735 {PLUS,MINUS}_EXPR code to...
2736 (adjust_symbolic_bound): ...here,
2737 (combine_bound): ...here,
2738 (set_value_range_with_overflow): ...and here.
2740 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
2742 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
2744 (extract_range_from_abs_expr): ...here.
2746 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
2748 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
2749 -fno-omit-frame-pointer when not optimizing.
2751 2018-07-02 Martin Liska <mliska@suse.cz>
2754 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
2755 (propagate_nothrow): Likewise.
2757 2018-07-02 Martin Liska <mliska@suse.cz>
2760 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2762 2018-07-02 David Malcolm <dmalcolm@redhat.com>
2764 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
2765 function in r262149, changing "loc" param from source_location to
2766 const dump_location_t &.
2767 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
2768 declaration, as above.
2770 2018-07-01 Paul Koning <ni1d@arrl.net>
2772 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
2773 -munit-asm, -mgnu-asm, -mdec-asm.
2774 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
2775 (pdp11_output_labelref): New.
2776 (pdp11_output_def): New.
2777 (pdp11_output_addr_vec_elt): New.
2778 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
2779 %# and %@ format codes.
2780 (pdp11_option_override): New.
2781 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
2782 (pdp11_output_ident): New.
2783 (pdp11_asm_named_section): New.
2784 (pdp11_asm_init_sections): New.
2785 (pdp11_file_start): New.
2786 (pdp11_file_end): New.
2787 (output_ascii): Use .ascii/.asciz for -mdec-asm.
2788 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
2789 %o, like %c but octal.
2790 (pdp11_option_override): New.
2791 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
2793 (DATA_SECTION_ASM_OP): Ditto.
2794 (READONLY_DATA_SECTION_ASM_OP): New.
2795 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
2796 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
2797 (ASM_OUTPUT_LABELREF): Ditto.
2798 (ASM_OUTPUT_DEF): Ditto.
2799 (ASM_OUTPUT_EXTERNAL): New.
2800 (ASM_OUTPUT_SOURCE_FILENAME): New.
2801 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
2802 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
2803 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
2804 %# and %@ format codes.
2805 * config/pdp11/pdp11.opt (mgnu-asm): New.
2806 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
2807 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
2808 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2810 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
2812 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
2813 dereferencing path[] beyond its length.
2815 (debug_all_paths): New.
2816 (rewire_first_differing_edge): New.
2817 (adjust_paths_after_duplication): New.
2818 (duplicate_thread_path): Call adjust_paths_after_duplication.
2820 (thread_through_all_blocks): Add new argument to
2821 duplicate_thread_path.
2823 2018-06-30 Jim Wilson <jimw@sifive.com>
2825 * config/riscv/predicates.md (p2m1_shift_operand): New.
2826 (high_mask_shift_operand): New.
2827 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
2828 pattern using p2m1_shift_operand.
2829 (lshsi3_zero_extend_3+2): New combiner pattern using
2830 high_mask_shift_operand.
2832 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2834 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
2836 (vect_recog_rotate_pattern): ...here.
2837 (vect_convert_input): Try to insert casts of invariants in the
2839 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
2840 preheader to be empty.
2842 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2844 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
2845 vector type. If given, install it in the new statement's
2847 (vect_element_precision): New function.
2848 (vect_unpromoted_value): New struct.
2849 (vect_unpromoted_value::vect_unpromoted_value): New function.
2850 (vect_unpromoted_value::set_op): Likewise.
2851 (vect_look_through_possible_promotion): Likewise.
2852 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
2853 (vect_widened_op_tree, vect_convert_input): Likewise.
2854 (vect_convert_inputs, vect_convert_output): Likewise.
2855 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
2856 to handle the optional cast of the multiplication result and
2857 vect_widened_op_tree to detect the widened multiplication itself.
2858 Do not require the input and output of promotion casts to have
2859 the same sign, but base the signedness of the operation on the
2860 input rather than the result. If the pattern includes two
2861 promotions, check that those promotions have the same sign.
2862 Do not restrict the MULT_EXPR handling to a double-width result;
2863 handle quadruple-width results and wider. Use vect_convert_inputs
2864 to convert the inputs to the common type.
2865 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
2866 to handle the optional cast of the ABS result. Also allow a sign
2867 change or a sign extension between the ABS and MINUS.
2868 Use vect_widened_op_tree to detect the widened subtraction and use
2869 vect_convert_inputs to convert the inputs to the common type.
2870 (vect_handle_widen_op_by_const): Delete.
2871 (vect_recog_widen_op_pattern): New function.
2872 (vect_recog_widen_mult_pattern): Use it.
2873 (vect_recog_widen_shift_pattern): Likewise.
2874 (vect_recog_widen_sum_pattern): Use
2875 vect_look_through_possible_promotion to handle the promoted
2878 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2880 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
2881 the containing gimple_seq *.
2882 * gimple-iterator.h (gsi_for_stmt): Declare it.
2883 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
2884 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
2885 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2886 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2887 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
2889 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
2891 (vect_mark_pattern_stmts): ...here. Handle cases in which the
2892 statement being replaced is part of an existing pattern
2893 definition sequence, inserting the new pattern statements before
2895 (vect_pattern_recog_1): Don't return a bool. If the statement
2896 is already part of a pattern, instead apply pattern matching
2897 to the pattern definition statements. Don't clear the
2898 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
2899 (vect_pattern_recog): Don't break after the first match;
2900 continue processing the pattern definition statements instead.
2901 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2903 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2905 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
2906 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2907 (vect_recog_widen_sum_pattern): Use it.
2909 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2911 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2912 phi is not a pattern statement and has not been replaced by
2913 a pattern statement.
2914 * tree-vect-patterns.c (type_conversion_p): Don't check
2915 STMT_VINFO_IN_PATTERN_P.
2916 (vect_recog_vector_vector_shift_pattern): Likewise.
2917 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
2918 the pattern statement rather than the original statement; check
2919 directly for a WIDEN_MULT_EXPR here.
2920 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
2921 vect_is_simple_use to return the pattern statement rather
2922 than the original statement; use is_pattern_stmt_p to check
2923 for such a pattern statement.
2924 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
2925 to return the pattern statement rather than the original statement;
2926 don't do the same transformation here.
2927 (vect_is_simple_use): If the defining statement has been replaced
2928 by a pattern statement, return the pattern statement instead.
2929 Remove the corresponding (local) transformation from the vectype
2932 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
2934 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
2935 end and default to null.
2936 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2937 (vectorizable_reduction): Update calls accordingly, dropping the
2938 gimple ** argument if the passed-back statement isn't needed.
2939 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
2940 (vect_recog_rotate_pattern): Likewise.
2941 (vect_recog_mask_conversion_pattern): Likewise.
2942 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2943 (vect_mask_constant_operand_p): Likewise.
2944 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
2945 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
2946 (get_group_load_store_type, get_load_store_type): Likewise.
2947 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
2948 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
2949 (vectorizable_conversion, vectorizable_assignment): Likewise.
2950 (vectorizable_shift, vectorizable_operation): Likewise.
2951 (vectorizable_store, vect_is_simple_cond): Likewise.
2952 (vectorizable_condition, vectorizable_comparison): Likewise.
2953 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
2954 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
2955 and move it to the end. Cope with null def_stmt_outs.
2957 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2959 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2961 2018-06-29 Jeff Law <law@redhat.com>
2963 * config/v850/v850.c (v850_legitimate_address_p): Handle large
2964 displacements for TARGET_V850E2V3 and newer.
2965 (TARGET_LRA_P): Remove. Defaults to LRA now.
2966 * config/v850/v850.md (sign23byte_load): Remove.
2967 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
2968 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2970 2018-06-29 Martin Liska <mliska@suse.cz>
2973 * coverage.c (coverage_init): Mangle full path name.
2974 * doc/invoke.texi: Document the change.
2975 * gcov-io.c (mangle_path): New.
2976 * gcov-io.h (mangle_path): Likewise.
2977 * gcov.c (mangle_name): Use mangle_path for path mangling.
2979 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2981 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2982 if starting source register is not even.
2984 2018-06-29 Martin Liska <mliska@suse.cz>
2986 PR tree-optimization/86263
2987 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
2988 Make edge redirection.
2990 2018-06-29 David Malcolm <dmalcolm@redhat.com>
2992 * dumpfile.c (dump_loc): Add indentation based on scope depth.
2993 (dump_scope_depth): New variable.
2994 (get_dump_scope_depth): New function.
2995 (dump_begin_scope): New function.
2996 (dump_end_scope): New function.
2997 * dumpfile.h (get_dump_scope_depth): New declaration.
2998 (dump_begin_scope): New declaration.
2999 (dump_end_scope): New declaration.
3000 (class auto_dump_scope): New class.
3001 (AUTO_DUMP_SCOPE): New macro.
3002 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3005 2018-06-29 Richard Biener <rguenther@suse.de>
3007 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3008 compute_all_dependences succeeds.
3009 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3010 exceed --param loop-max-datarefs-for-datadeps.
3012 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3014 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3016 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3019 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3020 alternative 0 in preferred_for_speed attribute.
3022 2018-06-28 Paul Koning <ni1d@arrl.net>
3024 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3025 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3026 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3027 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3028 for shift insn patterns.
3030 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3032 * cgraph.c (cgraph_node::get_body): Replace assignments to
3033 "dump_file" with calls to set_dump_file.
3034 * dumpfile.c (alt_dump_file): Make static, and group with...
3035 (alt_flags): ...this definition.
3036 (dumps_are_enabled): New variable.
3037 (refresh_dumps_are_enabled): New function.
3038 (set_dump_file): New function.
3039 (set_alt_dump_file): New function.
3040 (gcc::dump_manager::dump_start): Replace assignments to
3041 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3043 (gcc::dump_manager::dump_finish): Likewise.
3044 * dumpfile.h (alt_dump_file): Delete decl.
3045 (dumps_are_enabled): New variable decl.
3046 (set_dump_file): New function decl.
3047 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3049 * tree-nested.c (lower_nested_functions): Replace assignments to
3050 "dump_file" with calls to set_dump_file.
3052 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3054 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3055 goto_locus of each outgoing edge of each basic block.
3057 2018-06-28 Richard Biener <rguenther@suse.de>
3059 * dwarf2out.c (decl_scope_table): Remove.
3060 (push_decl_scope): Likewise.
3061 (pop_decl_scope): Likewise.
3062 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3063 (gen_struct_or_union_type_die): Likewise.
3064 (gen_tagged_type_die): Likewise.
3065 (dwarf2out_init): Do not initialize decl_scope_table.
3066 (dwarf2out_c_finalize): Do not free it.
3068 2018-06-28 Richard Biener <rguenther@suse.de>
3070 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3071 deciding whether to not re-use a DIE.
3073 2018-06-28 Richard Biener <rguenther@suse.de>
3075 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3076 DW_AT_abstract_origin attribute.
3078 2018-06-28 Martin Liska <mliska@suse.cz>
3080 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3081 Use newly introduced constants.
3082 * tree-switch-conversion.h (struct jump_table_cluster):
3083 Define max_ratio_for_size and max_ratio_for_speed.
3085 2018-06-28 Martin Liska <mliska@suse.cz>
3087 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3088 Add new checking assert to catch invalid state.
3089 (jump_table_cluster::can_be_handled): Handle single case
3091 (jump_table_cluster::is_beneficial): Bail out for such case.
3092 (bit_test_cluster::find_bit_tests):
3093 Add new checking assert to catch invalid state.
3094 (bit_test_cluster::can_be_handled): Handle single case
3096 (bit_test_cluster::is_beneficial): Bail out for such case.
3097 (switch_decision_tree::analyze_switch_statement):
3100 2018-06-28 Martin Liska <mliska@suse.cz>
3102 * common.opt: Introduce -completion option.
3103 * gcc.c (driver_handle_option): Handle it.
3104 (driver::main): Print completions if completion
3106 * opt-suggestions.c (option_proposer::get_completions):
3108 (option_proposer::suggest_completion): Likewise.
3109 (option_proposer::find_param_completions): Likewise.
3110 (verify_autocompletions): Likewise.
3111 (test_completion_valid_options): Likewise.
3112 (test_completion_valid_params): Likewise.
3113 (in_completion_p): Likewise.
3114 (empty_completion_p): Likewise.
3115 (test_completion_partial_match): Likewise.
3116 (test_completion_garbage): Likewise.
3117 (opt_proposer_c_tests): Likewise.
3118 * opt-suggestions.h: Declare new functions.
3119 * opts.c (common_handle_option): Handle OPT__completion_.
3120 * selftest-run-tests.c (selftest::run_tests): Add
3121 opt_proposer_c_tests.
3122 * selftest.c (assert_str_startswith): New.
3123 * selftest.h (assert_str_startswith): Likewise.
3124 (opt_proposer_c_tests): New.
3125 (ASSERT_STR_STARTSWITH): Likewise.
3127 2018-06-28 Martin Liska <mliska@suse.cz>
3129 * Makefile.in: Add opt-suggestions.o.
3130 * gcc-main.c: Include opt-suggestions.h.
3131 * gcc.c (driver::driver): Likewise.
3132 (driver::~driver): Remove m_option_suggestions.
3133 (driver::build_option_suggestions): Moved to option_proposer.
3134 (driver::suggest_option): Likewise.
3135 (driver::handle_unrecognized_options): Use option_proposer.
3136 * gcc.h (class driver): Add new memver m_option_proposer.
3137 * opt-suggestions.c: New file.
3138 * opt-suggestions.h: New file.
3140 2018-06-28 Martin Liska <mliska@suse.cz>
3142 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3143 (auto_string_vec::~auto_string_vec): Likewise.
3145 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3147 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3148 prevent_decl_creation_for_types fields up and add reset_location field.
3149 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3150 statement if id->reset_location is true.
3151 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3152 id->reset_location is true.
3153 (copy_phis_for_bb): Force input_location on the arguments if
3154 id->reset_location is true.
3155 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3156 is set on the function to be inlined.
3158 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3160 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3162 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3164 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3165 registers for Pmode.
3166 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3167 hard registers for the clobbered pseudo.
3169 2018-06-27 Paul Koning <ni1d@arrl.net>
3171 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3172 mutually exclusive options.
3173 * config/pdp11/constraints.md (h): New constraint.
3174 (O): Update definition to match shift code generation.
3175 (D): New constraint.
3176 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3178 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3180 (output_jump): Change arguments.
3181 (pdp11_fixed_cc_regs): New function.
3182 (pdp11_cc_mode): Ditto.
3183 (pdp11_expand_shift): Ditto.
3184 (pdp11_assemble_shift): Ditto.
3185 (pdp11_small_shift): Ditto.
3186 (pdp11_branch_cost): Remove.
3187 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3189 (pdp11_register_move_cost): Update for CC registers.
3190 (pdp11_rtx_costs): Add case for LSHIFTRT.
3191 (pdp11_output_jump): Add CCNZ mode conditional branches.
3192 (notice_update_cc_on_set): Remove.
3193 (pdp11_cc_mode): New function.
3194 (simple_memory_operand): Correct pre/post decrement case.
3195 (no_side_effect_operand): New function.
3196 (pdp11_regno_reg_class): Add CC_REGS class.
3197 (pdp11_fixed_cc_regs): New function.
3198 (pdp11_small_shift): New function.
3199 (pdp11_expand_shift): New function to expand shift insns.
3200 (pdp11_assemble_shift): New function to output shifts.
3201 (pdp11_branch_cost): Remove.
3202 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3203 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3204 (WCHAR_TYPE): Ditto.
3205 (PTRDIFF_TYPE): Ditto.
3206 (ADJUST_INSN_LENGTH): New macro.
3207 (FIXED_REGISTERS): Add CC registers.
3208 (CALL_USED_REGISTERS): Ditto.
3210 (REG_CLASS_NAMES): Ditto.
3211 (REG_CLASS_CONTENTS): Ditto.
3212 (SELECT_CC_MODE): Use new function.
3213 (TARGET_FLAGS_REGNUM): New macro.
3214 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3215 (cc0_reg_rtx): Remove.
3216 (CC_STATUS_MDEP): Remove.
3217 (CC_STATUS_MDEFP_INIT): Remove.
3218 (CC_IN_FPU): Remove.
3219 (NOTICE_UPDATE_CC): Remove.
3220 (REGISTER_NAMES): Add CC registers.
3221 (BRANCH_COST): Change to constant 1.
3222 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3224 * config/pdp11/pdp11.opt (mbcopy): Remove.
3225 (mbcopy-builtin): Remove.
3226 (mbranch-cheap): Remove.
3227 (mbranch-expensive): Remove.
3228 * config/pdp11/predicates.md (expand_shift_operand): Update to
3229 match shift code generation.
3230 (ccnz_operator): New predicate.
3231 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3232 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3233 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3235 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3236 description of O constraint.
3238 2018-06-27 Jeff Law <law@redhat.com>
3239 Austin Law <austinklaw@gmail.com>
3241 * config/v850/v850.md (addsi3_set_flags): New pattern.
3242 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3243 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3244 (zero_extendhisi2_v850_set_flags): Likewise.
3245 (zero_extendqisi2_v850_set_flags): Likewise.
3246 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3247 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3248 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3250 * config/v850/v850-protos.h (notice_update_cc): Remove.
3251 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3252 (v850_print_operand): Handle 'D' and "d".
3253 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3254 Add handling of arithmetic/logical operations compared against zero.
3255 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3256 Do not look at v850_compare_op, instead get mode from last argument.
3257 (v850_gen_compare): Remove
3258 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3259 after reload for prologue insns.
3260 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3262 (construct_save_jarl): Likewise.
3263 (TARGET_FLAGS_REGNUM): Define.
3264 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3265 (NOTICE_UPDATE_CC): Remove.
3266 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3267 than cc0. Conditionalize on reload_completed.
3268 (cmpsi_insn, setfcc_insn): Likewise.
3269 (tst1 splitter): Turn into define_and_split which sets the flags
3271 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3272 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3273 (cstoresf4, cstoredf4): Clobber the flags.
3274 (cmpsi, cmpsf, cmpdf): Remove expanders.
3275 (setf_insn): Remove pattern.
3276 (addsi3): Turn into define_and_split which clobbers the flags after
3277 reload and a suitable pattern (addsi3_clobber_flags) for use after
3279 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3280 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3281 (ashrsi3, ashrsi3_v850e2): Likewise.
3282 (bins): Clobber the flags.
3283 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3284 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3285 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3286 (call_value_internal_short, call_value_internal_long): Likewise.
3287 (callt_save_interrupt, callt_return_interrupt): Likewise.
3288 (save_interrupt, return_interrupt): Likewise.
3289 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3290 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3291 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3292 (All FP comparisons): Only allow after reload has completed.
3294 (divh, divhu): Tweak output template.
3295 (branch_z_normal, branch_z_invert): Remove
3296 (branch_nz_normal, branch_nz_invert): Likewise.
3297 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3299 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3300 * config/v850/v850.c (notice_update_cc): Remove.
3301 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3302 (CC_NO_CARRY): Likewise.
3303 (NOTICE_UPDATE_CC): Define to nothing.
3304 * config/v850/v850.md: Remove block comment on cc0 handling
3305 Remove "cc" attribute from all patterns. Remove cc_status handling
3306 from all patterns. Minor formatting fixes.
3308 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3310 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3311 (cortex-a76.cortex-a55): Likewise.
3312 * config/aarch64/aarch64-tune.md: Regenerate.
3313 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3314 cortex-a76.cortex-a55.
3316 2018-06-27 Jeff Law <law@redhat.com>
3318 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3319 (MULTILIB_DIRNAMES): Similarly.
3321 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3323 * gimple.h (gimple_return_retbnd): Delete.
3324 (gimple_return_set_retbnd): Likewise.
3325 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3326 gimple_return_set_retbnd.
3327 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3328 gimple_return_retbnd and adjust.
3329 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3330 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3331 Explicitly return NULL in a couple more cases. Move assertion
3332 on debug statements and remove unreachable code.
3333 (reset_debug_binding): Do not test id->retbnd.
3334 (expand_call_inline): Do not set it.
3336 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3338 * configure.ac: Add --disable-gcov option.
3339 * configure: Regenerate.
3340 * Makefile.in: Honour @enable_gcov@.
3341 * doc/install.texi: Document --disable-gcov.
3343 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3345 * config/arm/arm-cpus.in (cortex-a76): New entry.
3346 (cortex-a76.cortex-a55): Likewise.
3347 * config/arm/arm-tables.opt: Regenerate.
3348 * config/arm/arm-tune.md: Likewise.
3349 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3350 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3351 cortex-a76.cortex-a55.
3353 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3356 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3358 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3360 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3362 (EPILOGUE_USES): Likewise.
3364 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3366 * tree-inline.c (remap_location): New function extracted from...
3367 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3368 (copy_phis_for_bb): ...here. Call remap_location.
3369 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3371 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3373 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3374 unaligned vsx for 16B memset.
3376 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3379 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3380 ieee128_float_type_node to long_double_type_node unless
3381 TARGET_LONG_DOUBLE_128 is set.
3383 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3385 * cfgloop.c (get_loop_location): Convert return type from
3386 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3387 by implicit construction from rtx_insn *, and using
3388 dump_user_location_t::from_function_decl for the fallback case.
3389 * cfgloop.h (get_loop_location): Convert return type from
3390 location_t to dump_user_location_t.
3391 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3392 dump_printf_loc to pass in a dump_location_t rather than a
3393 location_t, via the gimple stmt.
3394 * coverage.c (get_coverage_counts): Update calls to
3395 dump_printf_loc to pass in dump_location_t rather than a
3397 * doc/optinfo.texi (Dump types): Convert example of
3398 dump_printf_loc from taking "locus" to taking "insn". Update
3399 description of the "_loc" calls to cover dump_location_t.
3400 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3402 (dump_user_location_t::dump_user_location_t): New constructors,
3403 from gimple *stmt and rtx_insn *.
3404 (dump_user_location_t::from_function_decl): New function.
3405 (dump_loc): Make static.
3406 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3407 const dump_location_t &.
3408 (dump_generic_expr_loc): Delete.
3409 (dump_printf_loc): Convert param "loc" from location_t to
3410 const dump_location_t &.
3411 (selftest::test_impl_location): New function.
3412 (selftest::dumpfile_c_tests): New function.
3413 * dumpfile.h: Include "profile-count.h".
3414 (class dump_user_location_t): New class.
3415 (struct dump_impl_location_t): New struct.
3416 (class dump_location_t): New class.
3417 (dump_printf_loc): Convert 2nd param from source_location to
3418 const dump_location_t &.
3419 (dump_generic_expr_loc): Delete.
3420 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3421 const dump_location_t &.
3422 * gimple-fold.c (fold_gimple_assign): Update call to
3423 dump_printf_loc to pass in a dump_location_t rather than a
3424 location_t, via the gimple stmt.
3425 (gimple_fold_call): Likewise.
3426 * gimple-loop-interchange.cc
3427 (loop_cand::analyze_iloop_reduction_var): Update for change to
3428 check_reduction_path.
3429 (tree_loop_interchange::interchange): Update for change to
3431 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3432 change in return-type of find_loop_location.
3433 (graphite_regenerate_ast_isl): Likewise.
3434 * graphite-optimize-isl.c (optimize_isl): Likewise.
3435 * graphite.c (graphite_transform_loops): Likewise.
3436 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3437 pass in a dump_location_t rather than a location_t, via the
3439 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3440 * ipa.c (walk_polymorphic_call_targets): Likewise.
3441 * loop-unroll.c (report_unroll): Convert "locus" param from
3442 location_t to dump_location_t.
3443 (decide_unrolling): Update for change to get_loop_location's
3445 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3446 location_t to dump_user_location_t.
3447 (grid_find_single_omp_among_assignments_1): Updates calls to
3448 dump_printf_loc to pass in a dump_location_t rather than a
3449 location_t, via the gimple stmt.
3450 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3451 location_t to dump_location_t. Updates calls to dump_printf_loc
3452 to pass in a dump_location_t rather than a location_t, via the
3454 (grid_inner_loop_gridifiable_p): Likewise.
3455 (grid_dist_follows_simple_pattern): Likewise.
3456 (grid_gfor_follows_tiling_pattern): Likewise.
3457 (grid_target_follows_gridifiable_pattern): Likewise.
3458 (grid_attempt_target_gridification): Convert initialization
3459 of local "grid" from memset to zero-initialization; FIXME: does
3460 this require C++11? Update call to dump_printf_loc to pass in a
3461 optinfo_location rather than a location_t, via the gimple stmt.
3462 * profile.c (read_profile_edge_counts): Updates call to
3463 dump_printf_loc to pass in a dump_location_t rather than a
3465 (compute_branch_probabilities): Likewise.
3466 * selftest-run-tests.c (selftest::run_tests): Call
3468 * selftest.h (dumpfile_c_tests): New decl.
3469 * tree-loop-distribution.c (pass_loop_distribution::execute):
3470 Update for change in return type of find_loop_location.
3471 * tree-parloops.c (parallelize_loops): Likewise.
3472 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3473 "locus" from location_t to dump_user_location_t.
3474 (canonicalize_loop_induction_variables): Likewise.
3475 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3476 for change in return type of find_loop_location.
3477 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3478 to dump_printf_loc to pass in a dump_location_t rather than a
3479 location_t, via the stmt.
3480 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3482 * tree-vect-loop-manip.c (find_loop_location): Convert return
3483 type from source_location to dump_user_location_t.
3484 (vect_do_peeling): Update for above change.
3485 (vect_loop_versioning): Update for change in type of
3487 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3488 from location_t to dump_user_location_t.
3489 (vect_estimate_min_profitable_iters): Update for change in type
3491 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3492 location_t to dump_location_t.
3493 (vect_slp_bb): Update for change in type of vect_location.
3494 * tree-vectorizer.c (vect_location): Convert from source_location
3495 to dump_user_location_t.
3496 (try_vectorize_loop_1): Update for change in vect_location's type.
3497 (vectorize_loops): Likewise.
3498 (increase_alignment): Likewise.
3499 * tree-vectorizer.h (vect_location): Convert from source_location
3500 to dump_user_location_t.
3501 (find_loop_location): Convert return type from source_location to
3502 dump_user_location_t.
3503 (check_reduction_path): Convert 1st param from location_t to
3504 dump_user_location_t.
3505 * value-prof.c (check_counter): Update call to dump_printf_loc to
3506 pass in a dump_user_location_t rather than a location_t; update
3507 call to error_at for change in type of "locus".
3508 (check_ic_target): Update call to dump_printf_loc to
3509 pass in a dump_user_location_t rather than a location_t, via the
3512 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3514 * config/s390/s390.h (enum processor_flags): Do not use
3515 default tune parameter when -march was specified.
3517 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3520 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3521 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3524 2018-06-26 Richard Biener <rguenther@suse.de>
3526 PR tree-optimization/86287
3528 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3529 (vect_analyze_loop): Initialize n_stmts.
3531 2018-06-26 Richard Biener <rguenther@suse.de>
3534 * fold-const.c (fold_convertible_p): Pointer extension
3537 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3540 * dwarf2out.c (loc_list_has_views): Adjust comments.
3541 (dw_loc_list): Split single cross-partition range with
3544 2018-06-25 Jeff Law <law@redhat.com>
3546 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3547 on -mbig-switch by default.
3549 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3551 (const_float_0_operand): Remove unused predicate.
3552 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3553 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3554 (recipsf2): New expander. Original pattern now called
3556 (recipdf2, recipdf2_insn): Similarly.
3557 (rsqrtsf2, rsqrtsf2_insn): Similarly
3558 (rsqrtdf2, rsqrtdf2_insn): Similarly
3560 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3562 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3563 Simplify logic for FreeBSD (twice).
3565 2018-06-25 Martin Sebor <msebor@redhat.com>
3567 PR tree-optimization/86204
3568 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3569 a strnlen result if it's less than the length of the string.
3571 2018-06-25 Martin Sebor <msebor@redhat.com>
3573 PR tree-optimization/85700
3574 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3575 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3576 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3578 2018-06-25 Martin Sebor <msebor@redhat.com>
3580 * doc/extend.texi (Zero-length arrays): Update and clarify.
3582 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3584 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3585 added IEEE/IBM long double multilib support on PowerPC little
3586 endian Linux systems.
3587 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3588 (MULTILIB_DEFAULTS): Likewise.
3589 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3591 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3592 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3593 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3595 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3598 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3599 (REORDER_45): Likewise.
3601 2018-06-25 Jeff Law <law@redhat.com>
3603 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3604 dividend to 32 bits. Adjust length.
3605 (udivmodhi4): Cleanup output template. Fix length.
3607 2018-06-25 Carl Love <cel@us.ibm.com>
3609 * config/rs6000/vsx.md: Change word selector to prefered location.
3611 2018-06-25 Richard Biener <rguenther@suse.de>
3613 PR tree-optimization/86304
3614 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
3615 epilogue-if-converted loops as well.
3617 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
3619 * lto-section-out.c (lto_begin_section): Do not print section
3620 name for noaddr and unnumbered dumps.
3622 2018-06-25 Richard Biener <rguenther@suse.de>
3624 * tree-vectorizer.h (struct vec_info_shared): New structure
3625 with parts split out from struct vec_info and loop_nest from
3626 struct _loop_vec_info.
3627 (struct vec_info): Adjust accordingly.
3628 (struct _loop_vec_info): Likewise.
3629 (LOOP_VINFO_LOOP_NEST): Adjust.
3630 (LOOP_VINFO_DATAREFS): Likewise.
3631 (LOOP_VINFO_DDRS): Likewise.
3632 (struct _bb_vec_info): Likewise.
3633 (BB_VINFO_DATAREFS): Likewise.
3634 (BB_VINFO_DDRS): Likewise.
3635 (struct _stmt_vec_info): Add dr_aux member.
3636 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
3637 (DR_MISALIGNMENT_UNINITIALIZED): New.
3638 (set_dr_misalignment): Adjust.
3639 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
3640 (vect_analyze_loop): Adjust prototype.
3641 (vect_analyze_loop_form): Likewise.
3642 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
3643 Compute dependences lazily.
3644 (vect_record_base_alignments): Use shared datarefs/ddrs.
3645 (vect_verify_datarefs_alignment): Likewise.
3646 (vect_analyze_data_refs_alignment): Likewise.
3647 (vect_analyze_data_ref_accesses): Likewise.
3648 (vect_analyze_data_refs): Likewise.
3649 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
3650 constructor parameter for shared part.
3651 (vect_analyze_loop_form): Pass in shared part and adjust.
3652 (vect_analyze_loop_2): Pass in storage for the number of
3653 stmts. Move loop nest finding to the caller. Compute
3655 (vect_analyze_loop): Pass in shared part.
3656 (vect_transform_loop): Verify shared datarefs are unchanged.
3657 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
3658 constructor parameter for shared part.
3659 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
3660 (vect_slp_bb): Verify shared datarefs are unchanged before
3662 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
3664 (new_stmt_vec_info): Initialize DR_AUX misalignment to
3665 DR_MISALIGNMENT_UNINITIALIZED.
3666 * tree-vectorizer.c (vec_info::vec_info): Add constructor
3667 parameter for shared part.
3668 (vec_info::~vec_info): Adjust.
3669 (vec_info_shared::vec_info_shared): New.
3670 (vec_info_shared::~vec_info_shared): Likewise.
3671 (vec_info_shared::save_datarefs): Likewise.
3672 (vec_info_shared::check_datarefs): Likewise.
3673 (try_vectorize_loop_1): Construct shared part live for analyses
3674 of a single loop for multiple vector sizes.
3675 * tree-parloops.c (gather_scalar_reductions): Adjust.
3677 2018-06-25 Richard Biener <rguenther@suse.de>
3679 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
3680 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
3681 (vect_analyze_data_refs): Remove similar code from here and
3682 simplify accordingly.
3684 2018-06-25 Richard Biener <rguenther@suse.de>
3686 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
3687 for reverse storage order accesses rather than asserting
3688 they cannot happen here.
3690 2018-06-25 Tom de Vries <tdevries@suse.de>
3693 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
3694 Use data16 instead of .byte for insn prefix.
3696 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
3699 * parser.c (make_char_string_pack): Pass this literal chars
3700 through cpp_interpret_string.
3701 (cp_parser_userdef_numeric_literal): Check the result of
3702 make_char_string_pack.
3704 2018-06-24 Maya Rashish <coypu@sdf.org>
3706 * ginclude/stddef.h: Simplify conditions around avoiding
3707 re-definition of __size_t.
3709 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3711 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
3712 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
3714 2018-06-22 Maya Rashish <coypu@sdf.org>
3716 * doc/invoke.texi (mno-fancy-math-387): Update for changes
3717 made to OpenBSD and NetBSD through the years.
3719 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3721 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3722 behavior of vec_pack (vector double, vector double) to match
3723 behavior of vec_float2 (vector double, vector double).
3725 2018-06-22 Olivier Hainque <hainque@adacore.com>
3727 * gimplify.c (gimplify_function_tree): Prevent creation
3728 of a trampoline for the address of the current function
3729 passed to entry/exit instrumentation hooks.
3731 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3734 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3737 2018-06-22 Martin Liska <mliska@suse.cz>
3739 PR tree-optimization/86263
3740 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3741 Bail out if is_enabled is false.
3742 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
3744 (jump_table_cluster::is_enabled): New function.
3746 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3748 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3749 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
3750 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
3751 (lto_input_ts_binfo_tree_pointers): Likewise.
3752 * tree-streamer-out.c (streamer_write_tree_bitfields,
3753 write_ts_binfo_tree_pointers): Likewise.
3754 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
3756 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
3758 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
3760 2018-06-22 Martin Liska <mliska@suse.cz>
3762 * symbol-summary.h (get): Make it pure and inline move
3763 functionality from ::get function.
3764 (get): Remove and inline into ::get and ::get_create.
3765 (get_create): Move code from ::get function.
3767 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3770 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3771 -x assembler-with-cpp.
3773 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3775 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
3776 _FILE_OFFSET_BITS=64 for C++.
3778 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3780 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3781 conversion insn that shows up when pr85657-3.c is compiled using
3782 IEEE 128-bit long double.
3783 (neg<mode>2_internal): Use the correct mode to check whether the
3784 mode is IBM extended.
3785 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3786 multiply and divide external functions from being created more
3789 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3791 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
3793 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
3794 the edge can be forwarded.
3795 (cfg_layout_merge_blocks): Likewise.
3797 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3799 * except.c (finish_eh_generation): Commit edge insertions only after
3800 the EH edges have been redirected from post-landing to landing pads.
3802 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3804 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
3805 create_tmp_var_for to create the FRAME decl.
3806 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
3808 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
3810 * tree-inline.c (copy_edges_for_bb): Minor tweak.
3811 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
3812 debug statement when resetting its value.
3813 (expand_call_inline): Copy the locus of the call onto the assignment
3814 of the return value, if any. Use local variable in more cases.
3816 2018-06-21 Martin Liska <mliska@suse.cz>
3818 * ipa-pure-const.c (propagate_nothrow): Use
3819 funct_state_summaries->get.
3820 (dump_malloc_lattice): Likewise.
3821 (propagate_malloc): Likewise.
3823 2018-06-21 Richard Biener <rguenther@suse.de>
3825 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
3826 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
3827 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
3829 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
3830 BLOCK_ABSTRACT_ORIGIN unconditionally.
3832 2018-06-21 David Malcolm <dmalcolm@redhat.com>
3834 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
3836 * ipa-reference.c (ipa_reference_c_finalize): Delete
3837 ipa_ref_opt_sum_summaries and set it to NULL.
3839 2018-06-21 Tom de Vries <tdevries@suse.de>
3841 PR tree-optimization/85859
3842 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
3843 test with comment from bb_no_side_effects_p.
3845 2018-06-21 Richard Biener <rguenther@suse.de>
3847 PR tree-optimization/86232
3848 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
3849 max for constant niter.
3851 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3853 * config/aarch64/aarch64-simd.md
3854 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
3856 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
3858 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
3859 Make opernads of the unspec commutative.
3861 2018-06-21 Richard Biener <rguenther@suse.de>
3863 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
3864 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
3865 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
3866 (vect_analyze_data_ref_dependence): Re-order checks to deal with
3868 (vect_record_base_alignments): Do not record base alignment
3869 for gathers or scatters.
3870 (vect_compute_data_ref_alignment): Drop return value that is always
3871 true. Bail out early for gathers or scatters.
3872 (vect_enhance_data_refs_alignment): Bail out early for gathers
3874 (vect_find_same_alignment_drs): Likewise.
3875 (vect_analyze_data_refs_alignment): Remove dead code.
3876 (vect_slp_analyze_and_verify_node_alignment): Likewise.
3877 (vect_analyze_data_refs): For possible gathers or scatters do
3878 not create an alternate DR, just check their possible validity
3879 and mark them. Adjust DECL_NONALIASED handling to not rely
3881 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
3882 update inits of gathers or scatters.
3883 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3884 Also copy gather/scatter flag to pattern vinfo.
3886 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3888 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3889 behavior of vec_packsu (vector unsigned long long, vector unsigned
3890 long long) to match behavior of vec_packs with same signature.
3892 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3893 Thomas Schwinge <thomas@codesourcery.com>
3894 Cesar Philippidis <cesar@codesourcery.com>
3896 * gimplify.c (gimplify_scan_omp_clauses): Add support for
3897 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3898 (gimplify_adjust_omp_clauses): Likewise.
3899 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
3900 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
3901 (gimplify_omp_target_update): Update handling of acc update and
3903 * omp-low.c (install_var_field): Remove unused parameter
3904 base_pointers_restrict.
3905 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
3906 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
3908 (omp_target_base_pointers_restrict_p): Delete.
3909 (scan_omp_target): Update call to scan_sharing_clauses.
3910 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
3912 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3913 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
3914 (convert_local_omp_clauses): Likewise.
3915 * tree-pretty-print.c (dump_omp_clause): Likewise.
3916 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
3918 (omp_clause_code_name): Likewise.
3920 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3923 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3926 PR tree-optimization/86231
3927 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3928 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3930 2018-06-20 Tom de Vries <tdevries@suse.de>
3932 PR tree-optimization/86097
3933 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
3934 iv type if signedness of iv type is not the same as that of *nit.
3936 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3938 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
3939 EDGE_EH edges, verify they are all EDGE_EH.
3941 2018-06-20 Maya Rashish <coypu@sdf.org>
3943 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
3945 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3947 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
3948 * config/aarch64/aarch64.c (xgene1_tunings): Add
3949 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
3950 (aarch64_mode_valid_for_sched_fusion_p):
3951 Allow 16-byte modes.
3952 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
3953 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
3955 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
3957 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
3958 * config/aarch64/iterators.md (VQ2): New mode iterator.
3960 2018-06-20 Martin Liska <mliska@suse.cz>
3962 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3963 Change default ratio from 10 to 8.
3965 2018-06-20 Martin Liska <mliska@suse.cz>
3967 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3969 (bit_test_cluster::find_bit_tests): Likewise.
3970 (switch_decision_tree::analyze_switch_statement): Find clusters.
3971 * tree-switch-conversion.h (struct jump_table_cluster): Document
3974 2018-06-20 Martin Liska <mliska@suse.cz>
3976 * tree-switch-conversion.c (switch_conversion::collect):
3977 Record m_uniq property.
3978 (switch_conversion::expand): Bail out for special conditions.
3979 (group_cluster::~group_cluster): New.
3980 (group_cluster::group_cluster): Likewise.
3981 (group_cluster::dump): Likewise.
3982 (jump_table_cluster::emit): New.
3983 (switch_decision_tree::fix_phi_operands_for_edges): New.
3984 (struct case_node): Remove struct.
3985 (jump_table_cluster::can_be_handled): New.
3986 (case_values_threshold): Moved to header.
3987 (reset_out_edges_aux): Likewise.
3988 (jump_table_cluster::is_beneficial): New.
3989 (bit_test_cluster::can_be_handled): Likewise.
3990 (add_case_node): Remove.
3991 (bit_test_cluster::is_beneficial): New.
3992 (case_bit_test::cmp): New.
3993 (bit_test_cluster::emit): New.
3994 (expand_switch_as_decision_tree_p): Remove.
3995 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
3996 (fix_phi_operands_for_edge): Likewise.
3997 (switch_decision_tree::analyze_switch_statement): New.
3998 (compute_cases_per_edge): Move ...
3999 (switch_decision_tree::compute_cases_per_edge): ... here.
4000 (try_switch_expansion): Likewise.
4001 (switch_decision_tree::try_switch_expansion): Likewise.
4002 (record_phi_operand_mapping): Likewise.
4003 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4004 (emit_case_decision_tree): Likewise.
4005 (switch_decision_tree::emit): Likewise.
4006 (balance_case_nodes): Likewise.
4007 (switch_decision_tree::balance_case_nodes): Likewise.
4008 (dump_case_nodes): Likewise.
4009 (switch_decision_tree::dump_case_nodes): Likewise.
4010 (emit_jump): Likewise.
4011 (switch_decision_tree::emit_jump): Likewise.
4012 (emit_cmp_and_jump_insns): Likewise.
4013 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4014 (emit_case_nodes): Likewise.
4015 (switch_decision_tree::emit_case_nodes): Likewise.
4016 (conditional_probability): Remove.
4017 * tree-switch-conversion.h (enum cluster_type): New.
4019 (struct cluster): Likewise.
4020 (cluster::cluster): Likewise.
4021 (struct simple_cluster): Likewise.
4022 (simple_cluster::simple_cluster): Likewise.
4023 (struct group_cluster): Likewise.
4024 (struct jump_table_cluster): Likewise.
4025 (struct bit_test_cluster): Likewise.
4026 (struct min_cluster_item): Likewise.
4027 (struct case_tree_node): Likewise.
4028 (case_tree_node::case_tree_node): Likewise.
4029 (jump_table_cluster::case_values_threshold): Likewise.
4030 (struct case_bit_test): Likewise.
4031 (struct switch_decision_tree): Likewise.
4032 (struct switch_conversion): Likewise.
4033 (switch_decision_tree::reset_out_edges_aux): Likewise.
4035 2018-06-20 Martin Liska <mliska@suse.cz>
4037 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4038 (hoist_edge_and_branch_if_true): Likewise.
4039 (expand_switch_using_bit_tests_p): Likewise.
4040 (struct case_bit_test): Likewise.
4041 (case_bit_test_cmp): Likewise.
4042 (emit_case_bit_tests): Likewise.
4043 (switch_conversion::switch_conversion): New class.
4044 (struct switch_conv_info): Remove old struct.
4045 (collect_switch_conv_info): More to ...
4046 (switch_conversion::collect): ... this.
4047 (check_range): Likewise.
4048 (switch_conversion::check_range): Likewise.
4049 (check_all_empty_except_final): Likewise.
4050 (switch_conversion::check_all_empty_except_final): Likewise.
4051 (check_final_bb): Likewise.
4052 (switch_conversion::check_final_bb): Likewise.
4053 (create_temp_arrays): Likewise.
4054 (switch_conversion::create_temp_arrays): Likewise.
4055 (free_temp_arrays): Likewise.
4056 (gather_default_values): Likewise.
4057 (switch_conversion::gather_default_values): Likewise.
4058 (build_constructors): Likewise.
4059 (switch_conversion::build_constructors): Likewise.
4060 (constructor_contains_same_values_p): Likewise.
4061 (switch_conversion::contains_same_values_p): Likewise.
4062 (array_value_type): Likewise.
4063 (switch_conversion::array_value_type): Likewise.
4064 (build_one_array): Likewise.
4065 (switch_conversion::build_one_array): Likewise.
4066 (build_arrays): Likewise.
4067 (switch_conversion::build_arrays): Likewise.
4068 (gen_def_assigns): Likewise.
4069 (switch_conversion::gen_def_assigns): Likewise.
4070 (prune_bbs): Likewise.
4071 (switch_conversion::prune_bbs): Likewise.
4072 (fix_phi_nodes): Likewise.
4073 (switch_conversion::fix_phi_nodes): Likewise.
4074 (gen_inbound_check): Likewise.
4075 (switch_conversion::gen_inbound_check): Likewise.
4076 (process_switch): Use the newly created class.
4077 (switch_conversion::expand): New.
4078 (switch_conversion::~switch_conversion): New.
4079 * tree-switch-conversion.h: New file.
4081 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4083 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4084 tree-vect-patterns.c.
4085 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4086 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4087 (vect_recog_sad_pattern): Likewise.
4088 (vect_recog_widen_sum_pattern): Likewise.
4089 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4090 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4091 (vect_recog_rotate_pattern): Likewise.
4092 (vect_recog_mult_pattern): Likewise.
4093 (vect_recog_vector_vector_shift_pattern): Likewise.
4094 (vect_recog_divmod_pattern): Likewise.
4095 (vect_recog_mixed_size_cond_pattern): Likewise.
4096 (vect_recog_bool_pattern): Likewise.
4097 (vect_recog_mask_conversion_pattern): Likewise.
4098 (vect_try_gather_scatter_pattern): Likewise.
4099 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4100 (vect_recog_over_widening_pattern): Likewise.
4101 (vect_recog_gather_scatter_pattern): Likewise.
4102 (vect_recog_func_ptr): Move from tree-vectorizer.h
4103 (vect_vect_recog_func_ptrs): Move further down the file.
4104 (vect_recog_func): Likewise. Remove the third argument.
4105 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4106 (vect_pattern_recog_1): Expect the pattern function to do any
4107 necessary target tests. Also expect it to provide a vector type.
4108 Remove the type_in handling.
4110 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4112 * tree-vect-patterns.c (vect_pattern_detected): New function.
4113 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4114 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4115 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4116 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4117 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4118 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4119 (vect_recog_mask_conversion_pattern)
4120 (vect_try_gather_scatter_pattern): Likewise.
4122 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4124 * tree-vect-patterns.c (vect_get_internal_def): New function.
4125 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4126 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4127 (search_type_for_mask_1): Use it.
4129 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4131 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4132 redundant WIDEN_SUM_EXPR handling.
4133 (vect_recog_sad_pattern): Likewise.
4135 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4137 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4138 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4139 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4140 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4141 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4143 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4145 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4146 use the stmt_vec_info of the original bb statement for the
4147 new zero assignment, even if the call is part of a pattern.
4149 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4151 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4152 that the sequence is attached to the original statement rather
4153 than the pattern statement.
4154 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4155 PATTERN_DEF_SEQ from the original statement rather than
4156 the main pattern statement.
4157 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4158 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4159 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4161 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4163 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4164 definition statements before the early exit for statements that aren't
4166 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4168 (vect_transform_loop): ...here. Process pattern definition
4169 statements without first checking whether the main pattern
4170 statement is live or relevant.
4172 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4174 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4175 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4177 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4179 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4180 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4181 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4182 (expand_block_compare): Change select_block_compare_mode call.
4183 (expand_strncmp_align_check): Use new functions, fix comment.
4184 (emit_final_str_compare_gpr): New function.
4185 (expand_strn_compare): Refactor and clean up code.
4186 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4188 2018-06-19 Tony Reix <tony.reix@atos.com>
4189 Damien Bergamini <damien.bergamini@atos.com>
4190 David Edelsohn <dje.gcc@gmail.com>
4192 * collect2.c (static_obj): New variable.
4193 (static_libs): New variable.
4194 (is_in_list): Uncomment declaration.
4195 (main): Track AIX libraries linked statically.
4196 (is_in_list): Uncomment definition.
4197 (scan_prog_file): Don't add AIX shared libraries initializer
4198 to constructor list if linking statically.
4200 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4202 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4204 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4206 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4208 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4211 2018-06-19 Martin Liska <mliska@suse.cz>
4213 * config/i386/i386.c (ix86_can_inline_p): Do not use
4214 ipa_fn_summaries::get_create.
4215 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4217 (devirtualization_time_bonus): Likewise.
4218 (ipcp_propagate_stage): Likewise.
4219 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4220 (edge_set_predicate): Likewise.
4221 (evaluate_conditions_for_known_args): Likewise.
4222 (evaluate_properties_for_edge): Likewise.
4223 (ipa_call_summary::reset): Tranform to ...
4224 (ipa_call_summary::~ipa_call_summary): ... this.
4225 (ipa_fn_summary::reset): Transform to ...
4226 (ipa_fn_summary::~ipa_fn_summary): ... this.
4227 (ipa_fn_summary_t::remove): Rename to ...
4228 (ipa_fn_summary_t::remove_callees): ... this.
4229 (ipa_fn_summary_t::duplicate): Use placement new
4230 instead of memory copy.
4231 (ipa_call_summary_t::duplicate): Likewise.
4232 (ipa_call_summary_t::remove): Remove.
4233 (dump_ipa_call_summary): Change get_create to get.
4234 (ipa_dump_fn_summary): Dump only when summary exists.
4235 (analyze_function_body): Use symbol_summary::get instead
4237 (compute_fn_summary): Likewise.
4238 (estimate_edge_devirt_benefit): Likewise.
4239 (estimate_edge_size_and_time): Likewise.
4240 (inline_update_callee_summaries): Likewise.
4241 (remap_edge_change_prob): Likewise.
4242 (remap_edge_summaries): Likewise.
4243 (ipa_merge_fn_summary_after_inlining): Likewise.
4244 (write_ipa_call_summary): Likewise.
4245 (ipa_fn_summary_write): Likewise.
4246 (ipa_free_fn_summary): Likewise.
4247 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4248 (struct ipa_call_summary): Likewise.
4249 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4251 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4252 (estimate_size_after_inlining): Likewise.
4253 (estimate_growth): Likewise.
4254 (growth_likely_positive): Likewise.
4255 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4256 (inline_call): Likewise.
4257 * ipa-inline.c (caller_growth_limits): Likewise.
4258 (can_inline_edge_p): Likewise.
4259 (can_inline_edge_by_limits_p): Likewise.
4260 (compute_uninlined_call_time): Likewise.
4261 (compute_inlined_call_time): Likewise.
4262 (want_inline_small_function_p): Likewise.
4263 (edge_badness): Likewise.
4264 (update_caller_keys): Likewise.
4265 (update_callee_keys): Likewise.
4266 (inline_small_functions): Likewise.
4267 (inline_to_all_callers_1): Likewise.
4268 (dump_overall_stats): Likewise.
4269 (early_inline_small_functions): Likewise.
4270 (early_inliner): Likewise.
4271 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4272 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4273 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4274 * ipa-split.c (execute_split_functions): Likewise.
4275 * symbol-summary.h: Likewise.
4276 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4278 2018-06-19 Richard Biener <rguenther@suse.de>
4280 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4281 (vectorize_loops): ... here. Fix dbgcnt handling.
4282 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4284 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4287 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4288 ieee128 argument takes up only one (vector) register, not two (floating
4291 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4293 * gimplify.c (gimplify_init_constructor): Really never clear for an
4294 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4296 2018-06-19 Richard Biener <rguenther@suse.de>
4298 PR tree-optimization/86179
4299 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4300 after failed recognition.
4302 2018-06-18 Martin Sebor <msebor@redhat.com>
4305 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4306 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4307 Handle integer subtraction.
4308 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4309 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4311 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4313 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4314 param from rtx to rtx_insn *.
4315 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4317 (frv_ifcvt_modify_insn): Likwise.
4318 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4319 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4320 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4321 as_a <rtx_insn *> cast to local "unprotected_region" once
4322 it's been established that it's not NULL or pc_rtx.
4323 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4324 param "sethi" from rtx to rtx_insn *.
4325 (nds32_group_float_insns): Likewise for param "insn".
4326 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4328 (vax_output_int_subtract): Likewise.
4329 * config/vax/vax.c (vax_output_int_add): Likewise for param
4331 (vax_output_int_subtract): Likewise.
4332 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4333 (emit_pattern_after): Likewise for param "after".
4334 (emit_insn_after): Likewise.
4335 (emit_jump_insn_after): Likewise.
4336 (emit_call_insn_after): Likewise.
4337 (emit_debug_insn_after): Likewise.
4338 (emit_pattern_before): Likewise for param "before".
4339 (emit_insn_before): Likewise.
4340 (emit_jump_insn_before): Likewise.
4341 * final.c (get_insn_template): Likewise for param "insn", removing
4343 * output.h (get_insn_template): Likewise for 2nd param.
4344 * rtl.h (emit_insn_before): Likewise.
4345 (emit_jump_insn_before): Likewise.
4346 (emit_debug_insn_before_noloc): Likewise.
4347 (emit_insn_after): Likewise.
4348 (emit_jump_insn_after): Likewise.
4349 (emit_call_insn_after): Likewise.
4350 (emit_debug_insn_after): Likewise.
4351 (set_insn_deleted): Likewise for param.
4353 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4356 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4357 floating point modes, so that IFmode is numerically greater than
4358 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4359 to declare the ordering. This prevents IFmode from being
4360 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4361 machine. Include rs6000-modes.h to share the fractional values
4362 between genmodes* and the rest of the compiler.
4366 * config/rs6000/rs6000-modes.h: New file.
4367 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4368 meaning of rs6000_long_double_size so that 126..128 selects an
4369 appropriate 128-bit floating point type.
4370 (rs6000_option_override_internal): Likewise.
4371 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4372 (TARGET_LONG_DOUBLE_128): Change the meaning of
4373 rs6000_long_double_size so that 126..128 selects an appropriate
4374 128-bit floating point type.
4375 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4376 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4377 source and destination to match the standard usage.
4378 (truncifkf2): Likewise.
4379 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4380 ISA 2.07 to use an explicit clobber, instead of passing in a
4382 (copysign<mode>3_soft): Likewise.
4384 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4386 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4387 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4388 (vect_slp_analyze_instance_dependence): Likewise.
4389 (vect_enhance_data_refs_alignment): Likewise.
4390 (vect_analyze_data_refs_alignment): Likewise.
4391 (vect_slp_analyze_and_verify_instance_alignment
4392 (vect_analyze_data_ref_accesses): Likewise.
4393 (vect_prune_runtime_alias_test_list): Likewise.
4394 (vect_analyze_data_refs): Likewise.
4395 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4396 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4397 (vect_analyze_scalar_cycles_1): Likewise.
4398 (vect_get_loop_niters): Likewise.
4399 (vect_analyze_loop_form_1): Likewise.
4400 (vect_update_vf_for_slp): Likewise.
4401 (vect_analyze_loop_operations): Likewise.
4402 (vect_analyze_loop): Likewise.
4403 (vectorizable_induction): Likewise.
4404 (vect_transform_loop): Likewise.
4405 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4406 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4407 (vect_make_slp_decision): Likewise.
4408 (vect_detect_hybrid_slp): Likewise.
4409 (vect_slp_analyze_operations): Likewise.
4410 (vect_slp_bb): Likewise.
4411 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4412 (vectorizable_bswap): Likewise.
4413 (vectorizable_call): Likewise.
4414 (vectorizable_simd_clone_call): Likewise.
4415 (vectorizable_conversion): Likewise.
4416 (vectorizable_assignment): Likewise.
4417 (vectorizable_shift): Likewise.
4418 (vectorizable_operation): Likewise.
4419 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4421 2018-06-18 Martin Sebor <msebor@redhat.com>
4423 PR tree-optimization/81384
4424 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4425 * builtins.c (expand_builtin_strnlen): New function.
4426 (expand_builtin): Call it.
4427 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4428 * builtins.def (BUILT_IN_STRNLEN): New.
4429 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4430 Warn for bounds in excess of maximum object size.
4431 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4432 single-value ranges. Handle strnlen.
4433 (handle_builtin_strlen): Handle strnlen.
4434 (strlen_check_and_optimize_stmt): Same.
4435 * doc/extend.texi (Other Builtins): Document strnlen.
4437 2018-06-18 Maya Rashish <coypu@sdf.org>
4439 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4440 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4441 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4443 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4445 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4447 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4449 * tree.c (escaped_string::escape): Replace cast to char * by
4450 const_cast<char *> (unescaped).
4452 2018-06-18 Nick Clifton <nickc@redhat.com>
4455 * tree.c (escaped_string): New class. Converts an unescaped
4456 string into its escaped equivalent.
4457 (warn_deprecated_use): Use the new class to convert the
4458 deprecation message, if present.
4459 (test_escaped_strings): New self test.
4460 (test_c_tests): Add test_escaped_strings.
4461 * doc/extend.texi (deprecated): Add a note that the
4462 deprecation message is affected by the -fmessage-length
4463 option, and that control characters will be escaped.
4464 (#pragma GCC error): Document this pragma.
4465 (#pragma GCC warning): Likewise.
4466 * doc/invoke.texi (-fmessage-length): Document this option's
4467 effect on the #warning and #error preprocessor directives and
4468 the deprecated attribute.
4470 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4472 * tree.c (decl_value_expr_lookup): Revert latest change.
4473 (decl_value_expr_insert): Likewise.
4475 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4477 * gimplify.c (nonlocal_vlas): Delete.
4478 (nonlocal_vla_vars): Likewise.
4479 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4481 (gimplify_body): Do not create and destroy nonlocal_vlas.
4482 * tree-nested.c: Include diagnostic.h.
4483 (use_pointer_in_frame): Tweak.
4484 (lookup_field_for_decl): Add assertion and declare the transformation.
4485 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4486 internal error when the reference is in a wrong context. Do not
4487 create a debug decl by default.
4488 (note_nonlocal_block_vlas): Delete.
4489 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4490 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4491 create a debug decl by default.
4492 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4493 call is in a wrong context.
4494 (fixup_vla_decls): New function.
4495 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4496 debug variables were created.
4497 * tree.c (decl_value_expr_lookup): Add checking assertion.
4498 (decl_value_expr_insert): Likewise.
4500 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4503 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4504 * tree-scalar-evolution.c (interpret_expr): Likewise.
4505 (expression_expensive_p): Likewise.
4506 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4507 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4508 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4509 (ssa_defined_by_minus_one_stmt_p): New.
4511 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4514 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4515 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4516 * dojump.c (do_jump): Likewise.
4517 * expr.c (expand_expr_real_2): Check operand type's sign.
4518 * fold-const.c (const_unop): Handle ABSU_EXPR.
4519 (fold_abs_const): Likewise.
4520 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4521 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4522 (strip_sign_op_1): Likesise.
4523 * match.pd: Add new pattern to generate ABSU_EXPR.
4524 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4525 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4526 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4527 * tree-inline.c (estimate_operator_cost): Likewise.
4528 * tree-pretty-print.c (dump_generic_node): Likewise.
4529 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4530 * tree.def (ABSU_EXPR): New.
4532 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4535 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4536 documented as preserved for backward compatibility only.
4537 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4539 PR rtl-optimization/86108
4540 * bb-reorder.c (create_forwarder_block): Renamed to ...
4541 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4542 jump from new landing pad to the second part.
4543 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4546 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4549 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4550 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4551 Only call store_expr for halves if the mode is the same.
4554 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4555 Fix up comment formatting.
4557 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4559 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4560 (typed_splay_tree::closure,
4561 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4562 (typed_splay_tree::typed_splay_tree,
4563 typed_splay_tree::operator =): Declared private.
4564 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4565 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4566 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4567 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4568 typed_splay_tree::splay_tree_splay,
4569 typed_splay_tree::splay_tree_foreach_helper,
4570 typed_splay_tree::splay_tree_insert,
4571 typed_splay_tree::splay_tree_remove,
4572 typed_splay_tree::splay_tree_lookup,
4573 typed_splay_tree::splay_tree_predecessor,
4574 typed_splay_tree::splay_tree_successor,
4575 typed_splay_tree::splay_tree_min,
4576 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4577 (typed_splay_tree::root, typed_splay_tree::comp,
4578 typed_splay_tree::delete_key,
4579 typed_splay_tree::delete_value): New data members.
4580 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4581 typed_splay_tree::remove.
4583 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4585 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4586 -mginv and -mno-ginv to the assembler.
4587 * config/mips/mips.opt (-mcrc): New option.
4589 * doc/invoke.text (-mcrc): Document.
4592 2018-06-15 Nick Clifton <nickc@redhat.com>
4595 * tree.c (escaped_string): New class. Converts an unescaped
4596 string into its escaped equivalent.
4597 (warn_deprecated_use): Use the new class to convert the
4598 deprecation message, if present.
4599 (test_escaped_strings): New self test.
4600 (test_c_tests): Add test_escaped_strings.
4601 * doc/extend.texi (deprecated): Add a note that the
4602 deprecation message is affected by the -fmessage-length
4603 option, and that control characters will be escaped.
4604 (#pragma GCC error): Document this pragma.
4605 (#pragma GCC warning): Likewise.
4606 * doc/invoke.texi (-fmessage-length): Document this option's
4607 effect on the #warning and #error preprocessor directives and
4608 the deprecated attribute.
4610 2018-06-15 Richard Biener <rguenther@suse.de>
4612 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
4613 here, also noting vector size used.
4614 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
4615 size used in MSG_OPTIMIZED_LOCATIONS dump.
4616 (pass_slp_vectorize::execute): Adjust.
4618 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
4621 * config/arc/arc.c (arc_return_address_register): Fix
4624 2018-06-15 Richard Biener <rguenther@suse.de>
4627 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
4628 leave useless conversion stripping to force_gimple_operand_gsi.
4629 (gimplify_build2): Likewise.
4630 (gimplify_build1): Likewise.
4632 2018-06-15 Richard Biener <rguenther@suse.de>
4635 * tree-cfg.c (move_stmt_op): unshare invariant addresses
4636 before adjusting their block.
4638 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
4640 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
4641 multilibs for *-*-rtems*.
4642 * config/riscv/t-rtems: New file.
4644 2018-06-14 Jakub Jelinek <jakub@redhat.com>
4647 * match.pd ((A +- CST1) +- CST2): Punt if last resort
4648 unsigned_type_for returns NULL.
4651 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
4652 subregs of multi-word pseudos unless the float mode has word size.
4654 2018-06-14 Richard Biener <rguenther@suse.de>
4657 * tree-vect-generic.c (build_word_mode_vector_type): Remove
4658 duplicate and harmful type_hash_canon.
4659 * tree.c (type_hash_canon): Assert we didn't find ourselves.
4661 2018-06-14 Richard Biener <rguenther@suse.de>
4664 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
4667 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
4669 * config/rtems.h (STDINT_LONG32): Define.
4671 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
4672 Prachi Godbole <prachi.godbole@imgtec.com>
4674 * config/mips/mips-cpus.def: Define P6600.
4675 * config/mips/mips-tables.opt: Regenerate.
4676 * config/mips/mips.c (mips_ucbranch_type): New enum.
4677 (mips_rtx_cost_data): Add support for P6600.
4678 (mips_issue_rate): Likewise.
4679 (mips_multipass_dfa_lookahead): Likewise.
4680 (mips_avoid_hazard): Likewise.
4681 (mips_reorg_process_insns): Likewise.
4682 (mips_classify_branch_p6600): New function.
4683 * config/mips/mips.h (TUNE_P6600): New define.
4684 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
4685 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
4686 * config/mips/mips.md: Include p6600.md.
4687 (processor): Add p6600.
4688 * config/mips/p6600.md: New file.
4689 * doc/invoke.texi: Add p6600 to supported architectures.
4691 2018-06-13 Martin Sebor <msebor@redhat.com>
4693 PR tree-optimization/86114
4694 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
4696 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
4698 2018-06-13 Richard Biener <rguenther@suse.de>
4700 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
4701 Properly set vector type of the intermediate stmt.
4702 * tree-vect-stmts.c (vectorizable_operation): The destination
4703 var always has vectype_out type.
4705 2018-06-13 Jeff Law <law@redhat.com>
4707 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
4708 integer 0 for argument to print_rtl_with_bb.
4709 (rl78_reorg): Likewise.
4711 2018-06-13 David Malcolm <dmalcolm@redhat.com>
4713 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
4714 from rtx to rtx_insn *.
4715 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
4717 (add_sched_insns_for_speculation): Likewise for local "target",
4718 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4719 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
4720 from rtx_insn ** to rtx_code_label **.
4721 (reorg_emit_nops): Likewise.
4722 (c6x_reorg): Likewise for local "call_labels".
4723 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
4725 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
4726 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
4727 the loops over LABEL_REFS.
4728 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
4730 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
4731 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
4732 (split_branches): Strengthen local "olabel" from rtx to
4733 rtx_insn *, adding a safe_as_a cast.
4734 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
4736 (add_insn_after): Likewise for first two params.
4737 (add_insn_before): Likewise.
4738 (remove_insn): Likewise for param.
4739 (emit_pattern_before_noloc): Likewise for second and third params.
4740 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
4741 (emit_call_insn_before_noloc): Likewise.
4742 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
4744 (emit_barrier_before): Likewise.
4745 (emit_label_before): Strengthen "label" param from "rtx" to
4746 "rtx_code_label *". Strengthen "before" param from "rtx" to
4748 (emit_insn_after_1): Strengthen "after" param from "rtx" to
4750 (emit_pattern_after_noloc): Likewise.
4751 (emit_insn_after_noloc): Likewise.
4752 (emit_jump_insn_after_noloc): Likewise.
4753 (emit_call_insn_after_noloc): Likewise.
4754 (emit_debug_insn_after_noloc): Likewise.
4755 (emit_barrier_after): Likewise.
4756 (emit_label_after): Likewise for both params.
4757 (emit_pattern_after_setloc): Likewise for "after" param. Convert
4758 "loc" param from "int" to "location_t".
4759 (emit_insn_after_setloc): Likewise.
4760 (emit_jump_insn_after_setloc): Likewise.
4761 (emit_call_insn_after_setloc): Likewise.
4762 (emit_debug_insn_after_setloc): Likewise.
4763 (emit_pattern_before_setloc): Likewise for "before" param. Convert
4764 "loc" param from "int" to "location_t".
4765 (emit_pattern_before): Convert NULL_RTX to NULL.
4766 (emit_insn_before_setloc): Convert "loc" param from "int" to
4768 (emit_jump_insn_before_setloc): Likewise.
4769 (emit_call_insn_before_setloc): Likewise.
4770 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
4771 rtx_insn *. Convert "loc" param from "int" to "location_t".
4772 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
4773 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
4774 Convert 3rd param from "int" to "location_t".
4775 (emit_barrier_before, emit_barrier_after, next_real_insn):
4776 Strengthen param from rtx to rtx_insn *.
4777 (emit_label_before): Strengthen 1st param from "rtx" to
4778 "rtx_code_label *". Strengthen 2nd param from "rtx" to
4780 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
4781 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
4782 Strengthen 2nd param from "rtx" to "rtx_insn *".
4783 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
4784 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
4785 Likewise. Convert 3rd param from "int" to "location_t".
4786 (emit_label_after): Strengthen 1st param from "rtx" to
4788 (next_real_insn, remove_insn): Strengthen param from "rtx" to
4790 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
4791 from "rtx" to "rtx_insn *".
4793 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
4795 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
4796 bodies streamed in with -Q.
4797 * dumpfile.c (dump_files): Add lto-stream-out dump file.
4798 * dumpfile.h (tree_dump_index): Add lto_stream_out.
4799 * gimple-streamer-out.c: Include gimple-pretty-print.h
4800 (output_bb): Dump stmts streamed.
4801 * lto-section-out.c: Include print-tree.h
4802 (lto_begin_section): Dump sections created.
4803 (lto_output_decl_index): Dump decl encoded.
4804 * lto-streamer-out.c: Include print-tree.h
4805 (create_output_block): Dump output block created.
4806 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
4807 (output_function): Dump function output.
4808 (output_constructor): Dump constructor streamed.
4809 (write_global_stream): Output indexes encoded.
4810 (produce_asm_for_decls): Dump streams encoded.
4811 * lto-streamer.c (streamer_dump_file): New global var.
4812 * lto-streamer.h (streamer_dump_file): Declare.
4813 * passes.c (ipa_write_summaries): Initialize streamer dump.
4814 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
4817 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
4820 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
4821 offsets for register save directives. Emit a second batch of save
4822 directives, if need be, when the function accesses prior frames.
4824 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4826 * config/arc/fpu.md (fmasf4): Force operand to register.
4827 (fnmasf4): Likewise.
4829 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4831 * config/arc/arc-protos.h (arc_pad_return): Remove.
4832 * config/arc/arc.c (machine_function): Remove force_short_suffix
4834 (arc_print_operand): Adjust printing of '&'.
4835 (arc_verify_short): Remove conditional printing of short suffix.
4836 (arc_final_prescan_insn): Remove reference to size_reason.
4837 (pad_return): New function.
4838 (arc_reorg): Call pad_return.
4839 (arc_pad_return): Remove.
4840 (arc_init_machine_status): Remove reference to force_short_suffix.
4841 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
4842 (attr length): When attribute iscompact is true force to 2
4843 regardless; in the case of maybe check if we want to force the
4844 instruction to have 4 bytes length.
4845 (nopv): Change it to generate 4 byte long nop as well.
4846 (blockage): New pattern.
4847 (simple_return): Remove call to arc_pad_return.
4848 (p_return_i): Likewise.
4850 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4852 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
4854 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4856 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
4859 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4861 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
4862 for ARC700 and ARCv2.
4864 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
4867 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
4868 operands[2] instead of operands[1].
4871 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4873 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
4874 case, check whether the outer register overlaps an unallocatable
4875 register, not just whether it fits the required class.
4877 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
4879 * poly-int.h (can_div_trunc_p): Add new overload in which all values
4881 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
4882 (memrefs_conflict_p): Likewise.
4883 (init_alias_analysis): Likewise.
4884 * cfgexpand.c (expand_debug_expr): Likewise.
4885 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
4886 * cse.c (fold_rtx): Likewise.
4887 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
4888 * expr.c (emit_block_move_hints): Likewise.
4889 (clear_storage_hints, push_block, emit_push_insn): Likewise.
4890 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
4891 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
4892 (emit_group_store): Likewise.
4893 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
4894 to read the PRE/POST_MODIFY increment.
4895 * calls.c (store_one_arg): Use strip_offset.
4896 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
4898 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
4900 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
4901 (simplify_binary_operation_1): Extend CONST_INT handling to
4903 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
4904 than a HOST_WIDE_INT.
4905 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
4907 (adjust_mems, add_stores): Update accodingly.
4908 (vt_canonicalize_addr): Track polynomial offsets.
4909 (emit_note_insn_var_location): Likewise.
4910 (vt_add_function_parameter): Likewise.
4911 (vt_initialize): Likewise.
4913 2018-06-12 Jeff Law <law@redhat.com>
4915 * config.gcc (alpha*-*-freebsd*): Remove.
4916 * config/alpha/freebsd.h: Remove.
4918 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4921 * spellcheck-tree.c (levenshtein_distance): Rename to...
4922 (get_edit_distance): ...this, and update for underlying renaming.
4923 * spellcheck-tree.h (levenshtein_distance): Rename to...
4924 (get_edit_distance): ...this.
4925 * spellcheck.c (levenshtein_distance): Rename to...
4926 (get_edit_distance): ...this. Convert from Levenshtein distance
4927 to Damerau-Levenshtein distance by supporting transpositions of
4928 adjacent characters. Rename "v1" to "v_next" and "v0" to
4930 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
4931 (selftest::test_edit_distance_unit_test_oneway): ...this, and
4932 update for underlying renaming.
4933 (selftest::levenshtein_distance_unit_test): Rename to...
4934 (selftest::test_get_edit_distance_unit): ...this, and update for
4935 underlying renaming.
4936 (selftest::test_find_closest_string): Add example from PR 69968
4937 where transposition helps
4938 (selftest::test_metric_conditions): Update for renaming.
4939 (selftest::test_metric_conditions): Likewise.
4940 (selftest::spellcheck_c_tests): Likewise.
4941 * spellcheck.h (levenshtein_distance): Rename both overloads to...
4942 (get_edit_distance): ...this.
4943 (best_match::consider): Update for renaming.
4945 2018-06-12 Martin Sebor <msebor@redhat.com>
4947 PR tree-optimization/85259
4948 * builtins.c (compute_objsize): Handle constant offsets.
4949 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
4950 true iff a warning has been issued.
4951 * gimple.h (gimple_nonartificial_location): New function.
4952 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
4953 gimple_nonartificial_location and handle -Wno-system-headers.
4954 (handle_builtin_stxncpy): Same.
4956 2018-06-12 Martin Sebor <msebor@redhat.com>
4959 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
4961 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
4963 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4964 BUILTIN_VEC_XST entries for pointer to double and long long.
4966 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
4969 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4971 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
4974 2018-06-12 Martin Liska <mliska@suse.cz>
4976 * doc/options.texi: Document IntegerRange.
4978 2018-06-12 Martin Liska <mliska@suse.cz>
4980 * config/i386/i386.opt: Make MPX-related options as Deprecated.
4981 * opt-functions.awk: Handle Deprecated flag.
4982 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
4984 (read_cmdline_option): Report warning for a deprecated option.
4985 * opts.h (struct cl_option): Add new field cl_deprecated.
4986 (CL_ERR_DEPRECATED): New.
4988 2018-06-12 Martin Liska <mliska@suse.cz>
4990 * doc/options.texi: Document Deprecated option flag.
4992 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
4994 * config/arc/arc-arch.h (arc_extras): New enum.
4995 (arc_cpu_t):Add field extra.
4996 (arc_cpu_types): Consider the extras.
4997 * config/arc/arc-cpus.def: Add extras info.
4998 * config/arc/arc-opts.h (processor_type): Consider extra field.
4999 * config/arc/arc.c (arc_override_options): Handle extra field.
5001 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5003 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5004 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5006 * config/arc/arc.c (arc_init): Update pic warning.
5007 (irq_range): Update irq range parsing warnings.
5008 (arc_override_options): Update various warning messages.
5009 (arc_handle_aux_attribute): Likewise.
5011 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5013 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5015 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5017 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5018 compiler messages directives.
5020 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5022 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5023 * config/mips/mips-tables.opt: Regenerate.
5024 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5026 * doc/invoke.texi: Document -march=i6500.
5028 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5030 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5031 (i6400_gpmul): Add cpu_unit.
5032 (i6400_gpdiv): Likewise.
5033 (i6400_msa_add_d): Update reservations.
5034 (i6400_msa_int_add) Likewise.
5035 (i6400_msa_short_logic3) Likewise.
5036 (i6400_msa_short_logic2) Likewise.
5037 (i6400_msa_short_logic) Likewise.
5038 (i6400_msa_move) Likewise.
5039 (i6400_msa_cmp) Likewise.
5040 (i6400_msa_short_float2) Likewise.
5041 (i6400_msa_div_d) Likewise.
5042 (i6400_msa_long_logic1) Likewise.
5043 (i6400_msa_long_logic2) Likewise.
5044 (i6400_msa_mult) Likewise.
5045 (i6400_msa_long_float2) Likewise.
5046 (i6400_msa_long_float4) Likewise.
5047 (i6400_msa_long_float5) Likewise.
5048 (i6400_msa_long_float8) Likewise.
5049 (i6400_fpu_fadd): Include frint type.
5050 (i6400_fpu_store): New define_insn_reservation.
5051 (i6400_fpu_load): Likewise.
5052 (i6400_fpu_move): Likewise.
5053 (i6400_fpu_fcmp): Likewise.
5054 (i6400_fpu_fmadd): Likewise.
5055 (i6400_int_mult): Include imul3nc type and update reservation.
5056 (i6400_int_div): Include idiv3 type and update reservation.
5057 (i6400_int_load): Update to check type not move_type.
5058 (i6400_int_store): Likewise.
5059 (i6400_int_prefetch): Set zero latency.
5061 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5063 * gcc.c: Document new %@{...} sequence.
5064 (LINK_COMMAND_SPEC): Use it for the -L switches.
5065 (cpp_unique_options): Use it for the -I switches.
5066 (at_file_argbuf): New global variable.
5067 (in_at_file): Likewise.
5068 (alloc_args): Create at_file_argbuf.
5069 (clear_args): Truncate at_file_argbuf.
5070 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5071 (open_at_file): New function.
5072 (close_at_file): Likewise.
5073 (create_at_file): Delete.
5074 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5077 (validate_switches_from_spec): Deal with %@{...} sequence.
5078 (validate_switches): Likewise.
5079 (driver::finalize): Call clear_args.
5081 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5083 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5085 2018-06-11 Martin Sebor <msebor@redhat.com>
5087 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5088 (Wno-class-memaccess): Add @opindex.
5089 (Wno-templates, Wno-multiple-inheritance): Same.
5090 (Wno-virtual-inheritance, Wno-namespaces): Same.
5091 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5092 (Wno-format-overflow, Wno-format-truncation): Same.
5093 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5094 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5095 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5096 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5097 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5098 (Wno-misspelled-isr): Same.
5100 2018-06-11 Martin Sebor <msebor@redhat.com>
5102 * PR tree-optimization/86083
5103 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5105 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5107 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5109 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5112 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5113 on the correct operand.
5114 (*movdi_internal64): Ditto.
5116 2018-06-11 Martin Liska <mliska@suse.cz>
5118 PR tree-optimization/86089
5119 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5121 2018-06-11 Julia Koval <julia.koval@intel.com>
5123 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5124 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5125 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5127 2018-06-11 Olivier Hainque <hainque@adacore.com>
5129 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5130 for Ada with strict dwarf2.
5132 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5135 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5138 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5140 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5142 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5144 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5147 2018-06-08 Martin Liska <mliska@suse.cz>
5149 * tree-cfg.h (debug_function): Fix argument type to match
5152 2018-06-08 Martin Liska <mliska@suse.cz>
5154 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5155 Remove usage of MPX-related (and removed) fields.
5156 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5158 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5160 * cfg.c (debug): Use TDF_NONE rather than 0.
5161 * cfghooks.c (debug): Likewise.
5162 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5163 (struct dump_option_value_info): Convert to...
5164 (struct kv_pair): ...this template type.
5165 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5167 (optinfo_verbosity_options): Likewise.
5168 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5170 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5171 than int for "optgroup_flags" param.
5172 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5174 (dump_dec): Likewise.
5175 (dump_finish): Use TDF_NONE rather than 0.
5176 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5177 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5178 than 0. Update for change to option_ptr.
5179 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5180 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5181 0. Update for changes to optinfo_verbosity_options and
5183 (opt_info_switch_p): Convert optgroup_flags from int to
5185 (dump_basic_block): Use dump_flags_t rather than int
5186 for "dump_kind" param.
5187 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5188 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5189 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5190 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5191 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5192 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5193 TDF_NONE): Convert from macros to...
5194 (enum dump_flag): ...this new enum.
5195 (dump_flags_t): Update to use enum.
5196 (operator|, operator&, operator~, operator|=, operator&=):
5197 Implement for dump_flags_t.
5198 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5199 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5200 Convert from macros to...
5201 (enum optgroup_flag): ...this new enum.
5202 (optgroup_flags_t): New typedef.
5203 (operator|, operator|=): Implement for optgroup_flags_t.
5204 (struct dump_file_info): Convert field "alt_flags" to
5205 dump_flags_t. Convert field "optgroup_flags" to
5207 (dump_basic_block): Use dump_flags_t rather than int for param.
5208 (dump_generic_expr_loc): Likewise.
5209 (dump_dec): Likewise.
5210 (dump_register): Convert param "optgroup_flags" to
5212 (opt_info_enable_passes): Likewise.
5213 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5215 * gimple-pretty-print.c (debug): Likewise.
5216 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5217 (merged_store_group::apply_stores): Likewise.
5218 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5219 * gimple.c (verify_gimple_pp): Likewise.
5220 * graphite-poly.c (print_pbb_body): Likewise.
5221 * passes.c (pass_manager::register_one_dump_file): Convert
5222 local "optgroup_flags" to optgroup_flags_t.
5223 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5225 (debug_body): Likewise.
5226 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5227 to optgroup_flags_t.
5228 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5230 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5231 (convert_mult_to_fma): Likewise.
5232 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5233 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5234 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5235 "dump_kind" to dump_flags_t.
5237 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5239 * config/rs6000/rs6000.c (min, max): Delete.
5241 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5243 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5244 -mabi=spe and -mabi=no-spe.
5246 2018-06-08 Martin Liska <mliska@suse.cz>
5248 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5249 where we expect an existing summary.
5251 2018-06-08 Martin Liska <mliska@suse.cz>
5253 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5254 * ipa-inline.h (estimate_edge_growth): Likewise.
5256 2018-06-08 Martin Liska <mliska@suse.cz>
5258 * cgraph.c (function_version_hasher::hash): Use
5259 cgraph_node::get_uid ().
5260 (function_version_hasher::equal):
5261 * cgraph.h (cgraph_node::get_uid): New method.
5262 * ipa-inline.c (update_caller_keys): Use
5263 cgraph_node::get_uid ().
5264 (update_callee_keys): Likewise.
5265 * ipa-utils.c (searchc): Likewise.
5266 (ipa_reduced_postorder): Likewise.
5267 * lto-cgraph.c (input_node): Likewise.
5268 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5269 * symbol-summary.h (symtab_insertion): Likewise.
5270 (symtab_removal): Likewise.
5271 (symtab_duplication): Likewise.
5272 * tree-pretty-print.c (dump_function_header): Likewise.
5273 * tree-sra.c (convert_callers_for_node): Likewise.
5275 2018-06-08 Martin Liska <mliska@suse.cz>
5277 * cgraph.c (symbol_table::create_edge): Always assign a new
5279 (symbol_table::free_edge): Do not recycle numbers.
5280 * cgraph.h (cgraph_edge::get): New method.
5281 * symbol-summary.h (symtab_removal): Use it.
5282 (symtab_duplication): Likewise.
5283 (call_summary::hashable_uid): Remove.
5285 2018-06-08 Martin Liska <mliska@suse.cz>
5287 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5288 (initialize_growth_caches): Remove.
5289 (free_growth_caches): Likewise.
5290 (do_estimate_edge_time): Use edge_growth_cache.
5291 (do_estimate_edge_size): Likewise.
5292 (do_estimate_edge_hints): Likewise.
5293 * ipa-inline.c (reset_edge_caches): Likewise.
5294 (recursive_inlining): Likewise.
5295 (inline_small_functions): Likewise.
5296 * ipa-inline.h (initialize_growth_caches): Remove.
5297 (estimate_edge_size): Likewise.
5298 (estimate_edge_time): Likewise.
5299 (estimate_edge_hints): Likewise.
5300 (reset_edge_growth_cache): Likewise.
5301 * symbol-summary.h (call_summary::remove): New method.
5303 2018-06-08 Martin Liska <mliska@suse.cz>
5305 * ipa-cp.c (class edge_clone_summary): New summary.
5306 (grow_edge_clone_vectors): Remove.
5307 (ipcp_edge_duplication_hook): Remove.
5308 (class edge_clone_summary_t): New call_summary class.
5309 (ipcp_edge_removal_hook): Remove.
5310 (edge_clone_summary_t::duplicate): New function.
5311 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5312 (create_specialized_node): Likewise.
5313 (ipcp_driver): Initialize edge_clone_summaries and do not
5316 2018-06-08 Martin Liska <mliska@suse.cz>
5318 * symbol-summary.h (get): New function.
5319 (call_summary::m_initialize_when_cloning): New class member.
5321 2018-06-08 Martin Liska <mliska@suse.cz>
5323 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5324 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5325 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5326 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5327 (remove_cgraph_node_from_order): Use the removed_nodes set.
5328 (do_per_function_toporder): Likwise.
5329 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5330 instead of summary_uid.
5331 (symtab_removal): Likewise.
5332 (symtab_duplication): Likewise.
5334 2018-06-08 Martin Liska <mliska@suse.cz>
5336 * ipa-cp.c (ipcp_store_bits_results): Use
5337 ipcp_transformation_sum.
5338 (ipcp_store_vr_results): Likewise.
5339 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5341 (ipcp_transformation_initialize): ... this.
5342 (ipa_set_node_agg_value_chain):
5343 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5344 (write_ipcp_transformation_info): Likewise.
5345 (read_ipcp_transformation_info): Likewise.
5346 (ipcp_update_bits): Likewise.
5347 (ipcp_update_vr): Likewise.
5348 (ipcp_transform_function): Likewise.
5349 * ipa-prop.h: Rename ipcp_transformation_summary to
5350 ipcp_transformation.
5351 (class ipcp_transformation_t): New function summary.
5352 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5353 (ipa_get_agg_replacements_for_node): Likewise.
5355 2018-06-08 Martin Liska <mliska@suse.cz>
5357 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5359 (class funct_state_summary_t): New function_summary class.
5360 (has_function_state): Remove.
5361 (get_function_state): Likewise.
5362 (set_function_state): Likewise.
5363 (add_new_function): Likewise.
5364 (funct_state_summary_t::insert): New function.
5365 (duplicate_node_data): Remove.
5366 (remove_node_data): Remove.
5367 (funct_state_summary_t::duplicate): New function.
5368 (register_hooks): Create new funct_state_summaries.
5369 (pure_const_generate_summary): Use it.
5370 (pure_const_write_summary): Likewise.
5371 (pure_const_read_summary): Likewise.
5372 (propagate_pure_const): Likewise.
5373 (propagate_nothrow): Likewise.
5374 (dump_malloc_lattice): Likewise.
5375 (propagate_malloc): Likewise.
5376 (execute): Do not register hooks, just remove summary
5378 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5381 2018-06-08 Martin Liska <mliska@suse.cz>
5383 * ipa-reference.c (remove_node_data): Remove.
5384 (duplicate_node_data): Likewise.
5385 (class ipa_ref_var_info_summary_t): New class.
5386 (class ipa_ref_opt_summary_t): Likewise.
5387 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5388 (get_reference_optimization_summary): Use
5389 ipa_ref_opt_sum_summaries.
5390 (set_reference_vars_info): Remove.
5391 (set_reference_optimization_summary): Likewise.
5392 (ipa_init): Create summaries.
5393 (init_function_info): Use function summary.
5394 (ipa_ref_opt_summary_t::duplicate): New function.
5395 (ipa_ref_opt_summary_t::remove): New function.
5396 (get_read_write_all_from_node): Fix GNU coding style.
5397 (propagate): Use function summary.
5398 (write_node_summary_p): Fix GNU coding style.
5399 (stream_out_bitmap): Likewise.
5400 (ipa_reference_read_optimization_summary): Use function summary.
5401 (ipa_reference_c_finalize): Do not release hooks.
5403 2018-06-08 Martin Liska <mliska@suse.cz>
5405 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5406 (analyze_function_body): Extract multiple calls of get_create.
5407 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5408 * ipa-inline.c (recursive_inlining): Use ::get method.
5409 * ipa-inline.h (estimate_edge_growth): Likewise.
5411 2018-06-08 Martin Liska <mliska@suse.cz>
5413 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5415 (hsa_function_summary::hsa_function_summary): Use the new enum
5417 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5418 * hsa-gen.c (hsa_get_host_function): Likewise.
5419 (get_brig_function_name): Likewise.
5420 * ipa-hsa.c (process_hsa_functions): Likewise.
5421 (ipa_hsa_write_summary): Likewise.
5422 * symbol-summary.h (symtab_duplication): Use ::get function/
5423 (get): New function.
5425 2018-06-08 Martin Liska <mliska@suse.cz>
5427 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5429 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5430 (hsa_register_kernel): Likewise.
5431 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5432 * hsa-gen.c (hsa_get_host_function): Likewise.
5433 (get_brig_function_name): Likewise.
5434 (generate_hsa): Likewise.
5435 (pass_gen_hsail::execute): Likewise.
5436 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5437 (devirtualization_time_bonus): Likewise.
5438 (ipcp_propagate_stage): Likewise.
5439 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5440 (edge_set_predicate): Likewise.
5441 (evaluate_conditions_for_known_args): Likewise.
5442 (evaluate_properties_for_edge): Likewise.
5443 (ipa_fn_summary::reset): Likewise.
5444 (ipa_fn_summary_t::duplicate): Likewise.
5445 (dump_ipa_call_summary): Likewise.
5446 (ipa_dump_fn_summary): Likewise.
5447 (analyze_function_body): Likewise.
5448 (compute_fn_summary): Likewise.
5449 (estimate_edge_devirt_benefit): Likewise.
5450 (estimate_edge_size_and_time): Likewise.
5451 (estimate_calls_size_and_time): Likewise.
5452 (estimate_node_size_and_time): Likewise.
5453 (inline_update_callee_summaries): Likewise.
5454 (remap_edge_change_prob): Likewise.
5455 (remap_edge_summaries): Likewise.
5456 (ipa_merge_fn_summary_after_inlining): Likewise.
5457 (ipa_update_overall_fn_summary): Likewise.
5458 (read_ipa_call_summary): Likewise.
5459 (inline_read_section): Likewise.
5460 (write_ipa_call_summary): Likewise.
5461 (ipa_fn_summary_write): Likewise.
5462 (ipa_free_fn_summary): Likewise.
5463 * ipa-hsa.c (process_hsa_functions): Likewise.
5464 (ipa_hsa_write_summary): Likewise.
5465 (ipa_hsa_read_section): Likewise.
5466 * ipa-icf.c (sem_function::merge): Likewise.
5467 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5468 (do_estimate_edge_time): Likewise.
5469 (estimate_size_after_inlining): Likewise.
5470 (estimate_growth): Likewise.
5471 (growth_likely_positive): Likewise.
5472 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5473 (inline_call): Likewise.
5474 * ipa-inline.c (caller_growth_limits): Likewise.
5475 (can_inline_edge_p): Likewise.
5476 (can_inline_edge_by_limits_p): Likewise.
5477 (compute_uninlined_call_time): Likewise.
5478 (compute_inlined_call_time): Likewise.
5479 (want_inline_small_function_p): Likewise.
5480 (edge_badness): Likewise.
5481 (update_caller_keys): Likewise.
5482 (update_callee_keys): Likewise.
5483 (recursive_inlining): Likewise.
5484 (inline_small_functions): Likewise.
5485 (inline_to_all_callers_1): Likewise.
5486 (dump_overall_stats): Likewise.
5487 (early_inline_small_functions): Likewise.
5488 (early_inliner): Likewise.
5489 * ipa-inline.h (estimate_edge_growth): Likewise.
5490 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5491 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5492 * ipa-prop.h (IPA_NODE_REF): Likewise.
5493 (IPA_EDGE_REF): Likewise.
5494 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5495 (propagate_malloc): Likewise.
5496 * ipa-split.c (execute_split_functions): Likewise.
5497 * symbol-summary.h: Rename get to get_create.
5499 (get_create): Likewise.
5500 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5502 2018-06-08 Martin Liska <mliska@suse.cz>
5504 * symbol-summary.h (release): Move definition out of class
5506 (symtab_removal): Likewise.
5507 (symtab_duplication): Likewise.
5509 2018-06-08 Martin Liska <mliska@suse.cz>
5511 * symbol-summary.h (function_summary): Move constructor
5512 implementation out of class declaration.
5513 (release): Likewise.
5514 (symtab_insertion): Likewise.
5515 (symtab_removal): Likewise.
5516 (symtab_duplication): Likewise.
5519 2018-06-08 Martin Liska <mliska@suse.cz>
5521 * Makefile.in: Remove support for MPX (macros, related functions,
5522 fields in cgraph_node, ...).
5523 * builtin-types.def (BT_BND): Likewise.
5524 (BT_FN_BND_CONST_PTR): Likewise.
5525 (BT_FN_CONST_PTR_BND): Likewise.
5526 (BT_FN_VOID_PTR_BND): Likewise.
5527 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5528 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5529 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5530 (expand_builtin_mempcpy_with_bounds): Likewise.
5531 (expand_builtin_memset_with_bounds): Likewise.
5532 (expand_builtin_memset_args): Likewise.
5533 (std_expand_builtin_va_start): Likewise.
5534 (expand_builtin): Likewise.
5535 (expand_builtin_with_bounds): Likewise.
5536 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5537 (DEF_LIB_BUILTIN_CHKP): Likewise.
5538 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5539 (DEF_CHKP_BUILTIN): Likewise.
5540 (BUILT_IN_MEMCPY): Likewise.
5541 (BUILT_IN_MEMMOVE): Likewise.
5542 (BUILT_IN_MEMPCPY): Likewise.
5543 (BUILT_IN_MEMSET): Likewise.
5544 (BUILT_IN_STPCPY): Likewise.
5545 (BUILT_IN_STRCAT): Likewise.
5546 (BUILT_IN_STRCHR): Likewise.
5547 (BUILT_IN_STRCPY): Likewise.
5548 (BUILT_IN_STRLEN): Likewise.
5549 (BUILT_IN_MEMCPY_CHK): Likewise.
5550 (BUILT_IN_MEMMOVE_CHK): Likewise.
5551 (BUILT_IN_MEMPCPY_CHK): Likewise.
5552 (BUILT_IN_MEMSET_CHK): Likewise.
5553 (BUILT_IN_STPCPY_CHK): Likewise.
5554 (BUILT_IN_STRCAT_CHK): Likewise.
5555 (BUILT_IN_STRCPY_CHK): Likewise.
5556 * calls.c (store_bounds): Likewise.
5557 (emit_call_1): Likewise.
5558 (special_function_p): Likewise.
5559 (maybe_warn_nonstring_arg): Likewise.
5560 (initialize_argument_information): Likewise.
5561 (finalize_must_preallocate): Likewise.
5562 (compute_argument_addresses): Likewise.
5563 (expand_call): Likewise.
5564 * cfgexpand.c (expand_call_stmt): Likewise.
5565 (expand_return): Likewise.
5566 (expand_gimple_stmt_1): Likewise.
5567 (pass_expand::execute): Likewise.
5568 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5569 (cgraph_node::remove): Likewise.
5570 (cgraph_node::dump): Likewise.
5571 (cgraph_node::verify_node): Likewise.
5572 * cgraph.h (chkp_function_instrumented_p): Likewise.
5573 (symtab_node::get_alias_target): Likewise.
5574 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5575 (cgraph_local_p): Likewise.
5576 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5577 (cgraph_edge::rebuild_references): Likewise.
5578 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5579 (walk_polymorphic_call_targets): Likewise.
5580 (cgraph_node::expand_thunk): Likewise.
5581 (symbol_table::output_weakrefs): Likewise.
5582 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5583 (ix86_handle_option): Likewise.
5584 * config/i386/constraints.md: Likewise.
5585 * config/i386/i386-builtin-types.def (BND): Likewise.
5589 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5590 (BDESC_FIRST): Likewise.
5592 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5593 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5594 * config/i386/i386.c (enum reg_class): Likewise.
5595 (ix86_target_string): Likewise.
5596 (ix86_option_override_internal): Likewise.
5597 (ix86_conditional_register_usage): Likewise.
5598 (ix86_valid_target_attribute_inner_p): Likewise.
5599 (ix86_set_indirect_branch_type): Likewise.
5600 (ix86_set_current_function): Likewise.
5601 (ix86_function_arg_regno_p): Likewise.
5602 (init_cumulative_args): Likewise.
5603 (ix86_function_arg_advance): Likewise.
5604 (ix86_function_arg): Likewise.
5605 (ix86_pass_by_reference): Likewise.
5606 (ix86_function_value_regno_p): Likewise.
5607 (ix86_function_value_1): Likewise.
5608 (ix86_function_value_bounds): Likewise.
5609 (ix86_return_in_memory): Likewise.
5610 (ix86_setup_incoming_vararg_bounds): Likewise.
5611 (ix86_va_start): Likewise.
5612 (indirect_thunk_need_prefix): Likewise.
5613 (print_reg): Likewise.
5614 (ix86_print_operand): Likewise.
5615 (ix86_expand_call): Likewise.
5616 (ix86_output_function_return): Likewise.
5617 (reg_encoded_number): Likewise.
5618 (BDESC_VERIFYS): Likewise.
5619 (ix86_init_mpx_builtins): Likewise.
5620 (ix86_init_builtins): Likewise.
5621 (ix86_emit_cmove): Likewise.
5622 (ix86_emit_move_max): Likewise.
5623 (ix86_expand_builtin): Likewise.
5624 (ix86_builtin_mpx_function): Likewise.
5625 (ix86_get_arg_address_for_bt): Likewise.
5626 (ix86_load_bounds): Likewise.
5627 (ix86_store_bounds): Likewise.
5628 (ix86_load_returned_bounds): Likewise.
5629 (ix86_store_returned_bounds): Likewise.
5630 (ix86_class_likely_spilled_p): Likewise.
5631 (ix86_hard_regno_mode_ok): Likewise.
5632 (x86_order_regs_for_local_alloc): Likewise.
5633 (ix86_mitigate_rop): Likewise.
5634 (ix86_bnd_prefixed_insn_p): Likewise.
5635 (ix86_mpx_bound_mode): Likewise.
5636 (ix86_make_bounds_constant): Likewise.
5637 (ix86_initialize_bounds): Likewise.
5638 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
5639 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
5640 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
5641 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
5642 (TARGET_CHKP_BOUND_MODE): Likewise.
5643 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
5644 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
5645 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
5646 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
5647 * config/i386/i386.h (TARGET_MPX): Likewise.
5648 (TARGET_MPX_P): Likewise.
5649 (VALID_BND_REG_MODE): Likewise.
5650 (FIRST_BND_REG): Likewise.
5651 (LAST_BND_REG): Likewise.
5652 (enum reg_class): Likewise.
5653 (BND_REG_P): Likewise.
5654 (BND_REGNO_P): Likewise.
5655 (BNDmode): Likewise.
5656 (ADJUST_INSN_LENGTH): Likewise.
5657 * config/i386/i386.md: Likewise.
5658 * config/i386/i386.opt: Likewise.
5659 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
5660 (defined): Likewise.
5661 (LINK_MPX): Likewise.
5662 (MPX_SPEC): Likewise.
5663 (LIBMPX_SPEC): Likewise.
5664 (LIBMPXWRAPPERS_SPEC): Likewise.
5665 (CHKP_SPEC): Likewise.
5666 * config/i386/predicates.md: Likewise.
5667 * dbxout.c (dbxout_type): Likewise.
5668 * doc/extend.texi: Likewise.
5669 * doc/invoke.texi: Likewise.
5670 * doc/md.texi: Likewise.
5671 * doc/tm.texi: Likewise.
5672 * doc/tm.texi.in: Likewise.
5673 * dwarf2out.c (is_base_type): Likewise.
5674 (gen_formal_types_die): Likewise.
5675 (gen_subprogram_die): Likewise.
5676 (gen_type_die_with_usage): Likewise.
5677 (gen_decl_die): Likewise.
5678 (dwarf2out_late_global_decl): Likewise.
5679 * expr.c (expand_assignment): Likewise.
5680 (emit_storent_insn): Likewise.
5681 (store_expr_with_bounds): Likewise.
5682 (store_expr): Likewise.
5683 (expand_expr_real_1): Likewise.
5684 * expr.h (store_expr_with_bounds): Likewise.
5685 * function.c (use_register_for_decl): Likewise.
5686 (struct bounds_parm_data): Likewise.
5687 (assign_parms_augmented_arg_list): Likewise.
5688 (assign_parm_find_entry_rtl): Likewise.
5689 (assign_parm_is_stack_parm): Likewise.
5690 (assign_parm_load_bounds): Likewise.
5691 (assign_bounds): Likewise.
5692 (assign_parms): Likewise.
5693 (expand_function_start): Likewise.
5694 * gcc.c (CHKP_SPEC): Likewise.
5695 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
5696 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
5697 (wrestrict_dom_walker::check_call): Likewise.
5698 * gimple.c (gimple_build_call_from_tree): Likewise.
5699 * gimple.h (enum gf_mask): Likewise.
5700 (gimple_call_with_bounds_p): Likewise.
5701 (gimple_call_set_with_bounds): Likewise.
5702 * gimplify.c (gimplify_init_constructor): Likewise.
5703 * ipa-cp.c (initialize_node_lattices): Likewise.
5704 (propagate_constants_across_call): Likewise.
5705 (find_more_scalar_values_for_callers_subset): Likewise.
5706 * ipa-hsa.c (process_hsa_functions): Likewise.
5707 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
5708 * ipa-icf.c (sem_function::merge): Likewise.
5709 * ipa-inline.c (early_inliner): Likewise.
5710 * ipa-pure-const.c (warn_function_noreturn): Likewise.
5711 (warn_function_cold): Likewise.
5712 (propagate_pure_const): Likewise.
5713 * ipa-ref.h (enum GTY): Likewise.
5714 * ipa-split.c (find_retbnd): Likewise.
5715 (consider_split): Likewise.
5716 (split_function): Likewise.
5717 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5718 * ipa.c (walk_polymorphic_call_targets): Likewise.
5719 (symbol_table::remove_unreachable_nodes): Likewise.
5720 (process_references): Likewise.
5721 (cgraph_build_static_cdtor_1): Likewise.
5722 * lto-cgraph.c (lto_output_node): Likewise.
5723 (output_refs): Likewise.
5724 (compute_ltrans_boundary): Likewise.
5725 (input_overwrite_node): Likewise.
5726 (input_node): Likewise.
5727 (input_cgraph_1): Likewise.
5728 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
5729 * passes.c (pass_manager::execute_early_local_passes): Likewise.
5730 (class pass_chkp_instrumentation_passes): Likewise.
5731 (make_pass_chkp_instrumentation_passes): Likewise.
5732 * passes.def: Likewise.
5733 * rtl.h (struct GTY): Likewise.
5734 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
5735 * stor-layout.c (layout_type): Likewise.
5736 * symtab.c: Likewise.
5737 * target.def: Likewise.
5738 * targhooks.c (default_chkp_bound_type): Likewise.
5739 (default_chkp_bound_mode): Likewise.
5740 (default_builtin_chkp_function): Likewise.
5741 (default_chkp_function_value_bounds): Likewise.
5742 (default_chkp_make_bounds_constant): Likewise.
5743 (default_chkp_initialize_bounds): Likewise.
5744 * targhooks.h (default_chkp_bound_type): Likewise.
5745 (default_chkp_bound_mode): Likewise.
5746 (default_builtin_chkp_function): Likewise.
5747 (default_chkp_function_value_bounds): Likewise.
5748 (default_chkp_make_bounds_constant): Likewise.
5749 (default_chkp_initialize_bounds): Likewise.
5750 * toplev.c (compile_file): Likewise.
5751 (process_options): Likewise.
5752 * tree-core.h (DEF_BUILTIN): Likewise.
5753 (DEF_BUILTIN_CHKP): Likewise.
5754 * tree-inline.c (declare_return_variable): Likewise.
5755 (remap_gimple_stmt): Likewise.
5756 (copy_bb): Likewise.
5757 (initialize_inlined_parameters): Likewise.
5758 (expand_call_inline): Likewise.
5759 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
5760 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
5761 (make_pass_ipa_chkp_produce_thunks): Likewise.
5762 (make_pass_chkp): Likewise.
5763 (make_pass_chkp_opt): Likewise.
5764 (make_pass_chkp_instrumentation_passes): Likewise.
5765 * tree-pretty-print.c (dump_generic_node): Likewise.
5766 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
5767 * tree-ssa-dce.c (propagate_necessity): Likewise.
5768 (eliminate_unnecessary_stmts): Likewise.
5769 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
5770 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5771 * tree-ssa-sccvn.h: Likewise.
5772 * tree-ssa-strlen.c (get_string_length): Likewise.
5773 (valid_builtin_call): Likewise.
5774 (adjust_last_stmt): Likewise.
5775 (handle_builtin_strchr): Likewise.
5776 (handle_builtin_strcpy): Likewise.
5777 (handle_builtin_stxncpy): Likewise.
5778 (handle_builtin_memcpy): Likewise.
5779 (handle_builtin_strcat): Likewise.
5780 (strlen_check_and_optimize_stmt): Likewise.
5781 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
5782 * tree-streamer-in.c: Likewise.
5783 * tree-streamer.c (record_common_node): Likewise.
5784 * tree.c (tree_code_size): Likewise.
5785 (wide_int_to_tree_1): Likewise.
5786 (type_contains_placeholder_1): Likewise.
5787 (build_common_tree_nodes): Likewise.
5788 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
5789 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
5790 (POINTER_BOUNDS_P): Likewise.
5791 (BOUNDED_TYPE_P): Likewise.
5792 (BOUNDED_P): Likewise.
5793 (CALL_WITH_BOUNDS_P): Likewise.
5794 (pointer_bounds_type_node): Likewise.
5795 * value-prof.c (gimple_ic): Likewise.
5796 * var-tracking.c (vt_add_function_parameters): Likewise.
5797 * varasm.c (make_decl_rtl): Likewise.
5798 (assemble_start_function): Likewise.
5799 (output_constant): Likewise.
5800 (maybe_assemble_visibility): Likewise.
5801 * varpool.c (ctor_for_folding): Likewise.
5802 * chkp-builtins.def: Remove.
5803 * ipa-chkp.c: Remove.
5804 * ipa-chkp.h: Remove.
5805 * rtl-chkp.c: Remove.
5806 * rtl-chkp.h: Remove.
5807 * tree-chkp-opt.c: Remove.
5808 * tree-chkp.c: Remove.
5809 * tree-chkp.h: Remove.
5811 2018-06-07 Carl Love <cel@us.ibm.com>
5813 * config/rs6000/vsx.md (vextract_fp_from_shorth,
5814 vextract_fp_from_shortl): Add BE support.
5816 2018-06-07 Paul Koning <ni1d@arrl.net>
5818 * compare-elim.c (try_merge_compare): Don't merge compare if
5819 address contains a side effect.
5820 (try_eliminate_compare): Likewise.
5822 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
5824 * config.gcc: Support "tremont".
5825 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
5826 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5828 * config/i386/i386.c (m_TREMONT): Define.
5829 (processor_target_table): Add "tremont".
5830 (PTA_TREMONT): Define.
5831 (ix86_lea_outperforms): Add TARGET_TREMONT.
5832 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
5833 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
5834 and M_INTEL_GOLDMONT_PLUS.
5835 (fold_builtin_cpu): Add "tremont".
5836 (ix86_add_stmt_cost): Add TARGET_TREMONT.
5837 (ix86_option_override_internal): Add "tremont".
5838 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
5839 (processor_type): Add PROCESSOR_TREMONT.
5840 * config/i386/x86-tune.def: Add m_TREMONT.
5841 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
5843 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5845 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
5846 symbol defined for msp430i* devices to be lower case.
5848 2018-06-07 Richard Biener <rguenther@suse.de>
5850 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
5851 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
5852 Properly wrap signed arithmetic if overflow wraps.
5854 2018-06-07 Jakub Jelinek <jakub@redhat.com>
5856 PR tree-optimization/69615
5857 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
5858 of a cast from a same precision integral SSA_NAME in a bb dominated
5859 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
5860 cast to utype if rhs2 has already a compatible type.
5862 2018-06-07 Richard Biener <rguenther@suse.de>
5864 PR tree-optimization/85935
5865 * graphite-scop-detection.c (find_params_in_bb): Analyze
5866 condition operands with respect to the correct loop. Assert
5867 the analysis doesn't fail.
5869 2018-06-04 Carl Love <cel@us.ibm.com>
5871 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
5872 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
5873 as it is slightly cheaper.
5874 (first_match_or_eos_index_<mode>):
5875 Calculate index using natural element order.
5876 (first_match_index_<mode>):
5877 Calculate index using natural element order.
5878 (first_match_or_eos_index_<mode>):
5879 Calculate index using natural order.
5880 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
5881 for BE and LE modes.
5882 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
5883 P9V_BUILTIN_VCLZLSBB_V16QI.
5884 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
5887 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5889 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
5890 indentation and line wrap for many prototypes. Add missing
5891 @smallexample directives around block of prototypes for vec_xl and
5894 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
5896 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
5897 track if we pass or return IEEE 128-bit floating point.
5898 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
5899 C++ mangling that is compatible with GCC 8.1.
5900 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
5901 (init_cumulative_args): Note if we pass or return IEEE 128-bit
5902 floating point types.
5903 (rs6000_function_arg_advance_1): Likewise.
5904 (rs6000_mangle_type): Optionally generate mangled names that match
5905 what GCC 8.1 generated for IEEE 128-bit floating point types.
5906 (rs6000_globalize_decl_name): If we have an external function that
5907 passes or returns IEEE 128-bit types, generate a weak reference
5908 from the mangled name used in GCC 8.1 to the current mangled
5910 (rs6000_init_builtins): Make __ibm128 use the long double type if
5911 long double is IBM extended double. Make __float128 use the long
5912 double type if long double is IEEE 128-bit.
5915 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
5916 macro for __ibm128 built-in functions.
5917 (PACK_IF): Add __ibm128 pack/unpack functions.
5918 (UNPACK_IF): Likewise.
5919 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
5920 enable long double built-in functions if long double is IEEE
5921 128-bit floating point.
5922 (rs6000_invalid_builtin): Update long double built-in function
5924 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
5925 functions, adjust the built-in function to use the long double
5926 built-in function if __ibm128 and long double are the same type.
5927 * doc/extend.texi (PowerPC builtins): Update documention for
5928 __builtin_{,un}pack_longdouble. Add documentation for
5929 __builtin_{,un}pack_ibm128.
5931 2018-06-06 Jim Wilson <jimw@sifive.com>
5933 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
5934 (struct machine_function): New field interrupt_mode.
5935 (riscv_handle_type_attribute): New function. Add forward declaration.
5936 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
5937 (riscv_expand_epilogue): Check interrupt_mode field.
5938 (riscv_set_current_function): Check interrupt attribute args and
5939 set interrupt_mode field.
5940 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
5941 (riscv_sret, riscv_uret): New.
5942 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
5943 new arguments to interrupt attribute.
5945 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
5948 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
5949 Don't handle -mcpu=power8 if -mpower9-vector is also used.
5951 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
5953 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
5954 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
5955 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5956 several redundant entries.
5958 2018-06-06 David Malcolm <dmalcolm@redhat.com>
5960 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
5961 type from "rtx" to "rtx_insn *".
5962 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
5963 for local "call_insn", removing cast.
5964 (ix86_expand_call): Likewise, introducing a "call_insn" local.
5966 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
5968 PR tree-optimization/86066
5969 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
5970 for BIT_INSERT_EXPR stores.
5972 2018-06-06 Richard Biener <rguenther@suse.de>
5974 PR tree-optimization/86062
5975 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5976 component refs ontop
5977 of to be offsetted base.
5979 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5981 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
5982 to be static and remove check on interrupt attribute name.
5984 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
5986 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
5987 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
5989 2018-06-05 Steve Ellcey <sellcey@cavium.com>
5992 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
5994 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
5995 Remove second argument, change how error is called.
5996 (aarch64_layout_arg): Remove second argument from
5997 aarch64_err_no_fpadvsimd call.
5998 (aarch64_init_cumulative_args): Ditto.
5999 (aarch64_gimplify_va_arg_expr): Ditto.
6000 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6002 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6004 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6005 (*simple_return_indirect_internal<mode>): Rename from
6006 simple_return_indirect_internal. Use W mode iterator.
6007 (rstorssp): New expander.
6008 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6009 (clrssbsy): New expander.
6010 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6012 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6014 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6016 (cmse_check_pointed_object): Likewise.
6018 2018-06-05 Martin Liska <mliska@suse.cz>
6020 PR gcov-profile/47618
6021 * doc/invoke.texi: Document how -fprofile-dir format
6024 2018-06-05 Richard Biener <rguenther@suse.de>
6026 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6027 removal pretend DOM info isn't available so we do not update
6028 it and only remove edges, not dominated blocks. Actually free
6029 DOM info in case we removed something. Remove unreachable blocks.
6030 (mfb_keep_latches): Work with either DOM info or marked backedges.
6031 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6032 first. Mark backedges if DOM info isn't available.
6033 (Re-)compute DOM info after cleanup_control_flow_pre.
6035 2018-06-05 Richard Biener <rguenther@suse.de>
6037 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6038 (locus_discrim_hasher::hash): Adjust.
6039 (locus_discrim_hasher::equal): Likewise.
6040 (next_discriminator_for_locus): Work on line directly.
6041 (same_line_p): Pass in expanded locus1 as well.
6042 (assign_discriminators): Avoid redundant location expansions.
6044 2018-06-05 Richard Biener <rguenther@suse.de>
6046 PR tree-optimization/86046
6047 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6048 if required after clearing TREE_ADDRESSABLE.
6050 2018-06-05 Richard Biener <rguenther@suse.de>
6052 PR tree-optimization/86047
6053 * tree-ssa-loop.c (for_each_index): Glob handling of all
6054 decls and constants and really handle all of them.
6056 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6059 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6060 qualifier_void_pointer and qualifier_const_void_pointer.
6061 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6062 (arm_init_builtins): Handle the above.
6063 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6064 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6065 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6068 2018-06-05 Martin Liska <mliska@suse.cz>
6070 * auto-profile.c (read_autofdo_file): Do not use
6071 gcov_ctr_summary struct.
6072 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6073 * coverage.c (struct counts_entry): Likewise.
6074 (read_counts_file): Read just single summary entry.
6075 (get_coverage_counts): Use gcov_summary struct.
6076 * coverage.h (get_coverage_counts): Likewise.
6077 * gcov-dump.c (dump_working_sets): Likewise.
6078 (tag_summary): Dump just single summary.
6079 * gcov-io.c (gcov_write_summary): Write just histogram
6081 (gcov_read_summary): Read just single summary.
6082 (compute_working_sets): Use gcov_summary struct.
6083 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6084 of GCOV_COUNTERS_SUMMABLE.
6085 (GCOV_COUNTERS_SUMMABLE): Remove.
6086 (GCOV_FIRST_VALUE_COUNTER): Replace with
6087 GCOV_COUNTER_V_INTERVAL.
6088 (struct gcov_ctr_summary): Remove.
6089 (struct gcov_summary): Directly use fields of former
6091 (compute_working_sets): Use gcov_summary struct.
6092 * gcov.c (read_count_file): Do not use ctrs fields.
6093 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6095 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6097 * profile.c: Likewise.
6098 * profile.h: Likewise.
6100 2018-06-05 Martin Liska <mliska@suse.cz>
6102 PR gcov-profile/84846
6103 * gcov.c (output_lines): Print working directory only
6104 in intermediate format.
6106 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6108 * config/s390/s390-builtin-types.def: Add void function type.
6109 * config/s390/s390-builtins.def: Use the function type for the
6112 2018-06-04 Jim Wilson <jimw@sifive.com>
6114 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6116 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6117 and maybe_eh_return. Change regno to unsigned int. Use new args to
6118 handle EH_RETURN_DATA_REGNO registers properly.
6119 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6120 (riscv_expand_epilogue): Update comment. Change argument name and
6121 type. Update code to use new name and type. Pass new args to
6122 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6124 * config/riscv/riscv.md (NORMAL_RETURN): New.
6125 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6126 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6127 (eh_return): Call gen_eh_return_internal and emit barrier.
6128 (eh_return_internal): Call riscv_expand_epilogue.
6130 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6132 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6133 bit_insertion field and declare can_be_merged_into method.
6134 (merged_store_group::can_be_merged_into): New method.
6135 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6136 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6137 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6139 2018-06-04 Richard Biener <rguenther@suse.de>
6141 PR tree-optimization/85955
6142 * builtins.c (fold_builtin_sincos): Convert pointers to
6143 destination to appropriate type before dereferencing.
6145 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6147 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6149 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6151 * expr.c (expand_expr_real_1): Force the operand into memory if
6152 its TYPE_MODE is BLKmode and if there is no integer mode for
6153 the number of bits being extracted.
6155 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6159 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6160 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6162 2018-06-04 Richard Biener <rguenther@suse.de>
6164 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6165 (cleanup_tree_cfg_noloop): ... single caller. Do
6166 start_recording_case_labels later.
6168 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6170 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6171 to _IMMINTRIN_H_INCLUDED.
6172 * config/i386/pconfigintrin.h: Ditto.
6173 * config/i386/waitpkgintrin.h: Ditto.
6174 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6175 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6176 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6177 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6178 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6179 waitpkgintrin.h and cldemoteintrin.h.
6181 2018-06-04 Richard Biener <rguenther@suse.de>
6183 PR tree-optimization/86038
6184 * tracer.c (find_best_successor): Check probability for
6185 being initialized, bail out if not.
6187 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6190 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6191 of bits to ignore when comparing architectures.
6193 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6195 PR tree-optimization/69615
6196 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6197 maximum or minimum of the type, try to merge it also as if
6198 range1 is + [-, x - 1] or + [x + 1, -].
6201 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6203 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6205 PR tree-optimization/86034
6206 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6207 the unsigned bitfield type in a bit insertion sequence if it does not
6208 have a larger precision than the bitfield size.
6209 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6211 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6213 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6215 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6217 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6218 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6219 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6220 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6222 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6224 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6225 Disable -fdelete-null-pointer-checks for ELF toolchain.
6227 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6228 Kito Cheng <kito.cheng@gmail.com>
6230 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6231 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6232 (nds32*-*-*): Add glibc and uclibc conditions.
6233 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6234 (TARGET_EXCEPT_UNWIND_INFO): Define.
6235 * config/nds32/elf.h: New file.
6236 * config/nds32/linux.h: New file.
6237 * config/nds32/nds32-elf.opt: New file.
6238 * config/nds32/nds32-linux.opt: New file.
6239 * config/nds32/nds32-fp-as-gp.c
6240 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6241 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6243 (nds32_asm_file_end): Ditto.
6244 (nds32_print_operand): Ditto.
6245 (nds32_insert_attributes): Ditto.
6246 (nds32_init_libfuncs): New function.
6247 (TARGET_HAVE_TLS): Define.
6248 (TARGET_INIT_LIBFUNCS): Define.
6249 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6251 (TARGET_ELF): Apply different mcmodel setting.
6252 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6253 been migrated into elf.h and linux.h files.
6254 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6255 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6256 (mcmodel): The content has been migrated into nds32-elf.opt and
6257 nds32-linux.opt files.
6258 * config/nds32/t-elf: New file.
6259 * config/nds32/t-linux: New file.
6261 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6262 Shiva Chen <shiva0217@gmail.com>
6264 * config/nds32/constants.md (unspec_volatile_element): Add
6265 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6266 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6268 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6269 (make_pass_nds32_fp_as_gp): Declare.
6270 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6272 (nds32_asm_function_end_prologue): Remove unused asm output.
6273 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6274 (nds32_asm_file_start): Output necessary fp_as_gp information.
6275 (nds32_option_override): Adjust register usage.
6276 (nds32_expand_prologue): Consider fp_as_gp situation.
6277 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6278 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6281 (simple_return): Ditto.
6282 (omit_fp_begin): Output special directive for fp_as_gp.
6283 (omit_fp_end): Output special directive for fp_as_gp.
6284 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6285 mforbid-fp-as-gp): New options.
6287 2018-06-01 Mark Wielaard <mark@klomp.org>
6289 * dwarf2out.c (dwarf2out_finish): Remove generation of
6290 DW_AT_loclists_base.
6292 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6294 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6295 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6296 (struct merged_store_group): Add bit_insertion field.
6297 (dump_char_array): Use standard hexadecimal format.
6298 (merged_store_group::merged_store_group): Set bit_insertion to false.
6299 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6300 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6301 also print the mask in the dump file.
6302 (pass_store_merging::gate): Minor tweak.
6303 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6304 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6305 stores with INTEGER_CST stores.
6306 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6307 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6308 and use it throughout. Generate bit insertion sequences if need be.
6309 (pass_store_merging::process_store): Remove redundant condition.
6310 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6312 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6314 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6315 the 128-bit floating point types. Fix function comment.
6317 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6319 * config/aarch64/aarch64-simd.md
6320 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6322 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6325 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6327 PR tree-optimization/85989
6328 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6330 (backprop::intersect_uses): Check it when deciding whether this
6331 is a backedge reference.
6332 (backprop::process_block): Add each phi to m_visited_phis
6333 after visiting it, then clear it at the end.
6335 2018-06-01 Richard Biener <rguenther@suse.de>
6337 * tree-vectorizer.h (vect_dr_stmt): New function.
6338 (vect_get_load_cost): Adjust.
6339 (vect_get_store_cost): Likewise.
6340 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6341 Use vect_dr_stmt instead of DR_SMTT.
6342 (vect_record_base_alignments): Likewise.
6343 (vect_calculate_target_alignment): Likewise.
6344 (vect_compute_data_ref_alignment): Likewise and make static.
6345 (vect_update_misalignment_for_peel): Likewise.
6346 (vect_verify_datarefs_alignment): Likewise.
6347 (vector_alignment_reachable_p): Likewise.
6348 (vect_get_data_access_cost): Likewise. Pass down
6349 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6350 (vect_get_peeling_costs_all_drs): Likewise.
6351 (vect_peeling_hash_get_lowest_cost): Likewise.
6352 (vect_enhance_data_refs_alignment): Likewise.
6353 (vect_find_same_alignment_drs): Likewise.
6354 (vect_analyze_data_refs_alignment): Likewise.
6355 (vect_analyze_group_access_1): Likewise.
6356 (vect_analyze_group_access): Likewise.
6357 (vect_analyze_data_ref_access): Likewise.
6358 (vect_analyze_data_ref_accesses): Likewise.
6359 (vect_vfa_segment_size): Likewise.
6360 (vect_small_gap_p): Likewise.
6361 (vectorizable_with_step_bound_p): Likewise.
6362 (vect_prune_runtime_alias_test_list): Likewise.
6363 (vect_analyze_data_refs): Likewise.
6364 (vect_supportable_dr_alignment): Likewise.
6365 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6366 (vect_gen_prolog_loop_niters): Likewise.
6367 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6368 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6370 (vect_recog_mask_conversion_pattern): Likewise.
6371 (vect_try_gather_scatter_pattern): Likewise.
6372 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6373 to vect_get_store_cost.
6374 (vect_get_store_cost): Get stmt_info instead of DR.
6375 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6376 (vect_get_load_cost): Get stmt_info instead of DR.
6378 2018-06-01 Richard Biener <rguenther@suse.de>
6381 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6382 vars wrapped in MEM_REFs.
6384 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6386 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6387 Fix subreg tests so that we only return a choice between
6388 GENERAL_REGS and FP_REGS if the original classes included both.
6390 2018-06-01 Richard Biener <rguenther@suse.de>
6393 * tree-ssa-structalias.c (get_function_part_constraint):
6394 Handle NULL fi->decl.
6395 (find_func_aliases_for_call): Properly handle indirect
6396 fi from direct call.
6397 (find_func_clobbers): Likewise.
6398 (ipa_pta_execute): Likewise.
6399 (create_variable_info_for): For functions that are ifunc_resolver
6400 resolve to a varinfo that contains the result of the resolver call.
6401 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6404 2018-05-31 Michael Collison <michael.collison@arm.com>
6406 * config/aarch64/aarch64.md:
6407 (*fix_to_zero_extenddfdi2): New pattern.
6408 * gcc.target/aarch64/fix_extend1.c: New testcase.
6410 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6414 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6415 and BUILT_IN_STRNCMP_EQ.
6416 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6417 BUILT_IN_STRNCMP_EQ.
6418 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6419 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6420 (gimple_fold_builtin): Likewise.
6421 * tree-ssa-strlen.c (compute_string_length): New function.
6422 (determine_min_obsize): New function.
6423 (handle_builtin_string_cmp): New function to handle calls to
6424 string compare functions.
6425 (strlen_optimize_stmt): Add handling to builtin string compare
6427 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6428 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6429 * tree.c (build_common_builtin_nodes): Add new defines of
6430 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6432 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6435 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6436 functions with naked attribute.
6438 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6440 * config/i386/sse.md (avx_vec_concat<mode>):
6441 Substitute concat_tg_mode mode attribute with xtg_mode.
6442 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6443 (concat_tg_mode): Remove mode attribute.
6445 2018-05-31 Martin Sebor <msebor@redhat.com>
6448 * calls.c (alloc_max_size): Correct a logic error/typo.
6449 Treat excessive arguments as infinite. Warn for invalid arguments.
6450 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6452 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6455 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6456 and movx for Haswell.
6458 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6459 Cesar Philippidis <cesar@codesourcery.com>
6462 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6463 when emitting error on private/firstprivate reductions.
6464 * omp-low.c (lower_omp_target): Avoid reference-type processing
6465 on pointers for firstprivate clause.
6467 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6469 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6472 * config/aarch64/aarch64-simd.md
6473 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6474 (aarch64_ld1_x3_<mode>): Likewise
6475 (aarch64_st1x2<VALLDIF:mode>): Likewise
6476 (aarch64_st1_x2_<mode>): Likewise
6477 (aarch64_st1x3<VALLDIF:mode>): Likewise
6478 (aarch64_st1_x3_<mode>): Likewise
6479 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6480 (vld1_s8_x3): Likewise.
6481 (vld1_u16_x3): Likewise.
6482 (vld1_s16_x3): Likewise.
6483 (vld1_u32_x3): Likewise.
6484 (vld1_s32_x3): Likewise.
6485 (vld1_u64_x3): Likewise.
6486 (vld1_s64_x3): Likewise.
6487 (vld1_f16_x3): Likewise.
6488 (vld1_f32_x3): Likewise.
6489 (vld1_f64_x3): Likewise.
6490 (vld1_p8_x3): Likewise.
6491 (vld1_p16_x3): Likewise.
6492 (vld1_p64_x3): Likewise.
6493 (vld1q_u8_x3): Likewise.
6494 (vld1q_s8_x3): Likewise.
6495 (vld1q_u16_x3): Likewise.
6496 (vld1q_s16_x3): Likewise.
6497 (vld1q_u32_x3): Likewise.
6498 (vld1q_s32_x3): Likewise.
6499 (vld1q_u64_x3): Likewise.
6500 (vld1q_s64_x3): Likewise.
6501 (vld1q_f16_x3): Likewise.
6502 (vld1q_f32_x3): Likewise.
6503 (vld1q_f64_x3): Likewise.
6504 (vld1q_p8_x3): Likewise.
6505 (vld1q_p16_x3): Likewise.
6506 (vld1q_p64_x3): Likewise.
6507 (vst1_s64_x2): Likewise.
6508 (vst1_u64_x2): Likewise.
6509 (vst1_f64_x2): Likewise.
6510 (vst1_s8_x2): Likewise.
6511 (vst1_p8_x2): Likewise.
6512 (vst1_s16_x2): Likewise.
6513 (vst1_p16_x2): Likewise.
6514 (vst1_s32_x2): Likewise.
6515 (vst1_u8_x2): Likewise.
6516 (vst1_u16_x2): Likewise.
6517 (vst1_u32_x2): Likewise.
6518 (vst1_f16_x2): Likewise.
6519 (vst1_f32_x2): Likewise.
6520 (vst1_p64_x2): Likewise.
6521 (vst1q_s8_x2): Likewise.
6522 (vst1q_p8_x2): Likewise.
6523 (vst1q_s16_x2): Likewise.
6524 (vst1q_p16_x2): Likewise.
6525 (vst1q_s32_x2): Likewise.
6526 (vst1q_s64_x2): Likewise.
6527 (vst1q_u8_x2): Likewise.
6528 (vst1q_u16_x2): Likewise.
6529 (vst1q_u32_x2): Likewise.
6530 (vst1q_u64_x2): Likewise.
6531 (vst1q_f16_x2): Likewise.
6532 (vst1q_f32_x2): Likewise.
6533 (vst1q_f64_x2): Likewise.
6534 (vst1q_p64_x2): Likewise.
6535 (vst1_s64_x3): Likewise.
6536 (vst1_u64_x3): Likewise.
6537 (vst1_f64_x3): Likewise.
6538 (vst1_s8_x3): Likewise.
6539 (vst1_p8_x3): Likewise.
6540 (vst1_s16_x3): Likewise.
6541 (vst1_p16_x3): Likewise.
6542 (vst1_s32_x3): Likewise.
6543 (vst1_u8_x3): Likewise.
6544 (vst1_u16_x3): Likewise.
6545 (vst1_u32_x3): Likewise.
6546 (vst1_f16_x3): Likewise.
6547 (vst1_f32_x3): Likewise.
6548 (vst1_p64_x3): Likewise.
6549 (vst1q_s8_x3): Likewise.
6550 (vst1q_p8_x3): Likewise.
6551 (vst1q_s16_x3): Likewise.
6552 (vst1q_p16_x3): Likewise.
6553 (vst1q_s32_x3): Likewise.
6554 (vst1q_s64_x3): Likewise.
6555 (vst1q_u8_x3): Likewise.
6556 (vst1q_u16_x3): Likewise.
6557 (vst1q_u32_x3): Likewise.
6558 (vst1q_u64_x3): Likewise.
6559 (vst1q_f16_x3): Likewise.
6560 (vst1q_f32_x3): Likewise.
6561 (vst1q_f64_x3): Likewise.
6562 (vst1q_p64_x3): Likewise.
6564 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6566 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6567 user_label_prefix to name.
6569 * tree-core.h: Update comment about the format of NAME string
6570 passed to handler in attribute_spec.
6572 * config/msp430/msp430.md: Remove erroneous subreg expression from
6573 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6574 zero_extend{q,h}isi2.
6576 2018-05-30 Borislav Petkov <bp@suse.de>
6578 * doc/extend.texi: Document some architecture specific
6579 constraints and sort entries.
6581 2018-05-30 Martin Sebor <msebor@redhat.com>
6584 * builtins.c (expand_builtin_stpcpy_1): New function.
6585 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6586 only if the former succeeds.
6588 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6590 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6593 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6595 * doc/invoke.texi (-flinker-output): Document
6597 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6599 * passes.c (ipa_write_summaries): Only modify statements if body
6601 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6602 incrementally linking.
6603 (ipa_passes): Likewise.
6604 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6605 pass down resolution info.
6606 * common.opt (flag_incremental_link): Update info.
6607 * gcc.c (plugin specs): Turn flinker-output=* to
6608 -plugin-opt=-linker-output-known
6609 * toplev.c (compile_file): Also cut compilation when doing incremental
6611 * flag-types. (enum lto_partition_model): Add
6612 LTO_LINKER_OUTPUT_NOLTOREL.
6613 (invoke.texi): Add -flinker-output docs.
6614 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
6615 link same way as WPA; do not stream in dead initializers.
6617 * dwarf2out.c (dwarf2out_die_ref_for_decl,
6618 darf2out_register_external_decl): Support incremental link.
6620 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6622 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
6624 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6626 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
6627 it down to simple_object_copy_lto_debug_sections.
6628 (run_gcc): Determine incremental LTO link time and configure
6629 lto1 into non-wpa mode, disable renaming of debug sections.
6631 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
6633 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6634 descriptions of various incorrectly documented functions.
6636 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
6639 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
6640 address check not strict.
6642 2018-05-30 Richard Biener <rguenther@suse.de>
6644 PR tree-optimization/85964
6645 * tracer.c (better_p): Drop initialized count check, we only
6646 call the function with initialized counts now.
6647 (find_best_successor): Do find a best edge if one
6648 has uninitialized count.
6649 (find_best_predecessor): Likewise. Do BB frequency check only
6650 if count is initialized.
6652 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
6654 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
6655 (aarch64_ldrstr_offset_compare): New.
6656 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
6657 load/store orderings.
6658 (aarch64_gen_adjusted_ldpstp): Likewise.
6660 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
6662 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6663 Check for subset of GENERAL_REGS and FP_REGS.
6664 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
6667 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
6669 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
6670 and wi::to_poly_offset. Add the current offset and then check
6671 whether the sum fits, rather than using an unchecked addition of
6672 a checked term. Check for a shwi rather than a uhwi.
6673 * expr.c (get_bit_range): Use tree_to_poly_uint64.
6674 (store_constructor): Use poly_int_tree_p.
6675 (expand_expr_real_1): Likewise.
6676 * function.c (assign_temp): Likewise.
6677 * fold-const.c (const_binop): Use poly_int_tree_p and
6679 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
6681 * ipa-icf-gimple.c (func_checker::compare_operand): Use
6682 to_poly_offset for MEM offsets.
6683 * ipa-icf.c (sem_variable::equals): Likewise.
6684 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
6685 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
6686 wi::to_poly_offset for BIT_FIELD_REF offsets.
6687 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
6689 * var-tracking.c (emit_note_insn_var_location): Use
6690 tree_to_poly_uint64.
6692 2018-05-29 Jim Wilson <jimw@sifive.com>
6694 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
6696 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
6699 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
6700 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
6702 (sse4_1_round<mode>2): Use nonimmediate_operand
6703 for operand 1 predicate.
6705 2018-05-29 Martin Sebor <msebor@redhat.com>
6706 Richard Biener <rguenther@suse.de>
6709 * calls.c (get_size_range): Call determine_value_range instead
6710 of get_value_range..
6711 * tree-vrp.h (determine_value_range): Declared new function.
6712 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
6714 2018-05-29 Richard Biener <rguenther@suse.de>
6716 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
6717 sure to use non-pattern stmts for get_earlier_stmt arguments.
6718 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
6719 called on pattern stmts.
6720 (get_later_stmt): Likewise.
6722 2018-05-29 Martin Liska <mliska@suse.cz>
6724 PR gcov-profile/85759
6725 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
6728 2018-05-29 Jakub Jelinek <jakub@redhat.com>
6730 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
6732 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
6736 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6737 VEC_PACK_FLOAT_EXPR): New tree codes.
6738 * tree-pretty-print.c (op_code_prio): Handle
6739 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6740 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6741 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6742 * tree-inline.c (estimate_operator_cost): Likewise.
6743 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
6744 * fold-const.c (const_binop): Likewise.
6745 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
6746 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
6747 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6748 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
6749 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
6750 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
6751 * expr.c (expand_expr_real_2): Likewise.
6752 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
6753 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
6754 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
6756 * optabs.c (expand_widen_pattern_expr): For
6757 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
6758 sign from result type rather than operand's type.
6759 (expand_binop_directly): For vec_packu_float_optab and
6760 vec_packs_float_optab allow result type to be different from operand's
6762 * optabs-tree.c (optab_for_tree_code): Handle
6763 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6764 VEC_PACK_FLOAT_EXPR. Formatting fixes.
6765 * tree-vect-generic.c (expand_vector_operations_1): Handle
6766 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
6767 VEC_PACK_FLOAT_EXPR.
6768 * tree-vect-stmts.c (supportable_widening_operation): Handle
6770 (supportable_narrowing_operation): Handle FLOAT_EXPR.
6771 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
6772 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
6773 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
6774 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
6776 (vec_pack<floatprefix>_float_<mode>): New expander.
6777 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
6779 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
6780 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
6781 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
6782 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
6783 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
6785 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
6786 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
6787 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
6788 VEC_PACK_FLOAT_EXPR): Document.
6790 2018-05-29 Richard Biener <rguenther@suse.de>
6792 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
6794 (stmt_vec_info_vec): Make pointer.
6795 (init_stmt_vec_info_vec): Remove.
6796 (free_stmt_vec_info_vec): Likewise.
6797 (set_stmt_vec_info_vec): New function.
6798 (free_stmt_vec_infos): Likewise.
6799 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
6800 (set_vinfo_for_stmt): Likewise.
6801 (get_earlier_stmt): Likewise.
6802 (get_later_stmt): Likewise.
6803 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
6804 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
6805 (vec_info::~vec_info): Free stmt_vec_infos.
6806 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
6807 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
6808 (pass_slp_vectorize::execute): Likewise.
6809 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
6810 (free_stmt_vec_info_vec): Likewise.
6811 (set_stmt_vec_info_vec): New function.
6812 (free_stmt_vec_infos): Likewise.
6813 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
6814 the global stmt_vec_info_vec.
6815 * tree-parloops.c (gather_scalar_reductions): Use
6816 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
6819 2018-05-29 Richard Biener <rguenther@suse.de>
6821 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
6823 2018-05-29 Martin Liska <mliska@suse.cz>
6824 David Malcolm <dmalcolm@redhat.com>
6826 * vec.c (test_reverse): New.
6827 (vec_c_tests): Add new test.
6828 * vec.h (vl_ptr>::reverse): New function.
6830 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
6832 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
6834 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
6837 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
6839 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
6841 2018-05-28 Richard Biener <rguenther@suse.de>
6843 PR tree-optimization/85933
6844 * tree-vect-data-refs.c (vect_record_base_alignments): Only
6845 look at stmts marked as vectorizable.
6847 2018-05-28 Richard Biener <rguenther@suse.de>
6849 PR tree-optimization/85934
6850 * tree-vect-generic.c (expand_vector_operations_1): Hoist
6851 vector boolean check before scalar optimization.
6853 2018-05-28 Jakub Jelinek <jakub@redhat.com>
6855 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
6858 2018-05-28 Mark Wielaard <mark@klomp.org>
6860 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
6861 if it is an expression containing a minus sign.
6863 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
6865 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
6867 2018-05-27 Paul Koning <ni1d@arrl.net>
6869 * config/pdp11/pdp11.md (truncsihi2): Remove.
6871 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
6872 Chung-Ju Wu <jasonwucj@gmail.com>
6874 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
6876 (unaligned_store_dw): Ditto.
6877 * config/nds32/nds32-memory-manipulation.c
6878 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
6879 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
6880 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
6881 (emit_setmem_word_loop): Rename to ...
6882 (emit_setmem_doubleword_loop): ... this.
6883 (nds32_gen_dup_4_byte_to_word_value): New function.
6884 (nds32_gen_dup_8_byte_to_double_word_value): New function.
6885 (nds32_expand_setmem_loop): Refine implementation.
6886 (nds32_expand_setmem_loop_v3m): Ditto.
6887 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
6890 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6892 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
6894 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
6896 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
6897 (nds32_init_machine_status): Initialize machine->attr_naked_p and
6898 machine->attr_no_prologue_p.
6899 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
6900 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
6901 (nds32_expand_epilogue): Consider attr_naked_p.
6902 (nds32_expand_epilogue_v3pop): Likewise.
6903 (nds32_can_use_return_insn): Likewise.
6904 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
6905 attr_no_prologue_p fields.
6906 * config/nds32/nds32.opt (mret-in-naked-func): New option.
6908 2018-05-27 Jakub Jelinek <jakub@redhat.com>
6911 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
6913 * config/i386/sse.md
6914 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
6916 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
6918 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
6920 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
6922 (*<floatsuffix>floatv2div2sf2): Rename to ...
6923 (*float<floatunssuffix>v2div2sf2): ... this.
6924 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
6925 (float<floatunssuffix>v2div2sf2_mask): ... this.
6926 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
6927 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
6928 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
6930 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
6932 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6934 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
6936 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6938 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
6940 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
6941 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
6942 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
6943 gen_ufix_truncv8dfv8si2.
6944 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
6945 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
6946 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
6947 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
6948 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
6949 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
6950 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
6951 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
6953 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
6957 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
6959 2018-05-25 Jim Wilson <jimw@sifive.com>
6961 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
6962 * config/riscv/riscv.c (struct machine_function): Add
6963 interrupt_handler_p and attribute_checked_p fields.
6964 (riscv_attribute_table): Add interrupt.
6965 (riscv_interrupt_type_p): New.
6966 (riscv_save_reg_p): Save extra regs for interrupt handler.
6967 (riscv_use_save_libcall): Return false for interrupt handler.
6968 (riscv_first_stack_step): Add forward declaration.
6969 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
6970 for interrupt handler with large frame. Use it for saved reg list.
6971 (riscv_expand_prologue): Move flag_stack_usage_info support to
6972 eliminate duplication.
6973 (riscv_expand_epilogue): Generate mret for interrupt handler.
6974 (riscv_epilogue_uses): New.
6975 (riscv_can_use_return_insn): Return false for interrupt handler.
6976 (riscv_function_ok_for_sibcall): Likewise.
6977 (riscv_set_current_function): Add interrupt handler support.
6978 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
6979 * config/riscv/riscv.md (UNSPECV_MRET): New.
6981 (riscv_frflags, riscv_fsflags): Use tab after opcode.
6983 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
6985 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
6987 PR tree-optimization/85712
6988 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
6989 this candidate has already been replaced in-situ by a copy.
6991 2018-05-25 Jason Merrill <jason@redhat.com>
6993 PR c++/80485 - inline function non-zero address.
6994 * symtab.c (nonzero_address): Check DECL_COMDAT.
6996 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
6999 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7000 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7001 extension of SImode operation. Use const123_operand predicate.
7002 (*saddsi_1): Remove.
7003 (*saddl_se_1): Ditto.
7005 (*ssubl_se_1): Ditto.
7006 * config/alpha/predicates.md (const123_operand): New predicate.
7007 * config/alpha/constraints.md (P): Use IN_RANGE.
7009 2018-05-25 Richard Biener <rguenther@suse.de>
7011 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7013 (ref_maybe_used_by_stmt_p): Likewise.
7014 (stmt_may_clobber_ref_p): Likewise.
7015 (stmt_may_clobber_ref_p_1): Likewise.
7016 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7018 (ref_maybe_used_by_stmt_p): Likewise.
7019 (stmt_may_clobber_ref_p): Likewise.
7020 (stmt_may_clobber_ref_p_1): Likewise.
7021 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7022 the alias oracle to disambiguate DRs with stmts DR analysis
7024 (vect_analyze_data_refs): Do not give up on not analyzable
7025 DRs for BB vectorization. Remove code truncating the dataref
7028 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7031 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7032 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7033 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7035 2018-05-25 Richard Biener <rguenther@suse.de>
7037 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7038 function, combining stmt data ref gathering and fatal analysis
7040 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7041 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7042 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7043 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7044 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7046 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7048 PR tree-optimization/85720
7049 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7050 SCC if all partitions are builtins.
7051 (version_loop_by_alias_check): New parameter. Generate cancelable
7052 runtime alias check if all partitions are builtins.
7053 (distribute_loop): Update call to above function.
7055 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7057 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7058 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7059 (parm_default_def_partition_arg): Ditto.
7060 (set_parm_default_def_partition): Ditto.
7061 (get_parm_default_def_partitions): Ditto and make it static.
7062 (get_undefined_value_partitions): Ditto and make it static.
7063 (remove_ssa_form): Refactor call to init_var_map here.
7064 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7065 computation for loop region.
7066 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7067 (register_default_def): Delete.
7068 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7069 (parm_default_def_partition_arg): Ditto.
7070 (set_parm_default_def_partition): Ditto.
7071 (get_parm_default_def_partitions): Ditto and make it static.
7072 (get_undefined_value_partitions): Ditto and make it static.
7073 (coalesce_with_default, coalesce_with_default): Update comment.
7074 (create_coalesce_list_for_region): New func factored out from
7075 create_outofssa_var_map.
7076 (populate_coalesce_list_for_outofssa): New func factored out from
7077 create_outofssa_var_map and coalesce_ssa_name.
7078 (create_outofssa_var_map): Delete.
7079 (coalesce_ssa_name): Refactor to support live range computation.
7080 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7081 (get_parm_default_def_partitions): Delete.
7082 (get_undefined_value_partitions): Ditto.
7083 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7084 computation for loop region.
7085 (new_tree_live_info, loe_visit_block): Ditto.
7086 (live_worklist, set_var_live_on_entry): Ditto.
7087 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7088 * tree-ssa-live.h (struct _var_map): New fields.
7089 (init_var_map): Change decl.
7090 (region_contains_p): New.
7092 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7094 * tree-ssa-live.h (live_merge_and_clear): Delete.
7096 2018-05-25 Richard Biener <rguenther@suse.de>
7099 * tree-dump.c (dequeue_and_dump): Remove access to removed
7100 operand 2 of a SWITCH_EXPR.
7102 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7104 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7105 multiplication and division.
7106 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7107 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7108 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7109 (cond_udiv_optab, cond_umod_optab): New optabs.
7110 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7111 (IFN_COND_RDIV): New internal functions.
7112 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7113 TRUNC_MOD_EXPR and RDIV_EXPR.
7114 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7115 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7117 (SVE_INT_BINARY): Include mult.
7118 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7119 (optab, sve_int_op): Handle mult.
7120 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7122 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7123 for SVE_INT_BINARY_SD.
7125 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7127 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7128 (optab, sve_int_op): Handle div and udiv.
7129 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7130 for SVE_INT_BINARY_SD.
7131 (*<optab><mode>3): New insn for the same.
7133 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7135 * tree-vect-patterns.c: Include predict.h.
7136 (vect_recog_divmod_pattern): Restrict check for division support
7137 to when optimizing for size.
7139 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7141 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7142 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7143 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7144 (gimple_match_op::set_op): Likewise.
7145 (gimple_resimplify4): Declare.
7146 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7147 (expr::gen_transform): Likewise.
7148 (decision_tree::gen): Generate a simplification routine for 4 operands.
7149 * gimple-match-head.c (gimple_simplify): Add an overload for
7150 4 operands. In the top-level function, handle up to 4 call
7151 arguments and call gimple_resimplify4.
7152 (gimple_resimplify4): New function.
7153 (build_call_internal): Pass a fourth operand.
7154 (maybe_push_to_seq): Likewise.
7155 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7156 Fold VEC_COND_EXPRs of an operation and a default value into
7157 an IFN_COND_* function if possible.
7158 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7160 (SVE_COND_FP_BINARY): Include them.
7161 (optab, sve_fp_op): Handle them.
7162 (SVE_INT_BINARY_REV): New code iterator.
7163 (SVE_COND_FP_BINARY_REV): New int iterator.
7164 (commutative): New int attribute.
7165 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7167 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7169 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7170 (*cond_<optab><mode>): New patterns for reversed operands.
7172 2018-05-25 Richard Biener <rguenther@suse.de>
7174 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7175 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7176 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7177 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7178 * tree-vect-data-refs.c (everywhere): Adjust users.
7179 * tree-vect-loop.c (everywhere): Likewise.
7180 * tree-vect-slp.c (everywhere): Likewise.
7181 * tree-vect-stmts.c (everywhere): Likewise.
7182 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7184 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7186 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7188 (gcc_cv_as_section_exclude): ... this.
7189 Try Solaris as #exclude syntax.
7190 * configure: Regenerate.
7191 * config.in: Regenerate.
7192 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7194 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7195 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7197 * varasm.c (default_elf_asm_named_section): Don't check if
7198 HAVE_GAS_SECTION_EXCLUDE is defined.
7200 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7202 * doc/md.texi: Update the documentation of the cond_* optabs
7203 to mention the new final operand. Fix GET_MODE_NUNITS call.
7204 Describe the scalar case too.
7205 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7206 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7208 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7209 (get_conditional_internal_fn): Update comment.
7210 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7211 accumulator value as a final argument to conditional functions.
7212 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7213 a define_expand and add an "else" operand. Assert for now that
7214 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7215 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7216 (*cond_<optab><mode>): New patterns.
7217 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7218 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7219 (UNSPEC_COND_EOR): Delete.
7220 (optab): Remove associated mappings.
7221 (SVE_INT_BINARY): New code iterator.
7222 (sve_int_op): Remove int attribute and add "minus" to the code
7224 (SVE_COND_INT_OP): Delete.
7225 (SVE_COND_FP_OP): Rename to...
7226 (SVE_COND_FP_BINARY): ...this.
7228 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7230 * optabs.c (can_reuse_operands_p): New function.
7231 (maybe_legitimize_operands): Try to reuse the results for
7234 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7236 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7237 Add {q} suffix to insn mnemonic.
7239 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7241 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7242 (msp430_warn_func_return): New.
7244 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7246 * fold-const.c (tree_nonzero_bits): New function.
7247 * fold-const.h (tree_nonzero_bits): Likewise.
7248 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7249 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7251 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7255 * varasm.c (assemble_alias): Check ifunc_resolver only on
7258 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7261 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7262 when memory input operand is handled.
7264 2018-05-24 Luis Machado <luis.machado@linaro.org>
7266 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7268 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7270 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7272 * match.pd: Delay FMA folds until after vectorization.
7274 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7277 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7278 address check not strict.
7280 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7282 * gimple-match.h (gimple_match_op): New class.
7283 (mprts_hook): Replace parameters with a gimple_match_op *.
7284 (maybe_build_generic_op): Likewise.
7285 (gimple_simplified_result_is_gimple_val): Replace parameters with
7286 a const gimple_match_op *.
7287 (gimple_simplify): Replace code_helper * and tree * parameters with
7288 a gimple_match_op * parameter.
7289 (gimple_resimplify1): Replace code_helper *, tree and tree *
7290 parameters with a gimple_match_op * parameter.
7291 (gimple_resimplify2): Likewise.
7292 (gimple_resimplify3): Likewise.
7293 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7294 parameters with a gimple_match_op * parameter.
7295 * gimple-match-head.c (gimple_simplify): Change prototypes of
7296 auto-generated functions to take a gimple_match_op * instead of
7297 separate code_helper * and tree * parameters. Make the same
7298 change in the top-level overload and update calls to the
7299 gimple_resimplify routines. Update calls to the auto-generated
7300 functions and to maybe_push_res_to_seq in the publicly-facing
7301 operation-specific gimple_simplify overloads.
7302 (gimple_match_op::MAX_NUM_OPS): Define.
7303 (gimple_resimplify1): Replace rcode and ops with a single res_op
7304 parameter. Update call to gimple_simplify.
7305 (gimple_resimplify2): Likewise.
7306 (gimple_resimplify3): Likewise.
7307 (mprts_hook): Replace parameters with a gimple_match_op *.
7308 (maybe_build_generic_op): Likewise.
7309 (build_call_internal): Replace type, nargs and ops with
7310 a gimple_match_op *.
7311 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7312 with a single gimple_match_op *. Update calls to mprts_hook,
7313 build_call_internal and gimple_simplified_result_is_gimple_val.
7314 Factor out code that is common to the tree_code and combined_fn cases.
7315 * genmatch.c (expr::gen_transform): Replace tem_code and
7316 tem_ops with a gimple_match_op called tem_op. Update calls
7317 to the gimple_resimplify functions and maybe_push_res_to_seq.
7318 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7319 res_ops. Update call to the gimple_resimplify functions.
7320 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7321 (decision_tree::gen): Make the functions take a gimple_match_op *
7322 called res_op instead of separate res_code and res_ops parameters.
7323 Update call accordingly.
7324 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7325 and ops with a single res_op parameter. Update calls to
7326 maybe_build_generic_op and maybe_push_res_to_seq.
7327 (fold_stmt_1): Update calls to gimple_simplify and
7328 replace_stmt_with_simplification.
7329 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7330 and gimple_simplified_result_is_gimple_val.
7331 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7333 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7334 with a gimple_match_op *.
7335 (vn_nary_build_or_lookup): Likewise. Update call to
7336 vn_nary_build_or_lookup_1.
7337 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7338 gimple_match_op *. Update calls to the gimple_resimplify routines
7339 and to gimple_simplified_result_is_gimple_val.
7340 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7341 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7342 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7343 (visit_nary_op): Likewise.
7344 (visit_reference_op_load): Likewise.
7346 2018-05-23 Luis Machado <luis.machado@linaro.org>
7348 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7349 modifier for printing the step amount.
7351 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7354 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7357 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7359 * doc/sourcebuild.texi (Endianness): New subsubsection.
7361 2018-05-23 Luis Machado <luis.machado@linaro.org>
7363 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7364 <prefetch_dynamic_strides>: New const bool field.
7365 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7366 prefetch_dynamic_strides.
7367 (exynosm1_prefetch_tune): Likewise.
7368 (thunderxt88_prefetch_tune): Likewise.
7369 (thunderx_prefetch_tune): Likewise.
7370 (thunderx2t99_prefetch_tune): Likewise.
7371 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7373 (aarch64_override_options_internal): Update to set
7374 PARAM_PREFETCH_DYNAMIC_STRIDES.
7375 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7376 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7377 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7378 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7379 prefetch-dynamic-strides setting.
7381 2018-05-23 Luis Machado <luis.machado@linaro.org>
7383 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7384 <minimum_stride>: New const int field.
7385 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7386 minimum_stride field defaulting to -1.
7387 (exynosm1_prefetch_tune): Likewise.
7388 (thunderxt88_prefetch_tune): Likewise.
7389 (thunderx_prefetch_tune): Likewise.
7390 (thunderx2t99_prefetch_tune): Likewise.
7391 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7392 <default_opt_level>: Set to 3.
7393 (aarch64_override_options_internal): Update to set
7394 PARAM_PREFETCH_MINIMUM_STRIDE.
7395 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7396 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7397 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7398 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7399 stride is constant and is below the minimum stride threshold.
7401 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7403 * config/arm/arm-cpus.in (mode26): Delete.
7404 (armv4): Delete mode26 reference.
7405 * config/arm/arm.c (arm_configure_build_target): Delete use of
7408 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7410 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7412 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7413 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7415 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7416 (floatunsdidf2): Ditto.
7418 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7420 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7421 (fixuns_trunc<mode>si2_avx512f): Ditto.
7422 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7423 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7424 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7426 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7428 PR rtl-optimization/79985
7429 * df-scan.c (df_insn_refs_collect): Remove special case for
7430 global registers and asm statements.
7432 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7434 * extend.texi (Global Register Variables): Rewrite the bullet list.
7435 Note that the register is available for allocation. Note that access
7436 via inline asm must use constraints. Add note about async-signal
7437 handlers. Remove paragraph about automagic register selection.
7439 2018-05-23 Richard Biener <rguenther@suse.de>
7441 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7442 of fixed offset from memset VN.
7444 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7446 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7448 (alloc_cand_and_find_basis): Initialize first_interp field.
7449 (slsr_process_mul): Modify first_interp field.
7450 (slsr_process_add): Likewise.
7451 (slsr_process_cast): Modify first_interp field for each new
7453 (slsr_process_copy): Likewise.
7454 (dump_candidate): Dump first_interp field.
7455 (replace_mult_candidate): Process all interpretations, not just
7457 (replace_rhs_if_not_dup): Likewise.
7458 (replace_one_candidate): Likewise.
7460 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7462 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7464 (aarch64_needs_frame_chain): New function.
7465 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7467 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7470 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7471 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7472 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7473 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7474 as true for strict-align.
7475 (aarch64_can_inline_p): Perform checks even when callee has no
7476 attributes to check for strict alignment.
7477 * doc/extend.texi (AArch64 Function Attributes): Document
7479 * doc/invoke.texi: (AArch64 Options): Likewise.
7481 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7483 PR tree-optimization/85853
7484 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7485 the handling of the root of the node to...
7486 (vect_slp_analyze_node_operations_1): ...this new function,
7487 and run the whole thing with the child nodes' def types
7488 set according to their SLP node's def type.
7490 2018-05-23 Richard Biener <rguenther@suse.de>
7493 * tree-data-ref.c (create_runtime_alias_checks): Defer
7494 and ignore overflow warnings.
7496 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7498 PR tree-optimization/85822
7499 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7502 2018-05-23 Richard Biener <rguenther@suse.de>
7504 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7505 memset constants via native_interpret_expr.
7507 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7510 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7512 (cgraph_node::create_alias): Likewise.
7513 (cgraph_node::get_availability): Check ifunc_resolver instead
7514 of looking up ifunc attribute.
7515 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7516 * varasm.c (do_assemble_alias): Likewise.
7517 (assemble_alias): Likewise.
7518 (default_binds_local_p_3): Likewise.
7519 * cgraph.h (cgraph_node): Add ifunc_resolver.
7520 (cgraph_node::only_called_directly_or_aliased_p): Return false
7522 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7524 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7525 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7526 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7527 instead of looking up ifunc attribute.
7529 2018-05-22 Luis Machado <luis.machado@linaro.org>
7531 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7533 2018-05-22 Martin Sebor <msebor@redhat.com>
7536 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7537 only when expasion succeeds.
7538 (expand_builtin_strcmp): Same.
7539 (expand_builtin_strncmp): Same.
7541 2018-05-22 Martin Sebor <msebor@redhat.com>
7543 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7545 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7546 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7548 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7549 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7551 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7552 Add check for legitimate_address.
7553 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7554 (aarch64_swap_ldrstr_operands): New.
7555 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7558 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7559 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7561 * config/aarch64/aarch64.md: New patterns to generate stp
7563 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7564 single words and double words.
7565 (load_pair_sw, load_pair_dw): Likewise.
7566 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7568 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7570 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7571 for different mode ldpstp and add peephole for merged zero stores.
7573 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7575 (aarch64_gen_store_pair): Rename calls to match new patterns.
7576 (aarch64_gen_load_pair): Rename calls to match new patterns.
7577 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7578 (load_pair<DREG:mode><DREG2:mode>): ... This.
7579 (store_pair<mode>): Rename to...
7580 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7581 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7583 (V_INT_EQUIV): Handle SImode.
7584 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7587 2018-05-22 Martin Sebor <msebor@redhat.com>
7590 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7591 or ajust the presumed bound on an operation to avoid unnecessary
7594 2018-05-22 Martin Sebor <msebor@redhat.com>
7596 PR tree-optimization/85826
7597 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7598 assuming that a DECL necesarily has a constant size.
7600 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7603 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7605 2018-05-22 Richard Biener <rguenther@suse.de>
7607 PR tree-optimization/85834
7608 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
7609 non-constant and non-zero memset arguments.
7611 2018-05-22 Martin Liska <mliska@suse.cz>
7614 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
7616 2018-05-22 Richard Biener <rguenther@suse.de>
7618 PR tree-optimization/85863
7619 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
7620 comparisons when vectype is specified.
7621 (vectorizable_condition): Do not specify vectype for
7622 vect_is_simple_cond when SLP vectorizing.
7624 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
7627 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
7628 define __ibm128 as long double.
7629 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
7630 as a distinct type when IEEE 128-bit support is enabled.
7631 (init_float128_ieee): Fix up conversions between IFmode and IEEE
7632 128-bit types to use the correct functions.
7633 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
7634 convert between 128-bit floating point types that have different
7635 modes but the same representation, instead of using gen_lowpart to
7637 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
7639 (IFKF_reg): New attributes to give the register constraints for
7641 (extend<mode>tf2_internal): New insns to mark an explicit
7642 conversion between 128-bit floating point types that have a
7643 different mode but share the same representation.
7645 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
7647 PR tree-optimization/85814
7648 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
7649 a null return from get_strinfo when unsharing the next
7650 strinfo in the chain.
7652 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
7655 * varasm.c (weak_finish): Clean up weak_decls.
7657 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7659 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
7660 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
7661 UNSPEC_UADALP values.
7662 * config/aarch64/iterators.md (ABAL): New int iterator.
7665 (sur): Add mappings for the above.
7666 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
7668 (aarch64_<sur>abal<mode>_4): Likewise.
7669 (aarch64_<sur>adalp<mode>_3): Likewise.
7670 (<sur>sadv16qi): New define_expand.
7672 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
7674 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
7675 (*movdf_internal): Ditto.
7676 (*rcpsf2_sse): Ditto.
7677 (*rsqrtsf2_sse): Ditto.
7678 (*sqrt<mode>2_sse): Ditto.
7680 2018-05-21 Tamar Christina <tamar.christina@arm.com>
7682 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
7684 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
7685 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
7686 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
7687 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
7689 * config/aarch64/arm_neon.h: Likewise.
7690 * config/aarch64/iterators.md (VQ_I): New.
7692 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
7694 * config.gcc: Add arc/t-multilib-linux to tmake_file for
7696 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
7699 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7701 * config/nds32/constraints.md (S): New constraint.
7702 * config/nds32/nds32.md (call_internal): Use constraint S.
7703 (call_value_internal): Likewise.
7704 (sibcall_internal): Likewise.
7705 (sibcall_value_internal): Likewise.
7707 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7708 Chung-Ju Wu <jasonwucj@gmail.com>
7710 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
7713 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
7714 Chung-Ju Wu <jasonwucj@gmail.com>
7716 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
7717 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
7718 (nds32_rtx_costs_impl): Simplify.
7719 (nds32_address_cost_impl): Simplify.
7720 (nds32_init_rtx_costs): New function.
7721 (nds32_rtx_costs_speed_prefer): Likewise.
7722 (nds32_rtx_costs_size_prefer): Likewise.
7723 (nds32_address_cost_speed_prefer): Likewise.
7724 (nds32_address_cost_speed_fwprop): Likewise.
7725 (nds32_address_cost_size_prefer): Likewise.
7726 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
7727 * config/nds32/nds32.c (nds32_option_override): Use
7728 nds32_init_rtx_costs function.
7730 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
7732 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
7733 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
7734 (TARGET_PIPELINE_N8): Likewise.
7735 (TARGET_PIPELINE_N10): Likewise.
7736 (TARGET_PIPELINE_N13): Likewise.
7737 (TARGET_PIPELINE_GRAYWOLF): Likewise.
7739 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
7741 * config/nds32/nds32-fpu.md: Update copyright year.
7743 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7745 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
7747 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7749 * config/nds32/nds32.c
7750 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
7751 * config/nds32/nds32.opt (minline-asm-r15): New option.
7753 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7755 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
7757 * config/nds32/nds32.md (abssi2): New pattern.
7759 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
7761 * config/i386/i386.md (rex64namesuffix): New mode attribute.
7762 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
7763 Merge insn pattern from sse_cvtsi2ss<round_name> and
7764 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
7765 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
7766 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
7767 using SWI48 mode iterator.
7768 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
7769 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
7770 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
7771 pattern from sse_cvttss2si<round_saeonly_name>
7772 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
7773 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
7774 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
7775 using SWI48 mode iterator.
7776 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
7777 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
7778 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
7779 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
7780 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
7781 using SWI48 mode iterator.
7782 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
7783 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
7784 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
7785 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
7786 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
7787 SWI48 mode iterator.
7788 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
7789 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
7790 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
7791 pattern from sse_cvttsd2si<round_saeonly_name>
7792 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
7794 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7796 * config/nds32/nds32-md-auxiliary.c
7797 (nds32_valid_smw_lwm_base_p): Refine.
7798 (nds32_output_smw_single_word): Refine.
7799 (nds32_output_smw_double_word): New.
7800 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
7802 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7804 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
7805 (nds32_output_stack_pop): Refine.
7806 (nds32_expand_unaligned_load): Refine.
7807 (nds32_expand_unaligned_store): Refine.
7809 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7810 Chung-Ju Wu <jasonwucj@gmail.com>
7812 * config/nds32/constants.md: Add TP_REGNUM constant.
7813 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
7814 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
7816 * config/nds32/nds32-doubleword.md: Consider flag_pic.
7817 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
7818 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
7819 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
7820 and PIC code generation.
7821 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
7823 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
7825 * config/nds32/nds32.md: Support TLS and PIC.
7826 * config/nds32/nds32.c: Support TLS and PIC.
7827 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
7828 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
7831 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
7833 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
7834 mode with E_ prefix.
7836 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
7837 Chung-Ju Wu <jasonwucj@gmail.com>
7839 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
7840 * config/nds32/nds32-md-auxiliary.c
7841 (symbolic_reference_mentioned_p): New.
7842 (nds32_legitimize_ict_address): New.
7843 (nds32_expand_ict_move): New.
7844 (nds32_indirect_call_referenced_p): New.
7845 (nds32_symbol_binds_local_p): Delete.
7846 (nds32_long_call_p): Modify.
7847 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
7848 * config/nds32/nds32-protos.h
7849 (symbolic_reference_mentioned_p): Declare.
7850 (nds32_legitimize_ict_address): Declare.
7851 (nds32_expand_ict_move): Declare.
7852 (nds32_indirect_call_referenced_p): Declare.
7853 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
7854 (nds32_relax_group): Use nds32_ict_const_p as condition.
7855 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
7856 (nds32_asm_file_start): Output ict_model directive in asm code.
7857 (nds32_legitimate_address_p): Consider indirect call.
7858 (nds32_print_operand): Consider indirect call.
7859 (nds32_print_operand_address): Consider indirect call.
7860 (nds32_insert_attributes): Handle "indirect_call" attribute.
7861 (TARGET_LEGITIMATE_ADDRESS_P): Define.
7862 (TARGET_LEGITIMATE_CONSTANT_P): Define.
7863 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
7864 (TARGET_DELEGITIMIZE_ADDRESS): Define.
7865 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
7866 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
7867 (TARGET_ICT_MODEL_SMALL): Define.
7868 (TARGET_ICT_MODEL_LARGE): Define.
7869 * config/nds32/nds32.md (movsi): Consider ict model.
7870 (call, call_value): Consider ict model.
7871 (sibcall, sibcall_value): Consider ict model.
7872 * config/nds32/nds32.opt (mict-model): New option.
7873 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
7876 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
7877 Monk Chiang <sh.chiang04@gmail.com>
7878 Jim Wilson <jimw@sifive.com>
7880 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
7881 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
7882 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
7883 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
7884 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
7885 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
7886 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
7887 compute save_libcall_adjustment properly.
7888 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
7889 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
7890 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
7891 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
7892 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
7893 (ABI_SPEC): Handle mabi=ilp32e.
7894 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
7895 (RVE): Add RVE mask.
7896 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
7897 <-march>: Add rv32e as an example.
7899 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
7902 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
7903 (intra_create_variable_infos): Handle C++ constructors.
7905 2018-05-18 Martin Liska <mliska@suse.cz>
7907 * passes.def: Remove a redundant pass.
7909 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
7912 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
7914 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7916 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
7918 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
7920 (armv2, armv2a, armv3, armv3m): Delete architectures.
7921 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
7922 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
7923 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
7925 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
7926 (*mulsidi3adddi): Likewise.
7927 (mulsidi3): Likewise.
7928 (*mulsidi3_nov6): Likewise.
7929 (umulsidi3): Likewise.
7930 (umulsidi3_nov6): Likewise.
7931 (umaddsidi4): Likewise.
7932 (*umulsidi3adddi): Likewise.
7933 (smulsi3_highpart): Likewise.
7934 (*smulsi3_highpart_nov6): Likewise.
7935 (umulsi3_highpart): Likewise.
7936 (*umulsi3_highpart_nov6): Likewise.
7937 * config/arm/arm.h (arm_arch3m): Delete.
7938 * config/arm/arm.c (arm_arch3m): Delete.
7939 (arm_option_override_internal): Update armv3-related comment.
7940 (arm_configure_build_target): Delete use of isa_bit_mode32.
7941 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
7942 (arm_rtx_costs_internal): Delete check of arm_arch3m.
7943 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
7945 (mulusa3): Likewise.
7946 * config/arm/arm-protos.h (arm_arch3m): Delete.
7947 * config/arm/arm-tables.opt: Regenerate.
7948 * config/arm/arm-tune.md: Likewise.
7949 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
7950 deleted architectures.
7952 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7954 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
7955 (armv5t, armv5te): New features.
7956 (ARMv5, ARMv5e): Delete fgroups.
7957 (ARMv5t, ARMv5te): Adjust for above changes.
7959 (armv5, armv5e): Delete arches.
7960 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
7962 (*call_reg_arm): Likewise.
7963 (*call_value_reg_armv5): Likewise.
7964 (*call_value_reg_arm): Likewise.
7965 (*call_symbol): Likewise.
7966 (*call_value_symbol): Likewise.
7967 (*sibcall_insn): Likewise.
7968 (*sibcall_value_insn): Likewise.
7970 (prefetch): Likewise.
7971 (define_split and define_peephole2 dependent on arm_arch5):
7973 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
7975 (TARGET_ARM_QBIT): Likewise.
7976 (TARGET_DSP_MULTIPLY): Likewise.
7977 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
7978 (arm_arch5, arm_arch5e): Delete.
7979 (arm_arch5t, arm_arch5te): Declare.
7980 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
7981 (arm_arch5t): Declare.
7982 (arm_option_reconfigure_globals): Update for the above.
7983 (arm_options_perform_arch_sanity_checks): Update comment, replace
7984 use of arm_arch5 with arm_arch5t.
7985 (use_return_insn): Likewise.
7986 (arm_emit_call_insn): Likewise.
7987 (output_return_instruction): Likewise.
7988 (arm_final_prescan_insn): Likewise.
7989 (arm_coproc_builtin_available): Likewise.
7990 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
7991 arm_arch5e with arm_arch5t and arm_arch5te.
7992 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
7993 (arm_arch5t, arm_arch5te): Declare.
7994 * config/arm/arm-tables.opt: Regenerate.
7995 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
7996 * config/arm/t-multilib: Likewise.
7997 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
7998 instead of arm_arch5.
7999 (*call_reg_thumb1): Likewise.
8000 (*call_value_reg_thumb1_v5): Likewise.
8001 (*call_value_reg_thumb1): Likewise.
8002 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8004 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8006 2018-05-18 Martin Liska <mliska@suse.cz>
8008 PR gcov-profile/84846
8009 * doc/gcov.texi: Document -t option of gcov tool.
8011 2018-05-18 Martin Liska <mliska@suse.cz>
8013 PR gcov-profile/84846
8014 * gcov.c (print_usage): Add new -t option.
8015 (process_args): Handle the option.
8016 (generate_results): Use stdout as output when requested by
8019 2018-05-18 Martin Liska <mliska@suse.cz>
8021 PR gcov-profile/84846
8022 * coverage.c (coverage_init): Write PWD to .gcno file.
8023 * doc/gcov.texi: Document how working directory is printed.
8024 * gcov-dump.c (dump_gcov_file): Print PWD.
8025 * gcov.c (output_intermediate_file): Likewise.
8026 (read_graph_file): Read PWD string.
8027 (output_lines): Print PWD.
8029 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8032 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8033 for retval and return false if all args to phi are zero.
8035 2018-05-18 Richard Biener <rguenther@suse.de>
8037 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8039 (evrp_dom_walker::before_dom_children): Call it.
8041 2018-05-18 Richard Biener <rguenther@suse.de>
8043 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8044 results when processing array refs with variable index.
8046 2018-05-18 Toon Moene <toon@moene.org>
8048 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8049 directly after that of -floop-interchange. Indicate that both
8050 options are enabled by default when specifying -O3.
8052 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8054 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8055 iterator. Delete separate integer-mode vec_set<mode> expander.
8056 (aarch64_simd_vec_setv2di): Delete.
8057 (vec_setv2di): Delete.
8058 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8059 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8060 the "w, r" alternative.
8062 2018-05-18 Martin Liska <mliska@suse.cz>
8064 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8065 * tree-pass.h (make_pass_lower_switch_O0): New function.
8066 * tree-switch-conversion.c (node_has_low_bound): Remove.
8067 (node_has_high_bound): Likewise.
8068 (node_is_bounded): Likewise.
8069 (class pass_lower_switch): Make it a template type and create
8071 (pass_lower_switch::execute): Add template argument.
8072 (make_pass_lower_switch): New function.
8073 (make_pass_lower_switch_O0): New function.
8074 (do_jump_if_equal): Remove.
8075 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8076 all the hard work to tree optimization passes.
8078 2018-05-18 Martin Liska <mliska@suse.cz>
8080 * dbgcnt.c (limit_low): Renamed from limit.
8081 (limit_high): New variable.
8082 (dbg_cnt_is_enabled): Check for upper limit.
8083 (dbg_cnt): Adjust dumping.
8084 (dbg_cnt_set_limit_by_index): Add new argument for high
8086 (dbg_cnt_set_limit_by_name): Likewise.
8087 (dbg_cnt_process_single_pair): Parse new format.
8088 (dbg_cnt_process_opt): Use strtok.
8089 (dbg_cnt_list_all_counters): Remove 'value' and add
8091 * doc/invoke.texi: Document changes.
8093 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8095 * doc/sourcebuild.texi (scalar_all_fma): Document.
8096 * tree.def (FMA_EXPR): Delete.
8097 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8098 * internal-fn.c (ternary_direct): New macro.
8099 (expand_ternary_optab_fn): Likewise.
8100 (direct_ternary_optab_supported_p): Likewise.
8101 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8102 * builtins.c (fold_builtin_fma): Delete.
8103 (fold_builtin_3): Don't call it.
8104 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8105 * expr.c (expand_expr_real_2): Likewise.
8106 * fold-const.c (operand_equal_p): Likewise.
8107 (fold_ternary_loc): Likewise.
8108 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8109 * gimple.c (DEFTREECODE): Likewise.
8110 * gimplify.c (gimplify_expr): Likewise.
8111 * optabs-tree.c (optab_for_tree_code): Likewise.
8112 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8113 * tree-eh.c (operation_could_trap_p): Likewise.
8114 (stmt_could_throw_1_p): Likewise.
8115 * tree-inline.c (estimate_operator_cost): Likewise.
8116 * tree-pretty-print.c (dump_generic_node): Likewise.
8117 (op_code_prio): Likewise.
8118 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8119 * tree-ssa-operands.c (get_expr_operands): Likewise.
8120 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8121 * fold-const-call.h (fold_fma): Delete.
8122 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8123 CFN_FNMA and CFN_FNMS.
8125 * genmatch.c (combined_fn): New enum.
8126 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8127 (commutative_op): New function.
8128 (commutate): Use it. Handle more than 2 operands.
8129 (dt_operand::gen_gimple_expr): Use commutative_op.
8130 (parser::parse_expr): Allow :c to be used with non-binary
8131 operators if the commutative operand is known.
8132 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8133 CFN_FMS, CFN_FNMA and CFN_FNMS.
8134 (backprop::process_assign_use): Remove FMA_EXPR handling.
8135 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8136 (gen_hsa_fma): New function.
8137 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8138 IFN_FNMA and IFN_FNMS.
8139 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8140 * gimple-fold.h (follow_all_ssa_edges): Declare.
8141 * gimple-fold.c (follow_all_ssa_edges): New function.
8142 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8143 gimple_build interface and use follow_all_ssa_edges to fold the result.
8144 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8145 instead of checking for optabs directly.
8146 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8147 rather than FMA_EXPRs.
8148 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8149 call to IFN_FMA instead of an FMA_EXPR.
8151 2018-05-17 Jim Wilson <jimw@sifive.com>
8153 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8154 sign extended promoted subreg, and the range does not have the sign bit
8155 set, then do a sign extend.
8157 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8158 test, check for sign extended subreg and/or constant operands, and
8159 do a sign extend in that case.
8161 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8163 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8164 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8166 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8167 Change logics_shift_reg to logics_shift_imm.
8168 (thunderx2t99_fp_loadpair_basic): Delete.
8169 (thunderx2t99_fp_storepair_basic): Delete.
8170 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8171 (thunderx2t99_asimd_polynomial): Delete.
8172 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8173 and neon_fp_mul_d_scalar_q.
8174 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8175 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8176 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8177 (thunderx2t99_asimd_lut): Add missing tbl types.
8178 (thunderx2t99_asimd_ext): Delete.
8179 (thunderx2t99_asimd_load1_1_mult): Delete.
8180 (thunderx2t99_asimd_load1_2_mult): Delete.
8181 (thunderx2t99_asimd_load1_ldp): New.
8182 (thunderx2t99_asimd_load1): New.
8183 (thunderx2t99_asimd_load2): Add missing *load2* types.
8184 (thunderx2t99_asimd_load3): New.
8185 (thunderx2t99_asimd_load4): New.
8186 (thunderx2t99_asimd_store1_1_mult): Delete.
8187 (thunderx2t99_asimd_store1_2_mult): Delete.
8188 (thunderx2t99_asimd_store2_mult): Delete.
8189 (thunderx2t99_asimd_store2_onelane): Delete.
8190 (thunderx2t99_asimd_store_stp): New.
8191 (thunderx2t99_asimd_store1): New.
8192 (thunderx2t99_asimd_store2): New.
8193 (thunderx2t99_asimd_store3): New.
8194 (thunderx2t99_asimd_store4): New.
8196 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8198 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8199 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8201 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8202 Segher Boessenkool <segher@kernel.crashing.org>
8205 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8208 2018-05-17 Richard Biener <rguenther@suse.de>
8210 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8211 for pruning loop and prune defs feeding only already visited PHIs.
8213 2018-05-17 Richard Biener <rguenther@suse.de>
8215 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8217 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8218 Richard Biener <rguenther@suse.de>
8220 PR tree-optimization/85793
8221 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8222 for VMAT_ELEMENTWISE.
8224 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8226 * internal-fn.h (lookup_internal_fn): Declare
8227 * internal-fn.c (lookup_internal_fn): New function.
8228 * gimple.c (gimple_build_call_from_tree): Handle calls to
8230 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8231 internal function names.
8232 * tree-pretty-print.c (dump_generic_node): Likewise.
8233 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8235 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8237 * gimple-fold.h (gimple_build): Make the function forms take
8238 combined_fn rather than built_in_function.
8239 (gimple_simplify): Likewise.
8240 * gimple-match-head.c (gimple_simplify): Likewise.
8241 * gimple-fold.c (gimple_build): Likewise.
8242 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8243 rather than gimple_build_call_internal.
8244 (get_initial_defs_for_reduction): Likewise.
8245 (vect_create_epilog_for_reduction): Likewise.
8246 (vectorizable_live_operation): Likewise.
8248 2018-05-17 Martin Liska <mliska@suse.cz>
8250 * gimple-ssa-sprintf.c (format_directive): Do not use
8251 space in between 'G_' and '('.
8253 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8256 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8257 even if the mask is not all ones.
8260 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8262 (ix86_gimple_fold_builtin): Likewise.
8265 * config/i386/i386.c: Include tree-vector-builder.h.
8266 (ix86_vector_shift_count): New function.
8267 (ix86_fold_builtin): Fold shift builtins by scalar count.
8268 (ix86_gimple_fold_builtin): Likewise.
8270 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8271 _mm512_setzero): New intrinsics.
8273 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8274 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8276 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8277 code generation for cases where splatting a value is not useful.
8278 * simplify-rtx.c (simplify_ternary_operation): Simplify
8279 vec_merge across a vec_duplicate and a paradoxical subreg forming
8280 a vector mode to a vec_concat.
8282 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8284 * config.gcc: Support "goldmont-plus".
8285 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8287 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8288 PROCESSOR_GOLDMONT_PLUS.
8289 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8290 (processor_target_table): Add "goldmont-plus".
8291 (PTA_GOLDMONT_PLUS): Define.
8292 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8293 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8294 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8295 (fold_builtin_cpu): Add "goldmont-plus".
8296 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8297 (ix86_option_override_internal): Add "goldmont-plus".
8298 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8299 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8300 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8301 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8303 2018-05-17 Richard Biener <rguenther@suse.de>
8305 PR tree-optimization/85757
8306 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8307 remove defs that only feed that PHI from further processing.
8309 2018-05-16 Jim Wilson <jimw@sifive.com>
8311 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8313 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8315 2018-05-16 Mark Wielaard <mark@klomp.org>
8317 * dwarf2out.c (count_index_strings): New function.
8318 (output_indirect_strings): Call count_index_strings and generate
8319 header for dwarf_version >= 5.
8321 2018-05-16 Mark Wielaard <mark@klomp.org>
8323 * dwarf2out.c (dwarf_FORM): New function.
8324 (set_indirect_string): Use dwarf_FORM.
8325 (reset_indirect_string): Likewise.
8326 (size_of_die): Likewise.
8327 (value_format): Likewise.
8328 (output_die): Likewise.
8329 (add_skeleton_AT_string): Likewise.
8330 (output_macinfo_op): Likewise.
8331 (index_string): Likewise.
8332 (output_index_string_offset): Likewise.
8333 (output_index_string): Likewise.
8334 (count_index_strings): Likewise.
8336 2018-05-16 Carl Love <cel@us.ibm.com>
8338 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8339 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8341 2018-05-16 Martin Jambor <mjambor@suse.cz>
8343 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8344 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8346 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8348 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8349 (fnma<mode>4): Likewise.
8350 (fms<mode>4): Likewise.
8351 (fnms<mode>4): Likewise.
8352 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8353 (aarch64_fnma<mode>4): Likewise.
8354 (aarch64_fms<mode>4): Likewise.
8355 (aarch64_fnms<mode>4): Likewise.
8356 (aarch64_fnmadd<mode>4): Likewise.
8358 2018-05-16 Jason Merrill <jason@redhat.com>
8360 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8362 2018-05-16 Richard Biener <rguenther@suse.de>
8364 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8365 (dump_stmt_cost): Declare.
8366 (add_stmt_cost): Dump cost we add.
8367 (add_stmt_costs): New function.
8368 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8370 (vect_analyze_stmt): Adjust prototype.
8371 (vectorizable_condition): Likewise.
8372 (vectorizable_live_operation): Likewise.
8373 (vectorizable_reduction): Likewise.
8374 (vectorizable_induction): Likewise.
8375 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8376 cost vector to pass to vectorizable_ and record afterwards.
8377 (vect_model_reduction_cost): Take cost vector argument and adjust.
8378 (vect_model_induction_cost): Likewise.
8379 (vectorizable_reduction): Likewise.
8380 (vectorizable_induction): Likewise.
8381 (vectorizable_live_operation): Likewise.
8382 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8383 SLP_TREE_NUMBER_OF_VEC_STMTS.
8384 (vect_analyze_slp_cost_1): Remove.
8385 (vect_analyze_slp_cost): Likewise.
8386 (vect_slp_analyze_node_operations): Take visited args and
8387 a target cost vector. Avoid processing already visited stmt sets.
8388 (vect_slp_analyze_operations): Use a local cost vector to gather
8389 costs and register those of non-discarded instances.
8390 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8391 (vect_schedule_slp_instance): Remove copying of
8392 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8394 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8395 adding cost. Record cost entry location.
8396 (vect_prologue_cost_for_slp_op): Function to compute cost of
8397 a constant or invariant generated for SLP vect in the prologue,
8398 split out from vect_analyze_slp_cost_1.
8399 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8400 (vect_model_promotion_demotion_cost): Likewise.
8401 (vect_model_store_cost): Likewise, make static.
8402 (vect_model_load_cost): Likewise.
8403 (vectorizable_bswap): Add cost vector arg and adjust.
8404 (vectorizable_call): Likewise.
8405 (vectorizable_simd_clone_call): Likewise.
8406 (vectorizable_conversion): Likewise.
8407 (vectorizable_assignment): Likewise.
8408 (vectorizable_shift): Likewise.
8409 (vectorizable_operation): Likewise.
8410 (vectorizable_store): Likewise.
8411 (vectorizable_load): Likewise.
8412 (vectorizable_condition): Likewise.
8413 (vectorizable_comparison): Likewise.
8414 (can_vectorize_live_stmts): Likewise.
8415 (vect_analyze_stmt): Likewise.
8416 (vect_transform_stmt): Adjust calls to vectorizable_*.
8417 * tree-vectorizer.c: Include gimple-pretty-print.h.
8418 (dump_stmt_cost): New function.
8420 2018-05-16 Richard Biener <rguenther@suse.de>
8422 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8423 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8424 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8425 (check_name): New callback.
8426 (dse_classify_store): Track cycles via a visited bitmap of PHI
8427 defs and simplify handling of in-loop and across loop dead stores
8428 and properly fail for loop-variant refs. Handle byte-tracking with
8429 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8432 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8434 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8435 (vect_get_mask_type_for_stmt): Likewise.
8436 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8438 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8439 to determine the statement's vector type and the vector type that
8440 should be used for calculating nunits. Deal with cases in which
8441 the type has to be deferred.
8442 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8443 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8444 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8445 (vect_determine_vf_for_stmt): New functions, split out from...
8446 (vect_determine_vectorization_factor): ...here.
8447 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8448 (vect_get_mask_type_for_stmt): New functions, split out from
8449 vect_determine_vectorization_factor.
8451 2018-05-16 Richard Biener <rguenther@suse.de>
8453 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8454 verify the [VEC_]COND_EXPR embedded comparison.
8456 2018-05-15 Martin Sebor <msebor@redhat.com>
8458 PR tree-optimization/85753
8459 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8460 RECORD_TYPE in addition to ARRAY_TYPE.
8462 2018-05-15 Martin Sebor <msebor@redhat.com>
8465 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8467 2018-05-15 Richard Biener <rguenther@suse.de>
8469 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8470 add by_clobber_p one. Change algorithm to collect all defs
8471 representing uses we need to walk and try reducing them to
8472 a single one before failing.
8473 (dse_dom_walker::dse_optimize_stmt): Adjust.
8475 2018-05-13 Mark Wielaard <mark@klomp.org>
8477 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8478 (size_of_loc_descr): Likewise.
8479 (output_loc_operands): Likewise.
8480 (output_loc_operands_raw): Likewise.
8481 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8482 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8483 (hash_loc_operands): Likewise.
8484 (compare_loc_operands): Likewise.
8486 2018-05-14 Mark Wielaard <mark@klomp.org>
8488 * dwarf2out.c (count_index_addrs): New function.
8489 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8491 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8493 PR tree-optimization/83648
8494 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8495 return value as malloc candidate.
8497 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8500 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8501 param as true in call to suggest_attribute.
8503 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8505 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8506 -mreadonly-in-sdata.
8508 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8510 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8512 (aarch64_crypto_aesd_fused): Likewise.
8514 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8516 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8517 (movsi_aarch64): Likewise.
8518 (load_pairsi): Likewise.
8519 (load_pairdi): Likewise.
8520 (store_pairsi): Likewise.
8521 (store_pairdi): Likewise.
8522 (load_pairsf): Likewise.
8523 (load_pairdf): Likewise.
8524 (store_pairsf): Likewise.
8525 (store_pairdf): Likewise.
8526 (zero_extend): Likewise.
8527 (trunc): Swap alternatives.
8528 (fcvt_target): Add '?' to prefer w over r.
8530 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8533 * config/i386/i386.md: Disallow non-commutative arithmetics in
8534 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8535 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8536 in the peephole2 before it.
8538 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8540 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8541 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8542 (ix86_handle_option): Handle -mcldemote.
8543 * config.gcc: New header.
8544 * config/i386/cldemoteintrin.h: New file.
8545 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8546 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8548 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8549 OPTION_MASK_ISA_CLDEMOTE.
8550 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8551 (ix86_valid_target_attribute_inner_p): Ditto.
8552 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8553 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8554 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8555 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8556 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8558 * config/i386/i386.opt: Add -mcldemote.
8559 * config/i386/x86intrin.h: New header.
8560 * doc/invoke.texi: Add -mcldemote.
8562 2018-05-14 Richard Biener <rguenther@suse.de>
8564 * doc/match-and-simplify.texi: Adjust :s documentation.
8566 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8568 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8569 intended memcpy size.
8570 (REORDER_45): Likewise.
8572 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8574 * sort.cc: New file.
8575 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8576 * vec.c (qsort_chk): Use gcc_qsort.
8577 * Makefile.in (OBJS-libcommon): Add sort.o.
8578 (build/sort.o): New target. Use it...
8579 (BUILD_RTL): ... here, and...
8580 (build/gencfn-macros): ... here, and...
8581 (build/genmatch): ... here.
8583 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8584 Chung-Ju Wu <jasonwucj@gmail.com>
8586 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8587 * config/nds32/nds32-graywolf.md: New file.
8588 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8589 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8591 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8592 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8593 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8594 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8595 * config/nds32/pipelines.md: Include n15 settings.
8597 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8598 Chung-Ju Wu <jasonwucj@gmail.com>
8600 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8601 * config/nds32/nds32-n13.md: New file.
8602 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8603 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8605 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8606 * config/nds32/nds32.md (pipeline_model): Add n13.
8607 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
8608 * config/nds32/pipelines.md: Include n13 settings.
8610 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8611 Chung-Ju Wu <jasonwucj@gmail.com>
8613 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
8614 * config/nds32/nds32-n10.md: New file.
8615 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
8616 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
8618 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
8619 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
8620 * config/nds32/nds32.md (pipeline_model): Add n10.
8621 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
8622 * config/nds32/pipelines.md: Include n10 settings.
8624 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
8625 Kito Cheng <kito.cheng@gmail.com>
8626 Chung-Ju Wu <jasonwucj@gmail.com>
8628 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
8629 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8630 Add enum values for DSP extension instructions.
8631 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
8633 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
8634 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
8636 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
8637 * config/nds32/nds32-dspext.md: New file for DSP implementation.
8638 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
8639 * config/nds32/nds32-intrinsic.md: Likewise.
8640 * config/nds32/nds32_intrinsic.h: Likewise.
8641 * config/nds32/nds32-md-auxiliary.c: Likewise.
8642 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
8643 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
8644 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
8645 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
8646 * config/nds32/nds32-protos.h: New declarations for DSP extension.
8647 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
8648 TYPE_DMAC in switch statement.
8649 * config/nds32/nds32.c: New checking and implementation for DSP
8650 extension instructions.
8651 * config/nds32/nds32.h: Likewise.
8652 * config/nds32/nds32.md: Likewise.
8653 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
8654 * config/nds32/predicates.md: Implement new predicates for DSP
8657 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8659 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
8660 Reformat alternatives and attributes so it is easier to identify
8661 which constraints/attributes go with which instruction.
8662 (mov<mode>_hardfloat32, FMOVE64): Likewise.
8663 (mov<mode>_softfloat32, FMOVE64): Likewise.
8664 (mov<mode>_hardfloat64, FMOVE64): Likewise.
8665 (mov<mode>_softfloat64, FMOVE64): Likewise.
8667 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
8669 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8671 (Basic PowerPC Built-in Functions): The new name of the
8672 subsection previously known as "PowerPC Built-in Functions".
8673 (Basic PowerPC Built-in Functions Available on all Configurations):
8675 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
8676 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
8677 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
8678 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
8680 2018-05-11 Martin Jambor <mjambor@suse.cz>
8683 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
8686 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8689 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
8691 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
8693 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
8694 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
8695 (ix86_handle_option): Handle -mwaitpkg.
8696 * config.gcc: New header.
8697 * config/i386/cpuid.h (bit_WAITPKG): New bit.
8698 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
8699 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
8701 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8702 OPTION_MASK_ISA_WAITPKG.
8703 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
8704 (ix86_option_override_internal): Add PTA_WAITPKG.
8705 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
8706 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
8707 IX86_BUILTIN_TPAUSE.
8708 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
8709 __builtin_ia32_umwait and __builtin_ia32_tpause.
8710 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
8711 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
8712 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
8713 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
8714 UNSPECV_TPAUSE): New.
8715 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
8716 * config/i386/i386.opt: Add -mwaitpkg.
8717 * config/i386/waitpkgintrin.h: New file.
8718 * config/i386/x86intrin.h: New header.
8719 * doc/invoke.texi: Add -mwaitpkg.
8721 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
8724 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
8726 (cortex-m0): Use armv6s-m isa.
8727 (cortex-m0plus): Likewise.
8728 (cortex-m1): Likewise.
8729 (cortex-m0.small-multiply): Likewise.
8730 (cortex-m0plus.small-multiply): Likewise.
8731 (cortex-m1.small-multiply): Likewise.
8733 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
8734 Jakub Jelinek <jakub@redhat.com>
8736 PR tree-optimization/85692
8737 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
8738 source permute as well.
8740 2018-05-11 Martin Liska <mliska@suse.cz>
8743 * doc/extend.texi: Document LLVM style format for no_sanitize
8746 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
8748 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
8749 mode_supports_vsx_dform_quad to mode_supports_dq_form.
8750 (mode_supports_vsx_dform_quad): Likewise.
8751 (mode_supports_vmx_dform): Move these functions to be next to the
8752 other mode_supports functions.
8753 (mode_supports_dq_form): Likewise.
8754 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
8755 mode_supports_dq_form.
8756 (reg_offset_addressing_ok_p): Likewise.
8757 (offsettable_ok_by_alignment): Likewise.
8758 (rs6000_legitimate_offset_address_p): Likewise.
8759 (legitimate_lo_sum_address_p): Likewise.
8760 (rs6000_legitimize_address): Likewise.
8761 (rs6000_legitimize_reload_address): Likewise.
8762 (rs6000_secondary_reload_inner): Likewise.
8763 (rs6000_preferred_reload_class): Likewise.
8764 (rs6000_output_move_128bit): Likewise.
8766 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8768 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
8769 Generate SImode target register for null target.
8770 <case IX86_BUILTIN_XGETBV>: Ditto.
8771 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
8772 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
8774 2018-05-10 Carl Love <cel@us.ibm.com>
8776 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8777 dcbtt and dcbtstt if operands[2] is 0.
8779 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
8782 * config/i386/sse.md (usadv64qi): New expander.
8784 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
8786 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
8787 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
8788 -maltivec=be support.
8789 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
8790 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
8791 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
8792 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
8793 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
8794 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
8795 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
8796 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
8797 altivec_vsumsws): Adjust.
8798 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
8799 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
8800 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
8802 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
8803 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
8804 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
8805 (altivec_lve<VI_char>x): Delete expand.
8806 (*altivec_lve<VI_char>x_internal): Rename to...
8807 (altivec_lve<VI_char>x): ... this.
8808 (altivec_lvxl_<mode>): Delete expand.
8809 (*altivec_lvxl_<mode>_internal): Rename to ...
8810 (altivec_lvxl_<mode>): ... this.
8811 (altivec_stvxl_<mode>): Delete expand.
8812 (*altivec_stvxl_<mode>_internal): Rename to ...
8813 (altivec_stvxl_<mode>): ... this.
8814 (altivec_stve<VI_char>x): Delete expand.
8815 (*altivec_stve<VI_char>x_internal): Rename to ...
8816 (altivec_stve<VI_char>x): ... this.
8817 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
8818 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
8819 reduc_plus_scal_<mode>): Adjust.
8820 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
8822 (rs6000_cpu_cpp_builtins): Adjust.
8823 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
8824 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
8825 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
8826 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
8827 -maltivec=be support.
8828 (rs6000_split_vec_extract_var): Adjust.
8829 (rs6000_split_v4si_init): Adjust.
8830 (swap_selector_for_mode): Delete.
8831 (altivec_expand_lvx_be, altivec_expand_stvx_be,
8832 altivec_expand_stvex_be): Delete.
8833 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
8834 -maltivec=be support.
8835 (rs6000_gimple_fold_builtin): Ditto.
8836 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
8838 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
8839 (TARGET_DIRECT_MOVE_64BIT): Adjust.
8840 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
8841 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
8842 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
8843 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
8844 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
8845 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
8846 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
8847 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
8848 anonymous split): Adjust.
8849 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
8850 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
8852 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
8854 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
8855 when --with-gxx-include-dir is also specified.
8856 * configure: Regenerate.
8858 2018-05-09 Jim Wilson <jimw@sifive.com>
8861 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
8862 * config/riscv/t-withmultilib: New.
8863 * config/riscv/withmultilib.h: New.
8864 * doc/install.texi: Document RISC-V --with-multilib-list support.
8866 2018-05-09 Richard Biener <rguenther@suse.de>
8868 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
8870 (vect_bb_vectorization_profitable_p): Adjust. Compute
8871 actual scalar cost using the cost vector and the add_stmt_cost
8874 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8876 PR rtl-optimization/85645
8877 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
8878 in the REG_CFA_REGISTER note for LR, don't leave it empty.
8880 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8882 PR rtl-optimization/85645
8883 * shrink-wrap.c (spread_components): Return a boolean saying if
8884 anything was changed.
8885 (try_shrink_wrapping_separate): Iterate spread_components until
8886 nothing changes anymore.
8888 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8890 PR rtl-optimization/85645
8891 * regrename.c (build_def_use): Also kill the chains that include the
8892 destination of a REG_CFA_REGISTER note.
8894 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
8896 PR rtl-optimization/85645
8897 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
8898 insn that has a REG_CFA_REGISTER note.
8900 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
8902 * cfgexpand.c (expand_clobber): New function.
8903 (expand_gimple_stmt_1): Use it.
8904 * tree-vect-stmts.c (vect_clobber_variable): New function,
8906 (vectorizable_simd_clone_call): ...here.
8907 (vectorizable_store): Emit a clobber either side of an
8908 IFN_STORE_LANES sequence.
8909 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
8911 2018-05-09 Tom de Vries <tom@codesourcery.com>
8914 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
8915 (define_insn "trap_if_false"): Add exit after trap.
8917 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
8919 PR rtl-optimization/85638
8920 * bb-reorder.c: Include common/common-target.h.
8921 (create_forwarder_block): New function extracted from...
8922 (fix_up_crossing_landing_pad): ...here. Rename into...
8923 (dw2_fix_up_crossing_landing_pad): ...this.
8924 (sjlj_fix_up_crossing_landing_pad): New function.
8925 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
8926 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
8927 from both partitions and exit the loop after one iteration.
8929 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8932 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8934 (Basic PowerPC Built-in Functions): The new name of the
8935 subsection previously known as "PowerPC Built-in Functions".
8936 (Basic PowerPC Built-in Functions Available on all Configurations):
8938 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8940 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8942 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8944 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8947 2018-05-08 Jim Wilson <jimw@sifive.com>
8949 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
8950 (LD_EMUL_SUFFIX): New.
8951 (LINK_SPEC): Use it.
8953 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
8955 * doc/extend.texi (PowerPC Built-in Functions): Rename this
8957 (Basic PowerPC Built-in Functions): The new name of the
8958 subsection previously known as "PowerPC Built-in Functions".
8959 (Basic PowerPC Built-in Functions Available on all Configurations):
8961 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
8963 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
8965 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
8967 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
8970 2018-05-08 Jakub Jelinek <jakub@redhat.com>
8973 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
8974 after cmpelim optimization.
8976 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
8978 * config.gcc: Support "goldmont".
8979 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
8980 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8982 * config/i386/i386.c (m_GOLDMONT): Define.
8983 (processor_target_table): Add "goldmont".
8984 (PTA_GOLDMONT): Define.
8985 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
8986 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
8987 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
8988 (fold_builtin_cpu): Add "goldmont".
8989 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
8990 (ix86_option_override_internal): Add "goldmont".
8991 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
8992 (processor_type): Add PROCESSOR_GOLDMONT.
8993 * config/i386/i386.md: Add CPU "glm".
8994 * config/i386/glm.md: New file.
8995 * config/i386/x86-tune.def: Add m_GOLDMONT.
8996 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
8998 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9001 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9003 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9004 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9005 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9008 * config/i386/i386.c (ix86_fold_builtin): Handle
9009 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9012 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9013 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9015 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9018 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9019 (check_arch): Likewise.
9020 (check_fpu): Return the result rather than printing it.
9021 (end arch): Fix operator precedence.
9022 (end cpu): Likewise.
9023 (END): Print the result from check_fpu.
9025 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9026 Alan Hayward <alan.hayward@arm.com>
9027 David Sherwood <david.sherwood@arm.com>
9029 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9030 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9031 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9032 (*fcmuo<mode>_and): New patterns.
9034 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9036 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9037 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9038 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9039 (cmp_op, sve_imm_con): New code attributes.
9040 (SVE_COND_INT_CMP, imm_con): Delete.
9041 (cmp_op): Remove above unspecs from int attribute.
9042 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9044 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9045 comparison-specific unspecs.
9046 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9047 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9048 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9049 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9050 (*vec_fcm<cmp_op><mode>): Rename to...
9051 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9052 (*vec_fcmuo<mode>): Rename to...
9053 (*fcmuo<mode>): ...this and adjust likewise.
9054 (*pred_fcm<cmp_op><mode>): New pattern.
9055 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9056 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9058 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9060 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9061 (aarch64_emit_sve_predicated_cond): New function.
9062 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9063 (aarch64_emit_unspec_cond_or): Replace with...
9064 (aarch64_emit_sve_or_conds): ...this new function. Use
9065 aarch64_emit_sve_ptrue_op for the individual comparisons and
9066 aarch64_emit_binop to OR them together.
9067 (aarch64_emit_inverted_unspec_cond): Replace with...
9068 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9069 aarch64_emit_sve_ptrue_op for the comparison and
9070 aarch64_emit_unop to invert the result.
9071 (aarch64_expand_sve_vec_cmp_float): Update after the above
9072 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9074 2018-05-07 Nathan Sidwell <nathan@acm.org>
9076 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9077 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9078 (Backwards Compatibility): Likewise.
9080 2018-05-07 Luis Machado <luis.machado@linaro.org>
9084 2018-05-07 Luis Machado <luis.machado@linaro.org>
9086 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9087 <prefetch_dynamic_strides>: New const bool field.
9088 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9089 prefetch_dynamic_strides.
9090 (exynosm1_prefetch_tune): Likewise.
9091 (thunderxt88_prefetch_tune): Likewise.
9092 (thunderx_prefetch_tune): Likewise.
9093 (thunderx2t99_prefetch_tune): Likewise.
9094 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9096 (aarch64_override_options_internal): Update to set
9097 PARAM_PREFETCH_DYNAMIC_STRIDES.
9098 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9099 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9100 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9101 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9102 prefetch-dynamic-strides setting.
9104 2018-05-07 Luis Machado <luis.machado@linaro.org>
9106 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9107 <minimum_stride>: New const int field.
9108 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9109 minimum_stride field.
9110 (exynosm1_prefetch_tune): Likewise.
9111 (thunderxt88_prefetch_tune): Likewise.
9112 (thunderx_prefetch_tune): Likewise.
9113 (thunderx2t99_prefetch_tune): Likewise.
9114 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9115 (aarch64_override_options_internal): Update to set
9116 PARAM_PREFETCH_MINIMUM_STRIDE.
9117 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9118 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9119 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9120 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9121 stride is constant and is below the minimum stride threshold.
9123 2018-05-07 Luis Machado <luis.machado@linaro.org>
9125 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9128 2018-05-07 Luis Machado <luis.machado@linaro.org>
9130 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9131 <prefetch_dynamic_strides>: New const bool field.
9132 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9133 prefetch_dynamic_strides.
9134 (exynosm1_prefetch_tune): Likewise.
9135 (thunderxt88_prefetch_tune): Likewise.
9136 (thunderx_prefetch_tune): Likewise.
9137 (thunderx2t99_prefetch_tune): Likewise.
9138 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9140 (aarch64_override_options_internal): Update to set
9141 PARAM_PREFETCH_DYNAMIC_STRIDES.
9142 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9143 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9144 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9145 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9146 prefetch-dynamic-strides setting.
9148 2018-05-07 Luis Machado <luis.machado@linaro.org>
9150 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9151 <minimum_stride>: New const int field.
9152 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9153 minimum_stride field.
9154 (exynosm1_prefetch_tune): Likewise.
9155 (thunderxt88_prefetch_tune): Likewise.
9156 (thunderx_prefetch_tune): Likewise.
9157 (thunderx2t99_prefetch_tune): Likewise.
9158 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9159 (aarch64_override_options_internal): Update to set
9160 PARAM_PREFETCH_MINIMUM_STRIDE.
9161 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9162 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9163 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9164 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9165 stride is constant and is below the minimum stride threshold.
9167 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9170 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9171 the type is addressable. Don't force op into register if it has
9174 2018-05-05 Roland McGrath <mcgrathr@google.com>
9177 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9178 any section for which we don't know a specific type it should have,
9179 regardless of name. Previously this was done only for the exact
9180 names ".init_array", ".fini_array", and ".preinit_array".
9181 (default_elf_asm_named_section): Add comment about
9182 relationship with default_section_type_flags and SECTION_NOTYPE.
9183 (get_section): Don't consider it a type conflict if one side has
9184 SECTION_NOTYPE and the other doesn't, as long as neither has the
9185 SECTION_BSS et al used in the default_section_type_flags logic.
9187 2018-05-05 Tom de Vries <tom@codesourcery.com>
9190 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9191 (workaround_barsyncs): New function.
9192 (nvptx_reorg): Use workaround_barsyncs.
9193 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9194 (define_expand "nvptx_membar_cta"): New define_expand.
9195 (define_insn "*nvptx_membar_cta"): New insn.
9197 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9199 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9200 To improve optimization opportunities.
9201 * builtin-types.def: The new needed builtin types for the above.
9203 2018-05-04 Richard Biener <rguenther@suse.de>
9205 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9206 * gimple-ssa-store-merging.c
9207 (imm_store_chain_info::output_merged_store): Remove redundant create,
9208 release split_store vector contents on failure.
9209 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9210 scalar stmt vector on cache hit.
9212 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9214 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9216 * config.gcc (powerpc-xilinx-eabi*): Remove.
9217 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9219 (fusion_addis_mem_combo_load): Ditto.
9220 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9222 (rs6000_cpu_cpp_builtins): Ditto.
9223 * config/rs6000/rs6000-linux.c
9224 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9225 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9226 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9228 (rs6000_setup_reg_addr_masks): Ditto.
9229 (rs6000_init_hard_regno_mode_ok): Ditto.
9230 (rs6000_option_override_internal): Ditto.
9231 (legitimate_lo_sum_address_p): Ditto.
9232 (rs6000_legitimize_address): Ditto.
9233 (rs6000_legitimize_reload_address): Ditto.
9234 (rs6000_legitimate_address_p): Ditto.
9235 (abi_v4_pass_in_fpr): Ditto.
9236 (setup_incoming_varargs): Ditto.
9237 (rs6000_gimplify_va_arg): Ditto.
9238 (rs6000_split_multireg_move): Ditto.
9239 (rs6000_savres_strategy): Ditto.
9240 (rs6000_emit_prologue_components): Ditto.
9241 (rs6000_emit_epilogue_components): Ditto.
9242 (rs6000_emit_prologue): Ditto.
9243 (rs6000_emit_epilogue): Ditto.
9244 (rs6000_elf_file_end): Ditto.
9245 (rs6000_function_value): Ditto.
9246 (rs6000_libcall_value): Ditto.
9247 * config/rs6000/rs6000.h: Ditto.
9248 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9249 (TARGET_MINMAX): ... this. New.
9250 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9251 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9252 (*movsi_internal1_single): Delete.
9253 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9254 mfpu=, mxilinx-fpu): Delete.
9255 * config/rs6000/singlefp.h: Delete.
9256 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9257 * config/rs6000/t-rs6000: Ditto.
9258 * config/rs6000/t-xilinx: Delete.
9259 * config/rs6000/titan.md: Adjust for fp_type removal.
9260 * config/rs6000/vsx.md: Remove Xilinx FP support.
9261 (VStype_simple): Delete.
9262 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9263 * config/rs6000/xfpu.h: Delete.
9264 * config/rs6000/xfpu.md: Delete.
9265 * config/rs6000/xilinx.h: Delete.
9266 * config/rs6000/xilinx.opt: Delete.
9267 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9268 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9270 2018-05-04 Tom de Vries <tom@codesourcery.com>
9273 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9276 2018-05-04 Richard Biener <rguenther@suse.de>
9279 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9280 (expand_complex_div_wide): Likewise.
9281 (expand_complex_operations_1): Likewise.
9282 (expand_complex_libcall): Preserve EH info of the original stmt.
9283 (tree_lower_complex): Handle removed blocks.
9284 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9285 on complex multiplication and division libcall builtins.
9287 2018-05-04 Richard Biener <rguenther@suse.de>
9290 * fold-const.c (negate_expr_p): Restrict negation of operand
9291 zero of a division to when we know that can happen without
9293 (fold_negate_expr_1): Likewise.
9295 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9298 * real.h (real_nextafter): Declare.
9299 * real.c (real_nextafter): New function.
9300 * fold-const-call.c (fold_const_nextafter): New function.
9301 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9302 CASE_CFN_NEXTTOWARD.
9303 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9304 even when arg1_mode is different from arg0_mode.
9306 2018-05-03 Nathan Sidwell <nathan@acm.org>
9308 * doc/extend.texi (Deprecated Features): Remove
9310 (Backwards Compatibility): Likewise.
9311 * doc/invoke.texi (C++ Language Options): Likewise.
9312 (C++ Dialect Options): Likewise.
9314 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9317 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9318 _mm512_mask_mullox_epi64): New intrinsics.
9320 2018-05-03 Tom de Vries <tom@codesourcery.com>
9323 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9324 dump files): Add offload-tree.
9326 2018-05-03 Richard Biener <rguenther@suse.de>
9328 PR tree-optimization/85615
9329 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9330 to loops not nested in BBs loop father to avoid creating multi-entry
9333 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9335 PR tree-optimization/70291
9336 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9337 arguments. Change return type to tree. Emit libcall as a new
9338 statement rather than replacing existing one when inplace_p is true.
9339 (expand_complex_multiplication_components): New function.
9340 (expand_complex_multiplication): Expand floating-point complex
9341 multiplication using the above.
9342 (expand_complex_division): Rename inner_type parameter to type.
9343 Update expand_complex_libcall call-site.
9344 (expand_complex_operations_1): Update expand_complex_multiplication
9345 and expand_complex_division call-sites.
9347 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9350 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9351 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9352 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9353 the highest significant bit of the shift count mask is clear. In
9354 check whether and[sq]i3 is needed verify that all significant bits
9355 of the shift count other than the highest are set.
9357 2018-05-02 Tom de Vries <tom@codesourcery.com>
9360 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9361 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9362 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9363 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9364 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9365 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9366 __builtin_goacc_parlevel_size.
9368 2018-05-02 Richard Biener <rguenther@suse.de>
9370 PR tree-optimization/85597
9371 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9372 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9375 2018-05-02 Tom de Vries <tom@codesourcery.com>
9378 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9379 dump files): Add ltrans-tree.
9381 2018-05-02 Tom de Vries <tom@codesourcery.com>
9384 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9385 dump files): Add wpa-ipa.
9387 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9389 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9390 powerpc*-*-linux*paired* target.
9391 * config/rs6000/750cl.h: Delete.
9392 * config/rs6000/paired.h: Delete.
9393 * config/rs6000/paired.md: Delete.
9394 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9396 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9397 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9398 comment. Remove paired float support.
9399 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9400 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9402 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9403 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9405 * config/rs6000/rs6000.c: Remove paired float support.
9406 (paired_expand_vector_init, paired_expand_vector_move,
9407 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9408 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9409 paired_expand_builtin, paired_expand_predicate_builtin,
9410 paired_init_builtins): Delete.
9411 * config/rs6000/rs6000.h: Remove paired float support.
9412 * config/rs6000/rs6000.md: Remove paired float support.
9413 (move_from_CR_ov_bit): Delete.
9414 * config/rs6000/rs6000.opt (mpaired): Delete.
9415 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9416 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9418 2018-05-02 Richard Biener <rguenther@suse.de>
9421 * gimplify.c (gimplify_save_expr): When in SSA form allow
9422 SAVE_EXPRs to compute to SSA vars.
9424 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9427 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9428 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9429 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9430 clobber operands[2], instead use a new pseudo. Formatting fixes.
9432 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9434 PR tree-optimization/85586
9435 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9436 exit early for statements in the same group if the accesses are
9439 2018-05-02 Tom de Vries <tom@codesourcery.com>
9442 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9445 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9447 PR tree-optimization/85143
9448 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9450 2018-05-01 Tom de Vries <tom@codesourcery.com>
9453 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9454 not found" error message.
9456 2018-05-01 Tom de Vries <tom@codesourcery.com>
9459 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9460 * vec.c (test_ordered_remove_if): New function.
9461 (vec_c_tests): Call test_ordered_remove_if.
9462 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9463 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9464 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9465 VEC_ORDERED_REMOVE_IF.
9467 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9469 PR tree-optimization/82665
9470 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9471 pointer subtraction where arguments come from a memchr call.
9473 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9475 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9476 --push-state --as-needed and --pop-state instead of --as-needed and
9477 --no-as-needed if ld supports it.
9478 * configure: Regenerated.
9481 * doc/install.texi2html: Replace _002d with - and _002a with * in
9482 generated html files using sed.
9484 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9487 * gcc-rich-location.c (blank_line_before_p): New function.
9488 (use_new_line): New function.
9489 (gcc_rich_location::add_fixit_insert_formatted): New function.
9490 * gcc-rich-location.h
9491 (gcc_rich_location::add_fixit_insert_formatted): New function.
9493 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9495 * selftest.c (assert_streq): Rename "expected" and "actual" to
9496 "val1" and "val2". Extend NULL-handling to cover both inputs
9497 symmetrically, while still requiring both to be non-NULL for a pass.
9498 * selftest.h (assert_streq): Rename "expected" and "actual" to
9500 (ASSERT_EQ): Likewise.
9501 (ASSERT_EQ_AT): Likewise.
9502 (ASSERT_KNOWN_EQ): Likewise.
9503 (ASSERT_KNOWN_EQ_AT): Likewise.
9504 (ASSERT_NE): Likewise.
9505 (ASSERT_MAYBE_NE): Likewise.
9506 (ASSERT_MAYBE_NE_AT): Likewise.
9507 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9508 the assertion to pass.
9509 (ASSERT_STREQ_AT): Likewise.
9511 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9513 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9514 interaction with -pie.
9516 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9518 * selftest.h: Fix alphabetization of per-source-file selftest
9521 2018-04-30 Jason Merrill <jason@redhat.com>
9523 PR c++/61982 - dead stores to destroyed objects.
9524 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9527 2018-04-30 Jason Merrill <jason@redhat.com>
9529 * tree.c (build_clobber): New.
9530 * tree.h: Declare it.
9531 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9533 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9535 * diagnostic-show-locus.c (layout::layout): Update for
9536 location_get_source_line returning a char_span.
9537 (struct char_span): Move to input.h.
9538 (struct correction): Update for fields in char_span becoming
9540 (struct source_line): Update for location_get_source_line
9541 returning a char_span.
9542 (layout::print_line): Likewise.
9543 * edit-context.c (edited_file::print_content): Likewise.
9544 (edited_file::print_diff_hunk): Likewise.
9545 (edited_file::print_run_of_changed_lines): Likewise.
9546 (edited_file::get_num_lines): Likewise.
9547 (edited_line::edited_line): Likewise.
9548 * final.c (asm_show_source): Likewise.
9549 * input.c (location_get_source_line): Convert return type
9550 from const char * to char_span, losing the final "line_len"
9552 (dump_location_info): Update for the above.
9553 (get_substring_ranges_for_loc): Likewise. Use a char_span
9554 when handling the literal within the line.
9555 (test_reading_source_line): Update for location_get_source_line
9556 returning a char_span.
9557 * input.h (class char_span): Move here from
9558 diagnostic-show-locus.c, converting from a struct to a class.
9559 Make data members private.
9560 (char_span::operator bool): New.
9561 (char_span::length): New.
9562 (char_span::get_buffer): New.
9563 (char_span::operator[]): New.
9564 (char_span::subspan): Make const.
9565 (char_span::xstrdup): New.
9566 (location_get_source_line): Convert return type from const char *
9567 to char_span, losing the final "line_size" param.
9569 2018-04-30 Jan Hubicka <jh@suse.cz>
9571 * lto-wrapper.c (ltrans_priorities): New static var.
9572 (cmp_priority): New.
9573 (run_gcc): Read priorities and if doing parallel build order
9574 the Makefile by them.
9576 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9578 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9580 2018-04-30 Richard Biener <rguenther@suse.de>
9582 * tree-cfg.c (verify_address): Remove base argument, add
9583 flag whether to check TREE_ADDRESSABLE and do that.
9584 (verify_expr): Remove.
9585 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9586 (verify_gimple_assign_single): Likewise.
9587 (verify_gimple_switch): Likewise.
9588 (verify_expr_location_1): Dereference tp once. Add (disabled)
9589 piece from verify_expr.
9590 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9592 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9594 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9596 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9598 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9599 (small_data_pattern): Likewise.
9600 (arc_rewrite_small_data): Likewise.
9601 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9602 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9603 (get_symbol_alignment): New function.
9604 (legitimate_small_data_address_p): Likewise.
9605 (legitimate_scaled_address): Update, call
9606 legitimate_small_data_address_p.
9607 (output_sdata): New static variable.
9608 (arc_print_operand): Update how we handle small data operands.
9609 (arc_print_operand_address): Likewise.
9610 (arc_legitimate_address_p): Update, use
9611 legitimate_small_data_address_p.
9612 (arc_rewrite_small_data_p): Remove.
9613 (arc_rewrite_small_data_1): Likewise.
9614 (arc_rewrite_small_data): Likewise.
9615 (small_data_pattern): Likewise.
9616 (compact_sda_memory_operand): Update to use
9617 legitimate_small_data_address_p and get_symbol_alignment.
9618 (prepare_move_operands): Don't rewite sdata pattern.
9619 (prepare_extend_operands): Remove.
9620 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
9622 (zero_extendqisi2): Likewise.
9623 (zero_extendhisi2): Likewise.
9624 (extendqihi2): Likewise.
9625 (extendqisi2): Likewise.
9626 (extendhisi2): Likewise.
9630 * config/arc/constraints.md (Usd): Change it to memory constraint.
9632 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9634 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
9635 as source of std instructions.
9636 * config/arc/arc.md (movsi_insn): Update pattern predicate to
9637 allow 6-bit constants as source for store instructions.
9638 (movdi_insn): Update instruction pattern to allow 6-bit constants
9639 as source for store instructions.
9641 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9643 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
9645 2018-04-30 Nathan Sidwell <nathan@acm.org>
9646 Sandra Loosemore <sandra@codesourcery.com>
9648 * dumpfile.c (dump_open): Allow '-' for stdout.
9649 * doc/invoke.texi (Developer Options): Document dump filename
9650 determination early. Document stdin/stdout selection.
9652 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
9654 Microblaze Target: PIC data text relative
9656 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
9657 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
9659 * config/microblaze/microblaze.h (microblaze_constant_address_p):
9660 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
9661 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
9662 New addressing mode for data-text relative position indepenedent code.
9663 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
9664 'ADDRESS_SYMBOLIC_TXT_REL'.
9665 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
9666 (microblaze_legitimate_pic_operand): Exclude function calls from
9667 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
9668 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
9670 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9671 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
9672 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
9673 for 'address + offset'.
9674 (microblaze_expand_prologue): Add new function prologue call for
9676 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
9677 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
9678 table in case of TARGET_PIC_DATA_TEXT_REL.
9679 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
9680 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
9681 Add new macros 'UNSPEC_TEXT',
9682 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
9683 + exclude function calls from 'UNSPEC_PLT' in case of data text
9685 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9686 new target hook for generating address diff vector tables in case of
9688 * doc/tm.texi : Regenerate.
9689 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
9690 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
9691 of addr diff vector generation.
9692 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
9693 target hook definition.
9694 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
9695 Add default function for generate_pic_addr_diff_vec -> flag_pic.
9696 * doc/invoke.texi (Add new pic option): Add new microblaze pic
9697 option for data text relative.
9699 2018-04-30 Richard Biener <rguenther@suse.de>
9701 * tree-chrec.h (evolution_function_is_constant_p): Remove
9703 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
9705 2018-04-30 Richard Biener <rguenther@suse.de>
9708 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
9710 2018-04-30 Richard Biener <rguenther@suse.de>
9712 PR tree-optimization/28364
9713 PR tree-optimization/85275
9714 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
9715 copying first exit test.
9717 2018-04-28 Mark Wielaard <mark@klomp.org>
9719 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
9721 (dwarf_AT): Handle DW_AT_addr_base.
9722 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
9724 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
9727 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
9728 (*ashl<dwi>3_doubleword_mask_1): Ditto.
9729 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
9730 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
9732 2018-04-28 Richard Biener <rguenther@suse.de>
9734 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
9735 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
9736 to reflect use. Only add interesting stmts.
9738 2018-04-27 Martin Jambor <mjambor@suse.cz>
9741 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
9742 the jump function allows for passing through aggregate values.
9744 2018-04-27 David Malcolm <dmalcolm@redhat.com>
9746 * input.h (in_system_header_at): Convert from macro to inline
9748 (from_macro_expansion_at): Likewise.
9749 (from_macro_definition_at): Likewise.
9751 2018-04-27 Jeff Law <law@redhat.com>
9753 * config.gcc: Mark tile* targets as deprecated/obsolete.
9755 2018-04-27 Richard Biener <rguenther@suse.de>
9757 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
9760 2018-04-27 Richard Biener <rguenther@suse.de>
9762 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
9764 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
9766 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
9767 with Yd constraint. Set "preferred_for_speed" attribute from
9768 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
9770 (*movdi_internal): Ditto.
9771 (movti_interunit splitters): Remove
9772 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
9773 (movdi_interunit splitters): Ditto.
9774 * config/i386/constraints.md (Ye): Remove.
9775 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
9777 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9780 * config/aarch64/constraints.md (Usg): Limit to 31.
9783 2018-04-27 Jakub Jelinek <jakub@redhat.com>
9785 PR tree-optimization/85529
9786 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
9787 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
9788 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
9789 zero extension or masking of the MSB bit.
9790 (optimize_range_tests): Add FIRST_BB argument, pass it through
9791 to optimize_range_tests_var_bound.
9792 (maybe_optimize_range_tests, reassociate_bb): Adjust
9793 optimize_range_tests callers.
9795 2018-04-26 Richard Biener <rguenther@suse.de>
9796 Jakub Jelinek <jakub@redhat.com>
9798 * cgraph.h (symbol_table): Just declare debug method here.
9799 * symtab.c (symbol_table::debug): Define.
9801 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
9803 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
9805 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
9807 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
9808 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
9809 (*movdi_internal): Substitute Yi and Yj constraint with x
9810 and Ym and Yn constraint with y constraint. Update "isa"
9811 attribute and set "preferred_for_speed" attribute from
9812 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
9813 (*movsi_internal): Ditto.
9814 (*movdf_internal): Ditto.
9815 (*movsf_internal): Ditto.
9816 (*zero_extendsidi2): Ditto.
9817 * config/i386/sse.md (vec_set<mode>_0): Ditto.
9818 (sse2_loadld): Ditto.
9819 (*vec_extract<ssevecmodelower>_0): Ditto.
9820 (*vec_extractv4si_0_zext_sse4): Ditto.
9821 (vec_concatv2di): Ditto.
9822 (*vec_dup<mode>): Ditto.
9823 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
9824 * config/i386/constraints.md (Yi): Remove.
9829 2018-04-26 Nathan Sidwell <nathan@acm.org>
9831 * dumpfile.c (dump_open): New.
9832 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
9833 (dump_finish): Detect stdio/stderr by value not name.
9835 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
9837 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
9839 2018-04-26 Tom de Vries <tom@codesourcery.com>
9842 * config/nvptx/nvptx.c (verify_neutering_jumps)
9843 (verify_neutering_labels): New function
9844 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
9846 2018-04-26 Tom de Vries <tom@codesourcery.com>
9849 * config/nvptx/nvptx.c (needs_neutering_p): New function.
9850 (nvptx_single): Use needs_neutering_p to skip over insns that do not
9853 2018-04-26 Richard Biener <rguenther@suse.de>
9854 Tom de Vries <tom@codesourcery.com>
9857 * lto-streamer-out.c (output_function): Fixup loops if required to match
9858 discovery done in the reader.
9860 2018-04-26 Richard Biener <rguenther@suse.de>
9862 PR tree-optimization/85116
9863 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
9864 have a loop exit from the single latch predecessor. Remove
9865 case of header with just condition.
9866 (ch_base::copy_headers): Exclude infinite loops from any
9868 (pass_ch::execute): Record exits.
9870 2018-04-26 Richard Biener <rguenther@suse.de>
9872 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
9873 prologue cost vector and pass it to vect_get_load_cost.
9874 (vect_get_peeling_costs_all_drs): Likewise.
9875 (vect_peeling_hash_get_lowest_cost): Likewise.
9876 (vect_enhance_data_refs_alignment): Likewise.
9878 2018-04-26 Richard Biener <rguenther@suse.de>
9881 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
9882 checking of integer<->pointer conversions.
9883 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
9884 sign-/zero-extending pointer types.
9885 (expand_omp_for_static_chunk): Likewise.
9887 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
9888 Jean Lee <xiaoyur347@gmail.com>
9890 * config/mips/mips.c (mips_asan_shadow_offset): New function.
9891 (TARGET_ASAN_SHADOW_OFFSET): Define.
9892 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
9893 true for -fsanitize=address.
9895 2018-04-25 Mark Wielaard <mark@klomp.org>
9897 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
9900 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9902 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
9903 than "alu", remove explicit "memory" and "imm_disp" attributes.
9904 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
9907 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
9908 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
9909 gen_lowpart_no_emit.
9911 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
9914 * config/i386/i386.c (ix86_expand_builtin): Change memory
9915 operand to XI, extend p0 to Pmode.
9916 * config/i386/i386.md: Change unspec volatile and operand
9917 1 mode to XI, change operand 0 mode to P.
9919 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9921 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
9922 GET_MODE_MASK before any checking.
9923 (nds32_can_use_bset_p): Likewise.
9924 (nds32_can_use_btgl_p): Likewise.
9926 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9928 * config/nds32/nds32-doubleword.md: New define_split pattern for
9929 illegal register number.
9931 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9933 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
9935 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
9937 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
9939 2018-04-25 Richard Biener <rguenther@suse.de>
9941 * lto-streamer.h (LTO_major_version): Bump to 8.
9943 2018-04-25 Jakub Jelinek <jakub@redhat.com>
9945 * BASE-VER: Set to 9.0.0.
9947 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
9949 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
9950 in __abskf2 and __powikf2.
9952 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9955 * config/aarch64/constraints.md (Usg, Usj): New constraints.
9956 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
9957 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
9958 Use the above on operand 2. Reindent.
9959 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
9961 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9964 * common/config/i386/i386-common.c (ix86_handle_option): Don't
9966 * config/i386/i386.opt (mcet): Removed.
9967 * doc/install.texi: Remove -mcet documentation.
9968 * doc/invoke.texi: Likewise.
9970 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
9973 * doc/install.texi: Remove -mcet from bootstrap-cet.
9975 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9978 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
9979 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
9983 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
9984 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
9985 containing a CONST_VECTOR.
9987 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
9989 * doc/install.texi: Update newlib dependency for nvptx.
9991 2018-04-24 Jakub Jelinek <jakub@redhat.com>
9994 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
9995 instead of INTVAL when shifting x left.
9997 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
9999 PR tree-optimization/85478
10000 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10001 vect_grouped_store_supported for single element vectors.
10003 2018-04-24 Richard Biener <rguenther@suse.de>
10006 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10007 load cost increase to the case of non-constant step.
10009 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10012 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10013 destination if any_malformed_asm.
10015 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10017 PR middle-end/85496
10018 * expr.c (store_field): In the bitfield case, if the value comes from
10019 a function call and is returned in registers by means of a PARALLEL,
10020 do not change the mode of the temporary unless BLKmode and VOIDmode.
10022 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10024 PR rtl-optimization/85423
10025 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10026 dependencies to debug insns when the previous insn is non-debug.
10028 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10030 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10031 enums into a single definition.
10032 (fls): Fix predicates and printing.
10035 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10037 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10038 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10039 and short u6 immediate.
10040 (check_if_valid_sleep_operand): Remove.
10041 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10043 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10045 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10046 flag_always_save_lp condition.
10047 * config/nds32/nds32.opt (malways-save-lp): New option.
10049 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10051 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10052 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10053 * config/nds32/nds32.h
10054 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10055 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10057 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10059 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10060 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10062 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10063 Chung-Ju Wu <jasonwucj@gmail.com>
10065 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10067 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10068 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10070 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10072 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10074 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10076 * config/nds32/nds32-protos.h (nds32_data_alignment,
10077 nds32_local_alignment): Declare.
10078 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10079 nds32_local_alignment): New functions.
10080 (TARGET_CONSTANT_ALIGNMENT): Define.
10081 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10083 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10085 * config/nds32/nds32.c
10086 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10087 (TARGET_MODES_TIEABLE_P): Likewise.
10089 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10091 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10092 level Ofast and Og.
10094 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10095 Chung-Ju Wu <jasonwucj@gmail.com>
10097 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10098 for unaligned access.
10099 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10101 * config/nds32/nds32-intrinsic.md: Likewise.
10102 * config/nds32/nds32_intrinsic.h: Likewise.
10103 * config/nds32/nds32.h (nds32_builtins): Likewise.
10104 * config/nds32/nds32.opt (munaligned-access): New option.
10105 * config/nds32/nds32.c (nds32_asm_file_start): Display
10106 flag_unaligned_access status.
10108 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10110 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10111 -mno-relax is present.
10112 * config/riscv/linux.h (LINK_SPEC): Ditto.
10114 2018-04-20 Martin Sebor <msebor@redhat.com>
10117 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10119 (gimple_fold_builtin_stxcpy_chk): Same.
10120 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10122 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10125 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10126 __powikf2 when long double is IEEE 128-bit.
10128 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10130 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10131 step to make sure stack always aligned.
10133 2018-04-20 Carl Love <cel@us.ibm.com>
10136 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10137 size check for arg0.
10139 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10140 Tom de Vries <tom@codesourcery.com>
10143 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10144 Emit insns for calls too.
10145 (nvptx_find_par): Always look for worker-level predecessor insn.
10146 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10148 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10149 (nvptx_process_pars): Propagate frames for calls.
10151 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10154 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10156 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10157 (ix86_handle_option): Don't handle OPT_mibt.
10158 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10160 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10162 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10163 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10164 (ix86_target_macros): Define __CET__ with flag_cf_protection
10165 for -fcf-protection.
10166 * config/i386/i386.c (isa2_opts): Remove -mibt.
10167 * config/i386/i386.h (TARGET_IBT): Removed.
10168 (TARGET_IBT_P): Likewise.
10169 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10170 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10171 * config/i386/i386.opt (mcet): Update help message.
10172 (mshstk): Likewise.
10174 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10175 -mcet as an alias for -mshstk.
10177 2018-04-20 Richard Biener <rguenther@suse.de>
10179 PR middle-end/85475
10180 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10181 complexity by forcing a single use of the multiply operand.
10183 2018-04-20 Martin Jambor <mjambor@suse.cz>
10186 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10187 recursion dependency to only apply to non-clones.
10189 2018-04-20 Martin Jambor <mjambor@suse.cz>
10192 * ipa-cp.c (create_specialized_node): Check that clones of
10193 self-recursive edges exist during IPA-CP.
10195 2018-04-19 Toon Moene <toon@moene.org>
10197 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10200 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10202 PR tree-optimization/85467
10203 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10204 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10205 VECTOR_CST element to type.
10207 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10210 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10211 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10212 (builtin_longjmp): Likewise.
10213 (save_stack_nonlocal): New pattern.
10214 (restore_stack_nonlocal): Likewise.
10216 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10219 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10220 Replace ASM_OUTPUT_LABEL with fprintf.
10222 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10225 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10226 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10227 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10228 define __IBT__ and __SHSTK__ for -fcf-protection.
10229 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10231 (ix86_trampoline_init): Likewise.
10232 (x86_output_mi_thunk): Likewise.
10233 (ix86_notrack_prefixed_insn_p): Likewise.
10234 (ix86_option_override_internal): Don't disallow -fcf-protection.
10235 * config/i386/i386.md (rdssp<mode>): Also enable for
10237 (incssp<mode>): Likewise.
10238 (nop_endbr): Likewise.
10239 * config/i386/i386.opt (mcet): Change help message to built-in
10242 (mshstk): Likewise.
10243 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10244 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10245 enable CET built-in functions.
10247 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10249 * common/config/i386/i386-common.c
10250 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10251 OPTION_MASK_ISA_MOVDIRI_UNSET,
10252 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10253 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10254 * config.gcc (movdirintrin.h): New header.
10255 * config/i386/cpuid.h (bit_MOVDIRI,
10256 bit_MOVDIR64B): New bits.
10257 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10259 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10260 (VOID, PVOID, PCVOID)): New function types.
10261 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10262 __builtin_ia32_directstoreu_u64,
10263 __builtin_ia32_movdir64b): New builtins.
10264 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10265 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10267 (ix86_valid_target_attribute_inner_p): Ditto.
10268 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10269 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10270 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10271 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10272 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10273 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10274 (movdiri<mode>, movdir64b_<mode>): New.
10275 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10276 * config/i386/immintrin.h: Include movdirintrin.h.
10277 * config/i386/movdirintrin.h: New file.
10278 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10280 2018-04-19 Richard Biener <rguenther@suse.de>
10282 PR middle-end/85455
10283 * cfg.c (clear_bb_flags): When loop state says we have
10284 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10286 2018-04-19 Richard Biener <rguenther@suse.de>
10288 PR tree-optimization/84737
10289 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10290 copying restrict info.
10291 (vect_setup_realignment): Use it.
10292 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10293 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10294 the first DR to all generated stores.
10295 (vectorizable_load): Likewise for loads.
10297 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10299 PR tree-optimization/85446
10300 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10301 the integral and pointer types to have the same precision.
10303 * doc/install.texi: Document --disable-cet being the default and
10306 2018-04-18 Martin Liska <mliska@suse.cz>
10308 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10311 2018-04-18 Martin Liska <mliska@suse.cz>
10314 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10317 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10318 arguments if they are comparable.
10320 2018-04-18 Martin Liska <mliska@suse.cz>
10323 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10326 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10329 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10332 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10333 ENDBR after calling __morestack.
10335 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10338 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10339 by using gcc_base_ver to generate a gcc_driver_version, and use
10340 it when generating GCC_DRIVER_NAME.
10341 * configure: Regenerate.
10343 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10346 * config.gcc: Obsolete powerpc*-*-*spe*.
10348 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10351 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10352 (stabstr_D): Change type of unum from unsigned int to
10353 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10356 2018-04-17 Jim Wilson <jimw@sifive.com>
10359 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10360 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10361 Set arg_pointer_offset after using pretend_args_size.
10363 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10365 PR rtl-optimization/85431
10366 * dse.c (record_store): Ignore zero width stores.
10369 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10370 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10371 __builtin_stack_restore rather than after it.
10372 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10373 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10374 argument instead of virtual_dynamic_stack_rtx.
10376 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10378 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10380 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10381 Add note to error message to explain internal mapping of overloaded
10382 built-in function name to non-overloaded built-in function name.
10383 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10386 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10389 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10390 where the inputs overlap with the output.
10392 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10394 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10395 (=v, v) alternative and explicit "memory" attribute.
10396 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10397 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10399 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10400 "sselog1" type instead of "sselog".
10401 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10402 "sselog". Remove explicit "memory" attribute.
10403 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10404 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10406 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10407 "sselog1" type instead of "sselog". Remove explicit "memory"
10409 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10410 use "sselog1" type instead of "sselog". Remove explicit "memory"
10412 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10413 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10415 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10416 "sselog1" type instead of "sselog". Remove explicit "memory"
10418 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10419 use "sselog1" type instead of "sselog". Remove explicit "memory"
10423 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10425 PR middle-end/85414
10426 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10429 2018-04-17 Martin Jambor <mjambor@suse.cz>
10432 * ipa-cp.c (create_specialized_node): Call
10433 expand_all_artificial_thunks if necessary.
10435 2018-04-17 Martin Liska <mliska@suse.cz>
10438 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10439 in message, remote space in between '_G' and '('.
10441 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10444 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10445 avx512f_vmcmp<mode>3<round_saeonly_name>,
10446 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10447 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10448 avx512f_rndscale<mode><round_saeonly_name>,
10449 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10450 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10451 Use %<iptr>2 instead of %2 for -masm=intel.
10452 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10453 avx512f_vcvttss2usi<round_saeonly_name>,
10454 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10456 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10457 avx512f_vcvttsd2usi<round_saeonly_name>,
10458 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10459 Use %q1 instead of %1 for -masm=intel.
10460 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10461 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10462 of %3 for -masm=intel.
10463 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10465 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10467 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10469 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10470 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10472 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10474 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10475 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10476 %g1 and one with %0 and %1.
10477 (avx512er_vmrcp28<mode><round_saeonly_name>,
10478 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10479 %1 for -masm=intel.
10480 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10481 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10482 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10483 of %0 and %{%4%} for -masm=intel.
10484 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10485 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10486 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10487 order of %0 and %{%5%}%{z%} for -masm=intel.
10489 2018-04-17 Jan Hubicka <jh@suse.cz>
10492 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10494 2018-04-17 Martin Liska <mliska@suse.cz>
10497 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10498 for target_clone error message. Make default implementation
10499 clone to be a local declaration.
10500 (separate_attrs): Add new argument and check for an empty
10502 (expand_target_clones): Handle it.
10503 (ipa_target_clone): Make redirection just for target_clones
10506 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10507 Tom de Vries <tom@codesourcery.com>
10509 PR middle-end/84955
10510 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10511 tiled basic blocks without omp continue statements.
10513 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10516 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10517 vec_extract expression as having side effects to make sure it gets
10520 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10523 * config/i386/i386.c (get_builtin_code_for_version): Check
10526 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10529 * config.gcc: Support "skylake".
10530 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10532 * config/i386/i386.c (m_SKYLAKE): Define.
10533 (processor_target_table): Add "skylake".
10534 (ix86_option_override_internal): Add "skylake".
10535 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10536 PROCESSOR_CANNONLAKE.
10537 (get_builtin_code_for_version): Fix priority for
10538 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10539 PROCESSOR_SKYLAKE-AVX512.
10540 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10541 (processor_type): Add PROCESSOR_SKYLAKE.
10543 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10544 Jason Merrill <jason@redhat.com>
10547 * convert.c (convert_to_integer_1): Use direct recursion for
10548 enumeral types and types with a precision less than the number
10549 of bits in their mode.
10551 2018-04-16 Julia Koval <julia.koval@intel.com>
10554 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10555 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10557 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10560 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10561 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10562 and -mno-direct-move.
10564 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10567 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10568 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10569 Ensure negative shifts result in {0}.
10571 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10573 PR rtl-optimization/79916
10574 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10575 regs (if any) to define how to gnerate SD moves when LRA is in
10578 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10580 PR rtl-optimization/85393
10581 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10582 * except.c (expand_dw2_landing_pad_for_region): Make static.
10583 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10584 a label and unconditional jump to old_bb, rather than
10585 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10588 PR rtl-optimization/85376
10589 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10590 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10591 instead of a specific value.
10593 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10594 Bin Cheng <bin.cheng@arm.com>
10596 PR tree-optimization/82965
10597 PR tree-optimization/83991
10598 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10599 by_profile_only parameter.
10600 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10601 information if the loop was predicted to iterate too many times.
10602 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10604 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10607 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
10610 2018-04-13 Martin Liska <mliska@suse.cz>
10611 Jakub Jelinek <jakub@redhat.com>
10613 PR middle-end/81657
10614 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
10615 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
10616 * builtins.c (expand_builtin_memory_copy_args): Use
10617 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
10618 handle dest_addr == pc_rtx.
10620 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
10623 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
10624 asked to not generate direct moves.
10625 (fix_trunc<mode>si2_stfiwx): Similar.
10626 (fix_trunc<mode>si2_internal): Similar.
10628 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10631 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
10632 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
10633 lookup if dest in some wider mode is known to be const0_rtx and
10634 if so, record permanent equivalence for it to be ZERO_EXTEND of
10635 the narrower mode destination.
10637 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10639 * lto-streamer-out.c (output_function): Revert 259346.
10640 * omp-expand.c (expand_oacc_for): Likewise.
10642 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
10644 PR rtl-optimization/85354
10645 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
10646 * sel-sched.c (sel_global_init): ... here.
10648 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
10651 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
10652 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10653 mode for PE-COFF targets.
10654 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
10655 (i386_pe_asm_lto_end): Likewise.
10656 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
10657 (TARGET_ASM_LTO_END): Likewise.
10658 * config/i386/winnt.c (saved_debug_info_level): New static variable.
10659 (i386_pe_asm_lto_start): New function.
10660 (i386_pe_asm_lto_end): Likewise.
10662 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
10663 Richard Biener <rguenther@suse.de>
10665 PR middle-end/84955
10666 * lto-streamer-out.c (output_function): Fix CFG loop state before
10668 * omp-expand.c (expand_oacc_for): Handle calls to internal
10669 functions like regular functions.
10671 2018-04-12 Richard Biener <rguenther@suse.de>
10674 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
10675 for the early LTO debug to properly generate references to it
10676 during DIE emission. Do not re-use that for the skeleton for
10678 (dwarf2out_early_finish): Likewise.
10680 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10683 * config/i386/sse.md
10684 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
10685 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
10686 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
10687 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
10688 and output is a reg, avoid creating invalid lowpart subreg, but
10689 instead split into a 512-bit move. Don't split if not AVX512VL,
10690 input is xmm16+ reg and output is a mem.
10691 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
10692 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
10693 xmm16+ reg and output is a mem.
10695 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10697 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
10698 also for flag_dwarf2_cfi_asm.
10700 2018-04-12 Jakub Jelinek <jakub@redhat.com>
10702 PR rtl-optimization/85342
10703 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
10704 a bool scalar var inside of the loop instead. Don't try to update
10705 recog_data.operand after failed apply_change_group.
10707 2018-04-12 Tom de Vries <tom@codesourcery.com>
10710 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
10711 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
10712 array with flexible array member as array without given dimension.
10713 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
10714 argument for undefined param to true.
10716 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
10719 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10720 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
10721 from PowerPC section.
10722 * config/rs6000/sysv4.opt (mcall-): Improve help text.
10723 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
10724 help text that is too long.
10725 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
10726 help text that is too long.
10727 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
10728 help text that is too long.
10730 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
10732 * config/alpha/alpha.md (stack_probe_internal): Rename
10733 from "probe_stack". Update all callers.
10735 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10737 PR rtl-optimization/84566
10738 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
10739 sched_macro_fuse_insns.
10741 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10744 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
10745 (compute_block_dependences): ... from here.
10747 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10749 PR tree-optimization/85331
10750 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
10751 from int to HOST_WIDE_INT.
10753 2018-04-11 Martin Jambor <mjambor@suse.cz>
10756 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
10757 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
10758 not the same as the source val.
10759 (cgraph_edge_brings_value_p): New parameter.
10760 (gather_edges_for_value): Pass destination value to
10761 cgraph_edge_brings_value_p.
10762 (perhaps_add_new_callers): Likewise.
10763 (get_info_about_necessary_edges): Likewise and exclude values brought
10764 only by self-recursive edges.
10765 (create_specialized_node): Redirect only clones of self-calling edges.
10766 (+self_recursive_pass_through_p): New function.
10767 (find_more_scalar_values_for_callers_subset): Use it.
10768 (find_aggregate_values_for_callers_subset): Likewise.
10769 (known_aggs_to_agg_replacement_list): Removed.
10770 (decide_whether_version_node): Re-calculate known constants for all
10771 remaining context clones.
10773 2018-04-11 Richard Biener <rguenther@suse.de>
10776 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
10777 from early DWARF output.
10778 (dwarf2out_early_finish): Output line info unconditionally into
10779 early DWARF and add reference to it.
10781 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10784 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
10785 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
10786 other than V2DFmode using iptr mode attribute.
10787 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
10789 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
10791 PR rtl-optimization/84659
10792 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
10794 2018-04-11 Jakub Jelinek <jakub@redhat.com>
10797 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
10799 (output_loc_list): Pass address of a dummy size variable even in the
10800 locview handling loop.
10801 (index_location_lists): Add comment on why skip_loc_list_entry can't
10804 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
10807 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
10810 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
10813 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
10814 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
10815 and -mstring-compare-inline-limit.
10817 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10820 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
10821 for stack clash protection in a register whenever we need it to be in
10824 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10826 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
10827 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
10829 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
10832 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
10834 (mlong-double-): Ditto.
10835 * config/rs6000/sysv4.opt (msdata=): Ditto.
10836 (mtls-size=): Ditto.
10838 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10840 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10841 erroneous entries for
10842 "vector int vec_ldl (int, long int *)", and
10843 "vector unsigned int vec_ldl (int, unsigned long int *)".
10844 Add comments and entries for
10845 "vector bool char vec_ldl (int, bool char *)",
10846 "vector bool short vec_ldl (int, bool short *)",
10847 "vector bool int vec_ldl (int, bool int *)",
10848 "vector bool long long vec_ldl (int, bool long long *)",
10849 "vector pixel vec_ldl (int, pixel *)",
10850 "vector long long vec_ldl (int, long long *)",
10851 "vector unsigned long long vec_ldl (int, unsigned long long *)".
10852 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
10853 type tree bool_long_long_type_node and correct definition of
10854 bool_V2DI_type_node to make reference to this new type tree.
10855 (rs6000_mangle_type): Replace erroneous reference to
10856 bool_long_type_node with bool_long_long_type_node.
10857 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
10858 comments to emphasize sign distinctions for char and int types and
10859 replace RS6000_BTI_bool_long constant with
10860 RS6000_BTI_bool_long_long constant. Also add comment to restrict
10861 use of RS6000_BTI_pixel.
10862 (bool_long_type_node): Remove this macro definition.
10863 (bool_long_long_type_node): New macro definition
10865 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10867 PR rtl-optimization/85300
10868 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
10869 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
10870 simplify_unary_operation fails.
10872 2018-04-10 Martin Liska <mliska@suse.cz>
10874 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
10875 cgraph_edge and ipa_ref.
10877 2018-04-10 Jakub Jelinek <jakub@redhat.com>
10881 * config/i386/sse.md
10882 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
10883 computation of the VEC_MERGE selector from mask.
10884 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
10885 Fix decoding of the VEC_MERGE selector into mask.
10887 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10889 PR tree-optimization/85286
10890 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
10892 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
10894 * final.c (final_1): Set insn_last_address as well as
10895 insn_current_address.
10897 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10900 * explow.c (emit_stack_probe): Call validize_mem on memory location
10901 before passing it to gen_probe_stack. Create address operand and
10902 legitimize it for the probe_stack_address case.
10904 2018-04-09 Jan Hubicka <jh@suse.cz>
10907 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
10908 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
10909 * tree.c (free_lang_data_in_type): Fix handling of binfos;
10911 (free_lang_data): Rebuild type inheritance graph.
10913 2018-04-09 Martin Sebor <msebor@redhat.com>
10915 * invoke.texi (-finline-small-functions): Mention other optimization
10917 (-findirect-inlining, -fpartial-inlining): Same.
10918 (-finline-functions-called-once): Same.
10919 (-freorder-blocks-and-partition): Same.
10921 2018-04-09 Jan Hubicka <jh@suse.cz>
10924 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
10925 jumps; choose last target that matches the criteria (i.e.
10926 no partition changes for non-crossing jumps).
10927 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
10928 support for redirecting crossing jumps to non-crossing.
10930 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
10932 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
10933 also for naked functions.
10935 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
10937 * config/arc/arc.md (add_shift): New pattern.
10938 (add_shift2): Likewise.
10939 (sub_shift): Likewise.
10940 (sub_shift_cmp0_noout): Likewise.
10941 (compare_si_ashiftsi): Likewise.
10942 (xbfu_cmp0_noout): New combine pattern.
10943 (xbfu_cmp0"): Likewise.
10944 (movsi_set_cc_insn): Place the predicable variant first.
10945 (commutative_binary_cmp0_noout): Remove clobber.
10946 (commutative_binary_cmp0): New pattern.
10947 (noncommutative_binary_cmp0): Likewise.
10948 (noncommutative_binary_cmp0_noout): Likewise.
10949 (noncommutative_binary_comparison_result_used): Removed.
10950 (rsub_cmp0): New pattern.
10951 (rsub_cmp0_noout): Likewise.
10952 (extzvsi): Changed, keep only meaningful variants.
10953 (SQH, SEZ): New iterators.
10954 (SQH_postfix): New mode attribute.
10955 (SEZ_prefix): New code attribute.
10956 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
10957 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
10958 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
10959 of numerical value.
10960 (noncommutative_operator): Check the availability of barrel
10963 2018-04-09 Richard Biener <rguenther@suse.de>
10965 PR tree-optimization/85284
10966 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
10967 Only use the niter constraining form of simple_iv when the exit
10968 is always executed.
10970 2018-04-09 Tom de Vries <tom@codesourcery.com>
10973 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
10974 (define_expand "*memory_barrier"): New define_expand.
10975 (define_insn "memory_barrier"): New insn.
10977 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10979 PR rtl-optimization/80463
10980 PR rtl-optimization/83972
10981 PR rtl-optimization/83480
10983 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
10984 correct producer for the insn.
10985 (tidy_control_flow): Fixup seqnos in case of debug insns.
10987 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10989 PR rtl-optimization/83913
10991 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
10992 different sched-times when merging exprs.
10994 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
10996 PR rtl-optimization/83962
10998 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
10999 tidy_fallthru_edge and tidy_control_flow.
11001 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11003 PR rtl-optimization/83530
11005 * sel-sched.c (force_next_insn): New global variable.
11006 (remove_insn_for_debug): When force_next_insn is true, also leave only
11007 next insn in the ready list.
11008 (sel_sched_region): When the region wasn't scheduled, make another pass
11009 over it with force_next_insn set to 1.
11011 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11013 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11015 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11016 for interrupt control.
11017 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11018 functions for interrupt control.
11019 * config/nds32/nds32-intrinsic.md: Likewise.
11020 * config/nds32/nds32_intrinsic.h: Likewise.
11021 * config/nds32/nds32.h (nds32_builtins): Likewise.
11023 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11025 * config/nds32/nds32.c (nds32_init_machine_status,
11026 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11027 strict_aligned_p field.
11028 (nds32_expand_to_rtl_hook): New function.
11029 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11030 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11032 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11033 Chung-Ju Wu <jasonwucj@gmail.com>
11035 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11036 * config/nds32/nds32-n7.md: New file.
11037 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11038 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11040 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11041 * config/nds32/nds32.md (pipeline_model): Add n7.
11042 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11043 * config/nds32/pipelines.md: Include n7 settings.
11045 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11046 Chung-Ju Wu <jasonwucj@gmail.com>
11048 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11049 * config/nds32/nds32-e8.md: New file.
11050 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11051 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11053 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11054 * config/nds32/nds32.md (pipeline_model): Add e8.
11055 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11056 * config/nds32/pipelines.md: Include e8 settings.
11058 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11059 Chung-Ju Wu <jasonwucj@gmail.com>
11061 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11062 * config/nds32/nds32-n8.md: New file.
11063 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11064 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11066 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11067 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11068 * config/nds32/nds32.md (pipeline_model): Add n8.
11069 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11070 * config/nds32/pipelines.md: Include n8 settings.
11072 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11073 Chung-Ju Wu <jasonwucj@gmail.com>
11075 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11076 * config/nds32/nds32-n9-2r1w.md: New file.
11077 * config/nds32/nds32-n9-3r2w.md: New file.
11078 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11079 nds32_register_ports): New or modify for cpu n9.
11080 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11082 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11083 * config/nds32/nds32-utils.c: New file.
11084 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11085 TARGET_MUL_SLOW): Define.
11086 * config/nds32/nds32.md (pipeline_model): New attribute.
11087 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11088 New options that support cpu n9.
11089 * config/nds32/pipelines.md: Include n9 settings.
11090 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11092 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11094 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11095 information if necessary.
11096 (output_cond_branch_compare_zero): Likewise.
11097 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11098 (nds32_target_alignment): Refine for alignment.
11099 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11100 (FUNCTION_BOUNDARY): Modify.
11101 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11103 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11105 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11107 * config/nds32/constants.md (unspec_volatile_element): Add values for
11108 TLB operation and data prefetch.
11109 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11110 functions for TLB operation and data prefetch.
11111 * config/nds32/nds32-intrinsic.md: Likewise.
11112 * config/nds32/nds32_intrinsic.h: Likewise.
11113 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11114 (nds32_print_operand): Likewise.
11115 * config/nds32/nds32.h (nds32_builtins): Likewise.
11117 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11118 Andrew Pinski <pinsika@gcc.gnu.org>
11120 PR middle-end/82976
11121 * match.pd: Use constant_boolean_node of correct type instead of
11122 boolean_true_node or boolean_false_node for simplifying
11123 pointer comparisons to zero.
11125 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11127 PR tree-optimization/80021
11128 * tree.c (verify_type_variant): Make error call in verify_variant_match
11129 translatable and remove final full stop.
11131 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11133 * config/nds32/constants.md (unspec_volatile_element): Add
11134 UNSPEC_VOLATILE_EH_RETURN.
11135 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11136 nds32_output_stack_pop): Support dwarf exception handling process.
11137 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11138 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11139 exception handling process.
11140 (nds32_compute_stack_frame): Likewise.
11141 (nds32_return_addr_rtx): Likewise.
11142 (nds32_initial_elimination_offset): Likewise.
11143 (nds32_expand_prologue): Likewise.
11144 (nds32_expand_epilogue): Likewise.
11145 (nds32_dynamic_chain_address): New function.
11146 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11147 exception handling.
11148 (DYNAMIC_CHAIN_ADDRESS): Define.
11149 (EH_RETURN_DATA_REGNO): Define.
11150 (EH_RETURN_STACKADJ_RTX): Define.
11151 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11152 patterns for dwarf exception handling.
11154 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11156 * config/nds32/nds32.h: Clean up obsolete macros.
11158 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11160 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11161 Add enum values for particular instructions.
11162 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11163 particular intrinsic functions.
11164 * config/nds32/nds32-intrinsic.md: Likewise.
11165 * config/nds32/nds32_intrinsic.h: Likewise.
11166 * config/nds32/nds32.h (nds32_builtins): Likewise.
11167 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11168 (btst, ave): New patterns for particular instructions.
11170 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11172 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11173 Add enum values for atomic load/store and memory sync.
11174 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11176 * config/nds32/nds32-intrinsic.md: Likewise.
11177 * config/nds32/nds32_intrinsic.h: Likewise.
11178 * config/nds32/nds32.h (nds32_builtins): Likewise.
11180 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11182 PR tree-optimization/85257
11183 * fold-const.c (native_encode_vector): If not all elts could fit
11184 and off is -1, return 0 rather than offset.
11185 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11186 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11187 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11188 adjust buffer in native_interpret_expr call.
11190 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11192 * config/nds32/constants.md (unspec_volatile_element): Add cache
11193 control enum values.
11194 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11195 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11196 * config/nds32/nds32.c (nds32_cctl_names): New.
11197 (nds32_print_operand): Handle cache control register names.
11198 * config/nds32/nds32.h (nds32_builtins): New enum values.
11199 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11201 * config/nds32/nds32.md (type): Add mmu.
11202 * config/nds32/pipelines.md (simple_insn): Add mmu.
11204 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11206 * config/nds32/nds32.md (type): Remove call.
11207 * config/nds32/pipelines.md (simple_insn): Likewise.
11209 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11211 * config/nds32/constants.md (unspec_volatile_element): Add
11212 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11213 UNSPEC_VOLATILE_FMFCFG.
11214 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11215 description for fmfcfg and fmfcsr.
11216 (bdesc_1arg): Add fmtcsr.
11217 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11218 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11219 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11220 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11221 unspec_fmfcfg): New patterns.
11222 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11223 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11224 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11225 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11226 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11227 __nds32__fmfcfg): Define.
11229 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11231 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11232 intrinsic register names.
11233 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11234 intrinsic register enum values and macros.
11236 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11238 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11239 for load/store addressing form.
11240 (nds32_print_operand_address): Likewise.
11242 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11245 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11246 based on LABEL_REF. Remove useless assertion.
11247 (pic_address_needs_scratch): Fix formatting.
11248 (sparc_legitimize_pic_address): Minor tweaks.
11249 (sparc_delegitimize_address): Adjust assertion accordingly.
11250 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11251 into symbolic_operand.
11252 (movsi_high_pic_label_ref): Likewise.
11253 (movsi_lo_sum_pic_label_ref): Likewise.
11254 (movdi_pic_label_ref): Likewise.
11255 (movdi_high_pic_label_ref): Likewise.
11256 (movdi_lo_sum_pic_label_ref): Likewise.
11258 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11260 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11261 custom LIB_SPEC setup.
11263 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11264 Kito Cheng <kito.cheng@gmail.com>
11266 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11267 * config/riscv/freebsd.h: New.
11269 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11271 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11272 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11275 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11276 Kito Cheng <kito.cheng@gmail.com>
11278 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11279 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11280 * config/nds32/nds32-protos.h (nds32_output_call,
11281 nds32_output_return): Declare.
11282 * config/nds32/nds32.md: Refine all the call and return patterns.
11284 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11287 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11288 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11290 PR rtl-optimization/84872
11291 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11292 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11293 EDGE_CROSSING edge.
11295 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11297 * expr.c (copy_blkmode_to_reg): Revert 254862.
11298 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11300 2018-04-06 Richard Biener <rguenther@suse.de>
11302 PR middle-end/85244
11303 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11304 after seeing a component reference with an adjacent field. Treat
11305 refs to arrays at struct end of external decls similar to
11306 refs to unconstrained commons.
11308 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11311 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11312 look through SAVE_EXPRs with non-side-effects argument. Adjust
11314 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11317 2018-04-06 Richard Biener <rguenther@suse.de>
11319 PR middle-end/85180
11320 * alias.c (find_base_term): New wrapper around find_base_term
11321 unwinding CSELIB_VAL_PTR changes.
11322 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11325 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11327 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11329 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11330 constant definitions.
11331 ("nop"): lr 0,0 -> nopr r0
11332 ("nop_lr0", "nop_lr1"): New insn definitions.
11334 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11336 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11337 NDS32_V3PUSH_AVAILABLE_P macro.
11339 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11340 Chung-Ju Wu <jasonwucj@gmail.com>
11342 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11343 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11344 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11345 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11346 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11347 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11348 * config/nds32/constraints.md: New constraints and checking for hard
11349 float configuration.
11350 * config/nds32/iterators.md: New mode iterator and attribute for hard
11351 float configuration.
11352 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11354 * config/nds32/nds32-fpu.md: New file.
11355 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11356 deal with hard float code generation.
11357 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11359 (abi_type, float_reg_number): New enum type.
11360 * config/nds32/nds32-predicates.c: New predicates for hard float.
11361 * config/nds32/nds32-protos.h: Declare functions for hard float.
11362 * config/nds32/nds32.c: Implementation for hard float configuration.
11363 * config/nds32/nds32.h: Definitions for hard float configuration.
11364 * config/nds32/nds32.md: Include hard float machine description and
11365 modify patterns for hard float configuration.
11366 * config/nds32/nds32.opt: New options for hard float configuration.
11367 * config/nds32/predicates.md: New predicates for hard float
11370 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11372 * common/config/nds32/nds32-common.c
11373 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11375 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11377 PR middle-end/85195
11378 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11379 CONSTRUCTOR_ELT (ctor, ...)->value.
11381 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11384 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11386 2018-04-05 Tom de Vries <tom@codesourcery.com>
11389 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11392 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11393 Kito Cheng <kito.cheng@gmail.com>
11395 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11396 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11397 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11398 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11400 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11401 Kito Cheng <kito.cheng@gmail.com>
11403 * config/nds32/constraints.md (Ufe): New memory constraint.
11404 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11405 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11406 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11408 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11409 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11411 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11413 * config/nds32/nds32.md: Use optimize_size in the condition for
11414 alu-shift instructions.
11416 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11418 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11420 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11422 * config/nds32/nds32.md (negsi2): Refine pattern.
11424 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11425 Chung-Ju Wu <jasonwucj@gmail.com>
11427 * config/nds32/iterators.md (shift_rotate): New code iterator.
11428 (shift): New code attribute.
11429 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11430 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11431 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11432 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11433 bit-wise operations.
11434 (andsi3, *andsi3): Ditto.
11435 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11436 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11437 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11438 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11439 nds32_ior_operand, nds32_xor_operand): New predicates.
11441 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11443 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11444 (addsi3, subsi3): ... this.
11446 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11448 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11450 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11452 * config/nds32/nds32.md: Adjust indention.
11454 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11456 * config/nds32/nds32.md (feature): New attribute.
11458 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11460 * config/nds32/nds32.md (subtype): New attribute.
11462 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11465 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11466 expansion to perform a bitwise AND of the argument followed by a
11467 boolean negation of the result.
11469 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11471 PR rtl-optimization/84878
11472 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11473 the basic block. Assert the use reference is not artificial and that
11474 it has an associated insn.
11476 2018-04-04 Michael Matz <matz@suse.de>
11478 * builtins.c (compute_objsize): Pass correct operand
11479 to array_at_struct_end_p.
11481 2018-04-04 Richard Biener <rguenther@suse.de>
11484 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11485 from contexts for DINFO_LEVEL_TERSE and below.
11487 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11489 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11490 resiter_operand condition.
11491 * config/nds32/nds32.md (*move<mode>): Ditto.
11493 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11494 Monk Chiang <sh.chiang04@gmail.com>
11496 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11498 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11500 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11502 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11503 Kito Cheng <kito.cheng@gmail.com>
11505 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11506 nds32_cond_code_str, output_cond_branch,
11507 output_cond_branch_compare_zero, nds32_expand_cbranch,
11508 nds32_expand_cstore, nds32_expand_movcc,
11509 nds32_output_cbranchsi4_equality_zero,
11510 nds32_output_cbranchsi4_equality_reg,
11511 nds32_output_cbranchsi4_equality_reg_or_const_int,
11512 nds32_output_cbranchsi4_greater_less_zero: New functions.
11513 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11514 nds32_expand_cstore, nds32_expand_movcc,
11515 nds32_output_cbranchsi4_equality_zero,
11516 nds32_output_cbranchsi4_equality_reg,
11517 nds32_output_cbranchsi4_equality_reg_or_const_int,
11518 nds32_output_cbranchsi4_greater_less_zero): Declare.
11519 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11520 nds32_rimm11s_operand): New predicates.
11521 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11522 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11525 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11527 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11528 * config/nds32/nds32.md: Ditto.
11529 * config/nds32/pipelines.md: Ditto.
11531 2018-04-04 Richard Biener <rguenther@suse.de>
11533 PR tree-optimization/85168
11534 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11535 propagating abnormals.
11537 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11539 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11541 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11542 Kito Cheng <kito.cheng@gmail.com>
11544 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11545 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11546 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11547 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11548 * config/nds32/nds32.md (sibcall_internal): New.
11549 (sibcall_register): Remove.
11550 (sibcall_immediate): Remove.
11551 (sibcall_value_internal): New.
11552 (sibcall_value_register): Remove.
11553 (sibcall_value_immediate): Remove.
11554 * config/nds32/predicates.md (nds32_general_register_operand): New.
11555 (nds32_call_address_operand): New.
11557 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11559 PR rtl-optimization/85167
11560 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11561 bb_defs if *split_p, instead preinitialize it to NULL.
11563 PR tree-optimization/85156
11564 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11565 evaluating the argument multiple times.
11567 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11569 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11571 (_mm_cvtpd_ps): Likewise.
11572 (_mm_cvttpd_epi32): Likewise.
11573 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11574 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11575 vector, pixel, and bool following altivec.h include.
11577 2018-04-03 Martin Sebor <msebor@redhat.com>
11579 * doc/extend.texi (Common Function Attributes): Clarify.
11580 (const attribute): Likewise.
11581 (pure attribute): Likewise.
11583 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11586 * config/i386/i386.c (ix86_expand_vector_set): Use
11587 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11589 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11591 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11592 instructions when changing rounding bits to preserve precision bits
11593 in the x87 control word.
11595 2018-04-03 Martin Liska <mliska@suse.cz>
11597 PR tree-optimization/82491
11598 * rtl.h (strip_offset_and_add): Replace += suboffset with
11599 poly_uint64 () + suboffset.
11601 2018-03-29 Martin Liska <mliska@suse.cz>
11602 Martin Jambor <mjambor@suse.cz>
11605 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11606 param_type is not an integral or pointer type.
11608 2018-04-03 Richard Biener <rguenther@suse.de>
11610 * sese.h (recompute_all_dominators): Remove.
11612 2018-04-02 Martin Sebor <msebor@redhat.com>
11614 * doc/invoke.texi (-Wrestrict): Fix typos.
11616 2018-04-02 Jim Wilson <jimw@sifive.com>
11618 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
11619 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
11620 (<optab>di3, <optab>si3_extend): Likewise.
11621 (<optab>si3_mask, <optab>si3_mask_1): New.
11622 (<optab>di3_mask, <optab>di3_mask_1): New.
11623 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
11624 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
11625 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
11627 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
11629 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
11632 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
11634 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
11635 (nds32_canonicalize_comparison): New function.
11637 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11638 Kito Cheng <kito.cheng@gmail.com>
11639 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11641 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
11642 * config/nds32/constants.md (unspec_volatile_element): Add
11643 UNSPEC_VOLATILE_RELAX_GROUP.
11644 * config/nds32/nds32-relax-opt.c: New file.
11645 * config/nds32/nds32-predicates.c
11646 (nds32_symbol_load_store_p): New function.
11647 * config/nds32/nds32-protos.h
11648 (nds32_symbol_load_store_p): Declare function.
11649 (make_pass_nds32_relax_opt): Declare new rtl pass function.
11650 * config/nds32/nds32.c
11651 (nds32_register_pass): New function to register pass.
11652 (nds32_register_passes): New function to register passes.
11653 * config/nds32/nds32.md (relax_group): New pattern.
11654 * config/nds32/nds32.opt (mrelax-hint): New option.
11655 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
11657 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
11659 * config/nds32/t-nds32: Modify files dependency.
11661 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11663 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
11664 (PROFILE_HOOK): Define its implementation.
11666 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
11668 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
11669 type and 32-bit size.
11671 2018-04-01 Jakub Jelinek <jakub@redhat.com>
11673 PR middle-end/85090
11674 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
11675 (V_128_256): New mode iterator.
11676 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
11677 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
11678 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
11680 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
11681 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
11683 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
11686 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
11687 NaN inputs correctly.
11689 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
11692 * config/rs6000/vsx.md (??r): New mode attribute.
11693 (*vsx_mov<mode>_64bit): Use it.
11694 (*vsx_mov<mode>_32bit): Likewise.
11696 2018-03-30 Martin Sebor <msebor@redhat.com>
11698 PR tree-optimization/84818
11699 * builtins.c (check_access): Use warning_n.
11701 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11704 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
11706 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
11709 2018-03-30 Julia Koval <julia.koval@intel.com>
11712 * x86-tune.def (movx, partial_reg_dependency): Enable for
11715 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
11717 PR inline-asm/84985
11718 * lra-constraints.c (process_alt_operands): Move setting
11719 this_alternative_matches below.
11721 2018-03-29 Martin Liska <mliska@suse.cz>
11724 * doc/invoke.texi: Document how LTO works with debug info.
11725 Describe auto-load support of binutils. Mention 'x86-64'
11726 as valid option value of -march option.
11728 2018-03-29 Jakub Jelinek <jakub@redhat.com>
11730 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
11733 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
11734 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
11735 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
11738 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11741 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
11742 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
11743 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
11744 for RS6000_BTM_POWERPC64.
11745 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
11746 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
11747 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
11750 (DIVDEU): Likewise.
11752 2018-03-28 Carl Love <cel@us.ibm.com>
11755 2017-09-27 Carl Love <cel@us.ibm.com>
11757 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
11758 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
11759 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
11762 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11764 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
11765 instead of __vector bool.
11766 (_mm_max_pu8): Likewise.
11767 (_mm_min_pi16): Likewise.
11769 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
11772 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
11773 (DIVWEUO): Likewise.
11774 (DIVDEO): Likewise.
11775 (DIVDEUO): Likewise.
11776 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
11777 DIVWEUO and DIVDEUO.
11778 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
11779 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
11780 (div_extend): Likewise.
11781 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
11783 (__builtin_divweuo): Likewise.
11784 (__builtin_divdeo): Likewise.
11785 (__builtin_divdeuo): Likewise.
11787 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11790 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
11791 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
11793 PR tree-optimization/82004
11794 * gimple-match-head.c (optimize_pow_to_exp): New function.
11795 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
11796 Don't fold to exp if optimize_pow_to_exp is false.
11798 2018-03-28 Martin Liska <mliska@suse.cz>
11801 * calls.c (initialize_argument_information): Fix trailing space.
11802 * common.opt: Fix typo and provide better explanation for
11803 -fsanitize-coverage option.
11804 * config/i386/i386.opt: Fix typo.
11806 2018-03-28 Jakub Jelinek <jakub@redhat.com>
11807 Martin Liska <mliska@suse.cz>
11810 * gimplify.c (asan_poison_variable): Don't do the check for
11811 gimplify_omp_ctxp here.
11812 (gimplify_decl_expr): Do it here.
11813 (gimplify_target_expr): Likewise.
11815 2018-03-28 Martin Liska <mliska@suse.cz>
11818 * config/i386/i386.c (ix86_function_arg_advance): Do not call
11819 chkp_type_bounds_count if MPX is not enabled.
11821 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
11823 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
11825 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
11828 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
11829 function to create the function decl for complex long double
11830 multiply and divide for -mabi=ieeelongdouble.
11831 (init_float128_ieee): Call it.
11833 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
11836 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
11837 -fcf-protection=branch -mibt.
11838 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
11840 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11843 * config/arm/arm.c (arm_valid_symbolic_address): Handle
11844 arm_word_relocations.
11846 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
11849 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
11850 extern array declarations.
11852 2018-03-27 Richard Biener <rguenther@suse.de>
11854 PR middle-end/84067
11855 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
11856 explicit single_use checks.
11858 2018-03-27 Richard Biener <rguenther@suse.de>
11860 PR tree-optimization/85082
11861 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
11864 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11866 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
11867 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
11868 Turn on fasynchronous-unwind-tables and funwind-tables.
11870 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
11873 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
11874 (*bmi_blsr_<mode>_ccz): Ditto.
11876 2018-03-26 Tom de Vries <tom@codesourcery.com>
11878 PR tree-optimization/85063
11879 * omp-general.c (offloading_function_p): New function. Factor out
11881 * omp-offload.c (pass_omp_target_link::gate): ... here.
11882 * omp-general.h (offloading_function_p): Declare.
11883 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
11884 with attribute omp declare target for offloading functions.
11886 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
11888 PR tree-optimization/84005
11889 * tree-data-ref.h (get_base_for_alignment): Declare.
11890 * tree-data-ref.c (get_base_for_alignment_1): New function.
11891 (get_base_for_alignment): Likewise.
11892 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
11893 get_base_for_alignment to find a suitable base object, instead
11894 of always using drb->base_address.
11896 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11898 PR inline-asm/85022
11899 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
11900 known size by default.
11902 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
11904 PR inline-asm/85030
11905 * lra-constraints.c (process_alt_operands): Don't match BLKmode
11906 and non BLKmode operands.
11908 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11911 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
11912 Clean up attributes.
11914 2018-03-23 Richard Biener <rguenther@suse.de>
11917 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
11918 we are going to emit early debug for LTO.
11920 2018-03-23 Jakub Jelinek <jakub@redhat.com>
11922 PR inline-asm/85034
11923 * function.c (match_asm_constraints_1): Don't optimize if input
11924 doesn't satisfy general_operand predicate for output's mode.
11926 PR inline-asm/85022
11927 * alias.c (write_dependence_p): Don't require for x_canonicalized
11928 non-VOIDmode if x has VOIDmode.
11931 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
11932 just don't try to optimize it rather than assert it never happens.
11934 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11936 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
11937 macro expansions for definition of ST_INTERNAL_<mode> and
11938 LD_INTERNAL_<mode> builtins.
11939 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
11941 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
11943 (altivec_expand_st_builtin): Likewise.
11944 (altivec_expand_builtin): Remove calls to deleted functions.
11945 (rs6000_address_for_altivec): Delete this function.
11946 * config/rs6000/vector.md: Remove expands for
11947 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
11949 2018-03-22 Sudakshina Das <sudi.das@arm.com>
11952 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
11953 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
11954 re-computing once computed.
11955 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
11956 (arm_init_machine_status): Initialize
11957 machine->static_chain_stack_bytes.
11959 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
11962 * doc/extend.texi: Add four new prototypes for vec_ld.
11963 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
11964 definitions for more logical presentation.
11965 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
11966 entries for V1TI variants of __builtin_altivec_ld builtin.
11967 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
11968 handling of V1TI variant of LVX icode pattern.
11969 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
11970 (rs6000_gimple_fold_builtin): Likewise.
11971 (altivec_init_builtins): Add code to define
11972 __builtin_altivec_lvx_v1ti function.
11974 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11976 PR inline-asm/84941
11977 * function.c (match_asm_constraints_1): Don't do the optimization
11978 if input isn't a REG, SUBREG, MEM or constant.
11980 2018-03-22 Tom de Vries <tom@codesourcery.com>
11982 PR tree-optimization/84956
11983 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
11984 bb_has_abnormal_pred.
11986 2018-03-22 Jakub Jelinek <jakub@redhat.com>
11989 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
11990 DECL_INITIAL (decl) to decl at the end.
11991 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
11992 adjust the comment.
11994 2018-03-21 Joseph Myers <joseph@codesourcery.com>
11996 * doc/extend.texi (__builtin_tgmath): Document when complex
11997 integer types are treated as _Complex _Float64.
11999 2018-03-21 Tom de Vries <tom@codesourcery.com>
12001 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12003 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12005 PR tree-optimization/84960
12006 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12007 if it is ENTRY block, move them into single succ of ENTRY in that case.
12009 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12011 PR tree-optimization/84811
12012 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12013 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12014 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12015 (known_subrange_p): Update accordingly. Cast each value involved
12016 in the size comparison, rather than casting the result of the
12019 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12021 PR tree-optimization/84982
12022 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12023 by flipping the least significant bit rather than all bits from
12024 bitpos to bitpos + bitsize - 1.
12026 2018-03-21 Nathan Sidwell <nathan@acm.org>
12028 * doc/extend.texi (Deprecated Features): Remove mention of
12029 long-deleted deprecations.
12031 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12034 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12035 * configure: Regenerate.
12037 2018-03-21 Tom de Vries <tom@codesourcery.com>
12039 PR tree-optimization/83126
12040 * tree-parloops.c (num_phis): New function.
12041 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12043 2018-03-21 Nathan Sidwell <nathan@acm.org>
12045 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12046 mention anon-struct/union members and trailing attributes.
12048 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12050 PR tree-optimization/84969
12051 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12052 builtin memset partitions if they set different rhs values.
12054 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12056 PR rtl-optimization/84989
12057 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12058 VEC_DUPLICATE with scalar result mode.
12060 2018-03-21 Martin Liska <mliska@suse.cz>
12063 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12064 not intended return statement.
12066 2018-03-21 Martin Liska <mliska@suse.cz>
12069 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12070 (chkp_find_bound_slots_1): Limit number of iterations.
12072 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12075 * Minor grammar fixes for x86 options.
12077 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12080 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12081 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12083 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12086 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12087 (altivec_lvx_<mode>_1op): Likewise.
12088 (altivec_stvx_<mode>_2op): Likewise.
12089 (altivec_stvx_<mode>_1op): Likewise.
12090 (altivec_lvx_<VM2:mode>): New define_expand.
12091 (altivec_stvx_<VM2:mode>): Likewise.
12092 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12093 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12094 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12095 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12096 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12097 (rs6000_gen_lvx): Likewise.
12098 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12099 (altivec_expand_stv_builtin): Likewise.
12100 (altivec_expand_builtin): Likewise.
12101 * config/rs6000/vector.md: Likewise.
12103 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12106 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12109 2018-03-20 Richard Biener <rguenther@suse.de>
12112 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12113 sign-conversions as zero, fall back to standard scalar_stmt
12116 2018-03-20 Martin Liska <mliska@suse.cz>
12119 * predict.c (rebuild_frequencies): Handle case when we have
12120 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12122 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12125 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12126 flag_section_anchors.
12127 * varasm.c (use_blocks_for_decl_p): Remove hack for
12128 dw2_force_const_mem.
12131 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12133 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12134 be created, use lowpart_subreg of operands[0] rather than operands[0]
12136 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12137 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12138 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12139 and n constraint instead of aarch64_shift_imm_di and Usd.
12140 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12141 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12143 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12146 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12147 to favor GPR over NEON registers.
12148 (<shift>di3_neon): Likewise.
12150 2018-03-20 Tom de Vries <tom@codesourcery.com>
12153 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12154 (nvptx_process_pars): Emit bar.sync asap and alap.
12156 2018-03-20 Tom de Vries <tom@codesourcery.com>
12159 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12160 seen_label if seen_label is already set.
12162 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12165 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12166 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12167 Use 1U instead of 1. Formatting fixes.
12170 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12171 instead of TREE_TYPE (s1) for the return value.
12173 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12175 PR tree-optimization/84946
12176 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12177 bitsize + bitsize in poly_uint64 rather than poly_int64.
12180 * dwarf2asm.c: Include fold-const.c.
12181 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12182 of decl rather than decl itself.
12184 PR rtl-optimization/84643
12185 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12187 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12190 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12191 calling assemble_variable.
12193 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12196 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12197 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12199 2018-03-19 Jim Wilson <jimw@sifive.com>
12202 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12203 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12204 (riscv_first_stack_step): Likewise.
12205 (riscv_option_override): Use STACK_BOUNDARY instead of
12206 MIN_STACK_BOUNDARY.
12207 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12208 MIN_STACK_BOUNDARY.
12209 (BIGGEST_ALIGNMENT): Set to 128.
12210 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12211 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12214 2018-03-19 Richard Biener <rguenther@suse.de>
12216 PR tree-optimization/84933
12217 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12218 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12220 2018-03-19 Richard Biener <rguenther@suse.de>
12222 PR tree-optimization/84859
12223 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12224 (cond_if_else_store_replacement): Perform sinking operation on
12225 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12226 Generalize what a BB with a single eligible store is.
12228 2018-03-19 Richard Biener <rguenther@suse.de>
12230 PR tree-optimization/84929
12231 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12232 chrec_is_positive against non-chrec arg.
12234 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12237 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12239 2018-03-18 Martin Liska <mliska@suse.cz>
12241 PR rtl-optimization/84635
12242 * regrename.c (build_def_use): Use matches_mode only when
12245 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12247 PR tree-optimization/84913
12248 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12249 vectorize chains of COND_EXPRs.
12251 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12253 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12255 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12257 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12259 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12261 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12263 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12264 Kito Cheng <kito.cheng@gmail.com>
12266 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12267 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12268 (nds32_adjust_reg_alloc_order): New function.
12269 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12271 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12273 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12274 nds32_print_operand, nds32_print_operand_address): Use
12275 HOST_WIDE_INT_PRINT_DEC instead.
12277 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12279 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12281 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12284 * config/i386/i386.c (initial_ix86_tune_features,
12285 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12286 unsigned long long.
12287 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12288 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12289 rather than 1u << ix86_tune. Formatting fix.
12290 (ix86_option_override_internal): Change ix86_arch_mask from
12291 unsigned int to unsigned HOST_WIDE_INT, initialize to
12292 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12293 (ix86_function_specific_restore): Likewise.
12295 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12298 * postreload.c (reload_combine_recognize_pattern): Perform
12299 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12300 truncate_int_for_mode the result for the destination's mode.
12303 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12304 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12306 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12309 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12312 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12313 regno_allocno_class_array and sorted_pseudos.
12314 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12315 insns where regno is used.
12317 2018-03-16 Martin Liska <mliska@suse.cz>
12320 * multiple_target.c (create_dispatcher_calls): Redirect
12321 reference in the symbol table.
12323 2018-03-16 Martin Liska <mliska@suse.cz>
12326 * multiple_target.c (create_dispatcher_calls): Redirect also
12329 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12333 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12334 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12335 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12337 2018-03-16 Julia Koval <julia.koval@intel.com>
12339 * doc/invoke.texi (Skylake Server): Add CLWB.
12340 Cannonlake): Remove CLWB.
12342 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12344 PR tree-optimization/84841
12345 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12347 (FLOAT_ONE_CONST_TYPE): Define.
12348 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12349 (sort_by_operand_rank): Put entries with higher constant_type last
12350 rather than first to match comments.
12352 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12354 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12357 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12360 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12361 check and use address of target always.
12363 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12366 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12367 (indirect_thunk_bnd_needed): Likewise.
12368 (indirect_thunks_used): Likewise.
12369 (indirect_thunks_bnd_used): Likewise.
12370 (indirect_return_needed): New.
12371 (indirect_return_bnd_needed): Likewise.
12372 (output_indirect_thunk_function): Add a bool argument for
12374 (output_indirect_thunk_function): Don't generate alias for
12375 function return thunk.
12376 (ix86_code_end): Call output_indirect_thunk_function to generate
12377 function return thunks.
12378 (ix86_output_function_return): Set indirect_return_bnd_needed
12379 and indirect_return_needed instead of indirect_thunk_bnd_needed
12380 and indirect_thunk_needed.
12382 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12384 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12385 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12386 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12388 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12389 Paul Hua <paul.hua.gm@gmail.com>
12392 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12394 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12396 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12397 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12398 resp. SFmode cases.
12400 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12403 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12404 instead of GET_MODE_SIZE when comparing Units.
12406 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12409 * varasm.c (hash_section): Return an unchangeble hash value
12410 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12411 Return !aarch64_can_use_per_function_literal_pools_p ().
12413 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12416 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12417 rather than address of cmode as last argument to prepare_cmp_insn.
12419 2018-03-15 Julia Koval <julia.koval@intel.com>
12421 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12422 F_AVX512VNNI, F_AVX512BITALG): New.
12424 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12427 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12428 insn for floating-point loads and stores.
12430 2018-03-14 Carl Love <cel@us.ibm.com>
12432 * config/rs6000/rs6000-c.c: Add macro definitions for
12433 ALTIVEC_BUILTIN_VEC_PERMXOR.
12434 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12435 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12436 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12437 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12439 * config/doc/extend.texi: Add prototypes for vec_permxor.
12441 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12444 * diagnostic-show-locus.c (class layout_point): Convert m_line
12445 from int to linenum_type.
12446 (line_span::comparator): Use linenum "compare" function when
12447 comparing line numbers.
12448 (test_line_span): New function.
12449 (layout_range::contains_point): Convert param "row" from int to
12451 (layout_range::intersects_line_p): Likewise.
12452 (layout::will_show_line_p): Likewise.
12453 (layout::print_source_line): Likewise.
12454 (layout::should_print_annotation_line_p): Likewise.
12455 (layout::print_annotation_line): Likewise.
12456 (layout::print_leading_fixits): Likewise.
12457 (layout::annotation_line_showed_range_p): Likewise.
12458 (struct line_corrections): Likewise for field m_row.
12459 (line_corrections::line_corrections): Likewise for param "row".
12460 (layout::print_trailing_fixits): Likewise.
12461 (layout::get_state_at_point): Likewise.
12462 (layout::get_x_bound_for_row): Likewise.
12463 (layout::print_line): Likewise.
12464 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12465 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12466 * input.c (selftest::test_linenum_comparisons): New function.
12467 (selftest::input_c_tests): Call it.
12468 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12469 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12470 * selftest.h (ASSERT_GT): New macro.
12471 (ASSERT_GT_AT): New macro.
12472 (ASSERT_LT): New macro.
12473 (ASSERT_LT_AT): New macro.
12475 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12477 PR rtl-optimization/84780
12478 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12480 2018-03-14 Martin Liska <mliska@suse.cz>
12482 * tree.c (record_node_allocation_statistics): Use
12483 get_stats_node_kind.
12484 (get_stats_node_kind): New function extracted from
12485 record_node_allocation_statistics.
12486 (free_node): Use get_stats_node_kind.
12488 2018-03-14 Richard Biener <rguenther@suse.de>
12490 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12491 that the value-set of ANTIC_IN doesn't grow.
12494 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12496 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12497 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12499 2018-03-14 Julia Koval <julia.koval@intel.com>
12501 * config.gcc (icelake-client, icelake-server): New.
12503 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12504 (initial_ix86_arch_features): Ditto.
12505 (PTA_SKYLAKE): Add SGX.
12506 (PTA_ICELAKE): Remove.
12507 (PTA_ICELAKE_CLIENT): New.
12508 (PTA_ICELAKE_SERVER): New.
12509 (ix86_option_override_internal): Split up icelake on icelake client and
12511 (get_builtin_code_for_version): Ditto.
12512 (fold_builtin_cpu): Ditto.
12513 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12514 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12515 * config/i386/i386.h (processor_type): Ditto.
12516 * doc/invoke.texi: Ditto.
12518 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12521 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12522 INTEGER_CST offset, add it together with bitpos / 8 and
12523 sign extend based on POINTER_SIZE.
12527 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12530 * config/i386/constraints.md (Yc): New register constraint.
12531 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12532 Use Yc constraint for alternative 2 of operand 0. Remove
12533 preferred_for_speed attribute.
12535 2018-03-14 Richard Biener <rguenther@suse.de>
12537 PR tree-optimization/84830
12538 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12539 with the old one to avoid oscillations.
12541 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12544 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12546 (assign_by_spills): Return a flag of reload assignment failure.
12547 Do not process the reload assignment failures. Do not spill other
12548 reload pseudos if they has the same reg class. Update n if
12550 (lra_assign): Add a return arg. Set up from the result of
12551 assign_by_spills call.
12552 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12553 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12554 usage_insns if it is not NULL.
12555 (spill_hard_reg_in_range): New function.
12556 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12557 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12558 function prototypes.
12559 (lra_assign): Change prototype.
12560 * lra.c (lra): Add code to deal with fails by splitting hard reg
12563 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12565 * config/riscv/riscv.opt (mrelax): New option.
12566 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12567 "norelax" when riscv_mrelax is disabled.
12568 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12570 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12573 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12574 reassociation for int modes.
12576 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12578 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12579 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12581 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12582 * config/aarch64/aarch64-sve.md
12583 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12584 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12585 (*extend<mode><Vwide>2): Rename to...
12586 (aarch64_sve_extend<mode><Vwide>2): ...this.
12587 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12588 renaming the old pattern to...
12589 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12591 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12592 define_expand, renaming the old pattern to...
12593 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12594 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12595 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12596 account when deciding which SVE instruction the optab should use.
12597 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12599 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12601 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12602 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12603 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12604 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12605 (tlsdesc_small_<mode>): Turn a define_expand and use
12606 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
12607 (tlsdesc_small_advsimd_<mode>): ...this.
12608 (tlsdesc_small_sve_<mode>): New pattern.
12610 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12612 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
12613 (UNSPEC_UMUL_HIGHPART): New constants.
12614 (MUL_HIGHPART): New int iteraor.
12615 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
12616 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
12618 (*<su>mul<mode>3_highpart): New define_insn.
12620 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12623 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12626 2018-03-13 Martin Liska <mliska@suse.cz>
12629 * (sem_item_optimizer::sem_item_optimizer): Initialize new
12631 (sem_item_optimizer::~sem_item_optimizer): Release it.
12632 (sem_item_optimizer::merge_classes): Register variable aliases.
12633 (sem_item_optimizer::fixup_pt_set): New function.
12634 (sem_item_optimizer::fixup_points_to_sets): Likewise.
12635 * ipa-icf.h: Declare new variables and functions.
12637 2018-03-13 Jakub Jelinek <jakub@redhat.com>
12639 PR middle-end/84834
12640 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
12641 integer_pow2p@2 and test integer_pow2p in condition.
12642 (A < 0 ? C : 0): Similarly for @1.
12644 PR middle-end/84831
12645 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
12646 characters starting at p contain '\0' character, don't look beyond
12650 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
12651 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
12654 * reg-stack.c (change_stack): Change update_end var from int to
12655 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
12656 also call set_block_for_insn on the newly added insns and rescan.
12659 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
12660 on the last operand.
12663 * tree.c (stabilize_reference_1): Return save_expr (e) for
12664 STATEMENT_LIST even if it doesn't have side-effects.
12666 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
12668 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
12670 2018-03-12 Renlin Li <renlin.li@arm.com>
12672 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
12673 aarch64_output_scalar_simd_mov_immediate.
12675 2018-03-12 Martin Sebor <msebor@redhat.com>
12677 PR tree-optimization/83456
12678 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
12679 for perfectly overlapping calls to memcpy.
12680 (gimple_fold_builtin_memory_chk): Same.
12681 (gimple_fold_builtin_strcpy): Handle no-warning.
12682 (gimple_fold_builtin_stxcpy_chk): Same.
12683 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
12685 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12687 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
12688 parameter. Use it for SFmode.
12689 (rs6000_function_arg_advance_1): Adjust.
12690 (rs6000_function_arg): Adjust.
12691 (rs6000_gimplify_va_arg): Pass false for that new parameter.
12693 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
12695 PR rtl-optimization/84169
12696 PR rtl-optimization/84780
12697 * combine.c (can_combine_p): Check for a 2-insn combination whether
12698 the destination register is used between the two insns, too.
12700 2018-03-12 Richard Biener <rguenther@suse.de>
12702 PR tree-optimization/84803
12703 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
12704 for refs DR analysis didn't process.
12706 2018-03-12 Richard Biener <rguenther@suse.de>
12708 PR tree-optimization/84777
12709 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
12710 force-vectorize loops ignore whether we are optimizing for size.
12712 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
12714 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
12715 (TARGET_MD_ASM_ADJUST): Define.
12717 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
12718 Kito Cheng <kito.cheng@gmail.com>
12719 Chung-Ju Wu <jasonwucj@gmail.com>
12721 * config/nds32/nds32.c (nds32_compute_stack_frame,
12722 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
12723 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
12724 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
12725 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
12726 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
12727 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
12728 * config/nds32/nds32.md (prologue, epilogue): Use macro
12729 NDS32_V3PUSH_AVAILABLE_P to do checking.
12731 2018-03-11 Jakub Jelinek <jakub@redhat.com>
12734 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
12735 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
12736 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
12737 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
12738 addition of most attributes on !orig_type_die or the attribute not
12739 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
12741 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12742 Chung-Ju Wu <jasonwucj@gmail.com>
12744 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
12745 __NDS32_VH__ macro.
12746 * config/nds32/nds32.opt (mvh): New option.
12748 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12749 Chung-Ju Wu <jasonwucj@gmail.com>
12751 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
12753 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
12754 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
12757 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
12758 Chung-Ju Wu <jasonwucj@gmail.com>
12760 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
12762 * config/nds32/nds32-multiple.md (strlensi): New pattern.
12763 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
12765 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
12766 Kito Cheng <kito.cheng@gmail.com>
12767 Chung-Ju Wu <jasonwucj@gmail.com>
12769 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
12770 UNSPEC_FFMISM and UNSPEC_FLMISM.
12771 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
12772 for ffb, ffmism and flmism.
12773 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
12774 (unspec_ffmism): Ditto.
12775 (unspec_flmism): Ditto.
12776 (nds32_expand_builtin_impl): Check if string extension is available.
12777 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
12778 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
12780 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
12783 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12786 * lra-assigns.c (assign_by_spills): Return a flag of reload
12787 assignment failure. Do not process the reload assignment
12788 failures. Do not spill other reload pseudos if they has the same
12790 (lra_assign): Add a return arg. Set up from the result of
12791 assign_by_spills call.
12792 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12793 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12794 usage_insns if it is not NULL.
12795 (spill_hard_reg_in_range): New function.
12796 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12797 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12798 function prototypes.
12799 (lra_assign): Change prototype.
12800 * lra.c (lra): Add code to deal with fails by splitting hard reg
12803 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
12806 * config/i386/i386.opt: Replace Enforcment with Enforcement.
12808 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
12811 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
12812 (dw_val_node): Add val_symbolic_view.
12813 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
12814 (symview_upper_bound): New.
12815 (new_line_info_table): Initialize symviews_since_reset.
12816 (dwarf2out_source_line): Count symviews_since_reset and set
12817 symview_upper_bound.
12818 (dw_val_equal_p): Handle symview.
12819 (add_AT_symview): New.
12820 (print_dw_val): Handle symview.
12821 (attr_checksum, attr_checksum_ordered): Likewise.
12822 (same_dw_val_p, size_of_die): Likewise.
12823 (value_format, output_die): Likewise.
12824 (add_high_low_attributes): Use add_AT_symview for entry_view.
12825 (dwarf2out_finish): Reset symview_upper_bound, clear
12828 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
12831 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
12832 Add strict argument and use it.
12833 (rs6000_split_multireg_move): Update for new strict argument.
12834 (mem_operand_gpr): Disallow all non-offsettable addresses.
12835 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
12837 2018-03-09 Jakub Jelinek <jakub@redhat.com>
12840 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
12841 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
12842 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
12845 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
12846 decl, use remap_type if we want to use the type.
12848 2018-03-09 Martin Sebor <msebor@redhat.com>
12850 PR tree-optimization/84526
12851 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12853 (builtin_access::generic_overlap): Be prepared to handle non-array
12856 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
12858 PR rtl-optimization/84682
12859 * lra-constraints.c (process_address_1): Check is_address flag
12860 for address constraints.
12861 (process_alt_operands): Likewise.
12862 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
12863 preprocess_constraints.
12864 * recog.h (preprocess_constraints): Add oploc parameter.
12866 * recog.c (preprocess_constraints): Test address_operand for
12867 CT_ADDRESS constraints.
12869 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
12872 * lra-assigns.c (assign_by_spills): Return a flag of reload
12873 assignment failure. Do not process the reload assignment
12874 failures. Do not spill other reload pseudos if they has the same
12876 (lra_assign): Add a return arg. Set up from the result of
12877 assign_by_spills call.
12878 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12879 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12880 usage_insns if it is not NULL.
12881 (spill_hard_reg_in_range): New function.
12882 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12883 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12884 function prototypes.
12885 (lra_assign): Change prototype.
12886 * lra.c (lra): Add code to deal with fails by splitting hard reg
12889 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12892 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
12893 Accept complain bool parameter. Only emit errors if it is true.
12894 (arm_parse_cpu_option_name): Likewise.
12895 (arm_target_thumb_only): Adjust callers of the above.
12896 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
12897 prototype to take a default true bool parameter.
12898 (arm_parse_arch_option_name): Likewise.
12900 2018-03-09 David Malcolm <dmalcolm@redhat.com>
12901 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12905 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
12906 * configure: Regenerate.
12907 * configure.ac ("linker --version-script option"): New.
12908 ("linker soname option"): New.
12910 2018-03-09 Richard Biener <rguenther@suse.de>
12912 PR tree-optimization/84775
12913 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
12914 immediate uses of predicate stmts and mark them modified.
12917 PR tree-optimization/84178
12918 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12920 (version_loop_for_if_conversion): Delay update_ssa call.
12921 (tree_if_conversion): Delay update_ssa until after predicate
12924 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
12927 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
12928 when the function accesses prior frames.
12930 2018-03-08 Jakub Jelinek <jakub@redhat.com>
12933 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
12934 gen_llsym, otherwise call maybe_gen_llsym.
12936 PR inline-asm/84742
12937 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
12938 has ',' character inside of it.
12940 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12943 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
12944 as clobbering CC_REGNUM.
12946 2018-03-08 Richard Biener <rguenther@suse.de>
12948 PR middle-end/84552
12949 * tree-scalar-evolution.c: Include tree-into-ssa.h.
12950 (follow_copies_to_constant): Do not follow SSA names registered
12953 2018-03-08 Richard Biener <rguenther@suse.de>
12955 PR tree-optimization/84178
12956 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
12958 (version_loop_for_if_conversion): Delay update_ssa call.
12959 (tree_if_conversion): Delay update_ssa until after predicate
12962 2018-03-08 David Malcolm <dmalcolm@redhat.com>
12964 PR tree-optimization/84178
12965 * tree-if-conv.c (release_bb_predicate): Remove the
12966 the assertion that the stmts have NULL use_ops.
12967 Discard the statements, asserting that they haven't
12968 yet been added to a BB.
12970 2018-03-08 Richard Biener <rguenther@suse.de>
12972 PR tree-optimization/84746
12973 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
12974 (phi_translate): Pass in destination ANTIC_OUT set.
12975 (phi_translate_1): Likewise. For a simplified result lookup
12976 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
12977 (phi_translate_set): Adjust.
12978 (do_pre_regular_insertion): Likewise.
12979 (do_pre_partial_partial_insertion): Likewise.
12981 2018-03-08 Martin Liska <mliska@suse.cz>
12983 PR gcov-profile/84735
12984 * doc/gcov.texi: Document usage of profile files.
12985 * gcov-io.h: Document changes in the format.
12987 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
12991 * dwarf2out.c (struct dw_line_info_table): Update comments for
12993 (FORCE_RESET_NEXT_VIEW): New.
12994 (FORCE_RESETTING_VIEW_P): New.
12995 (RESETTING_VIEW_P): Check for -1 too.
12996 (ZERO_VIEW_P): Likewise.
12997 (new_line_info_table): Force-reset next view.
12998 (dwarf2out_begin_function): Likewise.
12999 (dwarf2out_source_line): Simplify zero_view_p initialization.
13000 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13001 view directly. Omit view when omitting .loc at line 0.
13003 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13005 PR tree-optimization/84740
13006 * tree-switch-conversion.c (process_switch): Call build_constructors
13007 only if info.phi_count is non-zero.
13009 PR tree-optimization/84739
13010 * tree-tailcall.c (find_tail_calls): Check call arguments against
13011 DECL_ARGUMENTS (current_function_decl) rather than
13012 DECL_ARGUMENTS (func) when checking for tail recursion.
13014 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13016 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13017 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13018 Volker Reichelt's entry and add entries for people that perform
13019 GCC fuzzy testing and report numerous bugs.
13021 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13024 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13025 readonly data in sdata, if that is disabled.
13026 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13027 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13028 -mreadonly-in-sdata option.
13030 2018-03-07 Martin Sebor <msebor@redhat.com>
13032 PR tree-optimization/84468
13033 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13034 basic block when looking for nul assignment.
13036 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13039 * except.h (output_function_exception_table): Adjust prototype.
13040 * except.c (output_function_exception_table): Remove FNNAME parameter
13041 and add SECTION parameter. Ouput one part of the table at a time.
13042 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13043 the first part of the exception table and emit unwind directives.
13044 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13045 (i386_pe_seh_cold_init): Likewise.
13046 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13047 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13048 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13049 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13050 * config/i386/winnt.c: Include except.h.
13051 (struct seh_frame_state): Add reg_offset, after_prologue and
13052 in_cold_section fields.
13053 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13054 (i386_pe_seh_cold_init): New function.
13055 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13056 to seh->in_cold_section.
13057 (seh_emit_push): Record the offset of the push.
13058 (seh_emit_save): Record the offet of the save.
13059 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13060 Test seh->after_prologue to disregard the epilogue.
13061 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13062 (i386_pe_end_cold_function): New function.
13064 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13067 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13068 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13071 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13073 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13074 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13076 PR middle-end/84723
13077 * multiple_target.c: Include tree-inline.h and intl.h.
13078 (expand_target_clones): Diagnose and fail if node->definition and
13079 !tree_versionable_function_p (node->decl).
13081 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13083 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13085 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13086 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13087 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13089 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13092 * combine.c (try_combine): Use reg_or_subregno instead of handling
13093 just paradoxical SUBREGs and REGs.
13095 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13097 * config/arc/arc.c (arc_finalize_pic): Remove function.
13098 (arc_must_save_register): We use single base PIC register, remove
13099 checks to save/restore the PIC register.
13100 (arc_expand_prologue): Likewise.
13101 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13103 (arc_verify_short): Likewise.
13104 (arc_attr_type): Likewise.
13105 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13106 (walk_stores): Likewise.
13107 (arc_address_cost): Make it static.
13108 (arc_verify_short): Likewise.
13109 (branch_dest): Likewise.
13110 (arc_attr_type): Likewise.
13111 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13112 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13113 (arc_final_prescan_insn): Remove inserting the nops due to
13114 hardware hazards. It is done in reorg step.
13115 (insn_length_variant_t): Remove.
13116 (insn_length_parameters_t): Likewise.
13117 (arc_insn_length_parameters): Likewise.
13118 (arc_get_insn_variants): Likewise.
13119 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13121 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13123 PR inline-asm/84683
13124 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13127 PR tree-optimization/84687
13128 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13130 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13132 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13134 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13135 Rename to ppc_speculation_barrier.
13136 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13137 __builtin_ppc_speculation_barrier.
13139 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13142 * combine.c (combine_simplify_rtx): Don't try to simplify if
13143 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13146 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13148 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13149 to 32 bytes when compiling for POWER9.
13151 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13154 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13155 regparm >= 3 with no arg reg available also for calls with
13156 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13159 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13161 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13163 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13166 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13168 2018-03-05 Richard Biener <rguenther@suse.de>
13170 PR tree-optimization/84486
13171 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13172 When inserting a __builtin_assume_aligned call set the LHS
13173 SSA name alignment info accordingly.
13175 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13177 PR tree-optimization/84114
13178 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13179 Avoid reassociation of FLOAT_MODE addition.
13181 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13183 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13184 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13185 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13186 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13187 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13188 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13189 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13191 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13192 __builtin_ia32_wbinvd): New builtins.
13193 (SPECIAL_ARGS2): New.
13194 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13195 (SPECIAL_ARGS2): New.
13196 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13197 (ix86_valid_target_attribute_inner_p): Ditto.
13198 (ix86_init_mmx_sse_builtins): Add special_args2.
13199 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13200 TARGET_WBNOINVD_P): New.
13201 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13202 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13203 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13204 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13205 * config/i386/pconfigintrin.h: New file.
13206 * config/i386/wbnoinvdintrin.h: Ditto.
13207 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13209 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13211 2018-03-05 Richard Biener <rguenther@suse.de>
13213 PR tree-optimization/84670
13214 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13216 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13217 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13218 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13219 doesn't grow if all successors (recursively) were visited at least
13222 2018-03-05 Richard Biener <rguenther@suse.de>
13224 PR tree-optimization/84650
13225 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13226 if executed in the loop pipeline.
13228 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13230 * doc/configfiles.texi (Configuration Files): Move info about
13231 conditionalizing $target-protos.h to...
13232 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13233 differs from $target-protos.h.
13235 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13236 Chung-Ju Wu <jasonwucj@gmail.com>
13238 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13239 * config/nds32/nds32-multiple.md (setmemsi): Define.
13240 * config/nds32/nds32-memory-manipulation.c
13241 (nds32_gen_dup_4_byte_to_word_value): New.
13242 (emit_setmem_word_loop): New.
13243 (emit_setmem_byte_loop): New.
13244 (nds32_expand_setmem_loop): New.
13245 (nds32_expand_setmem_loop_v3m): New.
13246 (nds32_expand_setmem_unroll): New.
13247 (nds32_expand_setmem): New.
13249 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13250 Chung-Ju Wu <jasonwucj@gmail.com>
13252 * config/nds32/nds32-memory-manipulation.c
13253 (nds32_emit_load_store): New.
13254 (nds32_emit_post_inc_load_store): New.
13255 (nds32_emit_mem_move): New.
13256 (nds32_emit_mem_move_block): New.
13257 (nds32_expand_movmemsi_loop_unknown_size): New.
13258 (nds32_expand_movmemsi_loop_known_size): New.
13259 (nds32_expand_movmemsi_loop): New.
13260 (nds32_expand_movmemsi_unroll): New.
13261 (nds32_expand_movmemqi): Rename ...
13262 (nds32_expand_movmemsi): ... to this.
13263 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13264 (movmemsi): ... to this.
13265 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13266 (nds32_expand_movmemsi): ... to this.
13268 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13269 Monk Chiang <sh.chiang04@gmail.com>
13270 Chung-Ju Wu <jasonwucj@gmail.com>
13272 * config/nds32/nds32-protos.h
13273 (nds32_expand_load_multiple): New arguments.
13274 (nds32_expand_store_multiple): Ditto.
13275 (nds32_valid_multiple_load_store): Rename ...
13276 (nds32_valid_multiple_load_store_p): ... to this.
13277 * config/nds32/nds32-memory-manipulation.c
13278 (nds32_expand_load_multiple): Refine implementation.
13279 (nds32_expand_store_multiple): Ditto.
13280 * config/nds32/nds32-multiple.md
13281 (load_multiple): Update nds32_expand_load_multiple interface.
13282 (store_multiple): Update nds32_expand_store_multiple interface.
13283 * config/nds32/nds32-predicates.c
13284 (nds32_valid_multiple_load_store): Rename ...
13285 (nds32_valid_multiple_load_store_p): ... to this and refine
13287 * config/nds32/predicates.md
13288 (nds32_load_multiple_and_update_address_operation): New predicate.
13289 (nds32_store_multiple_and_update_address_operation): New predicate.
13291 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13292 Chung-Ju Wu <jasonwucj@gmail.com>
13294 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13295 (combo): New attribute.
13296 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13298 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13300 * config/nds32/nds32.opt: Change -mcmodel= default value.
13302 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13303 Monk Chiang <sh.chiang04@gmail.com>
13304 Chung-Ju Wu <jasonwucj@gmail.com>
13306 * config/nds32/constants.md (unspec_element): New enum.
13307 * config/nds32/constraints.md (Umw): New constraint.
13308 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13309 * config/nds32/nds32-intrinsic.md: Likewise.
13310 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13311 (nds32_valid_smw_lwm_base_p): New.
13312 (nds32_output_smw_single_word): New.
13313 (nds32_output_lmw_single_word): New.
13314 (nds32_expand_unaligned_load): New.
13315 (nds32_expand_unaligned_store): New.
13316 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13317 (nds32_output_smw_single_word): Declare.
13318 (nds32_output_lmw_single_word): Declare.
13319 (nds32_expand_unaligned_load): Declare.
13320 (nds32_expand_unaligned_store): Declare.
13321 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13322 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13323 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13324 NDS32_BUILTIN_UASTORE_DW.
13325 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13328 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13329 Kito Cheng <kito.cheng@gmail.com>
13330 Chung-Ju Wu <jasonwucj@gmail.com>
13332 * config/nds32/nds32-intrinsic.c
13333 (nds32_expand_builtin_null_ftype_reg): Delete.
13334 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13335 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13336 (nds32_read_argument): New.
13337 (nds32_legitimize_target): Ditto.
13338 (nds32_legitimize_argument): Ditto.
13339 (nds32_check_constant_argument): Ditto.
13340 (nds32_expand_unop_builtin): Ditto.
13341 (nds32_expand_unopimm_builtin): Ditto.
13342 (nds32_expand_binop_builtin): Ditto.
13343 (nds32_builtin_decl_impl): Ditto.
13344 (builtin_description): Ditto.
13345 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13346 (nds32_init_builtins_impl): Ditto.
13347 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13348 (nds32_builtin_decl): New.
13349 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13350 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13352 2018-03-02 Jeff Law <law@redhat.com>
13354 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13355 (redundant_insn, fill_simple_delay_slots): Likewise.
13356 (fill_slots_from_thread): Likewise.
13357 * resource.c (mark_referenced_resources): Likewise.
13358 (mark_set_resources, find_dead_or_set_registers): Likewise.
13360 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13362 * substring-locations.h (format_warning_va): Formatting fix for
13363 ATTRIBUTE_GCC_DIAG.
13364 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13366 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13367 * substring-locations.c: Include intl.h.
13368 (format_warning_va): Turned into small wrapper around
13369 format_warning_n_va, renamed to ...
13370 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13371 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13373 (format_warning_at_substring_n): New function.
13374 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13375 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13376 format_warning_at_substring with just a shorter name instead of
13377 const function pointer.
13378 (fmtwarn_n): New function.
13379 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13380 appropriate, get rid of all the fmtstr temporaries, move conditionals
13381 with G_() wrapped string literals directly into fmtwarn arguments,
13382 cast dir.len to (int), formatting fixes.
13384 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13386 * doc/invoke.texi: Remove "Cilk Plus" references.
13388 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13389 Richard Biener <rguenther@suse.de>
13392 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13393 for error or warning attributes if CALL_FROM_THUNK_P is set.
13396 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13399 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13400 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13403 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13404 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13406 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13407 instead of -1U in last predictors element's probability member.
13409 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13412 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13413 arguments if they are comparable.
13415 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13417 PR tree-optimization/84634
13418 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13419 masks and masked_loop_p with a single loop_masks, making sure it's
13420 null for bb vectorization.
13422 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13424 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13425 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13426 loop->force_vectorize to check whether there is no alias.
13428 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13431 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13433 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13435 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13436 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13437 instead of a loop around prev_real_insn.
13438 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13441 PR inline-asm/84625
13442 * config/i386/i386.c (ix86_print_operand): Use conditional
13443 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13446 2018-03-02 Richard Biener <rguenther@suse.de>
13448 PR tree-optimization/84427
13449 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13450 (bitmap_set_subtract_values): Rewrite to handle multiple
13453 (prune_clobbered_mems): Likewise.
13454 (phi_translate): Take edge instead of pred/phiblock.
13455 (phi_translate_1): Likewise.
13456 (phi_translate_set): Likewise. Insert all translated
13457 exprs for a value into the set, keeping possibly multiple
13458 expressions per value.
13459 (compute_antic_aux): Adjust for phi_translate changes.
13460 When intersecting union the expressions and prune those
13461 not in the final value set, keeping possibly multiple
13462 expressions per value. Do not use value-insertion
13463 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13464 all expressions. Add verification that the value-sets
13465 only shrink during iteration.
13466 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13467 (do_pre_regular_insertion): Likewise.
13468 (do_pre_partial_partial_insertion): Likewise.
13470 2018-03-02 Richard Biener <rguenther@suse.de>
13473 * config/darwin.c (saved_debug_info_level): New static global.
13474 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13475 (darwin_asm_lto_end): Restore debug info generation settings.
13477 2018-03-01 Martin Liska <mliska@suse.cz>
13480 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13481 volatile arguments.
13483 2018-03-01 Richard Biener <rguenther@suse.de>
13486 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13487 type annotation with LTO when debug was disabled at compile-time.
13489 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13491 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13493 (mips_final_postscan_insn): Likewise.
13495 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13497 PR rtl-optimization/84528
13498 * alias.c (init_alias_target): Add commentary.
13499 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13500 a unique base value if the frame pointer is not eliminated
13501 to the stack pointer.
13503 2018-03-01 Tom de Vries <tom@codesourcery.com>
13505 PR rtl-optimization/83327
13506 * lra-int.h (hard_regs_spilled_into): Declare.
13507 * lra.c (hard_regs_spilled_into): Define.
13508 (init_reg_info): Init hard_regs_spilled_into.
13509 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13510 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13511 (process_bb_lives): Handle hard_regs_spilled_into.
13512 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13513 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13515 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13517 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13518 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13519 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13520 * config/rs6000/aix72.h: New file.
13522 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13524 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13525 instead of warning_at with conditional singular and plural messages
13529 * stor-layout.c (update_alignment_for_field): For
13530 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13531 && !DECL_PACKED (field), do the alignment update, just use
13532 only desired_align instead of MAX (type_align, desired_align)
13534 (place_field): Don't do known_align < desired_align handling
13535 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13536 is non-NULL, instead do it after rli->prev_field handling and
13537 only if not within a bitfield word. For DECL_PACKED (field)
13538 use type_align of BITS_PER_UNIT.
13540 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13542 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13543 superfluous parentheses and trailing spaces.
13545 2018-02-28 Richard Biener <rguenther@suse.de>
13547 PR tree-optimization/84584
13548 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13549 SCoPs with fake exit edge.
13551 2018-02-28 Martin Liska <mliska@suse.cz>
13554 * timevar.c (timer::print): Fix format to properly print 100%
13557 2018-02-28 Richard Biener <rguenther@suse.de>
13559 PR middle-end/84607
13560 * genmatch.c (capture_info::walk_match): Do not mark
13561 captured expressions without operands as expr_p given
13562 they act more like predicates and should be subject to
13563 "lost tail" side-effect preserving.
13565 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13567 PR rtl-optimization/81611
13568 * auto-inc-dec.c (attempt_change): Move dead note from
13569 mem_insn if it's the next use of regno
13570 (find_address): Take address use of reg holding
13571 non-incremented value. Add parm to limit search to the named
13573 (merge_in_block): Attempt to use a mem insn that is the next
13574 use of the original regno.
13576 2018-02-27 Martin Sebor <msebor@redhat.com>
13579 * doc/invoke.texi (-Wmissing-attributes): New option.
13580 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13582 2018-02-27 Martin Sebor <msebor@redhat.com>
13584 PR translation/84207
13585 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13586 n argument to unsigned HOST_WIDE_INT.
13587 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13588 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13589 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13590 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13592 2018-02-27 Richard Biener <rguenther@suse.de>
13594 PR tree-optimization/84512
13595 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13596 Do not use the estimate returned from record_stmt_cost for
13597 the scalar iteration cost but sum properly using add_stmt_cost.
13599 2018-02-27 Richard Biener <rguenther@suse.de>
13601 PR tree-optimization/84466
13602 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13603 Adjust last change to less strictly validate use operands.
13605 2018-02-27 Martin Liska <mliska@suse.cz>
13607 PR gcov-profile/84548
13608 * gcov.c (process_file): Allow partial overlap and consider it
13609 also as group functions.
13610 (output_lines): Properly calculate range of lines for a group.
13612 2018-02-27 Martin Liska <mliska@suse.cz>
13614 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
13615 'ggc' suffixes. Change first column width.
13616 (timer::print): Fix formatting of the column.
13618 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
13620 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
13621 preserve inline entry blocks for the sake of debug inline
13622 entry point markers alone.
13623 (remove_unused_locals): Suggest in comments a better place to
13624 force the preservation of inline entry blocks that are
13625 otherwise unused, but do not preserve them.
13627 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13629 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
13631 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13634 * config/i386/constraints.md (Bs): Replace
13635 ix86_indirect_branch_register with
13636 TARGET_INDIRECT_BRANCH_REGISTER.
13638 * config/i386/i386.md (indirect_jump): Likewise.
13639 (tablejump): Likewise.
13640 (*sibcall_memory): Likewise.
13641 (*sibcall_value_memory): Likewise.
13642 Peepholes of indirect call and jump via memory: Likewise.
13643 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
13644 (*sibcall_value_GOT_32): Likewise.
13645 * config/i386/predicates.md (indirect_branch_operand): Likewise.
13646 (GOT_memory_operand): Likewise.
13647 (call_insn_operand): Likewise.
13648 (sibcall_insn_operand): Likewise.
13649 (GOT32_symbol_operand): Likewise.
13650 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
13652 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13654 PR rtl-optimization/83496
13655 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
13656 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
13657 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
13658 redundant insn, if any.
13659 (relax_delay_slots): Likewise.
13660 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
13662 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
13664 PR tree-optimization/83965
13665 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
13666 that grouped statements are part of a reduction chain. Return
13667 true if the statement is not marked as a reduction itself but
13668 is part of a group.
13669 (vect_recog_dot_prod_pattern): Don't check whether the statement
13670 is part of a group here.
13671 (vect_recog_sad_pattern): Likewise.
13672 (vect_recog_widen_sum_pattern): Likewise.
13674 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
13677 * final.c (rest_of_clean_state): Also look for calls inside sequences.
13679 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
13682 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
13684 (ix86_output_indirect_function_return): New prototype.
13685 (ix86_split_simple_return_pop_internal): Likewise.
13686 * config/i386/i386.c (indirect_return_via_cx): New.
13687 (indirect_return_via_cx_bnd): Likewise.
13688 (indirect_thunk_name): Handle return va CX_REG.
13689 (output_indirect_thunk_function): Create alias for
13690 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
13691 (ix86_output_indirect_jmp): Remove the bool argument.
13692 (ix86_output_indirect_function_return): New function.
13693 (ix86_split_simple_return_pop_internal): Likewise.
13694 * config/i386/i386.md (*indirect_jump): Don't pass false
13695 to ix86_output_indirect_jmp.
13696 (*tablejump_1): Likewise.
13697 (simple_return_pop_internal): Change it to define_insn_and_split.
13698 Call ix86_split_simple_return_pop_internal to split it for
13699 -mfunction-return=.
13700 (simple_return_indirect_internal): Call
13701 ix86_output_indirect_function_return instead of
13702 ix86_output_indirect_jmp.
13704 2018-02-26 Jakub Jelinek <jakub@redhat.com>
13707 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
13708 memset and value initialization afterwards.
13710 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
13712 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
13714 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13717 * common/config/aarch64/aarch64-common.c
13718 (aarch_option_optimization_table[]): Switch
13719 off fomit-frame-pointer
13721 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13722 Chung-Ju Wu <jasonwucj@gmail.com>
13724 * config/nds32/nds32-multiple.md (load_multiple): Disallow
13726 (store_multiple): Ditto.
13728 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
13730 * config.gcc: Add --with-cpu support for nds32 target.
13731 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
13732 * config/nds32/nds32.opt: Add -mcpu= option.
13734 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
13736 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
13737 isel=yes): Warn for these deprecated options.
13739 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
13741 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
13742 ISA_2_5_MASKS_EMBEDDED.
13744 2018-02-23 Jakub Jelinek <jakub@redhat.com>
13746 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
13747 p->max as pointers rather than using iterative_hash_expr.
13749 2018-02-23 Carl Love <cel@us.ibm.com>
13751 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
13752 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
13754 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
13755 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
13756 P8V_BUILTIN_VEC_VUNSIGNED2.
13758 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
13761 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
13762 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
13764 * lra-constraints.c (curr_insn_transform): Set up
13765 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
13767 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
13768 * lra-eliminations.c (spill_pseudos): Ditto.
13769 (process_insn_for_elimination): Ditto.
13770 * lra-lives.c (reg_early_clobber_p): Use the new macros.
13771 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
13772 LRA_NON_CLOBBERED_ALT.
13774 2018-02-22 Martin Sebor <msebor@redhat.com>
13776 PR tree-optimization/84480
13777 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
13778 to maybe_diag_stxncpy_trunc. Call it.
13779 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
13780 from gimple_fold_builtin_strcpy. Print inlining stack.
13781 (handle_builtin_stxncpy): Print inlining stack.
13782 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
13784 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
13787 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
13788 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
13789 and -fcheck-pointer-bounds are used together.
13790 (indirect_thunk_prefix): New enum.
13791 (indirect_thunk_need_prefix): New function.
13792 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
13793 "_nt" instead of "_bnd" for NOTRACK prefix.
13794 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
13795 (output_indirect_thunk_function): Likewise.
13797 (ix86_code_end): Update output_indirect_thunk_function calls.
13798 (ix86_output_indirect_branch_via_reg): Replace
13799 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
13800 (ix86_output_indirect_branch_via_push): Likewise.
13801 (ix86_output_function_return): Likewise.
13802 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
13803 incompatible with -fcf-protection=branch and
13804 -fcheck-pointer-bounds.
13806 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13809 * config/aarch64/aarch64.c (aarch64_print_address_internal):
13810 Change gcc_assert call to output_operand_lossage.
13812 2018-02-22 Steve Ellcey <sellcey@cavium.com>
13814 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
13816 2018-02-22 DJ Delorie <dj@redhat.com>
13817 Sebastian Perta <sebastian.perta@renesas.com>
13818 Oleg Endo <olegendo@gcc.gnu.org>
13820 * config/rx/rx.c (rx_rtx_costs): New function.
13821 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
13823 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
13825 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
13827 2018-02-22 Martin Liska <mliska@suse.cz>
13830 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
13831 Add "native" as a possible value.
13833 2018-02-22 Martin Liska <mliska@suse.cz>
13836 * config/i386/i386.c (ix86_option_override_internal):
13837 Add "native" as a possible value for -march and -mtune.
13839 2018-02-22 Jakub Jelinek <jakub@redhat.com>
13842 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
13843 to all type variants.
13845 PR tree-optimization/84503
13846 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
13847 width as info->bitpos + info->bitsize - start.
13848 (merged_store_group::merge_overlapping): Simplify width computation.
13849 (check_no_overlap): New function.
13850 (imm_store_chain_info::try_coalesce_bswap): Compute expected
13851 start + width and last_order of the group, fail if check_no_overlap
13853 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
13854 to group if check_no_overlap fails.
13856 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13858 * config/rs6000/altivec.md: Delete contraint arguments to
13859 define_expand, define_split, and define_peephole2, and in
13860 define_insn_and_split if always unused.
13861 * config/rs6000/darwin.md: Ditto.
13862 * config/rs6000/dfp.md: Ditto.
13863 * config/rs6000/rs6000.md: Ditto.
13864 * config/rs6000/sync.md: Ditto.
13865 * config/rs6000/vector.md: Ditto.
13866 * config/rs6000/vsx.md: Ditto.
13868 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
13870 * config/rs6000/altivec.md: Write output control strings as braced
13871 blocks instead of double-quoted strings.
13872 * config/rs6000/darwin.md: Ditto.
13873 * config/rs6000/rs6000.md: Ditto.
13874 * config/rs6000/vector.md: Ditto.
13875 * config/rs6000/vsx.md: Ditto.
13877 2018-02-21 Jason Merrill <jason@redhat.com>
13879 PR c++/84314 - ICE with templates and fastcall attribute.
13880 * attribs.c (build_type_attribute_qual_variant): Remove assert.
13882 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13884 * ipa-cp.c (determine_versionability): Fix comment typos.
13886 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
13889 * ipa-cp.c (determine_versionability): Do not version functions caling
13892 2018-02-21 Martin Liska <mliska@suse.cz>
13895 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
13896 Add "native" as a possible value.
13897 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
13898 the macro when native cpu detection is available.
13900 2018-02-21 Martin Liska <mliska@suse.cz>
13903 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
13904 Add "native" as a possible value.
13905 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
13906 when native cpu detection is available.
13908 2018-02-21 Jakub Jelinek <jakub@redhat.com>
13909 Martin Sebor <msebor@redhat.com>
13911 PR tree-optimization/84478
13912 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
13914 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
13915 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
13916 support which is conservatively correct, for 2 only stay conservative
13917 for maxlen. Formatting and comment capitalization fixes. Add STRICT
13918 argument to the 2 argument get_range_strlen, adjust 6 arg
13919 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
13921 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
13922 (gimple_fold_builtin_strlen): Pass true as last argument to
13925 2018-02-20 Martin Sebor <msebor@redhat.com>
13927 PR middle-end/84095
13928 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
13929 (builtin_memref::set_base_and_offset): Same. Handle inner references.
13930 (builtin_memref::builtin_memref): Factor out parts into
13931 set_base_and_offset and call it.
13933 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13935 PR middle-end/84406
13936 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
13937 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
13938 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
13939 search at the associated MODE_INT.
13941 2018-02-20 Jeff Law <law@redhat.com>
13943 PR middle-end/82123
13944 PR tree-optimization/81592
13945 PR middle-end/79257
13946 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
13947 for range data rather than using global data.
13948 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
13949 range data rather than using global data.
13950 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
13951 pass it to children as needed.
13952 (struct directive::fmtresult): Similarly.
13953 (struct directive::set_width): Similarly.
13954 (struct directive::set_precision): Similarly.
13955 (format_integer, format_directive, parse_directive): Similarly.
13956 (format_none): Accept unnamed vr_values parameter.
13957 (format_percent, format_floating, format_character): Similarly.
13958 (format_string, format_plain): Similarly.
13959 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
13960 the EVRP range analyzer for range data rather than using global data.
13961 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
13962 gimple-ssa-evrp-analyze.h
13963 (class sprintf_dom_walker): Add after_dom_children member function.
13964 Add evrp_range_analyzer member.
13965 (sprintf_dom_walker::before_dom_children): Call into the EVRP
13966 range analyzer as needed.
13967 (sprintf_dom_walker::after_dom_children): New member function.
13968 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
13970 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
13971 (evrp_range_analyzer::pop_to_marker): Likewise.
13973 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
13975 PR tree-optimization/84419
13976 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
13977 with the required type if its current type is compatible but
13980 2018-02-20 Jakub Jelinek <jakub@redhat.com>
13982 PR middle-end/82004
13983 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
13984 after vectorization.
13986 2018-02-20 Martin Liska <mliska@suse.cz>
13989 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
13990 possible values if we don't have a hint.
13992 2018-02-20 Martin Liska <mliska@suse.cz>
13996 * final.c (shorten_branches): Build align_tab array with one
13998 * opts.c (finish_options): Add alignment option limit check.
13999 (MAX_CODE_ALIGN): Likewise.
14000 (MAX_CODE_ALIGN_VALUE): Likewise.
14001 * doc/invoke.texi: Document maximum allowed option value for
14002 all -falign-* options.
14004 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14007 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14008 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14009 * var-tracking.c (emit_note_insn_var_location): Remove all references
14010 to NOTE_INSN_CALL_ARG_LOCATION.
14011 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14012 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14013 Use copy_rtx_if_shared.
14014 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14015 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14016 (dwarf2out_var_location): Remove handling of
14017 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14019 * final.c (final_scan_insn): Remove all references to
14020 NOTE_INSN_CALL_ARG_LOCATION.
14021 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14022 before dumping final insns.
14023 * except.c (emit_note_eh_region_end): Remove all references to
14024 NOTE_INSN_CALL_ARG_LOCATION.
14025 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14026 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14027 * config/arc/arc.c (hwloop_optimize): Likewise.
14028 * config/arm/arm.c (create_fix_barrier): Likewise.
14029 * config/s390/s390.c (s390_chunkify_start): Likewise.
14030 * config/sh/sh.c (find_barrier): Likewise.
14031 * config/i386/i386.c (rest_of_insert_endbranch,
14032 ix86_seh_fixup_eh_fallthru): Likewise.
14033 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14034 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14035 * config/frv/frv.c (frv_function_prologue): Likewise.
14036 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14038 (note_outside_basic_block_p): Remove all references to
14039 NOTE_INSN_CALL_ARG_LOCATION.
14040 * gengtype.c (adjust_field_rtx_def): Likewise.
14041 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14043 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14044 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14047 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14050 PR tree-optimization/84452
14051 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14052 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14055 2018-02-19 Martin Liska <mliska@suse.cz>
14058 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14060 2018-02-19 Martin Liska <mliska@suse.cz>
14061 Richard Sandiford <richard.sandiford@linaro.org>
14063 PR tree-optimization/82491
14064 * gimple-fold.c (get_base_constructor): Make earlier bail out
14067 2018-02-19 Carl Love <cel@us.ibm.com>
14069 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14070 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14072 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14073 P8V_BUILTIN_VEC_NEG.
14075 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14077 * config/rl78/rl78.md (movdf): New define expand.
14079 2018-02-19 Martin Liska <mliska@suse.cz>
14082 * doc/invoke.texi: Fix typo.
14083 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14085 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14087 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14088 handle rs6000_single_float and rs6000_double_float specially for
14091 2018-02-16 Jeff Law <law@redhat.com>
14093 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14094 (pop_regs): Use it.
14096 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14099 * ipa-inline.c (inline_small_functions): Fix a typo.
14101 2018-02-16 Nathan Sidwell <nathan@acm.org>
14103 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14105 2018-02-16 Carl Love <cel@us.ibm.com>
14107 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14108 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14109 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14110 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14111 expansion to P8V_BUILTIN_VEC_FLOAT2.
14113 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14115 PR rtl-optimization/70023
14116 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14117 src_regno into account.
14119 2018-02-16 Carl Love <cel@us.ibm.com>
14121 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14122 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14123 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14124 * config/rs6000/rs6000.c: Remove case statements for
14125 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14126 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14127 and P9V_BUILTIN_VEC_VINSERT4B.
14128 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14129 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14130 * config/rs6000/vsx.md:
14131 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14134 2018-02-16 Carl Love <cel@us.ibm.com>
14136 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14138 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14140 * config/rs6000/rs6000-c.c: Add the definitions for
14141 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14142 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14143 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14144 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14145 definition for insert4b and define insn *insert3b_internal.
14146 * doc/extend.texi: Add documentation for vec_extract4b.
14148 2018-02-16 Nathan Sidwell <nathan@acm.org>
14150 * doc/extend.texi (Backwards Compatibility): Mention friend
14151 injection. Note for-scope is deprecated.
14152 * doc/invoke.texi (-ffriend-injection): Deprecate.
14154 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14156 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14157 that moved to I2, also allow destinations that are a paradoxical
14158 subreg (instead of a normal reg).
14160 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14163 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14166 2018-02-16 Richard Biener <rguenther@suse.de>
14168 PR tree-optimization/84037
14169 PR tree-optimization/84016
14171 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14172 Adjust vec_construct for the fact we need additional higher latency
14173 128bit inserts for AVX256 and AVX512 vector builds.
14174 (ix86_add_stmt_cost): Scale vector construction cost for
14177 2018-02-16 Richard Biener <rguenther@suse.de>
14179 PR tree-optimization/84417
14180 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14181 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14182 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14184 2018-02-16 Martin Liska <mliska@suse.cz>
14187 * internal-fn.def (ASAN_CHECK): Set proper flags.
14188 (ASAN_MARK): Likewise.
14190 2018-02-16 Julia Koval <julia.koval@intel.com>
14192 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14193 from PTA_CANNONLAKE.
14195 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14198 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14199 Use ++iter rather than iter++ for std::list iterators.
14200 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14201 defer deleting them until all nodes in the forest are processed. Do
14202 free even leaf nodes. Change to_process into auto_vec.
14205 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14206 * vec.h (vec_default_construct): Use memset instead of placement new
14207 if BROKEN_VALUE_INITIALIZATION is defined.
14208 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14209 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14212 PR rtl-optimization/83723
14213 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14214 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14215 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14217 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14219 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14221 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14223 PR rtl-optimization/81443
14224 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14225 from inner REGs to paradoxical SUBREGs.
14227 2018-02-16 Richard Biener <rguenther@suse.de>
14229 PR tree-optimization/84399
14230 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14231 For operands we can analyze at their definition make sure we can
14232 analyze them at each use as well.
14234 2018-02-16 Richard Biener <rguenther@suse.de>
14236 PR tree-optimization/84190
14237 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14238 volatile accesses if the decl isn't volatile.
14240 2018-02-15 Jason Merrill <jason@redhat.com>
14242 PR c++/84314 - ICE with templates and fastcall attribute.
14243 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14244 TYPE_CANONICAL on an existing type.
14246 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14248 PR tree-optimization/84383
14249 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14250 dstoff nor call operand_equal_p if dstbase is NULL.
14252 PR tree-optimization/84334
14253 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14254 also a CONSTANT_CLASS_P, punt.
14256 2018-02-14 Jim Wilson <jimw@sifive.com>
14258 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14259 first SMALL_OPERAND check. New local min_second_step. Move assert
14260 to where locals are set. Add TARGET_RVC support.
14261 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14263 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14265 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14267 2018-02-14 Martin Sebor <msebor@redhat.com>
14269 PR tree-optimization/83698
14270 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14271 arrays constrain the offset range to their bounds.
14272 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14273 (builtin_access::overlap): Avoid setting the size of overlap if it's
14275 (maybe_diag_overlap): Also consider arrays when deciding what values
14276 of offsets to include in diagnostics.
14278 2018-02-14 Martin Sebor <msebor@redhat.com>
14281 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14282 that correspond to the kind of a declaration.
14284 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14287 * config/pa/pa.md: Load address of PIC label using the linkage table
14288 if the label is nonlocal.
14290 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14292 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14293 warning message if user requests -maltivec=be.
14294 * doc/invoke.texi: Document deprecation of -maltivec=be.
14296 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14299 * config/rs6000/rs6000-c.c: Update definitions for
14300 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14301 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14303 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14306 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14307 add _get_ssp intrinsics. Remove argument from
14308 __builtin_ia32_rdssp[d|q].
14309 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14310 * config/i386/i386-builtin.def: Remove argument from
14311 __builtin_ia32_rdssp[d|q].
14312 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14313 ix86_expand_special_args_builtin for _rdssp[d|q].
14314 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14315 Clear register before usage.
14316 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14317 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14319 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14321 PR tree-optimization/84357
14322 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14323 operand 1 of an ARRAY_REF too.
14325 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14328 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14329 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14331 (set_of_reg): New struct.
14332 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14333 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14334 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14336 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14337 Split into bitclr, bitset, bitinvert patterns if appropriate.
14338 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14339 use rx_fuse_in_memory_bitop.
14340 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14341 to named insn, correct maximum insn length.
14343 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14346 * machmode.def: Define a complex mode for PARTIAL_INT.
14347 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14349 * doc/rtl.texi: Document CSPImode.
14350 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14352 (msp430_hard_regno_nregs_with_padding): Likewise.
14354 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14357 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14359 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14361 PR rtl-optimization/84169
14362 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14363 we generated a parallel as new i3 and we split that to new i2 and i3
14364 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14365 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14366 those to i2, not i1. Partially rewrite this scan code.
14368 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14371 * stor-layout.c (place_field): For variable length fields, adjust
14372 offset_align afterwards not just based on the field's alignment,
14373 but also on the size.
14375 PR middle-end/84309
14376 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14377 of exps and logs in the use_exp2 case.
14379 2018-02-13 Jeff Law <law@redhat.com>
14381 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14382 entry for "vector".
14384 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14387 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14391 * common.opt (gas-loc-support, gas-locview-support): New.
14392 (ginline-points, ginternal-reset-location-views): New.
14393 * doc/invoke.texi: Document them. Use @itemx where intended.
14394 (gvariable-location-views): Adjust.
14395 * target.def (reset_location_view): New.
14396 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14397 (TARGET_RESET_LOCATION_VIEW): New.
14398 * doc/tm.texi: Rebuilt.
14399 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14400 (dwarf2out_default_as_locview_support): New.
14401 (output_asm_line_debug_info): Use option variables.
14402 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14403 (output_loc_list): Likewise.
14404 (add_high_low_attributes): Check option variables.
14405 Don't output entry view attribute in strict mode.
14406 (gen_inlined_subroutine_die): Check option variables.
14407 (dwarf2out_inline_entry): Likewise.
14408 (init_sections_and_labels): Likewise.
14409 (dwarf2out_early_finish): Likewise.
14410 (maybe_reset_location_view): New, from...
14411 (dwarf2out_var_location): ... here. Call it.
14412 * debug.h (dwarf2out_default_as_loc_support): Declare.
14413 (dwarf2out_default_as_locview_support): Declare.
14414 * hooks.c (hook_int_rtx_insn_0): New.
14415 * hooks.h (hook_int_rtx_insn_0): Declare.
14416 * toplev.c (process_options): Take -gas-loc-support and
14417 -gas-locview-support from dwarf2out. Enable
14418 -gvariable-location-views by default only with locview
14419 assembler support. Enable -ginternal-reset-location-views by
14420 default only if the target defines the corresponding hook.
14421 Enable -ginline-points by default if location views are
14422 enabled; force it disabled if statement frontiers are
14424 * tree-inline.c (expand_call_inline): Check option variables.
14425 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14427 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14429 PR tree-optimization/84321
14430 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14431 handling. Also check whether the anti-range contains any values
14432 that satisfy the mask; switch to a VR_RANGE if not.
14434 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14437 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14439 2018-02-13 Martin Jambor <mjambor@suse.cz>
14442 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14443 of call statements, also set location of a load to a temporary.
14445 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14447 * config/rl78/rl78.c (add_vector_labels): New function.
14448 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14449 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14450 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14451 which checks that no arguments are passed.
14452 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14453 * doc/extend.texi: Documentation for the new attribute.
14455 2018-02-13 Andreas Schwab <schwab@suse.de>
14457 * config/riscv/linux.h (CPP_SPEC): Define.
14459 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14462 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14463 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14464 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14465 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14466 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14467 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14468 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14469 temporarily for AES and PCLMUL builtins.
14471 PR tree-optimization/84339
14472 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14473 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14476 PR middle-end/84309
14477 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14478 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14479 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14481 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14483 * omp-simd-clone.h: New file.
14484 * omp-simd-clone.c: Include omp-simd-clone.h.
14485 (expand_simd_clones): No longer static.
14486 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14487 cgraph.h and omp-simd-clone.h.
14488 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14489 (vect_recog_widen_shift_pattern): Formatting fix.
14490 (vect_pattern_recog_1): Don't check optab for calls.
14493 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14494 operands[2] into a REG before using gen_lowpart on it.
14496 2018-02-12 Jeff Law <law@redhat.com>
14499 * config/sh/sh.c (find_barrier): Consider a sibling call
14502 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14503 successfully back substituting a reg.
14505 2018-02-12 Richard Biener <rguenther@suse.de>
14507 PR tree-optimization/84037
14508 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14509 parameter, move visited init to caller.
14510 (vect_slp_analyze_operations): Separate cost from validity
14511 check, initialize visited once for all instances.
14512 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14514 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14516 (vect_model_promotion_demotion_cost): Likewise.
14517 (vectorizable_bswap): Guard cost modeling with !slp_node
14518 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14520 (vectorizable_call): Likewise.
14521 (vectorizable_conversion): Likewise.
14522 (vectorizable_assignment): Likewise.
14523 (vectorizable_shift): Likewise.
14524 (vectorizable_operation): Likewise.
14525 (vectorizable_store): Likewise.
14526 (vectorizable_load): Likewise.
14527 (vectorizable_condition): Likewise.
14528 (vectorizable_comparison): Likewise.
14530 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14533 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14534 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14535 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14537 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14539 PR middle-end/83665
14540 * params.def (inline-min-speedup): Increase from 8 to 15.
14541 (max-inline-insns-auto): Decrease from 40 to 30.
14542 * ipa-split.c (consider_split): Add some buffer for function to
14543 be considered inlining candidate.
14544 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14547 2018-02-12 Richard Biener <rguenther@suse.de>
14549 PR tree-optimization/84037
14550 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14551 matched stmts if we cannot swap the non-matched ones.
14553 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14555 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14556 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14557 _mm_maskz_scalef_round_ss): New intrinsics.
14558 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14559 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14560 __builtin_ia32_scalefss_round): Remove.
14561 (__builtin_ia32_scalefsd_mask_round,
14562 __builtin_ia32_scalefss_mask_round): New intrinsics.
14563 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14564 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14565 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14566 "<round_constraint>")): Changed to ...
14567 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14568 "<round_scalar_constraint>")): ... this.
14569 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14570 %0, %1, %2<round_op3>}"): Changed to ...
14571 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14572 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14573 %2<round_scalar_mask_op3>}"): ... this.
14574 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14576 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14578 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14579 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14580 (_mm_maskz_sqrt_round_ss): New intrinsics.
14581 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14582 (__builtin_ia32_sqrtsd_mask_round)
14583 (__builtin_ia32_sqrtss_mask_round): New builtins.
14584 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14585 (__builtin_ia32_sqrtss_round): Remove.
14586 (__builtin_ia32_sqrtsd_mask_round)
14587 (__builtin_ia32_sqrtss_mask_round): New builtins.
14588 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14589 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14590 ((match_operand:VF_128 1 "vector_operand"
14591 "xBm,<round_constraint>")): Changed to ...
14592 ((match_operand:VF_128 1 "vector_operand"
14593 "xBm,<round_scalar_constraint>")): ... this.
14594 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14595 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14596 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14597 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14598 %<iptr>1<round_scalar_mask_op3>}): ... this.
14599 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14600 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14602 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14605 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14606 Cast vec_cmpeq result to correct type.
14607 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
14608 Cast vec_cmpgt result to correct type.
14610 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
14612 * final.c (final_scan_insn_1): Renamed from...
14613 (final_scan_insn): ... this. New wrapper, to recover
14614 seen from the outermost call in recursive ones.
14615 * config/sparc/sparc.c (output_return): Drop seen from call.
14616 (output_sibcall): Likewise.
14617 * config/visium/visium.c (output_branch): Likewise.
14619 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
14621 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
14624 2018-02-10 Alan Modra <amodra@gmail.com>
14627 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
14628 Specify LR as an input.
14630 2018-02-10 Jakub Jelinek <jakub@redhat.com>
14633 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
14634 remove_member_access_dummy_vars): New functions.
14635 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
14636 lower_omp_1, execute_lower_omp): Use them.
14638 PR rtl-optimization/84308
14639 * shrink-wrap.c (spread_components): Release todo vector.
14641 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
14643 PR rtl-optimization/57193
14644 * ira-color.c (struct allocno_color_data): Add member
14645 conflict_allocno_hard_prefs.
14646 (update_conflict_allocno_hard_prefs): New.
14647 (bucket_allocno_compare_func): Add a preference based on
14648 conflict_allocno_hard_prefs.
14649 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
14650 (color_allocnos): Remove a dead code. Initiate
14651 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
14653 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14656 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
14657 constraint from =wa to wa. Avoid a subreg on the output operand,
14658 instead use a pseudo and subreg it in a move.
14659 (p9_xxbrd_<mode>): Changed to ...
14660 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
14661 (p9_xxbrd_v2df): New expander.
14662 (p9_xxbrw_<mode>): Changed to ...
14663 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
14664 (p9_xxbrw_v4sf): New expander.
14666 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14668 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
14670 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
14673 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
14674 multiply in 32-bit mode.
14675 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
14676 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
14679 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
14681 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
14682 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
14683 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
14684 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
14686 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
14689 * dwarf2out.c (is_trivial_indirect_ref): New function.
14690 (dwarf2out_late_global_decl): Do not generate a location
14691 attribute for variables that have a non-trivial DECL_VALUE_EXPR
14692 and that are not defined in the current unit.
14694 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14696 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
14697 instead of a libcall for UNORDERED.
14699 2018-02-09 Tamar Christina <tamar.christina@arm.com>
14702 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
14703 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
14705 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14708 * config/s390/s390.c (s390_set_current_function): Invoke
14709 s390_indirect_branch_settings also if fndecl didn't change.
14711 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14713 * config/rs6000/rs6000.md (blockage): Set length to zero.
14715 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
14717 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
14719 2018-02-09 Jakub Jelinek <jakub@redhat.com>
14722 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
14723 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
14727 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
14728 PARALLEL incoming that failed vt_get_decl_and_offset check.
14730 PR middle-end/84237
14731 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
14732 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
14734 (get_variable_section): For decls in named .bss* sections pass true as
14735 second argument to bss_initializer_p.
14737 2018-02-09 Marek Polacek <polacek@redhat.com>
14738 Jakub Jelinek <jakub@redhat.com>
14741 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
14742 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
14743 Sync some changes from cxx_fold_indirect_ref.
14745 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
14747 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
14749 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
14750 (BLOCK_INLINE_ENTRY_LABEL): New.
14751 (dwarf2out_var_location): Disregard inline entry markers.
14752 (inline_entry_data): New struct.
14753 (inline_entry_data_hasher): New hashtable type.
14754 (inline_entry_data_hasher::hash): New.
14755 (inline_entry_data_hasher::equal): New.
14756 (inline_entry_data_table): New variable.
14757 (add_high_low_attributes): Add DW_AT_entry_pc and
14758 DW_AT_GNU_entry_view attributes if a pending entry is found
14759 in inline_entry_data_table. Add old entry_pc attribute only
14760 if debug nonbinding markers are disabled.
14761 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
14762 markers are enabled.
14763 (block_within_block_p, dwarf2out_inline_entry): New.
14764 (dwarf2out_finish): Check that no entries remained in
14765 inline_entry_data_table.
14766 * final.c (reemit_insn_block_notes): Handle inline entry notes.
14767 (final_scan_insn, notice_source_line): Likewise.
14768 (rest_of_clean_state): Skip inline entry markers.
14769 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
14771 * gimple.c (gimple_build_debug_inline_entry): New.
14772 * gimple.h (enum gimple_debug_subcode): Add
14773 GIMPLE_DEBUG_INLINE_ENTRY.
14774 (gimple_build_debug_inline_entry): Declare.
14775 (gimple_debug_inline_entry_p): New.
14776 (gimple_debug_nonbind_marker_p): Adjust.
14777 * insn-notes.def (INLINE_ENTRY): New.
14778 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
14779 inline entry marker notes.
14780 (print_insn): Likewise.
14781 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
14782 (INSN_DEBUG_MARKER_KIND): Likewise.
14783 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
14784 * tree-inline.c (expand_call_inline): Build and insert
14785 debug_inline_entry stmt.
14786 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
14787 inline entry blocks early, if nonbind markers are enabled.
14788 (dump_scope_block): Dump fragment info.
14789 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
14790 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
14791 (gimple_build_debug_inline_entry): New.
14792 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
14793 Enable/disable inline entry points too.
14794 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
14795 (DEBUG_INSN): Describe inline entry markers.
14797 * common.opt (gvariable-location-views): New.
14798 (gvariable-location-views=incompat5): New.
14799 * config.in: Rebuilt.
14800 * configure: Rebuilt.
14801 * configure.ac: Test assembler for view support.
14802 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
14803 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
14804 * dwarf2out.c (var_loc_view): New typedef.
14805 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
14806 (dwarf2out_locviews_in_attribute): New.
14807 (dwarf2out_locviews_in_loclist): New.
14808 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
14809 (enum dw_line_info_opcode): Add LI_adv_address.
14810 (struct dw_line_info_table): Add view.
14811 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
14812 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
14813 (zero_view_p): New variable.
14814 (ZERO_VIEW_P): New macro.
14815 (output_asm_line_debug_info): New.
14816 (struct var_loc_node): Add view.
14817 (add_AT_view_list, AT_loc_list): New.
14818 (add_var_loc_to_decl): Add view param. Test it against last.
14819 (new_loc_list): Add view params. Record them.
14820 (AT_loc_list_ptr): Handle loc and view lists.
14821 (view_list_to_loc_list_val_node): New.
14822 (print_dw_val): Handle dw_val_class_view_list.
14823 (size_of_die): Likewise.
14824 (value_format): Likewise.
14825 (loc_list_has_views): New.
14826 (gen_llsym): Set vl_symbol too.
14827 (maybe_gen_llsym, skip_loc_list_entry): New.
14828 (dwarf2out_maybe_output_loclist_view_pair): New.
14829 (output_loc_list): Output view list or entries too.
14830 (output_view_list_offset): New.
14831 (output_die): Handle dw_val_class_view_list.
14832 (output_dwarf_version): New.
14833 (output_compilation_unit_header): Use it.
14834 (output_skeleton_debug_sections): Likewise.
14835 (output_rnglists, output_line_info): Likewise.
14836 (output_pubnames, output_aranges): Update version comments.
14837 (output_one_line_info_table): Output view numbers in asm comments.
14838 (dw_loc_list): Determine current endview, pass it to new_loc_list.
14839 Call maybe_gen_llsym.
14840 (loc_list_from_tree_1): Adjust.
14841 (add_AT_location_description): Create view list attribute if
14842 needed, check it's absent otherwise.
14843 (convert_cfa_to_fb_loc_list): Adjust.
14844 (maybe_emit_file): Call output_asm_line_debug_info for test.
14845 (dwarf2out_var_location): Reset views as needed. Precompute
14846 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
14847 attribute. Set view.
14848 (new_line_info_table): Reset next view.
14849 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
14850 (dwarf2out_source_line): Likewise. Output view resets and labels to
14851 the assembler, or select appropriate line info opcodes.
14852 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
14853 (optimize_string_length): Catch it. Adjust.
14854 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
14855 dw_val_class_view_list, and remove it if no longer needed.
14856 (hash_loc_list): Hash view numbers.
14857 (loc_list_hasher::equal): Compare them.
14858 (optimize_location_lists): Check whether a view list symbol is
14859 needed, and whether the locview attribute is present, and
14860 whether they match. Remove the locview attribute if no longer
14862 (index_location_lists): Call skip_loc_list_entry for test.
14863 (dwarf2out_finish): Call output_asm_line_debug_info for test.
14864 Use output_dwarf_version.
14865 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
14866 (struct dw_val_node): Add val_view_list.
14867 * final.c (SEEN_NEXT_VIEW): New.
14868 (set_next_view_needed): New.
14869 (clear_next_view_needed): New.
14870 (maybe_output_next_view): New.
14871 (final_start_function): Rename to...
14872 (final_start_function_1): ... this. Take pointer to FIRST,
14873 add SEEN parameter. Emit param bindings in the initial view.
14874 (final_start_function): Reintroduce SEEN-less interface.
14875 (final): Rename to...
14876 (final_1): ... this. Take SEEN parameter. Output final pending
14877 next view at the end.
14878 (final): Reintroduce seen-less interface.
14879 (final_scan_insn): Output pending next view before switching
14880 sections or ending a block. Mark the next view as needed when
14881 outputting variable locations. Notify debug backend of section
14882 changes, and of location view changes.
14883 (rest_of_handle_final): Adjust.
14884 * toplev.c (process_options): Autodetect value for debug variable
14885 location views option. Warn on incompat5 without -gdwarf-5.
14886 * doc/invoke.texi (gvariable-location-views): New.
14887 (gvariable-location-views=incompat5): New.
14888 (gno-variable-location-views): New.
14890 2018-02-08 David Malcolm <dmalcolm@redhat.com>
14892 PR tree-optimization/84136
14893 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
14894 that the result of find_edge is non-NULL.
14896 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14899 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
14900 storing integer register in SImode. Fix cost of 256 and 512
14901 byte aligned SSE register store.
14903 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
14905 * config/i386/i386.c (ix86_multiplication_cost): Fix
14906 multiplication cost for TARGET_AVX512DQ.
14908 2018-02-08 Marek Polacek <polacek@redhat.com>
14910 PR tree-optimization/84238
14911 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
14914 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14916 PR tree-optimization/84265
14917 * tree-vect-stmts.c (vectorizable_store): Don't treat
14918 VMAT_CONTIGUOUS accesses as grouped.
14919 (vectorizable_load): Likewise.
14921 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
14923 PR tree-optimization/81635
14924 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
14925 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
14926 (test_round_for_mask): New functions.
14927 (wide_int_cc_tests): Call test_round_for_mask.
14928 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
14929 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
14930 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
14931 range returned by get_range_info.
14933 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14936 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
14937 * symtab.c: Include builtins.h
14938 (symtab_node::output_to_lto_symbol_table_p): Move here
14939 from lto-streamer-out.c:output_symbol_p.
14940 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
14941 (output_symbol_p): Move all logic to symtab.c
14942 (produce_symtab): Update.
14944 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14946 * config/s390/s390-opts.h (enum indirect_branch): Define.
14947 * config/s390/s390-protos.h (s390_return_addr_from_memory)
14948 (s390_indirect_branch_via_thunk)
14949 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
14950 (enum s390_indirect_branch_type): Define.
14951 * config/s390/s390.c (struct s390_frame_layout, struct
14952 machine_function): Remove.
14953 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
14954 (indirect_branch_table_label_no, indirect_branch_table_name):
14956 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
14957 (enum s390_indirect_branch_option): Define.
14958 (s390_return_addr_from_memory): New function.
14959 (s390_handle_string_attribute): New function.
14960 (s390_attribute_table): Add new attribute handler.
14961 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
14962 (s390_indirect_branch_via_thunk): New function.
14963 (s390_indirect_branch_via_inline_thunk): New function.
14964 (s390_function_ok_for_sibcall): When jumping via thunk disallow
14965 sibling call optimization for non z10 compiles.
14966 (s390_emit_call): Force indirect branch target to be a single
14967 register. Add r1 clobber for non-z10 compiles.
14968 (s390_emit_epilogue): Emit return jump via return_use expander.
14969 (s390_reorg): Handle JUMP_INSNs as execute targets.
14970 (s390_option_override_internal): Perform validity checks for the
14971 new command line options.
14972 (s390_indirect_branch_attrvalue): New function.
14973 (s390_indirect_branch_settings): New function.
14974 (s390_set_current_function): Invoke s390_indirect_branch_settings.
14975 (s390_output_indirect_thunk_function): New function.
14976 (s390_code_end): Implement target hook.
14977 (s390_case_values_threshold): Implement target hook.
14978 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
14980 * config/s390/s390.h (struct s390_frame_layout)
14981 (struct machine_function): Move here from s390.c.
14982 (TARGET_INDIRECT_BRANCH_NOBP_RET)
14983 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
14984 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
14985 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
14986 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
14987 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
14988 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
14989 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
14990 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
14991 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
14992 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
14993 (mnemonic attribute): Add values which aren't recognized
14995 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
14996 pattern for branch conversion. Fix mnemonic attribute.
14997 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
14998 indirect branch via thunk if requested.
14999 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15000 ("*indirect_jump"): Disable for branch conversion using out of
15002 ("indirect_jump_via_thunk<mode>_z10")
15003 ("indirect_jump_via_thunk<mode>")
15004 ("indirect_jump_via_inlinethunk<mode>_z10")
15005 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15006 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15007 ("casesi_jump_via_inlinethunk<mode>_z10")
15008 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15009 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15010 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15011 ("*indirect2_jump"): Disable for branch conversion.
15012 ("casesi_jump"): Turn into expander and expand patterns for branch
15014 ("return_use"): New expander.
15015 ("*return"): Emit return via thunk and rename it to ...
15016 ("*return<mode>"): ... this one.
15017 * config/s390/s390.opt: Add new options and and enum for the
15020 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15022 * lra-constraints.c (match_reload): Unconditionally use
15023 gen_lowpart_SUBREG, rather than selecting between that
15024 and equivalent gen_rtx_SUBREG code.
15026 2018-02-08 Richard Biener <rguenther@suse.de>
15028 PR tree-optimization/84233
15029 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15030 changed flag instead of boguously re-using phi_inserted.
15032 2018-02-08 Martin Jambor <mjambor@suse.cz>
15034 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15035 static local variables.
15037 2018-02-08 Richard Biener <rguenther@suse.de>
15039 PR tree-optimization/84278
15040 * tree-vect-stmts.c (vectorizable_store): When looking for
15041 smaller vector types to perform grouped strided loads/stores
15042 make sure the mode is supported by the target.
15043 (vectorizable_load): Likewise.
15045 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15047 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15048 Increase LDP/STP opportunities by adding adjacent callee-saves.
15050 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15052 PR rtl-optimization/84068
15053 PR rtl-optimization/83459
15054 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15056 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15058 PR tree-optimization/84224
15059 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15060 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15061 non-zero arguments.
15063 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15066 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15067 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15068 count, remove one USE.
15070 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15072 * doc/install.texi (Configuration): Document the
15073 --with-long-double-format={ibm,ieee} PowerPC configuration
15077 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15078 Convert from define_expand to be define_insn_and_split. Rework
15079 float/double/_Float128 conversions to QI/HI/SImode to work with
15080 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15081 conversions to QI/HImode types did a store and then a load to
15082 truncate the value. For conversions to VSX registers, don't split
15083 the insn, instead emit the code directly. Use the code iterator
15084 any_fix to combine signed and unsigned conversions.
15085 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15086 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15087 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15088 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15089 (fix_<mode>di2_hw): Likewise.
15090 (fixuns_<mode>di2_hw): Likewise.
15091 (fix_<mode>si2_hw): Likewise.
15092 (fixuns_<mode>si2_hw): Likewise.
15093 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15094 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15095 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15096 fix<uns>_trunc<SFDF:mode>si2_p8.
15097 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15098 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15099 (fix<uns>_<mode>_mem): Likewise.
15100 (fctiw<u>z_<mode>_mem): Likewise.
15101 (fix<uns>_<mode>_mem): Likewise.
15102 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15103 the register allocator from doing a direct move to the GPRs to do
15104 a store, and instead use the ISA 3.0 store byte/half-word from
15105 vector register instruction. For IEEE 128-bit floating point,
15106 also optimize stores of 32-bit ints.
15107 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15109 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15111 * genextract.c (push_pathstr_operand): New function to support
15113 (walk_rtx): Call push_pathstr_operand.
15114 (print_path): Support [a-zA-Z].
15116 2018-02-07 Richard Biener <rguenther@suse.de>
15118 PR tree-optimization/84037
15119 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15120 (cse_and_gimplify_to_preheader): Declare.
15121 (vect_get_place_in_interleaving_chain): Likewise.
15122 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15124 (_loop_vec_info::~_loop_vec_info): Delete it.
15125 (cse_and_gimplify_to_preheader): New function.
15126 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15127 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15128 (vectorizable_load): Likewise. For grouped stores always base
15129 the IV on the first element.
15130 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15131 condition before gimplifying.
15133 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15135 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15136 *DIV_EXPR and *MOD_EXPR.
15138 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15141 * config/i386/i386.c (ix86_option_override_internal): Mask out
15142 the CF_SET bit when checking -fcf-protection.
15144 2018-02-07 Tom de Vries <tom@codesourcery.com>
15147 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15150 2018-02-07 Richard Biener <rguenther@suse.de>
15152 PR tree-optimization/84204
15153 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15156 PR tree-optimization/84205
15157 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15158 special-case isl_ast_op_zdiv_r.
15160 PR tree-optimization/84223
15161 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15162 Only add conditions from within the region.
15163 (gather_bbs::after_dom_children): Adjust.
15165 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15168 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15169 * config/avr/avr.md: Only post-reload split REG-REG moves if
15170 either register is GENERAL_REG_P.
15172 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15174 PR tree-optimization/84235
15175 * tree-ssa-scopedtables.c
15176 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15177 if the subtraction is performed in floating point type where NaNs are
15178 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15179 build 1. Formatting fix.
15181 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15184 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15185 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15186 and skip it regardless of bb boundaries. Use CALL_P macro,
15187 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15188 unnecessarily, formatting fix.
15190 2018-02-06 Michael Collison <michael.collison@arm.com>
15192 * config/arm/thumb2.md:
15193 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15194 (*thumb_mov_notscc): Ditto.
15196 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15199 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15200 unsigned_fix, not "s".
15202 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15204 * configure.ac (gcc_fn_eh_frame_ro): New function.
15205 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15206 correct .eh_frame permissions.
15207 * configure: Regenerate.
15209 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15211 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15212 irrelevant options.
15214 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15216 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15217 Display warning message for -mno-speculate-indirect-jumps.
15219 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15221 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15223 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15225 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15227 PR tree-optimization/84225
15228 * tree-eh.c (find_trapping_overflow): Only call
15229 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15231 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15234 * config/i386/i386.c: Reimplement the check of possible options
15235 -mibt/-mshstk conbination. Change error messages.
15236 * doc/invoke.texi: Fix a typo: remove extra '='.
15238 2018-02-06 Marek Polacek <polacek@redhat.com>
15240 PR tree-optimization/84228
15241 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15243 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15246 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15247 emitted arch directives.
15248 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15249 __ARM_FEATURE_COPROC before changing architectures.
15251 2018-02-06 Richard Biener <rguenther@suse.de>
15253 * config/i386/i386.c (print_reg): Fix typo.
15254 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15256 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15258 * configure: Regenerate.
15260 2018-02-05 Martin Sebor <msebor@redhat.com>
15262 PR tree-optimization/83369
15263 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15266 2018-02-05 Martin Liska <mliska@suse.cz>
15268 * doc/invoke.texi: Cherry-pick upstream r323995.
15270 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15272 * ira.c (ira_init_register_move_cost): Adjust comment.
15274 2018-02-05 Martin Liska <mliska@suse.cz>
15276 PR gcov-profile/84137
15277 * doc/gcov.texi: Fix typo in documentation.
15279 2018-02-05 Martin Liska <mliska@suse.cz>
15281 PR gcov-profile/83879
15282 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15283 using dlopen functionality.
15285 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15287 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15288 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15289 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15290 _mm_maskz_range_round_ss): New intrinsics.
15291 (__builtin_ia32_rangesd128_round)
15292 (__builtin_ia32_rangess128_round): Remove.
15293 (__builtin_ia32_rangesd128_mask_round,
15294 __builtin_ia32_rangess128_mask_round): New builtins.
15295 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15296 __builtin_ia32_rangess128_round): Remove.
15297 (__builtin_ia32_rangesd128_mask_round,
15298 __builtin_ia32_rangess128_mask_round): New builtins.
15299 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15300 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15301 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15302 "<round_saeonly_constraint>")): Changed to ...
15303 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15304 "<round_saeonly_scalar_constraint>")): ... this.
15305 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15306 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15307 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15308 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15309 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15311 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15313 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15315 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15316 Remove all values except native, 8540 and 8548.
15318 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15320 * config/i386/i386.c (ix86_output_function_return): Pass
15321 INVALID_REGNUM, instead of -1, as invalid register number to
15322 indirect_thunk_name and output_indirect_thunk.
15324 2018-02-02 Julia Koval <julia.koval@intel.com>
15326 * config.gcc: Add -march=icelake.
15327 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15328 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15329 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15330 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15331 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15332 (processor_target_table): Add icelake.
15333 (ix86_option_override_internal): Handle new PTAs.
15334 (get_builtin_code_for_version): Handle icelake.
15335 (M_INTEL_COREI7_ICELAKE): New.
15336 (fold_builtin_cpu): Handle icelake.
15337 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15338 * doc/invoke.texi: Add -march=icelake.
15340 2018-02-02 Julia Koval <julia.koval@intel.com>
15342 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15343 to wide_int_bitmask.
15344 * wide-int-bitmask.h: New.
15346 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15349 * config/i386/i386.md: Replace Pmode with word_mode in
15350 builtin_setjmp_setup and builtin_longjmp to support x32.
15352 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15356 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15358 (rs6000_supported_cpu_names): New static variable.
15359 (linux_cpu_translation_table): Likewise.
15360 (elf_platform) <cpu>: Define new static variable and use it.
15361 Translate kernel AT_PLATFORM name to canonical name if needed.
15362 Error if platform name is unknown.
15364 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15367 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15369 2018-02-01 Jeff Law <law@redhat.com>
15372 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15373 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15374 the scratch if RELEASE_VIA_POP is false.
15375 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15376 If we have to save a temporary register, decrement SIZE appropriately.
15377 Pass new arguments to release_scratch_register_on_entry.
15378 (ix86_adjust_stack_and_probe): Likewise.
15379 (ix86_emit_probe_stack_range): Pass new arguments to
15380 release_scratch_register_on_entry.
15382 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15384 PR rtl-optimization/84157
15385 * combine.c (change_zero_ext): Use REG_P predicate in
15386 front of HARD_REGISTER_P predicate.
15388 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15390 * config/avr/avr.c (avr_option_override): Move disabling of
15391 -fdelete-null-pointer-checks to...
15392 * common/config/avr/avr-common.c (avr_option_optimization_table):
15395 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15397 PR tree-optimization/81635
15398 * tree-data-ref.c (split_constant_offset_1): For types that
15399 wrap on overflow, try to use range info to prove that wrapping
15402 2018-02-01 Renlin Li <renlin.li@arm.com>
15405 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15406 TAILCALL_ADDR_REGS.
15407 (aarch64_register_move_cost): Likewise.
15408 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15409 TAILCALL_ADDR_REGS.
15410 (REG_CLASS_NAMES): Likewise.
15411 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15412 TAILCALL_ADDR_REGS. Remove IP registers.
15413 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15415 2018-02-01 Richard Biener <rguenther@suse.de>
15417 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15418 for specifying RPO order and allow NULL for that.
15419 * domwalk.c (dom_walker::dom_walker): Likewise.
15420 (dom_walker::walk): Handle NULL RPO order.
15421 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15423 (rewrite_update_dom_walker): Likewise.
15424 (mark_def_dom_walker): Likewise.
15426 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15428 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15429 (aarch64_maybe_expand_sve_subreg_move): Declare.
15430 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15431 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15433 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15434 that are semantically a reverse operation.
15435 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15436 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15437 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15439 (aarch64_can_change_mode_class): For big-endian, forbid changes
15440 between two SVE modes if they have different element sizes.
15442 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15444 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15445 the TImode handling for big-endian targets.
15447 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15449 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15450 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15452 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15453 Remove BSWAP handing for big-endian targets and use the form of
15454 LD1RQ appropariate for the mode.
15456 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15458 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15459 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15460 duplicated element.
15462 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15465 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15466 check for operands that need to go through aarch64_sve_reload_be.
15468 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15470 PR tree-optimization/81661
15471 PR tree-optimization/84117
15472 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15473 * tree-eh.c: Include gimplify.h.
15474 (find_trapping_overflow, replace_trapping_overflow,
15475 rewrite_to_non_trapping_overflow): New functions.
15476 * tree-vect-loop.c: Include tree-eh.h.
15477 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15478 * tree-data-ref.c: Include tree-eh.h.
15479 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15481 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15483 PR rtl-optimization/84123
15484 * combine.c (change_zero_ext): Check if hard register satisfies
15485 can_change_dest_mode before calling gen_lowpart_SUBREG.
15487 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15490 * ira.c (ira_init_register_move_cost): Remove assert.
15492 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15494 PR rtl-optimization/84071
15495 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15496 * doc/tm.texi: Regenerate.
15498 2018-01-31 Richard Biener <rguenther@suse.de>
15500 PR tree-optimization/84132
15501 * tree-data-ref.c (analyze_miv_subscript): Properly
15502 check whether evolution_function_is_affine_multivariate_p
15503 before calling gcd_of_steps_may_divide_p.
15505 2018-01-31 Julia Koval <julia.koval@intel.com>
15508 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15509 * config/i386/i386.md (rdpid_rex64) New.
15510 (rdpid): Make 32bit only.
15512 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15515 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15516 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15518 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15521 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15523 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15525 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15527 PR rtl-optimization/84071
15528 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15529 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15531 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15533 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15534 (arc_attribute_table): Add 'aux' attribute.
15535 (arc_in_small_data_p): Consider aux like variables.
15536 (arc_is_aux_reg_p): New function.
15537 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15538 (arc_get_aux_arg): New function.
15539 (prepare_move_operands): Handle aux-register access.
15540 (arc_handle_aux_attribute): New function.
15541 * doc/extend.texi (ARC Variable attributes): Add subsection.
15543 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15545 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15546 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15547 (arc_attribute_table): Add 'uncached' attribute.
15548 (arc_print_operand): Print '.di' flag for uncached memory
15550 (arc_in_small_data_p): Do not consider for small data the uncached
15552 (arc_is_uncached_mem_p): New function.
15553 * config/arc/predicates.md (compact_store_memory_operand): Check
15554 for uncached memory accesses.
15555 (nonvol_nonimm_operand): Likewise.
15556 * doc/extend.texi (ARC Type Attribute): New subsection.
15558 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15561 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15562 falign-loops=): Add Optimization flag.
15564 2018-01-30 Jeff Law <law@redhat.com>
15567 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15568 INT_REGISTERS_SAVED. Check it prior to calling
15569 get_scratch_register_on_entry.
15570 (ix86_adjust_stack_and_probe): Similarly.
15571 (ix86_emit_probe_stack_range): Similarly.
15572 (ix86_expand_prologue): Corresponding changes.
15574 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15577 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15578 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15580 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15583 * lra-constraints.c (curr_insn_transform): Process AND in the
15586 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15588 PR rtl-optimization/83986
15589 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15590 dependence against last_pending_memory_flush in addition to
15591 pending_jump_insns.
15593 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15595 PR tree-optimization/81611
15596 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15599 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15602 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15605 2018-01-30 Richard Biener <rguenther@suse.de>
15606 Jakub Jelinek <jakub@redhat.com>
15608 PR tree-optimization/84111
15609 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
15610 inner loops added during recursion, as they don't have up-to-date
15613 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15616 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
15617 (can_inline_edge_by_limits_p): ... here.
15618 (can_early_inline_edge_p, check_callers,
15619 update_caller_keys, update_callee_keys, recursive_inlining,
15620 add_new_edges_to_heap, speculation_useful_p,
15621 inline_small_functions,
15622 inline_small_functions, flatten_function,
15623 inline_to_all_callers_1): Update.
15625 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
15627 * profile-count.c (profile_count::combine_with_ipa_count): Handle
15630 2018-01-30 Richard Biener <rguenther@suse.de>
15632 PR tree-optimization/83008
15633 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
15634 invariant and constant vector uses in stmts when they need
15635 more than one stmt.
15637 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15640 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
15641 * configure: Regenerate.
15643 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15645 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
15647 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
15648 Use gen_rtx_REG rather than gen_lowpart.
15650 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15652 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
15653 rather than 0 when creating partial subregs.
15655 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
15657 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
15660 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
15663 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
15664 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
15665 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
15666 flags. This restores the settings used before the 2017-07-24.
15667 Turning off pre increment/decrement/modify allows IVOPTS to
15668 optimize DF/SF loops where the index is an int.
15670 2018-01-29 Richard Biener <rguenther@suse.de>
15671 Kelvin Nilsen <kelvin@gcc.gnu.org>
15674 * tree-vect-stmts.c (vectorizable_call): Don't call
15675 targetm.vectorize_builtin_md_vectorized_function if callee is
15678 2018-01-22 Carl Love <cel@us.ibm.com>
15680 * doc/extend.tex: Fix typo in second arg in
15681 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
15683 2018-01-29 Richard Biener <rguenther@suse.de>
15685 PR tree-optimization/84086
15686 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
15687 (flush_ssaname_freelist): When SSA names were released reset
15688 the SCEV hash table.
15690 2018-01-29 Richard Biener <rguenther@suse.de>
15692 PR tree-optimization/84057
15693 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
15694 removed paths when removing edges.
15696 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
15698 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
15699 -mfunction-return=@var{choice}.
15701 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
15703 PR diagnostic/84034
15704 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
15705 Handle CR like TAB.
15706 (layout::print_source_line): Likewise.
15707 (test_get_line_width_without_trailing_whitespace): Add test cases.
15709 2018-01-27 Jakub Jelinek <jakub@redhat.com>
15711 PR middle-end/84040
15712 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
15715 2018-01-26 Jim Wilson <jimw@sifive.com>
15717 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
15719 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
15722 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15724 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
15725 and CMP + SUB-immediate -> SUBS.
15727 2018-01-26 Martin Sebor <msebor@redhat.com>
15729 PR tree-optimization/83896
15730 * tree-ssa-strlen.c (get_string_len): Rename...
15731 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
15732 Avoid assuming length is constant.
15733 (handle_char_store): Use HOST_WIDE_INT for string length.
15735 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
15738 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
15739 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
15741 2018-01-26 Richard Biener <rguenther@suse.de>
15743 PR rtl-optimization/84003
15744 * dse.c (record_store): Only record redundant stores when
15745 the earlier store aliases at least all accesses the later one does.
15747 2018-01-26 Jakub Jelinek <jakub@redhat.com>
15749 PR rtl-optimization/83985
15750 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
15751 REG_CFA_RESTORE insns.
15752 (delete_unmarked_insns): Don't ignore separate shrink wrapping
15753 REG_CFA_RESTORE insns here.
15756 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
15757 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
15759 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15761 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
15762 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
15763 (arc_init): Likewise.
15764 (arc_override_options): Likewise.
15765 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
15767 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
15769 * config/arc/arc.h (TARGET_DBNZ): Define.
15770 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
15771 properly set the tune attribute.
15772 (dbnz): Use TARGET_DBNZ guard.
15773 * config/arc/arc.opt (mtune): Add core3 option.
15775 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15777 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
15778 recognize new pic like addresses.
15779 (arc_delegitimize_address): Clean up.
15781 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15783 * config/arc/arc-arches.def: Option mrf16 valid for all
15785 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
15786 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
15787 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
15788 * config/arc/arc-tables.opt: Regenerate.
15789 * config/arc/arc.c (arc_conditional_register_usage): Handle
15790 reduced register file case.
15791 (arc_file_start): Set must have build attributes.
15792 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
15793 mrf16 option value.
15794 * config/arc/arc.opt (mrf16): Add new option.
15795 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
15796 * config/arc/genmultilib.awk: Handle new mrf16 option.
15797 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
15798 * config/arc/t-multilib: Regenerate.
15799 * doc/invoke.texi (ARC Options): Document mrf16 option.
15801 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15803 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
15804 * config/arc/arc.c (arc_handle_secure_attribute): New function.
15805 (arc_attribute_table): Add 'secure_call' attribute.
15806 (arc_print_operand): Print secure call operand.
15807 (arc_function_ok_for_sibcall): Don't optimize tail calls when
15809 (arc_is_secure_call_p): New function. * config/arc/arc.md
15810 (call_i): Add support for sjli instruction.
15811 (call_value_i): Likewise.
15812 * config/arc/constraints.md (Csc): New constraint.
15814 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
15815 John Eric Martin <John.Martin@emmicro-us.com>
15817 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
15818 * config/arc/arc.c (_arc_jli_section): New struct.
15819 (arc_jli_section): New type.
15820 (rc_jli_sections): New static variable.
15821 (arc_handle_jli_attribute): New function.
15822 (arc_attribute_table): Add jli_always and jli_fixed attribute.
15823 (arc_file_end): New function.
15824 (TARGET_ASM_FILE_END): Define.
15825 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
15826 (arc_add_jli_section): New function.
15827 (jli_call_scan): Likewise.
15828 (arc_reorg): Call jli_call_scan.
15829 (arc_output_addsi): Remove 'S' from printing asm operand.
15830 (arc_is_jli_call_p): New function.
15831 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
15833 (movhi_insn): Likewise.
15834 (movsi_insn): Likewise.
15835 (movsi_set_cc_insn): Likewise.
15836 (loadqi_update): Likewise.
15837 (load_zeroextendqisi_update): Likewise.
15838 (load_signextendqisi_update): Likewise.
15839 (loadhi_update): Likewise.
15840 (load_zeroextendhisi_update): Likewise.
15841 (load_signextendhisi_update): Likewise.
15842 (loadsi_update): Likewise.
15843 (loadsf_update): Likewise.
15844 (movsicc_insn): Likewise.
15845 (bset_insn): Likewise.
15846 (bxor_insn): Likewise.
15847 (bclr_insn): Likewise.
15848 (bmsk_insn): Likewise.
15849 (bicsi3_insn): Likewise.
15850 (cmpsi_cc_c_insn): Likewise.
15851 (movsi_ne): Likewise.
15852 (movsi_cond_exec): Likewise.
15853 (clrsbsi2): Likewise.
15854 (norm_f): Likewise.
15864 (call_i): Remove 'S' asm letter, add jli instruction.
15865 (call_value_i): Likewise.
15866 * config/arc/arc.op (mjli-always): New option.
15867 * config/arc/constraints.md (Cji): New constraint.
15868 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
15870 (subsf3_fpx): Likewise.
15871 (mulsf3_fpx): Likewise.
15872 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
15874 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
15875 function attrbutes.
15876 * doc/invoke.texi (ARC): Document mjli-always option.
15878 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
15880 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
15881 avoid addition with 0 and use incw and decw where possible.
15883 2018-01-26 Richard Biener <rguenther@suse.de>
15885 PR tree-optimization/81082
15886 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
15887 association if it requires casting to unsigned.
15888 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
15889 from fold_plusminus_mult_expr to catch important cases late when
15890 range info is available.
15892 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15894 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
15895 * configure.ac (hidden_linkonce): New test.
15896 * configure: Regenerate.
15897 * config.in: Regenerate.
15899 2018-01-26 Julia Koval <julia.koval@intel.com>
15901 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
15902 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
15903 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
15904 _mm_mask_bitshuffle_epi64_mask): Fix type.
15905 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
15906 USI_FTYPE_V4DI_V4DI_USI): Remove.
15907 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
15908 __builtin_ia32_vpshufbitqmb256_mask,
15909 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
15910 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
15911 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
15913 2018-01-26 Alan Modra <amodra@gmail.com>
15916 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
15917 UNSPEC_VBPERMQ. Sort other unspecs.
15919 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
15921 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
15923 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
15925 PR middle-end/83055
15926 * predict.c (drop_profile): Do not push/pop cfun; update also
15928 (handle_missing_profiles): Fix logic looking for zero profiles.
15930 2018-01-25 Jakub Jelinek <jakub@redhat.com>
15932 PR middle-end/83977
15933 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
15934 on functions with #pragma omp declare simd or functions with simd
15936 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
15937 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
15938 Remove trailing \n from warning_at calls.
15940 2018-01-25 Tom de Vries <tom@codesourcery.com>
15943 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
15944 for neutered workers.
15946 2018-01-24 Joseph Myers <joseph@codesourcery.com>
15949 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
15950 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
15952 2018-01-24 Jeff Law <law@redhat.com>
15955 * i386.c (get_probe_interval): Move to earlier point.
15956 (ix86_compute_frame_layout): If -fstack-clash-protection and
15957 the frame is larger than the probe interval, then use pushes
15958 to save registers rather than reg->mem moves.
15959 (ix86_expand_prologue): Remove conditional for int_registers_saved
15962 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
15965 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
15966 min/max for never referenced object.
15968 2018-01-24 Jakub Jelinek <jakub@redhat.com>
15970 PR middle-end/83977
15971 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
15973 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
15974 attributes from DECL_ATTRIBUTES (decl) without affecting
15975 DECL_ATTRIBUTES (current_function_decl).
15976 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
15977 functions with non-NULL DECL_ABSTRACT_ORIGIN.
15979 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
15981 PR tree-optimization/83979
15982 * fold-const.c (fold_comparison): Use constant_boolean_node
15983 instead of boolean_{true,false}_node.
15985 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
15987 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
15990 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15992 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
15993 Simplify the clause that sets the length attribute.
15994 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
15995 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
15996 clause that sets the length attribute.
15997 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
15999 2018-01-24 Tom de Vries <tom@codesourcery.com>
16002 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16003 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16004 Add strict parameter.
16005 (prevent_branch_around_nothing): Insert dummy insn between branch to
16006 label and label with no ptx insn inbetween.
16007 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16009 2018-01-24 Tom de Vries <tom@codesourcery.com>
16012 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16013 for neutered threads in warp.
16014 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16016 2018-01-24 Richard Biener <rguenther@suse.de>
16018 PR tree-optimization/83176
16019 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16022 2018-01-24 Richard Biener <rguenther@suse.de>
16024 PR tree-optimization/82819
16025 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16026 code generating pluses that are no-ops in the target precision.
16028 2018-01-24 Richard Biener <rguenther@suse.de>
16030 PR middle-end/84000
16031 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16033 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16035 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16036 to merge probabilities.
16037 * predict.c (probably_never_executed): Also mark as cold functions
16038 with global 0 profile and guessed local profile.
16039 * profile-count.c (profile_probability::combine_with_count): New
16041 * profile-count.h (profile_probability::operator*,
16042 profile_probability::operator*=, profile_probability::operator/,
16043 profile_probability::operator/=): Reduce precision to adjusted
16044 and set value to guessed on contradictory divisions.
16045 (profile_probability::combine_with_freq): Remove.
16046 (profile_probability::combine_wiht_count): Declare.
16047 (profile_count::force_nonzero):: Set to adjusted.
16048 (profile_count::probability_in):: Set quality to adjusted.
16049 * tree-ssa-tail-merge.c (replace_block_by): Use
16050 combine_with_count.
16052 2018-01-23 Andrew Waterman <andrew@sifive.com>
16053 Jim Wilson <jimw@sifive.com>
16055 * config/riscv/riscv.c (riscv_stack_boundary): New.
16056 (riscv_option_override): Set riscv_stack_boundary. Handle
16057 riscv_preferred_stack_boundary_arg.
16058 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16059 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16060 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16061 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16062 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16063 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16065 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16068 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16069 of struct ix86_frame.
16070 (ix86_expand_epilogue): Likewise. Add a local variable for
16071 the reg_save_offset field in struct ix86_frame.
16073 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16075 PR tree-optimization/82604
16076 * tree-loop-distribution.c (enum partition_kind): New enum item
16077 PKIND_PARTIAL_MEMSET.
16078 (partition_builtin_p): Support above new enum item.
16079 (generate_code_for_partition): Ditto.
16080 (compute_access_range): Differentiate cases that equality can be
16081 proven at all loops, the innermost loops or no loops.
16082 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16083 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16084 (finalize_partitions, distribute_loop): Don't fuse partition of
16085 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16086 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16087 parloop is enabled.
16089 2018-01-23 Martin Liska <mliska@suse.cz>
16091 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16092 order to ignore the predictor.
16093 (PRED_POLYMORPHIC_CALL): Likewise.
16094 (PRED_RECURSIVE_CALL): Likewise.
16096 2018-01-23 Martin Liska <mliska@suse.cz>
16098 * tree-profile.c (tree_profiling): Print function header to
16099 aware reader which function we are working on.
16100 * value-prof.c (gimple_find_values_to_profile): Do not print
16101 not interesting value histograms.
16103 2018-01-23 Martin Liska <mliska@suse.cz>
16105 * profile-count.h (enum profile_quality): Add
16106 profile_uninitialized as the first value. Do not number values
16107 as they are zero based.
16108 (profile_count::verify): Update sanity check.
16109 (profile_probability::verify): Likewise.
16111 2018-01-23 Nathan Sidwell <nathan@acm.org>
16113 * doc/invoke.texi (ffor-scope): Deprecate.
16115 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16117 PR tree-optimization/83510
16118 * domwalk.c (set_all_edges_as_executable): New function.
16119 (dom_walker::dom_walker): Convert bool param
16120 "skip_unreachable_blocks" to enum reachability. Move setup of
16121 edge flags to set_all_edges_as_executable and only do it when
16122 reachability is REACHABLE_BLOCKS.
16123 * domwalk.h (enum dom_walker::reachability): New enum.
16124 (dom_walker::dom_walker): Convert bool param
16125 "skip_unreachable_blocks" to enum reachability.
16126 (set_all_edges_as_executable): New decl.
16127 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16128 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16130 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16131 but converting true to REACHABLE_BLOCKS.
16132 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16134 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16135 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16136 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16138 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16139 if check_all_array_refs will be called.
16141 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16143 * tree.c (selftest::test_location_wrappers): Add more test
16146 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16148 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16149 (selftest::test_bit_in_range): Likewise.
16151 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16154 * doc/sourcebuild.texi (vect_float): Say that the selector
16155 only describes the situation when -funsafe-math-optimizations is on.
16156 (vect_float_strict): Document.
16158 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16160 PR tree-optimization/83965
16161 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16162 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16163 instead of checking only for a reduction.
16164 (vect_recog_widen_sum_pattern): Likewise.
16166 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16168 * predict.c (probably_never_executed): Only use precise profile info.
16169 (compute_function_frequency): Skip after inlining hack since we now
16170 have quality checking.
16172 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16174 * profile-count.h (profile_probability::very_unlikely,
16175 profile_probability::unlikely, profile_probability::even): Set
16176 precision to guessed.
16178 2018-01-23 Richard Biener <rguenther@suse.de>
16180 PR tree-optimization/83963
16181 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16182 Properly terminate dominator walk when crossing the exit edge not
16183 when visiting its source block.
16185 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16188 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16189 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16191 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16193 PR tree-optimization/83957
16194 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16195 semicolon after for body surrounded by braces.
16197 PR tree-optimization/83081
16198 * profile-count.h (profile_probability::split): New method.
16199 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16200 Use profile_probability::split.
16201 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16202 when splitting a single conditional jump into 2.
16204 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16206 PR tree-optimization/69452
16207 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16210 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16212 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16213 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16214 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16216 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16218 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16220 * config/rl78/rl78.md (movdi): New define_expand.
16221 * config/rl78/rl78.c (rl78_split_movdi): New function.
16223 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16226 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16228 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16229 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16230 128-bit to produce an UNSPEC move to get the double word with the
16231 signbit and then a shift directly to do signbit.
16232 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16233 implementation with a new version that just does either a direct
16234 move or a regular move. Move memory interface to separate insns.
16235 Move insns so they are next to the expander.
16236 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16237 with signbit move. Split big and little endian case.
16238 (signbit<mode>2_dm_mem_le): Likewise.
16239 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16240 (signbit<mode>2_dm2): Likewise.
16242 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16244 * config/rl78/rl78.md (anddi3): New define_expand.
16246 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16248 * config/rl78/rl78.md (umindi3): New define_expand.
16250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16252 * config/rl78/rl78.md (smindi3): New define_expand.
16254 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16256 * config/rl78/rl78.md (smaxdi3): New define_expand.
16258 2018-01-22 Carl Love <cel@us.ibm.com>
16260 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16261 LVX_V1TI): Add macro expansion.
16262 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16263 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16264 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16265 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16266 Change check to determine if the instruction is a byte reversing
16267 entry. Fix typo in comment.
16268 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16269 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16270 Add def_builtin calls for new builtins.
16271 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16272 Add define_insn expansion.
16274 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16276 * config/rl78/rl78.md (umaxdi3): New define_expand.
16278 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16280 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16281 for non-QImode registers.
16283 2018-01-22 Richard Biener <rguenther@suse.de>
16285 PR tree-optimization/83963
16286 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16287 including the loop exit block.
16288 (scop_detection::merge_sese): Likewise.
16289 (scop_detection::add_scop): Do it here instead.
16291 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16293 * doc/sourcebuild.texi (arm_softfloat): Document.
16295 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16298 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16299 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16300 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16302 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16303 David Edelsohn <dje.gcc@gmail.com>
16306 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16307 Change "crset eq" to "crset 2".
16308 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16309 (*call_indirect_aix<mode>_nospec): Likewise.
16310 (*call_value_indirect_aix<mode>_nospec): Likewise.
16311 (*call_indirect_elfv2<mode>_nospec): Likewise.
16312 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16313 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16314 change assembly output from . to $.
16315 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16316 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16317 (*tablejump<mode>_internal1_nospec): Likewise.
16319 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16322 * config/sh/sh_optimize_sett_clrt.cc:
16323 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16325 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16327 PR tree-optimization/83940
16328 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16329 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16330 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16331 use it to pass back the definition type.
16332 (vect_check_store_rhs): Likewise rhs_dt_out.
16333 (vect_build_gather_load_calls): Add a mask_dt argument and use
16334 it instead of a call to vect_is_simple_use.
16335 (vectorizable_store): Update calls to vect_check_load_store_mask
16336 and vect_check_store_rhs. Use the dt returned by the latter instead
16337 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16338 instead of calls to vect_is_simple_use. Pass the scalar rather
16339 than the vector operand to vect_is_simple_use when handling
16340 second and subsequent copies of an rhs value.
16341 (vectorizable_load): Update calls to vect_check_load_store_mask
16342 and vect_build_gather_load_calls. Use the cached mask_dt and
16343 gs_info.offset_dt instead of calls to vect_is_simple_use.
16345 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16347 PR middle-end/83945
16348 * tree-emutls.c: Include gimplify.h.
16349 (lower_emutls_2): New function.
16350 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16351 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16352 it before further processing.
16355 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16356 UINTVAL (trueop1) instead of INTVAL (op1).
16358 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16362 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16363 INCOMING_FRAME_SP_OFFSET if not defined.
16364 (scan_trace): Add ENTRY argument. If true and
16365 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16366 emit a note to adjust the CFA offset.
16367 (create_cfi_notes): Adjust scan_trace callers.
16368 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16369 INCOMING_FRAME_SP_OFFSET in the CIE.
16370 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16371 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16373 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16374 * doc/tm.texi: Regenerated.
16376 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16378 PR rtl-optimization/83147
16379 * lra-constraints.c (remove_inheritance_pseudos): Use
16380 lra_substitute_pseudo_within_insn.
16382 2018-01-19 Tom de Vries <tom@codesourcery.com>
16383 Cesar Philippidis <cesar@codesourcery.com>
16386 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16388 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16391 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16392 spaces for function labels.
16394 2018-01-19 Martin Liska <mliska@suse.cz>
16396 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16397 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16398 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16399 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16400 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16401 (PRED_CONST_RETURN): Change from 69 to 65.
16402 (PRED_NULL_RETURN): Change from 91 to 71.
16403 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16404 (PRED_LOOP_GUARD): Change from 66 to 73.
16406 2018-01-19 Martin Liska <mliska@suse.cz>
16408 * predict.c (predict_insn_def): Add new assert.
16409 (struct branch_predictor): Change type to signed integer.
16410 (test_prediction_value_range): Amend test to cover
16411 PROB_UNINITIALIZED.
16412 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16413 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16414 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16415 (PRED_LOOP_IV_COMPARE): Likewise.
16416 * predict.h (PROB_UNINITIALIZED): Define new constant.
16418 2018-01-19 Martin Liska <mliska@suse.cz>
16420 * predict.c (dump_prediction): Add new format for
16421 analyze_brprob.py script which is enabled with -details
16423 * profile-count.h (precise_p): New function.
16425 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16427 PR tree-optimization/83922
16428 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16429 there are no statements that need masking.
16430 (vect_active_double_reduction_p): New function.
16431 (vect_analyze_loop_operations): Use it when handling phis that
16432 are not in the loop header.
16434 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16436 PR tree-optimization/83914
16437 * tree-vect-loop.c (vectorizable_induction): Don't convert
16438 init_expr or apply the peeling adjustment for inductions
16439 that are nested within the vectorized loop.
16441 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16443 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16446 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16450 * function.h (gimplify_parameters): Add gimple_seq * argument.
16451 * function.c: Include gimple.h and options.h.
16452 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16453 for the added local temporaries if needed.
16454 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16455 if there are any parameter cleanups, wrap whole body into a
16456 try/finally with the cleanups.
16458 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16461 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16462 Use GET_MODE_CLASS for scalar floating point.
16464 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16468 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16469 Fix call of call_cgraph_insertion_hooks.
16471 2018-01-18 Martin Sebor <msebor@redhat.com>
16473 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16475 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16478 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16481 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16484 * common.opt: (-ffile-prefix-map): New option.
16485 * opts.c (common_handle_option): Defer it.
16486 * opts-global.c (handle_common_deferred_options): Handle it.
16487 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16488 * file-prefix-map.h: New file.
16489 (remap_debug_filename, add_debug_prefix_map): ...here.
16490 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16491 * final.c (debug_prefix_map, add_debug_prefix_map
16492 remap_debug_filename): Move to...
16493 * file-prefix-map.c: New file.
16494 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16495 generalize, get rid of alloca(), use strrchr() instead of strchr().
16496 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16497 Implement in terms of add_prefix_map().
16498 (remap_macro_filename, remap_debug_filename): Implement in term of
16500 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16501 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16502 * dbxout.c: Include file-prefix-map.h.
16503 * varasm.c: Likewise.
16504 * vmsdbgout.c: Likewise.
16505 * xcoffout.c: Likewise.
16506 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16507 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16508 * doc/invoke.texi (-ffile-prefix-map): Document.
16509 (-fdebug-prefix-map): Update description.
16511 2018-01-18 Martin Liska <mliska@suse.cz>
16513 * config/i386/i386.c (indirect_thunk_name): Document that also
16515 (output_indirect_thunk): Document why both instructions
16516 (pause and lfence) are generated.
16518 2018-01-18 Richard Biener <rguenther@suse.de>
16520 PR tree-optimization/83887
16521 * graphite-scop-detection.c
16522 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16523 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16524 (scop_detection::merge_sese): Re-implement with a flood-fill
16525 algorithm that properly finds a SESE region if it exists.
16527 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16530 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16531 pointer_diff optimizations use view_convert instead of convert.
16533 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16535 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16536 Generate different code for -mno-speculate-indirect-jumps.
16537 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16538 (*call_indirect_aix<mode>): Disable for
16539 -mno-speculate-indirect-jumps.
16540 (*call_indirect_aix<mode>_nospec): New define_insn.
16541 (*call_value_indirect_aix<mode>): Disable for
16542 -mno-speculate-indirect-jumps.
16543 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16544 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16545 -mno-speculate-indirect-jumps.
16546 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16548 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16550 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16551 long double type, set the flags for noting the default long double
16552 type, even if we don't pass or return a long double type.
16554 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16557 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16560 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16562 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16563 support for merge[hl].
16564 (fold_mergehl_helper): New helper function.
16565 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16566 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16567 (altivec_vmrglw_direct): Add xxmrglw insn.
16569 2018-01-17 Andrew Waterman <andrew@sifive.com>
16571 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16572 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16574 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16577 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16578 call the lto_location_cache before reading the
16579 DECL_SOURCE_LOCATION of the types.
16581 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16582 Richard Sandiford <richard.sandiford@linaro.org>
16584 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16585 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16586 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16587 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16588 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16590 * config/aarch64/constraints.md (aarch64_movti_operand):
16592 * config/aarch64/predicates.md (Uti): Add new constraint.
16594 2018-01-17 Carl Love <cel@us.ibm.com>
16596 * config/rs6000/vsx.md (define_expand xl_len_r,
16597 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16598 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16600 (define_expand, define_insn): Move the shift left from the
16601 define_insn to the define_expand for lxvl and stxvl instructions.
16602 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16603 and XL_LEN_R definitions to PURE.
16605 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16607 * config/i386/i386.c (indirect_thunk_name): Declare regno
16608 as unsigned int. Compare regno with INVALID_REGNUM.
16609 (output_indirect_thunk): Ditto.
16610 (output_indirect_thunk_function): Ditto.
16611 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
16612 in the call to output_indirect_thunk_function.
16614 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
16616 PR middle-end/83884
16617 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
16618 rather than the size of inner_type to determine the stack slot size
16619 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
16621 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
16624 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
16627 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
16629 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
16630 endian Linux systems to optionally enable multilibs for selecting
16631 the long double type if the user configured an explicit type.
16632 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
16633 have no long double multilibs if not defined.
16634 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
16635 warn if the user used -mabi={ieee,ibm}longdouble and we built
16636 multilibs for long double.
16637 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
16638 appropriate multilib option.
16639 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
16641 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
16642 for building long double multilibs.
16643 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
16645 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
16647 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
16650 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
16652 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
16655 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
16658 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
16661 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16663 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
16664 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
16666 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
16668 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
16669 different rtl trees depending on TARGET_64BIT.
16670 (rs6000_gen_lvx): Likewise.
16672 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
16674 * config/visium/visium.md (nop): Tweak comment.
16675 (hazard_nop): Likewise.
16677 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16679 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
16680 -mspeculate-indirect-jumps.
16681 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
16682 for -mno-speculate-indirect-jumps.
16683 (*call_indirect_elfv2<mode>_nospec): New define_insn.
16684 (*call_value_indirect_elfv2<mode>): Disable for
16685 -mno-speculate-indirect-jumps.
16686 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
16687 (indirect_jump): Emit different RTL for
16688 -mno-speculate-indirect-jumps.
16689 (*indirect_jump<mode>): Disable for
16690 -mno-speculate-indirect-jumps.
16691 (*indirect_jump<mode>_nospec): New define_insn.
16692 (tablejump): Emit different RTL for
16693 -mno-speculate-indirect-jumps.
16694 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
16695 (tablejumpsi_nospec): New define_expand.
16696 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
16697 (tablejumpdi_nospec): New define_expand.
16698 (*tablejump<mode>_internal1): Disable for
16699 -mno-speculate-indirect-jumps.
16700 (*tablejump<mode>_internal1_nospec): New define_insn.
16701 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
16704 2018-01-16 Artyom Skrobov tyomitch@gmail.com
16706 * caller-save.c (insert_save): Drop unnecessary parameter. All
16709 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16710 Richard Biener <rguenth@suse.de>
16713 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
16714 return early, inline manually is_gimple_sizepos. Make sure if we
16715 call gimplify_expr we don't end up with a gimple constant.
16716 * tree.c (variably_modified_type_p): Don't return true for
16717 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
16718 * gimplify.h (is_gimple_sizepos): Remove.
16720 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16722 PR tree-optimization/83857
16723 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
16724 vectorizable_live_operation for pure SLP statements.
16725 (vectorizable_live_operation): Handle PHIs.
16727 2018-01-16 Richard Biener <rguenther@suse.de>
16729 PR tree-optimization/83867
16730 * tree-vect-stmts.c (vect_transform_stmt): Precompute
16731 nested_in_vect_loop_p since the scalar stmt may get invalidated.
16733 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16736 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
16737 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
16738 If off is not INTEGER_CST, issue a may not be aligned warning
16739 rather than isn't aligned. Use isn%'t rather than isn't.
16740 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
16742 <case MULT_EXPR>: Improve the case when bottom and one of the
16743 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
16744 operand, in that case check if the other operand is multiple of
16745 bottom divided by the INTEGER_CST operand.
16747 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16750 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
16751 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
16752 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
16753 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
16754 * config/pa/pa.c (pa_function_arg_advance): Likewise.
16755 (pa_function_arg, pa_arg_partial_bytes): Likewise.
16756 (pa_function_arg_size): New function.
16758 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16760 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
16761 in a separate statement.
16763 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
16765 PR tree-optimization/83847
16766 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
16767 group gathers and scatters.
16769 2018-01-16 Jakub Jelinek <jakub@redhat.com>
16771 PR rtl-optimization/86620
16772 * params.def (max-sched-ready-insns): Bump minimum value to 1.
16774 PR rtl-optimization/83213
16775 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
16776 to last if both are JUMP_INSNs.
16778 PR tree-optimization/83843
16779 * gimple-ssa-store-merging.c
16780 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
16781 store_immediate_info for bswap/nop orig_stores.
16783 2018-01-15 Andrew Waterman <andrew@sifive.com>
16785 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
16787 <UDIV>: Increase cost if !TARGET_DIV.
16789 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
16791 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
16792 (define_attr "cr_logical_3op"): New.
16793 (cceq_ior_compare): Adjust.
16794 (cceq_ior_compare_complement): Adjust.
16795 (*cceq_rev_compare): Adjust.
16796 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
16797 (is_cracked_insn): Adjust.
16798 (insn_must_be_first_in_group): Adjust.
16799 * config/rs6000/40x.md: Adjust.
16800 * config/rs6000/440.md: Adjust.
16801 * config/rs6000/476.md: Adjust.
16802 * config/rs6000/601.md: Adjust.
16803 * config/rs6000/603.md: Adjust.
16804 * config/rs6000/6xx.md: Adjust.
16805 * config/rs6000/7450.md: Adjust.
16806 * config/rs6000/7xx.md: Adjust.
16807 * config/rs6000/8540.md: Adjust.
16808 * config/rs6000/cell.md: Adjust.
16809 * config/rs6000/e300c2c3.md: Adjust.
16810 * config/rs6000/e500mc.md: Adjust.
16811 * config/rs6000/e500mc64.md: Adjust.
16812 * config/rs6000/e5500.md: Adjust.
16813 * config/rs6000/e6500.md: Adjust.
16814 * config/rs6000/mpc.md: Adjust.
16815 * config/rs6000/power4.md: Adjust.
16816 * config/rs6000/power5.md: Adjust.
16817 * config/rs6000/power6.md: Adjust.
16818 * config/rs6000/power7.md: Adjust.
16819 * config/rs6000/power8.md: Adjust.
16820 * config/rs6000/power9.md: Adjust.
16821 * config/rs6000/rs64.md: Adjust.
16822 * config/rs6000/titan.md: Adjust.
16824 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16826 * config/i386/predicates.md (indirect_branch_operand): Rewrite
16827 ix86_indirect_branch_register logic.
16829 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16831 * config/i386/constraints.md (Bs): Update
16832 ix86_indirect_branch_register check. Don't check
16833 ix86_indirect_branch_register with GOT_memory_operand.
16835 * config/i386/predicates.md (GOT_memory_operand): Don't check
16836 ix86_indirect_branch_register here.
16837 (GOT32_symbol_operand): Likewise.
16839 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16841 * config/i386/predicates.md (constant_call_address_operand):
16842 Rewrite ix86_indirect_branch_register logic.
16843 (sibcall_insn_operand): Likewise.
16845 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16847 * config/i386/constraints.md (Bs): Replace
16848 ix86_indirect_branch_thunk_register with
16849 ix86_indirect_branch_register.
16851 * config/i386/i386.md (indirect_jump): Likewise.
16852 (tablejump): Likewise.
16853 (*sibcall_memory): Likewise.
16854 (*sibcall_value_memory): Likewise.
16855 Peepholes of indirect call and jump via memory: Likewise.
16856 * config/i386/i386.opt: Likewise.
16857 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16858 (GOT_memory_operand): Likewise.
16859 (call_insn_operand): Likewise.
16860 (sibcall_insn_operand): Likewise.
16861 (GOT32_symbol_operand): Likewise.
16863 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16865 PR middle-end/83837
16866 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
16867 type rather than type addr's type points to.
16868 (expand_omp_atomic_mutex): Likewise.
16869 (expand_omp_atomic): Likewise.
16871 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
16874 * config/i386/i386.c (output_indirect_thunk_function): Use
16875 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
16876 for __x86_return_thunk.
16878 2018-01-15 Richard Biener <rguenther@suse.de>
16880 PR middle-end/83850
16881 * expmed.c (extract_bit_field_1): Fix typo.
16883 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16886 * config/arm/iterators.md (VF): New mode iterator.
16887 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
16888 Remove integer-related logic from pattern.
16889 (neon_vabd<mode>_3): Likewise.
16891 2018-01-15 Jakub Jelinek <jakub@redhat.com>
16893 PR middle-end/82694
16894 * common.opt (fstrict-overflow): No longer an alias.
16895 (fwrapv-pointer): New option.
16896 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
16897 also for pointer types based on flag_wrapv_pointer.
16898 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
16899 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
16900 opts->x_flag_wrapv got set.
16901 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
16902 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
16903 POINTER_TYPE_OVERFLOW_UNDEFINED.
16904 * match.pd: Likewise in address comparison pattern.
16905 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
16907 2018-01-15 Richard Biener <rguenther@suse.de>
16910 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
16911 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
16912 Reset type names to their identifier if their TYPE_DECL doesn't
16913 have linkage (and thus is used for ODR and devirt).
16914 (save_debug_info_for_decl): Remove.
16915 (save_debug_info_for_type): Likewise.
16916 (add_tree_to_fld_list): Adjust.
16917 * tree-pretty-print.c (dump_generic_node): Make dumping of
16918 type names more robust.
16920 2018-01-15 Richard Biener <rguenther@suse.de>
16922 * BASE-VER: Bump to 8.0.1.
16924 2018-01-14 Martin Sebor <msebor@redhat.com>
16927 * builtins.c (check_access): Avoid warning when the no-warning bit
16930 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
16932 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
16933 * ira-color (allocno_hard_regs_compare): Likewise.
16935 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
16938 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
16939 Use .pushsection/.popsection.
16941 2018-01-14 Martin Sebor <msebor@redhat.com>
16944 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
16946 2018-01-14 Jakub Jelinek <jakub@redhat.com>
16948 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
16949 entry from extra_headers.
16950 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
16951 extra_headers, make the list bitwise identical to the i?86-*-* one.
16953 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16955 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
16956 -mcmodel=large with -mindirect-branch=thunk,
16957 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
16958 -mfunction-return=thunk-extern.
16959 * doc/invoke.texi: Document -mcmodel=large is incompatible with
16960 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
16961 -mfunction-return=thunk and -mfunction-return=thunk-extern.
16963 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16965 * config/i386/i386.c (print_reg): Print the name of the full
16966 integer register without '%'.
16967 (ix86_print_operand): Handle 'V'.
16968 * doc/extend.texi: Document 'V' modifier.
16970 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16972 * config/i386/constraints.md (Bs): Disallow memory operand for
16973 -mindirect-branch-register.
16975 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16976 (GOT_memory_operand): Likewise.
16977 (call_insn_operand): Likewise.
16978 (sibcall_insn_operand): Likewise.
16979 (GOT32_symbol_operand): Likewise.
16980 * config/i386/i386.md (indirect_jump): Call convert_memory_address
16981 for -mindirect-branch-register.
16982 (tablejump): Likewise.
16983 (*sibcall_memory): Likewise.
16984 (*sibcall_value_memory): Likewise.
16985 Disallow peepholes of indirect call and jump via memory for
16986 -mindirect-branch-register.
16987 (*call_pop): Replace m with Bw.
16988 (*call_value_pop): Likewise.
16989 (*sibcall_pop_memory): Replace m with Bs.
16990 * config/i386/i386.opt (mindirect-branch-register): New option.
16991 * doc/invoke.texi: Document -mindirect-branch-register option.
16993 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
16995 * config/i386/i386-protos.h (ix86_output_function_return): New.
16996 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
16997 set function_return_type.
16998 (indirect_thunk_name): Add ret_p to indicate thunk for function
17000 (output_indirect_thunk_function): Pass false to
17001 indirect_thunk_name.
17002 (ix86_output_indirect_branch_via_reg): Likewise.
17003 (ix86_output_indirect_branch_via_push): Likewise.
17004 (output_indirect_thunk_function): Create alias for function
17005 return thunk if regno < 0.
17006 (ix86_output_function_return): New function.
17007 (ix86_handle_fndecl_attribute): Handle function_return.
17008 (ix86_attribute_table): Add function_return.
17009 * config/i386/i386.h (machine_function): Add
17010 function_return_type.
17011 * config/i386/i386.md (simple_return_internal): Use
17012 ix86_output_function_return.
17013 (simple_return_internal_long): Likewise.
17014 * config/i386/i386.opt (mfunction-return=): New option.
17015 (indirect_branch): Mention -mfunction-return=.
17016 * doc/extend.texi: Document function_return function attribute.
17017 * doc/invoke.texi: Document -mfunction-return= option.
17019 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17021 * config/i386/i386-opts.h (indirect_branch): New.
17022 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17023 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17024 with local indirect jump when converting indirect call and jump.
17025 (ix86_set_indirect_branch_type): New.
17026 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17027 (indirectlabelno): New.
17028 (indirect_thunk_needed): Likewise.
17029 (indirect_thunk_bnd_needed): Likewise.
17030 (indirect_thunks_used): Likewise.
17031 (indirect_thunks_bnd_used): Likewise.
17032 (INDIRECT_LABEL): Likewise.
17033 (indirect_thunk_name): Likewise.
17034 (output_indirect_thunk): Likewise.
17035 (output_indirect_thunk_function): Likewise.
17036 (ix86_output_indirect_branch_via_reg): Likewise.
17037 (ix86_output_indirect_branch_via_push): Likewise.
17038 (ix86_output_indirect_branch): Likewise.
17039 (ix86_output_indirect_jmp): Likewise.
17040 (ix86_code_end): Call output_indirect_thunk_function if needed.
17041 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17043 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17044 (ix86_attribute_table): Add indirect_branch.
17045 * config/i386/i386.h (machine_function): Add indirect_branch_type
17046 and has_local_indirect_jump.
17047 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17049 (tablejump): Likewise.
17050 (*indirect_jump): Use ix86_output_indirect_jmp.
17051 (*tablejump_1): Likewise.
17052 (simple_return_indirect_internal): Likewise.
17053 * config/i386/i386.opt (mindirect-branch=): New option.
17054 (indirect_branch): New.
17057 (thunk-inline): Likewise.
17058 (thunk-extern): Likewise.
17059 * doc/extend.texi: Document indirect_branch function attribute.
17060 * doc/invoke.texi: Document -mindirect-branch= option.
17062 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17065 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17067 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17069 * ipa-inline.c (want_inline_small_function_p): Return false if
17070 inlining has already failed with CIF_FINAL_ERROR.
17071 (update_caller_keys): Call want_inline_small_function_p before
17073 (update_callee_keys): Likewise.
17075 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17077 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17079 (rs6000_quadword_masked_address_p): Likewise.
17080 (quad_aligned_load_p): Likewise.
17081 (quad_aligned_store_p): Likewise.
17082 (const_load_sequence_p): Add comment to describe the outer-most loop.
17083 (mimic_memory_attributes_and_flags): New function.
17084 (rs6000_gen_stvx): Likewise.
17085 (replace_swapped_aligned_store): Likewise.
17086 (rs6000_gen_lvx): Likewise.
17087 (replace_swapped_aligned_load): Likewise.
17088 (replace_swapped_load_constant): Capitalize argument name in
17089 comment describing this function.
17090 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17091 and stores that access quad-word aligned addresses and replace
17092 with stvx or lvx instructions when appropriate.
17093 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17094 New function prototype.
17095 (rs6000_quadword_masked_address_p): Likewise.
17096 (rs6000_gen_lvx): Likewise.
17097 (rs6000_gen_stvx): Likewise.
17098 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17099 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17100 when memory address is aligned.
17101 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17102 this split to select lvx instruction when memory address is aligned.
17103 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17104 instruction when memory address is aligned.
17105 (*vsx_le_perm_load_v16qi): Likewise.
17106 (four unnamed splitters): Modify to select the stvx instruction
17107 when memory is aligned.
17109 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17111 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17112 which appears in the queue multiple times.
17114 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17115 Alan Hayward <alan.hayward@arm.com>
17116 David Sherwood <david.sherwood@arm.com>
17118 * tree-vectorizer.h (vec_lower_bound): New structure.
17119 (_loop_vec_info): Add check_nonzero and lower_bounds.
17120 (LOOP_VINFO_CHECK_NONZERO): New macro.
17121 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17122 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17123 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17124 fields. Make seg_len the distance travelled, not including the
17126 (dr_direction_indicator): Declare.
17127 (dr_zero_step_indicator): Likewise.
17128 (dr_known_forward_stride_p): Likewise.
17129 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17131 (runtime_alias_check_p): Allow runtime alias checks with
17133 (operator ==): Compare access_size and align.
17134 (prune_runtime_alias_test_list): Rework for new distinction between
17135 the access_size and seg_len.
17136 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17138 (get_segment_min_max): New function.
17139 (create_intersect_range_checks): Use it.
17140 (dr_step_indicator): New function.
17141 (dr_direction_indicator): Likewise.
17142 (dr_zero_step_indicator): Likewise.
17143 (dr_known_forward_stride_p): Likewise.
17144 * tree-loop-distribution.c (data_ref_segment_size): Return
17145 DR_STEP * (niters - 1).
17146 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17148 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17149 (vect_preserves_scalar_order_p): New function, split out from...
17150 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17151 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17152 (vect_vfa_access_size): New function.
17153 (vect_vfa_align): Likewise.
17154 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17155 (dump_lower_bound): New function.
17156 (vect_check_lower_bound): Likewise.
17157 (vect_small_gap_p): Likewise.
17158 (vectorizable_with_step_bound_p): Likewise.
17159 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17160 depencies if the vectorization factor is 1. Convert the checks
17161 for nonzero steps into checks on the bounds of DR_STEP. Try using
17162 a bunds check for variable steps if the minimum required step is
17163 relatively small. Update calls to the dr_with_seg_len
17164 constructor and to vect_compile_time_alias.
17165 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17167 (vect_loop_versioning): Call it.
17168 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17170 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17172 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17173 Alan Hayward <alan.hayward@arm.com>
17174 David Sherwood <david.sherwood@arm.com>
17176 * doc/sourcebuild.texi (vect_scatter_store): Document.
17177 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17179 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17181 * genopinit.c (main): Add supports_vec_scatter_store and
17182 supports_vec_scatter_store_cached to target_optabs.
17183 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17184 IFN_MASK_SCATTER_STORE.
17185 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17187 * internal-fn.h (internal_store_fn_p): Declare.
17188 (internal_fn_stored_value_index): Likewise.
17189 * internal-fn.c (scatter_store_direct): New macro.
17190 (expand_scatter_store_optab_fn): New function.
17191 (direct_scatter_store_optab_supported_p): New macro.
17192 (internal_store_fn_p): New function.
17193 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17194 IFN_MASK_SCATTER_STORE.
17195 (internal_fn_mask_index): Likewise.
17196 (internal_fn_stored_value_index): New function.
17197 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17198 for scatter stores.
17199 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17200 * optabs-query.c (supports_vec_scatter_store_p): New function.
17201 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17202 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17203 true for scatter stores.
17204 (vect_gather_scatter_fn_p): Handle scatter stores too.
17205 (vect_check_gather_scatter): Consider using scatter stores if
17206 supports_vec_scatter_store_p.
17207 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17208 scatter stores too.
17209 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17210 internal_fn_stored_value_index.
17211 (check_load_store_masking): Handle scatter stores too.
17212 (vect_get_store_rhs): Make public.
17213 (vectorizable_call): Use internal_store_fn_p.
17214 (vectorizable_store): Handle scatter store internal functions.
17215 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17216 when deciding whether the end of the group has been reached.
17217 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17218 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17219 (mask_scatter_store<mode>): New insns.
17221 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17222 Alan Hayward <alan.hayward@arm.com>
17223 David Sherwood <david.sherwood@arm.com>
17225 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17226 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17227 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17229 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17230 Use vect_truncate_gather_scatter_offset if we can't treat the
17231 operation as a normal gather load or scatter store.
17232 (get_group_load_store_type): Take the gather_scatter_info
17233 as argument. Try using a gather load or scatter store for
17234 single-element groups.
17235 (get_load_store_type): Update calls to get_group_load_store_type
17236 and vect_use_strided_gather_scatters_p.
17238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17239 Alan Hayward <alan.hayward@arm.com>
17240 David Sherwood <david.sherwood@arm.com>
17242 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17243 optional tree argument.
17244 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17246 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17247 but continue to use the current value as a fallback.
17248 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17249 to compare the updates.
17250 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17251 (get_load_store_type): Use it when handling a strided access.
17252 (vect_get_strided_load_store_ops): New function.
17253 (vect_get_data_ptr_increment): Likewise.
17254 (vectorizable_load): Handle strided gather loads. Always pass
17255 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17257 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17258 Alan Hayward <alan.hayward@arm.com>
17259 David Sherwood <david.sherwood@arm.com>
17261 * doc/md.texi (gather_load@var{m}): Document.
17262 (mask_gather_load@var{m}): Likewise.
17263 * genopinit.c (main): Add supports_vec_gather_load and
17264 supports_vec_gather_load_cached to target_optabs.
17265 * optabs-tree.c (init_tree_optimization_optabs): Use
17266 ggc_cleared_alloc to allocate target_optabs.
17267 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17268 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17270 * internal-fn.h (internal_load_fn_p): Declare.
17271 (internal_gather_scatter_fn_p): Likewise.
17272 (internal_fn_mask_index): Likewise.
17273 (internal_gather_scatter_fn_supported_p): Likewise.
17274 * internal-fn.c (gather_load_direct): New macro.
17275 (expand_gather_load_optab_fn): New function.
17276 (direct_gather_load_optab_supported_p): New macro.
17277 (direct_internal_fn_optab): New function.
17278 (internal_load_fn_p): Likewise.
17279 (internal_gather_scatter_fn_p): Likewise.
17280 (internal_fn_mask_index): Likewise.
17281 (internal_gather_scatter_fn_supported_p): Likewise.
17282 * optabs-query.c (supports_at_least_one_mode_p): New function.
17283 (supports_vec_gather_load_p): Likewise.
17284 * optabs-query.h (supports_vec_gather_load_p): Declare.
17285 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17286 and memory_type field.
17287 (NUM_PATTERNS): Bump to 15.
17288 * tree-vect-data-refs.c: Include internal-fn.h.
17289 (vect_gather_scatter_fn_p): New function.
17290 (vect_describe_gather_scatter_call): Likewise.
17291 (vect_check_gather_scatter): Try using internal functions for
17292 gather loads. Recognize existing calls to a gather load function.
17293 (vect_analyze_data_refs): Consider using gather loads if
17294 supports_vec_gather_load_p.
17295 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17296 (vect_get_gather_scatter_offset_type): Likewise.
17297 (vect_convert_mask_for_vectype): Likewise.
17298 (vect_add_conversion_to_patterm): Likewise.
17299 (vect_try_gather_scatter_pattern): Likewise.
17300 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17301 (vect_vect_recog_func_ptrs): Add it.
17302 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17303 internal_fn_mask_index and internal_gather_scatter_fn_p.
17304 (check_load_store_masking): Take the gather_scatter_info as an
17305 argument and handle gather loads.
17306 (vect_get_gather_scatter_ops): New function.
17307 (vectorizable_call): Check internal_load_fn_p.
17308 (vectorizable_load): Likewise. Handle gather load internal
17310 (vectorizable_store): Update call to check_load_store_masking.
17311 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17312 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17313 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17314 (aarch64_gather_scale_operand_d): New predicates.
17315 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17316 (mask_gather_load<mode>): New insns.
17318 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17319 Alan Hayward <alan.hayward@arm.com>
17320 David Sherwood <david.sherwood@arm.com>
17322 * optabs.def (fold_left_plus_optab): New optab.
17323 * doc/md.texi (fold_left_plus_@var{m}): Document.
17324 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17325 * internal-fn.c (fold_left_direct): Define.
17326 (expand_fold_left_optab_fn): Likewise.
17327 (direct_fold_left_optab_supported_p): Likewise.
17328 * fold-const-call.c (fold_const_fold_left): New function.
17329 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17330 * tree-parloops.c (valid_reduction_p): New function.
17331 (gather_scalar_reductions): Use it.
17332 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17333 (vect_finish_replace_stmt): Declare.
17334 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17335 (needs_fold_left_reduction_p): New function, split out from...
17336 (vect_is_simple_reduction): ...here. Accept reductions that
17337 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17338 (vect_force_simple_reduction): Also store the reduction type in
17339 the assignment's STMT_VINFO_REDUC_TYPE.
17340 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17341 (merge_with_identity): New function.
17342 (vect_expand_fold_left): Likewise.
17343 (vectorize_fold_left_reduction): Likewise.
17344 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17345 scalar phi in place for it. Check for target support and reject
17346 cases that would reassociate the operation. Defer the transform
17347 phase to vectorize_fold_left_reduction.
17348 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17349 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17350 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17354 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17355 call to ifc_temp_var.
17357 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17358 Alan Hayward <alan.hayward@arm.com>
17359 David Sherwood <david.sherwood@arm.com>
17361 * target.def (legitimize_address_displacement): Take the original
17362 offset as a poly_int.
17363 * targhooks.h (default_legitimize_address_displacement): Update
17365 * targhooks.c (default_legitimize_address_displacement): Likewise.
17366 * doc/tm.texi: Regenerate.
17367 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17368 as an argument, moving assert of ad->disp == ad->disp_term to...
17369 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17370 Try calling targetm.legitimize_address_displacement before expanding
17371 the address rather than afterwards, and adjust for the new interface.
17372 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17373 Match the new hook interface. Handle SVE addresses.
17374 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17375 new hook interface.
17377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17379 * Makefile.in (OBJS): Add early-remat.o.
17380 * target.def (select_early_remat_modes): New hook.
17381 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17382 * doc/tm.texi: Regenerate.
17383 * targhooks.h (default_select_early_remat_modes): Declare.
17384 * targhooks.c (default_select_early_remat_modes): New function.
17385 * timevar.def (TV_EARLY_REMAT): New timevar.
17386 * passes.def (pass_early_remat): New pass.
17387 * tree-pass.h (make_pass_early_remat): Declare.
17388 * early-remat.c: New file.
17389 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17391 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17394 Alan Hayward <alan.hayward@arm.com>
17395 David Sherwood <david.sherwood@arm.com>
17397 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17398 vfm1 with a bound_epilog parameter.
17399 (vect_do_peeling): Update calls accordingly, and move the prologue
17400 call earlier in the function. Treat the base bound_epilog as 0 for
17401 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17402 this base when peeling for gaps.
17403 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17404 with fully-masked loops.
17405 (vect_estimate_min_profitable_iters): Handle the single peeled
17406 iteration in that case.
17408 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17409 Alan Hayward <alan.hayward@arm.com>
17410 David Sherwood <david.sherwood@arm.com>
17412 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17413 single-element interleaving even if the size is not a power of 2.
17414 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17415 accesses for single-element interleaving if the group size is
17418 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17419 Alan Hayward <alan.hayward@arm.com>
17420 David Sherwood <david.sherwood@arm.com>
17422 * doc/md.texi (fold_extract_last_@var{m}): Document.
17423 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17424 * optabs.def (fold_extract_last_optab): New optab.
17425 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17426 * internal-fn.c (fold_extract_direct): New macro.
17427 (expand_fold_extract_optab_fn): Likewise.
17428 (direct_fold_extract_optab_supported_p): Likewise.
17429 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17430 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17431 EXTRACT_LAST_REDUCTION.
17432 (get_initial_def_for_reduction): Do not create an initial vector
17433 for EXTRACT_LAST_REDUCTION reductions.
17434 (vectorizable_reduction): Leave the scalar phi in place for
17435 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17436 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17437 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17438 transform phase to vectorizable_condition.
17439 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17441 (vect_finish_stmt_generation): ...here.
17442 (vect_finish_replace_stmt): New function.
17443 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17444 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17446 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17448 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17449 Alan Hayward <alan.hayward@arm.com>
17450 David Sherwood <david.sherwood@arm.com>
17452 * doc/md.texi (extract_last_@var{m}): Document.
17453 * optabs.def (extract_last_optab): New optab.
17454 * internal-fn.def (EXTRACT_LAST): New internal function.
17455 * internal-fn.c (cond_unary_direct): New macro.
17456 (expand_cond_unary_optab_fn): Likewise.
17457 (direct_cond_unary_optab_supported_p): Likewise.
17458 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17459 loops using EXTRACT_LAST.
17460 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17461 (extract_last_<mode>): ...this optab.
17462 (vec_extract<mode><Vel>): Update accordingly.
17464 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17465 Alan Hayward <alan.hayward@arm.com>
17466 David Sherwood <david.sherwood@arm.com>
17468 * target.def (empty_mask_is_expensive): New hook.
17469 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17470 * doc/tm.texi: Regenerate.
17471 * targhooks.h (default_empty_mask_is_expensive): Declare.
17472 * targhooks.c (default_empty_mask_is_expensive): New function.
17473 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17474 if the target says that empty masks are expensive.
17475 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17477 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17479 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17480 Alan Hayward <alan.hayward@arm.com>
17481 David Sherwood <david.sherwood@arm.com>
17483 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17484 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17485 (vect_use_loop_mask_for_alignment_p): New function.
17486 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17487 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17488 niters_skip argument. Make sure that the first niters_skip elements
17489 of the first iteration are inactive.
17490 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17491 Update call to vect_set_loop_masks_directly.
17492 (get_misalign_in_elems): New function, split out from...
17493 (vect_gen_prolog_loop_niters): ...here.
17494 (vect_update_init_of_dr): Take a code argument that specifies whether
17495 the adjustment should be added or subtracted.
17496 (vect_update_init_of_drs): Likewise.
17497 (vect_prepare_for_masked_peels): New function.
17498 (vect_do_peeling): Skip prologue peeling if we're using a mask
17499 instead. Update call to vect_update_inits_of_drs.
17500 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17502 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17503 alignment. Do not include the number of peeled iterations in
17504 the minimum threshold in that case.
17505 (vectorizable_induction): Adjust the start value down by
17506 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17507 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17508 Take the number of skipped iterations into account when calculating
17510 * tree-vect-stmts.c (vect_gen_while_not): New function.
17512 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17513 Alan Hayward <alan.hayward@arm.com>
17514 David Sherwood <david.sherwood@arm.com>
17516 * doc/sourcebuild.texi (vect_fully_masked): Document.
17517 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17518 default value to 0.
17519 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17521 (vect_analyze_loop_2): ...here. Don't check the vectorization
17522 factor against the number of loop iterations if the loop is
17525 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17526 Alan Hayward <alan.hayward@arm.com>
17527 David Sherwood <david.sherwood@arm.com>
17529 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17530 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17531 (dump_groups): Update accordingly.
17532 (iv_use::mem_type): New member variable.
17533 (address_p): New function.
17534 (record_use): Add a mem_type argument and initialize the new
17536 (record_group_use): Add a mem_type argument. Use address_p.
17537 Remove obsolete null checks of base_object. Update call to record_use.
17538 (find_interesting_uses_op): Update call to record_group_use.
17539 (find_interesting_uses_cond): Likewise.
17540 (find_interesting_uses_address): Likewise.
17541 (get_mem_type_for_internal_fn): New function.
17542 (find_address_like_use): Likewise.
17543 (find_interesting_uses_stmt): Try find_address_like_use before
17544 calling find_interesting_uses_op.
17545 (addr_offset_valid_p): Use the iv mem_type field as the type
17546 of the addressed memory.
17547 (add_autoinc_candidates): Likewise.
17548 (get_address_cost): Likewise.
17549 (split_small_address_groups_p): Use address_p.
17550 (split_address_groups): Likewise.
17551 (add_iv_candidate_for_use): Likewise.
17552 (autoinc_possible_for_pair): Likewise.
17553 (rewrite_groups): Likewise.
17554 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17555 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17556 (get_alias_ptr_type_for_ptr_address): New function.
17557 (rewrite_use_address): Rewrite address uses in calls that were
17558 identified by find_address_like_use.
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 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17566 * gimple-expr.h (is_gimple_addressable: Likewise.
17567 * gimple-expr.c (is_gimple_address): Likewise.
17568 * internal-fn.c (expand_call_mem_ref): New function.
17569 (expand_mask_load_optab_fn): Use it.
17570 (expand_mask_store_optab_fn): Likewise.
17572 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17573 Alan Hayward <alan.hayward@arm.com>
17574 David Sherwood <david.sherwood@arm.com>
17576 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17577 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17578 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17579 (cond_umax@var{mode}): Document.
17580 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17581 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17582 (cond_umin_optab, cond_umax_optab): New optabs.
17583 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17584 (COND_IOR, COND_XOR): New internal functions.
17585 * internal-fn.h (get_conditional_internal_fn): Declare.
17586 * internal-fn.c (cond_binary_direct): New macro.
17587 (expand_cond_binary_optab_fn): Likewise.
17588 (direct_cond_binary_optab_supported_p): Likewise.
17589 (get_conditional_internal_fn): New function.
17590 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17591 Cope with reduction statements that are vectorized as calls rather
17593 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17594 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17595 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17596 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17597 (UNSPEC_COND_EOR): New unspecs.
17598 (optab): Add mappings for them.
17599 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17600 (sve_int_op, sve_fp_op): New int attributes.
17602 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17603 Alan Hayward <alan.hayward@arm.com>
17604 David Sherwood <david.sherwood@arm.com>
17606 * optabs.def (while_ult_optab): New optab.
17607 * doc/md.texi (while_ult@var{m}@var{n}): Document.
17608 * internal-fn.def (WHILE_ULT): New internal function.
17609 * internal-fn.h (direct_internal_fn_supported_p): New override
17610 that takes two types as argument.
17611 * internal-fn.c (while_direct): New macro.
17612 (expand_while_optab_fn): New function.
17613 (convert_optab_supported_p): Likewise.
17614 (direct_while_optab_supported_p): New macro.
17615 * wide-int.h (wi::udiv_ceil): New function.
17616 * tree-vectorizer.h (rgroup_masks): New structure.
17617 (vec_loop_masks): New typedef.
17618 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
17619 and fully_masked_p.
17620 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
17621 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
17622 (vect_max_vf): New function.
17623 (slpeel_make_loop_iterate_ntimes): Delete.
17624 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
17625 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
17626 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
17627 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
17628 internal-fn.h, stor-layout.h and optabs-query.h.
17629 (vect_set_loop_mask): New function.
17630 (add_preheader_seq): Likewise.
17631 (add_header_seq): Likewise.
17632 (interleave_supported_p): Likewise.
17633 (vect_maybe_permute_loop_masks): Likewise.
17634 (vect_set_loop_masks_directly): Likewise.
17635 (vect_set_loop_condition_masked): Likewise.
17636 (vect_set_loop_condition_unmasked): New function, split out from
17637 slpeel_make_loop_iterate_ntimes.
17638 (slpeel_make_loop_iterate_ntimes): Rename to..
17639 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
17640 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
17641 (vect_do_peeling): Update call accordingly.
17642 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
17644 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17645 mask_compare_type, can_fully_mask_p and fully_masked_p.
17646 (release_vec_loop_masks): New function.
17647 (_loop_vec_info): Use it to free the loop masks.
17648 (can_produce_all_loop_masks_p): New function.
17649 (vect_get_max_nscalars_per_iter): Likewise.
17650 (vect_verify_full_masking): Likewise.
17651 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
17652 retries, and free the mask rgroups before retrying. Check loop-wide
17653 reasons for disallowing fully-masked loops. Make the final decision
17654 about whether use a fully-masked loop or not.
17655 (vect_estimate_min_profitable_iters): Do not assume that peeling
17656 for the number of iterations will be needed for fully-masked loops.
17657 (vectorizable_reduction): Disable fully-masked loops.
17658 (vectorizable_live_operation): Likewise.
17659 (vect_halve_mask_nunits): New function.
17660 (vect_double_mask_nunits): Likewise.
17661 (vect_record_loop_mask): Likewise.
17662 (vect_get_loop_mask): Likewise.
17663 (vect_transform_loop): Handle the case in which the final loop
17664 iteration might handle a partial vector. Call vect_set_loop_condition
17665 instead of slpeel_make_loop_iterate_ntimes.
17666 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
17667 (check_load_store_masking): New function.
17668 (prepare_load_store_mask): Likewise.
17669 (vectorizable_store): Handle fully-masked loops.
17670 (vectorizable_load): Likewise.
17671 (supportable_widening_operation): Use vect_halve_mask_nunits for
17673 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
17674 (vect_gen_while): New function.
17675 * config/aarch64/aarch64.md (umax<mode>3): New expander.
17676 (aarch64_uqdec<mode>): New insn.
17678 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17679 Alan Hayward <alan.hayward@arm.com>
17680 David Sherwood <david.sherwood@arm.com>
17682 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
17683 (reduc_xor_scal_optab): New optabs.
17684 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
17685 (reduc_xor_scal_@var{m}): Document.
17686 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
17687 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
17688 internal functions.
17689 * fold-const-call.c (fold_const_call): Handle them.
17690 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
17691 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
17692 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
17693 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
17694 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
17695 (UNSPEC_XORV): New unspecs.
17696 (optab): Add entries for them.
17697 (BITWISEV): New int iterator.
17698 (bit_reduc_op): New int attributes.
17700 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17701 Alan Hayward <alan.hayward@arm.com>
17702 David Sherwood <david.sherwood@arm.com>
17704 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
17705 * internal-fn.def (VEC_SHL_INSERT): New internal function.
17706 * optabs.def (vec_shl_insert_optab): New optab.
17707 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
17708 (duplicate_and_interleave): Likewise.
17709 * tree-vect-loop.c: Include internal-fn.h.
17710 (neutral_op_for_slp_reduction): New function, split out from
17711 get_initial_defs_for_reduction.
17712 (get_initial_def_for_reduction): Handle option 2 for variable-length
17713 vectors by loading the neutral value into a vector and then shifting
17714 the initial value into element 0.
17715 (get_initial_defs_for_reduction): Replace the code argument with
17716 the neutral value calculated by neutral_op_for_slp_reduction.
17717 Use gimple_build_vector for constant-length vectors.
17718 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
17719 but the first group_size elements have a neutral value.
17720 Use duplicate_and_interleave otherwise.
17721 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
17722 Update call to get_initial_defs_for_reduction. Handle SLP
17723 reductions for variable-length vectors by creating one vector
17724 result for each scalar result, with the elements associated
17725 with other scalar results stubbed out with the neutral value.
17726 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
17727 Require IFN_VEC_SHL_INSERT for double reductions on
17728 variable-length vectors, or SLP reductions that have
17729 a neutral value. Require can_duplicate_and_interleave_p
17730 support for variable-length unchained SLP reductions if there
17731 is no neutral value, such as for MIN/MAX reductions. Also require
17732 the number of vector elements to be a multiple of the number of
17733 SLP statements when doing variable-length unchained SLP reductions.
17734 Update call to vect_create_epilog_for_reduction.
17735 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
17736 and remove initial values.
17737 (duplicate_and_interleave): Make public.
17738 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
17739 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
17741 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17742 Alan Hayward <alan.hayward@arm.com>
17743 David Sherwood <david.sherwood@arm.com>
17745 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
17746 (can_duplicate_and_interleave_p): New function.
17747 (vect_get_and_check_slp_defs): Take the vector of statements
17748 rather than just the current one. Remove excess parentheses.
17749 Restriction rejectinon of vect_constant_def and vect_external_def
17750 for variable-length vectors to boolean types, or types for which
17751 can_duplicate_and_interleave_p is false.
17752 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
17753 (duplicate_and_interleave): New function.
17754 (vect_get_constant_vectors): Use gimple_build_vector for
17755 constant-length vectors and suitable variable-length constant
17756 vectors. Use duplicate_and_interleave for other variable-length
17757 vectors. Don't defer the update when inserting new statements.
17759 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17760 Alan Hayward <alan.hayward@arm.com>
17761 David Sherwood <david.sherwood@arm.com>
17763 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
17764 min_profitable_iters doesn't go negative.
17766 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17767 Alan Hayward <alan.hayward@arm.com>
17768 David Sherwood <david.sherwood@arm.com>
17770 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
17771 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
17772 * optabs.def (vec_mask_load_lanes_optab): New optab.
17773 (vec_mask_store_lanes_optab): Likewise.
17774 * internal-fn.def (MASK_LOAD_LANES): New internal function.
17775 (MASK_STORE_LANES): Likewise.
17776 * internal-fn.c (mask_load_lanes_direct): New macro.
17777 (mask_store_lanes_direct): Likewise.
17778 (expand_mask_load_optab_fn): Handle masked operations.
17779 (expand_mask_load_lanes_optab_fn): New macro.
17780 (expand_mask_store_optab_fn): Handle masked operations.
17781 (expand_mask_store_lanes_optab_fn): New macro.
17782 (direct_mask_load_lanes_optab_supported_p): Likewise.
17783 (direct_mask_store_lanes_optab_supported_p): Likewise.
17784 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
17786 (vect_load_lanes_supported): Likewise.
17787 * tree-vect-data-refs.c (strip_conversion): New function.
17788 (can_group_stmts_p): Likewise.
17789 (vect_analyze_data_ref_accesses): Use it instead of checking
17790 for a pair of assignments.
17791 (vect_store_lanes_supported): Take a masked_p parameter.
17792 (vect_load_lanes_supported): Likewise.
17793 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
17794 vect_store_lanes_supported and vect_load_lanes_supported.
17795 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
17796 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
17797 parameter. Don't allow gaps for masked accesses.
17798 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
17799 and vect_load_lanes_supported.
17800 (get_load_store_type): Take a masked_p parameter and update
17801 call to get_group_load_store_type.
17802 (vectorizable_store): Update call to get_load_store_type.
17803 Handle IFN_MASK_STORE_LANES.
17804 (vectorizable_load): Update call to get_load_store_type.
17805 Handle IFN_MASK_LOAD_LANES.
17807 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17808 Alan Hayward <alan.hayward@arm.com>
17809 David Sherwood <david.sherwood@arm.com>
17811 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
17813 * config/aarch64/aarch64-protos.h
17814 (aarch64_sve_struct_memory_operand_p): Declare.
17815 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
17816 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
17817 (VPRED, vpred): Handle SVE structure modes.
17818 * config/aarch64/constraints.md (Utx): New constraint.
17819 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
17820 (aarch64_sve_struct_nonimmediate_operand): New predicates.
17821 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
17822 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
17823 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
17824 structure modes. Split into pieces after RA.
17825 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
17826 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
17828 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
17829 SVE structure modes.
17830 (aarch64_classify_address): Likewise.
17831 (sizetochar): Move earlier in file.
17832 (aarch64_print_operand): Handle SVE register lists.
17833 (aarch64_array_mode): New function.
17834 (aarch64_sve_struct_memory_operand_p): Likewise.
17835 (TARGET_ARRAY_MODE): Redefine.
17837 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17838 Alan Hayward <alan.hayward@arm.com>
17839 David Sherwood <david.sherwood@arm.com>
17841 * target.def (array_mode): New target hook.
17842 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
17843 * doc/tm.texi: Regenerate.
17844 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
17845 * hooks.c (hook_optmode_mode_uhwi_none): New function.
17846 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
17847 targetm.array_mode.
17848 * stor-layout.c (mode_for_array): Likewise. Support polynomial
17851 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17852 Alan Hayward <alan.hayward@arm.com>
17853 David Sherwood <david.sherwood@arm.com>
17855 * fold-const.c (fold_binary_loc): Check the argument types
17856 rather than the result type when testing for a vector operation.
17858 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17860 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
17861 * doc/tm.texi: Regenerate.
17863 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17864 Alan Hayward <alan.hayward@arm.com>
17865 David Sherwood <david.sherwood@arm.com>
17867 * doc/invoke.texi (-msve-vector-bits=): Document new option.
17868 (sve): Document new AArch64 extension.
17869 * doc/md.texi (w): Extend the description of the AArch64
17870 constraint to include SVE vectors.
17871 (Upl, Upa): Document new AArch64 predicate constraints.
17872 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
17874 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
17875 (msve-vector-bits=): New option.
17876 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
17877 SVE when these are disabled.
17878 (sve): New extension.
17879 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
17880 modes. Adjust their number of units based on aarch64_sve_vg.
17881 (MAX_BITSIZE_MODE_ANY_MODE): Define.
17882 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
17883 aarch64_addr_query_type.
17884 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
17885 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
17886 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
17887 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
17888 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
17889 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
17890 (aarch64_simd_imm_zero_p): Delete.
17891 (aarch64_check_zero_based_sve_index_immediate): Declare.
17892 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
17893 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
17894 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
17895 (aarch64_sve_float_mul_immediate_p): Likewise.
17896 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
17897 rather than an rtx.
17898 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
17899 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
17900 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
17901 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
17902 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
17903 (aarch64_regmode_natural_size): Likewise.
17904 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
17905 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
17907 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
17908 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
17909 for VG and the SVE predicate registers.
17910 (V_ALIASES): Add a "z"-prefixed alias.
17911 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
17912 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
17913 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
17914 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
17915 (REG_CLASS_NAMES): Add entries for them.
17916 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
17917 and the predicate registers.
17918 (aarch64_sve_vg): Declare.
17919 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
17920 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
17921 (REGMODE_NATURAL_SIZE): Define.
17922 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
17924 * config/aarch64/aarch64.c: Include cfgrtl.h.
17925 (simd_immediate_info): Add a constructor for series vectors,
17926 and an associated step field.
17927 (aarch64_sve_vg): New variable.
17928 (aarch64_dbx_register_number): Handle VG and the predicate registers.
17929 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
17930 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
17931 (VEC_ANY_DATA, VEC_STRUCT): New constants.
17932 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
17933 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
17934 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
17935 (aarch64_get_mask_mode): New functions.
17936 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
17937 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
17938 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
17939 predicate modes and predicate registers. Explicitly restrict
17940 GPRs to modes of 16 bytes or smaller. Only allow FP registers
17941 to store a vector mode if it is recognized by
17942 aarch64_classify_vector_mode.
17943 (aarch64_regmode_natural_size): New function.
17944 (aarch64_hard_regno_caller_save_mode): Return the original mode
17946 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
17947 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
17948 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
17949 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
17951 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
17952 does not overlap dest if the function is frame-related. Handle
17954 (aarch64_split_add_offset): New function.
17955 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
17956 them aarch64_add_offset.
17957 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
17958 and update call to aarch64_sub_sp.
17959 (aarch64_add_cfa_expression): New function.
17960 (aarch64_expand_prologue): Pass extra temporary registers to the
17961 functions above. Handle the case in which we need to emit new
17962 DW_CFA_expressions for registers that were originally saved
17963 relative to the stack pointer, but now have to be expressed
17964 relative to the frame pointer.
17965 (aarch64_output_mi_thunk): Pass extra temporary registers to the
17967 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
17968 IP0 and IP1 values for SVE frames.
17969 (aarch64_expand_vec_series): New function.
17970 (aarch64_expand_sve_widened_duplicate): Likewise.
17971 (aarch64_expand_sve_const_vector): Likewise.
17972 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
17973 Handle SVE constants. Use emit_move_insn to move a force_const_mem
17974 into the register, rather than emitting a SET directly.
17975 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
17976 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
17977 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
17978 (offset_9bit_signed_scaled_p): New functions.
17979 (aarch64_replicate_bitmask_imm): New function.
17980 (aarch64_bitmask_imm): Use it.
17981 (aarch64_cannot_force_const_mem): Reject expressions involving
17982 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
17983 (aarch64_classify_index): Handle SVE indices, by requiring
17984 a plain register index with a scale that matches the element size.
17985 (aarch64_classify_address): Handle SVE addresses. Assert that
17986 the mode of the address is VOIDmode or an integer mode.
17987 Update call to aarch64_classify_symbol.
17988 (aarch64_classify_symbolic_expression): Update call to
17989 aarch64_classify_symbol.
17990 (aarch64_const_vec_all_in_range_p): New function.
17991 (aarch64_print_vector_float_operand): Likewise.
17992 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
17993 "vN" for FP registers with SVE modes. Handle (const ...) vectors
17994 and the FP immediates 1.0 and 0.5.
17995 (aarch64_print_address_internal): Handle SVE addresses.
17996 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
17997 (aarch64_regno_regclass): Handle predicate registers.
17998 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18000 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18001 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18002 (aarch64_convert_sve_vector_bits): New function.
18003 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18004 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18005 rather than an rtx.
18006 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18007 Handle SVE vector and predicate modes. Accept VL-based constants
18008 that need only one temporary register, and VL offsets that require
18009 no temporary registers.
18010 (aarch64_conditional_register_usage): Mark the predicate registers
18011 as fixed if SVE isn't available.
18012 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18013 Return true for SVE vector and predicate modes.
18014 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18015 rather than an unsigned int. Handle SVE modes.
18016 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18018 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18020 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18021 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18022 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18023 (aarch64_sve_float_mul_immediate_p): New functions.
18024 (aarch64_sve_valid_immediate): New function.
18025 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18026 Explicitly reject structure modes. Check for INDEX constants.
18027 Handle PTRUE and PFALSE constants.
18028 (aarch64_check_zero_based_sve_index_immediate): New function.
18029 (aarch64_simd_imm_zero_p): Delete.
18030 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18031 vector modes. Accept constants in the range of CNT[BHWD].
18032 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18033 ask for an Advanced SIMD mode.
18034 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18035 (aarch64_simd_vector_alignment): Handle SVE predicates.
18036 (aarch64_vectorize_preferred_vector_alignment): New function.
18037 (aarch64_simd_vector_alignment_reachable): Use it instead of
18039 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18040 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18042 (MAX_VECT_LEN): Delete.
18043 (expand_vec_perm_d): Add a vec_flags field.
18044 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18045 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18046 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18048 (aarch64_evpc_rev): Rename to...
18049 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18050 (aarch64_evpc_rev_global): New function.
18051 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18052 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18054 (aarch64_evpc_sve_tbl): New function.
18055 (aarch64_expand_vec_perm_const_1): Update after rename of
18056 aarch64_evpc_rev. Handle SVE permutes too, trying
18057 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18058 than aarch64_evpc_tbl.
18059 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18060 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18061 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18062 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18063 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18064 (aarch64_expand_sve_vcond): New functions.
18065 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18066 of aarch64_vector_mode_p.
18067 (aarch64_dwarf_poly_indeterminate_value): New function.
18068 (aarch64_compute_pressure_classes): Likewise.
18069 (aarch64_can_change_mode_class): Likewise.
18070 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18071 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18072 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18073 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18074 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18075 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18076 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18077 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18079 (Dn, Dl, Dr): Accept const as well as const_vector.
18080 (Dz): Likewise. Compare against CONST0_RTX.
18081 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18082 of "vector" where appropriate.
18083 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18084 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18085 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18086 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18087 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18088 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18089 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18090 (v_int_equiv): Extend to SVE modes.
18091 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18093 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18094 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18095 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18096 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18097 (SVE_COND_FP_CMP): New int iterators.
18098 (perm_hilo): Handle the new unpack unspecs.
18099 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18101 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18102 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18103 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18104 (aarch64_equality_operator, aarch64_constant_vector_operand)
18105 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18106 (aarch64_sve_nonimmediate_operand): Likewise.
18107 (aarch64_sve_general_operand): Likewise.
18108 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18109 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18110 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18111 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18112 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18113 (aarch64_sve_float_arith_immediate): Likewise.
18114 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18115 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18116 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18117 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18118 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18119 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18120 (aarch64_sve_float_arith_operand): Likewise.
18121 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18122 (aarch64_sve_float_mul_operand): Likewise.
18123 (aarch64_sve_vec_perm_operand): Likewise.
18124 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18125 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18126 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18127 as well as const_vector.
18128 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18129 in file. Use CONST0_RTX and CONSTM1_RTX.
18130 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18131 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18132 Use aarch64_simd_imm_zero.
18133 * config/aarch64/aarch64-sve.md: New file.
18134 * config/aarch64/aarch64.md: Include it.
18135 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18136 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18137 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18138 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18139 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18140 (sve): New attribute.
18141 (enabled): Disable instructions with the sve attribute unless
18143 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18144 aarch64_expand_mov_immediate.
18145 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18146 CNT[BHSD] immediates.
18147 (movti): Split CONST_POLY_INT moves into two halves.
18148 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18149 Split additions that need a temporary here if the destination
18150 is the stack pointer.
18151 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18152 (*add<mode>3_poly_1): New instruction.
18153 (set_clobber_cc): New expander.
18155 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18157 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18158 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18159 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18160 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18161 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18162 Change innermode from fixed_mode_size to machine_mode.
18163 (simplify_subreg): Update call accordingly. Handle a constant-sized
18164 subreg of a variable-length CONST_VECTOR.
18166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18167 Alan Hayward <alan.hayward@arm.com>
18168 David Sherwood <david.sherwood@arm.com>
18170 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18171 (add_offset_to_base): New function, split out from...
18172 (create_mem_ref): ...here. When handling a scale other than 1,
18173 check first whether the address is valid without the offset.
18174 Add it into the base if so, leaving the index and scale as-is.
18176 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18179 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18180 fold_for_warn before checking if arg2 is INTEGER_CST.
18182 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18184 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18185 (store_multiple_operation): Delete.
18186 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18187 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18188 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18189 guarded by TARGET_STRING.
18190 (rs6000_output_load_multiple): Delete.
18191 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18192 OPTION_MASK_STRING / TARGET_STRING handling.
18193 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18194 (const rs6000_opt_masks) <"string">: Change mask to 0.
18195 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18196 (MASK_STRING): Delete.
18197 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18199 (load_multiple): Delete.
18206 (store_multiple): Delete.
18213 (movmemsi_8reg): Delete.
18214 (corresponding unnamed define_insn): Delete.
18215 (movmemsi_6reg): Delete.
18216 (corresponding unnamed define_insn): Delete.
18217 (movmemsi_4reg): Delete.
18218 (corresponding unnamed define_insn): Delete.
18219 (movmemsi_2reg): Delete.
18220 (corresponding unnamed define_insn): Delete.
18221 (movmemsi_1reg): Delete.
18222 (corresponding unnamed define_insn): Delete.
18223 * config/rs6000/rs6000.opt (mno-string): New.
18224 (mstring): Replace by deprecation warning stub.
18225 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18227 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18229 * regrename.c (regrename_do_replace): If replacing the same
18230 reg multiple times, try to reuse last created gen_raw_REG.
18233 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18234 main to workaround a bug in GDB.
18236 2018-01-12 Tom de Vries <tom@codesourcery.com>
18239 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18241 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18243 PR rtl-optimization/80481
18244 * ira-color.c (get_cap_member): New function.
18245 (allocnos_conflict_by_live_ranges_p): Use it.
18246 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18247 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18249 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18252 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18253 (*saddl_se_1): Ditto.
18254 (*ssubsi_1): Ditto.
18255 (*ssubl_se_1): Ditto.
18257 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18259 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18260 rather than wi::to_widest for DR_INITs.
18261 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18262 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18263 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18265 (vect_analyze_group_access_1): Note that here.
18267 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18269 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18270 polynomial type sizes.
18272 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18274 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18275 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18276 (gimple_add_tmp_var): Likewise.
18278 2018-01-12 Martin Liska <mliska@suse.cz>
18280 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18281 (gimple_alloc_sizes): Likewise.
18282 (dump_gimple_statistics): Use PRIu64 in printf format.
18283 * gimple.h: Change uint64_t to int.
18285 2018-01-12 Martin Liska <mliska@suse.cz>
18287 * tree-core.h: Use uint64_t instead of int.
18288 * tree.c (tree_node_counts): Likewise.
18289 (tree_node_sizes): Likewise.
18290 (dump_tree_statistics): Use PRIu64 in printf format.
18292 2018-01-12 Martin Liska <mliska@suse.cz>
18294 * Makefile.in: As qsort_chk is implemented in vec.c, add
18295 vec.o to linkage of gencfn-macros.
18296 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18297 passing the info to record_node_allocation_statistics.
18298 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18300 * ggc-common.c (struct ggc_usage): Add operator== and use
18301 it in operator< and compare function.
18302 * mem-stats.h (struct mem_usage): Likewise.
18303 * vec.c (struct vec_usage): Remove operator< and compare
18304 function. Can be simply inherited.
18306 2018-01-12 Martin Jambor <mjambor@suse.cz>
18309 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18310 * tree-ssa-math-opts.c: Include domwalk.h.
18311 (convert_mult_to_fma_1): New function.
18312 (fma_transformation_info): New type.
18313 (fma_deferring_state): Likewise.
18314 (cancel_fma_deferring): New function.
18315 (result_of_phi): Likewise.
18316 (last_fma_candidate_feeds_initial_phi): Likewise.
18317 (convert_mult_to_fma): Added deferring logic, split actual
18318 transformation to convert_mult_to_fma_1.
18319 (math_opts_dom_walker): New type.
18320 (math_opts_dom_walker::after_dom_children): New method, body moved
18321 here from pass_optimize_widening_mul::execute, added deferring logic
18323 (pass_optimize_widening_mul::execute): Moved most of code to
18324 math_opts_dom_walker::after_dom_children.
18325 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18326 * config/i386/i386.c (ix86_option_override_internal): Added
18327 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18329 2018-01-12 Richard Biener <rguenther@suse.de>
18332 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18333 inline instance vars.
18335 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18338 * config/rx/rx.c (rx_is_restricted_memory_address):
18339 Handle SUBREG case.
18341 2018-01-12 Richard Biener <rguenther@suse.de>
18343 PR tree-optimization/80846
18344 * target.def (split_reduction): New target hook.
18345 * targhooks.c (default_split_reduction): New function.
18346 * targhooks.h (default_split_reduction): Declare.
18347 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18348 target requests first reduce vectors by combining low and high
18350 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18351 (get_vectype_for_scalar_type_and_size): Export.
18352 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18353 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18354 * doc/tm.texi: Regenerate.
18355 * config/i386/i386.c (ix86_split_reduction): Implement
18356 TARGET_VECTORIZE_SPLIT_REDUCTION.
18358 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18361 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18362 in PIC mode except for TARGET_VXWORKS_RTP.
18363 * config/sparc/sparc.c: Include cfgrtl.h.
18364 (TARGET_INIT_PIC_REG): Define.
18365 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18366 (sparc_pic_register_p): New predicate.
18367 (sparc_legitimate_address_p): Use it.
18368 (sparc_legitimize_pic_address): Likewise.
18369 (sparc_delegitimize_address): Likewise.
18370 (sparc_mode_dependent_address_p): Likewise.
18371 (gen_load_pcrel_sym): Remove 4th parameter.
18372 (load_got_register): Adjust call to above. Remove obsolete stuff.
18373 (sparc_expand_prologue): Do not call load_got_register here.
18374 (sparc_flat_expand_prologue): Likewise.
18375 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18376 (sparc_use_pseudo_pic_reg): New function.
18377 (sparc_init_pic_reg): Likewise.
18378 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18379 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18381 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18383 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18384 Add item for branch_cost.
18386 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18388 PR rtl-optimization/83565
18389 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18390 not extend the result to a larger mode for rotate operations.
18391 (num_sign_bit_copies1): Likewise.
18393 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18396 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18398 Use values-Xc.o for -pedantic.
18399 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18401 2018-01-12 Martin Liska <mliska@suse.cz>
18404 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18406 (possible_polymorphic_call_targets): Use it.
18407 (ipa_devirt): Likewise.
18409 2018-01-12 Martin Liska <mliska@suse.cz>
18411 * profile-count.h (enum profile_quality): Use 0 as invalid
18412 enum value of profile_quality.
18414 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18416 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18417 -mext-string options.
18419 2018-01-12 Richard Biener <rguenther@suse.de>
18421 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18422 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18423 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18425 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18427 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18429 * configure.ac (--with-long-double-format): Add support for the
18430 configuration option to change the default long double format on
18432 * config.gcc (powerpc*-linux*-*): Likewise.
18433 * configure: Regenerate.
18434 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18435 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18436 used without modification.
18438 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18440 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18441 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18442 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18443 MISC_BUILTIN_SPEC_BARRIER.
18444 (rs6000_init_builtins): Likewise.
18445 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18447 (speculation_barrier): New define_insn.
18448 * doc/extend.texi: Document __builtin_speculation_barrier.
18450 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18453 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18454 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18455 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18457 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18458 integral modes instead of "ss" and "sd".
18459 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18460 vectors with 32-bit and 64-bit elements.
18461 (vecdupssescalarmodesuffix): New mode attribute.
18462 (vec_dup<mode>): Use it.
18464 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18467 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18468 frame if argument is passed on stack.
18470 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18473 * ree.c (combine_reaching_defs): Optimize also
18474 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18475 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18477 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18479 PR middle-end/83189
18480 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18482 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18484 PR middle-end/83718
18485 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18486 after they are computed.
18488 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18490 PR tree-optimization/83695
18491 * gimple-loop-linterchange.cc
18492 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18493 reset cached scev information after interchange.
18494 (pass_linterchange::execute): Remove call to scev_reset_htab.
18496 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18498 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18499 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18500 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18501 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18502 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18503 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18504 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18505 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18506 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18507 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18508 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18509 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18510 (V_lane_reg): Likewise.
18511 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18513 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18514 (vfmal_lane_low<mode>_intrinsic,
18515 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18516 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18517 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18518 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18519 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18520 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18522 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18524 * config/arm/arm-cpus.in (fp16fml): New feature.
18525 (ALL_SIMD): Add fp16fml.
18526 (armv8.2-a): Add fp16fml as an option.
18527 (armv8.3-a): Likewise.
18528 (armv8.4-a): Add fp16fml as part of fp16.
18529 * config/arm/arm.h (TARGET_FP16FML): Define.
18530 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18532 * config/arm/arm-modes.def (V2HF): Define.
18533 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18534 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18535 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18536 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18537 vfmsl_low, vfmsl_high): New set of builtins.
18538 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18539 (vfml_op): New code attribute.
18540 (VFMLHALVES): New int iterator.
18541 (VFML, VFMLSEL): New mode attributes.
18542 (V_reg): Define mapping for V2HF.
18543 (V_hi, V_lo): New mode attributes.
18544 (VF_constraint): Likewise.
18545 (vfml_half, vfml_half_selector): New int attributes.
18546 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18548 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18549 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18551 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18552 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18553 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18554 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18556 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18557 Document new effective target and option set.
18559 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18561 * config/arm/arm-cpus.in (armv8_4): New feature.
18562 (ARMv8_4a): New fgroup.
18563 (armv8.4-a): New arch.
18564 * config/arm/arm-tables.opt: Regenerate.
18565 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18566 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18567 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18568 Add matching rules for -march=armv8.4-a and extensions.
18569 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18571 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18574 * config/rx/rx.md (BW): New mode attribute.
18575 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18577 2018-01-11 Richard Biener <rguenther@suse.de>
18579 PR tree-optimization/83435
18580 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18581 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18582 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18584 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18585 Alan Hayward <alan.hayward@arm.com>
18586 David Sherwood <david.sherwood@arm.com>
18588 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18590 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18591 (aarch64_print_address_internal): Use it to check for a zero offset.
18593 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18594 Alan Hayward <alan.hayward@arm.com>
18595 David Sherwood <david.sherwood@arm.com>
18597 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18598 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18599 Return a poly_int64 rather than a HOST_WIDE_INT.
18600 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18601 rather than a HOST_WIDE_INT.
18602 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18603 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18604 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18605 final_offset from HOST_WIDE_INT to poly_int64.
18606 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
18607 to_constant when getting the number of units in an Advanced SIMD
18609 (aarch64_builtin_vectorized_function): Check for a constant number
18611 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
18613 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
18614 attribute instead of GET_MODE_NUNITS.
18615 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
18616 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
18617 GET_MODE_SIZE for fixed-size registers.
18618 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
18619 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
18620 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
18621 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
18622 (aarch64_print_operand, aarch64_print_address_internal)
18623 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
18624 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
18625 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
18626 Handle polynomial GET_MODE_SIZE.
18627 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
18628 wider than SImode without modification.
18629 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
18630 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
18631 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
18632 passing and returning SVE modes.
18633 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
18634 rather than GEN_INT.
18635 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
18636 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
18637 (aarch64_allocate_and_probe_stack_space): Likewise.
18638 (aarch64_layout_frame): Cope with polynomial offsets.
18639 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
18640 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
18641 polynomial offsets.
18642 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
18643 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
18644 poly_int64 rather than a HOST_WIDE_INT.
18645 (aarch64_get_separate_components, aarch64_process_components)
18646 (aarch64_expand_prologue, aarch64_expand_epilogue)
18647 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
18648 (aarch64_anchor_offset): New function, split out from...
18649 (aarch64_legitimize_address): ...here.
18650 (aarch64_builtin_vectorization_cost): Handle polynomial
18651 TYPE_VECTOR_SUBPARTS.
18652 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
18654 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
18655 number of elements from the PARALLEL rather than the mode.
18656 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
18657 rather than GET_MODE_BITSIZE.
18658 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
18659 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
18660 (aarch64_expand_vec_perm_const_1): Handle polynomial
18661 d->perm.length () and d->perm elements.
18662 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
18663 Apply to_constant to d->perm elements.
18664 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
18665 polynomial CONST_VECTOR_NUNITS.
18666 (aarch64_move_pointer): Take amount as a poly_int64 rather
18668 (aarch64_progress_pointer): Avoid temporary variable.
18669 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
18670 the mode attribute instead of GET_MODE.
18672 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18673 Alan Hayward <alan.hayward@arm.com>
18674 David Sherwood <david.sherwood@arm.com>
18676 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
18677 x exists before using it.
18678 (aarch64_add_constant_internal): Rename to...
18679 (aarch64_add_offset_1): ...this. Replace regnum with separate
18680 src and dest rtxes. Handle the case in which they're different,
18681 including when the offset is zero. Replace scratchreg with an rtx.
18682 Use 2 additions if there is no spare register into which we can
18683 move a 16-bit constant.
18684 (aarch64_add_constant): Delete.
18685 (aarch64_add_offset): Replace reg with separate src and dest
18686 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
18687 Use aarch64_add_offset_1.
18688 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
18689 an rtx rather than an int. Take the delta as a poly_int64
18690 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
18691 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
18692 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
18693 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
18694 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
18695 and aarch64_add_sp.
18696 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
18697 aarch64_add_constant.
18699 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18701 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18702 Use scalar_float_mode.
18704 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18706 * config/aarch64/aarch64-simd.md
18707 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
18708 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
18709 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
18710 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
18711 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
18712 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
18713 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
18714 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
18715 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
18716 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
18718 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18721 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
18722 targ_options->x_arm_arch_string is non NULL.
18724 2018-01-11 Tamar Christina <tamar.christina@arm.com>
18726 * config/aarch64/aarch64.h
18727 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
18729 2018-01-11 Sudakshina Das <sudi.das@arm.com>
18732 * expmed.c (emit_store_flag_force): Swap if const op0
18733 and change VOIDmode to mode of op0.
18735 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18737 PR rtl-optimization/83761
18738 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
18739 than bytes to mode_for_size.
18741 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18743 PR middle-end/83189
18744 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
18745 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
18748 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
18750 PR middle-end/83575
18751 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
18752 when in layout mode.
18753 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
18754 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
18757 2018-01-10 Michael Collison <michael.collison@arm.com>
18759 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
18760 * config/aarch64/aarch64-option-extension.def: Add
18761 AARCH64_OPT_EXTENSION of 'fp16fml'.
18762 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18763 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
18764 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
18765 * config/aarch64/constraints.md (Ui7): New constraint.
18766 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
18767 (VFMLA_SEL_W): Ditto.
18770 (VFMLA16_LOW): New int iterator.
18771 (VFMLA16_HIGH): Ditto.
18772 (UNSPEC_FMLAL): New unspec.
18773 (UNSPEC_FMLSL): Ditto.
18774 (UNSPEC_FMLAL2): Ditto.
18775 (UNSPEC_FMLSL2): Ditto.
18776 (f16mac): New code attribute.
18777 * config/aarch64/aarch64-simd-builtins.def
18778 (aarch64_fmlal_lowv2sf): Ditto.
18779 (aarch64_fmlsl_lowv2sf): Ditto.
18780 (aarch64_fmlalq_lowv4sf): Ditto.
18781 (aarch64_fmlslq_lowv4sf): Ditto.
18782 (aarch64_fmlal_highv2sf): Ditto.
18783 (aarch64_fmlsl_highv2sf): Ditto.
18784 (aarch64_fmlalq_highv4sf): Ditto.
18785 (aarch64_fmlslq_highv4sf): Ditto.
18786 (aarch64_fmlal_lane_lowv2sf): Ditto.
18787 (aarch64_fmlsl_lane_lowv2sf): Ditto.
18788 (aarch64_fmlal_laneq_lowv2sf): Ditto.
18789 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
18790 (aarch64_fmlalq_lane_lowv4sf): Ditto.
18791 (aarch64_fmlsl_lane_lowv4sf): Ditto.
18792 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
18793 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
18794 (aarch64_fmlal_lane_highv2sf): Ditto.
18795 (aarch64_fmlsl_lane_highv2sf): Ditto.
18796 (aarch64_fmlal_laneq_highv2sf): Ditto.
18797 (aarch64_fmlsl_laneq_highv2sf): Ditto.
18798 (aarch64_fmlalq_lane_highv4sf): Ditto.
18799 (aarch64_fmlsl_lane_highv4sf): Ditto.
18800 (aarch64_fmlalq_laneq_highv4sf): Ditto.
18801 (aarch64_fmlsl_laneq_highv4sf): Ditto.
18802 * config/aarch64/aarch64-simd.md:
18803 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
18804 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18805 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
18806 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
18807 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
18808 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
18809 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
18810 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
18811 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
18812 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
18813 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
18814 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
18815 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
18816 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
18817 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
18818 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
18819 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
18820 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
18821 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
18822 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
18823 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
18824 (vfmlsl_low_u32): Ditto.
18825 (vfmlalq_low_u32): Ditto.
18826 (vfmlslq_low_u32): Ditto.
18827 (vfmlal_high_u32): Ditto.
18828 (vfmlsl_high_u32): Ditto.
18829 (vfmlalq_high_u32): Ditto.
18830 (vfmlslq_high_u32): Ditto.
18831 (vfmlal_lane_low_u32): Ditto.
18832 (vfmlsl_lane_low_u32): Ditto.
18833 (vfmlal_laneq_low_u32): Ditto.
18834 (vfmlsl_laneq_low_u32): Ditto.
18835 (vfmlalq_lane_low_u32): Ditto.
18836 (vfmlslq_lane_low_u32): Ditto.
18837 (vfmlalq_laneq_low_u32): Ditto.
18838 (vfmlslq_laneq_low_u32): Ditto.
18839 (vfmlal_lane_high_u32): Ditto.
18840 (vfmlsl_lane_high_u32): Ditto.
18841 (vfmlal_laneq_high_u32): Ditto.
18842 (vfmlsl_laneq_high_u32): Ditto.
18843 (vfmlalq_lane_high_u32): Ditto.
18844 (vfmlslq_lane_high_u32): Ditto.
18845 (vfmlalq_laneq_high_u32): Ditto.
18846 (vfmlslq_laneq_high_u32): Ditto.
18847 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
18848 (AARCH64_FL_FOR_ARCH8_4): New.
18849 (AARCH64_ISA_F16FML): New ISA flag.
18850 (TARGET_F16FML): New feature flag for fp16fml.
18851 (doc/invoke.texi): Document new fp16fml option.
18853 2018-01-10 Michael Collison <michael.collison@arm.com>
18855 * config/aarch64/aarch64-builtins.c:
18856 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
18857 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18858 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
18859 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
18860 (AARCH64_ISA_SHA3): New ISA flag.
18861 (TARGET_SHA3): New feature flag for sha3.
18862 * config/aarch64/iterators.md (sha512_op): New int attribute.
18863 (CRYPTO_SHA512): New int iterator.
18864 (UNSPEC_SHA512H): New unspec.
18865 (UNSPEC_SHA512H2): Ditto.
18866 (UNSPEC_SHA512SU0): Ditto.
18867 (UNSPEC_SHA512SU1): Ditto.
18868 * config/aarch64/aarch64-simd-builtins.def
18869 (aarch64_crypto_sha512hqv2di): New builtin.
18870 (aarch64_crypto_sha512h2qv2di): Ditto.
18871 (aarch64_crypto_sha512su0qv2di): Ditto.
18872 (aarch64_crypto_sha512su1qv2di): Ditto.
18873 (aarch64_eor3qv8hi): Ditto.
18874 (aarch64_rax1qv2di): Ditto.
18875 (aarch64_xarqv2di): Ditto.
18876 (aarch64_bcaxqv8hi): Ditto.
18877 * config/aarch64/aarch64-simd.md:
18878 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
18879 (aarch64_crypto_sha512su0qv2di): Ditto.
18880 (aarch64_crypto_sha512su1qv2di): Ditto.
18881 (aarch64_eor3qv8hi): Ditto.
18882 (aarch64_rax1qv2di): Ditto.
18883 (aarch64_xarqv2di): Ditto.
18884 (aarch64_bcaxqv8hi): Ditto.
18885 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
18886 (vsha512h2q_u64): Ditto.
18887 (vsha512su0q_u64): Ditto.
18888 (vsha512su1q_u64): Ditto.
18889 (veor3q_u16): Ditto.
18890 (vrax1q_u64): Ditto.
18891 (vxarq_u64): Ditto.
18892 (vbcaxq_u16): Ditto.
18893 * config/arm/types.md (crypto_sha512): New type attribute.
18894 (crypto_sha3): Ditto.
18895 (doc/invoke.texi): Document new sha3 option.
18897 2018-01-10 Michael Collison <michael.collison@arm.com>
18899 * config/aarch64/aarch64-builtins.c:
18900 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
18901 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18902 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
18903 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
18904 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
18905 (AARCH64_ISA_SM4): New ISA flag.
18906 (TARGET_SM4): New feature flag for sm4.
18907 * config/aarch64/aarch64-simd-builtins.def
18908 (aarch64_sm3ss1qv4si): Ditto.
18909 (aarch64_sm3tt1aq4si): Ditto.
18910 (aarch64_sm3tt1bq4si): Ditto.
18911 (aarch64_sm3tt2aq4si): Ditto.
18912 (aarch64_sm3tt2bq4si): Ditto.
18913 (aarch64_sm3partw1qv4si): Ditto.
18914 (aarch64_sm3partw2qv4si): Ditto.
18915 (aarch64_sm4eqv4si): Ditto.
18916 (aarch64_sm4ekeyqv4si): Ditto.
18917 * config/aarch64/aarch64-simd.md:
18918 (aarch64_sm3ss1qv4si): Ditto.
18919 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
18920 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
18921 (aarch64_sm4eqv4si): Ditto.
18922 (aarch64_sm4ekeyqv4si): Ditto.
18923 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
18924 (sm3part_op): Ditto.
18925 (CRYPTO_SM3TT): Ditto.
18926 (CRYPTO_SM3PART): Ditto.
18927 (UNSPEC_SM3SS1): New unspec.
18928 (UNSPEC_SM3TT1A): Ditto.
18929 (UNSPEC_SM3TT1B): Ditto.
18930 (UNSPEC_SM3TT2A): Ditto.
18931 (UNSPEC_SM3TT2B): Ditto.
18932 (UNSPEC_SM3PARTW1): Ditto.
18933 (UNSPEC_SM3PARTW2): Ditto.
18934 (UNSPEC_SM4E): Ditto.
18935 (UNSPEC_SM4EKEY): Ditto.
18936 * config/aarch64/constraints.md (Ui2): New constraint.
18937 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
18938 * config/arm/types.md (crypto_sm3): New type attribute.
18939 (crypto_sm4): Ditto.
18940 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
18941 (vsm3tt1aq_u32): Ditto.
18942 (vsm3tt1bq_u32): Ditto.
18943 (vsm3tt2aq_u32): Ditto.
18944 (vsm3tt2bq_u32): Ditto.
18945 (vsm3partw1q_u32): Ditto.
18946 (vsm3partw2q_u32): Ditto.
18947 (vsm4eq_u32): Ditto.
18948 (vsm4ekeyq_u32): Ditto.
18949 (doc/invoke.texi): Document new sm4 option.
18951 2018-01-10 Michael Collison <michael.collison@arm.com>
18953 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
18954 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
18955 (AARCH64_FL_FOR_ARCH8_4): New.
18956 (AARCH64_FL_V8_4): New flag.
18957 (doc/invoke.texi): Document new armv8.4-a option.
18959 2018-01-10 Michael Collison <michael.collison@arm.com>
18961 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
18962 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
18963 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
18964 * config/aarch64/aarch64-option-extension.def: Add
18965 AARCH64_OPT_EXTENSION of 'sha2'.
18966 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
18967 (crypto): Disable sha2 and aes if crypto disabled.
18968 (crypto): Enable aes and sha2 if enabled.
18969 (simd): Disable sha2 and aes if simd disabled.
18970 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
18972 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
18973 (TARGET_SHA2): New feature flag for sha2.
18974 (TARGET_AES): New feature flag for aes.
18975 * config/aarch64/aarch64-simd.md:
18976 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
18977 conditional on TARGET_AES.
18978 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
18979 (aarch64_crypto_sha1hsi): Make pattern conditional
18981 (aarch64_crypto_sha1hv4si): Ditto.
18982 (aarch64_be_crypto_sha1hv4si): Ditto.
18983 (aarch64_crypto_sha1su1v4si): Ditto.
18984 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
18985 (aarch64_crypto_sha1su0v4si): Ditto.
18986 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
18987 (aarch64_crypto_sha256su0v4si): Ditto.
18988 (aarch64_crypto_sha256su1v4si): Ditto.
18989 (doc/invoke.texi): Document new aes and sha2 options.
18991 2018-01-10 Martin Sebor <msebor@redhat.com>
18993 PR tree-optimization/83781
18994 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
18997 2018-01-11 Martin Sebor <msebor@gmail.com>
18998 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19000 PR tree-optimization/83501
19001 PR tree-optimization/81703
19003 * tree-ssa-strlen.c (get_string_cst): Rename...
19004 (get_string_len): ...to this. Handle global constants.
19005 (handle_char_store): Adjust.
19007 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19008 Jim Wilson <jimw@sifive.com>
19010 * config/riscv/riscv-protos.h (riscv_output_return): New.
19011 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19012 (riscv_attribute_table, riscv_output_return),
19013 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19014 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19015 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19017 (riscv_expand_prologue): Add early return for naked function.
19018 (riscv_expand_epilogue): Likewise.
19019 (riscv_function_ok_for_sibcall): Return false for naked function.
19020 (riscv_set_current_function): New.
19021 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19022 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19023 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19024 * doc/extend.texi (RISC-V Function Attributes): New.
19026 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19028 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19029 check for 128-bit long double before checking TCmode.
19030 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19031 128-bit long doubles before checking TFmode or TCmode.
19032 (FLOAT128_IBM_P): Likewise.
19034 2018-01-10 Martin Sebor <msebor@redhat.com>
19036 PR tree-optimization/83671
19037 * builtins.c (c_strlen): Unconditionally return zero for the empty
19039 Use -Warray-bounds for warnings.
19040 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19041 for non-constant array indices with COMPONENT_REF, arrays of
19042 arrays, and pointers to arrays.
19043 (gimple_fold_builtin_strlen): Determine and set length range for
19044 non-constant character arrays.
19046 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19048 PR middle-end/81897
19049 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19052 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19054 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19056 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19059 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19060 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19061 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19062 indexed_or_indirect_operand predicate.
19063 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19064 (*vsx_le_perm_load_v8hi): Likewise.
19065 (*vsx_le_perm_load_v16qi): Likewise.
19066 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19067 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19068 (*vsx_le_perm_store_v8hi): Likewise.
19069 (*vsx_le_perm_store_v16qi): Likewise.
19070 (eight unnamed splitters): Likewise.
19072 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19074 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19075 * config/rs6000/emmintrin.h: Likewise.
19076 * config/rs6000/mmintrin.h: Likewise.
19077 * config/rs6000/xmmintrin.h: Likewise.
19079 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19082 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19084 * tree.c (tree_nop_conversion): Return true for location wrapper
19086 (maybe_wrap_with_location): New function.
19087 (selftest::check_strip_nops): New function.
19088 (selftest::test_location_wrappers): New function.
19089 (selftest::tree_c_tests): Call it.
19090 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19091 (maybe_wrap_with_location): New decl.
19092 (EXPR_LOCATION_WRAPPER_P): New macro.
19093 (location_wrapper_p): New inline function.
19094 (tree_strip_any_location_wrapper): New inline function.
19096 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19099 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19100 stack_realign_offset for the largest alignment of stack slot
19102 (ix86_find_max_used_stack_alignment): New function.
19103 (ix86_finalize_stack_frame_flags): Use it. Set
19104 max_used_stack_alignment if we don't realign stack.
19105 * config/i386/i386.h (machine_function): Add
19106 max_used_stack_alignment.
19108 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19110 * config/arm/arm.opt (-mbranch-cost): New option.
19111 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19114 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19117 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19118 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19120 2018-01-10 Richard Biener <rguenther@suse.de>
19123 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19124 early out so it also covers the case where we have a non-NULL
19127 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19129 PR tree-optimization/83753
19130 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19131 for non-strided grouped accesses if the number of elements is 1.
19133 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19136 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19137 * i386.h (TARGET_USE_GATHER): Define.
19138 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19140 2018-01-10 Martin Liska <mliska@suse.cz>
19143 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19144 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19146 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19147 CLEANUP_NO_PARTITIONING is not set.
19149 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19151 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19152 for vectors, as a partial revert of r254296.
19153 * rtl.h (const_vec_p): Delete.
19154 (const_vec_duplicate_p): Don't test for vector CONSTs.
19155 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19156 * expmed.c (make_tree): Likewise.
19159 * common.md (E, F): Use CONSTANT_P instead of checking for
19161 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19162 checking for CONST_VECTOR.
19164 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19166 PR middle-end/83575
19167 * predict.c (force_edge_cold): Handle in more sane way edges
19168 with no prediction.
19170 2018-01-09 Carl Love <cel@us.ibm.com>
19172 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19174 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19175 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19176 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19177 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19178 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19179 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19180 * config/rs6000/rs6000-protos.h: Add extern defition for
19181 rs6000_generate_float2_double_code.
19182 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19184 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19185 (float2_v2df): Add define_expand.
19187 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19190 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19191 op_mode in the force_to_mode call.
19193 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19195 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19196 instead of checking each element individually.
19197 (aarch64_evpc_uzp): Likewise.
19198 (aarch64_evpc_zip): Likewise.
19199 (aarch64_evpc_ext): Likewise.
19200 (aarch64_evpc_rev): Likewise.
19201 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19202 instead of checking each element individually. Return true without
19204 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19205 whether all selected elements come from the same input, instead of
19206 checking each element individually. Remove calls to gen_rtx_REG,
19207 start_sequence and end_sequence and instead assert that no rtl is
19210 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19212 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19213 order of HIGH and CONST checks.
19215 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19217 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19218 if the destination isn't an SSA_NAME.
19220 2018-01-09 Richard Biener <rguenther@suse.de>
19222 PR tree-optimization/83668
19223 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19225 (canonicalize_loop_form): ... here, renamed from ...
19226 (canonicalize_loop_closed_ssa_form): ... this and amended to
19227 swap successor edges for loop exit blocks to make us use
19228 the RPO order we need for initial schedule generation.
19230 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19232 PR tree-optimization/64811
19233 * match.pd: When optimizing comparisons with Inf, avoid
19234 introducing or losing exceptions from comparisons with NaN.
19236 2018-01-09 Martin Liska <mliska@suse.cz>
19239 * asan.c (shadow_mem_size): Add gcc_assert.
19241 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19243 Don't save registers in main().
19246 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19247 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19248 * config/avr/avr.c (avr_set_current_function): Don't error if
19249 naked, OS_task or OS_main are specified at the same time.
19250 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19252 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19254 * common/config/avr/avr-common.c (avr_option_optimization_table):
19255 Switch on -mmain-is-OS_task for optimizing compilations.
19257 2018-01-09 Richard Biener <rguenther@suse.de>
19259 PR tree-optimization/83572
19260 * graphite.c: Include cfganal.h.
19261 (graphite_transform_loops): Connect infinite loops to exit
19262 and remove fake edges at the end.
19264 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19266 * ipa-inline.c (edge_badness): Revert accidental checkin.
19268 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19271 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19272 symbols; not inline clones.
19274 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19277 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19278 hard registers. Formatting fixes.
19280 PR preprocessor/83722
19281 * gcc.c (try_generate_repro): Pass
19282 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19283 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19286 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19287 Kito Cheng <kito.cheng@gmail.com>
19289 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19290 (riscv_leaf_function_p): Delete.
19291 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19293 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19295 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19297 (do_ifelse): New function.
19298 (do_isel): New function.
19299 (do_sub3): New function.
19300 (do_add3): New function.
19301 (do_load_mask_compare): New function.
19302 (do_overlap_load_compare): New function.
19303 (expand_compare_loop): New function.
19304 (expand_block_compare): Call expand_compare_loop() when appropriate.
19305 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19306 option description.
19307 (-mblock-compare-inline-loop-limit): New option.
19309 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19312 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19313 Reverse order of second and third operands in first alternative.
19314 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19315 of first and second elements in UNSPEC_VPERMR vector.
19316 (altivec_expand_vec_perm_le): Likewise.
19318 2018-01-08 Jeff Law <law@redhat.com>
19320 PR rtl-optimizatin/81308
19321 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19322 (process_switch): If group_case_labels makes a change, then set
19324 (pass_convert_switch::execute): If a switch is converted, then
19325 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19327 PR rtl-optimization/81308
19328 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19331 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19333 PR target/83663 - Revert r255946
19334 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19335 generation for cases where splatting a value is not useful.
19336 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19337 across a vec_duplicate and a paradoxical subreg forming a vector
19338 mode to a vec_concat.
19340 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19342 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19343 -march=armv8.3-a variants.
19344 * config/arm/t-multilib: Likewise.
19345 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19347 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19349 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19351 (cceq_ior_compare_complement): Give it a name so I can use it, and
19352 change boolean_or_operator predicate to boolean_operator so it can
19353 be used to generate a crand.
19354 (eqne): New code iterator.
19355 (bd/bd_neg): New code_attrs.
19356 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19357 a single define_insn.
19358 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19359 decrement (bdnzt/bdnzf/bdzt/bdzf).
19360 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19361 with the new names of the branch decrement patterns, and added the
19362 names of the branch decrement conditional patterns.
19364 2018-01-08 Richard Biener <rguenther@suse.de>
19366 PR tree-optimization/83563
19367 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19370 2018-01-08 Richard Biener <rguenther@suse.de>
19372 PR middle-end/83713
19373 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19375 2018-01-08 Richard Biener <rguenther@suse.de>
19377 PR tree-optimization/83685
19378 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19379 references to abnormals.
19381 2018-01-08 Richard Biener <rguenther@suse.de>
19384 * dwarf2out.c (output_indirect_strings): Handle empty
19385 skeleton_debug_str_hash.
19386 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19388 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19390 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19391 (emit_store_direct): Likewise.
19392 (arc_trampoline_adjust_address): Likewise.
19393 (arc_asm_trampoline_template): New function.
19394 (arc_initialize_trampoline): Use asm_trampoline_template.
19395 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19396 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19397 * config/arc/arc.md (flush_icache): Delete pattern.
19399 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19401 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19402 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19405 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19408 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19409 by not USED_FOR_TARGET.
19410 (make_pass_resolve_sw_modes): Likewise.
19412 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19414 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19417 2018-01-08 Richard Biener <rguenther@suse.de>
19419 PR middle-end/83580
19420 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19422 2018-01-08 Richard Biener <rguenther@suse.de>
19424 PR middle-end/83517
19425 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19427 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19429 PR middle-end/81897
19430 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19431 basic blocks with a small number of successors.
19432 (convert_control_dep_chain_into_preds): Improve handling of
19434 (dump_predicates): Split apart into...
19435 (dump_pred_chain): ...here...
19436 (dump_pred_info): ...and here.
19437 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19438 (can_chain_union_be_invalidated_p): Improve check for invalidation
19440 (uninit_uses_cannot_happen): Avoid unnecessary if
19441 convert_control_dep_chain_into_preds yielded nothing.
19443 2018-01-06 Martin Sebor <msebor@redhat.com>
19445 PR tree-optimization/83640
19446 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19447 subtracting negative offset from size.
19448 (builtin_access::overlap): Adjust offset bounds of the access to fall
19449 within the size of the object if possible.
19451 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19453 PR rtl-optimization/83699
19454 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19455 extract_bit_field_as_subreg to cases in which the extracted
19456 value is also a vector.
19458 * lra-constraints.c (process_alt_operands): Test for the equivalence
19459 substitutions when detecting a possible reload cycle.
19461 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19464 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19465 by default if flag_selective_schedling{,2}. Formatting fixes.
19467 PR rtl-optimization/83682
19468 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19469 if it has non-VECTOR_MODE element mode.
19470 (vec_duplicate_p): Likewise.
19472 PR middle-end/83694
19473 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19474 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19476 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19479 * config/i386/i386-builtin.def
19480 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19481 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19482 Require also OPTION_MASK_ISA_AVX512F in addition to
19483 OPTION_MASK_ISA_GFNI.
19484 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19485 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19486 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19487 to OPTION_MASK_ISA_GFNI.
19488 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19489 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19490 OPTION_MASK_ISA_AVX512BW.
19491 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19492 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19493 addition to OPTION_MASK_ISA_GFNI.
19494 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19495 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19496 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19497 to OPTION_MASK_ISA_GFNI.
19498 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19499 a requirement for all ISAs rather than any of them with a few
19501 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19503 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19504 bitmasks to be enabled with 3 exceptions, instead of requiring any
19505 enabled ISA with lots of exceptions.
19506 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19507 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19508 Change avx512bw in isa attribute to avx512f.
19509 * config/i386/sgxintrin.h: Add license boilerplate.
19510 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19511 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19512 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19513 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19515 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19516 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19517 temporarily sse2 rather than sse if not enabled already.
19520 * config/i386/sse.md (VI248_VLBW): Rename to ...
19521 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19522 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19523 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19524 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19525 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19526 mode iterator instead of VI248_VLBW.
19528 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19530 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19531 (record_modified): Skip clobbers; add debug output.
19532 (param_change_prob): Use sreal frequencies.
19534 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19536 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19537 punt for user-aligned variables.
19539 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19541 * tree-chrec.c (chrec_contains_symbols): Return true for
19544 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19547 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19548 of (x|y) == x for BICS pattern.
19550 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19552 PR tree-optimization/83605
19553 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19554 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19557 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19559 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19560 * config/epiphany/rtems.h: New file.
19562 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19563 Uros Bizjak <ubizjak@gmail.com>
19566 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19567 QIreg_operand instead of register_operand predicate.
19568 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19569 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19570 comments instead of -fmitigate[-_]rop.
19572 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19575 * cgraphunit.c (symbol_table::compile): Switch to text_section
19576 before calling assembly_start debug hook.
19577 * run-rtl-passes.c (run_rtl_passes): Likewise.
19580 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19582 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19583 range_int_cst_p rather than !symbolic_range_p before calling
19584 extract_range_from_multiplicative_op_1.
19586 2018-01-04 Jeff Law <law@redhat.com>
19588 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19589 redundant test in assertion.
19591 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19593 * doc/rtl.texi: Document machine_mode wrapper classes.
19595 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19597 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19598 using tree_to_uhwi.
19600 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19602 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19603 the VEC_PERM_EXPR fold to fail.
19605 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19608 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
19609 to switched_sections.
19611 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19614 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
19615 test for d.testing.
19617 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
19620 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
19621 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
19623 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19626 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
19627 is BLKmode and bitpos not zero or mode change is needed.
19629 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19632 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
19635 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
19638 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
19639 instead of MULT rtx. Update all corresponding splitters.
19640 (*saddl_se): Ditto.
19641 (*ssub<modesuffix>): Ditto.
19642 (*ssubl_se): Ditto.
19643 (*cmp_sadd_di): Update split patterns.
19644 (*cmp_sadd_si): Ditto.
19645 (*cmp_sadd_sidi): Ditto.
19646 (*cmp_ssub_di): Ditto.
19647 (*cmp_ssub_si): Ditto.
19648 (*cmp_ssub_sidi): Ditto.
19649 * config/alpha/predicates.md (const23_operand): New predicate.
19650 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
19651 Look for ASHIFT, not MULT inner operand.
19652 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
19654 2018-01-04 Martin Liska <mliska@suse.cz>
19656 PR gcov-profile/83669
19657 * gcov.c (output_intermediate_file): Add version to intermediate
19659 * doc/gcov.texi: Document new field 'version' in intermediate
19660 file format. Fix location of '-k' option of gcov command.
19662 2018-01-04 Martin Liska <mliska@suse.cz>
19665 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
19667 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19669 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
19671 2018-01-03 Martin Sebor <msebor@redhat.com>
19673 PR tree-optimization/83655
19674 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
19675 checking calls with invalid arguments.
19677 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19679 * tree-vect-stmts.c (vect_get_store_rhs): New function.
19680 (vectorizable_mask_load_store): Delete.
19681 (vectorizable_call): Return false for masked loads and stores.
19682 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
19683 instead of gimple_assign_rhs1.
19684 (vectorizable_load): Handle IFN_MASK_LOAD.
19685 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
19687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19689 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
19691 (vectorizable_mask_load_store): ...here.
19692 (vectorizable_load): ...and here.
19694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19696 * tree-vect-stmts.c (vect_build_all_ones_mask)
19697 (vect_build_zero_merge_argument): New functions, split out from...
19698 (vectorizable_load): ...here.
19700 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19702 * tree-vect-stmts.c (vect_check_store_rhs): New function,
19704 (vectorizable_mask_load_store): ...here.
19705 (vectorizable_store): ...and here.
19707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19709 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
19711 (vectorizable_mask_load_store): ...here.
19713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19715 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
19716 (vect_model_store_cost): Take a vec_load_store_type instead of a
19718 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
19719 (vect_model_store_cost): Take a vec_load_store_type instead of a
19721 (vectorizable_mask_load_store): Update accordingly.
19722 (vectorizable_store): Likewise.
19723 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
19725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19727 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
19728 IFN_MASK_LOAD calls here rather than...
19729 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
19731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19732 Alan Hayward <alan.hayward@arm.com>
19733 David Sherwood <david.sherwood@arm.com>
19735 * expmed.c (extract_bit_field_1): For vector extracts,
19736 fall back to extract_bit_field_as_subreg if vec_extract
19739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19740 Alan Hayward <alan.hayward@arm.com>
19741 David Sherwood <david.sherwood@arm.com>
19743 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
19744 they are variable or constant sized.
19745 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
19746 slots for constant-sized data.
19748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19749 Alan Hayward <alan.hayward@arm.com>
19750 David Sherwood <david.sherwood@arm.com>
19752 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
19753 handling COND_EXPRs with boolean comparisons, try to find a better
19754 basis for the mask type than the boolean itself.
19756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19758 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
19759 is calculated and how it can be overridden.
19760 * genmodes.c (max_bitsize_mode_any_mode): New variable.
19761 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
19763 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
19766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19767 Alan Hayward <alan.hayward@arm.com>
19768 David Sherwood <david.sherwood@arm.com>
19770 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
19771 Remove the mode argument.
19772 (aarch64_simd_valid_immediate): Remove the mode and inverse
19774 * config/aarch64/iterators.md (bitsize): New iterator.
19775 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
19776 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
19777 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
19778 aarch64_simd_valid_immediate.
19779 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
19780 (aarch64_reg_or_bic_imm): Likewise.
19781 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
19782 with an insn_type enum and msl with a modifier_type enum.
19783 Replace element_width with a scalar_mode. Change the shift
19784 to unsigned int. Add constructors for scalar_float_mode and
19785 scalar_int_mode elements.
19786 (aarch64_vect_float_const_representable_p): Delete.
19787 (aarch64_can_const_movi_rtx_p)
19788 (aarch64_simd_scalar_immediate_valid_for_move)
19789 (aarch64_simd_make_constant): Update call to
19790 aarch64_simd_valid_immediate.
19791 (aarch64_advsimd_valid_immediate_hs): New function.
19792 (aarch64_advsimd_valid_immediate): Likewise.
19793 (aarch64_simd_valid_immediate): Remove mode and inverse
19794 arguments. Rewrite to use the above. Use const_vec_duplicate_p
19795 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
19796 and aarch64_float_const_representable_p on the result.
19797 (aarch64_output_simd_mov_immediate): Remove mode argument.
19798 Update call to aarch64_simd_valid_immediate and use of
19799 simd_immediate_info.
19800 (aarch64_output_scalar_simd_mov_immediate): Update call
19803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19804 Alan Hayward <alan.hayward@arm.com>
19805 David Sherwood <david.sherwood@arm.com>
19807 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
19808 (mode_nunits): Likewise CONST_MODE_NUNITS.
19809 * machmode.def (ADJUST_NUNITS): Document.
19810 * genmodes.c (mode_data::need_nunits_adj): New field.
19811 (blank_mode): Update accordingly.
19812 (adj_nunits): New variable.
19813 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
19815 (emit_mode_size_inline): Set need_bytesize_adj for all modes
19816 listed in adj_nunits.
19817 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
19818 listed in adj_nunits. Don't emit case statements for such modes.
19819 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
19820 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
19821 nothing if adj_nunits is nonnull.
19822 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
19823 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
19824 (emit_mode_fbit): Update use of print_maybe_const_decl.
19825 (emit_move_size): Likewise. Treat the array as non-const
19827 (emit_mode_adjustments): Handle adj_nunits.
19829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19831 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
19832 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
19833 (VECTOR_MODES): Use it.
19834 (make_vector_modes): Take the prefix as an argument.
19836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19837 Alan Hayward <alan.hayward@arm.com>
19838 David Sherwood <david.sherwood@arm.com>
19840 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
19841 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
19842 for MODE_VECTOR_BOOL.
19843 * machmode.def (VECTOR_BOOL_MODE): Document.
19844 * genmodes.c (VECTOR_BOOL_MODE): New macro.
19845 (make_vector_bool_mode): New function.
19846 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
19848 * lto-streamer-in.c (lto_input_mode_table): Likewise.
19849 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
19851 * stor-layout.c (int_mode_for_mode): Likewise.
19852 * tree.c (build_vector_type_for_mode): Likewise.
19853 * varasm.c (output_constant_pool_2): Likewise.
19854 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
19855 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
19856 for MODE_VECTOR_BOOL.
19857 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
19858 of mode class checks.
19859 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
19860 instead of a list of mode class checks.
19861 (expand_vector_scalar_condition): Likewise.
19862 (type_for_widest_vector_mode): Handle BImode as an inner mode.
19864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19865 Alan Hayward <alan.hayward@arm.com>
19866 David Sherwood <david.sherwood@arm.com>
19868 * machmode.h (mode_size): Change from unsigned short to
19870 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
19871 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19872 or if measurement_type is not polynomial.
19873 (fixed_size_mode::includes_p): Check for constant-sized modes.
19874 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
19875 return a poly_uint16 rather than an unsigned short.
19876 (emit_mode_size): Change the type of mode_size from unsigned short
19877 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
19878 (emit_mode_adjustments): Cope with polynomial vector sizes.
19879 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
19881 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
19883 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
19884 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
19885 * caller-save.c (setup_save_areas): Likewise.
19886 (replace_reg_with_saved_mem): Likewise.
19887 * calls.c (emit_library_call_value_1): Likewise.
19888 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
19889 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
19890 (gen_lowpart_for_combine): Likewise.
19891 * convert.c (convert_to_integer_1): Likewise.
19892 * cse.c (equiv_constant, cse_insn): Likewise.
19893 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
19894 (cselib_subst_to_values): Likewise.
19895 * dce.c (word_dce_process_block): Likewise.
19896 * df-problems.c (df_word_lr_mark_ref): Likewise.
19897 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
19898 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
19899 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
19900 (rtl_for_decl_location): Likewise.
19901 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
19902 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
19903 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
19904 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
19905 (expand_expr_real_1): Likewise.
19906 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
19907 (pad_below): Likewise.
19908 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19909 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
19910 * ira.c (get_subreg_tracking_sizes): Likewise.
19911 * ira-build.c (ira_create_allocno_objects): Likewise.
19912 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
19913 (ira_sort_regnos_for_alter_reg): Likewise.
19914 * ira-costs.c (record_operand_costs): Likewise.
19915 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
19916 (resolve_simple_move): Likewise.
19917 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
19918 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
19919 (lra_constraints): Likewise.
19920 (CONST_POOL_OK_P): Reject variable-sized modes.
19921 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
19922 (add_pseudo_to_slot, lra_spill): Likewise.
19923 * omp-low.c (omp_clause_aligned_alignment): Likewise.
19924 * optabs-query.c (get_best_extraction_insn): Likewise.
19925 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
19926 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
19927 (expand_mult_highpart, valid_multiword_target_p): Likewise.
19928 * recog.c (offsettable_address_addr_space_p): Likewise.
19929 * regcprop.c (maybe_mode_change): Likewise.
19930 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
19931 * regrename.c (build_def_use): Likewise.
19932 * regstat.c (dump_reg_info): Likewise.
19933 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
19934 (find_reloads, find_reloads_subreg_address): Likewise.
19935 * reload1.c (eliminate_regs_1): Likewise.
19936 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
19937 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
19938 (simplify_binary_operation_1, simplify_subreg): Likewise.
19939 * targhooks.c (default_function_arg_padding): Likewise.
19940 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
19941 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
19942 (verify_gimple_assign_ternary): Likewise.
19943 * tree-inline.c (estimate_move_cost): Likewise.
19944 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19945 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
19946 (get_address_cost_ainc): Likewise.
19947 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
19948 (vect_supportable_dr_alignment): Likewise.
19949 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
19950 (vectorizable_reduction): Likewise.
19951 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
19952 (vectorizable_operation, vectorizable_load): Likewise.
19953 * tree.c (build_same_sized_truth_vector_type): Likewise.
19954 * valtrack.c (cleanup_auto_inc_dec): Likewise.
19955 * var-tracking.c (emit_note_insn_var_location): Likewise.
19956 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
19957 (ADDR_VEC_ALIGN): Likewise.
19959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19960 Alan Hayward <alan.hayward@arm.com>
19961 David Sherwood <david.sherwood@arm.com>
19963 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
19965 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
19966 or if measurement_type is polynomial.
19967 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
19968 * combine.c (make_extraction): Likewise.
19969 * dse.c (find_shift_sequence): Likewise.
19970 * dwarf2out.c (mem_loc_descriptor): Likewise.
19971 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
19972 (extract_bit_field, extract_low_bits): Likewise.
19973 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
19974 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
19975 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
19976 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
19977 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
19978 * reload.c (find_reloads): Likewise.
19979 * reload1.c (alter_reg): Likewise.
19980 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
19981 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
19982 * tree-if-conv.c (predicate_mem_writes): Likewise.
19983 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
19984 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
19985 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19986 * valtrack.c (dead_debug_insert_temp): Likewise.
19987 * varasm.c (mergeable_constant_section): Likewise.
19988 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
19990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19991 Alan Hayward <alan.hayward@arm.com>
19992 David Sherwood <david.sherwood@arm.com>
19994 * expr.c (expand_assignment): Cope with polynomial mode sizes
19995 when assigning to a CONCAT.
19997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
19998 Alan Hayward <alan.hayward@arm.com>
19999 David Sherwood <david.sherwood@arm.com>
20001 * machmode.h (mode_precision): Change from unsigned short to
20003 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20005 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20006 or if measurement_type is not polynomial.
20007 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20008 in which the mode is already known to be a scalar_int_mode.
20009 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20010 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20012 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20013 for GET_MODE_PRECISION.
20014 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20015 for GET_MODE_PRECISION.
20016 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20018 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20019 (expand_field_assignment, make_extraction): Likewise.
20020 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20021 (get_last_value): Likewise.
20022 * convert.c (convert_to_integer_1): Likewise.
20023 * cse.c (cse_insn): Likewise.
20024 * expr.c (expand_expr_real_1): Likewise.
20025 * lra-constraints.c (simplify_operand_subreg): Likewise.
20026 * optabs-query.c (can_atomic_load_p): Likewise.
20027 * optabs.c (expand_atomic_load): Likewise.
20028 (expand_atomic_store): Likewise.
20029 * ree.c (combine_reaching_defs): Likewise.
20030 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20031 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20032 * tree.h (type_has_mode_precision_p): Likewise.
20033 * ubsan.c (instrument_si_overflow): Likewise.
20035 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20036 Alan Hayward <alan.hayward@arm.com>
20037 David Sherwood <david.sherwood@arm.com>
20039 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20040 polynomial numbers of units.
20041 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20042 (valid_vector_subparts_p): New function.
20043 (build_vector_type): Remove temporary shim and take the number
20044 of units as a poly_uint64 rather than an int.
20045 (build_opaque_vector_type): Take the number of units as a
20046 poly_uint64 rather than an int.
20047 * tree.c (build_vector_from_ctor): Handle polynomial
20048 TYPE_VECTOR_SUBPARTS.
20049 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20050 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20051 (build_vector_from_val): If the number of units is variable,
20052 use build_vec_duplicate_cst for constant operands and
20053 VEC_DUPLICATE_EXPR otherwise.
20054 (make_vector_type): Remove temporary is_constant ().
20055 (build_vector_type, build_opaque_vector_type): Take the number of
20056 units as a poly_uint64 rather than an int.
20057 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20059 * cfgexpand.c (expand_debug_expr): Likewise.
20060 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20061 (store_constructor, expand_expr_real_1): Likewise.
20062 (const_scalar_mask_from_tree): Likewise.
20063 * fold-const-call.c (fold_const_reduction): Likewise.
20064 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20065 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20066 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20067 (fold_relational_const): Likewise.
20068 (native_interpret_vector): Likewise. Change the size from an
20069 int to an unsigned int.
20070 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20071 TYPE_VECTOR_SUBPARTS.
20072 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20073 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20074 duplicating a non-constant operand into a variable-length vector.
20075 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20076 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20077 * ipa-icf.c (sem_variable::equals): Likewise.
20078 * match.pd: Likewise.
20079 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20080 * print-tree.c (print_node): Likewise.
20081 * stor-layout.c (layout_type): Likewise.
20082 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20083 * tree-cfg.c (verify_gimple_comparison): Likewise.
20084 (verify_gimple_assign_binary): Likewise.
20085 (verify_gimple_assign_ternary): Likewise.
20086 (verify_gimple_assign_single): Likewise.
20087 * tree-pretty-print.c (dump_generic_node): Likewise.
20088 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20089 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20090 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20091 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20092 (vect_shift_permute_load_chain): Likewise.
20093 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20094 (expand_vector_condition, optimize_vector_constructor): Likewise.
20095 (lower_vec_perm, get_compute_type): Likewise.
20096 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20097 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20098 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20099 (vect_recog_mask_conversion_pattern): Likewise.
20100 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20101 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20102 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20103 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20104 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20105 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20106 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20107 (supportable_widening_operation): Likewise.
20108 (supportable_narrowing_operation): Likewise.
20109 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20111 * varasm.c (output_constant): Likewise.
20113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20114 Alan Hayward <alan.hayward@arm.com>
20115 David Sherwood <david.sherwood@arm.com>
20117 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20118 so that both the length == 3 and length != 3 cases set up their
20119 own permute vectors. Add comments explaining why we know the
20120 number of elements is constant.
20121 (vect_permute_load_chain): Likewise.
20123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20124 Alan Hayward <alan.hayward@arm.com>
20125 David Sherwood <david.sherwood@arm.com>
20127 * machmode.h (mode_nunits): Change from unsigned char to
20129 (ONLY_FIXED_SIZE_MODES): New macro.
20130 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20131 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20132 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20134 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20135 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20136 or if measurement_type is not polynomial.
20137 * genmodes.c (ZERO_COEFFS): New macro.
20138 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20140 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20141 Use ZERO_COEFFS when emitting initializers.
20142 * data-streamer.h (bp_pack_poly_value): New function.
20143 (bp_unpack_poly_value): Likewise.
20144 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20145 for GET_MODE_NUNITS.
20146 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20147 for GET_MODE_NUNITS.
20148 * tree.c (make_vector_type): Remove temporary shim and make
20149 the real function take the number of units as a poly_uint64
20150 rather than an int.
20151 (build_vector_type_for_mode): Handle polynomial nunits.
20152 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20153 * emit-rtl.c (const_vec_series_p_1): Likewise.
20154 (gen_rtx_CONST_VECTOR): Likewise.
20155 * fold-const.c (test_vec_duplicate_folding): Likewise.
20156 * genrecog.c (validate_pattern): Likewise.
20157 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20158 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20159 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20160 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20161 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20162 * rtlanal.c (subreg_get_info): Likewise.
20163 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20164 (vect_grouped_load_supported): Likewise.
20165 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20166 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20167 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20168 (simplify_const_unary_operation, simplify_binary_operation_1)
20169 (simplify_const_binary_operation, simplify_ternary_operation)
20170 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20171 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20172 instead of CONST_VECTOR_NUNITS.
20173 * varasm.c (output_constant_pool_2): Likewise.
20174 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20175 explicit-encoded elements in the XVEC for variable-length vectors.
20177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20179 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20181 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20182 Alan Hayward <alan.hayward@arm.com>
20183 David Sherwood <david.sherwood@arm.com>
20185 * coretypes.h (fixed_size_mode): Declare.
20186 (fixed_size_mode_pod): New typedef.
20187 * builtins.h (target_builtins::x_apply_args_mode)
20188 (target_builtins::x_apply_result_mode): Change type to
20189 fixed_size_mode_pod.
20190 * builtins.c (apply_args_size, apply_result_size, result_vector)
20191 (expand_builtin_apply_args_1, expand_builtin_apply)
20192 (expand_builtin_return): Update accordingly.
20194 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20196 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20197 * cselib.c (cselib_hash_rtx): Likewise.
20198 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20199 CONST_VECTOR encoding.
20201 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20202 Jeff Law <law@redhat.com>
20205 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20206 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20207 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20208 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20211 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20212 explicitly probe *sp in a noreturn function if there were any callee
20213 register saves or frame pointer is needed.
20215 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20218 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20219 BLKmode for ternary, binary or unary expressions.
20222 * var-tracking.c (delete_vta_debug_insn): New inline function.
20223 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20224 insns from get_insns () to NULL instead of each bb separately.
20225 Use delete_vta_debug_insn. No longer static.
20226 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20227 delete_vta_debug_insns callers.
20228 * rtl.h (delete_vta_debug_insns): Declare.
20229 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20230 instead of variable_tracking_main.
20232 2018-01-03 Martin Sebor <msebor@redhat.com>
20234 PR tree-optimization/83603
20235 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20236 arguments past the endof the argument list in functions declared
20237 without a prototype.
20238 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20239 Avoid checking when arguments are null.
20241 2018-01-03 Martin Sebor <msebor@redhat.com>
20244 * doc/extend.texi (attribute const): Fix a typo.
20245 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20246 issuing -Wsuggest-attribute for void functions.
20248 2018-01-03 Martin Sebor <msebor@redhat.com>
20250 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20251 offset_int::from instead of wide_int::to_shwi.
20252 (maybe_diag_overlap): Remove assertion.
20253 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20254 * gimple-ssa-sprintf.c (format_directive): Same.
20255 (parse_directive): Same.
20256 (sprintf_dom_walker::compute_format_length): Same.
20257 (try_substitute_return_value): Same.
20259 2018-01-03 Jeff Law <law@redhat.com>
20261 PR middle-end/83654
20262 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20263 non-constant residual for zero at runtime and avoid probing in
20264 that case. Reorganize code for trailing problem to mirror handling
20267 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20269 PR tree-optimization/83501
20270 * tree-ssa-strlen.c (get_string_cst): New.
20271 (handle_char_store): Call get_string_cst.
20273 2018-01-03 Martin Liska <mliska@suse.cz>
20275 PR tree-optimization/83593
20276 * tree-ssa-strlen.c: Include tree-cfg.h.
20277 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20278 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20279 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20281 (strlen_dom_walker::before_dom_children): Call
20282 gimple_purge_dead_eh_edges. Dump tranformation with details
20284 (strlen_dom_walker::before_dom_children): Update call by adding
20285 new argument cleanup_eh.
20286 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20288 2018-01-03 Martin Liska <mliska@suse.cz>
20291 * cif-code.def (VARIADIC_THUNK): New enum value.
20292 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20295 2018-01-03 Jan Beulich <jbeulich@suse.com>
20297 * sse.md (mov<mode>_internal): Tighten condition for when to use
20298 vmovdqu<ssescalarsize> for TI and OI modes.
20300 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20302 Update copyright years.
20304 2018-01-03 Martin Liska <mliska@suse.cz>
20307 * ipa-visibility.c (function_and_variable_visibility): Skip
20308 functions with noipa attribure.
20310 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20312 * gcc.c (process_command): Update copyright notice dates.
20313 * gcov-dump.c (print_version): Ditto.
20314 * gcov.c (print_version): Ditto.
20315 * gcov-tool.c (print_version): Ditto.
20316 * gengtype.c (create_file): Ditto.
20317 * doc/cpp.texi: Bump @copying's copyright year.
20318 * doc/cppinternals.texi: Ditto.
20319 * doc/gcc.texi: Ditto.
20320 * doc/gccint.texi: Ditto.
20321 * doc/gcov.texi: Ditto.
20322 * doc/install.texi: Ditto.
20323 * doc/invoke.texi: Ditto.
20325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20327 * vector-builder.h (vector_builder::m_full_nelts): Change from
20328 unsigned int to poly_uint64.
20329 (vector_builder::full_nelts): Update prototype accordingly.
20330 (vector_builder::new_vector): Likewise.
20331 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20332 (vector_builder::operator ==): Likewise.
20333 (vector_builder::finalize): Likewise.
20334 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20335 Take the number of elements as a poly_uint64 rather than an
20337 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20338 from unsigned int to poly_uint64.
20339 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20340 (vec_perm_indices::new_vector): Likewise.
20341 (vec_perm_indices::length): Likewise.
20342 (vec_perm_indices::nelts_per_input): Likewise.
20343 (vec_perm_indices::input_nelts): Likewise.
20344 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20345 number of elements per input as a poly_uint64 rather than an
20346 unsigned int. Use the original encoding for variable-length
20347 vectors, rather than clamping each individual element.
20348 For the second and subsequent elements in each pattern,
20349 clamp the step and base before clamping their sum.
20350 (vec_perm_indices::series_p): Handle polynomial element counts.
20351 (vec_perm_indices::all_in_range_p): Likewise.
20352 (vec_perm_indices_to_tree): Likewise.
20353 (vec_perm_indices_to_rtx): Likewise.
20354 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20355 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20356 (tree_vector_builder::new_binary_operation): Handle polynomial
20357 element counts. Return false if we need to know the number
20358 of elements at compile time.
20359 * fold-const.c (fold_vec_perm): Punt if the number of elements
20360 isn't known at compile time.
20362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20364 * vec-perm-indices.h (vec_perm_builder): Change element type
20365 from HOST_WIDE_INT to poly_int64.
20366 (vec_perm_indices::element_type): Update accordingly.
20367 (vec_perm_indices::clamp): Handle polynomial element_types.
20368 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20369 (vec_perm_indices::all_in_range_p): Likewise.
20370 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20372 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20373 polynomial vec_perm_indices element types.
20374 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20375 * fold-const.c (fold_vec_perm): Likewise.
20376 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20377 * tree-vect-generic.c (lower_vec_perm): Likewise.
20378 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20379 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20380 element type to HOST_WIDE_INT.
20382 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20383 Alan Hayward <alan.hayward@arm.com>
20384 David Sherwood <david.sherwood@arm.com>
20386 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20387 rather than an int. Use plus_constant.
20388 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20389 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20392 Alan Hayward <alan.hayward@arm.com>
20393 David Sherwood <david.sherwood@arm.com>
20395 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20396 a HOST_WIDE_INT to a poly_int64.
20398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20399 Alan Hayward <alan.hayward@arm.com>
20400 David Sherwood <david.sherwood@arm.com>
20402 * calls.c (load_register_parameters): Cope with polynomial
20403 mode sizes. Require a constant size for BLKmode parameters
20404 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20405 forces a parameter to be padded at the lsb end in order to
20406 fill a complete number of words, require the parameter size
20407 to be ordered wrt UNITS_PER_WORD.
20409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20410 Alan Hayward <alan.hayward@arm.com>
20411 David Sherwood <david.sherwood@arm.com>
20413 * reload1.c (spill_stack_slot_width): Change element type
20414 from unsigned int to poly_uint64_pod.
20415 (alter_reg): Treat mode sizes as polynomial.
20417 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20418 Alan Hayward <alan.hayward@arm.com>
20419 David Sherwood <david.sherwood@arm.com>
20421 * reload.c (complex_word_subreg_p): New function.
20422 (reload_inner_reg_of_subreg, push_reload): Use it.
20424 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20425 Alan Hayward <alan.hayward@arm.com>
20426 David Sherwood <david.sherwood@arm.com>
20428 * lra-constraints.c (process_alt_operands): Reject matched
20429 operands whose sizes aren't ordered.
20430 (match_reload): Refer to this check here.
20432 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20433 Alan Hayward <alan.hayward@arm.com>
20434 David Sherwood <david.sherwood@arm.com>
20436 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20437 that the mode size is in the set {1, 2, 4, 8, 16}.
20439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20440 Alan Hayward <alan.hayward@arm.com>
20441 David Sherwood <david.sherwood@arm.com>
20443 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20444 Use plus_constant instead of gen_rtx_PLUS.
20446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20447 Alan Hayward <alan.hayward@arm.com>
20448 David Sherwood <david.sherwood@arm.com>
20450 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20451 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20452 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20453 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20454 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20455 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20456 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20457 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20458 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20459 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20461 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20462 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20463 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20464 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20465 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20466 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20467 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20468 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20469 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20470 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20472 * expr.c (emit_move_resolve_push): Treat the input and result
20473 of PUSH_ROUNDING as a poly_int64.
20474 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20475 (emit_push_insn): Likewise.
20476 * lra-eliminations.c (mark_not_eliminable): Likewise.
20477 * recog.c (push_operand): Likewise.
20478 * reload1.c (elimination_effects): Likewise.
20479 * rtlanal.c (nonzero_bits1): Likewise.
20480 * calls.c (store_one_arg): Likewise. Require the padding to be
20481 known at compile time.
20483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20484 Alan Hayward <alan.hayward@arm.com>
20485 David Sherwood <david.sherwood@arm.com>
20487 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20488 Use plus_constant instead of gen_rtx_PLUS.
20490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20491 Alan Hayward <alan.hayward@arm.com>
20492 David Sherwood <david.sherwood@arm.com>
20494 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20495 rather than an int.
20497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20498 Alan Hayward <alan.hayward@arm.com>
20499 David Sherwood <david.sherwood@arm.com>
20501 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20502 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20503 via stack temporaries. Treat the mode size as polynomial too.
20505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20506 Alan Hayward <alan.hayward@arm.com>
20507 David Sherwood <david.sherwood@arm.com>
20509 * expr.c (expand_expr_real_2): When handling conversions involving
20510 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20511 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20512 as a poly_uint64 too.
20514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20515 Alan Hayward <alan.hayward@arm.com>
20516 David Sherwood <david.sherwood@arm.com>
20518 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20520 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20521 Alan Hayward <alan.hayward@arm.com>
20522 David Sherwood <david.sherwood@arm.com>
20524 * combine.c (can_change_dest_mode): Handle polynomial
20525 REGMODE_NATURAL_SIZE.
20526 * expmed.c (store_bit_field_1): Likewise.
20527 * expr.c (store_constructor): Likewise.
20528 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20529 and polynomial REGMODE_NATURAL_SIZE.
20530 (gen_lowpart_common): Likewise.
20531 * reginfo.c (record_subregs_of_mode): Likewise.
20532 * rtlanal.c (read_modify_subreg_p): Likewise.
20534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20535 Alan Hayward <alan.hayward@arm.com>
20536 David Sherwood <david.sherwood@arm.com>
20538 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20539 numbers of elements.
20541 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20542 Alan Hayward <alan.hayward@arm.com>
20543 David Sherwood <david.sherwood@arm.com>
20545 * match.pd: Cope with polynomial numbers of vector elements.
20547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20548 Alan Hayward <alan.hayward@arm.com>
20549 David Sherwood <david.sherwood@arm.com>
20551 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20552 in a POINTER_PLUS_EXPR.
20554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20555 Alan Hayward <alan.hayward@arm.com>
20556 David Sherwood <david.sherwood@arm.com>
20558 * omp-simd-clone.c (simd_clone_subparts): New function.
20559 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20560 (ipa_simd_modify_function_body): Likewise.
20562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20563 Alan Hayward <alan.hayward@arm.com>
20564 David Sherwood <david.sherwood@arm.com>
20566 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20567 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20568 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20569 (expand_vector_condition, vector_element): Likewise.
20570 (subparts_gt): New function.
20571 (get_compute_type): Use subparts_gt.
20572 (count_type_subparts): Delete.
20573 (expand_vector_operations_1): Use subparts_gt instead of
20574 count_type_subparts.
20576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20577 Alan Hayward <alan.hayward@arm.com>
20578 David Sherwood <david.sherwood@arm.com>
20580 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20581 (vect_compile_time_alias): ...this new function. Do the calculation
20582 on poly_ints rather than trees.
20583 (vect_prune_runtime_alias_test_list): Update call accordingly.
20585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20586 Alan Hayward <alan.hayward@arm.com>
20587 David Sherwood <david.sherwood@arm.com>
20589 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20591 (vect_schedule_slp_instance): Likewise.
20593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20594 Alan Hayward <alan.hayward@arm.com>
20595 David Sherwood <david.sherwood@arm.com>
20597 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20598 constant and extern definitions for variable-length vectors.
20599 (vect_get_constant_vectors): Note that the number of units
20600 is known to be constant.
20602 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20603 Alan Hayward <alan.hayward@arm.com>
20604 David Sherwood <david.sherwood@arm.com>
20606 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
20607 of units as polynomial. Choose between WIDE and NARROW based
20610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20611 Alan Hayward <alan.hayward@arm.com>
20612 David Sherwood <david.sherwood@arm.com>
20614 * tree-vect-stmts.c (simd_clone_subparts): New function.
20615 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
20617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20618 Alan Hayward <alan.hayward@arm.com>
20619 David Sherwood <david.sherwood@arm.com>
20621 * tree-vect-stmts.c (vectorizable_call): Treat the number of
20622 vectors as polynomial. Use build_index_vector for
20623 IFN_GOMP_SIMD_LANE.
20625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20626 Alan Hayward <alan.hayward@arm.com>
20627 David Sherwood <david.sherwood@arm.com>
20629 * tree-vect-stmts.c (get_load_store_type): Treat the number of
20630 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
20631 for variable-length vectors.
20632 (vectorizable_mask_load_store): Treat the number of units as
20633 polynomial, asserting that it is constant if the condition has
20634 already been enforced.
20635 (vectorizable_store, vectorizable_load): Likewise.
20637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20638 Alan Hayward <alan.hayward@arm.com>
20639 David Sherwood <david.sherwood@arm.com>
20641 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
20642 of units as polynomial. Punt if we can't tell at compile time
20643 which vector contains the final result.
20645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20646 Alan Hayward <alan.hayward@arm.com>
20647 David Sherwood <david.sherwood@arm.com>
20649 * tree-vect-loop.c (vectorizable_induction): Treat the number
20650 of units as polynomial. Punt on SLP inductions. Use an integer
20651 VEC_SERIES_EXPR for variable-length integer reductions. Use a
20652 cast of such a series for variable-length floating-point
20655 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20656 Alan Hayward <alan.hayward@arm.com>
20657 David Sherwood <david.sherwood@arm.com>
20659 * tree.h (build_index_vector): Declare.
20660 * tree.c (build_index_vector): New function.
20661 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
20662 of units as polynomial, forcibly converting it to a constant if
20663 vectorizable_reduction has already enforced the condition.
20664 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
20665 to create a {1,2,3,...} vector.
20666 (vectorizable_reduction): Treat the number of units as polynomial.
20667 Choose vectype_in based on the largest scalar element size rather
20668 than the smallest number of units. Enforce the restrictions
20671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20672 Alan Hayward <alan.hayward@arm.com>
20673 David Sherwood <david.sherwood@arm.com>
20675 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
20676 number of units as polynomial.
20678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20679 Alan Hayward <alan.hayward@arm.com>
20680 David Sherwood <david.sherwood@arm.com>
20682 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
20683 * target.def (autovectorize_vector_sizes): Return the vector sizes
20684 by pointer, using vector_sizes rather than a bitmask.
20685 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
20686 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
20687 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
20689 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
20690 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
20691 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
20692 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
20693 * omp-general.c (omp_max_vf): Likewise.
20694 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20695 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
20696 * tree-vect-loop.c (vect_analyze_loop): Likewise.
20697 * tree-vect-slp.c (vect_slp_bb): Likewise.
20698 * doc/tm.texi: Regenerate.
20699 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
20701 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
20702 the vector size as a poly_uint64 rather than an unsigned int.
20703 (current_vector_size): Change from an unsigned int to a poly_uint64.
20704 (get_vectype_for_scalar_type): Update accordingly.
20705 * tree.h (build_truth_vector_type): Take the size and number of
20706 units as a poly_uint64 rather than an unsigned int.
20707 (build_vector_type): Add a temporary overload that takes
20708 the number of units as a poly_uint64 rather than an unsigned int.
20709 * tree.c (make_vector_type): Likewise.
20710 (build_truth_vector_type): Take the number of units as a poly_uint64
20711 rather than an unsigned int.
20713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20714 Alan Hayward <alan.hayward@arm.com>
20715 David Sherwood <david.sherwood@arm.com>
20717 * target.def (get_mask_mode): Take the number of units and length
20718 as poly_uint64s rather than unsigned ints.
20719 * targhooks.h (default_get_mask_mode): Update accordingly.
20720 * targhooks.c (default_get_mask_mode): Likewise.
20721 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
20722 * doc/tm.texi: Regenerate.
20724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20725 Alan Hayward <alan.hayward@arm.com>
20726 David Sherwood <david.sherwood@arm.com>
20728 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
20729 * omp-general.c (omp_max_vf): Likewise.
20730 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
20731 (expand_omp_simd): Handle polynomial safelen.
20732 * omp-low.c (omplow_simd_context): Add a default constructor.
20733 (omplow_simd_context::max_vf): Change from int to poly_uint64.
20734 (lower_rec_simd_input_clauses): Update accordingly.
20735 (lower_rec_input_clauses): Likewise.
20737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20738 Alan Hayward <alan.hayward@arm.com>
20739 David Sherwood <david.sherwood@arm.com>
20741 * tree-vectorizer.h (vect_nunits_for_cost): New function.
20742 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
20743 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
20744 (vect_analyze_slp_cost): Likewise.
20745 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
20746 (vect_model_load_cost): Likewise.
20748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20749 Alan Hayward <alan.hayward@arm.com>
20750 David Sherwood <david.sherwood@arm.com>
20752 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
20753 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
20754 from an unsigned int * to a poly_uint64_pod *.
20755 (calculate_unrolling_factor): New function.
20756 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
20758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20759 Alan Hayward <alan.hayward@arm.com>
20760 David Sherwood <david.sherwood@arm.com>
20762 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
20763 from an unsigned int to a poly_uint64.
20764 (_loop_vec_info::slp_unrolling_factor): Likewise.
20765 (_loop_vec_info::vectorization_factor): Change from an int
20767 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
20768 (vect_get_num_vectors): New function.
20769 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
20770 (vect_get_num_copies): Use vect_get_num_vectors.
20771 (vect_analyze_data_ref_dependences): Change max_vf from an int *
20772 to an unsigned int *.
20773 (vect_analyze_data_refs): Change min_vf from an int * to a
20775 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20776 than an unsigned HOST_WIDE_INT.
20777 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
20778 (vect_analyze_data_ref_dependence): Change max_vf from an int *
20779 to an unsigned int *.
20780 (vect_analyze_data_ref_dependences): Likewise.
20781 (vect_compute_data_ref_alignment): Handle polynomial vf.
20782 (vect_enhance_data_refs_alignment): Likewise.
20783 (vect_prune_runtime_alias_test_list): Likewise.
20784 (vect_shift_permute_load_chain): Likewise.
20785 (vect_supportable_dr_alignment): Likewise.
20786 (dependence_distance_ge_vf): Take the vectorization factor as a
20787 poly_uint64 rather than an unsigned HOST_WIDE_INT.
20788 (vect_analyze_data_refs): Change min_vf from an int * to a
20790 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
20791 vfm1 as a poly_uint64 rather than an int. Make the same change
20792 for the returned bound_scalar.
20793 (vect_gen_vector_loop_niters): Handle polynomial vf.
20794 (vect_do_peeling): Likewise. Update call to
20795 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
20796 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
20798 * tree-vect-loop.c (vect_determine_vectorization_factor)
20799 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
20800 (vect_get_known_peeling_cost): Likewise.
20801 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
20802 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
20803 (vect_transform_loop): Likewise. Use the lowest possible VF when
20804 updating the upper bounds of the loop.
20805 (vect_min_worthwhile_factor): Make static. Return an unsigned int
20806 rather than an int.
20807 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
20808 polynomial unroll factors.
20809 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
20810 (vect_make_slp_decision): Likewise.
20811 (vect_supported_load_permutation_p): Likewise, and polynomial
20813 (vect_analyze_slp_cost): Handle polynomial vf.
20814 (vect_slp_analyze_node_operations): Likewise.
20815 (vect_slp_analyze_bb_1): Likewise.
20816 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
20817 than an unsigned HOST_WIDE_INT.
20818 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
20819 (vectorizable_load): Handle polynomial vf.
20820 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
20822 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
20824 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20825 Alan Hayward <alan.hayward@arm.com>
20826 David Sherwood <david.sherwood@arm.com>
20828 * match.pd: Handle bit operations involving three constants
20829 and try to fold one pair.
20831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20833 * tree-vect-loop-manip.c: Include gimple-fold.h.
20834 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
20835 niters_maybe_zero parameters. Handle other cases besides a step of 1.
20836 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
20837 Add a path that uses a step of VF instead of 1, but disable it
20839 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
20840 and niters_no_overflow parameters. Update calls to
20841 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
20842 Create a new SSA name if the latter choses to use a ste other
20843 than zero, and return it via niters_vector_mult_vf_var.
20844 * tree-vect-loop.c (vect_transform_loop): Update calls to
20845 vect_do_peeling, vect_gen_vector_loop_niters and
20846 slpeel_make_loop_iterate_ntimes.
20847 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
20848 (vect_gen_vector_loop_niters): Update declarations after above changes.
20850 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
20852 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
20853 128-bit round to integer instructions.
20854 (ceil<mode>2): Likewise.
20855 (btrunc<mode>2): Likewise.
20856 (round<mode>2): Likewise.
20858 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20860 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
20861 unaligned VSX load/store on P8/P9.
20862 (expand_block_clear): Allow the use of unaligned VSX
20863 load/store on P8/P9.
20865 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20867 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
20869 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
20870 swap associated with both a load and a store.
20872 2018-01-02 Andrew Waterman <andrew@sifive.com>
20874 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
20875 * config/riscv/riscv.md (clear_cache): Use it.
20877 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
20879 * web.c: Remove out-of-date comment.
20881 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20883 * expr.c (fixup_args_size_notes): Check that any existing
20884 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
20885 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
20886 (emit_single_push_insn): ...here.
20888 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20890 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
20891 (const_vector_encoded_nelts): New function.
20892 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
20893 (const_vector_int_elt, const_vector_elt): Declare.
20894 * emit-rtl.c (const_vector_int_elt_1): New function.
20895 (const_vector_elt): Likewise.
20896 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
20897 of CONST_VECTOR_ELT.
20899 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20901 * expr.c: Include rtx-vector-builder.h.
20902 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
20903 directly on the tree encoding.
20904 (const_vector_from_tree): Likewise.
20905 * optabs.c: Include rtx-vector-builder.h.
20906 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
20907 sequence of "u" values.
20908 * vec-perm-indices.c: Include rtx-vector-builder.h.
20909 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
20910 directly on the vec_perm_indices encoding.
20912 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20914 * doc/rtl.texi (const_vector): Describe new encoding scheme.
20915 * Makefile.in (OBJS): Add rtx-vector-builder.o.
20916 * rtx-vector-builder.h: New file.
20917 * rtx-vector-builder.c: Likewise.
20918 * rtl.h (rtx_def::u2): Add a const_vector field.
20919 (CONST_VECTOR_NPATTERNS): New macro.
20920 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
20921 (CONST_VECTOR_DUPLICATE_P): Likewise.
20922 (CONST_VECTOR_STEPPED_P): Likewise.
20923 (CONST_VECTOR_ENCODED_ELT): Likewise.
20924 (const_vec_duplicate_p): Check for a duplicated vector encoding.
20925 (unwrap_const_vec_duplicate): Likewise.
20926 (const_vec_series_p): Check for a non-duplicated vector encoding.
20927 Say that the function only returns true for integer vectors.
20928 * emit-rtl.c: Include rtx-vector-builder.h.
20929 (gen_const_vec_duplicate_1): Delete.
20930 (gen_const_vector): Call gen_const_vec_duplicate instead of
20931 gen_const_vec_duplicate_1.
20932 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
20933 (gen_const_vec_duplicate): Use rtx_vector_builder.
20934 (gen_const_vec_series): Likewise.
20935 (gen_rtx_CONST_VECTOR): Likewise.
20936 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
20937 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20938 Build a new vector rather than modifying a CONST_VECTOR in-place.
20939 (handle_special_swappables): Update call accordingly.
20940 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
20941 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
20942 Build a new vector rather than modifying a CONST_VECTOR in-place.
20943 (handle_special_swappables): Update call accordingly.
20945 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20947 * simplify-rtx.c (simplify_const_binary_operation): Use
20948 CONST_VECTOR_ELT instead of XVECEXP.
20950 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20952 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
20953 the selector elements to be different from the data elements
20954 if the selector is a VECTOR_CST.
20955 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
20956 ssizetype for the selector.
20958 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20960 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
20961 before testing each element individually.
20962 * tree-vect-generic.c (lower_vec_perm): Likewise.
20964 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20966 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
20967 * selftest-run-tests.c (selftest::run_tests): Call it.
20968 * vector-builder.h (vector_builder::operator ==): New function.
20969 (vector_builder::operator !=): Likewise.
20970 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
20971 (vec_perm_indices::all_from_input_p): New function.
20972 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20973 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
20974 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
20975 instead of reading the VECTOR_CST directly. Detect whether both
20976 vector inputs are the same before constructing the vec_perm_indices,
20977 and update the number of inputs argument accordingly. Use the
20978 utility functions added above. Only construct sel2 if we need to.
20980 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20982 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
20983 the broadcast of the low byte.
20984 (expand_mult_highpart): Use an explicit encoding for the permutes.
20985 * optabs-query.c (can_mult_highpart_p): Likewise.
20986 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
20987 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20988 (vectorizable_bswap): Likewise.
20989 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
20990 explicit encoding for the power-of-2 permutes.
20991 (vect_permute_store_chain): Likewise.
20992 (vect_grouped_load_supported): Likewise.
20993 (vect_permute_load_chain): Likewise.
20995 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
20997 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
20998 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
20999 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21000 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21001 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21002 (vect_gen_perm_mask_any): Likewise.
21004 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21006 * int-vector-builder.h: New file.
21007 * vec-perm-indices.h: Include int-vector-builder.h.
21008 (vec_perm_indices): Redefine as an int_vector_builder.
21009 (auto_vec_perm_indices): Delete.
21010 (vec_perm_builder): Redefine as a stand-alone class.
21011 (vec_perm_indices::vec_perm_indices): New function.
21012 (vec_perm_indices::clamp): Likewise.
21013 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21014 (vec_perm_indices::new_vector): New function.
21015 (vec_perm_indices::new_expanded_vector): Update for new
21016 vec_perm_indices class.
21017 (vec_perm_indices::rotate_inputs): New function.
21018 (vec_perm_indices::all_in_range_p): Operate directly on the
21019 encoded form, without computing elided elements.
21020 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21021 encoding. Update for new vec_perm_indices class.
21022 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21023 the given vec_perm_builder.
21024 (expand_vec_perm_var): Update vec_perm_builder constructor.
21025 (expand_mult_highpart): Use vec_perm_builder instead of
21026 auto_vec_perm_indices.
21027 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21028 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21029 or double series encoding as appropriate.
21030 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21031 vec_perm_indices instead of auto_vec_perm_indices.
21032 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21033 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21034 (vect_permute_store_chain): Likewise.
21035 (vect_grouped_load_supported): Likewise.
21036 (vect_permute_load_chain): Likewise.
21037 (vect_shift_permute_load_chain): Likewise.
21038 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21039 (vect_transform_slp_perm_load): Likewise.
21040 (vect_schedule_slp_instance): Likewise.
21041 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21042 (vectorizable_mask_load_store): Likewise.
21043 (vectorizable_bswap): Likewise.
21044 (vectorizable_store): Likewise.
21045 (vectorizable_load): Likewise.
21046 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21047 vec_perm_indices instead of auto_vec_perm_indices. Use
21048 tree_to_vec_perm_builder to read the vector from a tree.
21049 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21050 vec_perm_builder instead of a vec_perm_indices.
21051 (have_whole_vector_shift): Use vec_perm_builder and
21052 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21053 truncation to calc_vec_perm_mask_for_shift.
21054 (vect_create_epilog_for_reduction): Likewise.
21055 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21056 from auto_vec_perm_indices to vec_perm_indices.
21057 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21058 instead of changing individual elements.
21059 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21060 the vector in d.perm.
21061 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21062 from auto_vec_perm_indices to vec_perm_indices.
21063 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21064 instead of changing individual elements.
21065 (arm_vectorize_vec_perm_const): Use new_vector to install
21066 the vector in d.perm.
21067 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21068 Update vec_perm_builder constructor.
21069 (rs6000_expand_interleave): Likewise.
21070 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21071 (rs6000_expand_interleave): Likewise.
21073 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21075 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21076 to qimode could truncate the indices.
21077 * optabs.c (expand_vec_perm_var): Likewise.
21079 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21081 * Makefile.in (OBJS): Add vec-perm-indices.o.
21082 * vec-perm-indices.h: New file.
21083 * vec-perm-indices.c: Likewise.
21084 * target.h (vec_perm_indices): Replace with a forward class
21086 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21087 * optabs.h: Include vec-perm-indices.h.
21088 (expand_vec_perm): Delete.
21089 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21090 (expand_vec_perm_const): Declare.
21091 * target.def (vec_perm_const_ok): Replace with...
21092 (vec_perm_const): ...this new hook.
21093 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21094 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21095 * doc/tm.texi: Regenerate.
21096 * optabs.def (vec_perm_const): Delete.
21097 * doc/md.texi (vec_perm_const): Likewise.
21098 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21099 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21100 expand_vec_perm for constant permutation vectors. Assert that
21101 the mode of variable permutation vectors is the integer equivalent
21102 of the mode that is being permuted.
21103 * optabs-query.h (selector_fits_mode_p): Declare.
21104 * optabs-query.c: Include vec-perm-indices.h.
21105 (selector_fits_mode_p): New function.
21106 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21107 is defined, instead of checking whether the vec_perm_const_optab
21108 exists. Use targetm.vectorize.vec_perm_const instead of
21109 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21110 fit in the vector mode before using a variable permute.
21111 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21112 vec_perm_indices instead of an rtx.
21113 (expand_vec_perm): Replace with...
21114 (expand_vec_perm_const): ...this new function. Take the selector
21115 as a vec_perm_indices rather than an rtx. Also take the mode of
21116 the selector. Update call to shift_amt_for_vec_perm_mask.
21117 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21118 Use vec_perm_indices::new_expanded_vector to expand the original
21119 selector into bytes. Check whether the indices fit in the vector
21120 mode before using a variable permute.
21121 (expand_vec_perm_var): Make global.
21122 (expand_mult_highpart): Use expand_vec_perm_const.
21123 * fold-const.c: Includes vec-perm-indices.h.
21124 * tree-ssa-forwprop.c: Likewise.
21125 * tree-vect-data-refs.c: Likewise.
21126 * tree-vect-generic.c: Likewise.
21127 * tree-vect-loop.c: Likewise.
21128 * tree-vect-slp.c: Likewise.
21129 * tree-vect-stmts.c: Likewise.
21130 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21132 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21133 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21134 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21135 (aarch64_vectorize_vec_perm_const): ...this new function.
21136 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21137 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21138 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21139 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21140 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21141 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21142 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21144 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21145 check for NEON modes.
21146 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21147 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21148 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21149 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21151 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21152 the old VEC_PERM_CONST conditions.
21153 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21154 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21155 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21156 (ia64_vectorize_vec_perm_const_ok): Merge into...
21157 (ia64_vectorize_vec_perm_const): ...this new function.
21158 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21159 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21160 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21161 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21162 * config/mips/mips.c (mips_expand_vec_perm_const)
21163 (mips_vectorize_vec_perm_const_ok): Merge into...
21164 (mips_vectorize_vec_perm_const): ...this new function.
21165 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21166 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21167 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21168 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21169 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21170 (rs6000_expand_vec_perm_const): Delete.
21171 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21173 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21174 (altivec_expand_vec_perm_const_le): Take each operand individually.
21175 Operate on constant selectors rather than rtxes.
21176 (altivec_expand_vec_perm_const): Likewise. Update call to
21177 altivec_expand_vec_perm_const_le.
21178 (rs6000_expand_vec_perm_const): Delete.
21179 (rs6000_vectorize_vec_perm_const_ok): Delete.
21180 (rs6000_vectorize_vec_perm_const): New function.
21181 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21182 an element count and rtx array.
21183 (rs6000_expand_extract_even): Update call accordingly.
21184 (rs6000_expand_interleave): Likewise.
21185 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21186 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21187 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21188 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21189 (rs6000_expand_vec_perm_const): Delete.
21190 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21191 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21192 (altivec_expand_vec_perm_const_le): Take each operand individually.
21193 Operate on constant selectors rather than rtxes.
21194 (altivec_expand_vec_perm_const): Likewise. Update call to
21195 altivec_expand_vec_perm_const_le.
21196 (rs6000_expand_vec_perm_const): Delete.
21197 (rs6000_vectorize_vec_perm_const_ok): Delete.
21198 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21199 reference to the SPE evmerge intructions.
21200 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21201 an element count and rtx array.
21202 (rs6000_expand_extract_even): Update call accordingly.
21203 (rs6000_expand_interleave): Likewise.
21204 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21205 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21207 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21209 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21211 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21212 vector mode and that that mode matches the mode of the data
21214 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21215 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21216 directly using expand_vec_perm_1 when forcing selectors into
21218 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21220 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21222 * optabs-query.h (can_vec_perm_p): Delete.
21223 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21224 * optabs-query.c (can_vec_perm_p): Split into...
21225 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21226 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21227 particular selector is valid.
21228 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21229 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21230 (vect_grouped_load_supported): Likewise.
21231 (vect_shift_permute_load_chain): Likewise.
21232 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21233 (vect_transform_slp_perm_load): Likewise.
21234 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21235 (vectorizable_bswap): Likewise.
21236 (vect_gen_perm_mask_checked): Likewise.
21237 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21238 implementations of variable permutation vectors into account
21239 when deciding which selector to use.
21240 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21241 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21242 with a false third argument.
21243 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21244 to test whether the constant selector is valid and can_vec_perm_var_p
21245 to test whether a variable selector is valid.
21247 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21249 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21250 * optabs-query.c (can_vec_perm_p): Likewise.
21251 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21252 instead of vec_perm_indices.
21253 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21254 (vect_gen_perm_mask_checked): Likewise,
21255 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21256 (vect_gen_perm_mask_checked): Likewise,
21258 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21260 * optabs-query.h (qimode_for_vec_perm): Declare.
21261 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21262 (qimode_for_vec_perm): ...this new function.
21263 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21265 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21267 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21268 does not have a conditional at the top.
21270 2018-01-02 Richard Biener <rguenther@suse.de>
21272 * ipa-inline.c (big_speedup_p): Fix expression.
21274 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21277 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21280 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21284 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21285 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21286 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21287 cond_taken_branch_cost 3->4.
21289 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21291 PR tree-optimization/83581
21292 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21293 TODO_cleanup_cfg if any changes have been made.
21295 PR middle-end/83608
21296 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21297 convert_modes if target mode has the right side, but different mode
21300 PR middle-end/83609
21301 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21302 last argument when extracting from CONCAT. If either from_real or
21303 from_imag is NULL, use expansion through memory. If result is not
21304 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21305 the parts directly to inner mode, if even that fails, use expansion
21308 PR middle-end/83623
21309 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21310 check for bswap in mode rather than HImode and use that in expand_unop
21313 Copyright (C) 2018 Free Software Foundation, Inc.
21315 Copying and distribution of this file, with or without modification,
21316 are permitted in any medium without royalty provided the copyright
21317 notice and this notice are preserved.