1 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
5 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
15 * builtins.c (expand_speculation_safe_value): New function.
16 (expand_builtin): Call it.
17 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
18 * doc/extend.texi: Document __builtin_speculation_safe_value.
19 * doc/md.texi: Document "speculation_barrier" pattern.
20 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
21 TARGET_HAVE_SPECULATION_SAFE_VALUE.
22 * doc/tm.texi: Regenerated.
23 * target.def (have_speculation_safe_value, speculation_safe_value): New
25 * targhooks.c (default_have_speculation_safe_value): New function.
26 (default_speculation_safe_value): New function.
27 * targhooks.h (default_have_speculation_safe_value): Add prototype.
28 (default_speculation_safe_value): Add prototype.
30 2018-07-31 David Malcolm <dmalcolm@redhat.com>
32 * dump-context.h (dump_context::dump_loc): New decl.
33 * dumpfile.c (dump_context::dump_loc): New member function.
34 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
36 (dump_context::dump_gimple_expr_loc): Likewise, using
38 (dump_context::dump_generic_expr_loc): Likewise, using
40 (dump_context::dump_printf_loc_va): Likewise, using
42 (dump_context::begin_scope): Explicitly using the global function
43 "dump_loc", rather than the member function.
45 2018-07-31 Martin Sebor <msebor@redhat.com>
47 PR tree-optimization/86741
48 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
50 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
52 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
53 depend on whether prefetch instructions will be emitted or not.
54 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
55 will be emitted or not.
56 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
57 (TARGET_SETMEM_PFD): New macros.
59 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
61 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
62 (NULL_STMT_VEC_INFO): Delete.
63 (stmt_vec_info::operator*): Likewise.
64 (stmt_vec_info::operator gimple *): Likewise.
65 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
66 of NULL_STMT_VEC_INFO.
67 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
68 (vect_reassociating_reduction_p): Likewise.
69 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
70 (vectorizable_store): Likewise.
71 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
72 (vec_info::free_stmt_vec_infos): Likewise.
74 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
76 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
77 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
79 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
81 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
82 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
83 (vec_info::free_stmt_vec_info): New private member functions.
84 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
85 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
86 * tree-parloops.c (gather_scalar_reductions): Remove calls to
87 set_stmt_vec_info_vec and free_stmt_vec_infos.
88 * tree-vect-loop.c (_loop_vec_info): Remove call to
89 set_stmt_vec_info_vec.
90 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
91 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
92 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
93 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
94 (vec_info::free_stmt_vec_info): ...these new functions. Remove
95 assignments in {vec_info::,}new_stmt_vec_info that are redundant
96 with the clearing in the xcalloc.
97 (stmt_vec_info_vec): Delete.
98 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
99 (vectorize_loops): Likewise.
100 (vec_info::~vec_info): Remove argument from call to
102 (vec_info::add_stmt): Remove vinfo argument from call to
105 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
107 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
108 rather than a gimple stmt.
109 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
110 information for pattern statements when passed the original
111 statement; instead wait to be passed the pattern statement itself.
112 Don't call set_vinfo_for_stmt here.
113 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
114 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
116 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
117 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
118 stmt_vec_infos entry.
120 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
122 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
123 * tree-vectorizer.c (vec_info::replace_stmt): New function.
124 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
125 * tree-vect-stmts.c (vectorizable_call): Likewise.
126 (vectorizable_simd_clone_call): Likewise.
128 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
130 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
131 * tree-vectorizer.c (vec_info::remove_stmt): New function.
132 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
133 * tree-vect-loop.c (vect_transform_loop): Likewise.
134 * tree-vect-slp.c (vect_schedule_slp): Likewise.
135 * tree-vect-stmts.c (vect_remove_stores): Likewise.
137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
139 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
140 (vect_dr_stmt): Delete.
141 * tree-vectorizer.c (vec_info::lookup_dr): New function.
142 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
144 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
145 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
146 (vect_verify_datarefs_alignment, vect_peeling_supportable)
147 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
148 (vect_analyze_data_refs): Likewise.
149 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
151 (vect_find_same_alignment_drs): Likewise.
152 (vect_slp_analyze_node_dependences): Update calls accordingly.
153 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
154 instead of DR_VECT_AUX.
155 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
156 of a vector data references. Use vec_info::lookup_dr instead of
158 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
159 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
160 instead of DR_VECT_AUX.
162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
164 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
166 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
168 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
169 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
170 (vect_gen_prolog_loop_niters): Likewise.
172 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
174 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
175 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
176 (vect_known_alignment_in_bytes, vect_dr_behavior)
177 (vect_get_scalar_dr_size): Take references as dr_vec_infos
178 instead of data_references. Update calls to other routines for
179 which the same change has been made.
180 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
181 dr_vec_infos instead of stmt_vec_infos.
182 (vect_analyze_data_ref_dependence): Update call accordingly.
183 (vect_slp_analyze_data_ref_dependence)
184 (vect_record_base_alignments): Use DR_VECT_AUX.
185 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
186 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
187 (vector_alignment_reachable_p, vect_get_data_access_cost)
188 (vect_peeling_supportable, vect_analyze_group_access_1)
189 (vect_analyze_group_access, vect_analyze_data_ref_access)
190 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
191 (vect_compile_time_alias, vect_small_gap_p)
192 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
193 (vect_supportable_dr_alignment): Take references as dr_vec_infos
194 instead of data_references. Update calls to other routines for
195 which the same change has been made.
196 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
197 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
198 (vect_slp_analyze_and_verify_node_alignment)
199 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
200 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
201 (vect_setup_realignment): Use dr_vec_infos. Update calls after
203 (_vect_peel_info::dr): Replace with...
204 (_vect_peel_info::dr_info): ...this new field.
205 (vect_peeling_hash_get_most_frequent)
206 (vect_peeling_hash_choose_best_peeling): Update accordingly.
207 (vect_peeling_hash_get_lowest_cost):
208 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
209 routines for which the same change has been made.
210 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
212 * tree-vect-loop-manip.c (get_misalign_in_elems)
213 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
215 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
216 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
217 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
218 (get_group_load_store_type, get_negative_load_store_type)
219 (vect_get_data_ptr_increment, vectorizable_store)
220 (vectorizable_load): Likewise.
221 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
222 Update calls to other routines for which the same change has been made.
224 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
226 * tree-vectorizer.h (vec_info::move_dr): New member function.
227 (dataref_aux): Rename to...
228 (dr_vec_info): ...this and add "dr" and "stmt" fields.
229 (_stmt_vec_info::dr_aux): Update accordingly.
230 (_stmt_vec_info::data_ref_info): Delete.
231 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
232 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
233 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
234 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
236 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
237 (STMT_VINFO_DR_INFO): New macro.
238 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
239 (set_dr_misalignment): Update after rename of dataref_aux.
240 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
241 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
242 initialization of STMT_VINFO_DATA_REF.
243 * tree-vectorizer.c (vec_info::move_dr): New function.
244 * tree-vect-patterns.c (vect_recog_bool_pattern)
245 (vect_recog_mask_conversion_pattern)
246 (vect_recog_gather_scatter_pattern): Use it.
247 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
248 the "dr" and "stmt" fields of dr_vec_info instead of
251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
253 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
254 (is_pattern_stmt_p): Use it.
255 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
256 on pattern statements.
258 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
260 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
261 original stmt as a stmt_vec_info rather than a gimple stmt.
262 (vect_pattern_recog_1): Take the statement directly as a
263 stmt_vec_info, rather than via a gimple_stmt_iterator.
264 Update call to vect_mark_pattern_stmts.
265 (vect_pattern_recog): Update calls accordingly.
267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
269 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
270 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
271 a vect_def_type for the first argument.
272 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
273 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
274 operand if it isn't defined by a vectorized statement.
275 (vect_build_gather_load_calls): Remove the mask_dt argument and
276 update calls to vect_get_vec_def_for_stmt_copy.
277 (vectorizable_bswap): Likewise the dt argument.
278 (vectorizable_call): Update calls to vectorizable_bswap and
279 vect_get_vec_def_for_stmt_copy.
280 (vectorizable_simd_clone_call, vectorizable_assignment)
281 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
282 (vectorizable_comparison): Update calls to
283 vect_get_vec_def_for_stmt_copy.
284 (vectorizable_store): Likewise. Remove now-unnecessary calls to
286 (vect_get_loop_based_defs): Remove dt argument and update call
287 to vect_get_vec_def_for_stmt_copy.
288 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
289 and vect_get_vec_def_for_stmt_copy.
290 (vectorizable_load): Update calls to vect_build_gather_load_calls
291 and vect_get_vec_def_for_stmt_copy.
292 * tree-vect-loop.c (vect_create_epilog_for_reduction)
293 (vectorizable_reduction, vectorizable_live_operation): Update calls
294 to vect_get_vec_def_for_stmt_copy.
296 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
298 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
299 and gimple stmt arguments with a stmt_vec_info.
300 (vect_record_base_alignments): Update calls accordingly.
301 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
302 and gimple stmt arguments with a stmt_vec_info.
303 (vect_build_slp_tree_1): Remove vinfo argument and update call
304 to vect_record_max_nunits.
305 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
306 and vect_record_max_nunits.
308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
310 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
311 file and take a stmt_vec_info instead of a gimple stmt.
312 (supportable_widening_operation, vect_finish_replace_stmt)
313 (vect_finish_stmt_generation, vect_get_store_rhs)
314 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
315 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
316 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
317 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
318 (vect_create_data_ref_ptr, bump_vector_ptr)
319 (vect_permute_store_chain, vect_setup_realignment)
320 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
321 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
322 (vectorizable_reduction, vectorizable_induction)
323 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
324 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
325 than gimple stmts as arguments.
326 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
327 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
328 (can_group_stmts_p, vect_check_gather_scatter)
329 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
330 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
331 (vect_permute_load_chain, vect_shift_permute_load_chain)
332 (vect_transform_grouped_load)
333 (vect_record_grouped_load_vectors): Likewise.
334 * tree-vect-loop.c (vect_fixup_reduc_chain)
335 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
336 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
337 (vectorizable_reduction, vectorizable_induction)
338 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
339 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
340 (vect_get_load_store_mask): Likewise.
341 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
342 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
343 * tree-vect-stmts.c (vect_mark_relevant)
344 (is_simple_and_all_uses_invariant)
345 (exist_non_indexing_operands_for_use_p, process_use)
346 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
347 (vect_get_vec_def_for_operand, vect_get_vec_defs)
348 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
349 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
350 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
351 (get_negative_load_store_type, get_load_store_type)
352 (vect_check_load_store_mask, vect_check_store_rhs)
353 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
354 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
355 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
356 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
357 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
358 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
359 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
360 (supportable_widening_operation): Likewise.
362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
364 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
365 a stmt_vec_info instead of a gcall.
366 (vect_check_gather_scatter): Update call accordingly.
367 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
369 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
370 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
371 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
372 instead of a gimple stmt.
373 (vect_transform_loop): Update calls accordingly.
374 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
375 stmt_vec_infos instead of gimple stmts.
376 (vect_analyze_slp_instance): Update use accordingly.
377 * tree-vect-stmts.c (read_vector_array, write_vector_array)
378 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
379 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
380 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
381 (vect_gen_widened_results_half, vect_get_loop_based_defs)
382 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
383 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
388 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
389 of the worklist from a vector of gimple stmts to a vector of
391 * tree-vect-stmts.c (vect_mark_relevant, process_use)
392 (vect_mark_stmts_to_be_vectorized): Likewise
394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
396 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
397 statement before passing it to vect_analyze_stmt.
398 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
399 the chain of phi vector definitions. Track the exit phi via its
401 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
402 STMT_VINFO_REDUC_DEF.
403 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
404 stmt_vec_infos to handle the statement chains.
405 (vect_get_slp_defs): Record the first statement in the node
406 using a stmt_vec_info.
407 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
408 statements here and pass their stmt_vec_info down to subroutines.
409 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
410 down to vect_finish_stmt_generation.
411 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
412 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
413 stmt_vec_infos to subroutines.
414 (vect_remove_stores): Use stmt_vec_infos to handle the statement
417 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
419 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
420 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
421 (vect_permute_store_chain, vect_setup_realignment)
422 (vect_permute_load_chain, vect_shift_permute_load_chain)
423 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
424 stmts internally, and when passing values to other vectorizer routines.
425 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
426 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
427 (vect_analyze_loop_operations, get_initial_def_for_reduction)
428 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
429 (vectorizable_reduction, vectorizable_induction)
430 (vectorizable_live_operation, vect_transform_loop_stmt)
431 (vect_transform_loop): Likewise.
432 * tree-vect-patterns.c (vect_reassociating_reduction_p)
433 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
434 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
435 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
436 (vect_slp_analyze_node_operations_1): Likewise.
437 * tree-vect-stmts.c (vect_mark_relevant, process_use)
438 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
439 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
440 (vect_finish_stmt_generation_1, get_group_load_store_type)
441 (get_load_store_type, vect_build_gather_load_calls)
442 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
443 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
444 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
445 (vectorizable_store, vectorizable_load, vectorizable_condition)
446 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
447 (supportable_widening_operation): Likewise.
448 (vect_get_vector_types_for_stmt): Likewise.
449 * tree-vectorizer.h (vect_dr_behavior): Likewise.
451 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
453 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
454 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
455 (vect_permute_store_chain, vect_permute_load_chain)
456 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
457 repeated stmt_vec_info lookups.
458 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
459 (vect_update_ivs_after_vectorizer): Likewise.
460 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
461 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
462 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
463 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
464 (vect_bb_slp_scalar_cost): Likewise.
465 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
469 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
470 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
471 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
472 to get gassigns and gcalls, rather than operating on generc gimple
474 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
475 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
476 (vectorizable_load, vect_analyze_stmt): Likewise.
477 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
479 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
481 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
482 return stmt_vec_infos rather than gimple stmts. Do not accept
484 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
486 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
487 Update use of get_later_stmt.
488 (vect_get_constant_vectors): Update call accordingly.
489 (vect_schedule_slp_instance): Likewise
490 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
491 (vect_slp_analyze_instance_dependence): Likewise.
492 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
494 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
496 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
497 (stmt_info_for_cost::stmt_info): ...this new field.
498 (add_stmt_costs): Update accordingly.
499 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
500 (vect_get_known_peeling_cost): Likewise.
501 (vect_estimate_min_profitable_iters): Likewise.
502 * tree-vect-stmts.c (record_stmt_cost): Likewise.
504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
506 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
507 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
508 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
510 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
514 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
515 a gimple stmt to a stmt_vec_info.
516 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
520 * tree-vectorizer.h (vec_info::grouped_stores): Change from
521 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
522 (_loop_vec_info::reduction_chains): Likewise.
523 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
525 * tree-vect-slp.c (vect_analyze_slp): Likewise.
527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
529 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
530 a gimple stmt to a stmt_vec_info.
531 (_stmt_vec_info::next_element): Likewise.
532 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
533 (vect_slp_analyze_and_verify_node_alignment)
534 (vect_analyze_group_access_1, vect_analyze_group_access)
535 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
536 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
537 (vect_supportable_dr_alignment): Update accordingly.
538 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
539 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
540 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
541 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
542 * tree-vect-slp.c (vect_build_slp_tree_1)
543 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
544 (vect_split_slp_store_group, vect_analyze_slp_instance)
545 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
546 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
547 (get_group_load_store_type, get_load_store_type)
548 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
549 (vect_transform_stmt, vect_remove_stores): Likewise.
551 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
553 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
555 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
556 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
557 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
558 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
559 (vector_alignment_reachable_p, vect_get_data_access_cost)
560 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
561 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
562 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
563 (vect_analyze_group_access_1, vect_analyze_group_access)
564 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
565 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
566 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
567 result of vect_dr_stmt and use the stmt_vec_info instead of
568 the associated gimple stmt.
569 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
570 (vect_gen_prolog_loop_niters): Likewise.
571 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
573 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
575 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
576 to a vec<stmt_vec_info>.
577 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
578 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
580 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
581 to a vec<stmt_vec_info>.
582 (bst_traits::value_type, bst_traits::value_type): Likewise.
583 (bst_traits::hash): Update accordingly.
584 (vect_get_and_check_slp_defs): Change the stmts parameter from
585 a vec<gimple *> to a vec<stmt_vec_info>.
586 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
587 (vect_build_slp_tree): Likewise.
588 (vect_build_slp_tree_2): Likewise. Update uses of
589 SLP_TREE_SCALAR_STMTS.
590 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
591 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
592 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
593 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
594 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
595 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
596 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
597 (vect_get_constant_vectors, vect_get_slp_defs)
598 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
599 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
600 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
601 instead of gimple stmts.
602 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
603 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
604 (vect_slp_analyze_instance_dependence): Update uses of
605 SLP_TREE_SCALAR_STMTS.
606 (vect_slp_analyze_and_verify_node_alignment): Likewise.
607 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
608 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
609 (get_initial_defs_for_reduction): Likewise.
610 (vect_create_epilog_for_reduction): Likewise.
611 (vectorize_fold_left_reduction): Likewise.
612 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
613 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
614 (can_vectorize_live_stmts): Likewise.
616 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
618 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
619 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
620 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
622 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
624 (gather_scalar_reductions): Update after above interface changes.
625 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
626 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
628 (vect_force_simple_reduction): Likewise.
629 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
630 LOOP_VINFO_REDUCTIONS.
631 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
633 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
635 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
636 a gimple stmt to a stmt_vec_info.
637 * tree-vect-loop.c (vect_active_double_reduction_p)
638 (vect_force_simple_reduction, vectorizable_reduction): Update
641 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
643 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
644 vec<gimple *> to a vec<stmt_vec_info>.
645 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
646 the reduction_phis argument from a vec<gimple *> to a
648 (vectorizable_reduction): Likewise the phis local variable that
649 is passed to vect_create_epilog_for_reduction. Update for new type
650 of SLP_TREE_VEC_STMTS.
651 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
652 (vectorizable_live_operation): Likewise.
653 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
654 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
656 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
658 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
659 a gimple stmt to a stmt_vec_info.
660 (vectorizable_condition, vectorizable_live_operation)
661 (vectorizable_reduction, vectorizable_induction): Pass back the
662 vectorized statement as a stmt_vec_info.
663 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
664 use of STMT_VINFO_VEC_STMT.
665 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
666 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
667 as stmt_vec_infos rather than gimple stmts.
668 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
670 (vectorizable_live_operation): Likewise.
671 (vectorizable_reduction, vectorizable_induction): Likewise,
672 updating use of STMT_VINFO_VEC_STMT.
673 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
674 of STMT_VINFO_VEC_STMT.
675 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
676 (vectorizable_simd_clone_call, vectorizable_conversion)
677 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
678 (vectorizable_store, vectorizable_load, vectorizable_condition)
679 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
680 from a gimple stmt to a stmt_vec_info.
681 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
682 pointer to a stmt_vec_info to the vectorizable_* routines.
684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
686 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
687 a gimple stmt to a stmt_vec_info.
688 (is_pattern_stmt_p): Update accordingly.
689 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
690 (vect_record_grouped_load_vectors): Likewise.
691 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
692 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
693 (vect_model_reduction_cost): Likewise.
694 (vect_create_epilog_for_reduction): Likewise.
695 (vectorizable_reduction, vectorizable_induction): Likewise.
696 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
697 Return the stmt_vec_info for the pattern statement.
698 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
699 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
700 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
701 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
702 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
703 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
704 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
705 (free_stmt_vec_info, vect_is_simple_use): Likewise.
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
709 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
710 (vect_finish_stmt_generation): Likewise.
711 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
712 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
713 (vect_build_gather_load_calls): Use the return value of the above
714 functions instead of a separate call to vinfo_for_stmt. Use narrow
715 scopes for the input gimple stmt and wider scopes for the associated
716 stmt_vec_info. Use vec_info::lookup_def when setting these
717 stmt_vec_infos from an SSA_NAME definition.
718 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
719 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
720 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
721 (vectorizable_store, vectorizable_load, vectorizable_condition)
722 (vectorizable_comparison): Likewise.
723 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
724 (vectorizable_reduction): Likewise.
726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
728 * tree-vectorizer.h (vect_is_simple_use): Add an optional
729 stmt_vec_info * parameter before the optional gimple **.
730 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
731 (process_use, vect_get_vec_def_for_operand_1): Update callers.
732 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
733 * tree-vect-loop.c (vectorizable_reduction): Likewise.
734 (vectorizable_live_operation): Likewise.
735 * tree-vect-patterns.c (type_conversion_p): Likewise.
736 (vect_look_through_possible_promotion): Likewise.
737 (vect_recog_rotate_pattern): Likewise.
738 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
740 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
742 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
743 a typedef to a wrapper class.
744 (NULL_STMT_VEC_INFO): New macro.
745 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
746 (stmt_vec_info::operator*): New function.
747 (stmt_vec_info::operator gimple *): Likewise.
748 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
749 (add_stmt_costs): Likewise.
750 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
751 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
752 (vect_get_known_peeling_cost): Likewise.
753 (vect_estimate_min_profitable_iters): Likewise.
754 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
755 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
756 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
757 (vectorizable_store, free_stmt_vec_infos): Likewise.
758 (new_stmt_vec_info): Change return type of xcalloc to
761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
763 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
764 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
765 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
766 a single_imm_use-based sequence.
767 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
769 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
771 * tree-vectorizer.h (vec_info::lookup_def): Declare.
772 * tree-vectorizer.c (vec_info::lookup_def): New function.
773 * tree-vect-patterns.c (vect_get_internal_def): Use it.
774 (vect_widened_op_tree): Likewise.
775 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
776 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
777 (vectorizable_reduction): Likewise.
778 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
780 (vect_is_slp_reduction): Update calls accordingly. Use
781 vec_info::lookup_def.
782 (vect_is_simple_reduction): Likewise
783 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
787 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
788 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
789 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
791 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
792 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
793 (vect_update_vf_for_slp, vect_analyze_loop_operations)
794 (vect_is_slp_reduction, vectorizable_induction)
795 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
796 * tree-vect-patterns.c (vect_init_pattern_stmt):
797 (vect_determine_min_output_precision_1, vect_determine_precisions)
798 (vect_pattern_recog): Likewise.
799 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
800 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
801 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
802 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
803 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
804 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
805 info field from a loop to a loop_vec_info.
807 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
809 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
810 (vec_info::add_stmt): Declare.
811 * tree-vectorizer.c (vec_info::add_stmt): New function.
812 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
813 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
814 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
815 (vectorizable_induction): Likewise.
816 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
817 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
818 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
819 (vectorizable_load): Likewise.
820 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
821 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
822 (vect_recog_gather_scatter_pattern): Likewise.
823 (append_pattern_def_seq): Likewise. Remove a check that is
824 performed by add_stmt itself.
826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
828 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
829 which make_ssa_name was called with new_stmt before new_stmt
832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
834 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
836 (vect_is_slp_reduction): ...here...
837 (vect_is_simple_reduction): ...and here. Remove repetition of tests
838 that are already known to be false.
840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
842 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
843 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
844 STMT_VINFO_NUM_SLP_USES when it's true.
845 (vect_free_slp_instance): Add a final_p parameter and pass it to
847 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
848 (vect_analyze_slp_instance): Likewise.
849 (vect_slp_analyze_operations): Likewise.
850 (vect_slp_analyze_bb_1): Likewise.
851 * tree-vectorizer.c (vec_info): Likewise.
852 * tree-vect-loop.c (vect_transform_loop): Likewise.
854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
856 * tree-vect-loop.c (vectorizable_reduction): Assert that the
857 function is not called for second and subsequent members of
860 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
862 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
863 cases for nested loops from here to ...
864 (vect_create_epilog_for_reduction): ...here. Only call
865 vect_is_simple_use for inner-loop reductions.
867 2018-07-31 Martin Liska <mliska@suse.cz>
869 PR gcov-profile/85338
870 PR gcov-profile/85350
871 PR gcov-profile/85372
872 * profile.c (struct location_triplet): New.
873 (struct location_triplet_hash): Likewise.
874 (output_location): Do not output a BB that
875 is already recorded for a line.
876 (branch_prob): Use streamed_locations.
878 2018-07-31 Martin Liska <mliska@suse.cz>
880 PR gcov-profile/85370
881 * coverage.c (coverage_begin_function): Do not mark target
882 clones as artificial functions.
884 2018-07-31 Martin Liska <mliska@suse.cz>
886 PR gcov-profile/83813
887 PR gcov-profile/84758
888 PR gcov-profile/85217
889 PR gcov-profile/85332
890 * profile.c (branch_prob): Do not record GOTO expressions
891 for GIMPLE statements which locations are already streamed.
893 2018-07-31 Olivier Hainque <hainque@adacore.com>
895 * gcc.c (handle_spec_function): Accept a soft_matched_part
896 argument, as do_spec_1. Pass it down to ...
897 (eval_spec_function): Accept a soft_matched_part argument,
898 and pass it down to ...
899 (do_spec_2): Accept a soft_matched_part argument, and pass
900 it down to do_spec_1.
901 (do_spec_1): Pass soft_matched_part to handle_spec_function.
902 (handle_braces): Update call to handle_spec_function.
903 (driver::set_up_specs): Update calls to do_spec_2.
904 (compare_debug_dump_opt_spec_function): Likewise.
905 (compare_debug_self_opt_spec_function): Likewise.
907 2018-07-31 Olivier Hainque <hainque@adacore.com>
909 * common.opt (nolibc): New option.
910 * doc/invoke.texi (Link Options): Document it.
911 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
912 * config/alpha/linux.h: Likewise.
913 * config/arc/elf.h: Likewise.
914 * config/arm/uclinux-elf.h: Likewise.
915 * config/arm/unknown-elf.h: Likewise.
916 * config/avr/avrlibc.h: Likewise.
917 * config/bfin/bfin.h: Likewise.
918 * config/bfin/linux.h: Likewise.
919 * config/bfin/uclinux.h: Likewise.
920 * config/darwin.h: Likewise.
921 * config/darwin10.h: Likewise.
922 * config/darwin12.h: Likewise.
923 * config/gnu-user.h: Likewise.
924 * config/lm32/uclinux-elf.h: Likewise.
925 * config/pa/pa-hpux11.h: Likewise.
926 * config/pa/pa64-hpux.h: Likewise.
927 * config/sparc/sparc.h: Likewise.
929 2018-07-31 Olivier Hainque <hainque@adacore.com>
931 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
934 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
937 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
940 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
942 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
943 terminated string literal.
945 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
947 PR rtl-optimization/85160
948 * combine.c (is_just_move): New function.
949 (try_combine): Allow combining two instructions into two if neither of
950 the original instructions was a move.
952 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
955 * doc/extend.texi (Global Register Variables): Discourage use of type
957 (Local Register Variables): Likewise.
959 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
961 PR tree-optimization/86506
962 * hwint.h (ceil_log2): Resync with hwint.c implementation.
964 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
967 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
968 hard_regno, make sure no insn between `from` and `to` clobbers it.
970 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
971 Tom de Vries <tdevries@suse.de>
973 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
974 (PTX_DEFAULT_RUNTIME_DIM): ... this.
975 (nvptx_goacc_validate_dims): Set default worker and gang dims to
976 PTX_DEFAULT_RUNTIME_DIM.
977 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
979 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
981 * config/pa/pa.c (pa_output_addr_vec): Align address table.
982 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
983 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
985 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
987 * config/rs6000/constraints.md (wG constraint): Delete, no longer
989 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
990 predicate to reflect toc fusion has been deleted.
991 (toc_fusion_mem_raw): Delete, no longer used.
992 (toc_fusion_mem_wrapped): Likewise.
993 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
995 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
996 Delete, no longer used.
997 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
998 meant to be used for toc fusion.
999 (rs6000_debug_print_mode): Delete toc fusion debugging.
1000 (rs6000_debug_reg_global): Likewise.
1001 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1002 fusion and secondary reload support that were never used.
1003 (rs6000_option_override_internal): Delete TOC fusion, that was only
1004 partially defined, and it did not work unless you also used the
1006 (rs6000_legitimate_address_p): Delete TOC fusion support.
1007 (rs6000_opt_masks): Likewise.
1008 (fusion_wrap_memory_address): Delete function, no longer used.
1009 (fusion_split_address); Delete TOC fusion support.
1010 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1011 longer used with toc fusion being deleted.
1012 (TARGET_TOC_FUSION_FP): Likewise.
1013 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1015 (toc fusion spliter): Delete TOC fusion support.
1016 (toc_fusionload_<mode>): Likewise.
1017 (toc_fusionload_di): Likewise.
1018 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1019 longer needs to be named. Rename predicate to delete TOC fusion.
1020 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1021 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1022 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1023 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1024 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1026 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1028 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1029 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1030 __int128 in built-in function prototypes.
1031 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1032 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1034 2018-07-27 Martin Sebor <msebor@redhat.com>
1036 PR tree-optimization/86696
1037 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1038 types, including enums.
1039 (handle_char_store): Be prepared for the above function to fail.
1041 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1043 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1044 when optimization level is lower than 2 or optimize for size.
1046 2018-07-26 Martin Sebor <msebor@redhat.com>
1048 PR tree-optimization/86043
1049 PR tree-optimization/86042
1050 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1051 (get_string_cst_length): Rename...
1052 (get_min_string_length): ...to this. Add argument.
1053 (handle_char_store): Extend to handle multi-character stores by
1055 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1056 * tree.h (initializer_zerop): Add argument.
1058 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1061 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1062 declare target to variables if they have always,{to,from,tofrom} map
1065 2018-07-26 Martin Liska <mliska@suse.cz>
1068 * lto-wrapper.c: Add linker_output as prefix
1069 for ltrans_output_file.
1071 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1073 PR rtl-optimization/85805
1074 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1075 value for hard registers if that was written in the same mode.
1077 2018-07-26 Martin Liska <mliska@suse.cz>
1079 PR gcov-profile/86536
1080 * gcov.c (format_gcov): Use printf format %.*f directly
1081 and do not handle special values.
1083 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1085 * common/config/arc/arc-common.c (arc_option_optimization_table):
1086 Update default optimizations for size.
1088 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1090 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1091 * config/arc/constraints.md (CfZ): New constraint.
1092 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1093 (subsf3_fpu): Likewise.
1094 (cmpsf_fpu): Likewise.
1095 (cmpsf_fpu_uneq): Likewise.
1097 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1099 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1101 (arc_is_uncached_mem_p): uncached applies to both the variable and
1104 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1106 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1109 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1111 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1112 field "m_scopes" from vec to auto_vec.
1114 2018-07-25 Martin Liska <mliska@suse.cz>
1116 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1119 2018-07-25 Richard Biener <rguenther@suse.de>
1122 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1123 special wrt context_die late.
1124 (gen_subprogram_die): Re-use DIEs in local scope.
1126 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1128 PR tree-optimization/86644
1129 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1131 2018-07-25 Martin Liska <mliska@suse.cz>
1134 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1135 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1137 2018-07-25 Martin Liska <mliska@suse.cz>
1140 * params.def: Explain ASan abbreviation and provide
1141 a documentation link.
1143 2018-07-24 Martin Sebor <msebor@redhat.com>
1145 PR tree-optimization/86622
1146 PR tree-optimization/86532
1147 * builtins.h (string_length): Declare.
1148 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1149 (check_access): Be prepared for non-constant length ranges.
1150 (string_length): Make extern.
1151 * expr.c (string_constant): Only handle the minor non-constant
1152 array index. Use string_constant to compute the length of
1153 a generic string constant.
1155 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1157 PR tree-optimization/86618
1158 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1159 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1161 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1163 PR tree-optimization/86636
1164 * json.cc (json::object::set): Fix comment. Add assertions.
1165 (json::array::append): Move here from json.h. Add comment and an
1167 (json::string::string): Likewise.
1168 * json.h (json::array::append): Move to json.cc.
1169 (json::string::string): Likewise.
1170 * optinfo-emit-json.cc
1171 (optrecord_json_writer::impl_location_to_json): Assert that we
1172 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1173 wrapper around it. Expand the location once, rather than three
1175 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1176 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1178 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1179 places. Fix some overlong lines.
1181 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1183 * config/aarch64/aarch64-simd.md
1184 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1185 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1186 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1187 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1188 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1189 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1190 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1191 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1192 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1194 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1197 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1198 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1199 and abs_d == d, do the power of two handling if profitable.
1201 2018-07-24 Richard Biener <rguenther@suse.de>
1203 * match.pd: Add BIT_FIELD_REF canonicalizations.
1205 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1208 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1210 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1212 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1213 terminated STRING_CST object.
1215 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1217 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1219 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1221 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1222 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1223 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1224 the elements into a register.
1225 (rs6000_split_v4si_init_di_reg): Delete.
1226 (rs6000_split_v4si_init): Delete.
1227 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1228 (vsx_init_v4si): Rewrite as a define_expand.
1230 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1232 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1233 zero_extend argument from memory): New.
1235 2018-07-22 Martin Sebor <msebor@redhat.com>
1238 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1239 diagnosing calls with unknown arguments unless -Walloca-larger-than
1240 is restricted to less than PTRDIFF_MAX bytes.
1242 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1244 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1246 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1248 * pretty-print.c (text_info::set_location): Remove redundant
1249 "line_table" parameter from call to rich_location::set_range.
1251 2018-07-20 Martin Sebor <msebor@redhat.com>
1254 * builtins.c (expand_builtin_alloca): Adjust.
1255 * calls.c (alloc_max_size): Simplify.
1256 * cgraphunit.c (cgraph_node::expand): Adjust.
1257 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1259 (frame_larger_than_size): Same.
1260 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1261 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1263 * doc/invoke.texi (GCC Command Options): Document option arguments.
1264 Explain byte-size arguments and suffixes.
1265 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1266 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1267 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1268 * doc/options.texi (UInteger): Expand.
1269 (Host_Wide_Int, ByteSize): Document new properties.
1270 * final.c (final_start_function_1): Include sizes in an error message.
1271 * function.c (frame_offset_overflow): Same.
1272 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1273 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1274 Diagnose unbounded alloca calls only for limits of less than
1276 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1277 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1279 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1280 only for limits of less than PTRDIFF_MAX.
1281 * langhooks-def.h (lhd_handle_option): Change function argument
1283 * langhooks.c (lhd_handle_option): Same.
1284 * langhooks.h (handle_option): Same.
1285 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1287 (var_type, var_type_struct): Same.
1288 (var_set): Handle ByteSize flag.
1289 * optc-gen.awk: Add comments to output to ease debugging. Make
1290 use of HOST_WIDE_INT where appropriate.
1291 * opts-gen-save.awk: Use %lx to format unsigned long.
1292 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1293 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1294 arguments. Parse bytes-size suffixes.
1295 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1296 (enum_value_to_arg): Same.
1297 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1298 (handle_option): Adjust.
1299 (generate_option): Change function argument to HOST_WIDE_INT.
1300 (cmdline_handle_error): Adjust.
1301 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1302 (set_option): Change function argument to HOST_WIDE_INT.
1303 (option_enabled): Handle cl_host_wide_int.
1304 (get_option_state): Handle CLVC_SIZE.
1305 (control_warning_option): Same.
1306 * opts.c (common_handle_option): Change function argument to
1307 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1308 OPT_Wvla_larger_than_.
1309 * opts.h (enum cl_var_type): Add an enumerator.
1310 * stor-layout.c (layout_decl): Print a more meaningful warning.
1311 * toplev.c (output_stack_usage): Adjust.
1313 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1315 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1316 call to inline_expand_builtin_string_cmp.
1317 (expand_builtin_strcmp): Likewise.
1318 (expand_builtin_strncmp): Likewise.
1319 (inline_string_cmp): Delete the last parameter, change char_type_node
1320 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1322 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1323 the inlining expansion on target where the type of the call has same or
1324 narrower precision than unsigned char.
1326 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1328 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1329 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1330 * common.opt (fsave-optimization-record): New option.
1331 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1332 * doc/invoke.texi (-fsave-optimization-record): New option.
1333 * dumpfile.c: Include "optinfo-emit-json.h".
1334 (struct kv_pair): Move to coretypes.h.
1335 (optgroup_options): Make non-static.
1336 (dump_context::end_scope): Call
1337 optimization_records_maybe_pop_dump_scope.
1338 * dumpfile.h (optgroup_options): New decl.
1339 * json.cc: New file.
1341 * optinfo-emit-json.cc: New file.
1342 * optinfo-emit-json.h: New file.
1343 * optinfo.cc: Include "optinfo-emit-json.h".
1344 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1345 (optinfo_enabled_p): Check optimization_records_enabled_p.
1346 (optinfo_wants_inlining_info_p): Likewise.
1347 * optinfo.h: Update comment.
1348 * profile-count.c (profile_quality_as_string): New function.
1349 * profile-count.h (profile_quality_as_string): New decl.
1350 (profile_count::quality): New accessor.
1351 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1352 and optinfo_emit_json_cc_tests.
1353 * selftest.h (selftest::json_cc_tests): New decl.
1354 (selftest::optinfo_emit_json_cc_tests): New decl.
1355 * toplev.c: Include "optinfo-emit-json.h".
1356 (compile_file): Call optimization_records_finish.
1357 (do_compile): Call optimization_records_start.
1358 * tree-ssa-live.c: Include optinfo.h.
1359 (remove_unused_scope_block_p): Retain inlining information if
1360 optinfo_wants_inlining_info_p returns true.
1362 2018-07-20 Richard Biener <rguenther@suse.de>
1365 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1366 to cover -flto-partition=none.
1368 2018-07-20 Martin Liska <mliska@suse.cz>
1370 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1371 (get_decl_source_range): Remove unused function.
1373 2018-07-20 Richard Biener <rguenther@suse.de>
1375 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1376 (struct vn_phi_s): Likewise.
1377 (struct vn_reference_s): Likewise.
1378 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1379 for searching the slot of an entry known to be in the hash itself.
1380 (vn_phi_hasher::equal): Likewise.
1381 (vn_reference_hasher::equal): Likewise.
1382 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1384 (optimistic_info, current_info): Remove, keeping only valid_info.
1385 (vn_reference_lookup_1): Remove fallback lookup.
1386 (vn_reference_lookup_2): Likewise.
1387 (vn_nary_op_lookup_1): Likewise.
1388 (vn_phi_lookup): Likewise.
1389 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1391 (vn_reference_insert): Adjust, chain the inserted hash element
1392 at last_inserted_ref.
1393 (vn_reference_insert_pieces): Likewise.
1394 (visit_reference_op_call): Likewise.
1395 (vn_nary_op_insert_into): Chain the inserted hash element at
1397 (vn_nary_op_insert_pieces): Adjust.
1398 (vn_nary_op_insert): Likewise.
1399 (vn_nary_op_insert_stmt): Likewise.
1400 (vn_phi_insert): Adjust, chain the inserted hash element at
1402 (process_scc): Remove clearing and copying the optimistic
1403 table. Instead remove elements inserted during an optimistic
1404 iteration from the single table we maintain.
1405 (init_scc_vn): Adjust.
1406 (free_scc_vn): Likewise.
1407 (sccvn_dom_walker::record_cond): Likewise.
1408 (sccvn_dom_walker::after_dom_children): Likewise.
1410 2018-07-19 Martin Sebor <msebor@redhat.com>
1412 PR tree-optimization/84047
1413 PR tree-optimization/83776
1414 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1415 (check_array_bounds): Call it.
1417 2018-07-19 Martin Sebor <msebor@redhat.com>
1419 * align.h (align_flags): Use member initialization.
1421 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1423 * Makefile.in (OBJS): Add optinfo.o.
1424 * coretypes.h (class symtab_node): New forward decl.
1425 (struct cgraph_node): New forward decl.
1426 (class varpool_node): New forward decl.
1427 * dump-context.h: New file.
1428 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1430 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1431 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1432 (set_alt_dump_file): Likewise.
1433 (dump_context::~dump_context): New dtor.
1434 (dump_gimple_stmt): Move implementation to...
1435 (dump_context::dump_gimple_stmt): ...this new member function.
1436 Add the stmt to any pending optinfo, creating one if need be.
1437 (dump_gimple_stmt_loc): Move implementation to...
1438 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1439 Start a new optinfo and add the stmt to it.
1440 (dump_gimple_expr): Move implementation to...
1441 (dump_context::dump_gimple_expr): ...this new member function.
1442 Add the stmt to any pending optinfo, creating one if need be.
1443 (dump_gimple_expr_loc): Move implementation to...
1444 (dump_context::dump_gimple_expr_loc): ...this new member function.
1445 Start a new optinfo and add the stmt to it.
1446 (dump_generic_expr): Move implementation to...
1447 (dump_context::dump_generic_expr): ...this new member function.
1448 Add the tree to any pending optinfo, creating one if need be.
1449 (dump_generic_expr_loc): Move implementation to...
1450 (dump_context::dump_generic_expr_loc): ...this new member
1451 function. Add the tree to any pending optinfo, creating one if
1453 (dump_printf): Move implementation to...
1454 (dump_context::dump_printf_va): ...this new member function. Add
1455 the text to any pending optinfo, creating one if need be.
1456 (dump_printf_loc): Move implementation to...
1457 (dump_context::dump_printf_loc_va): ...this new member function.
1458 Start a new optinfo and add the stmt to it.
1459 (dump_dec): Move implementation to...
1460 (dump_context::dump_dec): ...this new member function. Add the
1461 value to any pending optinfo, creating one if need be.
1462 (dump_context::dump_symtab_node): New member function.
1463 (dump_context::get_scope_depth): New member function.
1464 (dump_context::begin_scope): New member function.
1465 (dump_context::end_scope): New member function.
1466 (dump_context::ensure_pending_optinfo): New member function.
1467 (dump_context::begin_next_optinfo): New member function.
1468 (dump_context::end_any_optinfo): New member function.
1469 (dump_context::s_current): New global.
1470 (dump_context::s_default): New global.
1471 (dump_scope_depth): Delete global.
1472 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1473 (dump_symtab_node): New function.
1474 (get_dump_scope_depth): Reimplement in terms of dump_context.
1475 (dump_begin_scope): Likewise.
1476 (dump_end_scope): Likewise.
1477 (selftest::temp_dump_context::temp_dump_context): New ctor.
1478 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1479 (selftest::verify_item): New function.
1480 (ASSERT_IS_TEXT): New macro.
1481 (ASSERT_IS_TREE): New macro.
1482 (ASSERT_IS_GIMPLE): New macro.
1483 (selftest::test_capture_of_dump_calls): New test.
1484 (selftest::dumpfile_c_tests): Call it.
1485 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1486 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1487 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1488 descriptive comment.
1489 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1490 (dump_node, dump_bb): Move these unrelated decls.
1491 (class dump_manager): Add leading comment.
1492 * optinfo.cc: New file.
1493 * optinfo.h: New file.
1495 2018-07-19 Michael Collison <michael.collison@arm.com>
1496 Richard Henderson <rth@redhat.com>
1498 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1499 (subti): Handle op1 zero.
1500 (subvti4, usub4ti4): New.
1501 (*sub<GPI>3_compare1_imm): New.
1502 (sub<GPI>3_carryinCV): New.
1503 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1504 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1506 2018-07-19 Michael Collison <michael.collison@arm.com>
1507 Richard Henderson <rth@redhat.com>
1509 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1510 (addti3): Create simpler code if low part is already known to be 0.
1511 (addvti4, uaddvti4): New.
1512 (*add<GPI>3_compareC_cconly_imm): New.
1513 (*add<GPI>3_compareC_cconly): New.
1514 (*add<GPI>3_compareC_imm): New.
1515 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1516 handle constants within this pattern..
1517 (*add<GPI>3_compareV_cconly_imm): New.
1518 (*add<GPI>3_compareV_cconly): New.
1519 (*add<GPI>3_compareV_imm): New.
1520 (add<GPI>3_compareV): New.
1521 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1522 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1523 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1524 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1525 with 'comparison' operator.
1526 (*add<GPI>3_compareV_cconly_imm): Ditto.
1527 (*add<GPI>3_compareV_cconly): Ditto.
1528 (*add<GPI>3_compareV_imm): Ditto.
1529 (add<GPI>3_compareV): Ditto.
1530 (add<mode>3_carryinC): Ditto.
1531 (*add<mode>3_carryinC_zero): Ditto.
1532 (*add<mode>3_carryinC): Ditto.
1533 (add<mode>3_carryinV): Ditto.
1534 (*add<mode>3_carryinV_zero): Ditto.
1535 (*add<mode>3_carryinV): Ditto.
1537 2018-07-19 Michael Collison <michael.collison@arm.com>
1538 Richard Henderson <rth@redhat.com>
1540 * config/aarch64/aarch64-modes.def (CC_V): New.
1541 * config/aarch64/aarch64-protos.h
1542 (aarch64_addti_scratch_regs): Declare
1543 (aarch64_subvti_scratch_regs): Declare.
1544 (aarch64_expand_subvti): Declare.
1545 (aarch64_gen_unlikely_cbranch): Declare
1546 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1547 for signed overflow using CC_Vmode.
1548 (aarch64_get_condition_code_1): Handle CC_Vmode.
1549 (aarch64_gen_unlikely_cbranch): New function.
1550 (aarch64_addti_scratch_regs): New function.
1551 (aarch64_subvti_scratch_regs): New function.
1552 (aarch64_expand_subvti): New function.
1554 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1556 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1558 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1559 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1562 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1565 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1566 address check not strict.
1568 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1570 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1572 (store_pair_lanes<mode>): Likewise.
1573 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1574 enum value 'ADDR_QUERY_LDP_STP_N'.
1575 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1576 (aarch64_print_address_internal): Add declaration.
1577 (aarch64_print_ldpstp_address): Remove.
1578 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1579 (aarch64_print_operand): Change printing of 'y'.
1580 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1581 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1582 'true' rather than '1'.
1583 * config/aarch64/constraints.md (Uml): Likewise.
1584 (Uml): Rename to Umn.
1587 2018-07-19 Richard Biener <rguenther@suse.de>
1589 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1591 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1592 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1593 (vn_reference_hasher): Likewise.
1594 (struct vn_tables_s): Remove obstack and alloc-pool members.
1595 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1596 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1597 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1598 (vn_reference_insert_pieces): Likewise.
1599 (alloc_vn_nary_op_noinit): Adjust.
1600 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1601 (vn_phi_eq): Adjust.
1602 (shared_lookup_phiargs): Remove.
1603 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1604 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1605 (visit_reference_op_call): Likewise.
1606 (copy_nary, copy_phi, copy_reference): Remove.
1607 (process_scc): Rewind the obstack when iterating. Do not
1608 copy the elements to valid_info but just move them from one
1609 hashtable to the other.
1610 (allocate_vn_table): Adjust.
1611 (free_vn_table): Likewise.
1612 (init_scc_vn): Likewise.
1613 (free_scc_vn): Likewise.
1615 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1618 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1619 indirect_return as function type attribute.
1620 (ix86_attribute_table): Change indirect_return to function
1622 * doc/extend.texi: Update indirect_return attribute.
1624 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1626 * wide-int.h (widest2_int): New.
1627 * gimple-fold.c (arith_overflowed_p): Use it.
1628 * tree.h (widest2_int_cst): New.
1629 * tree-vrp.c (wide_int_binop_overflow): Rename from
1630 vrp_int_const_binop.
1631 Rewrite to work on trees.
1632 (extract_range_from_multiplicative_op_1): Abstract code to...
1633 (wide_int_range_min_max): ...here.
1634 (wide_int_range_cross_product): ...and here.
1635 (extract_range_from_binary_expr_1): Abstract overflow code to...
1636 (wide_int_range_mult_wrapping): ...here.
1637 * tree-vrp.h (wide_int_range_cross_product): New.
1638 (wide_int_range_mult_wrapping): New.
1640 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1641 Julia Koval <julia.koval@intel.com>
1643 * config/i386/x86-tune-costs.h (skylake_memcpy,
1644 skylake_memset): Replace rep_prefix with unrolling for size 512.
1646 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1649 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1652 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1654 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1655 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1656 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1657 previously known as "PowerPC AltiVec Built-in Functions". Move
1658 some material to new subsubsections "PowerPC AltiVec Built-in
1659 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1661 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1662 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1663 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1664 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1666 2018-07-18 Richard Biener <rguenther@suse.de>
1668 PR tree-optimization/86557
1669 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1672 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1674 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1676 2018-07-17 Jeff Law <law@redhat.com>
1678 * config/arm/arm.c (get_label_padding): Update for recent
1679 changes to label_to_alignment.
1681 PR tree-optimization/86010
1682 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1684 * config/mips/mips.c (vr4130_align_insns): Update for recent
1685 changes to label_to_alignment.
1687 * config/frv/frv.c (frv_label_align): Update for recent changes
1688 to label_to_alignment.
1690 * config/nios2/nios2.c (nios2_label_align): Update for recent
1691 changes which dropped ALIGN_LABELS_LOG.
1693 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1695 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1696 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1698 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1700 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1701 deprecated align_labels_log.
1703 2018-07-17 Richard Biener <rguenther@suse.de>
1706 * dwarf2out.c (init_sections_and_labels): Always generate
1707 a debug_line_str_section for early LTO debug.
1708 (dwarf2out_finish): Reset debug_line_str_hash output early.
1709 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1711 (dwarf2out_early_finish): Output debug_line_str.
1713 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1715 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1716 index register on z196 or later.
1718 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1720 * config/s390/s390.c (s390_default_align): Set default function
1722 (s390_override_options_after_change): Call s390_default align.
1723 (s390_option_override_internal): Call s390_default_align.
1724 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1726 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1729 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1730 to _looptemp_ clauses, other than the first two.
1732 2018-07-17 Martin Liska <mliska@suse.cz>
1734 * opts.c: Do not enable OPT_falign_* for -Os.
1736 2018-07-17 Martin Liska <mliska@suse.cz>
1738 * align.h (MAX_CODE_ALIGN): New.
1739 (MAX_CODE_ALIGN_VALUE): New.
1740 * common/config/i386/i386-common.c (ix86_handle_option):
1741 (MAX_CODE_ALIGN): Moved to align.h.
1742 * final.c (MAX_CODE_ALIGN): Likewise.
1743 * opts.c (parse_and_check_align_values):
1744 (MAX_CODE_ALIGN): Likewise.
1745 (MAX_CODE_ALIGN_VALUE): Likewise.
1747 2018-07-17 Martin Liska <mliska@suse.cz>
1749 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1750 in order to fulfil coding style.
1751 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1752 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1753 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1754 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1755 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1756 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1757 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1758 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1759 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1761 2018-07-17 Martin Liska <mliska@suse.cz>
1763 * align.h: New file.
1764 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1765 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1766 align_flags of label_to_alignment.
1767 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1769 * config/m68k/m68k.c: Do not use removed align_labels_value and
1771 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1772 (LOOP_ALIGN): Likewise.
1773 (LABEL_ALIGN): Likewise.
1774 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1775 Remove not used macro.
1776 (rs6000_loop_align): Change return type to align_flags.
1777 (rs6000_loop_align_max_skip): Remove.
1778 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1779 Change return type to align_flags.
1780 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1781 Remove not used macro.
1782 (rs6000_loop_align): Change return type to align_flags.
1783 (rs6000_loop_align_max_skip): Remove.
1784 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1785 * config/rx/rx-protos.h (rx_align_for_label): Make it
1787 * config/rx/rx.c (rx_align_for_label): Change return type
1789 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1791 into align_flags class.
1792 (LABEL_ALIGN): Likewise.
1793 (LOOP_ALIGN): Likewise.
1794 * config/s390/s390.c (s390_label_align): Use align_flags
1796 (s390_asm_output_function_label): Likewise.
1797 * config/sh/sh.c (sh_override_options_after_change):
1798 Use align_flags class directly without macros.
1799 (find_barrier): Likewise.
1800 (barrier_align): Likewise.
1801 (sh_loop_align): Likewise.
1802 * config/spu/spu.c (spu_option_override):
1803 Use align_flags_tuple::get_value instead of removed macros.
1804 (spu_sched_init): Likewise.
1805 * config/spu/spu.h (GTY): Likewise.
1806 * config/visium/visium.c (visium_option_override):
1807 Set "8" as default secondary alignment.
1808 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1809 in order to guarantee secondary alignment of 8.
1810 * coretypes.h: Include align.h header file.
1811 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1812 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1813 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1814 * doc/tm.texi.in: Likewise.
1815 * final.c (struct label_alignment): Remove not used structure.
1816 (LABEL_ALIGN): Change type to align_flags.
1817 (LOOP_ALIGN): Likewise.
1818 (JUMP_ALIGN): Likewise.
1819 (default_loop_align_max_skip): Remove.
1820 (default_label_align_max_skip): Likewise.
1821 (default_jump_align_max_skip): Likewise.
1822 (default_label_align_after_barrier_max_skip):
1823 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1824 (LABEL_TO_MAX_SKIP): Remove.
1825 (label_to_alignment): Return align_flags type instead of integer.
1826 (label_to_max_skip): Remove.
1827 (align_fuzz): Use align_flags type.
1828 (compute_alignments): Use align_flags type and use align_flags::max
1829 to combine multiple alignments.
1830 (grow_label_align): Grow vec instead of C array.
1831 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1832 (shorten_branches): Use align_flags type and use align_flags::max
1833 to combine multiple alignments.
1834 (final_scan_insn_1): Remove usage of secondary alignment that comes
1835 from label alignment, but instead use proper secondary alignment
1836 which is computed in grow_label_align.
1837 * flags.h (struct align_flags_tuple): Move to align.h.
1838 (struct align_flags): Likewise.
1839 (state_align_loops): Rename to align_loops.
1840 (state_align_jumps): Rename to align_jumps.
1841 (state_align_labels): Rename to align_labels.
1842 (state_align_functions): Rename to align_functions.
1843 (align_loops_log): Remove.
1844 (align_jumps_log): Remove.
1845 (align_labels_log): Remove.
1846 (align_functions_log): Remove.
1847 (align_loops_max_skip): Remove.
1848 (align_jumps_max_skip): Remove.
1849 (align_labels_max_skip): Remove.
1850 (align_functions_max_skip): Remove.
1851 (align_loops_value): Remove.
1852 (align_jumps_value): Remove.
1853 (align_labels_value): Remove.
1854 (align_functions_value): Remove.
1855 * output.h (label_to_alignment): Change return type to align_flags.
1856 (label_to_max_skip): Remove.
1857 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1858 jump_align_max_skip macros.
1859 * targhooks.h (default_loop_align_max_skip): Remove.
1860 (default_label_align_max_skip): Likewise.
1861 (default_jump_align_max_skip): Likewise.
1862 (default_label_align_after_barrier_max_skip): Remove.
1863 * toplev.c (read_log_maxskip): Use ::normalize function.
1864 (parse_N_M): Remove not used argument and also call ::normalize.
1865 (parse_alignment_opts): Do not pass unused arguments.
1866 * varasm.c (assemble_start_function): Use directly align_functions
1867 instead of removed macros.
1868 * system.h: Do not poison removed macros.
1870 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1873 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1874 and cond temporaries don't have reference type if iterator has
1875 pointer type. For init use &for_pre_body instead of pre_p if
1876 for_pre_body is non-empty.
1878 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1880 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1881 double-double modes to SFmode directly directly.
1882 (trunc<mode>sf2_fprs): Delete.
1884 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1886 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1887 for conversions between IFmode and the decimal floating point modes.
1888 (init_float128_ieee): Use the correct names for conversions between
1889 KFmode and the decimal floating point modes.
1891 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1893 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1894 for the conversions between TDmode and IFmode.
1895 (init_float128_ieee): Use more correct names for the conversions
1896 between TDmode and KFmode.
1898 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1900 PR tree-optimization/86526
1901 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1902 (inline_expand_builtin_string_cmp): Likewise.
1903 (inline_string_cmp): Likewise. Use c_readstr instead of
1904 builtin_memcpy_read_str. Add unit_mode temporary.
1906 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1909 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1910 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1912 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1914 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1915 Alphabetize prototypes of built-in functions, separating out
1916 built-in functions that are listed in this section but should be
1917 described elsewhere.
1919 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1922 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1923 conditional move when trapping comparison was split to a
1924 non-trapping one (and vice versa).
1926 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1928 * config/s390/s390.c (s390_function_profiler): Generate nops
1929 instead of profiler call sequences.
1930 * config/s390/s390.opt: Add the new option.
1932 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1934 * config/s390/s390.c (s390_function_profiler): Generate
1935 __mcount_loc section.
1936 * config/s390/s390.opt: Add the new option.
1938 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1940 * common.opt: Add the new warning.
1941 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1942 %r0,__fentry__" when -mfentry is specified.
1943 (s390_option_override_internal): Disallow -mfentry for 31-bit
1945 * config/s390/s390.opt: Add the new option.
1947 2018-07-16 Richard Biener <rguenther@suse.de>
1950 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1951 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1953 2018-07-16 Martin Liska <mliska@suse.cz>
1956 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1959 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1961 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1963 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1965 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1967 * config/arc/arc-cpus.def (hs4x): New cpu.
1969 * config/arc/arc-tables.opt: Regenerate.
1970 * config/arc/arc.c (arc_sched_issue_rate): New function.
1971 (TARGET_SCHED_ISSUE_RATE): Define.
1972 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1973 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1975 (attr tune): Add ARCHS4x tune values.
1976 (attr tune_dspmpy): Define.
1977 (*tst): Correct instruction type.
1978 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1979 * config/arc/arcHS4x.md: New file.
1980 * config/arc/fpu.md: Update instruction type attributes.
1981 * config/arc/t-multilib: Regenerate.
1983 2018-07-16 Tom de Vries <tdevries@suse.de>
1986 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1988 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1990 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1993 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1995 PR tree-optimization/86514
1996 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1997 conversion to a boolean type from a type with greater precision.
1999 2018-07-16 Tom de Vries <tdevries@suse.de>
2001 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2002 dump_flags request TDF_SLIM.
2004 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2006 * fold-const.c (int_const_binop_1): Abstract...
2007 (wide_int_binop): ...wide int code here.
2008 (poly_int_binop): ...poly int code here.
2009 Abstract the rest of int_const_binop_1 into int_const_binop.
2010 * fold-const.h (wide_int_binop): New.
2011 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2012 Remove useless PLUS/MINUS_EXPR case.
2013 (zero_nonzero_bits_from_vr): Move wide int code...
2014 (zero_nonzero_bits_from_bounds): ...here.
2015 (extract_range_from_binary_expr_1): Move mask optimization code...
2016 (range_easy_mask_min_max): ...here.
2017 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2018 (range_easy_mask_min_max): New.
2020 2018-07-15 Jeff Law <law@redhat.com>
2023 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2026 2018-07-14 Jim Wilson <jimw@sifive.com>
2028 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2030 2018-07-14 Paul Koning <ni1d@arrl.net>
2032 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2034 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2036 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2039 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2040 Steve Munroe <munroesj52@gmail.com>
2042 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2043 (_mm_andnot_si128): Likewise.
2044 (_mm_or_si128): Likewise.
2045 (_mm_xor_si128): Likewise.
2047 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2050 * builtins.c (expand_builtin_memcmp): Inline the calls first
2051 when result_eq is false.
2052 (expand_builtin_strcmp): Inline the calls first.
2053 (expand_builtin_strncmp): Likewise.
2054 (inline_string_cmp): New routine. Expand a string compare
2055 call by using a sequence of char comparison.
2056 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2057 a call to str(n)cmp/memcmp.
2058 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2060 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2062 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2064 * config/arm/driver-arm.c: Include arm-native.h.
2065 (host_detect_local_cpu): Use auto-generated data tables.
2066 (vendors, arm_cpu_table): Delete. Move part information to ...
2067 * config/arm/arm-cpus.in: ... here.
2068 * config/arm/parsecpu.awk (gen_native): New function.
2069 (vendor, part): New CPU fields.
2070 (END): Add support for building the native CPU detection tables.
2071 * config/arm/t-arm (arm-native.h): Add build rule.
2072 (driver-arm.o): Add dependency on arm-native.h.
2074 2018-07-13 Richard Biener <rguenther@suse.de>
2077 * match.pd (addr1 - addr2): Allow either of the operand to
2080 2018-07-13 Tom de Vries <tdevries@suse.de>
2082 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2085 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2087 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2088 arrays instead of numbered variables.
2090 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2092 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2093 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2095 2018-07-13 Richard Biener <rguenther@suse.de>
2098 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2099 instead of get_context_die.
2101 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2102 Richard Biener <rguenther@suse.de>
2105 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2106 that the loop latch destination where phi is defined.
2108 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2110 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2111 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2112 (riscv_set_current_function): Extract getting interrupt type to new
2114 (riscv_get_interrupt_type): New function.
2115 (riscv_merge_decl_attributes): New function, checking interrupt type is
2117 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2119 2018-07-12 Paul Koning <ni1d@arrl.net>
2121 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2124 2018-07-12 Paul Koning <ni1d@arrl.net>
2126 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2127 zero reference, add doloop_end instead.
2128 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2129 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2130 detail for doloop_end.
2132 2018-07-12 Martin Sebor <msebor@redhat.com>
2135 * attribs.c (decl_attributes): Reject conflicting attributes before
2136 calling attribute handlers.
2138 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2140 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2142 (gcc::dump_manager::get_dump_file_name): likewise.
2143 (dump_begin): Likewise.
2144 * dumpfile.h (dump_begin): Update prototype.
2145 (gcc::dump_manager::get_dump_file_name,
2146 gcc::dump_manager::get_dump_file_name): Update prototype.
2148 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2150 * internal-fn.h (vectorizable_internal_fn_p): New function.
2151 * tree-vect-slp.c (compatible_calls_p): Likewise.
2152 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2153 to internal functions.
2154 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2156 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2158 * fold-const.h (inverse_conditions_p): Declare.
2159 * fold-const.c (inverse_conditions_p): New function.
2160 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2161 that test the inverse condition of a conditional internal function.
2162 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2163 * internal-fn.c (internal_fn_mask_index): Handle conditional
2165 (vectorized_internal_fn_supported_p): New function.
2166 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2167 (any_pred_load_store): Replace with...
2168 (need_to_predicate): ...this new variable.
2169 (redundant_ssa_names): New variable.
2170 (ifcvt_can_use_mask_load_store): Move initial checks to...
2171 (ifcvt_can_predicate): ...this new function. Handle tree codes
2172 for which a conditional internal function exists.
2173 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2174 instead of ifcvt_can_use_mask_load_store. Update after variable
2176 (predicate_load_or_store): New function, split out from
2177 predicate_mem_writes.
2178 (check_redundant_cond_expr): New function.
2179 (value_available_p): Likewise.
2180 (predicate_rhs_code): Likewise.
2181 (predicate_mem_writes): Rename to...
2182 (predicate_statements): ...this. Use predicate_load_or_store
2183 and predicate_rhs_code.
2184 (combine_blocks, tree_if_conversion): Update after above name changes.
2185 (ifcvt_local_dce): Handle redundant_ssa_names.
2186 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2187 general conditional functions.
2188 * tree-vect-stmts.c (vectorizable_call): Likewise.
2190 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2191 Alan Hayward <alan.hayward@arm.com>
2192 David Sherwood <david.sherwood@arm.com>
2194 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2195 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2196 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2197 plus and minus and convert them into IFN_COND_FMA-based sequences.
2198 (convert_mult_to_fma): Handle conditional plus and minus.
2200 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2202 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2203 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2204 (cond_fnms_optab): New optabs.
2205 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2207 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2208 * internal-fn.h (get_conditional_internal_fn): Declare.
2209 (get_unconditional_internal_fn): Likewise.
2210 * internal-fn.c (cond_ternary_direct): New macro.
2211 (expand_cond_ternary_optab_fn): Likewise.
2212 (direct_cond_ternary_optab_supported_p): Likewise.
2213 (FOR_EACH_COND_FN_PAIR): Likewise.
2214 (get_conditional_internal_fn): New function.
2215 (get_unconditional_internal_fn): Likewise.
2216 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2217 (gimple_match_op::gimple_match_op): Add a new overload for 5
2219 (gimple_match_op::set_op): Likewise.
2220 (gimple_resimplify5): Declare.
2221 * genmatch.c (decision_tree::gen): Generate simplifications for
2223 * gimple-match-head.c (gimple_simplify): Define an overload for
2224 5 operands. Handle calls with 5 arguments in the top-level overload.
2225 (convert_conditional_op): Handle conversions from unconditional
2226 internal functions to conditional ones.
2227 (gimple_resimplify5): New function.
2228 (build_call_internal): Pass a fifth operand.
2229 (maybe_push_res_to_seq): Likewise.
2230 (try_conditional_simplification): Try converting conditional
2231 internal functions to unconditional internal functions.
2232 Handle 3-operand unconditional forms.
2233 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2234 Define ternary equivalents of the current rules for binary conditional
2236 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2238 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2239 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2240 (optab): Handle them.
2241 (SVE_COND_FP_TERNARY): New int iterator.
2242 (sve_fmla_op, sve_fmad_op): New int attributes.
2243 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2244 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2245 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2247 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2249 * target.def (preferred_else_value): New target hook.
2250 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2251 * doc/tm.texi: Regenerate.
2252 * targhooks.h (default_preferred_else_value): Declare.
2253 * targhooks.c (default_preferred_else_value): New function.
2254 * internal-fn.h (conditional_internal_fn_code): Declare.
2255 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2256 (get_conditional_internal_fn): Use it.
2257 (conditional_internal_fn_code): New function.
2258 * gimple-match.h (gimple_match_cond): New struct.
2259 (gimple_match_op): Add a cond member function.
2260 (gimple_match_op::gimple_match_op): Update all forms to take a
2262 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2263 for the suboperation, but don't specify a particular else_value.
2264 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2265 (visit_nary_op, visit_reference_op_load): Pass
2266 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2267 * gimple-match-head.c: Include tree-eh.h
2268 (convert_conditional_op): New function.
2269 (maybe_resimplify_conditional_op): Likewise.
2270 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2271 (gimple_resimplify2): Likewise.
2272 (gimple_resimplify3): Likewise.
2273 (gimple_resimplify4): Likewise.
2274 (maybe_push_res_to_seq): Return null for conditional operations.
2275 (try_conditional_simplification): New function.
2276 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2278 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2280 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2282 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2284 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2286 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2288 (hash_tree): Do not hash DECL_FCONTEXT
2289 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2290 Do not stream DECL_FCONTEXT.
2291 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2292 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2294 2018-07-12 Richard Biener <rguenther@suse.de>
2297 * dwarf2out.c (gen_block_die): Only output blocks when they have
2298 at least one !DECL_IGNORED_P variable.
2300 2018-07-12 Richard Biener <rguenther@suse.de>
2303 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2304 Remove -mieee-fp handling.
2306 2018-07-12 Richard Biener <rguenther@suse.de>
2308 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2309 left-over from last patch.
2311 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2313 PR tree-optimization/86492
2314 * gimple-ssa-store-merging.c
2315 (imm_store_chain_info::coalesce_immediate_stores): Call
2316 check_no_overlap even for the merge_overlapping case. Formatting fix.
2318 2018-07-12 Richard Biener <rguenther@suse.de>
2321 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2322 move possibly trapping operations into the conditional.
2324 2018-07-12 Richard Biener <rguenther@suse.de>
2326 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2327 (vn_lookup_simplify_result): Remove recursion limit applied
2329 (vn_nary_build_or_lookup_1): Adjust.
2330 (try_to_simplify): Likewise.
2331 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2333 (gimple_resimplify2): Likewise.
2334 (gimple_resimplify3): Likewise.
2335 (gimple_resimplify4): Likewise.
2337 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2339 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2340 Use __mmask64 type instead of __mmask8 for __M argument.
2341 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2342 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2344 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2345 __mmask16 for __M argument.
2346 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2347 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2348 to __mmask16 instead of __mmask8.
2349 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2350 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2351 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2352 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2353 instead of __mmask16 for __U argument.
2354 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2355 __mmask16 instead of __mmask8 for __U argument.
2356 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2358 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2360 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2362 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2364 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2366 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2368 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2370 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2372 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2374 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2376 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2377 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2378 return type as well as __M argument type and all casts from __mmask8
2380 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2381 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2382 return type as well as __M argument type and all casts from __mmask8
2384 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2385 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2386 return type as well as __M argument type and all casts from __mmask8
2388 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2389 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2390 return type as well as __M argument type and all casts from __mmask8
2392 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2393 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2396 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2398 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2399 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2402 2018-07-11 Paul Koning <ni1d@arrl.net>
2404 * doc/md.texi (define_subst): Document how multiple occurrences of
2405 the same argument in the replacement pattern are handled.
2407 2018-07-11 Paul Koning <ni1d@arrl.net>
2409 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2411 (Common Type Attributes): Add "mode" attribute.
2413 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2415 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2416 stream DECL_ORIGINAL_TYPE.
2417 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2418 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2419 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2420 Do not walk original type.
2421 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2423 (write_ts_decl_non_common_tree_pointers): Do not stream
2425 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2426 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2428 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2430 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2431 thread twice from the same starting edge.
2433 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2435 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2436 * gimple.c (gimple_call_nonnull_result_p): ...here...
2437 (gimple_call_nonnull_arg): ...and here.
2438 * gimple.h (gimple_call_nonnull_result_p): New.
2439 (gimple_call_nonnull_arg): New.
2441 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2443 * config/arm/arm-cpus.in: Move information from fpu field of each
2444 cpu definition to the isa field.
2445 * config/arm/parsecpu.awk (fpu): Delete match rule.
2446 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2448 2018-07-11 Richard Biener <rguenther@suse.de>
2451 * dwarf2out.c (init_sections_and_labels): Use
2452 output_asm_line_debug_info consistently.
2453 (dwarf2out_early_finish): Likewise.
2454 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2457 2018-07-11 Richard Biener <rguenther@suse.de>
2459 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2460 Rework father_bb setting in a way to avoid propagating constants
2461 multiple times on a loop body.
2463 2018-07-10 Mark Wielaard <mark@klomp.org>
2466 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2468 2018-07-10 Richard Biener <rguenther@suse.de>
2470 * hash-map.h (hash_map::iterator::operator*): Return
2471 references to key and value.
2473 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2476 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2477 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2478 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2479 (gimplify_omp_for): For composite loops, move outer
2480 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2481 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2482 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2483 TREE_LIST for both the original class iterator and the "last" helper
2484 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2485 loop, remember has_decl_expr from outer composite loops for the
2486 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2488 2018-07-09 Martin Sebor <msebor@redhat.com>
2492 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2493 accessing implicitly initialized array elements.
2494 * expr.c (string_constant): Handle string initializers of
2495 character arrays within aggregates.
2496 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2497 Store element offset. As a special case, handle zero size.
2498 (fold_nonarray_ctor_reference): Same.
2499 (fold_ctor_reference): Add argument. Store subobject offset.
2500 * gimple-fold.h (fold_ctor_reference): Add argument.
2502 2018-07-09 Paul Koning <ni1d@arrl.net>
2504 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2505 (pdp11_insn_cost): New function.
2506 (pdp11_md_asm_adjust): New function.
2507 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2508 (pdp11_rtx_costs): Update to match machine better.
2509 (output_addr_const_pdp11): Correct format mismatch warnings.
2510 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2511 * config/pdp11/pdp11.md: General change to add base_cost and/or
2512 length attributes for use by new pdp11_insn_cost function.
2513 (MIN_BRANCH): Correct definition.
2515 (doloop_end): Use standard pattern name for looping pattern.
2516 (doloop_end_nocc): New.
2517 (movsf): Add another constraint alternative.
2518 (zero_extendqihi2): Add constraint alternatives for not in place
2520 (zero_extendhisi2): Remove.
2521 (shift patterns): Add CC handling variants.
2525 (define_peephole2): New peephole to recognize mov that sets CC for
2528 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2530 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2531 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2534 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2537 * real.c (real_nextafter): Return true if result is denormal.
2539 2018-07-09 Martin Liska <mliska@suse.cz>
2541 * common.opt: Add back wrongly removed attribute.
2543 2018-07-09 Richard Biener <rguenther@suse.de>
2546 * dwarf2out.c (gen_block_die): For an early generated DIE
2547 always output high/low PC attributes.
2549 2018-07-09 Tom de Vries <tdevries@suse.de>
2551 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2552 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2553 onto VAR_DECL with abstract origin.
2555 2018-07-07 Jim Wilson <jimw@sifive.com>
2557 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2559 2018-07-07 Tom de Vries <tdevries@suse.de>
2561 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2563 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2565 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2567 (combine_bound): Use wide-int overflow calculation instead of
2569 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2571 * fold-const.c (int_const_binop_2): Same.
2572 (extract_muldiv_1): Same.
2573 (fold_div_compare): Same.
2574 (fold_abs_const): Same.
2576 * poly-int.h (add): Same.
2580 * predict.c (predict_iv_comparison): Same.
2581 * profile-count.c (slow_safe_scale_64bit): Same.
2582 * simplify-rtx.c (simplify_const_binary_operation): Same.
2583 * tree-chrec.c (tree_fold_binomial): Same.
2584 * tree-data-ref.c (split_constant_offset_1): Same.
2585 * tree-if-conv.c (idx_within_array_bound): Same.
2586 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2587 * tree-ssa-phiopt.c (minmax_replacement): Same.
2588 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2589 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2590 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2591 * wide-int.cc (wi::add_large): Same.
2592 (wi::mul_internal): Same.
2593 (wi::sub_large): Same.
2594 (wi::divmod_internal): Same.
2595 * wide-int.h: Change overflow type to overflow_type for neg, add,
2596 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2597 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2598 mul_internal, divmod_internal.
2599 (overflow_type): New enum.
2600 (accumulate_overflow): New.
2602 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2604 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2605 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2607 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2609 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2610 argument is checked for zero before entering loop, avoid checking again.
2612 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2614 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2615 * gimplify.h (generic_expr_could_trap_p): Likwise.
2616 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2618 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2620 PR tree-optimization/86401
2621 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2622 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2623 (fold_bit_and_mask): ... here. New helper function for match.pd.
2624 * fold-const.h (fold_bit_and_mask): Declare.
2625 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2627 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2630 * target.def (translate_mode_attribute): New hook.
2631 * targhooks.h (default_translate_mode_attribute): Declare.
2632 * targhooks.c (default_translate_mode_attribute): New function.
2633 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2634 * doc/tm.texi: Regenerate.
2635 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2636 (rs6000_translate_mode_attribute): New function.
2638 2018-07-06 Paul Koning <ni1d@arrl.net>
2640 * doc/md.texi (define_split): Document DONE and FAIL.
2641 (define_peephole2): Ditto.
2643 2018-07-05 Jeff Law <law@redhat.com>
2645 PR tree-optimization/86010
2646 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2647 both the head and tail of mem* and str* calls.
2649 2018-07-05 Jim Wilson <jimw@sifive.com>
2651 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2653 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2655 * config/aarch64/aarch64-simd.md: correct flags text for
2656 MIN_EXPR replacement.
2658 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2660 * configure: Regenerated.
2662 2018-07-05 Carl Love <cel@us.ibm.com>
2664 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2665 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2666 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2667 VSX_BUILTIN_DOUBLEL_V4SF.
2669 2018-07-05 Martin Sebor <msebor@redhat.com>
2672 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2673 than its domain to compute its the upper bound of a char array.
2675 2018-07-05 Nathan Sidwell <nathan@acm.org>
2677 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2678 * doc/cpp.texi: Update comment.
2679 * doc/tm.texi: Rebuilt.
2680 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2681 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2682 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2683 headers affected by extern "C".
2684 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2685 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2686 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2687 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2688 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2689 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2690 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2691 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2692 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2693 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2694 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2695 config/sparc/sp64-elf.h, config/spu/spu.h,
2696 config/stormy16/stormy16.h, config/v850/v850.h,
2697 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2698 define NO_IMPLICIT_EXTERN_C.
2699 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2701 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2704 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2705 instead of GET_MODE_SIZE when comparing Units.
2707 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2710 * rtlanal.c (set_noop_p): Constrain on mode change,
2711 include hard-reg-set.h
2713 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2715 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2717 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2720 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2723 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2725 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2727 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2730 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2732 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2734 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2737 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2739 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2741 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2742 neg_*_op* variables.
2744 2018-07-04 Martin Liska <mliska@suse.cz>
2746 * tree-switch-conversion.c: Define
2747 max_ratio_for_speed and max_ratio_for_size constants.
2749 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2750 Martin Liska <mliska@suse.cz>
2755 * common.opt: Rename align options with 'str_' prefix.
2756 * common/config/i386/i386-common.c (set_malign_value): New
2758 (ix86_handle_option): Use it to set -falign-* options/
2759 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2760 type from int to string.
2761 * config/aarch64/aarch64.c: Update default values from int
2763 * config/alpha/alpha.c (alpha_override_options_after_change):
2765 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2766 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2767 max skip conditionally.
2768 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2769 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2770 max skip conditionally.
2771 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2772 max skip conditionally.
2773 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2774 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2775 max skip conditionally.
2776 * config/i386/i386.c (struct ptt): Change type from int to
2778 (ix86_default_align): Set default values.
2779 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2780 max skip conditionally.
2781 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2782 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2783 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2784 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2785 max skip conditionally.
2786 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2787 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2788 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2789 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2790 max skip conditionally.
2791 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2792 * config/ia64/ia64.c (ia64_option_override): Set default values
2793 for alignment options.
2794 * config/m68k/m68k.c: Handle new str_align_* options.
2795 * config/mips/mips.c (mips_set_compression_mode): Change
2797 (mips_option_override): Set default values for options.
2798 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2800 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2802 * config/rx/rx.c (rx_option_override): Likewise.
2803 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2804 (LABEL_ALIGN): Use align_labels_log.
2805 (LOOP_ALIGN): Use align_loops_align.
2806 * config/s390/s390.c (s390_asm_output_function_label): Use new
2808 * config/sh/sh.c (sh_override_options_after_change):
2809 Change type of constants.
2810 * config/spu/spu.c (spu_sched_init): Likewise.
2811 * config/sparc/sparc.c (sparc_option_override): Set default
2813 * config/visium/visium.c (visium_option_override): Likewise.
2814 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2815 emit p2align format with last argument if it's not needed.
2816 * doc/invoke.texi: Document extended format of -falign-*.
2817 * final.c: Use align_labels alignment.
2818 * flags.h (struct target_flag_state): Change type to use
2820 (struct align_flags_tuple): New.
2821 (struct align_flags): Likewise.
2822 (align_loops_log): Redefine macro to use new types.
2823 (align_loops_max_skip): Redefine macro to use new types.
2824 (align_jumps_log): Redefine macro to use new types.
2825 (align_jumps_max_skip): Redefine macro to use new types.
2826 (align_labels_log): Redefine macro to use new types.
2827 (align_labels_max_skip): Redefine macro to use new types.
2828 (align_functions_log): Redefine macro to use new types.
2829 (align_loops): Redefine macro to use new types.
2830 (align_jumps): Redefine macro to use new types.
2831 (align_labels): Redefine macro to use new types.
2832 (align_functions): Redefine macro to use new types.
2833 (align_functions_max_skip): Redefine macro to use new types.
2834 (align_loops_value): New macro.
2835 (align_jumps_value): New macro.
2836 (align_labels_value): New macro.
2837 (align_functions_value): New macro.
2838 * function.c (invoke_set_current_function_hook): Propagate
2839 alignment values from flags to global variables default in
2841 * ipa-icf.c (sem_function::equals_wpa): Use
2842 cl_optimization_option_eq instead of memcmp.
2843 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2845 (cl_optimization_stream_in): Likewise.
2846 * optc-save-gen.awk: Support strings in cl_optimization.
2847 * opth-gen.awk: Likewise.
2848 * opts.c (finish_options): Remove error checking of invalid
2850 (MAX_CODE_ALIGN): Remove.
2851 (MAX_CODE_ALIGN_VALUE): Likewise.
2852 (parse_and_check_align_values): New function.
2853 (check_alignment_argument): Likewise.
2854 (common_handle_option): Use check_alignment_argument.
2855 * opts.h (parse_and_check_align_values): Declare.
2856 * toplev.c (init_alignments): Remove.
2857 (read_log_maxskip): New.
2858 (parse_N_M): Likewise.
2859 (parse_alignment_opts): Likewise.
2860 (backend_init_target): Remove usage of init_alignments.
2861 * toplev.h (parse_alignment_opts): Declare.
2862 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2864 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2865 * tree.c (cl_option_hasher::equal): New.
2866 * varasm.c: Use new global macros.
2868 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2870 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2871 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2872 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2873 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2874 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2875 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2876 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2877 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2878 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2879 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2880 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2881 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2882 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2884 2018-07-04 Martin Liska <mliska@suse.cz>
2885 Jonathan Wakely <jwakely@redhat.com>
2887 * coverage.c: Use correct type.
2888 * doc/invoke.texi: Language correction.
2890 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2893 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2894 ENDBRANCH for non-tail call which may return via indirect branch.
2895 * doc/extend.texi: Document indirect_return attribute.
2897 2018-07-03 Martin Sebor <msebor@redhat.com>
2899 PR tree-optimization/86274
2900 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2902 (format_floating): Correct handling of infinities and NaNs.
2904 2018-07-03 Martin Sebor <msebor@redhat.com>
2906 * print-tree.c (print_real_cst): New function.
2907 (print_node_brief): Call it.
2908 (print_node): Ditto.
2910 2018-07-03 Jeff Law <law@redhat.com>
2912 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2913 into a single pattern.
2915 * config/h8300/h8300.md (ors code_iterator): New.
2916 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2917 a single pattern and single splitter.
2918 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2919 (iorqi3_1, xorqi3_1): Likewise.
2920 (iorqi3, xorqi3 expanders): Similarly.
2922 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2923 (movmd_internal) into a single pattern using the P mode iterator.
2924 (movmd splitters): Similarly.
2925 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2926 (movsd splitters): Similarly.
2928 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2929 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2930 right table based on the size of the operand.
2931 * config/h8300/h8300.md (length_table): Corresponding changes. All
2932 references to "addb", "addw" and "addl" changed to "add".
2933 (btst patterns): Merge two variants into a single pattern.
2934 (tstqi, tsthi): Likewise.
2935 (addhi3_incdec, addsi3_incdec): Likewise.
2936 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2937 (mulhi3, mulsi3): Likewise.
2938 (udivhi3, udivsi3): Likewise.
2939 (divhi3, divsi3): Likewise.
2940 (andorqi3, andorhi3, andorsi3): Likewise.
2942 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2945 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2946 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2948 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2950 PR tree-optimization/85694
2951 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2952 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2954 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2955 (<u>avg<mode>3_ceil): New patterns.
2957 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2959 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2960 scan-tree-dump directive.
2961 * gcc.dg/vect/slp-perm-2.c: Likewise.
2962 * gcc.dg/vect/slp-perm-3.c: Likewise.
2963 * gcc.dg/vect/slp-perm-5.c: Likewise.
2964 * gcc.dg/vect/slp-perm-6.c: Likewise.
2965 * gcc.dg/vect/slp-perm-7.c: Likewise.
2966 * gcc.dg/vect/slp-perm-8.c: Likewise.
2968 2018-07-03 Marek Polacek <polacek@redhat.com>
2971 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2973 2018-07-03 Richard Biener <rguenther@suse.de>
2976 * tree-ssa-structalias.c (find_func_clobbers): Properly
2977 handle indirect calls.
2979 2018-07-03 Jeff Law <law@redhat.com>
2981 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2982 (shifts): New code iterator.
2983 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2984 expander. Fix HImode handling on H8/SX.
2985 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2986 (subqi3, subhi3, subsi3 expanders): Likewise.
2987 (andqi3, andhi3, andsi3 expanders): Likewise.
2988 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2989 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2990 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2991 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2992 (zero_extendqihi2, zero_extendqisi2): Likewise.
2993 (extendqihi2, extendqisi2): Likewise.
2994 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2995 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2996 (rotlqi3_1, rotlhi3_1): Likewise.
2997 (logicalhi3_sn, logicalsi3_sn): Likewise.
2998 (logicalhi3, logicalsi3): Likewise.
3000 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3002 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3003 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3004 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3005 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3006 type to append_pattern_def_seq instead of creating a stmt_vec_info
3008 (build_mask_conversion): Likewise. Remove vinfo argument.
3009 (vect_add_conversion_to_patterm): Likewise, renaming to...
3010 (vect_add_conversion_to_pattern): ...this.
3011 (vect_recog_mask_conversion_pattern): Update call to
3012 build_mask_conversion. Pass the vector type to
3013 append_pattern_def_seq here too.
3014 (vect_recog_gather_scatter_pattern): Update call to
3015 vect_add_conversion_to_pattern.
3017 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3019 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3020 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3021 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3022 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3023 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3024 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3025 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3026 append_pattern_def_seq instead of new_pattern_def_seq.
3027 (vect_recog_divmod_pattern): Do both of the above.
3028 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3031 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3033 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3034 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3035 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3036 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3037 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3038 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3039 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3040 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3041 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3042 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3043 parameter with a single stmt_vec_info.
3044 (vect_recog_func_ptr): Likewise.
3045 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3046 (vect_try_gather_scatter_pattern): ...this.
3047 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3048 the stmt_vec_info of the statement to be matched. Don't clear
3049 STMT_VINFO_RELATED_STMT.
3050 (vect_pattern_recog): Update call accordingly.
3052 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3054 PR tree-optimization/85694
3055 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3056 (uavgM3_ceil): Document new optabs.
3057 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3058 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3060 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3061 (savg_ceil_optab): New optabs.
3062 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3063 (vect_vect_recog_func_ptrs): Add it.
3064 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3065 constant directly from the associated lhs.
3067 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3069 * tree-vect-patterns.c (vect_split_statement): New function.
3070 (vect_convert_input): Use it to try to split an existing cast.
3072 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3074 * poly-int.h (print_hex): New function.
3075 * dumpfile.h (dump_dec, dump_hex): Declare.
3076 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3077 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3078 min_input_precision, operation_precision and operation_sign.
3079 * tree-vect-patterns.c (vect_get_range_info): New function.
3080 (vect_same_loop_or_bb_p, vect_single_imm_use)
3081 (vect_operation_fits_smaller_type): Delete.
3082 (vect_look_through_possible_promotion): Add an optional
3083 single_use_p parameter.
3084 (vect_recog_over_widening_pattern): Rewrite to use new
3085 stmt_vec_info infomration. Handle one operation at a time.
3086 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3087 (vect_truncatable_operation_p, vect_set_operation_type)
3088 (vect_set_min_input_precision): New functions.
3089 (vect_determine_min_output_precision_1): Likewise.
3090 (vect_determine_min_output_precision): Likewise.
3091 (vect_determine_precisions_from_range): Likewise.
3092 (vect_determine_precisions_from_users): Likewise.
3093 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3094 (vect_vect_recog_func_ptrs): Put over_widening first.
3096 (vect_pattern_recog): Call vect_determine_precisions.
3098 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3100 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3101 statements that have been replaced by further pattern statements.
3102 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3104 2018-07-03 Richard Biener <rguenther@suse.de>
3106 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3107 always set *dt. Dump vectype in vectype overload.
3108 * dumpfile.h (dump_gimple_expr): New function.
3109 (dump_gimple_expr_loc): Likewise.
3110 * dumpfile.c (dump_gimple_expr): New function.
3111 (dump_gimple_expr_loc): Likewise.
3113 2018-07-02 Jeff Law <law@redhat.com>
3115 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3116 the H8/300, H8/300H and H8/S variants into a single pattern.
3117 (movhi_h8300, movqi_h8300hs): Similarly.
3118 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3119 (QHI mode iterator): New.
3121 * config/h8300/h8300.md: Remove trailing whitespace.
3123 2018-07-02 Jim Wilson <jimw@sifive.com>
3125 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3126 instead of emit_insn for interrupt returns.
3127 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3128 (riscv_sret, riscv_uret): Likewise.
3130 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3132 * pretty-print.c (selftest::test_pp_format): Move save and restore
3133 of quotes to class auto_fix_quotes, and add an instance.
3134 * selftest.c: Include "intl.h".
3135 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3136 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3137 * selftest.h (selftest::auto_fix_quotes): New class.
3139 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3141 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3142 (aarch64_sve_prepare_conditional_op): Remove.
3143 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3144 Allow aarch64_simd_reg_or_zero as select operand; remove
3145 the aarch64_sve_prepare_conditional_op call.
3146 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3147 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3148 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3149 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3150 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3151 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3152 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3153 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3154 and a splitters to match all of the *_any patterns.
3155 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3157 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3158 (SVE_COND_FP_BINARY_REV): Remove.
3159 (sve_int_op_rev, sve_fp_op_rev): New.
3160 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3161 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3162 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3163 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3164 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3165 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3166 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3167 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3168 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3170 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3171 Remove match_dup 1 from the inner unspec.
3172 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3174 * config/aarch64/aarch64.md (movprfx): New attr.
3175 (length): Default movprfx to 8.
3176 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3177 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3178 (*<su>mul<SVE_I>3_highpart): Likewise.
3179 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3180 (*v<ASHIFT><SVE_I>3): Likewise.
3181 (*<su><MAXMIN><SVE_I>3): Likewise.
3182 (*<su><MAXMIN><SVE_F>3): Likewise.
3183 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3184 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3185 (*div<SVE_F>4): Likewise.
3187 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3189 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3192 2018-07-02 Richard Biener <rguenther@suse.de>
3194 PR tree-optimization/86363
3195 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3196 memset argument refers to a non-variable address.
3198 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3200 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3201 {PLUS,MINUS}_EXPR code to...
3202 (adjust_symbolic_bound): ...here,
3203 (combine_bound): ...here,
3204 (set_value_range_with_overflow): ...and here.
3206 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3208 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3210 (extract_range_from_abs_expr): ...here.
3212 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3214 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3215 -fno-omit-frame-pointer when not optimizing.
3217 2018-07-02 Martin Liska <mliska@suse.cz>
3220 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3221 (propagate_nothrow): Likewise.
3223 2018-07-02 Martin Liska <mliska@suse.cz>
3226 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3228 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3230 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3231 function in r262149, changing "loc" param from source_location to
3232 const dump_location_t &.
3233 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3234 declaration, as above.
3236 2018-07-01 Paul Koning <ni1d@arrl.net>
3238 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3239 -munit-asm, -mgnu-asm, -mdec-asm.
3240 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3241 (pdp11_output_labelref): New.
3242 (pdp11_output_def): New.
3243 (pdp11_output_addr_vec_elt): New.
3244 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3245 %# and %@ format codes.
3246 (pdp11_option_override): New.
3247 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3248 (pdp11_output_ident): New.
3249 (pdp11_asm_named_section): New.
3250 (pdp11_asm_init_sections): New.
3251 (pdp11_file_start): New.
3252 (pdp11_file_end): New.
3253 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3254 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3255 %o, like %c but octal.
3256 (pdp11_option_override): New.
3257 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3259 (DATA_SECTION_ASM_OP): Ditto.
3260 (READONLY_DATA_SECTION_ASM_OP): New.
3261 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3262 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3263 (ASM_OUTPUT_LABELREF): Ditto.
3264 (ASM_OUTPUT_DEF): Ditto.
3265 (ASM_OUTPUT_EXTERNAL): New.
3266 (ASM_OUTPUT_SOURCE_FILENAME): New.
3267 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3268 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3269 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3270 %# and %@ format codes.
3271 * config/pdp11/pdp11.opt (mgnu-asm): New.
3272 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3273 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3274 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3276 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3278 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3279 dereferencing path[] beyond its length.
3281 (debug_all_paths): New.
3282 (rewire_first_differing_edge): New.
3283 (adjust_paths_after_duplication): New.
3284 (duplicate_thread_path): Call adjust_paths_after_duplication.
3286 (thread_through_all_blocks): Add new argument to
3287 duplicate_thread_path.
3289 2018-06-30 Jim Wilson <jimw@sifive.com>
3291 * config/riscv/predicates.md (p2m1_shift_operand): New.
3292 (high_mask_shift_operand): New.
3293 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3294 pattern using p2m1_shift_operand.
3295 (lshsi3_zero_extend_3+2): New combiner pattern using
3296 high_mask_shift_operand.
3298 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3300 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3302 (vect_recog_rotate_pattern): ...here.
3303 (vect_convert_input): Try to insert casts of invariants in the
3305 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3306 preheader to be empty.
3308 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3310 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3311 vector type. If given, install it in the new statement's
3313 (vect_element_precision): New function.
3314 (vect_unpromoted_value): New struct.
3315 (vect_unpromoted_value::vect_unpromoted_value): New function.
3316 (vect_unpromoted_value::set_op): Likewise.
3317 (vect_look_through_possible_promotion): Likewise.
3318 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3319 (vect_widened_op_tree, vect_convert_input): Likewise.
3320 (vect_convert_inputs, vect_convert_output): Likewise.
3321 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3322 to handle the optional cast of the multiplication result and
3323 vect_widened_op_tree to detect the widened multiplication itself.
3324 Do not require the input and output of promotion casts to have
3325 the same sign, but base the signedness of the operation on the
3326 input rather than the result. If the pattern includes two
3327 promotions, check that those promotions have the same sign.
3328 Do not restrict the MULT_EXPR handling to a double-width result;
3329 handle quadruple-width results and wider. Use vect_convert_inputs
3330 to convert the inputs to the common type.
3331 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3332 to handle the optional cast of the ABS result. Also allow a sign
3333 change or a sign extension between the ABS and MINUS.
3334 Use vect_widened_op_tree to detect the widened subtraction and use
3335 vect_convert_inputs to convert the inputs to the common type.
3336 (vect_handle_widen_op_by_const): Delete.
3337 (vect_recog_widen_op_pattern): New function.
3338 (vect_recog_widen_mult_pattern): Use it.
3339 (vect_recog_widen_shift_pattern): Likewise.
3340 (vect_recog_widen_sum_pattern): Use
3341 vect_look_through_possible_promotion to handle the promoted
3344 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3346 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3347 the containing gimple_seq *.
3348 * gimple-iterator.h (gsi_for_stmt): Declare it.
3349 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3350 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3351 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3352 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3353 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3355 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3357 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3358 statement being replaced is part of an existing pattern
3359 definition sequence, inserting the new pattern statements before
3361 (vect_pattern_recog_1): Don't return a bool. If the statement
3362 is already part of a pattern, instead apply pattern matching
3363 to the pattern definition statements. Don't clear the
3364 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3365 (vect_pattern_recog): Don't break after the first match;
3366 continue processing the pattern definition statements instead.
3367 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3369 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3371 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3372 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3373 (vect_recog_widen_sum_pattern): Use it.
3375 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3377 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3378 phi is not a pattern statement and has not been replaced by
3379 a pattern statement.
3380 * tree-vect-patterns.c (type_conversion_p): Don't check
3381 STMT_VINFO_IN_PATTERN_P.
3382 (vect_recog_vector_vector_shift_pattern): Likewise.
3383 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3384 the pattern statement rather than the original statement; check
3385 directly for a WIDEN_MULT_EXPR here.
3386 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3387 vect_is_simple_use to return the pattern statement rather
3388 than the original statement; use is_pattern_stmt_p to check
3389 for such a pattern statement.
3390 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3391 to return the pattern statement rather than the original statement;
3392 don't do the same transformation here.
3393 (vect_is_simple_use): If the defining statement has been replaced
3394 by a pattern statement, return the pattern statement instead.
3395 Remove the corresponding (local) transformation from the vectype
3398 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3400 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3401 end and default to null.
3402 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3403 (vectorizable_reduction): Update calls accordingly, dropping the
3404 gimple ** argument if the passed-back statement isn't needed.
3405 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3406 (vect_recog_rotate_pattern): Likewise.
3407 (vect_recog_mask_conversion_pattern): Likewise.
3408 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3409 (vect_mask_constant_operand_p): Likewise.
3410 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3411 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3412 (get_group_load_store_type, get_load_store_type): Likewise.
3413 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3414 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3415 (vectorizable_conversion, vectorizable_assignment): Likewise.
3416 (vectorizable_shift, vectorizable_operation): Likewise.
3417 (vectorizable_store, vect_is_simple_cond): Likewise.
3418 (vectorizable_condition, vectorizable_comparison): Likewise.
3419 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3420 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3421 and move it to the end. Cope with null def_stmt_outs.
3423 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3425 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3427 2018-06-29 Jeff Law <law@redhat.com>
3429 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3430 displacements for TARGET_V850E2V3 and newer.
3431 (TARGET_LRA_P): Remove. Defaults to LRA now.
3432 * config/v850/v850.md (sign23byte_load): Remove.
3433 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3434 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3436 2018-06-29 Martin Liska <mliska@suse.cz>
3439 * coverage.c (coverage_init): Mangle full path name.
3440 * doc/invoke.texi: Document the change.
3441 * gcov-io.c (mangle_path): New.
3442 * gcov-io.h (mangle_path): Likewise.
3443 * gcov.c (mangle_name): Use mangle_path for path mangling.
3445 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3447 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3448 if starting source register is not even.
3450 2018-06-29 Martin Liska <mliska@suse.cz>
3452 PR tree-optimization/86263
3453 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3454 Make edge redirection.
3456 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3458 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3459 (dump_scope_depth): New variable.
3460 (get_dump_scope_depth): New function.
3461 (dump_begin_scope): New function.
3462 (dump_end_scope): New function.
3463 * dumpfile.h (get_dump_scope_depth): New declaration.
3464 (dump_begin_scope): New declaration.
3465 (dump_end_scope): New declaration.
3466 (class auto_dump_scope): New class.
3467 (AUTO_DUMP_SCOPE): New macro.
3468 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3471 2018-06-29 Richard Biener <rguenther@suse.de>
3473 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3474 compute_all_dependences succeeds.
3475 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3476 exceed --param loop-max-datarefs-for-datadeps.
3478 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3480 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3482 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3485 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3486 alternative 0 in preferred_for_speed attribute.
3488 2018-06-28 Paul Koning <ni1d@arrl.net>
3490 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3491 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3492 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3493 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3494 for shift insn patterns.
3496 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3498 * cgraph.c (cgraph_node::get_body): Replace assignments to
3499 "dump_file" with calls to set_dump_file.
3500 * dumpfile.c (alt_dump_file): Make static, and group with...
3501 (alt_flags): ...this definition.
3502 (dumps_are_enabled): New variable.
3503 (refresh_dumps_are_enabled): New function.
3504 (set_dump_file): New function.
3505 (set_alt_dump_file): New function.
3506 (gcc::dump_manager::dump_start): Replace assignments to
3507 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3509 (gcc::dump_manager::dump_finish): Likewise.
3510 * dumpfile.h (alt_dump_file): Delete decl.
3511 (dumps_are_enabled): New variable decl.
3512 (set_dump_file): New function decl.
3513 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3515 * tree-nested.c (lower_nested_functions): Replace assignments to
3516 "dump_file" with calls to set_dump_file.
3518 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3520 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3521 goto_locus of each outgoing edge of each basic block.
3523 2018-06-28 Richard Biener <rguenther@suse.de>
3525 * dwarf2out.c (decl_scope_table): Remove.
3526 (push_decl_scope): Likewise.
3527 (pop_decl_scope): Likewise.
3528 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3529 (gen_struct_or_union_type_die): Likewise.
3530 (gen_tagged_type_die): Likewise.
3531 (dwarf2out_init): Do not initialize decl_scope_table.
3532 (dwarf2out_c_finalize): Do not free it.
3534 2018-06-28 Richard Biener <rguenther@suse.de>
3536 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3537 deciding whether to not re-use a DIE.
3539 2018-06-28 Richard Biener <rguenther@suse.de>
3541 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3542 DW_AT_abstract_origin attribute.
3544 2018-06-28 Martin Liska <mliska@suse.cz>
3546 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3547 Use newly introduced constants.
3548 * tree-switch-conversion.h (struct jump_table_cluster):
3549 Define max_ratio_for_size and max_ratio_for_speed.
3551 2018-06-28 Martin Liska <mliska@suse.cz>
3553 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3554 Add new checking assert to catch invalid state.
3555 (jump_table_cluster::can_be_handled): Handle single case
3557 (jump_table_cluster::is_beneficial): Bail out for such case.
3558 (bit_test_cluster::find_bit_tests):
3559 Add new checking assert to catch invalid state.
3560 (bit_test_cluster::can_be_handled): Handle single case
3562 (bit_test_cluster::is_beneficial): Bail out for such case.
3563 (switch_decision_tree::analyze_switch_statement):
3566 2018-06-28 Martin Liska <mliska@suse.cz>
3568 * common.opt: Introduce -completion option.
3569 * gcc.c (driver_handle_option): Handle it.
3570 (driver::main): Print completions if completion
3572 * opt-suggestions.c (option_proposer::get_completions):
3574 (option_proposer::suggest_completion): Likewise.
3575 (option_proposer::find_param_completions): Likewise.
3576 (verify_autocompletions): Likewise.
3577 (test_completion_valid_options): Likewise.
3578 (test_completion_valid_params): Likewise.
3579 (in_completion_p): Likewise.
3580 (empty_completion_p): Likewise.
3581 (test_completion_partial_match): Likewise.
3582 (test_completion_garbage): Likewise.
3583 (opt_proposer_c_tests): Likewise.
3584 * opt-suggestions.h: Declare new functions.
3585 * opts.c (common_handle_option): Handle OPT__completion_.
3586 * selftest-run-tests.c (selftest::run_tests): Add
3587 opt_proposer_c_tests.
3588 * selftest.c (assert_str_startswith): New.
3589 * selftest.h (assert_str_startswith): Likewise.
3590 (opt_proposer_c_tests): New.
3591 (ASSERT_STR_STARTSWITH): Likewise.
3593 2018-06-28 Martin Liska <mliska@suse.cz>
3595 * Makefile.in: Add opt-suggestions.o.
3596 * gcc-main.c: Include opt-suggestions.h.
3597 * gcc.c (driver::driver): Likewise.
3598 (driver::~driver): Remove m_option_suggestions.
3599 (driver::build_option_suggestions): Moved to option_proposer.
3600 (driver::suggest_option): Likewise.
3601 (driver::handle_unrecognized_options): Use option_proposer.
3602 * gcc.h (class driver): Add new memver m_option_proposer.
3603 * opt-suggestions.c: New file.
3604 * opt-suggestions.h: New file.
3606 2018-06-28 Martin Liska <mliska@suse.cz>
3608 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3609 (auto_string_vec::~auto_string_vec): Likewise.
3611 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3613 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3614 prevent_decl_creation_for_types fields up and add reset_location field.
3615 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3616 statement if id->reset_location is true.
3617 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3618 id->reset_location is true.
3619 (copy_phis_for_bb): Force input_location on the arguments if
3620 id->reset_location is true.
3621 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3622 is set on the function to be inlined.
3624 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3626 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3628 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3630 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3631 registers for Pmode.
3632 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3633 hard registers for the clobbered pseudo.
3635 2018-06-27 Paul Koning <ni1d@arrl.net>
3637 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3638 mutually exclusive options.
3639 * config/pdp11/constraints.md (h): New constraint.
3640 (O): Update definition to match shift code generation.
3641 (D): New constraint.
3642 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3644 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3646 (output_jump): Change arguments.
3647 (pdp11_fixed_cc_regs): New function.
3648 (pdp11_cc_mode): Ditto.
3649 (pdp11_expand_shift): Ditto.
3650 (pdp11_assemble_shift): Ditto.
3651 (pdp11_small_shift): Ditto.
3652 (pdp11_branch_cost): Remove.
3653 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3655 (pdp11_register_move_cost): Update for CC registers.
3656 (pdp11_rtx_costs): Add case for LSHIFTRT.
3657 (pdp11_output_jump): Add CCNZ mode conditional branches.
3658 (notice_update_cc_on_set): Remove.
3659 (pdp11_cc_mode): New function.
3660 (simple_memory_operand): Correct pre/post decrement case.
3661 (no_side_effect_operand): New function.
3662 (pdp11_regno_reg_class): Add CC_REGS class.
3663 (pdp11_fixed_cc_regs): New function.
3664 (pdp11_small_shift): New function.
3665 (pdp11_expand_shift): New function to expand shift insns.
3666 (pdp11_assemble_shift): New function to output shifts.
3667 (pdp11_branch_cost): Remove.
3668 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3669 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3670 (WCHAR_TYPE): Ditto.
3671 (PTRDIFF_TYPE): Ditto.
3672 (ADJUST_INSN_LENGTH): New macro.
3673 (FIXED_REGISTERS): Add CC registers.
3674 (CALL_USED_REGISTERS): Ditto.
3676 (REG_CLASS_NAMES): Ditto.
3677 (REG_CLASS_CONTENTS): Ditto.
3678 (SELECT_CC_MODE): Use new function.
3679 (TARGET_FLAGS_REGNUM): New macro.
3680 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3681 (cc0_reg_rtx): Remove.
3682 (CC_STATUS_MDEP): Remove.
3683 (CC_STATUS_MDEFP_INIT): Remove.
3684 (CC_IN_FPU): Remove.
3685 (NOTICE_UPDATE_CC): Remove.
3686 (REGISTER_NAMES): Add CC registers.
3687 (BRANCH_COST): Change to constant 1.
3688 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3690 * config/pdp11/pdp11.opt (mbcopy): Remove.
3691 (mbcopy-builtin): Remove.
3692 (mbranch-cheap): Remove.
3693 (mbranch-expensive): Remove.
3694 * config/pdp11/predicates.md (expand_shift_operand): Update to
3695 match shift code generation.
3696 (ccnz_operator): New predicate.
3697 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3698 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3699 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3701 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3702 description of O constraint.
3704 2018-06-27 Jeff Law <law@redhat.com>
3705 Austin Law <austinklaw@gmail.com>
3707 * config/v850/v850.md (addsi3_set_flags): New pattern.
3708 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3709 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3710 (zero_extendhisi2_v850_set_flags): Likewise.
3711 (zero_extendqisi2_v850_set_flags): Likewise.
3712 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3713 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3714 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3716 * config/v850/v850-protos.h (notice_update_cc): Remove.
3717 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3718 (v850_print_operand): Handle 'D' and "d".
3719 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3720 Add handling of arithmetic/logical operations compared against zero.
3721 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3722 Do not look at v850_compare_op, instead get mode from last argument.
3723 (v850_gen_compare): Remove
3724 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3725 after reload for prologue insns.
3726 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3728 (construct_save_jarl): Likewise.
3729 (TARGET_FLAGS_REGNUM): Define.
3730 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3731 (NOTICE_UPDATE_CC): Remove.
3732 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3733 than cc0. Conditionalize on reload_completed.
3734 (cmpsi_insn, setfcc_insn): Likewise.
3735 (tst1 splitter): Turn into define_and_split which sets the flags
3737 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3738 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3739 (cstoresf4, cstoredf4): Clobber the flags.
3740 (cmpsi, cmpsf, cmpdf): Remove expanders.
3741 (setf_insn): Remove pattern.
3742 (addsi3): Turn into define_and_split which clobbers the flags after
3743 reload and a suitable pattern (addsi3_clobber_flags) for use after
3745 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3746 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3747 (ashrsi3, ashrsi3_v850e2): Likewise.
3748 (bins): Clobber the flags.
3749 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3750 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3751 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3752 (call_value_internal_short, call_value_internal_long): Likewise.
3753 (callt_save_interrupt, callt_return_interrupt): Likewise.
3754 (save_interrupt, return_interrupt): Likewise.
3755 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3756 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3757 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3758 (All FP comparisons): Only allow after reload has completed.
3760 (divh, divhu): Tweak output template.
3761 (branch_z_normal, branch_z_invert): Remove
3762 (branch_nz_normal, branch_nz_invert): Likewise.
3763 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3765 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3766 * config/v850/v850.c (notice_update_cc): Remove.
3767 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3768 (CC_NO_CARRY): Likewise.
3769 (NOTICE_UPDATE_CC): Define to nothing.
3770 * config/v850/v850.md: Remove block comment on cc0 handling
3771 Remove "cc" attribute from all patterns. Remove cc_status handling
3772 from all patterns. Minor formatting fixes.
3774 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3776 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3777 (cortex-a76.cortex-a55): Likewise.
3778 * config/aarch64/aarch64-tune.md: Regenerate.
3779 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3780 cortex-a76.cortex-a55.
3782 2018-06-27 Jeff Law <law@redhat.com>
3784 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3785 (MULTILIB_DIRNAMES): Similarly.
3787 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3789 * gimple.h (gimple_return_retbnd): Delete.
3790 (gimple_return_set_retbnd): Likewise.
3791 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3792 gimple_return_set_retbnd.
3793 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3794 gimple_return_retbnd and adjust.
3795 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3796 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3797 Explicitly return NULL in a couple more cases. Move assertion
3798 on debug statements and remove unreachable code.
3799 (reset_debug_binding): Do not test id->retbnd.
3800 (expand_call_inline): Do not set it.
3802 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3804 * configure.ac: Add --disable-gcov option.
3805 * configure: Regenerate.
3806 * Makefile.in: Honour @enable_gcov@.
3807 * doc/install.texi: Document --disable-gcov.
3809 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3811 * config/arm/arm-cpus.in (cortex-a76): New entry.
3812 (cortex-a76.cortex-a55): Likewise.
3813 * config/arm/arm-tables.opt: Regenerate.
3814 * config/arm/arm-tune.md: Likewise.
3815 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3816 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3817 cortex-a76.cortex-a55.
3819 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3822 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3824 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3826 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3828 (EPILOGUE_USES): Likewise.
3830 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3832 * tree-inline.c (remap_location): New function extracted from...
3833 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3834 (copy_phis_for_bb): ...here. Call remap_location.
3835 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3837 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3839 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3840 unaligned vsx for 16B memset.
3842 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3845 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3846 ieee128_float_type_node to long_double_type_node unless
3847 TARGET_LONG_DOUBLE_128 is set.
3849 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3851 * cfgloop.c (get_loop_location): Convert return type from
3852 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3853 by implicit construction from rtx_insn *, and using
3854 dump_user_location_t::from_function_decl for the fallback case.
3855 * cfgloop.h (get_loop_location): Convert return type from
3856 location_t to dump_user_location_t.
3857 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3858 dump_printf_loc to pass in a dump_location_t rather than a
3859 location_t, via the gimple stmt.
3860 * coverage.c (get_coverage_counts): Update calls to
3861 dump_printf_loc to pass in dump_location_t rather than a
3863 * doc/optinfo.texi (Dump types): Convert example of
3864 dump_printf_loc from taking "locus" to taking "insn". Update
3865 description of the "_loc" calls to cover dump_location_t.
3866 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3868 (dump_user_location_t::dump_user_location_t): New constructors,
3869 from gimple *stmt and rtx_insn *.
3870 (dump_user_location_t::from_function_decl): New function.
3871 (dump_loc): Make static.
3872 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3873 const dump_location_t &.
3874 (dump_generic_expr_loc): Delete.
3875 (dump_printf_loc): Convert param "loc" from location_t to
3876 const dump_location_t &.
3877 (selftest::test_impl_location): New function.
3878 (selftest::dumpfile_c_tests): New function.
3879 * dumpfile.h: Include "profile-count.h".
3880 (class dump_user_location_t): New class.
3881 (struct dump_impl_location_t): New struct.
3882 (class dump_location_t): New class.
3883 (dump_printf_loc): Convert 2nd param from source_location to
3884 const dump_location_t &.
3885 (dump_generic_expr_loc): Delete.
3886 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3887 const dump_location_t &.
3888 * gimple-fold.c (fold_gimple_assign): Update call to
3889 dump_printf_loc to pass in a dump_location_t rather than a
3890 location_t, via the gimple stmt.
3891 (gimple_fold_call): Likewise.
3892 * gimple-loop-interchange.cc
3893 (loop_cand::analyze_iloop_reduction_var): Update for change to
3894 check_reduction_path.
3895 (tree_loop_interchange::interchange): Update for change to
3897 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3898 change in return-type of find_loop_location.
3899 (graphite_regenerate_ast_isl): Likewise.
3900 * graphite-optimize-isl.c (optimize_isl): Likewise.
3901 * graphite.c (graphite_transform_loops): Likewise.
3902 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3903 pass in a dump_location_t rather than a location_t, via the
3905 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3906 * ipa.c (walk_polymorphic_call_targets): Likewise.
3907 * loop-unroll.c (report_unroll): Convert "locus" param from
3908 location_t to dump_location_t.
3909 (decide_unrolling): Update for change to get_loop_location's
3911 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3912 location_t to dump_user_location_t.
3913 (grid_find_single_omp_among_assignments_1): Updates calls to
3914 dump_printf_loc to pass in a dump_location_t rather than a
3915 location_t, via the gimple stmt.
3916 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3917 location_t to dump_location_t. Updates calls to dump_printf_loc
3918 to pass in a dump_location_t rather than a location_t, via the
3920 (grid_inner_loop_gridifiable_p): Likewise.
3921 (grid_dist_follows_simple_pattern): Likewise.
3922 (grid_gfor_follows_tiling_pattern): Likewise.
3923 (grid_target_follows_gridifiable_pattern): Likewise.
3924 (grid_attempt_target_gridification): Convert initialization
3925 of local "grid" from memset to zero-initialization; FIXME: does
3926 this require C++11? Update call to dump_printf_loc to pass in a
3927 optinfo_location rather than a location_t, via the gimple stmt.
3928 * profile.c (read_profile_edge_counts): Updates call to
3929 dump_printf_loc to pass in a dump_location_t rather than a
3931 (compute_branch_probabilities): Likewise.
3932 * selftest-run-tests.c (selftest::run_tests): Call
3934 * selftest.h (dumpfile_c_tests): New decl.
3935 * tree-loop-distribution.c (pass_loop_distribution::execute):
3936 Update for change in return type of find_loop_location.
3937 * tree-parloops.c (parallelize_loops): Likewise.
3938 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3939 "locus" from location_t to dump_user_location_t.
3940 (canonicalize_loop_induction_variables): Likewise.
3941 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3942 for change in return type of find_loop_location.
3943 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3944 to dump_printf_loc to pass in a dump_location_t rather than a
3945 location_t, via the stmt.
3946 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3948 * tree-vect-loop-manip.c (find_loop_location): Convert return
3949 type from source_location to dump_user_location_t.
3950 (vect_do_peeling): Update for above change.
3951 (vect_loop_versioning): Update for change in type of
3953 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3954 from location_t to dump_user_location_t.
3955 (vect_estimate_min_profitable_iters): Update for change in type
3957 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3958 location_t to dump_location_t.
3959 (vect_slp_bb): Update for change in type of vect_location.
3960 * tree-vectorizer.c (vect_location): Convert from source_location
3961 to dump_user_location_t.
3962 (try_vectorize_loop_1): Update for change in vect_location's type.
3963 (vectorize_loops): Likewise.
3964 (increase_alignment): Likewise.
3965 * tree-vectorizer.h (vect_location): Convert from source_location
3966 to dump_user_location_t.
3967 (find_loop_location): Convert return type from source_location to
3968 dump_user_location_t.
3969 (check_reduction_path): Convert 1st param from location_t to
3970 dump_user_location_t.
3971 * value-prof.c (check_counter): Update call to dump_printf_loc to
3972 pass in a dump_user_location_t rather than a location_t; update
3973 call to error_at for change in type of "locus".
3974 (check_ic_target): Update call to dump_printf_loc to
3975 pass in a dump_user_location_t rather than a location_t, via the
3978 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3980 * config/s390/s390.h (enum processor_flags): Do not use
3981 default tune parameter when -march was specified.
3983 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3986 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3987 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3990 2018-06-26 Richard Biener <rguenther@suse.de>
3992 PR tree-optimization/86287
3994 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3995 (vect_analyze_loop): Initialize n_stmts.
3997 2018-06-26 Richard Biener <rguenther@suse.de>
4000 * fold-const.c (fold_convertible_p): Pointer extension
4003 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4006 * dwarf2out.c (loc_list_has_views): Adjust comments.
4007 (dw_loc_list): Split single cross-partition range with
4010 2018-06-25 Jeff Law <law@redhat.com>
4012 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4013 on -mbig-switch by default.
4015 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4017 (const_float_0_operand): Remove unused predicate.
4018 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4019 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4020 (recipsf2): New expander. Original pattern now called
4022 (recipdf2, recipdf2_insn): Similarly.
4023 (rsqrtsf2, rsqrtsf2_insn): Similarly
4024 (rsqrtdf2, rsqrtdf2_insn): Similarly
4026 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4028 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4029 Simplify logic for FreeBSD (twice).
4031 2018-06-25 Martin Sebor <msebor@redhat.com>
4033 PR tree-optimization/86204
4034 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4035 a strnlen result if it's less than the length of the string.
4037 2018-06-25 Martin Sebor <msebor@redhat.com>
4039 PR tree-optimization/85700
4040 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4041 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4042 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4044 2018-06-25 Martin Sebor <msebor@redhat.com>
4046 * doc/extend.texi (Zero-length arrays): Update and clarify.
4048 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4050 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4051 added IEEE/IBM long double multilib support on PowerPC little
4052 endian Linux systems.
4053 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4054 (MULTILIB_DEFAULTS): Likewise.
4055 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4057 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4058 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4059 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4061 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4064 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4065 (REORDER_45): Likewise.
4067 2018-06-25 Jeff Law <law@redhat.com>
4069 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4070 dividend to 32 bits. Adjust length.
4071 (udivmodhi4): Cleanup output template. Fix length.
4073 2018-06-25 Carl Love <cel@us.ibm.com>
4075 * config/rs6000/vsx.md: Change word selector to prefered location.
4077 2018-06-25 Richard Biener <rguenther@suse.de>
4079 PR tree-optimization/86304
4080 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4081 epilogue-if-converted loops as well.
4083 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4085 * lto-section-out.c (lto_begin_section): Do not print section
4086 name for noaddr and unnumbered dumps.
4088 2018-06-25 Richard Biener <rguenther@suse.de>
4090 * tree-vectorizer.h (struct vec_info_shared): New structure
4091 with parts split out from struct vec_info and loop_nest from
4092 struct _loop_vec_info.
4093 (struct vec_info): Adjust accordingly.
4094 (struct _loop_vec_info): Likewise.
4095 (LOOP_VINFO_LOOP_NEST): Adjust.
4096 (LOOP_VINFO_DATAREFS): Likewise.
4097 (LOOP_VINFO_DDRS): Likewise.
4098 (struct _bb_vec_info): Likewise.
4099 (BB_VINFO_DATAREFS): Likewise.
4100 (BB_VINFO_DDRS): Likewise.
4101 (struct _stmt_vec_info): Add dr_aux member.
4102 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4103 (DR_MISALIGNMENT_UNINITIALIZED): New.
4104 (set_dr_misalignment): Adjust.
4105 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4106 (vect_analyze_loop): Adjust prototype.
4107 (vect_analyze_loop_form): Likewise.
4108 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4109 Compute dependences lazily.
4110 (vect_record_base_alignments): Use shared datarefs/ddrs.
4111 (vect_verify_datarefs_alignment): Likewise.
4112 (vect_analyze_data_refs_alignment): Likewise.
4113 (vect_analyze_data_ref_accesses): Likewise.
4114 (vect_analyze_data_refs): Likewise.
4115 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4116 constructor parameter for shared part.
4117 (vect_analyze_loop_form): Pass in shared part and adjust.
4118 (vect_analyze_loop_2): Pass in storage for the number of
4119 stmts. Move loop nest finding to the caller. Compute
4121 (vect_analyze_loop): Pass in shared part.
4122 (vect_transform_loop): Verify shared datarefs are unchanged.
4123 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4124 constructor parameter for shared part.
4125 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4126 (vect_slp_bb): Verify shared datarefs are unchanged before
4128 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4130 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4131 DR_MISALIGNMENT_UNINITIALIZED.
4132 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4133 parameter for shared part.
4134 (vec_info::~vec_info): Adjust.
4135 (vec_info_shared::vec_info_shared): New.
4136 (vec_info_shared::~vec_info_shared): Likewise.
4137 (vec_info_shared::save_datarefs): Likewise.
4138 (vec_info_shared::check_datarefs): Likewise.
4139 (try_vectorize_loop_1): Construct shared part live for analyses
4140 of a single loop for multiple vector sizes.
4141 * tree-parloops.c (gather_scalar_reductions): Adjust.
4143 2018-06-25 Richard Biener <rguenther@suse.de>
4145 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4146 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4147 (vect_analyze_data_refs): Remove similar code from here and
4148 simplify accordingly.
4150 2018-06-25 Richard Biener <rguenther@suse.de>
4152 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4153 for reverse storage order accesses rather than asserting
4154 they cannot happen here.
4156 2018-06-25 Tom de Vries <tdevries@suse.de>
4159 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4160 Use data16 instead of .byte for insn prefix.
4162 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4165 * parser.c (make_char_string_pack): Pass this literal chars
4166 through cpp_interpret_string.
4167 (cp_parser_userdef_numeric_literal): Check the result of
4168 make_char_string_pack.
4170 2018-06-24 Maya Rashish <coypu@sdf.org>
4172 * ginclude/stddef.h: Simplify conditions around avoiding
4173 re-definition of __size_t.
4175 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4177 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4178 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4180 2018-06-22 Maya Rashish <coypu@sdf.org>
4182 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4183 made to OpenBSD and NetBSD through the years.
4185 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4187 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4188 behavior of vec_pack (vector double, vector double) to match
4189 behavior of vec_float2 (vector double, vector double).
4191 2018-06-22 Olivier Hainque <hainque@adacore.com>
4193 * gimplify.c (gimplify_function_tree): Prevent creation
4194 of a trampoline for the address of the current function
4195 passed to entry/exit instrumentation hooks.
4197 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4200 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4203 2018-06-22 Martin Liska <mliska@suse.cz>
4205 PR tree-optimization/86263
4206 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4207 Bail out if is_enabled is false.
4208 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4210 (jump_table_cluster::is_enabled): New function.
4212 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4214 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4215 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4216 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4217 (lto_input_ts_binfo_tree_pointers): Likewise.
4218 * tree-streamer-out.c (streamer_write_tree_bitfields,
4219 write_ts_binfo_tree_pointers): Likewise.
4220 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4222 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4224 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4226 2018-06-22 Martin Liska <mliska@suse.cz>
4228 * symbol-summary.h (get): Make it pure and inline move
4229 functionality from ::get function.
4230 (get): Remove and inline into ::get and ::get_create.
4231 (get_create): Move code from ::get function.
4233 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4236 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4237 -x assembler-with-cpp.
4239 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4241 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4242 _FILE_OFFSET_BITS=64 for C++.
4244 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4246 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4247 conversion insn that shows up when pr85657-3.c is compiled using
4248 IEEE 128-bit long double.
4249 (neg<mode>2_internal): Use the correct mode to check whether the
4250 mode is IBM extended.
4251 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4252 multiply and divide external functions from being created more
4255 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4257 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4259 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4260 the edge can be forwarded.
4261 (cfg_layout_merge_blocks): Likewise.
4263 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4265 * except.c (finish_eh_generation): Commit edge insertions only after
4266 the EH edges have been redirected from post-landing to landing pads.
4268 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4270 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4271 create_tmp_var_for to create the FRAME decl.
4272 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4274 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4276 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4277 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4278 debug statement when resetting its value.
4279 (expand_call_inline): Copy the locus of the call onto the assignment
4280 of the return value, if any. Use local variable in more cases.
4282 2018-06-21 Martin Liska <mliska@suse.cz>
4284 * ipa-pure-const.c (propagate_nothrow): Use
4285 funct_state_summaries->get.
4286 (dump_malloc_lattice): Likewise.
4287 (propagate_malloc): Likewise.
4289 2018-06-21 Richard Biener <rguenther@suse.de>
4291 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4292 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4293 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4295 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4296 BLOCK_ABSTRACT_ORIGIN unconditionally.
4298 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4300 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4302 * ipa-reference.c (ipa_reference_c_finalize): Delete
4303 ipa_ref_opt_sum_summaries and set it to NULL.
4305 2018-06-21 Tom de Vries <tdevries@suse.de>
4307 PR tree-optimization/85859
4308 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4309 test with comment from bb_no_side_effects_p.
4311 2018-06-21 Richard Biener <rguenther@suse.de>
4313 PR tree-optimization/86232
4314 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4315 max for constant niter.
4317 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4319 * config/aarch64/aarch64-simd.md
4320 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4322 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4324 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4325 Make opernads of the unspec commutative.
4327 2018-06-21 Richard Biener <rguenther@suse.de>
4329 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4330 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4331 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4332 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4334 (vect_record_base_alignments): Do not record base alignment
4335 for gathers or scatters.
4336 (vect_compute_data_ref_alignment): Drop return value that is always
4337 true. Bail out early for gathers or scatters.
4338 (vect_enhance_data_refs_alignment): Bail out early for gathers
4340 (vect_find_same_alignment_drs): Likewise.
4341 (vect_analyze_data_refs_alignment): Remove dead code.
4342 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4343 (vect_analyze_data_refs): For possible gathers or scatters do
4344 not create an alternate DR, just check their possible validity
4345 and mark them. Adjust DECL_NONALIASED handling to not rely
4347 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4348 update inits of gathers or scatters.
4349 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4350 Also copy gather/scatter flag to pattern vinfo.
4352 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4354 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4355 behavior of vec_packsu (vector unsigned long long, vector unsigned
4356 long long) to match behavior of vec_packs with same signature.
4358 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4359 Thomas Schwinge <thomas@codesourcery.com>
4360 Cesar Philippidis <cesar@codesourcery.com>
4362 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4363 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4364 (gimplify_adjust_omp_clauses): Likewise.
4365 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4366 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4367 (gimplify_omp_target_update): Update handling of acc update and
4369 * omp-low.c (install_var_field): Remove unused parameter
4370 base_pointers_restrict.
4371 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4372 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4374 (omp_target_base_pointers_restrict_p): Delete.
4375 (scan_omp_target): Update call to scan_sharing_clauses.
4376 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4378 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4379 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4380 (convert_local_omp_clauses): Likewise.
4381 * tree-pretty-print.c (dump_omp_clause): Likewise.
4382 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4384 (omp_clause_code_name): Likewise.
4386 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4389 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4392 PR tree-optimization/86231
4393 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4394 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4396 2018-06-20 Tom de Vries <tdevries@suse.de>
4398 PR tree-optimization/86097
4399 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4400 iv type if signedness of iv type is not the same as that of *nit.
4402 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4404 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4405 EDGE_EH edges, verify they are all EDGE_EH.
4407 2018-06-20 Maya Rashish <coypu@sdf.org>
4409 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4411 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4413 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4414 * config/aarch64/aarch64.c (xgene1_tunings): Add
4415 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4416 (aarch64_mode_valid_for_sched_fusion_p):
4417 Allow 16-byte modes.
4418 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4419 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4421 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4423 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4424 * config/aarch64/iterators.md (VQ2): New mode iterator.
4426 2018-06-20 Martin Liska <mliska@suse.cz>
4428 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4429 Change default ratio from 10 to 8.
4431 2018-06-20 Martin Liska <mliska@suse.cz>
4433 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4435 (bit_test_cluster::find_bit_tests): Likewise.
4436 (switch_decision_tree::analyze_switch_statement): Find clusters.
4437 * tree-switch-conversion.h (struct jump_table_cluster): Document
4440 2018-06-20 Martin Liska <mliska@suse.cz>
4442 * tree-switch-conversion.c (switch_conversion::collect):
4443 Record m_uniq property.
4444 (switch_conversion::expand): Bail out for special conditions.
4445 (group_cluster::~group_cluster): New.
4446 (group_cluster::group_cluster): Likewise.
4447 (group_cluster::dump): Likewise.
4448 (jump_table_cluster::emit): New.
4449 (switch_decision_tree::fix_phi_operands_for_edges): New.
4450 (struct case_node): Remove struct.
4451 (jump_table_cluster::can_be_handled): New.
4452 (case_values_threshold): Moved to header.
4453 (reset_out_edges_aux): Likewise.
4454 (jump_table_cluster::is_beneficial): New.
4455 (bit_test_cluster::can_be_handled): Likewise.
4456 (add_case_node): Remove.
4457 (bit_test_cluster::is_beneficial): New.
4458 (case_bit_test::cmp): New.
4459 (bit_test_cluster::emit): New.
4460 (expand_switch_as_decision_tree_p): Remove.
4461 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4462 (fix_phi_operands_for_edge): Likewise.
4463 (switch_decision_tree::analyze_switch_statement): New.
4464 (compute_cases_per_edge): Move ...
4465 (switch_decision_tree::compute_cases_per_edge): ... here.
4466 (try_switch_expansion): Likewise.
4467 (switch_decision_tree::try_switch_expansion): Likewise.
4468 (record_phi_operand_mapping): Likewise.
4469 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4470 (emit_case_decision_tree): Likewise.
4471 (switch_decision_tree::emit): Likewise.
4472 (balance_case_nodes): Likewise.
4473 (switch_decision_tree::balance_case_nodes): Likewise.
4474 (dump_case_nodes): Likewise.
4475 (switch_decision_tree::dump_case_nodes): Likewise.
4476 (emit_jump): Likewise.
4477 (switch_decision_tree::emit_jump): Likewise.
4478 (emit_cmp_and_jump_insns): Likewise.
4479 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4480 (emit_case_nodes): Likewise.
4481 (switch_decision_tree::emit_case_nodes): Likewise.
4482 (conditional_probability): Remove.
4483 * tree-switch-conversion.h (enum cluster_type): New.
4485 (struct cluster): Likewise.
4486 (cluster::cluster): Likewise.
4487 (struct simple_cluster): Likewise.
4488 (simple_cluster::simple_cluster): Likewise.
4489 (struct group_cluster): Likewise.
4490 (struct jump_table_cluster): Likewise.
4491 (struct bit_test_cluster): Likewise.
4492 (struct min_cluster_item): Likewise.
4493 (struct case_tree_node): Likewise.
4494 (case_tree_node::case_tree_node): Likewise.
4495 (jump_table_cluster::case_values_threshold): Likewise.
4496 (struct case_bit_test): Likewise.
4497 (struct switch_decision_tree): Likewise.
4498 (struct switch_conversion): Likewise.
4499 (switch_decision_tree::reset_out_edges_aux): Likewise.
4501 2018-06-20 Martin Liska <mliska@suse.cz>
4503 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4504 (hoist_edge_and_branch_if_true): Likewise.
4505 (expand_switch_using_bit_tests_p): Likewise.
4506 (struct case_bit_test): Likewise.
4507 (case_bit_test_cmp): Likewise.
4508 (emit_case_bit_tests): Likewise.
4509 (switch_conversion::switch_conversion): New class.
4510 (struct switch_conv_info): Remove old struct.
4511 (collect_switch_conv_info): More to ...
4512 (switch_conversion::collect): ... this.
4513 (check_range): Likewise.
4514 (switch_conversion::check_range): Likewise.
4515 (check_all_empty_except_final): Likewise.
4516 (switch_conversion::check_all_empty_except_final): Likewise.
4517 (check_final_bb): Likewise.
4518 (switch_conversion::check_final_bb): Likewise.
4519 (create_temp_arrays): Likewise.
4520 (switch_conversion::create_temp_arrays): Likewise.
4521 (free_temp_arrays): Likewise.
4522 (gather_default_values): Likewise.
4523 (switch_conversion::gather_default_values): Likewise.
4524 (build_constructors): Likewise.
4525 (switch_conversion::build_constructors): Likewise.
4526 (constructor_contains_same_values_p): Likewise.
4527 (switch_conversion::contains_same_values_p): Likewise.
4528 (array_value_type): Likewise.
4529 (switch_conversion::array_value_type): Likewise.
4530 (build_one_array): Likewise.
4531 (switch_conversion::build_one_array): Likewise.
4532 (build_arrays): Likewise.
4533 (switch_conversion::build_arrays): Likewise.
4534 (gen_def_assigns): Likewise.
4535 (switch_conversion::gen_def_assigns): Likewise.
4536 (prune_bbs): Likewise.
4537 (switch_conversion::prune_bbs): Likewise.
4538 (fix_phi_nodes): Likewise.
4539 (switch_conversion::fix_phi_nodes): Likewise.
4540 (gen_inbound_check): Likewise.
4541 (switch_conversion::gen_inbound_check): Likewise.
4542 (process_switch): Use the newly created class.
4543 (switch_conversion::expand): New.
4544 (switch_conversion::~switch_conversion): New.
4545 * tree-switch-conversion.h: New file.
4547 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4549 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4550 tree-vect-patterns.c.
4551 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4552 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4553 (vect_recog_sad_pattern): Likewise.
4554 (vect_recog_widen_sum_pattern): Likewise.
4555 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4556 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4557 (vect_recog_rotate_pattern): Likewise.
4558 (vect_recog_mult_pattern): Likewise.
4559 (vect_recog_vector_vector_shift_pattern): Likewise.
4560 (vect_recog_divmod_pattern): Likewise.
4561 (vect_recog_mixed_size_cond_pattern): Likewise.
4562 (vect_recog_bool_pattern): Likewise.
4563 (vect_recog_mask_conversion_pattern): Likewise.
4564 (vect_try_gather_scatter_pattern): Likewise.
4565 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4566 (vect_recog_over_widening_pattern): Likewise.
4567 (vect_recog_gather_scatter_pattern): Likewise.
4568 (vect_recog_func_ptr): Move from tree-vectorizer.h
4569 (vect_vect_recog_func_ptrs): Move further down the file.
4570 (vect_recog_func): Likewise. Remove the third argument.
4571 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4572 (vect_pattern_recog_1): Expect the pattern function to do any
4573 necessary target tests. Also expect it to provide a vector type.
4574 Remove the type_in handling.
4576 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4578 * tree-vect-patterns.c (vect_pattern_detected): New function.
4579 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4580 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4581 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4582 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4583 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4584 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4585 (vect_recog_mask_conversion_pattern)
4586 (vect_try_gather_scatter_pattern): Likewise.
4588 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4590 * tree-vect-patterns.c (vect_get_internal_def): New function.
4591 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4592 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4593 (search_type_for_mask_1): Use it.
4595 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4597 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4598 redundant WIDEN_SUM_EXPR handling.
4599 (vect_recog_sad_pattern): Likewise.
4601 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4603 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4604 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4605 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4606 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4607 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4609 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4611 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4612 use the stmt_vec_info of the original bb statement for the
4613 new zero assignment, even if the call is part of a pattern.
4615 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4617 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4618 that the sequence is attached to the original statement rather
4619 than the pattern statement.
4620 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4621 PATTERN_DEF_SEQ from the original statement rather than
4622 the main pattern statement.
4623 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4624 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4625 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4627 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4629 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4630 definition statements before the early exit for statements that aren't
4632 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4634 (vect_transform_loop): ...here. Process pattern definition
4635 statements without first checking whether the main pattern
4636 statement is live or relevant.
4638 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4640 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4641 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4643 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4645 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4646 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4647 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4648 (expand_block_compare): Change select_block_compare_mode call.
4649 (expand_strncmp_align_check): Use new functions, fix comment.
4650 (emit_final_str_compare_gpr): New function.
4651 (expand_strn_compare): Refactor and clean up code.
4652 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4654 2018-06-19 Tony Reix <tony.reix@atos.com>
4655 Damien Bergamini <damien.bergamini@atos.com>
4656 David Edelsohn <dje.gcc@gmail.com>
4658 * collect2.c (static_obj): New variable.
4659 (static_libs): New variable.
4660 (is_in_list): Uncomment declaration.
4661 (main): Track AIX libraries linked statically.
4662 (is_in_list): Uncomment definition.
4663 (scan_prog_file): Don't add AIX shared libraries initializer
4664 to constructor list if linking statically.
4666 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4668 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4670 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4672 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4674 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4677 2018-06-19 Martin Liska <mliska@suse.cz>
4679 * config/i386/i386.c (ix86_can_inline_p): Do not use
4680 ipa_fn_summaries::get_create.
4681 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4683 (devirtualization_time_bonus): Likewise.
4684 (ipcp_propagate_stage): Likewise.
4685 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4686 (edge_set_predicate): Likewise.
4687 (evaluate_conditions_for_known_args): Likewise.
4688 (evaluate_properties_for_edge): Likewise.
4689 (ipa_call_summary::reset): Tranform to ...
4690 (ipa_call_summary::~ipa_call_summary): ... this.
4691 (ipa_fn_summary::reset): Transform to ...
4692 (ipa_fn_summary::~ipa_fn_summary): ... this.
4693 (ipa_fn_summary_t::remove): Rename to ...
4694 (ipa_fn_summary_t::remove_callees): ... this.
4695 (ipa_fn_summary_t::duplicate): Use placement new
4696 instead of memory copy.
4697 (ipa_call_summary_t::duplicate): Likewise.
4698 (ipa_call_summary_t::remove): Remove.
4699 (dump_ipa_call_summary): Change get_create to get.
4700 (ipa_dump_fn_summary): Dump only when summary exists.
4701 (analyze_function_body): Use symbol_summary::get instead
4703 (compute_fn_summary): Likewise.
4704 (estimate_edge_devirt_benefit): Likewise.
4705 (estimate_edge_size_and_time): Likewise.
4706 (inline_update_callee_summaries): Likewise.
4707 (remap_edge_change_prob): Likewise.
4708 (remap_edge_summaries): Likewise.
4709 (ipa_merge_fn_summary_after_inlining): Likewise.
4710 (write_ipa_call_summary): Likewise.
4711 (ipa_fn_summary_write): Likewise.
4712 (ipa_free_fn_summary): Likewise.
4713 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4714 (struct ipa_call_summary): Likewise.
4715 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4717 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4718 (estimate_size_after_inlining): Likewise.
4719 (estimate_growth): Likewise.
4720 (growth_likely_positive): Likewise.
4721 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4722 (inline_call): Likewise.
4723 * ipa-inline.c (caller_growth_limits): Likewise.
4724 (can_inline_edge_p): Likewise.
4725 (can_inline_edge_by_limits_p): Likewise.
4726 (compute_uninlined_call_time): Likewise.
4727 (compute_inlined_call_time): Likewise.
4728 (want_inline_small_function_p): Likewise.
4729 (edge_badness): Likewise.
4730 (update_caller_keys): Likewise.
4731 (update_callee_keys): Likewise.
4732 (inline_small_functions): Likewise.
4733 (inline_to_all_callers_1): Likewise.
4734 (dump_overall_stats): Likewise.
4735 (early_inline_small_functions): Likewise.
4736 (early_inliner): Likewise.
4737 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4738 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4739 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4740 * ipa-split.c (execute_split_functions): Likewise.
4741 * symbol-summary.h: Likewise.
4742 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4744 2018-06-19 Richard Biener <rguenther@suse.de>
4746 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4747 (vectorize_loops): ... here. Fix dbgcnt handling.
4748 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4750 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4753 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4754 ieee128 argument takes up only one (vector) register, not two (floating
4757 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4759 * gimplify.c (gimplify_init_constructor): Really never clear for an
4760 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4762 2018-06-19 Richard Biener <rguenther@suse.de>
4764 PR tree-optimization/86179
4765 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4766 after failed recognition.
4768 2018-06-18 Martin Sebor <msebor@redhat.com>
4771 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4772 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4773 Handle integer subtraction.
4774 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4775 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4777 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4779 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4780 param from rtx to rtx_insn *.
4781 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4783 (frv_ifcvt_modify_insn): Likwise.
4784 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4785 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4786 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4787 as_a <rtx_insn *> cast to local "unprotected_region" once
4788 it's been established that it's not NULL or pc_rtx.
4789 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4790 param "sethi" from rtx to rtx_insn *.
4791 (nds32_group_float_insns): Likewise for param "insn".
4792 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4794 (vax_output_int_subtract): Likewise.
4795 * config/vax/vax.c (vax_output_int_add): Likewise for param
4797 (vax_output_int_subtract): Likewise.
4798 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4799 (emit_pattern_after): Likewise for param "after".
4800 (emit_insn_after): Likewise.
4801 (emit_jump_insn_after): Likewise.
4802 (emit_call_insn_after): Likewise.
4803 (emit_debug_insn_after): Likewise.
4804 (emit_pattern_before): Likewise for param "before".
4805 (emit_insn_before): Likewise.
4806 (emit_jump_insn_before): Likewise.
4807 * final.c (get_insn_template): Likewise for param "insn", removing
4809 * output.h (get_insn_template): Likewise for 2nd param.
4810 * rtl.h (emit_insn_before): Likewise.
4811 (emit_jump_insn_before): Likewise.
4812 (emit_debug_insn_before_noloc): Likewise.
4813 (emit_insn_after): Likewise.
4814 (emit_jump_insn_after): Likewise.
4815 (emit_call_insn_after): Likewise.
4816 (emit_debug_insn_after): Likewise.
4817 (set_insn_deleted): Likewise for param.
4819 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4822 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4823 floating point modes, so that IFmode is numerically greater than
4824 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4825 to declare the ordering. This prevents IFmode from being
4826 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4827 machine. Include rs6000-modes.h to share the fractional values
4828 between genmodes* and the rest of the compiler.
4832 * config/rs6000/rs6000-modes.h: New file.
4833 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4834 meaning of rs6000_long_double_size so that 126..128 selects an
4835 appropriate 128-bit floating point type.
4836 (rs6000_option_override_internal): Likewise.
4837 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4838 (TARGET_LONG_DOUBLE_128): Change the meaning of
4839 rs6000_long_double_size so that 126..128 selects an appropriate
4840 128-bit floating point type.
4841 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4842 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4843 source and destination to match the standard usage.
4844 (truncifkf2): Likewise.
4845 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4846 ISA 2.07 to use an explicit clobber, instead of passing in a
4848 (copysign<mode>3_soft): Likewise.
4850 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4852 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4853 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4854 (vect_slp_analyze_instance_dependence): Likewise.
4855 (vect_enhance_data_refs_alignment): Likewise.
4856 (vect_analyze_data_refs_alignment): Likewise.
4857 (vect_slp_analyze_and_verify_instance_alignment
4858 (vect_analyze_data_ref_accesses): Likewise.
4859 (vect_prune_runtime_alias_test_list): Likewise.
4860 (vect_analyze_data_refs): Likewise.
4861 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4862 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4863 (vect_analyze_scalar_cycles_1): Likewise.
4864 (vect_get_loop_niters): Likewise.
4865 (vect_analyze_loop_form_1): Likewise.
4866 (vect_update_vf_for_slp): Likewise.
4867 (vect_analyze_loop_operations): Likewise.
4868 (vect_analyze_loop): Likewise.
4869 (vectorizable_induction): Likewise.
4870 (vect_transform_loop): Likewise.
4871 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4872 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4873 (vect_make_slp_decision): Likewise.
4874 (vect_detect_hybrid_slp): Likewise.
4875 (vect_slp_analyze_operations): Likewise.
4876 (vect_slp_bb): Likewise.
4877 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4878 (vectorizable_bswap): Likewise.
4879 (vectorizable_call): Likewise.
4880 (vectorizable_simd_clone_call): Likewise.
4881 (vectorizable_conversion): Likewise.
4882 (vectorizable_assignment): Likewise.
4883 (vectorizable_shift): Likewise.
4884 (vectorizable_operation): Likewise.
4885 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4887 2018-06-18 Martin Sebor <msebor@redhat.com>
4889 PR tree-optimization/81384
4890 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4891 * builtins.c (expand_builtin_strnlen): New function.
4892 (expand_builtin): Call it.
4893 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4894 * builtins.def (BUILT_IN_STRNLEN): New.
4895 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4896 Warn for bounds in excess of maximum object size.
4897 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4898 single-value ranges. Handle strnlen.
4899 (handle_builtin_strlen): Handle strnlen.
4900 (strlen_check_and_optimize_stmt): Same.
4901 * doc/extend.texi (Other Builtins): Document strnlen.
4903 2018-06-18 Maya Rashish <coypu@sdf.org>
4905 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4906 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4907 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4909 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4911 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4913 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4915 * tree.c (escaped_string::escape): Replace cast to char * by
4916 const_cast<char *> (unescaped).
4918 2018-06-18 Nick Clifton <nickc@redhat.com>
4921 * tree.c (escaped_string): New class. Converts an unescaped
4922 string into its escaped equivalent.
4923 (warn_deprecated_use): Use the new class to convert the
4924 deprecation message, if present.
4925 (test_escaped_strings): New self test.
4926 (test_c_tests): Add test_escaped_strings.
4927 * doc/extend.texi (deprecated): Add a note that the
4928 deprecation message is affected by the -fmessage-length
4929 option, and that control characters will be escaped.
4930 (#pragma GCC error): Document this pragma.
4931 (#pragma GCC warning): Likewise.
4932 * doc/invoke.texi (-fmessage-length): Document this option's
4933 effect on the #warning and #error preprocessor directives and
4934 the deprecated attribute.
4936 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4938 * tree.c (decl_value_expr_lookup): Revert latest change.
4939 (decl_value_expr_insert): Likewise.
4941 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4943 * gimplify.c (nonlocal_vlas): Delete.
4944 (nonlocal_vla_vars): Likewise.
4945 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4947 (gimplify_body): Do not create and destroy nonlocal_vlas.
4948 * tree-nested.c: Include diagnostic.h.
4949 (use_pointer_in_frame): Tweak.
4950 (lookup_field_for_decl): Add assertion and declare the transformation.
4951 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4952 internal error when the reference is in a wrong context. Do not
4953 create a debug decl by default.
4954 (note_nonlocal_block_vlas): Delete.
4955 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4956 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4957 create a debug decl by default.
4958 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4959 call is in a wrong context.
4960 (fixup_vla_decls): New function.
4961 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4962 debug variables were created.
4963 * tree.c (decl_value_expr_lookup): Add checking assertion.
4964 (decl_value_expr_insert): Likewise.
4966 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4969 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4970 * tree-scalar-evolution.c (interpret_expr): Likewise.
4971 (expression_expensive_p): Likewise.
4972 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4973 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4974 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4975 (ssa_defined_by_minus_one_stmt_p): New.
4977 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4980 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4981 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4982 * dojump.c (do_jump): Likewise.
4983 * expr.c (expand_expr_real_2): Check operand type's sign.
4984 * fold-const.c (const_unop): Handle ABSU_EXPR.
4985 (fold_abs_const): Likewise.
4986 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4987 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4988 (strip_sign_op_1): Likesise.
4989 * match.pd: Add new pattern to generate ABSU_EXPR.
4990 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4991 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4992 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4993 * tree-inline.c (estimate_operator_cost): Likewise.
4994 * tree-pretty-print.c (dump_generic_node): Likewise.
4995 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4996 * tree.def (ABSU_EXPR): New.
4998 2018-06-16 Jakub Jelinek <jakub@redhat.com>
5001 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5002 documented as preserved for backward compatibility only.
5003 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5005 PR rtl-optimization/86108
5006 * bb-reorder.c (create_forwarder_block): Renamed to ...
5007 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5008 jump from new landing pad to the second part.
5009 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5012 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5015 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5016 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5017 Only call store_expr for halves if the mode is the same.
5020 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5021 Fix up comment formatting.
5023 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5025 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5026 (typed_splay_tree::closure,
5027 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5028 (typed_splay_tree::typed_splay_tree,
5029 typed_splay_tree::operator =): Declared private.
5030 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5031 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5032 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5033 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5034 typed_splay_tree::splay_tree_splay,
5035 typed_splay_tree::splay_tree_foreach_helper,
5036 typed_splay_tree::splay_tree_insert,
5037 typed_splay_tree::splay_tree_remove,
5038 typed_splay_tree::splay_tree_lookup,
5039 typed_splay_tree::splay_tree_predecessor,
5040 typed_splay_tree::splay_tree_successor,
5041 typed_splay_tree::splay_tree_min,
5042 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5043 (typed_splay_tree::root, typed_splay_tree::comp,
5044 typed_splay_tree::delete_key,
5045 typed_splay_tree::delete_value): New data members.
5046 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5047 typed_splay_tree::remove.
5049 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5051 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5052 -mginv and -mno-ginv to the assembler.
5053 * config/mips/mips.opt (-mcrc): New option.
5055 * doc/invoke.text (-mcrc): Document.
5058 2018-06-15 Nick Clifton <nickc@redhat.com>
5061 * tree.c (escaped_string): New class. Converts an unescaped
5062 string into its escaped equivalent.
5063 (warn_deprecated_use): Use the new class to convert the
5064 deprecation message, if present.
5065 (test_escaped_strings): New self test.
5066 (test_c_tests): Add test_escaped_strings.
5067 * doc/extend.texi (deprecated): Add a note that the
5068 deprecation message is affected by the -fmessage-length
5069 option, and that control characters will be escaped.
5070 (#pragma GCC error): Document this pragma.
5071 (#pragma GCC warning): Likewise.
5072 * doc/invoke.texi (-fmessage-length): Document this option's
5073 effect on the #warning and #error preprocessor directives and
5074 the deprecated attribute.
5076 2018-06-15 Richard Biener <rguenther@suse.de>
5078 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5079 here, also noting vector size used.
5080 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5081 size used in MSG_OPTIMIZED_LOCATIONS dump.
5082 (pass_slp_vectorize::execute): Adjust.
5084 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5087 * config/arc/arc.c (arc_return_address_register): Fix
5090 2018-06-15 Richard Biener <rguenther@suse.de>
5093 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5094 leave useless conversion stripping to force_gimple_operand_gsi.
5095 (gimplify_build2): Likewise.
5096 (gimplify_build1): Likewise.
5098 2018-06-15 Richard Biener <rguenther@suse.de>
5101 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5102 before adjusting their block.
5104 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5106 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5107 multilibs for *-*-rtems*.
5108 * config/riscv/t-rtems: New file.
5110 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5113 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5114 unsigned_type_for returns NULL.
5117 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5118 subregs of multi-word pseudos unless the float mode has word size.
5120 2018-06-14 Richard Biener <rguenther@suse.de>
5123 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5124 duplicate and harmful type_hash_canon.
5125 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5127 2018-06-14 Richard Biener <rguenther@suse.de>
5130 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5133 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5135 * config/rtems.h (STDINT_LONG32): Define.
5137 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5138 Prachi Godbole <prachi.godbole@imgtec.com>
5140 * config/mips/mips-cpus.def: Define P6600.
5141 * config/mips/mips-tables.opt: Regenerate.
5142 * config/mips/mips.c (mips_ucbranch_type): New enum.
5143 (mips_rtx_cost_data): Add support for P6600.
5144 (mips_issue_rate): Likewise.
5145 (mips_multipass_dfa_lookahead): Likewise.
5146 (mips_avoid_hazard): Likewise.
5147 (mips_reorg_process_insns): Likewise.
5148 (mips_classify_branch_p6600): New function.
5149 * config/mips/mips.h (TUNE_P6600): New define.
5150 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5151 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5152 * config/mips/mips.md: Include p6600.md.
5153 (processor): Add p6600.
5154 * config/mips/p6600.md: New file.
5155 * doc/invoke.texi: Add p6600 to supported architectures.
5157 2018-06-13 Martin Sebor <msebor@redhat.com>
5159 PR tree-optimization/86114
5160 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5162 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5164 2018-06-13 Richard Biener <rguenther@suse.de>
5166 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5167 Properly set vector type of the intermediate stmt.
5168 * tree-vect-stmts.c (vectorizable_operation): The destination
5169 var always has vectype_out type.
5171 2018-06-13 Jeff Law <law@redhat.com>
5173 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5174 integer 0 for argument to print_rtl_with_bb.
5175 (rl78_reorg): Likewise.
5177 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5179 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5180 from rtx to rtx_insn *.
5181 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5183 (add_sched_insns_for_speculation): Likewise for local "target",
5184 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5185 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5186 from rtx_insn ** to rtx_code_label **.
5187 (reorg_emit_nops): Likewise.
5188 (c6x_reorg): Likewise for local "call_labels".
5189 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5191 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5192 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5193 the loops over LABEL_REFS.
5194 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5196 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5197 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5198 (split_branches): Strengthen local "olabel" from rtx to
5199 rtx_insn *, adding a safe_as_a cast.
5200 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5202 (add_insn_after): Likewise for first two params.
5203 (add_insn_before): Likewise.
5204 (remove_insn): Likewise for param.
5205 (emit_pattern_before_noloc): Likewise for second and third params.
5206 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5207 (emit_call_insn_before_noloc): Likewise.
5208 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5210 (emit_barrier_before): Likewise.
5211 (emit_label_before): Strengthen "label" param from "rtx" to
5212 "rtx_code_label *". Strengthen "before" param from "rtx" to
5214 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5216 (emit_pattern_after_noloc): Likewise.
5217 (emit_insn_after_noloc): Likewise.
5218 (emit_jump_insn_after_noloc): Likewise.
5219 (emit_call_insn_after_noloc): Likewise.
5220 (emit_debug_insn_after_noloc): Likewise.
5221 (emit_barrier_after): Likewise.
5222 (emit_label_after): Likewise for both params.
5223 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5224 "loc" param from "int" to "location_t".
5225 (emit_insn_after_setloc): Likewise.
5226 (emit_jump_insn_after_setloc): Likewise.
5227 (emit_call_insn_after_setloc): Likewise.
5228 (emit_debug_insn_after_setloc): Likewise.
5229 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5230 "loc" param from "int" to "location_t".
5231 (emit_pattern_before): Convert NULL_RTX to NULL.
5232 (emit_insn_before_setloc): Convert "loc" param from "int" to
5234 (emit_jump_insn_before_setloc): Likewise.
5235 (emit_call_insn_before_setloc): Likewise.
5236 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5237 rtx_insn *. Convert "loc" param from "int" to "location_t".
5238 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5239 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5240 Convert 3rd param from "int" to "location_t".
5241 (emit_barrier_before, emit_barrier_after, next_real_insn):
5242 Strengthen param from rtx to rtx_insn *.
5243 (emit_label_before): Strengthen 1st param from "rtx" to
5244 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5246 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5247 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5248 Strengthen 2nd param from "rtx" to "rtx_insn *".
5249 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5250 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5251 Likewise. Convert 3rd param from "int" to "location_t".
5252 (emit_label_after): Strengthen 1st param from "rtx" to
5254 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5256 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5257 from "rtx" to "rtx_insn *".
5259 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5261 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5262 bodies streamed in with -Q.
5263 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5264 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5265 * gimple-streamer-out.c: Include gimple-pretty-print.h
5266 (output_bb): Dump stmts streamed.
5267 * lto-section-out.c: Include print-tree.h
5268 (lto_begin_section): Dump sections created.
5269 (lto_output_decl_index): Dump decl encoded.
5270 * lto-streamer-out.c: Include print-tree.h
5271 (create_output_block): Dump output block created.
5272 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5273 (output_function): Dump function output.
5274 (output_constructor): Dump constructor streamed.
5275 (write_global_stream): Output indexes encoded.
5276 (produce_asm_for_decls): Dump streams encoded.
5277 * lto-streamer.c (streamer_dump_file): New global var.
5278 * lto-streamer.h (streamer_dump_file): Declare.
5279 * passes.c (ipa_write_summaries): Initialize streamer dump.
5280 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5283 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5286 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5287 offsets for register save directives. Emit a second batch of save
5288 directives, if need be, when the function accesses prior frames.
5290 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5292 * config/arc/fpu.md (fmasf4): Force operand to register.
5293 (fnmasf4): Likewise.
5295 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5297 * config/arc/arc-protos.h (arc_pad_return): Remove.
5298 * config/arc/arc.c (machine_function): Remove force_short_suffix
5300 (arc_print_operand): Adjust printing of '&'.
5301 (arc_verify_short): Remove conditional printing of short suffix.
5302 (arc_final_prescan_insn): Remove reference to size_reason.
5303 (pad_return): New function.
5304 (arc_reorg): Call pad_return.
5305 (arc_pad_return): Remove.
5306 (arc_init_machine_status): Remove reference to force_short_suffix.
5307 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5308 (attr length): When attribute iscompact is true force to 2
5309 regardless; in the case of maybe check if we want to force the
5310 instruction to have 4 bytes length.
5311 (nopv): Change it to generate 4 byte long nop as well.
5312 (blockage): New pattern.
5313 (simple_return): Remove call to arc_pad_return.
5314 (p_return_i): Likewise.
5316 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5318 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5320 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5322 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5325 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5327 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5328 for ARC700 and ARCv2.
5330 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5333 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5334 operands[2] instead of operands[1].
5337 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5339 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5340 case, check whether the outer register overlaps an unallocatable
5341 register, not just whether it fits the required class.
5343 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5345 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5347 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5348 (memrefs_conflict_p): Likewise.
5349 (init_alias_analysis): Likewise.
5350 * cfgexpand.c (expand_debug_expr): Likewise.
5351 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5352 * cse.c (fold_rtx): Likewise.
5353 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5354 * expr.c (emit_block_move_hints): Likewise.
5355 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5356 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5357 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5358 (emit_group_store): Likewise.
5359 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5360 to read the PRE/POST_MODIFY increment.
5361 * calls.c (store_one_arg): Use strip_offset.
5362 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5364 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5366 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5367 (simplify_binary_operation_1): Extend CONST_INT handling to
5369 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5370 than a HOST_WIDE_INT.
5371 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5373 (adjust_mems, add_stores): Update accodingly.
5374 (vt_canonicalize_addr): Track polynomial offsets.
5375 (emit_note_insn_var_location): Likewise.
5376 (vt_add_function_parameter): Likewise.
5377 (vt_initialize): Likewise.
5379 2018-06-12 Jeff Law <law@redhat.com>
5381 * config.gcc (alpha*-*-freebsd*): Remove.
5382 * config/alpha/freebsd.h: Remove.
5384 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5387 * spellcheck-tree.c (levenshtein_distance): Rename to...
5388 (get_edit_distance): ...this, and update for underlying renaming.
5389 * spellcheck-tree.h (levenshtein_distance): Rename to...
5390 (get_edit_distance): ...this.
5391 * spellcheck.c (levenshtein_distance): Rename to...
5392 (get_edit_distance): ...this. Convert from Levenshtein distance
5393 to Damerau-Levenshtein distance by supporting transpositions of
5394 adjacent characters. Rename "v1" to "v_next" and "v0" to
5396 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5397 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5398 update for underlying renaming.
5399 (selftest::levenshtein_distance_unit_test): Rename to...
5400 (selftest::test_get_edit_distance_unit): ...this, and update for
5401 underlying renaming.
5402 (selftest::test_find_closest_string): Add example from PR 69968
5403 where transposition helps
5404 (selftest::test_metric_conditions): Update for renaming.
5405 (selftest::test_metric_conditions): Likewise.
5406 (selftest::spellcheck_c_tests): Likewise.
5407 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5408 (get_edit_distance): ...this.
5409 (best_match::consider): Update for renaming.
5411 2018-06-12 Martin Sebor <msebor@redhat.com>
5413 PR tree-optimization/85259
5414 * builtins.c (compute_objsize): Handle constant offsets.
5415 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5416 true iff a warning has been issued.
5417 * gimple.h (gimple_nonartificial_location): New function.
5418 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5419 gimple_nonartificial_location and handle -Wno-system-headers.
5420 (handle_builtin_stxncpy): Same.
5422 2018-06-12 Martin Sebor <msebor@redhat.com>
5425 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5427 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5429 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5430 BUILTIN_VEC_XST entries for pointer to double and long long.
5432 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5435 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5437 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5440 2018-06-12 Martin Liska <mliska@suse.cz>
5442 * doc/options.texi: Document IntegerRange.
5444 2018-06-12 Martin Liska <mliska@suse.cz>
5446 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5447 * opt-functions.awk: Handle Deprecated flag.
5448 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5450 (read_cmdline_option): Report warning for a deprecated option.
5451 * opts.h (struct cl_option): Add new field cl_deprecated.
5452 (CL_ERR_DEPRECATED): New.
5454 2018-06-12 Martin Liska <mliska@suse.cz>
5456 * doc/options.texi: Document Deprecated option flag.
5458 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5460 * config/arc/arc-arch.h (arc_extras): New enum.
5461 (arc_cpu_t):Add field extra.
5462 (arc_cpu_types): Consider the extras.
5463 * config/arc/arc-cpus.def: Add extras info.
5464 * config/arc/arc-opts.h (processor_type): Consider extra field.
5465 * config/arc/arc.c (arc_override_options): Handle extra field.
5467 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5469 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5470 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5472 * config/arc/arc.c (arc_init): Update pic warning.
5473 (irq_range): Update irq range parsing warnings.
5474 (arc_override_options): Update various warning messages.
5475 (arc_handle_aux_attribute): Likewise.
5477 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5479 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5481 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5483 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5484 compiler messages directives.
5486 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5488 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5489 * config/mips/mips-tables.opt: Regenerate.
5490 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5492 * doc/invoke.texi: Document -march=i6500.
5494 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5496 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5497 (i6400_gpmul): Add cpu_unit.
5498 (i6400_gpdiv): Likewise.
5499 (i6400_msa_add_d): Update reservations.
5500 (i6400_msa_int_add) Likewise.
5501 (i6400_msa_short_logic3) Likewise.
5502 (i6400_msa_short_logic2) Likewise.
5503 (i6400_msa_short_logic) Likewise.
5504 (i6400_msa_move) Likewise.
5505 (i6400_msa_cmp) Likewise.
5506 (i6400_msa_short_float2) Likewise.
5507 (i6400_msa_div_d) Likewise.
5508 (i6400_msa_long_logic1) Likewise.
5509 (i6400_msa_long_logic2) Likewise.
5510 (i6400_msa_mult) Likewise.
5511 (i6400_msa_long_float2) Likewise.
5512 (i6400_msa_long_float4) Likewise.
5513 (i6400_msa_long_float5) Likewise.
5514 (i6400_msa_long_float8) Likewise.
5515 (i6400_fpu_fadd): Include frint type.
5516 (i6400_fpu_store): New define_insn_reservation.
5517 (i6400_fpu_load): Likewise.
5518 (i6400_fpu_move): Likewise.
5519 (i6400_fpu_fcmp): Likewise.
5520 (i6400_fpu_fmadd): Likewise.
5521 (i6400_int_mult): Include imul3nc type and update reservation.
5522 (i6400_int_div): Include idiv3 type and update reservation.
5523 (i6400_int_load): Update to check type not move_type.
5524 (i6400_int_store): Likewise.
5525 (i6400_int_prefetch): Set zero latency.
5527 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5529 * gcc.c: Document new %@{...} sequence.
5530 (LINK_COMMAND_SPEC): Use it for the -L switches.
5531 (cpp_unique_options): Use it for the -I switches.
5532 (at_file_argbuf): New global variable.
5533 (in_at_file): Likewise.
5534 (alloc_args): Create at_file_argbuf.
5535 (clear_args): Truncate at_file_argbuf.
5536 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5537 (open_at_file): New function.
5538 (close_at_file): Likewise.
5539 (create_at_file): Delete.
5540 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5543 (validate_switches_from_spec): Deal with %@{...} sequence.
5544 (validate_switches): Likewise.
5545 (driver::finalize): Call clear_args.
5547 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5549 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5551 2018-06-11 Martin Sebor <msebor@redhat.com>
5553 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5554 (Wno-class-memaccess): Add @opindex.
5555 (Wno-templates, Wno-multiple-inheritance): Same.
5556 (Wno-virtual-inheritance, Wno-namespaces): Same.
5557 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5558 (Wno-format-overflow, Wno-format-truncation): Same.
5559 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5560 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5561 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5562 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5563 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5564 (Wno-misspelled-isr): Same.
5566 2018-06-11 Martin Sebor <msebor@redhat.com>
5568 * PR tree-optimization/86083
5569 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5571 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5573 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5575 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5578 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5579 on the correct operand.
5580 (*movdi_internal64): Ditto.
5582 2018-06-11 Martin Liska <mliska@suse.cz>
5584 PR tree-optimization/86089
5585 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5587 2018-06-11 Julia Koval <julia.koval@intel.com>
5589 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5590 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5591 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5593 2018-06-11 Olivier Hainque <hainque@adacore.com>
5595 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5596 for Ada with strict dwarf2.
5598 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5601 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5604 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5606 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5608 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5610 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5613 2018-06-08 Martin Liska <mliska@suse.cz>
5615 * tree-cfg.h (debug_function): Fix argument type to match
5618 2018-06-08 Martin Liska <mliska@suse.cz>
5620 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5621 Remove usage of MPX-related (and removed) fields.
5622 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5624 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5626 * cfg.c (debug): Use TDF_NONE rather than 0.
5627 * cfghooks.c (debug): Likewise.
5628 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5629 (struct dump_option_value_info): Convert to...
5630 (struct kv_pair): ...this template type.
5631 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5633 (optinfo_verbosity_options): Likewise.
5634 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5636 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5637 than int for "optgroup_flags" param.
5638 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5640 (dump_dec): Likewise.
5641 (dump_finish): Use TDF_NONE rather than 0.
5642 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5643 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5644 than 0. Update for change to option_ptr.
5645 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5646 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5647 0. Update for changes to optinfo_verbosity_options and
5649 (opt_info_switch_p): Convert optgroup_flags from int to
5651 (dump_basic_block): Use dump_flags_t rather than int
5652 for "dump_kind" param.
5653 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5654 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5655 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5656 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5657 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5658 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5659 TDF_NONE): Convert from macros to...
5660 (enum dump_flag): ...this new enum.
5661 (dump_flags_t): Update to use enum.
5662 (operator|, operator&, operator~, operator|=, operator&=):
5663 Implement for dump_flags_t.
5664 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5665 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5666 Convert from macros to...
5667 (enum optgroup_flag): ...this new enum.
5668 (optgroup_flags_t): New typedef.
5669 (operator|, operator|=): Implement for optgroup_flags_t.
5670 (struct dump_file_info): Convert field "alt_flags" to
5671 dump_flags_t. Convert field "optgroup_flags" to
5673 (dump_basic_block): Use dump_flags_t rather than int for param.
5674 (dump_generic_expr_loc): Likewise.
5675 (dump_dec): Likewise.
5676 (dump_register): Convert param "optgroup_flags" to
5678 (opt_info_enable_passes): Likewise.
5679 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5681 * gimple-pretty-print.c (debug): Likewise.
5682 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5683 (merged_store_group::apply_stores): Likewise.
5684 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5685 * gimple.c (verify_gimple_pp): Likewise.
5686 * graphite-poly.c (print_pbb_body): Likewise.
5687 * passes.c (pass_manager::register_one_dump_file): Convert
5688 local "optgroup_flags" to optgroup_flags_t.
5689 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5691 (debug_body): Likewise.
5692 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5693 to optgroup_flags_t.
5694 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5696 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5697 (convert_mult_to_fma): Likewise.
5698 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5699 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5700 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5701 "dump_kind" to dump_flags_t.
5703 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5705 * config/rs6000/rs6000.c (min, max): Delete.
5707 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5709 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5710 -mabi=spe and -mabi=no-spe.
5712 2018-06-08 Martin Liska <mliska@suse.cz>
5714 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5715 where we expect an existing summary.
5717 2018-06-08 Martin Liska <mliska@suse.cz>
5719 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5720 * ipa-inline.h (estimate_edge_growth): Likewise.
5722 2018-06-08 Martin Liska <mliska@suse.cz>
5724 * cgraph.c (function_version_hasher::hash): Use
5725 cgraph_node::get_uid ().
5726 (function_version_hasher::equal):
5727 * cgraph.h (cgraph_node::get_uid): New method.
5728 * ipa-inline.c (update_caller_keys): Use
5729 cgraph_node::get_uid ().
5730 (update_callee_keys): Likewise.
5731 * ipa-utils.c (searchc): Likewise.
5732 (ipa_reduced_postorder): Likewise.
5733 * lto-cgraph.c (input_node): Likewise.
5734 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5735 * symbol-summary.h (symtab_insertion): Likewise.
5736 (symtab_removal): Likewise.
5737 (symtab_duplication): Likewise.
5738 * tree-pretty-print.c (dump_function_header): Likewise.
5739 * tree-sra.c (convert_callers_for_node): Likewise.
5741 2018-06-08 Martin Liska <mliska@suse.cz>
5743 * cgraph.c (symbol_table::create_edge): Always assign a new
5745 (symbol_table::free_edge): Do not recycle numbers.
5746 * cgraph.h (cgraph_edge::get): New method.
5747 * symbol-summary.h (symtab_removal): Use it.
5748 (symtab_duplication): Likewise.
5749 (call_summary::hashable_uid): Remove.
5751 2018-06-08 Martin Liska <mliska@suse.cz>
5753 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5754 (initialize_growth_caches): Remove.
5755 (free_growth_caches): Likewise.
5756 (do_estimate_edge_time): Use edge_growth_cache.
5757 (do_estimate_edge_size): Likewise.
5758 (do_estimate_edge_hints): Likewise.
5759 * ipa-inline.c (reset_edge_caches): Likewise.
5760 (recursive_inlining): Likewise.
5761 (inline_small_functions): Likewise.
5762 * ipa-inline.h (initialize_growth_caches): Remove.
5763 (estimate_edge_size): Likewise.
5764 (estimate_edge_time): Likewise.
5765 (estimate_edge_hints): Likewise.
5766 (reset_edge_growth_cache): Likewise.
5767 * symbol-summary.h (call_summary::remove): New method.
5769 2018-06-08 Martin Liska <mliska@suse.cz>
5771 * ipa-cp.c (class edge_clone_summary): New summary.
5772 (grow_edge_clone_vectors): Remove.
5773 (ipcp_edge_duplication_hook): Remove.
5774 (class edge_clone_summary_t): New call_summary class.
5775 (ipcp_edge_removal_hook): Remove.
5776 (edge_clone_summary_t::duplicate): New function.
5777 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5778 (create_specialized_node): Likewise.
5779 (ipcp_driver): Initialize edge_clone_summaries and do not
5782 2018-06-08 Martin Liska <mliska@suse.cz>
5784 * symbol-summary.h (get): New function.
5785 (call_summary::m_initialize_when_cloning): New class member.
5787 2018-06-08 Martin Liska <mliska@suse.cz>
5789 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5790 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5791 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5792 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5793 (remove_cgraph_node_from_order): Use the removed_nodes set.
5794 (do_per_function_toporder): Likwise.
5795 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5796 instead of summary_uid.
5797 (symtab_removal): Likewise.
5798 (symtab_duplication): Likewise.
5800 2018-06-08 Martin Liska <mliska@suse.cz>
5802 * ipa-cp.c (ipcp_store_bits_results): Use
5803 ipcp_transformation_sum.
5804 (ipcp_store_vr_results): Likewise.
5805 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5807 (ipcp_transformation_initialize): ... this.
5808 (ipa_set_node_agg_value_chain):
5809 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5810 (write_ipcp_transformation_info): Likewise.
5811 (read_ipcp_transformation_info): Likewise.
5812 (ipcp_update_bits): Likewise.
5813 (ipcp_update_vr): Likewise.
5814 (ipcp_transform_function): Likewise.
5815 * ipa-prop.h: Rename ipcp_transformation_summary to
5816 ipcp_transformation.
5817 (class ipcp_transformation_t): New function summary.
5818 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5819 (ipa_get_agg_replacements_for_node): Likewise.
5821 2018-06-08 Martin Liska <mliska@suse.cz>
5823 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5825 (class funct_state_summary_t): New function_summary class.
5826 (has_function_state): Remove.
5827 (get_function_state): Likewise.
5828 (set_function_state): Likewise.
5829 (add_new_function): Likewise.
5830 (funct_state_summary_t::insert): New function.
5831 (duplicate_node_data): Remove.
5832 (remove_node_data): Remove.
5833 (funct_state_summary_t::duplicate): New function.
5834 (register_hooks): Create new funct_state_summaries.
5835 (pure_const_generate_summary): Use it.
5836 (pure_const_write_summary): Likewise.
5837 (pure_const_read_summary): Likewise.
5838 (propagate_pure_const): Likewise.
5839 (propagate_nothrow): Likewise.
5840 (dump_malloc_lattice): Likewise.
5841 (propagate_malloc): Likewise.
5842 (execute): Do not register hooks, just remove summary
5844 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5847 2018-06-08 Martin Liska <mliska@suse.cz>
5849 * ipa-reference.c (remove_node_data): Remove.
5850 (duplicate_node_data): Likewise.
5851 (class ipa_ref_var_info_summary_t): New class.
5852 (class ipa_ref_opt_summary_t): Likewise.
5853 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5854 (get_reference_optimization_summary): Use
5855 ipa_ref_opt_sum_summaries.
5856 (set_reference_vars_info): Remove.
5857 (set_reference_optimization_summary): Likewise.
5858 (ipa_init): Create summaries.
5859 (init_function_info): Use function summary.
5860 (ipa_ref_opt_summary_t::duplicate): New function.
5861 (ipa_ref_opt_summary_t::remove): New function.
5862 (get_read_write_all_from_node): Fix GNU coding style.
5863 (propagate): Use function summary.
5864 (write_node_summary_p): Fix GNU coding style.
5865 (stream_out_bitmap): Likewise.
5866 (ipa_reference_read_optimization_summary): Use function summary.
5867 (ipa_reference_c_finalize): Do not release hooks.
5869 2018-06-08 Martin Liska <mliska@suse.cz>
5871 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5872 (analyze_function_body): Extract multiple calls of get_create.
5873 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5874 * ipa-inline.c (recursive_inlining): Use ::get method.
5875 * ipa-inline.h (estimate_edge_growth): Likewise.
5877 2018-06-08 Martin Liska <mliska@suse.cz>
5879 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5881 (hsa_function_summary::hsa_function_summary): Use the new enum
5883 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5884 * hsa-gen.c (hsa_get_host_function): Likewise.
5885 (get_brig_function_name): Likewise.
5886 * ipa-hsa.c (process_hsa_functions): Likewise.
5887 (ipa_hsa_write_summary): Likewise.
5888 * symbol-summary.h (symtab_duplication): Use ::get function/
5889 (get): New function.
5891 2018-06-08 Martin Liska <mliska@suse.cz>
5893 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5895 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5896 (hsa_register_kernel): Likewise.
5897 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5898 * hsa-gen.c (hsa_get_host_function): Likewise.
5899 (get_brig_function_name): Likewise.
5900 (generate_hsa): Likewise.
5901 (pass_gen_hsail::execute): Likewise.
5902 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5903 (devirtualization_time_bonus): Likewise.
5904 (ipcp_propagate_stage): Likewise.
5905 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5906 (edge_set_predicate): Likewise.
5907 (evaluate_conditions_for_known_args): Likewise.
5908 (evaluate_properties_for_edge): Likewise.
5909 (ipa_fn_summary::reset): Likewise.
5910 (ipa_fn_summary_t::duplicate): Likewise.
5911 (dump_ipa_call_summary): Likewise.
5912 (ipa_dump_fn_summary): Likewise.
5913 (analyze_function_body): Likewise.
5914 (compute_fn_summary): Likewise.
5915 (estimate_edge_devirt_benefit): Likewise.
5916 (estimate_edge_size_and_time): Likewise.
5917 (estimate_calls_size_and_time): Likewise.
5918 (estimate_node_size_and_time): Likewise.
5919 (inline_update_callee_summaries): Likewise.
5920 (remap_edge_change_prob): Likewise.
5921 (remap_edge_summaries): Likewise.
5922 (ipa_merge_fn_summary_after_inlining): Likewise.
5923 (ipa_update_overall_fn_summary): Likewise.
5924 (read_ipa_call_summary): Likewise.
5925 (inline_read_section): Likewise.
5926 (write_ipa_call_summary): Likewise.
5927 (ipa_fn_summary_write): Likewise.
5928 (ipa_free_fn_summary): Likewise.
5929 * ipa-hsa.c (process_hsa_functions): Likewise.
5930 (ipa_hsa_write_summary): Likewise.
5931 (ipa_hsa_read_section): Likewise.
5932 * ipa-icf.c (sem_function::merge): Likewise.
5933 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5934 (do_estimate_edge_time): Likewise.
5935 (estimate_size_after_inlining): Likewise.
5936 (estimate_growth): Likewise.
5937 (growth_likely_positive): Likewise.
5938 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5939 (inline_call): Likewise.
5940 * ipa-inline.c (caller_growth_limits): Likewise.
5941 (can_inline_edge_p): Likewise.
5942 (can_inline_edge_by_limits_p): Likewise.
5943 (compute_uninlined_call_time): Likewise.
5944 (compute_inlined_call_time): Likewise.
5945 (want_inline_small_function_p): Likewise.
5946 (edge_badness): Likewise.
5947 (update_caller_keys): Likewise.
5948 (update_callee_keys): Likewise.
5949 (recursive_inlining): Likewise.
5950 (inline_small_functions): Likewise.
5951 (inline_to_all_callers_1): Likewise.
5952 (dump_overall_stats): Likewise.
5953 (early_inline_small_functions): Likewise.
5954 (early_inliner): Likewise.
5955 * ipa-inline.h (estimate_edge_growth): Likewise.
5956 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5957 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5958 * ipa-prop.h (IPA_NODE_REF): Likewise.
5959 (IPA_EDGE_REF): Likewise.
5960 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5961 (propagate_malloc): Likewise.
5962 * ipa-split.c (execute_split_functions): Likewise.
5963 * symbol-summary.h: Rename get to get_create.
5965 (get_create): Likewise.
5966 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5968 2018-06-08 Martin Liska <mliska@suse.cz>
5970 * symbol-summary.h (release): Move definition out of class
5972 (symtab_removal): Likewise.
5973 (symtab_duplication): Likewise.
5975 2018-06-08 Martin Liska <mliska@suse.cz>
5977 * symbol-summary.h (function_summary): Move constructor
5978 implementation out of class declaration.
5979 (release): Likewise.
5980 (symtab_insertion): Likewise.
5981 (symtab_removal): Likewise.
5982 (symtab_duplication): Likewise.
5985 2018-06-08 Martin Liska <mliska@suse.cz>
5987 * Makefile.in: Remove support for MPX (macros, related functions,
5988 fields in cgraph_node, ...).
5989 * builtin-types.def (BT_BND): Likewise.
5990 (BT_FN_BND_CONST_PTR): Likewise.
5991 (BT_FN_CONST_PTR_BND): Likewise.
5992 (BT_FN_VOID_PTR_BND): Likewise.
5993 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5994 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5995 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5996 (expand_builtin_mempcpy_with_bounds): Likewise.
5997 (expand_builtin_memset_with_bounds): Likewise.
5998 (expand_builtin_memset_args): Likewise.
5999 (std_expand_builtin_va_start): Likewise.
6000 (expand_builtin): Likewise.
6001 (expand_builtin_with_bounds): Likewise.
6002 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6003 (DEF_LIB_BUILTIN_CHKP): Likewise.
6004 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6005 (DEF_CHKP_BUILTIN): Likewise.
6006 (BUILT_IN_MEMCPY): Likewise.
6007 (BUILT_IN_MEMMOVE): Likewise.
6008 (BUILT_IN_MEMPCPY): Likewise.
6009 (BUILT_IN_MEMSET): Likewise.
6010 (BUILT_IN_STPCPY): Likewise.
6011 (BUILT_IN_STRCAT): Likewise.
6012 (BUILT_IN_STRCHR): Likewise.
6013 (BUILT_IN_STRCPY): Likewise.
6014 (BUILT_IN_STRLEN): Likewise.
6015 (BUILT_IN_MEMCPY_CHK): Likewise.
6016 (BUILT_IN_MEMMOVE_CHK): Likewise.
6017 (BUILT_IN_MEMPCPY_CHK): Likewise.
6018 (BUILT_IN_MEMSET_CHK): Likewise.
6019 (BUILT_IN_STPCPY_CHK): Likewise.
6020 (BUILT_IN_STRCAT_CHK): Likewise.
6021 (BUILT_IN_STRCPY_CHK): Likewise.
6022 * calls.c (store_bounds): Likewise.
6023 (emit_call_1): Likewise.
6024 (special_function_p): Likewise.
6025 (maybe_warn_nonstring_arg): Likewise.
6026 (initialize_argument_information): Likewise.
6027 (finalize_must_preallocate): Likewise.
6028 (compute_argument_addresses): Likewise.
6029 (expand_call): Likewise.
6030 * cfgexpand.c (expand_call_stmt): Likewise.
6031 (expand_return): Likewise.
6032 (expand_gimple_stmt_1): Likewise.
6033 (pass_expand::execute): Likewise.
6034 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6035 (cgraph_node::remove): Likewise.
6036 (cgraph_node::dump): Likewise.
6037 (cgraph_node::verify_node): Likewise.
6038 * cgraph.h (chkp_function_instrumented_p): Likewise.
6039 (symtab_node::get_alias_target): Likewise.
6040 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6041 (cgraph_local_p): Likewise.
6042 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6043 (cgraph_edge::rebuild_references): Likewise.
6044 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6045 (walk_polymorphic_call_targets): Likewise.
6046 (cgraph_node::expand_thunk): Likewise.
6047 (symbol_table::output_weakrefs): Likewise.
6048 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6049 (ix86_handle_option): Likewise.
6050 * config/i386/constraints.md: Likewise.
6051 * config/i386/i386-builtin-types.def (BND): Likewise.
6055 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6056 (BDESC_FIRST): Likewise.
6058 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6059 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6060 * config/i386/i386.c (enum reg_class): Likewise.
6061 (ix86_target_string): Likewise.
6062 (ix86_option_override_internal): Likewise.
6063 (ix86_conditional_register_usage): Likewise.
6064 (ix86_valid_target_attribute_inner_p): Likewise.
6065 (ix86_set_indirect_branch_type): Likewise.
6066 (ix86_set_current_function): Likewise.
6067 (ix86_function_arg_regno_p): Likewise.
6068 (init_cumulative_args): Likewise.
6069 (ix86_function_arg_advance): Likewise.
6070 (ix86_function_arg): Likewise.
6071 (ix86_pass_by_reference): Likewise.
6072 (ix86_function_value_regno_p): Likewise.
6073 (ix86_function_value_1): Likewise.
6074 (ix86_function_value_bounds): Likewise.
6075 (ix86_return_in_memory): Likewise.
6076 (ix86_setup_incoming_vararg_bounds): Likewise.
6077 (ix86_va_start): Likewise.
6078 (indirect_thunk_need_prefix): Likewise.
6079 (print_reg): Likewise.
6080 (ix86_print_operand): Likewise.
6081 (ix86_expand_call): Likewise.
6082 (ix86_output_function_return): Likewise.
6083 (reg_encoded_number): Likewise.
6084 (BDESC_VERIFYS): Likewise.
6085 (ix86_init_mpx_builtins): Likewise.
6086 (ix86_init_builtins): Likewise.
6087 (ix86_emit_cmove): Likewise.
6088 (ix86_emit_move_max): Likewise.
6089 (ix86_expand_builtin): Likewise.
6090 (ix86_builtin_mpx_function): Likewise.
6091 (ix86_get_arg_address_for_bt): Likewise.
6092 (ix86_load_bounds): Likewise.
6093 (ix86_store_bounds): Likewise.
6094 (ix86_load_returned_bounds): Likewise.
6095 (ix86_store_returned_bounds): Likewise.
6096 (ix86_class_likely_spilled_p): Likewise.
6097 (ix86_hard_regno_mode_ok): Likewise.
6098 (x86_order_regs_for_local_alloc): Likewise.
6099 (ix86_mitigate_rop): Likewise.
6100 (ix86_bnd_prefixed_insn_p): Likewise.
6101 (ix86_mpx_bound_mode): Likewise.
6102 (ix86_make_bounds_constant): Likewise.
6103 (ix86_initialize_bounds): Likewise.
6104 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6105 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6106 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6107 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6108 (TARGET_CHKP_BOUND_MODE): Likewise.
6109 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6110 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6111 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6112 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6113 * config/i386/i386.h (TARGET_MPX): Likewise.
6114 (TARGET_MPX_P): Likewise.
6115 (VALID_BND_REG_MODE): Likewise.
6116 (FIRST_BND_REG): Likewise.
6117 (LAST_BND_REG): Likewise.
6118 (enum reg_class): Likewise.
6119 (BND_REG_P): Likewise.
6120 (BND_REGNO_P): Likewise.
6121 (BNDmode): Likewise.
6122 (ADJUST_INSN_LENGTH): Likewise.
6123 * config/i386/i386.md: Likewise.
6124 * config/i386/i386.opt: Likewise.
6125 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6126 (defined): Likewise.
6127 (LINK_MPX): Likewise.
6128 (MPX_SPEC): Likewise.
6129 (LIBMPX_SPEC): Likewise.
6130 (LIBMPXWRAPPERS_SPEC): Likewise.
6131 (CHKP_SPEC): Likewise.
6132 * config/i386/predicates.md: Likewise.
6133 * dbxout.c (dbxout_type): Likewise.
6134 * doc/extend.texi: Likewise.
6135 * doc/invoke.texi: Likewise.
6136 * doc/md.texi: Likewise.
6137 * doc/tm.texi: Likewise.
6138 * doc/tm.texi.in: Likewise.
6139 * dwarf2out.c (is_base_type): Likewise.
6140 (gen_formal_types_die): Likewise.
6141 (gen_subprogram_die): Likewise.
6142 (gen_type_die_with_usage): Likewise.
6143 (gen_decl_die): Likewise.
6144 (dwarf2out_late_global_decl): Likewise.
6145 * expr.c (expand_assignment): Likewise.
6146 (emit_storent_insn): Likewise.
6147 (store_expr_with_bounds): Likewise.
6148 (store_expr): Likewise.
6149 (expand_expr_real_1): Likewise.
6150 * expr.h (store_expr_with_bounds): Likewise.
6151 * function.c (use_register_for_decl): Likewise.
6152 (struct bounds_parm_data): Likewise.
6153 (assign_parms_augmented_arg_list): Likewise.
6154 (assign_parm_find_entry_rtl): Likewise.
6155 (assign_parm_is_stack_parm): Likewise.
6156 (assign_parm_load_bounds): Likewise.
6157 (assign_bounds): Likewise.
6158 (assign_parms): Likewise.
6159 (expand_function_start): Likewise.
6160 * gcc.c (CHKP_SPEC): Likewise.
6161 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6162 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6163 (wrestrict_dom_walker::check_call): Likewise.
6164 * gimple.c (gimple_build_call_from_tree): Likewise.
6165 * gimple.h (enum gf_mask): Likewise.
6166 (gimple_call_with_bounds_p): Likewise.
6167 (gimple_call_set_with_bounds): Likewise.
6168 * gimplify.c (gimplify_init_constructor): Likewise.
6169 * ipa-cp.c (initialize_node_lattices): Likewise.
6170 (propagate_constants_across_call): Likewise.
6171 (find_more_scalar_values_for_callers_subset): Likewise.
6172 * ipa-hsa.c (process_hsa_functions): Likewise.
6173 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6174 * ipa-icf.c (sem_function::merge): Likewise.
6175 * ipa-inline.c (early_inliner): Likewise.
6176 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6177 (warn_function_cold): Likewise.
6178 (propagate_pure_const): Likewise.
6179 * ipa-ref.h (enum GTY): Likewise.
6180 * ipa-split.c (find_retbnd): Likewise.
6181 (consider_split): Likewise.
6182 (split_function): Likewise.
6183 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6184 * ipa.c (walk_polymorphic_call_targets): Likewise.
6185 (symbol_table::remove_unreachable_nodes): Likewise.
6186 (process_references): Likewise.
6187 (cgraph_build_static_cdtor_1): Likewise.
6188 * lto-cgraph.c (lto_output_node): Likewise.
6189 (output_refs): Likewise.
6190 (compute_ltrans_boundary): Likewise.
6191 (input_overwrite_node): Likewise.
6192 (input_node): Likewise.
6193 (input_cgraph_1): Likewise.
6194 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6195 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6196 (class pass_chkp_instrumentation_passes): Likewise.
6197 (make_pass_chkp_instrumentation_passes): Likewise.
6198 * passes.def: Likewise.
6199 * rtl.h (struct GTY): Likewise.
6200 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6201 * stor-layout.c (layout_type): Likewise.
6202 * symtab.c: Likewise.
6203 * target.def: Likewise.
6204 * targhooks.c (default_chkp_bound_type): Likewise.
6205 (default_chkp_bound_mode): Likewise.
6206 (default_builtin_chkp_function): Likewise.
6207 (default_chkp_function_value_bounds): Likewise.
6208 (default_chkp_make_bounds_constant): Likewise.
6209 (default_chkp_initialize_bounds): Likewise.
6210 * targhooks.h (default_chkp_bound_type): Likewise.
6211 (default_chkp_bound_mode): Likewise.
6212 (default_builtin_chkp_function): Likewise.
6213 (default_chkp_function_value_bounds): Likewise.
6214 (default_chkp_make_bounds_constant): Likewise.
6215 (default_chkp_initialize_bounds): Likewise.
6216 * toplev.c (compile_file): Likewise.
6217 (process_options): Likewise.
6218 * tree-core.h (DEF_BUILTIN): Likewise.
6219 (DEF_BUILTIN_CHKP): Likewise.
6220 * tree-inline.c (declare_return_variable): Likewise.
6221 (remap_gimple_stmt): Likewise.
6222 (copy_bb): Likewise.
6223 (initialize_inlined_parameters): Likewise.
6224 (expand_call_inline): Likewise.
6225 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6226 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6227 (make_pass_ipa_chkp_produce_thunks): Likewise.
6228 (make_pass_chkp): Likewise.
6229 (make_pass_chkp_opt): Likewise.
6230 (make_pass_chkp_instrumentation_passes): Likewise.
6231 * tree-pretty-print.c (dump_generic_node): Likewise.
6232 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6233 * tree-ssa-dce.c (propagate_necessity): Likewise.
6234 (eliminate_unnecessary_stmts): Likewise.
6235 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6236 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6237 * tree-ssa-sccvn.h: Likewise.
6238 * tree-ssa-strlen.c (get_string_length): Likewise.
6239 (valid_builtin_call): Likewise.
6240 (adjust_last_stmt): Likewise.
6241 (handle_builtin_strchr): Likewise.
6242 (handle_builtin_strcpy): Likewise.
6243 (handle_builtin_stxncpy): Likewise.
6244 (handle_builtin_memcpy): Likewise.
6245 (handle_builtin_strcat): Likewise.
6246 (strlen_check_and_optimize_stmt): Likewise.
6247 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6248 * tree-streamer-in.c: Likewise.
6249 * tree-streamer.c (record_common_node): Likewise.
6250 * tree.c (tree_code_size): Likewise.
6251 (wide_int_to_tree_1): Likewise.
6252 (type_contains_placeholder_1): Likewise.
6253 (build_common_tree_nodes): Likewise.
6254 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6255 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6256 (POINTER_BOUNDS_P): Likewise.
6257 (BOUNDED_TYPE_P): Likewise.
6258 (BOUNDED_P): Likewise.
6259 (CALL_WITH_BOUNDS_P): Likewise.
6260 (pointer_bounds_type_node): Likewise.
6261 * value-prof.c (gimple_ic): Likewise.
6262 * var-tracking.c (vt_add_function_parameters): Likewise.
6263 * varasm.c (make_decl_rtl): Likewise.
6264 (assemble_start_function): Likewise.
6265 (output_constant): Likewise.
6266 (maybe_assemble_visibility): Likewise.
6267 * varpool.c (ctor_for_folding): Likewise.
6268 * chkp-builtins.def: Remove.
6269 * ipa-chkp.c: Remove.
6270 * ipa-chkp.h: Remove.
6271 * rtl-chkp.c: Remove.
6272 * rtl-chkp.h: Remove.
6273 * tree-chkp-opt.c: Remove.
6274 * tree-chkp.c: Remove.
6275 * tree-chkp.h: Remove.
6277 2018-06-07 Carl Love <cel@us.ibm.com>
6279 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6280 vextract_fp_from_shortl): Add BE support.
6282 2018-06-07 Paul Koning <ni1d@arrl.net>
6284 * compare-elim.c (try_merge_compare): Don't merge compare if
6285 address contains a side effect.
6286 (try_eliminate_compare): Likewise.
6288 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6290 * config.gcc: Support "tremont".
6291 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6292 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6294 * config/i386/i386.c (m_TREMONT): Define.
6295 (processor_target_table): Add "tremont".
6296 (PTA_TREMONT): Define.
6297 (ix86_lea_outperforms): Add TARGET_TREMONT.
6298 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6299 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6300 and M_INTEL_GOLDMONT_PLUS.
6301 (fold_builtin_cpu): Add "tremont".
6302 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6303 (ix86_option_override_internal): Add "tremont".
6304 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6305 (processor_type): Add PROCESSOR_TREMONT.
6306 * config/i386/x86-tune.def: Add m_TREMONT.
6307 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6309 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6311 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6312 symbol defined for msp430i* devices to be lower case.
6314 2018-06-07 Richard Biener <rguenther@suse.de>
6316 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6317 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6318 Properly wrap signed arithmetic if overflow wraps.
6320 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6322 PR tree-optimization/69615
6323 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6324 of a cast from a same precision integral SSA_NAME in a bb dominated
6325 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6326 cast to utype if rhs2 has already a compatible type.
6328 2018-06-07 Richard Biener <rguenther@suse.de>
6330 PR tree-optimization/85935
6331 * graphite-scop-detection.c (find_params_in_bb): Analyze
6332 condition operands with respect to the correct loop. Assert
6333 the analysis doesn't fail.
6335 2018-06-04 Carl Love <cel@us.ibm.com>
6337 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6338 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6339 as it is slightly cheaper.
6340 (first_match_or_eos_index_<mode>):
6341 Calculate index using natural element order.
6342 (first_match_index_<mode>):
6343 Calculate index using natural element order.
6344 (first_match_or_eos_index_<mode>):
6345 Calculate index using natural order.
6346 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6347 for BE and LE modes.
6348 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6349 P9V_BUILTIN_VCLZLSBB_V16QI.
6350 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6353 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6355 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6356 indentation and line wrap for many prototypes. Add missing
6357 @smallexample directives around block of prototypes for vec_xl and
6360 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6362 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6363 track if we pass or return IEEE 128-bit floating point.
6364 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6365 C++ mangling that is compatible with GCC 8.1.
6366 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6367 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6368 floating point types.
6369 (rs6000_function_arg_advance_1): Likewise.
6370 (rs6000_mangle_type): Optionally generate mangled names that match
6371 what GCC 8.1 generated for IEEE 128-bit floating point types.
6372 (rs6000_globalize_decl_name): If we have an external function that
6373 passes or returns IEEE 128-bit types, generate a weak reference
6374 from the mangled name used in GCC 8.1 to the current mangled
6376 (rs6000_init_builtins): Make __ibm128 use the long double type if
6377 long double is IBM extended double. Make __float128 use the long
6378 double type if long double is IEEE 128-bit.
6381 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6382 macro for __ibm128 built-in functions.
6383 (PACK_IF): Add __ibm128 pack/unpack functions.
6384 (UNPACK_IF): Likewise.
6385 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6386 enable long double built-in functions if long double is IEEE
6387 128-bit floating point.
6388 (rs6000_invalid_builtin): Update long double built-in function
6390 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6391 functions, adjust the built-in function to use the long double
6392 built-in function if __ibm128 and long double are the same type.
6393 * doc/extend.texi (PowerPC builtins): Update documention for
6394 __builtin_{,un}pack_longdouble. Add documentation for
6395 __builtin_{,un}pack_ibm128.
6397 2018-06-06 Jim Wilson <jimw@sifive.com>
6399 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6400 (struct machine_function): New field interrupt_mode.
6401 (riscv_handle_type_attribute): New function. Add forward declaration.
6402 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6403 (riscv_expand_epilogue): Check interrupt_mode field.
6404 (riscv_set_current_function): Check interrupt attribute args and
6405 set interrupt_mode field.
6406 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6407 (riscv_sret, riscv_uret): New.
6408 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6409 new arguments to interrupt attribute.
6411 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6414 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6415 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6417 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6419 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6420 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6421 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6422 several redundant entries.
6424 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6426 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6427 type from "rtx" to "rtx_insn *".
6428 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6429 for local "call_insn", removing cast.
6430 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6432 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6434 PR tree-optimization/86066
6435 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6436 for BIT_INSERT_EXPR stores.
6438 2018-06-06 Richard Biener <rguenther@suse.de>
6440 PR tree-optimization/86062
6441 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6442 component refs ontop
6443 of to be offsetted base.
6445 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6447 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6448 to be static and remove check on interrupt attribute name.
6450 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6452 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6453 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6455 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6458 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6460 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6461 Remove second argument, change how error is called.
6462 (aarch64_layout_arg): Remove second argument from
6463 aarch64_err_no_fpadvsimd call.
6464 (aarch64_init_cumulative_args): Ditto.
6465 (aarch64_gimplify_va_arg_expr): Ditto.
6466 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6468 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6470 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6471 (*simple_return_indirect_internal<mode>): Rename from
6472 simple_return_indirect_internal. Use W mode iterator.
6473 (rstorssp): New expander.
6474 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6475 (clrssbsy): New expander.
6476 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6478 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6480 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6482 (cmse_check_pointed_object): Likewise.
6484 2018-06-05 Martin Liska <mliska@suse.cz>
6486 PR gcov-profile/47618
6487 * doc/invoke.texi: Document how -fprofile-dir format
6490 2018-06-05 Richard Biener <rguenther@suse.de>
6492 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6493 removal pretend DOM info isn't available so we do not update
6494 it and only remove edges, not dominated blocks. Actually free
6495 DOM info in case we removed something. Remove unreachable blocks.
6496 (mfb_keep_latches): Work with either DOM info or marked backedges.
6497 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6498 first. Mark backedges if DOM info isn't available.
6499 (Re-)compute DOM info after cleanup_control_flow_pre.
6501 2018-06-05 Richard Biener <rguenther@suse.de>
6503 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6504 (locus_discrim_hasher::hash): Adjust.
6505 (locus_discrim_hasher::equal): Likewise.
6506 (next_discriminator_for_locus): Work on line directly.
6507 (same_line_p): Pass in expanded locus1 as well.
6508 (assign_discriminators): Avoid redundant location expansions.
6510 2018-06-05 Richard Biener <rguenther@suse.de>
6512 PR tree-optimization/86046
6513 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6514 if required after clearing TREE_ADDRESSABLE.
6516 2018-06-05 Richard Biener <rguenther@suse.de>
6518 PR tree-optimization/86047
6519 * tree-ssa-loop.c (for_each_index): Glob handling of all
6520 decls and constants and really handle all of them.
6522 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6525 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6526 qualifier_void_pointer and qualifier_const_void_pointer.
6527 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6528 (arm_init_builtins): Handle the above.
6529 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6530 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6531 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6534 2018-06-05 Martin Liska <mliska@suse.cz>
6536 * auto-profile.c (read_autofdo_file): Do not use
6537 gcov_ctr_summary struct.
6538 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6539 * coverage.c (struct counts_entry): Likewise.
6540 (read_counts_file): Read just single summary entry.
6541 (get_coverage_counts): Use gcov_summary struct.
6542 * coverage.h (get_coverage_counts): Likewise.
6543 * gcov-dump.c (dump_working_sets): Likewise.
6544 (tag_summary): Dump just single summary.
6545 * gcov-io.c (gcov_write_summary): Write just histogram
6547 (gcov_read_summary): Read just single summary.
6548 (compute_working_sets): Use gcov_summary struct.
6549 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6550 of GCOV_COUNTERS_SUMMABLE.
6551 (GCOV_COUNTERS_SUMMABLE): Remove.
6552 (GCOV_FIRST_VALUE_COUNTER): Replace with
6553 GCOV_COUNTER_V_INTERVAL.
6554 (struct gcov_ctr_summary): Remove.
6555 (struct gcov_summary): Directly use fields of former
6557 (compute_working_sets): Use gcov_summary struct.
6558 * gcov.c (read_count_file): Do not use ctrs fields.
6559 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6561 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6563 * profile.c: Likewise.
6564 * profile.h: Likewise.
6566 2018-06-05 Martin Liska <mliska@suse.cz>
6568 PR gcov-profile/84846
6569 * gcov.c (output_lines): Print working directory only
6570 in intermediate format.
6572 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6574 * config/s390/s390-builtin-types.def: Add void function type.
6575 * config/s390/s390-builtins.def: Use the function type for the
6578 2018-06-04 Jim Wilson <jimw@sifive.com>
6580 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6582 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6583 and maybe_eh_return. Change regno to unsigned int. Use new args to
6584 handle EH_RETURN_DATA_REGNO registers properly.
6585 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6586 (riscv_expand_epilogue): Update comment. Change argument name and
6587 type. Update code to use new name and type. Pass new args to
6588 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6590 * config/riscv/riscv.md (NORMAL_RETURN): New.
6591 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6592 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6593 (eh_return): Call gen_eh_return_internal and emit barrier.
6594 (eh_return_internal): Call riscv_expand_epilogue.
6596 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6598 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6599 bit_insertion field and declare can_be_merged_into method.
6600 (merged_store_group::can_be_merged_into): New method.
6601 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6602 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6603 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6605 2018-06-04 Richard Biener <rguenther@suse.de>
6607 PR tree-optimization/85955
6608 * builtins.c (fold_builtin_sincos): Convert pointers to
6609 destination to appropriate type before dereferencing.
6611 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6613 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6615 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6617 * expr.c (expand_expr_real_1): Force the operand into memory if
6618 its TYPE_MODE is BLKmode and if there is no integer mode for
6619 the number of bits being extracted.
6621 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6625 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6626 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6628 2018-06-04 Richard Biener <rguenther@suse.de>
6630 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6631 (cleanup_tree_cfg_noloop): ... single caller. Do
6632 start_recording_case_labels later.
6634 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6636 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6637 to _IMMINTRIN_H_INCLUDED.
6638 * config/i386/pconfigintrin.h: Ditto.
6639 * config/i386/waitpkgintrin.h: Ditto.
6640 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6641 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6642 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6643 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6644 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6645 waitpkgintrin.h and cldemoteintrin.h.
6647 2018-06-04 Richard Biener <rguenther@suse.de>
6649 PR tree-optimization/86038
6650 * tracer.c (find_best_successor): Check probability for
6651 being initialized, bail out if not.
6653 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6656 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6657 of bits to ignore when comparing architectures.
6659 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6661 PR tree-optimization/69615
6662 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6663 maximum or minimum of the type, try to merge it also as if
6664 range1 is + [-, x - 1] or + [x + 1, -].
6667 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6669 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6671 PR tree-optimization/86034
6672 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6673 the unsigned bitfield type in a bit insertion sequence if it does not
6674 have a larger precision than the bitfield size.
6675 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6677 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6679 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6681 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6683 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6684 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6685 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6686 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6688 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6690 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6691 Disable -fdelete-null-pointer-checks for ELF toolchain.
6693 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6694 Kito Cheng <kito.cheng@gmail.com>
6696 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6697 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6698 (nds32*-*-*): Add glibc and uclibc conditions.
6699 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6700 (TARGET_EXCEPT_UNWIND_INFO): Define.
6701 * config/nds32/elf.h: New file.
6702 * config/nds32/linux.h: New file.
6703 * config/nds32/nds32-elf.opt: New file.
6704 * config/nds32/nds32-linux.opt: New file.
6705 * config/nds32/nds32-fp-as-gp.c
6706 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6707 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6709 (nds32_asm_file_end): Ditto.
6710 (nds32_print_operand): Ditto.
6711 (nds32_insert_attributes): Ditto.
6712 (nds32_init_libfuncs): New function.
6713 (TARGET_HAVE_TLS): Define.
6714 (TARGET_INIT_LIBFUNCS): Define.
6715 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6717 (TARGET_ELF): Apply different mcmodel setting.
6718 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6719 been migrated into elf.h and linux.h files.
6720 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6721 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6722 (mcmodel): The content has been migrated into nds32-elf.opt and
6723 nds32-linux.opt files.
6724 * config/nds32/t-elf: New file.
6725 * config/nds32/t-linux: New file.
6727 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6728 Shiva Chen <shiva0217@gmail.com>
6730 * config/nds32/constants.md (unspec_volatile_element): Add
6731 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6732 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6734 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6735 (make_pass_nds32_fp_as_gp): Declare.
6736 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6738 (nds32_asm_function_end_prologue): Remove unused asm output.
6739 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6740 (nds32_asm_file_start): Output necessary fp_as_gp information.
6741 (nds32_option_override): Adjust register usage.
6742 (nds32_expand_prologue): Consider fp_as_gp situation.
6743 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6744 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6747 (simple_return): Ditto.
6748 (omit_fp_begin): Output special directive for fp_as_gp.
6749 (omit_fp_end): Output special directive for fp_as_gp.
6750 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6751 mforbid-fp-as-gp): New options.
6753 2018-06-01 Mark Wielaard <mark@klomp.org>
6755 * dwarf2out.c (dwarf2out_finish): Remove generation of
6756 DW_AT_loclists_base.
6758 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6760 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6761 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6762 (struct merged_store_group): Add bit_insertion field.
6763 (dump_char_array): Use standard hexadecimal format.
6764 (merged_store_group::merged_store_group): Set bit_insertion to false.
6765 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6766 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6767 also print the mask in the dump file.
6768 (pass_store_merging::gate): Minor tweak.
6769 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6770 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6771 stores with INTEGER_CST stores.
6772 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6773 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6774 and use it throughout. Generate bit insertion sequences if need be.
6775 (pass_store_merging::process_store): Remove redundant condition.
6776 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6778 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6780 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6781 the 128-bit floating point types. Fix function comment.
6783 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6785 * config/aarch64/aarch64-simd.md
6786 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6788 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6791 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6793 PR tree-optimization/85989
6794 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6796 (backprop::intersect_uses): Check it when deciding whether this
6797 is a backedge reference.
6798 (backprop::process_block): Add each phi to m_visited_phis
6799 after visiting it, then clear it at the end.
6801 2018-06-01 Richard Biener <rguenther@suse.de>
6803 * tree-vectorizer.h (vect_dr_stmt): New function.
6804 (vect_get_load_cost): Adjust.
6805 (vect_get_store_cost): Likewise.
6806 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6807 Use vect_dr_stmt instead of DR_SMTT.
6808 (vect_record_base_alignments): Likewise.
6809 (vect_calculate_target_alignment): Likewise.
6810 (vect_compute_data_ref_alignment): Likewise and make static.
6811 (vect_update_misalignment_for_peel): Likewise.
6812 (vect_verify_datarefs_alignment): Likewise.
6813 (vector_alignment_reachable_p): Likewise.
6814 (vect_get_data_access_cost): Likewise. Pass down
6815 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6816 (vect_get_peeling_costs_all_drs): Likewise.
6817 (vect_peeling_hash_get_lowest_cost): Likewise.
6818 (vect_enhance_data_refs_alignment): Likewise.
6819 (vect_find_same_alignment_drs): Likewise.
6820 (vect_analyze_data_refs_alignment): Likewise.
6821 (vect_analyze_group_access_1): Likewise.
6822 (vect_analyze_group_access): Likewise.
6823 (vect_analyze_data_ref_access): Likewise.
6824 (vect_analyze_data_ref_accesses): Likewise.
6825 (vect_vfa_segment_size): Likewise.
6826 (vect_small_gap_p): Likewise.
6827 (vectorizable_with_step_bound_p): Likewise.
6828 (vect_prune_runtime_alias_test_list): Likewise.
6829 (vect_analyze_data_refs): Likewise.
6830 (vect_supportable_dr_alignment): Likewise.
6831 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6832 (vect_gen_prolog_loop_niters): Likewise.
6833 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6834 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6836 (vect_recog_mask_conversion_pattern): Likewise.
6837 (vect_try_gather_scatter_pattern): Likewise.
6838 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6839 to vect_get_store_cost.
6840 (vect_get_store_cost): Get stmt_info instead of DR.
6841 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6842 (vect_get_load_cost): Get stmt_info instead of DR.
6844 2018-06-01 Richard Biener <rguenther@suse.de>
6847 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6848 vars wrapped in MEM_REFs.
6850 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6852 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6853 Fix subreg tests so that we only return a choice between
6854 GENERAL_REGS and FP_REGS if the original classes included both.
6856 2018-06-01 Richard Biener <rguenther@suse.de>
6859 * tree-ssa-structalias.c (get_function_part_constraint):
6860 Handle NULL fi->decl.
6861 (find_func_aliases_for_call): Properly handle indirect
6862 fi from direct call.
6863 (find_func_clobbers): Likewise.
6864 (ipa_pta_execute): Likewise.
6865 (create_variable_info_for): For functions that are ifunc_resolver
6866 resolve to a varinfo that contains the result of the resolver call.
6867 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6870 2018-05-31 Michael Collison <michael.collison@arm.com>
6872 * config/aarch64/aarch64.md:
6873 (*fix_to_zero_extenddfdi2): New pattern.
6874 * gcc.target/aarch64/fix_extend1.c: New testcase.
6876 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6880 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6881 and BUILT_IN_STRNCMP_EQ.
6882 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6883 BUILT_IN_STRNCMP_EQ.
6884 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6885 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6886 (gimple_fold_builtin): Likewise.
6887 * tree-ssa-strlen.c (compute_string_length): New function.
6888 (determine_min_obsize): New function.
6889 (handle_builtin_string_cmp): New function to handle calls to
6890 string compare functions.
6891 (strlen_optimize_stmt): Add handling to builtin string compare
6893 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6894 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6895 * tree.c (build_common_builtin_nodes): Add new defines of
6896 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6898 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6901 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6902 functions with naked attribute.
6904 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6906 * config/i386/sse.md (avx_vec_concat<mode>):
6907 Substitute concat_tg_mode mode attribute with xtg_mode.
6908 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6909 (concat_tg_mode): Remove mode attribute.
6911 2018-05-31 Martin Sebor <msebor@redhat.com>
6914 * calls.c (alloc_max_size): Correct a logic error/typo.
6915 Treat excessive arguments as infinite. Warn for invalid arguments.
6916 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6918 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6921 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6922 and movx for Haswell.
6924 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6925 Cesar Philippidis <cesar@codesourcery.com>
6928 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6929 when emitting error on private/firstprivate reductions.
6930 * omp-low.c (lower_omp_target): Avoid reference-type processing
6931 on pointers for firstprivate clause.
6933 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6935 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6938 * config/aarch64/aarch64-simd.md
6939 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6940 (aarch64_ld1_x3_<mode>): Likewise
6941 (aarch64_st1x2<VALLDIF:mode>): Likewise
6942 (aarch64_st1_x2_<mode>): Likewise
6943 (aarch64_st1x3<VALLDIF:mode>): Likewise
6944 (aarch64_st1_x3_<mode>): Likewise
6945 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6946 (vld1_s8_x3): Likewise.
6947 (vld1_u16_x3): Likewise.
6948 (vld1_s16_x3): Likewise.
6949 (vld1_u32_x3): Likewise.
6950 (vld1_s32_x3): Likewise.
6951 (vld1_u64_x3): Likewise.
6952 (vld1_s64_x3): Likewise.
6953 (vld1_f16_x3): Likewise.
6954 (vld1_f32_x3): Likewise.
6955 (vld1_f64_x3): Likewise.
6956 (vld1_p8_x3): Likewise.
6957 (vld1_p16_x3): Likewise.
6958 (vld1_p64_x3): Likewise.
6959 (vld1q_u8_x3): Likewise.
6960 (vld1q_s8_x3): Likewise.
6961 (vld1q_u16_x3): Likewise.
6962 (vld1q_s16_x3): Likewise.
6963 (vld1q_u32_x3): Likewise.
6964 (vld1q_s32_x3): Likewise.
6965 (vld1q_u64_x3): Likewise.
6966 (vld1q_s64_x3): Likewise.
6967 (vld1q_f16_x3): Likewise.
6968 (vld1q_f32_x3): Likewise.
6969 (vld1q_f64_x3): Likewise.
6970 (vld1q_p8_x3): Likewise.
6971 (vld1q_p16_x3): Likewise.
6972 (vld1q_p64_x3): Likewise.
6973 (vst1_s64_x2): Likewise.
6974 (vst1_u64_x2): Likewise.
6975 (vst1_f64_x2): Likewise.
6976 (vst1_s8_x2): Likewise.
6977 (vst1_p8_x2): Likewise.
6978 (vst1_s16_x2): Likewise.
6979 (vst1_p16_x2): Likewise.
6980 (vst1_s32_x2): Likewise.
6981 (vst1_u8_x2): Likewise.
6982 (vst1_u16_x2): Likewise.
6983 (vst1_u32_x2): Likewise.
6984 (vst1_f16_x2): Likewise.
6985 (vst1_f32_x2): Likewise.
6986 (vst1_p64_x2): Likewise.
6987 (vst1q_s8_x2): Likewise.
6988 (vst1q_p8_x2): Likewise.
6989 (vst1q_s16_x2): Likewise.
6990 (vst1q_p16_x2): Likewise.
6991 (vst1q_s32_x2): Likewise.
6992 (vst1q_s64_x2): Likewise.
6993 (vst1q_u8_x2): Likewise.
6994 (vst1q_u16_x2): Likewise.
6995 (vst1q_u32_x2): Likewise.
6996 (vst1q_u64_x2): Likewise.
6997 (vst1q_f16_x2): Likewise.
6998 (vst1q_f32_x2): Likewise.
6999 (vst1q_f64_x2): Likewise.
7000 (vst1q_p64_x2): Likewise.
7001 (vst1_s64_x3): Likewise.
7002 (vst1_u64_x3): Likewise.
7003 (vst1_f64_x3): Likewise.
7004 (vst1_s8_x3): Likewise.
7005 (vst1_p8_x3): Likewise.
7006 (vst1_s16_x3): Likewise.
7007 (vst1_p16_x3): Likewise.
7008 (vst1_s32_x3): Likewise.
7009 (vst1_u8_x3): Likewise.
7010 (vst1_u16_x3): Likewise.
7011 (vst1_u32_x3): Likewise.
7012 (vst1_f16_x3): Likewise.
7013 (vst1_f32_x3): Likewise.
7014 (vst1_p64_x3): Likewise.
7015 (vst1q_s8_x3): Likewise.
7016 (vst1q_p8_x3): Likewise.
7017 (vst1q_s16_x3): Likewise.
7018 (vst1q_p16_x3): Likewise.
7019 (vst1q_s32_x3): Likewise.
7020 (vst1q_s64_x3): Likewise.
7021 (vst1q_u8_x3): Likewise.
7022 (vst1q_u16_x3): Likewise.
7023 (vst1q_u32_x3): Likewise.
7024 (vst1q_u64_x3): Likewise.
7025 (vst1q_f16_x3): Likewise.
7026 (vst1q_f32_x3): Likewise.
7027 (vst1q_f64_x3): Likewise.
7028 (vst1q_p64_x3): Likewise.
7030 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7032 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7033 user_label_prefix to name.
7035 * tree-core.h: Update comment about the format of NAME string
7036 passed to handler in attribute_spec.
7038 * config/msp430/msp430.md: Remove erroneous subreg expression from
7039 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7040 zero_extend{q,h}isi2.
7042 2018-05-30 Borislav Petkov <bp@suse.de>
7044 * doc/extend.texi: Document some architecture specific
7045 constraints and sort entries.
7047 2018-05-30 Martin Sebor <msebor@redhat.com>
7050 * builtins.c (expand_builtin_stpcpy_1): New function.
7051 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7052 only if the former succeeds.
7054 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7056 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7059 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7061 * doc/invoke.texi (-flinker-output): Document
7063 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7065 * passes.c (ipa_write_summaries): Only modify statements if body
7067 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7068 incrementally linking.
7069 (ipa_passes): Likewise.
7070 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7071 pass down resolution info.
7072 * common.opt (flag_incremental_link): Update info.
7073 * gcc.c (plugin specs): Turn flinker-output=* to
7074 -plugin-opt=-linker-output-known
7075 * toplev.c (compile_file): Also cut compilation when doing incremental
7077 * flag-types. (enum lto_partition_model): Add
7078 LTO_LINKER_OUTPUT_NOLTOREL.
7079 (invoke.texi): Add -flinker-output docs.
7080 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7081 link same way as WPA; do not stream in dead initializers.
7083 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7084 darf2out_register_external_decl): Support incremental link.
7086 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7088 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7090 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7092 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7093 it down to simple_object_copy_lto_debug_sections.
7094 (run_gcc): Determine incremental LTO link time and configure
7095 lto1 into non-wpa mode, disable renaming of debug sections.
7097 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7099 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7100 descriptions of various incorrectly documented functions.
7102 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7105 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7106 address check not strict.
7108 2018-05-30 Richard Biener <rguenther@suse.de>
7110 PR tree-optimization/85964
7111 * tracer.c (better_p): Drop initialized count check, we only
7112 call the function with initialized counts now.
7113 (find_best_successor): Do find a best edge if one
7114 has uninitialized count.
7115 (find_best_predecessor): Likewise. Do BB frequency check only
7116 if count is initialized.
7118 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7120 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7121 (aarch64_ldrstr_offset_compare): New.
7122 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7123 load/store orderings.
7124 (aarch64_gen_adjusted_ldpstp): Likewise.
7126 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7128 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7129 Check for subset of GENERAL_REGS and FP_REGS.
7130 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7133 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7135 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7136 and wi::to_poly_offset. Add the current offset and then check
7137 whether the sum fits, rather than using an unchecked addition of
7138 a checked term. Check for a shwi rather than a uhwi.
7139 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7140 (store_constructor): Use poly_int_tree_p.
7141 (expand_expr_real_1): Likewise.
7142 * function.c (assign_temp): Likewise.
7143 * fold-const.c (const_binop): Use poly_int_tree_p and
7145 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7147 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7148 to_poly_offset for MEM offsets.
7149 * ipa-icf.c (sem_variable::equals): Likewise.
7150 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7151 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7152 wi::to_poly_offset for BIT_FIELD_REF offsets.
7153 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7155 * var-tracking.c (emit_note_insn_var_location): Use
7156 tree_to_poly_uint64.
7158 2018-05-29 Jim Wilson <jimw@sifive.com>
7160 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7162 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7165 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7166 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7168 (sse4_1_round<mode>2): Use nonimmediate_operand
7169 for operand 1 predicate.
7171 2018-05-29 Martin Sebor <msebor@redhat.com>
7172 Richard Biener <rguenther@suse.de>
7175 * calls.c (get_size_range): Call determine_value_range instead
7176 of get_value_range..
7177 * tree-vrp.h (determine_value_range): Declared new function.
7178 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7180 2018-05-29 Richard Biener <rguenther@suse.de>
7182 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7183 sure to use non-pattern stmts for get_earlier_stmt arguments.
7184 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7185 called on pattern stmts.
7186 (get_later_stmt): Likewise.
7188 2018-05-29 Martin Liska <mliska@suse.cz>
7190 PR gcov-profile/85759
7191 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7194 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7196 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7198 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7202 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7203 VEC_PACK_FLOAT_EXPR): New tree codes.
7204 * tree-pretty-print.c (op_code_prio): Handle
7205 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7206 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7207 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7208 * tree-inline.c (estimate_operator_cost): Likewise.
7209 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7210 * fold-const.c (const_binop): Likewise.
7211 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7212 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7213 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7214 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7215 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7216 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7217 * expr.c (expand_expr_real_2): Likewise.
7218 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7219 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7220 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7222 * optabs.c (expand_widen_pattern_expr): For
7223 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7224 sign from result type rather than operand's type.
7225 (expand_binop_directly): For vec_packu_float_optab and
7226 vec_packs_float_optab allow result type to be different from operand's
7228 * optabs-tree.c (optab_for_tree_code): Handle
7229 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7230 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7231 * tree-vect-generic.c (expand_vector_operations_1): Handle
7232 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7233 VEC_PACK_FLOAT_EXPR.
7234 * tree-vect-stmts.c (supportable_widening_operation): Handle
7236 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7237 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7238 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7239 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7240 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7242 (vec_pack<floatprefix>_float_<mode>): New expander.
7243 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7245 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7246 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7247 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7248 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7249 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7251 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7252 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7253 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7254 VEC_PACK_FLOAT_EXPR): Document.
7256 2018-05-29 Richard Biener <rguenther@suse.de>
7258 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7260 (stmt_vec_info_vec): Make pointer.
7261 (init_stmt_vec_info_vec): Remove.
7262 (free_stmt_vec_info_vec): Likewise.
7263 (set_stmt_vec_info_vec): New function.
7264 (free_stmt_vec_infos): Likewise.
7265 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7266 (set_vinfo_for_stmt): Likewise.
7267 (get_earlier_stmt): Likewise.
7268 (get_later_stmt): Likewise.
7269 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7270 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7271 (vec_info::~vec_info): Free stmt_vec_infos.
7272 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7273 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7274 (pass_slp_vectorize::execute): Likewise.
7275 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7276 (free_stmt_vec_info_vec): Likewise.
7277 (set_stmt_vec_info_vec): New function.
7278 (free_stmt_vec_infos): Likewise.
7279 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7280 the global stmt_vec_info_vec.
7281 * tree-parloops.c (gather_scalar_reductions): Use
7282 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7285 2018-05-29 Richard Biener <rguenther@suse.de>
7287 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7289 2018-05-29 Martin Liska <mliska@suse.cz>
7290 David Malcolm <dmalcolm@redhat.com>
7292 * vec.c (test_reverse): New.
7293 (vec_c_tests): Add new test.
7294 * vec.h (vl_ptr>::reverse): New function.
7296 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7298 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7300 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7303 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7305 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7307 2018-05-28 Richard Biener <rguenther@suse.de>
7309 PR tree-optimization/85933
7310 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7311 look at stmts marked as vectorizable.
7313 2018-05-28 Richard Biener <rguenther@suse.de>
7315 PR tree-optimization/85934
7316 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7317 vector boolean check before scalar optimization.
7319 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7321 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7324 2018-05-28 Mark Wielaard <mark@klomp.org>
7326 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7327 if it is an expression containing a minus sign.
7329 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7331 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7333 2018-05-27 Paul Koning <ni1d@arrl.net>
7335 * config/pdp11/pdp11.md (truncsihi2): Remove.
7337 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7338 Chung-Ju Wu <jasonwucj@gmail.com>
7340 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7342 (unaligned_store_dw): Ditto.
7343 * config/nds32/nds32-memory-manipulation.c
7344 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7345 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7346 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7347 (emit_setmem_word_loop): Rename to ...
7348 (emit_setmem_doubleword_loop): ... this.
7349 (nds32_gen_dup_4_byte_to_word_value): New function.
7350 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7351 (nds32_expand_setmem_loop): Refine implementation.
7352 (nds32_expand_setmem_loop_v3m): Ditto.
7353 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7356 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7358 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7360 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7362 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7363 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7364 machine->attr_no_prologue_p.
7365 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7366 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7367 (nds32_expand_epilogue): Consider attr_naked_p.
7368 (nds32_expand_epilogue_v3pop): Likewise.
7369 (nds32_can_use_return_insn): Likewise.
7370 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7371 attr_no_prologue_p fields.
7372 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7374 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7377 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7379 * config/i386/sse.md
7380 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7382 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7384 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7386 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7388 (*<floatsuffix>floatv2div2sf2): Rename to ...
7389 (*float<floatunssuffix>v2div2sf2): ... this.
7390 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7391 (float<floatunssuffix>v2div2sf2_mask): ... this.
7392 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7393 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7394 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7396 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7398 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7400 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7402 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7404 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7406 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7407 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7408 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7409 gen_ufix_truncv8dfv8si2.
7410 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7411 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7412 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7413 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7414 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7415 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7416 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7417 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7419 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7423 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7425 2018-05-25 Jim Wilson <jimw@sifive.com>
7427 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7428 * config/riscv/riscv.c (struct machine_function): Add
7429 interrupt_handler_p and attribute_checked_p fields.
7430 (riscv_attribute_table): Add interrupt.
7431 (riscv_interrupt_type_p): New.
7432 (riscv_save_reg_p): Save extra regs for interrupt handler.
7433 (riscv_use_save_libcall): Return false for interrupt handler.
7434 (riscv_first_stack_step): Add forward declaration.
7435 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7436 for interrupt handler with large frame. Use it for saved reg list.
7437 (riscv_expand_prologue): Move flag_stack_usage_info support to
7438 eliminate duplication.
7439 (riscv_expand_epilogue): Generate mret for interrupt handler.
7440 (riscv_epilogue_uses): New.
7441 (riscv_can_use_return_insn): Return false for interrupt handler.
7442 (riscv_function_ok_for_sibcall): Likewise.
7443 (riscv_set_current_function): Add interrupt handler support.
7444 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7445 * config/riscv/riscv.md (UNSPECV_MRET): New.
7447 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7449 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7451 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7453 PR tree-optimization/85712
7454 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7455 this candidate has already been replaced in-situ by a copy.
7457 2018-05-25 Jason Merrill <jason@redhat.com>
7459 PR c++/80485 - inline function non-zero address.
7460 * symtab.c (nonzero_address): Check DECL_COMDAT.
7462 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7465 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7466 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7467 extension of SImode operation. Use const123_operand predicate.
7468 (*saddsi_1): Remove.
7469 (*saddl_se_1): Ditto.
7471 (*ssubl_se_1): Ditto.
7472 * config/alpha/predicates.md (const123_operand): New predicate.
7473 * config/alpha/constraints.md (P): Use IN_RANGE.
7475 2018-05-25 Richard Biener <rguenther@suse.de>
7477 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7479 (ref_maybe_used_by_stmt_p): Likewise.
7480 (stmt_may_clobber_ref_p): Likewise.
7481 (stmt_may_clobber_ref_p_1): Likewise.
7482 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7484 (ref_maybe_used_by_stmt_p): Likewise.
7485 (stmt_may_clobber_ref_p): Likewise.
7486 (stmt_may_clobber_ref_p_1): Likewise.
7487 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7488 the alias oracle to disambiguate DRs with stmts DR analysis
7490 (vect_analyze_data_refs): Do not give up on not analyzable
7491 DRs for BB vectorization. Remove code truncating the dataref
7494 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7497 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7498 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7499 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7501 2018-05-25 Richard Biener <rguenther@suse.de>
7503 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7504 function, combining stmt data ref gathering and fatal analysis
7506 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7507 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7508 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7509 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7510 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7512 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7514 PR tree-optimization/85720
7515 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7516 SCC if all partitions are builtins.
7517 (version_loop_by_alias_check): New parameter. Generate cancelable
7518 runtime alias check if all partitions are builtins.
7519 (distribute_loop): Update call to above function.
7521 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7523 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7524 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7525 (parm_default_def_partition_arg): Ditto.
7526 (set_parm_default_def_partition): Ditto.
7527 (get_parm_default_def_partitions): Ditto and make it static.
7528 (get_undefined_value_partitions): Ditto and make it static.
7529 (remove_ssa_form): Refactor call to init_var_map here.
7530 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7531 computation for loop region.
7532 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7533 (register_default_def): Delete.
7534 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7535 (parm_default_def_partition_arg): Ditto.
7536 (set_parm_default_def_partition): Ditto.
7537 (get_parm_default_def_partitions): Ditto and make it static.
7538 (get_undefined_value_partitions): Ditto and make it static.
7539 (coalesce_with_default, coalesce_with_default): Update comment.
7540 (create_coalesce_list_for_region): New func factored out from
7541 create_outofssa_var_map.
7542 (populate_coalesce_list_for_outofssa): New func factored out from
7543 create_outofssa_var_map and coalesce_ssa_name.
7544 (create_outofssa_var_map): Delete.
7545 (coalesce_ssa_name): Refactor to support live range computation.
7546 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7547 (get_parm_default_def_partitions): Delete.
7548 (get_undefined_value_partitions): Ditto.
7549 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7550 computation for loop region.
7551 (new_tree_live_info, loe_visit_block): Ditto.
7552 (live_worklist, set_var_live_on_entry): Ditto.
7553 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7554 * tree-ssa-live.h (struct _var_map): New fields.
7555 (init_var_map): Change decl.
7556 (region_contains_p): New.
7558 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7560 * tree-ssa-live.h (live_merge_and_clear): Delete.
7562 2018-05-25 Richard Biener <rguenther@suse.de>
7565 * tree-dump.c (dequeue_and_dump): Remove access to removed
7566 operand 2 of a SWITCH_EXPR.
7568 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7570 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7571 multiplication and division.
7572 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7573 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7574 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7575 (cond_udiv_optab, cond_umod_optab): New optabs.
7576 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7577 (IFN_COND_RDIV): New internal functions.
7578 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7579 TRUNC_MOD_EXPR and RDIV_EXPR.
7580 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7581 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7583 (SVE_INT_BINARY): Include mult.
7584 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7585 (optab, sve_int_op): Handle mult.
7586 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7588 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7589 for SVE_INT_BINARY_SD.
7591 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7593 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7594 (optab, sve_int_op): Handle div and udiv.
7595 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7596 for SVE_INT_BINARY_SD.
7597 (*<optab><mode>3): New insn for the same.
7599 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7601 * tree-vect-patterns.c: Include predict.h.
7602 (vect_recog_divmod_pattern): Restrict check for division support
7603 to when optimizing for size.
7605 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7607 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7608 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7609 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7610 (gimple_match_op::set_op): Likewise.
7611 (gimple_resimplify4): Declare.
7612 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7613 (expr::gen_transform): Likewise.
7614 (decision_tree::gen): Generate a simplification routine for 4 operands.
7615 * gimple-match-head.c (gimple_simplify): Add an overload for
7616 4 operands. In the top-level function, handle up to 4 call
7617 arguments and call gimple_resimplify4.
7618 (gimple_resimplify4): New function.
7619 (build_call_internal): Pass a fourth operand.
7620 (maybe_push_to_seq): Likewise.
7621 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7622 Fold VEC_COND_EXPRs of an operation and a default value into
7623 an IFN_COND_* function if possible.
7624 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7626 (SVE_COND_FP_BINARY): Include them.
7627 (optab, sve_fp_op): Handle them.
7628 (SVE_INT_BINARY_REV): New code iterator.
7629 (SVE_COND_FP_BINARY_REV): New int iterator.
7630 (commutative): New int attribute.
7631 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7633 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7635 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7636 (*cond_<optab><mode>): New patterns for reversed operands.
7638 2018-05-25 Richard Biener <rguenther@suse.de>
7640 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7641 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7642 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7643 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7644 * tree-vect-data-refs.c (everywhere): Adjust users.
7645 * tree-vect-loop.c (everywhere): Likewise.
7646 * tree-vect-slp.c (everywhere): Likewise.
7647 * tree-vect-stmts.c (everywhere): Likewise.
7648 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7650 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7652 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7654 (gcc_cv_as_section_exclude): ... this.
7655 Try Solaris as #exclude syntax.
7656 * configure: Regenerate.
7657 * config.in: Regenerate.
7658 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7660 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7661 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7663 * varasm.c (default_elf_asm_named_section): Don't check if
7664 HAVE_GAS_SECTION_EXCLUDE is defined.
7666 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7668 * doc/md.texi: Update the documentation of the cond_* optabs
7669 to mention the new final operand. Fix GET_MODE_NUNITS call.
7670 Describe the scalar case too.
7671 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7672 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7674 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7675 (get_conditional_internal_fn): Update comment.
7676 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7677 accumulator value as a final argument to conditional functions.
7678 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7679 a define_expand and add an "else" operand. Assert for now that
7680 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7681 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7682 (*cond_<optab><mode>): New patterns.
7683 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7684 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7685 (UNSPEC_COND_EOR): Delete.
7686 (optab): Remove associated mappings.
7687 (SVE_INT_BINARY): New code iterator.
7688 (sve_int_op): Remove int attribute and add "minus" to the code
7690 (SVE_COND_INT_OP): Delete.
7691 (SVE_COND_FP_OP): Rename to...
7692 (SVE_COND_FP_BINARY): ...this.
7694 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7696 * optabs.c (can_reuse_operands_p): New function.
7697 (maybe_legitimize_operands): Try to reuse the results for
7700 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7702 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7703 Add {q} suffix to insn mnemonic.
7705 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7707 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7708 (msp430_warn_func_return): New.
7710 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7712 * fold-const.c (tree_nonzero_bits): New function.
7713 * fold-const.h (tree_nonzero_bits): Likewise.
7714 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7715 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7717 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7721 * varasm.c (assemble_alias): Check ifunc_resolver only on
7724 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7727 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7728 when memory input operand is handled.
7730 2018-05-24 Luis Machado <luis.machado@linaro.org>
7732 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7734 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7736 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7738 * match.pd: Delay FMA folds until after vectorization.
7740 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7743 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7744 address check not strict.
7746 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7748 * gimple-match.h (gimple_match_op): New class.
7749 (mprts_hook): Replace parameters with a gimple_match_op *.
7750 (maybe_build_generic_op): Likewise.
7751 (gimple_simplified_result_is_gimple_val): Replace parameters with
7752 a const gimple_match_op *.
7753 (gimple_simplify): Replace code_helper * and tree * parameters with
7754 a gimple_match_op * parameter.
7755 (gimple_resimplify1): Replace code_helper *, tree and tree *
7756 parameters with a gimple_match_op * parameter.
7757 (gimple_resimplify2): Likewise.
7758 (gimple_resimplify3): Likewise.
7759 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7760 parameters with a gimple_match_op * parameter.
7761 * gimple-match-head.c (gimple_simplify): Change prototypes of
7762 auto-generated functions to take a gimple_match_op * instead of
7763 separate code_helper * and tree * parameters. Make the same
7764 change in the top-level overload and update calls to the
7765 gimple_resimplify routines. Update calls to the auto-generated
7766 functions and to maybe_push_res_to_seq in the publicly-facing
7767 operation-specific gimple_simplify overloads.
7768 (gimple_match_op::MAX_NUM_OPS): Define.
7769 (gimple_resimplify1): Replace rcode and ops with a single res_op
7770 parameter. Update call to gimple_simplify.
7771 (gimple_resimplify2): Likewise.
7772 (gimple_resimplify3): Likewise.
7773 (mprts_hook): Replace parameters with a gimple_match_op *.
7774 (maybe_build_generic_op): Likewise.
7775 (build_call_internal): Replace type, nargs and ops with
7776 a gimple_match_op *.
7777 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7778 with a single gimple_match_op *. Update calls to mprts_hook,
7779 build_call_internal and gimple_simplified_result_is_gimple_val.
7780 Factor out code that is common to the tree_code and combined_fn cases.
7781 * genmatch.c (expr::gen_transform): Replace tem_code and
7782 tem_ops with a gimple_match_op called tem_op. Update calls
7783 to the gimple_resimplify functions and maybe_push_res_to_seq.
7784 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7785 res_ops. Update call to the gimple_resimplify functions.
7786 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7787 (decision_tree::gen): Make the functions take a gimple_match_op *
7788 called res_op instead of separate res_code and res_ops parameters.
7789 Update call accordingly.
7790 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7791 and ops with a single res_op parameter. Update calls to
7792 maybe_build_generic_op and maybe_push_res_to_seq.
7793 (fold_stmt_1): Update calls to gimple_simplify and
7794 replace_stmt_with_simplification.
7795 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7796 and gimple_simplified_result_is_gimple_val.
7797 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7799 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7800 with a gimple_match_op *.
7801 (vn_nary_build_or_lookup): Likewise. Update call to
7802 vn_nary_build_or_lookup_1.
7803 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7804 gimple_match_op *. Update calls to the gimple_resimplify routines
7805 and to gimple_simplified_result_is_gimple_val.
7806 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7807 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7808 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7809 (visit_nary_op): Likewise.
7810 (visit_reference_op_load): Likewise.
7812 2018-05-23 Luis Machado <luis.machado@linaro.org>
7814 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7815 modifier for printing the step amount.
7817 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7820 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7823 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7825 * doc/sourcebuild.texi (Endianness): New subsubsection.
7827 2018-05-23 Luis Machado <luis.machado@linaro.org>
7829 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7830 <prefetch_dynamic_strides>: New const bool field.
7831 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7832 prefetch_dynamic_strides.
7833 (exynosm1_prefetch_tune): Likewise.
7834 (thunderxt88_prefetch_tune): Likewise.
7835 (thunderx_prefetch_tune): Likewise.
7836 (thunderx2t99_prefetch_tune): Likewise.
7837 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7839 (aarch64_override_options_internal): Update to set
7840 PARAM_PREFETCH_DYNAMIC_STRIDES.
7841 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7842 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7843 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7844 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7845 prefetch-dynamic-strides setting.
7847 2018-05-23 Luis Machado <luis.machado@linaro.org>
7849 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7850 <minimum_stride>: New const int field.
7851 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7852 minimum_stride field defaulting to -1.
7853 (exynosm1_prefetch_tune): Likewise.
7854 (thunderxt88_prefetch_tune): Likewise.
7855 (thunderx_prefetch_tune): Likewise.
7856 (thunderx2t99_prefetch_tune): Likewise.
7857 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7858 <default_opt_level>: Set to 3.
7859 (aarch64_override_options_internal): Update to set
7860 PARAM_PREFETCH_MINIMUM_STRIDE.
7861 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7862 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7863 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7864 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7865 stride is constant and is below the minimum stride threshold.
7867 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7869 * config/arm/arm-cpus.in (mode26): Delete.
7870 (armv4): Delete mode26 reference.
7871 * config/arm/arm.c (arm_configure_build_target): Delete use of
7874 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7876 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7878 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7879 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7881 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7882 (floatunsdidf2): Ditto.
7884 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7886 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7887 (fixuns_trunc<mode>si2_avx512f): Ditto.
7888 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7889 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7890 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7892 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7894 PR rtl-optimization/79985
7895 * df-scan.c (df_insn_refs_collect): Remove special case for
7896 global registers and asm statements.
7898 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7900 * extend.texi (Global Register Variables): Rewrite the bullet list.
7901 Note that the register is available for allocation. Note that access
7902 via inline asm must use constraints. Add note about async-signal
7903 handlers. Remove paragraph about automagic register selection.
7905 2018-05-23 Richard Biener <rguenther@suse.de>
7907 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7908 of fixed offset from memset VN.
7910 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7912 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7914 (alloc_cand_and_find_basis): Initialize first_interp field.
7915 (slsr_process_mul): Modify first_interp field.
7916 (slsr_process_add): Likewise.
7917 (slsr_process_cast): Modify first_interp field for each new
7919 (slsr_process_copy): Likewise.
7920 (dump_candidate): Dump first_interp field.
7921 (replace_mult_candidate): Process all interpretations, not just
7923 (replace_rhs_if_not_dup): Likewise.
7924 (replace_one_candidate): Likewise.
7926 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7928 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7930 (aarch64_needs_frame_chain): New function.
7931 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7933 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7936 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7937 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7938 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7939 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7940 as true for strict-align.
7941 (aarch64_can_inline_p): Perform checks even when callee has no
7942 attributes to check for strict alignment.
7943 * doc/extend.texi (AArch64 Function Attributes): Document
7945 * doc/invoke.texi: (AArch64 Options): Likewise.
7947 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7949 PR tree-optimization/85853
7950 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7951 the handling of the root of the node to...
7952 (vect_slp_analyze_node_operations_1): ...this new function,
7953 and run the whole thing with the child nodes' def types
7954 set according to their SLP node's def type.
7956 2018-05-23 Richard Biener <rguenther@suse.de>
7959 * tree-data-ref.c (create_runtime_alias_checks): Defer
7960 and ignore overflow warnings.
7962 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7964 PR tree-optimization/85822
7965 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7968 2018-05-23 Richard Biener <rguenther@suse.de>
7970 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7971 memset constants via native_interpret_expr.
7973 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7976 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7978 (cgraph_node::create_alias): Likewise.
7979 (cgraph_node::get_availability): Check ifunc_resolver instead
7980 of looking up ifunc attribute.
7981 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7982 * varasm.c (do_assemble_alias): Likewise.
7983 (assemble_alias): Likewise.
7984 (default_binds_local_p_3): Likewise.
7985 * cgraph.h (cgraph_node): Add ifunc_resolver.
7986 (cgraph_node::only_called_directly_or_aliased_p): Return false
7988 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7990 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7991 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7992 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7993 instead of looking up ifunc attribute.
7995 2018-05-22 Luis Machado <luis.machado@linaro.org>
7997 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7999 2018-05-22 Martin Sebor <msebor@redhat.com>
8002 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8003 only when expasion succeeds.
8004 (expand_builtin_strcmp): Same.
8005 (expand_builtin_strncmp): Same.
8007 2018-05-22 Martin Sebor <msebor@redhat.com>
8009 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8011 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8012 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8014 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8015 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8017 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8018 Add check for legitimate_address.
8019 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8020 (aarch64_swap_ldrstr_operands): New.
8021 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8024 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8025 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8027 * config/aarch64/aarch64.md: New patterns to generate stp
8029 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8030 single words and double words.
8031 (load_pair_sw, load_pair_dw): Likewise.
8032 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8034 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8036 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8037 for different mode ldpstp and add peephole for merged zero stores.
8039 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8041 (aarch64_gen_store_pair): Rename calls to match new patterns.
8042 (aarch64_gen_load_pair): Rename calls to match new patterns.
8043 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8044 (load_pair<DREG:mode><DREG2:mode>): ... This.
8045 (store_pair<mode>): Rename to...
8046 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8047 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8049 (V_INT_EQUIV): Handle SImode.
8050 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8053 2018-05-22 Martin Sebor <msebor@redhat.com>
8056 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8057 or ajust the presumed bound on an operation to avoid unnecessary
8060 2018-05-22 Martin Sebor <msebor@redhat.com>
8062 PR tree-optimization/85826
8063 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8064 assuming that a DECL necesarily has a constant size.
8066 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8069 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8071 2018-05-22 Richard Biener <rguenther@suse.de>
8073 PR tree-optimization/85834
8074 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8075 non-constant and non-zero memset arguments.
8077 2018-05-22 Martin Liska <mliska@suse.cz>
8080 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8082 2018-05-22 Richard Biener <rguenther@suse.de>
8084 PR tree-optimization/85863
8085 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8086 comparisons when vectype is specified.
8087 (vectorizable_condition): Do not specify vectype for
8088 vect_is_simple_cond when SLP vectorizing.
8090 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8093 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8094 define __ibm128 as long double.
8095 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8096 as a distinct type when IEEE 128-bit support is enabled.
8097 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8098 128-bit types to use the correct functions.
8099 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8100 convert between 128-bit floating point types that have different
8101 modes but the same representation, instead of using gen_lowpart to
8103 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8105 (IFKF_reg): New attributes to give the register constraints for
8107 (extend<mode>tf2_internal): New insns to mark an explicit
8108 conversion between 128-bit floating point types that have a
8109 different mode but share the same representation.
8111 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8113 PR tree-optimization/85814
8114 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8115 a null return from get_strinfo when unsharing the next
8116 strinfo in the chain.
8118 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8121 * varasm.c (weak_finish): Clean up weak_decls.
8123 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8125 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8126 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8127 UNSPEC_UADALP values.
8128 * config/aarch64/iterators.md (ABAL): New int iterator.
8131 (sur): Add mappings for the above.
8132 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8134 (aarch64_<sur>abal<mode>_4): Likewise.
8135 (aarch64_<sur>adalp<mode>_3): Likewise.
8136 (<sur>sadv16qi): New define_expand.
8138 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8140 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8141 (*movdf_internal): Ditto.
8142 (*rcpsf2_sse): Ditto.
8143 (*rsqrtsf2_sse): Ditto.
8144 (*sqrt<mode>2_sse): Ditto.
8146 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8148 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8150 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8151 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8152 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8153 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8155 * config/aarch64/arm_neon.h: Likewise.
8156 * config/aarch64/iterators.md (VQ_I): New.
8158 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8160 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8162 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8165 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8167 * config/nds32/constraints.md (S): New constraint.
8168 * config/nds32/nds32.md (call_internal): Use constraint S.
8169 (call_value_internal): Likewise.
8170 (sibcall_internal): Likewise.
8171 (sibcall_value_internal): Likewise.
8173 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8174 Chung-Ju Wu <jasonwucj@gmail.com>
8176 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8179 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8180 Chung-Ju Wu <jasonwucj@gmail.com>
8182 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8183 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8184 (nds32_rtx_costs_impl): Simplify.
8185 (nds32_address_cost_impl): Simplify.
8186 (nds32_init_rtx_costs): New function.
8187 (nds32_rtx_costs_speed_prefer): Likewise.
8188 (nds32_rtx_costs_size_prefer): Likewise.
8189 (nds32_address_cost_speed_prefer): Likewise.
8190 (nds32_address_cost_speed_fwprop): Likewise.
8191 (nds32_address_cost_size_prefer): Likewise.
8192 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8193 * config/nds32/nds32.c (nds32_option_override): Use
8194 nds32_init_rtx_costs function.
8196 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8198 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8199 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8200 (TARGET_PIPELINE_N8): Likewise.
8201 (TARGET_PIPELINE_N10): Likewise.
8202 (TARGET_PIPELINE_N13): Likewise.
8203 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8205 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8207 * config/nds32/nds32-fpu.md: Update copyright year.
8209 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8211 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8213 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8215 * config/nds32/nds32.c
8216 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8217 * config/nds32/nds32.opt (minline-asm-r15): New option.
8219 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8221 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8223 * config/nds32/nds32.md (abssi2): New pattern.
8225 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8227 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8228 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8229 Merge insn pattern from sse_cvtsi2ss<round_name> and
8230 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8231 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8232 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8233 using SWI48 mode iterator.
8234 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8235 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8236 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8237 pattern from sse_cvttss2si<round_saeonly_name>
8238 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8239 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8240 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8241 using SWI48 mode iterator.
8242 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8243 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8244 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8245 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8246 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8247 using SWI48 mode iterator.
8248 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8249 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8250 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8251 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8252 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8253 SWI48 mode iterator.
8254 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8255 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8256 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8257 pattern from sse_cvttsd2si<round_saeonly_name>
8258 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8260 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8262 * config/nds32/nds32-md-auxiliary.c
8263 (nds32_valid_smw_lwm_base_p): Refine.
8264 (nds32_output_smw_single_word): Refine.
8265 (nds32_output_smw_double_word): New.
8266 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8268 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8270 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8271 (nds32_output_stack_pop): Refine.
8272 (nds32_expand_unaligned_load): Refine.
8273 (nds32_expand_unaligned_store): Refine.
8275 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8276 Chung-Ju Wu <jasonwucj@gmail.com>
8278 * config/nds32/constants.md: Add TP_REGNUM constant.
8279 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8280 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8282 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8283 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8284 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8285 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8286 and PIC code generation.
8287 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8289 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8291 * config/nds32/nds32.md: Support TLS and PIC.
8292 * config/nds32/nds32.c: Support TLS and PIC.
8293 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8294 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8297 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8299 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8300 mode with E_ prefix.
8302 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8303 Chung-Ju Wu <jasonwucj@gmail.com>
8305 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8306 * config/nds32/nds32-md-auxiliary.c
8307 (symbolic_reference_mentioned_p): New.
8308 (nds32_legitimize_ict_address): New.
8309 (nds32_expand_ict_move): New.
8310 (nds32_indirect_call_referenced_p): New.
8311 (nds32_symbol_binds_local_p): Delete.
8312 (nds32_long_call_p): Modify.
8313 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8314 * config/nds32/nds32-protos.h
8315 (symbolic_reference_mentioned_p): Declare.
8316 (nds32_legitimize_ict_address): Declare.
8317 (nds32_expand_ict_move): Declare.
8318 (nds32_indirect_call_referenced_p): Declare.
8319 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8320 (nds32_relax_group): Use nds32_ict_const_p as condition.
8321 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8322 (nds32_asm_file_start): Output ict_model directive in asm code.
8323 (nds32_legitimate_address_p): Consider indirect call.
8324 (nds32_print_operand): Consider indirect call.
8325 (nds32_print_operand_address): Consider indirect call.
8326 (nds32_insert_attributes): Handle "indirect_call" attribute.
8327 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8328 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8329 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8330 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8331 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8332 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8333 (TARGET_ICT_MODEL_SMALL): Define.
8334 (TARGET_ICT_MODEL_LARGE): Define.
8335 * config/nds32/nds32.md (movsi): Consider ict model.
8336 (call, call_value): Consider ict model.
8337 (sibcall, sibcall_value): Consider ict model.
8338 * config/nds32/nds32.opt (mict-model): New option.
8339 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8342 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8343 Monk Chiang <sh.chiang04@gmail.com>
8344 Jim Wilson <jimw@sifive.com>
8346 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8347 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8348 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8349 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8350 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8351 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8352 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8353 compute save_libcall_adjustment properly.
8354 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8355 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8356 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8357 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8358 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8359 (ABI_SPEC): Handle mabi=ilp32e.
8360 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8361 (RVE): Add RVE mask.
8362 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8363 <-march>: Add rv32e as an example.
8365 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8368 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8369 (intra_create_variable_infos): Handle C++ constructors.
8371 2018-05-18 Martin Liska <mliska@suse.cz>
8373 * passes.def: Remove a redundant pass.
8375 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8378 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8380 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8382 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8384 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8386 (armv2, armv2a, armv3, armv3m): Delete architectures.
8387 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8388 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8389 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8391 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8392 (*mulsidi3adddi): Likewise.
8393 (mulsidi3): Likewise.
8394 (*mulsidi3_nov6): Likewise.
8395 (umulsidi3): Likewise.
8396 (umulsidi3_nov6): Likewise.
8397 (umaddsidi4): Likewise.
8398 (*umulsidi3adddi): Likewise.
8399 (smulsi3_highpart): Likewise.
8400 (*smulsi3_highpart_nov6): Likewise.
8401 (umulsi3_highpart): Likewise.
8402 (*umulsi3_highpart_nov6): Likewise.
8403 * config/arm/arm.h (arm_arch3m): Delete.
8404 * config/arm/arm.c (arm_arch3m): Delete.
8405 (arm_option_override_internal): Update armv3-related comment.
8406 (arm_configure_build_target): Delete use of isa_bit_mode32.
8407 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8408 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8409 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8411 (mulusa3): Likewise.
8412 * config/arm/arm-protos.h (arm_arch3m): Delete.
8413 * config/arm/arm-tables.opt: Regenerate.
8414 * config/arm/arm-tune.md: Likewise.
8415 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8416 deleted architectures.
8418 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8420 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8421 (armv5t, armv5te): New features.
8422 (ARMv5, ARMv5e): Delete fgroups.
8423 (ARMv5t, ARMv5te): Adjust for above changes.
8425 (armv5, armv5e): Delete arches.
8426 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8428 (*call_reg_arm): Likewise.
8429 (*call_value_reg_armv5): Likewise.
8430 (*call_value_reg_arm): Likewise.
8431 (*call_symbol): Likewise.
8432 (*call_value_symbol): Likewise.
8433 (*sibcall_insn): Likewise.
8434 (*sibcall_value_insn): Likewise.
8436 (prefetch): Likewise.
8437 (define_split and define_peephole2 dependent on arm_arch5):
8439 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8441 (TARGET_ARM_QBIT): Likewise.
8442 (TARGET_DSP_MULTIPLY): Likewise.
8443 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8444 (arm_arch5, arm_arch5e): Delete.
8445 (arm_arch5t, arm_arch5te): Declare.
8446 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8447 (arm_arch5t): Declare.
8448 (arm_option_reconfigure_globals): Update for the above.
8449 (arm_options_perform_arch_sanity_checks): Update comment, replace
8450 use of arm_arch5 with arm_arch5t.
8451 (use_return_insn): Likewise.
8452 (arm_emit_call_insn): Likewise.
8453 (output_return_instruction): Likewise.
8454 (arm_final_prescan_insn): Likewise.
8455 (arm_coproc_builtin_available): Likewise.
8456 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8457 arm_arch5e with arm_arch5t and arm_arch5te.
8458 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8459 (arm_arch5t, arm_arch5te): Declare.
8460 * config/arm/arm-tables.opt: Regenerate.
8461 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8462 * config/arm/t-multilib: Likewise.
8463 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8464 instead of arm_arch5.
8465 (*call_reg_thumb1): Likewise.
8466 (*call_value_reg_thumb1_v5): Likewise.
8467 (*call_value_reg_thumb1): Likewise.
8468 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8470 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8472 2018-05-18 Martin Liska <mliska@suse.cz>
8474 PR gcov-profile/84846
8475 * doc/gcov.texi: Document -t option of gcov tool.
8477 2018-05-18 Martin Liska <mliska@suse.cz>
8479 PR gcov-profile/84846
8480 * gcov.c (print_usage): Add new -t option.
8481 (process_args): Handle the option.
8482 (generate_results): Use stdout as output when requested by
8485 2018-05-18 Martin Liska <mliska@suse.cz>
8487 PR gcov-profile/84846
8488 * coverage.c (coverage_init): Write PWD to .gcno file.
8489 * doc/gcov.texi: Document how working directory is printed.
8490 * gcov-dump.c (dump_gcov_file): Print PWD.
8491 * gcov.c (output_intermediate_file): Likewise.
8492 (read_graph_file): Read PWD string.
8493 (output_lines): Print PWD.
8495 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8498 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8499 for retval and return false if all args to phi are zero.
8501 2018-05-18 Richard Biener <rguenther@suse.de>
8503 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8505 (evrp_dom_walker::before_dom_children): Call it.
8507 2018-05-18 Richard Biener <rguenther@suse.de>
8509 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8510 results when processing array refs with variable index.
8512 2018-05-18 Toon Moene <toon@moene.org>
8514 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8515 directly after that of -floop-interchange. Indicate that both
8516 options are enabled by default when specifying -O3.
8518 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8520 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8521 iterator. Delete separate integer-mode vec_set<mode> expander.
8522 (aarch64_simd_vec_setv2di): Delete.
8523 (vec_setv2di): Delete.
8524 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8525 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8526 the "w, r" alternative.
8528 2018-05-18 Martin Liska <mliska@suse.cz>
8530 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8531 * tree-pass.h (make_pass_lower_switch_O0): New function.
8532 * tree-switch-conversion.c (node_has_low_bound): Remove.
8533 (node_has_high_bound): Likewise.
8534 (node_is_bounded): Likewise.
8535 (class pass_lower_switch): Make it a template type and create
8537 (pass_lower_switch::execute): Add template argument.
8538 (make_pass_lower_switch): New function.
8539 (make_pass_lower_switch_O0): New function.
8540 (do_jump_if_equal): Remove.
8541 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8542 all the hard work to tree optimization passes.
8544 2018-05-18 Martin Liska <mliska@suse.cz>
8546 * dbgcnt.c (limit_low): Renamed from limit.
8547 (limit_high): New variable.
8548 (dbg_cnt_is_enabled): Check for upper limit.
8549 (dbg_cnt): Adjust dumping.
8550 (dbg_cnt_set_limit_by_index): Add new argument for high
8552 (dbg_cnt_set_limit_by_name): Likewise.
8553 (dbg_cnt_process_single_pair): Parse new format.
8554 (dbg_cnt_process_opt): Use strtok.
8555 (dbg_cnt_list_all_counters): Remove 'value' and add
8557 * doc/invoke.texi: Document changes.
8559 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8561 * doc/sourcebuild.texi (scalar_all_fma): Document.
8562 * tree.def (FMA_EXPR): Delete.
8563 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8564 * internal-fn.c (ternary_direct): New macro.
8565 (expand_ternary_optab_fn): Likewise.
8566 (direct_ternary_optab_supported_p): Likewise.
8567 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8568 * builtins.c (fold_builtin_fma): Delete.
8569 (fold_builtin_3): Don't call it.
8570 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8571 * expr.c (expand_expr_real_2): Likewise.
8572 * fold-const.c (operand_equal_p): Likewise.
8573 (fold_ternary_loc): Likewise.
8574 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8575 * gimple.c (DEFTREECODE): Likewise.
8576 * gimplify.c (gimplify_expr): Likewise.
8577 * optabs-tree.c (optab_for_tree_code): Likewise.
8578 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8579 * tree-eh.c (operation_could_trap_p): Likewise.
8580 (stmt_could_throw_1_p): Likewise.
8581 * tree-inline.c (estimate_operator_cost): Likewise.
8582 * tree-pretty-print.c (dump_generic_node): Likewise.
8583 (op_code_prio): Likewise.
8584 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8585 * tree-ssa-operands.c (get_expr_operands): Likewise.
8586 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8587 * fold-const-call.h (fold_fma): Delete.
8588 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8589 CFN_FNMA and CFN_FNMS.
8591 * genmatch.c (combined_fn): New enum.
8592 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8593 (commutative_op): New function.
8594 (commutate): Use it. Handle more than 2 operands.
8595 (dt_operand::gen_gimple_expr): Use commutative_op.
8596 (parser::parse_expr): Allow :c to be used with non-binary
8597 operators if the commutative operand is known.
8598 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8599 CFN_FMS, CFN_FNMA and CFN_FNMS.
8600 (backprop::process_assign_use): Remove FMA_EXPR handling.
8601 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8602 (gen_hsa_fma): New function.
8603 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8604 IFN_FNMA and IFN_FNMS.
8605 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8606 * gimple-fold.h (follow_all_ssa_edges): Declare.
8607 * gimple-fold.c (follow_all_ssa_edges): New function.
8608 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8609 gimple_build interface and use follow_all_ssa_edges to fold the result.
8610 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8611 instead of checking for optabs directly.
8612 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8613 rather than FMA_EXPRs.
8614 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8615 call to IFN_FMA instead of an FMA_EXPR.
8617 2018-05-17 Jim Wilson <jimw@sifive.com>
8619 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8620 sign extended promoted subreg, and the range does not have the sign bit
8621 set, then do a sign extend.
8623 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8624 test, check for sign extended subreg and/or constant operands, and
8625 do a sign extend in that case.
8627 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8629 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8630 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8632 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8633 Change logics_shift_reg to logics_shift_imm.
8634 (thunderx2t99_fp_loadpair_basic): Delete.
8635 (thunderx2t99_fp_storepair_basic): Delete.
8636 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8637 (thunderx2t99_asimd_polynomial): Delete.
8638 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8639 and neon_fp_mul_d_scalar_q.
8640 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8641 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8642 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8643 (thunderx2t99_asimd_lut): Add missing tbl types.
8644 (thunderx2t99_asimd_ext): Delete.
8645 (thunderx2t99_asimd_load1_1_mult): Delete.
8646 (thunderx2t99_asimd_load1_2_mult): Delete.
8647 (thunderx2t99_asimd_load1_ldp): New.
8648 (thunderx2t99_asimd_load1): New.
8649 (thunderx2t99_asimd_load2): Add missing *load2* types.
8650 (thunderx2t99_asimd_load3): New.
8651 (thunderx2t99_asimd_load4): New.
8652 (thunderx2t99_asimd_store1_1_mult): Delete.
8653 (thunderx2t99_asimd_store1_2_mult): Delete.
8654 (thunderx2t99_asimd_store2_mult): Delete.
8655 (thunderx2t99_asimd_store2_onelane): Delete.
8656 (thunderx2t99_asimd_store_stp): New.
8657 (thunderx2t99_asimd_store1): New.
8658 (thunderx2t99_asimd_store2): New.
8659 (thunderx2t99_asimd_store3): New.
8660 (thunderx2t99_asimd_store4): New.
8662 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8664 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8665 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8667 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8668 Segher Boessenkool <segher@kernel.crashing.org>
8671 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8674 2018-05-17 Richard Biener <rguenther@suse.de>
8676 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8677 for pruning loop and prune defs feeding only already visited PHIs.
8679 2018-05-17 Richard Biener <rguenther@suse.de>
8681 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8683 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8684 Richard Biener <rguenther@suse.de>
8686 PR tree-optimization/85793
8687 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8688 for VMAT_ELEMENTWISE.
8690 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8692 * internal-fn.h (lookup_internal_fn): Declare
8693 * internal-fn.c (lookup_internal_fn): New function.
8694 * gimple.c (gimple_build_call_from_tree): Handle calls to
8696 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8697 internal function names.
8698 * tree-pretty-print.c (dump_generic_node): Likewise.
8699 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8701 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8703 * gimple-fold.h (gimple_build): Make the function forms take
8704 combined_fn rather than built_in_function.
8705 (gimple_simplify): Likewise.
8706 * gimple-match-head.c (gimple_simplify): Likewise.
8707 * gimple-fold.c (gimple_build): Likewise.
8708 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8709 rather than gimple_build_call_internal.
8710 (get_initial_defs_for_reduction): Likewise.
8711 (vect_create_epilog_for_reduction): Likewise.
8712 (vectorizable_live_operation): Likewise.
8714 2018-05-17 Martin Liska <mliska@suse.cz>
8716 * gimple-ssa-sprintf.c (format_directive): Do not use
8717 space in between 'G_' and '('.
8719 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8722 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8723 even if the mask is not all ones.
8726 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8728 (ix86_gimple_fold_builtin): Likewise.
8731 * config/i386/i386.c: Include tree-vector-builder.h.
8732 (ix86_vector_shift_count): New function.
8733 (ix86_fold_builtin): Fold shift builtins by scalar count.
8734 (ix86_gimple_fold_builtin): Likewise.
8736 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8737 _mm512_setzero): New intrinsics.
8739 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8740 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8742 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8743 code generation for cases where splatting a value is not useful.
8744 * simplify-rtx.c (simplify_ternary_operation): Simplify
8745 vec_merge across a vec_duplicate and a paradoxical subreg forming
8746 a vector mode to a vec_concat.
8748 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8750 * config.gcc: Support "goldmont-plus".
8751 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8753 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8754 PROCESSOR_GOLDMONT_PLUS.
8755 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8756 (processor_target_table): Add "goldmont-plus".
8757 (PTA_GOLDMONT_PLUS): Define.
8758 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8759 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8760 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8761 (fold_builtin_cpu): Add "goldmont-plus".
8762 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8763 (ix86_option_override_internal): Add "goldmont-plus".
8764 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8765 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8766 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8767 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8769 2018-05-17 Richard Biener <rguenther@suse.de>
8771 PR tree-optimization/85757
8772 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8773 remove defs that only feed that PHI from further processing.
8775 2018-05-16 Jim Wilson <jimw@sifive.com>
8777 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8779 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8781 2018-05-16 Mark Wielaard <mark@klomp.org>
8783 * dwarf2out.c (count_index_strings): New function.
8784 (output_indirect_strings): Call count_index_strings and generate
8785 header for dwarf_version >= 5.
8787 2018-05-16 Mark Wielaard <mark@klomp.org>
8789 * dwarf2out.c (dwarf_FORM): New function.
8790 (set_indirect_string): Use dwarf_FORM.
8791 (reset_indirect_string): Likewise.
8792 (size_of_die): Likewise.
8793 (value_format): Likewise.
8794 (output_die): Likewise.
8795 (add_skeleton_AT_string): Likewise.
8796 (output_macinfo_op): Likewise.
8797 (index_string): Likewise.
8798 (output_index_string_offset): Likewise.
8799 (output_index_string): Likewise.
8800 (count_index_strings): Likewise.
8802 2018-05-16 Carl Love <cel@us.ibm.com>
8804 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8805 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8807 2018-05-16 Martin Jambor <mjambor@suse.cz>
8809 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8810 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8812 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8814 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8815 (fnma<mode>4): Likewise.
8816 (fms<mode>4): Likewise.
8817 (fnms<mode>4): Likewise.
8818 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8819 (aarch64_fnma<mode>4): Likewise.
8820 (aarch64_fms<mode>4): Likewise.
8821 (aarch64_fnms<mode>4): Likewise.
8822 (aarch64_fnmadd<mode>4): Likewise.
8824 2018-05-16 Jason Merrill <jason@redhat.com>
8826 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8828 2018-05-16 Richard Biener <rguenther@suse.de>
8830 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8831 (dump_stmt_cost): Declare.
8832 (add_stmt_cost): Dump cost we add.
8833 (add_stmt_costs): New function.
8834 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8836 (vect_analyze_stmt): Adjust prototype.
8837 (vectorizable_condition): Likewise.
8838 (vectorizable_live_operation): Likewise.
8839 (vectorizable_reduction): Likewise.
8840 (vectorizable_induction): Likewise.
8841 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8842 cost vector to pass to vectorizable_ and record afterwards.
8843 (vect_model_reduction_cost): Take cost vector argument and adjust.
8844 (vect_model_induction_cost): Likewise.
8845 (vectorizable_reduction): Likewise.
8846 (vectorizable_induction): Likewise.
8847 (vectorizable_live_operation): Likewise.
8848 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8849 SLP_TREE_NUMBER_OF_VEC_STMTS.
8850 (vect_analyze_slp_cost_1): Remove.
8851 (vect_analyze_slp_cost): Likewise.
8852 (vect_slp_analyze_node_operations): Take visited args and
8853 a target cost vector. Avoid processing already visited stmt sets.
8854 (vect_slp_analyze_operations): Use a local cost vector to gather
8855 costs and register those of non-discarded instances.
8856 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8857 (vect_schedule_slp_instance): Remove copying of
8858 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8860 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8861 adding cost. Record cost entry location.
8862 (vect_prologue_cost_for_slp_op): Function to compute cost of
8863 a constant or invariant generated for SLP vect in the prologue,
8864 split out from vect_analyze_slp_cost_1.
8865 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8866 (vect_model_promotion_demotion_cost): Likewise.
8867 (vect_model_store_cost): Likewise, make static.
8868 (vect_model_load_cost): Likewise.
8869 (vectorizable_bswap): Add cost vector arg and adjust.
8870 (vectorizable_call): Likewise.
8871 (vectorizable_simd_clone_call): Likewise.
8872 (vectorizable_conversion): Likewise.
8873 (vectorizable_assignment): Likewise.
8874 (vectorizable_shift): Likewise.
8875 (vectorizable_operation): Likewise.
8876 (vectorizable_store): Likewise.
8877 (vectorizable_load): Likewise.
8878 (vectorizable_condition): Likewise.
8879 (vectorizable_comparison): Likewise.
8880 (can_vectorize_live_stmts): Likewise.
8881 (vect_analyze_stmt): Likewise.
8882 (vect_transform_stmt): Adjust calls to vectorizable_*.
8883 * tree-vectorizer.c: Include gimple-pretty-print.h.
8884 (dump_stmt_cost): New function.
8886 2018-05-16 Richard Biener <rguenther@suse.de>
8888 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8889 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8890 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8891 (check_name): New callback.
8892 (dse_classify_store): Track cycles via a visited bitmap of PHI
8893 defs and simplify handling of in-loop and across loop dead stores
8894 and properly fail for loop-variant refs. Handle byte-tracking with
8895 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8898 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8900 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8901 (vect_get_mask_type_for_stmt): Likewise.
8902 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8904 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8905 to determine the statement's vector type and the vector type that
8906 should be used for calculating nunits. Deal with cases in which
8907 the type has to be deferred.
8908 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8909 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8910 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8911 (vect_determine_vf_for_stmt): New functions, split out from...
8912 (vect_determine_vectorization_factor): ...here.
8913 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8914 (vect_get_mask_type_for_stmt): New functions, split out from
8915 vect_determine_vectorization_factor.
8917 2018-05-16 Richard Biener <rguenther@suse.de>
8919 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8920 verify the [VEC_]COND_EXPR embedded comparison.
8922 2018-05-15 Martin Sebor <msebor@redhat.com>
8924 PR tree-optimization/85753
8925 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8926 RECORD_TYPE in addition to ARRAY_TYPE.
8928 2018-05-15 Martin Sebor <msebor@redhat.com>
8931 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8933 2018-05-15 Richard Biener <rguenther@suse.de>
8935 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8936 add by_clobber_p one. Change algorithm to collect all defs
8937 representing uses we need to walk and try reducing them to
8938 a single one before failing.
8939 (dse_dom_walker::dse_optimize_stmt): Adjust.
8941 2018-05-13 Mark Wielaard <mark@klomp.org>
8943 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8944 (size_of_loc_descr): Likewise.
8945 (output_loc_operands): Likewise.
8946 (output_loc_operands_raw): Likewise.
8947 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8948 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8949 (hash_loc_operands): Likewise.
8950 (compare_loc_operands): Likewise.
8952 2018-05-14 Mark Wielaard <mark@klomp.org>
8954 * dwarf2out.c (count_index_addrs): New function.
8955 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8957 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8959 PR tree-optimization/83648
8960 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8961 return value as malloc candidate.
8963 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8966 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8967 param as true in call to suggest_attribute.
8969 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8971 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8972 -mreadonly-in-sdata.
8974 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8976 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8978 (aarch64_crypto_aesd_fused): Likewise.
8980 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8982 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8983 (movsi_aarch64): Likewise.
8984 (load_pairsi): Likewise.
8985 (load_pairdi): Likewise.
8986 (store_pairsi): Likewise.
8987 (store_pairdi): Likewise.
8988 (load_pairsf): Likewise.
8989 (load_pairdf): Likewise.
8990 (store_pairsf): Likewise.
8991 (store_pairdf): Likewise.
8992 (zero_extend): Likewise.
8993 (trunc): Swap alternatives.
8994 (fcvt_target): Add '?' to prefer w over r.
8996 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8999 * config/i386/i386.md: Disallow non-commutative arithmetics in
9000 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9001 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9002 in the peephole2 before it.
9004 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9006 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9007 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9008 (ix86_handle_option): Handle -mcldemote.
9009 * config.gcc: New header.
9010 * config/i386/cldemoteintrin.h: New file.
9011 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9012 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9014 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9015 OPTION_MASK_ISA_CLDEMOTE.
9016 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9017 (ix86_valid_target_attribute_inner_p): Ditto.
9018 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9019 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9020 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9021 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9022 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9024 * config/i386/i386.opt: Add -mcldemote.
9025 * config/i386/x86intrin.h: New header.
9026 * doc/invoke.texi: Add -mcldemote.
9028 2018-05-14 Richard Biener <rguenther@suse.de>
9030 * doc/match-and-simplify.texi: Adjust :s documentation.
9032 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9034 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9035 intended memcpy size.
9036 (REORDER_45): Likewise.
9038 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9040 * sort.cc: New file.
9041 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9042 * vec.c (qsort_chk): Use gcc_qsort.
9043 * Makefile.in (OBJS-libcommon): Add sort.o.
9044 (build/sort.o): New target. Use it...
9045 (BUILD_RTL): ... here, and...
9046 (build/gencfn-macros): ... here, and...
9047 (build/genmatch): ... here.
9049 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9050 Chung-Ju Wu <jasonwucj@gmail.com>
9052 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9053 * config/nds32/nds32-graywolf.md: New file.
9054 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9055 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9057 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9058 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9059 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9060 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9061 * config/nds32/pipelines.md: Include n15 settings.
9063 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9064 Chung-Ju Wu <jasonwucj@gmail.com>
9066 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9067 * config/nds32/nds32-n13.md: New file.
9068 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9069 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9071 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9072 * config/nds32/nds32.md (pipeline_model): Add n13.
9073 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9074 * config/nds32/pipelines.md: Include n13 settings.
9076 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9077 Chung-Ju Wu <jasonwucj@gmail.com>
9079 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9080 * config/nds32/nds32-n10.md: New file.
9081 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9082 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9084 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9085 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9086 * config/nds32/nds32.md (pipeline_model): Add n10.
9087 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9088 * config/nds32/pipelines.md: Include n10 settings.
9090 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9091 Kito Cheng <kito.cheng@gmail.com>
9092 Chung-Ju Wu <jasonwucj@gmail.com>
9094 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9095 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9096 Add enum values for DSP extension instructions.
9097 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9099 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9100 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9102 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9103 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9104 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9105 * config/nds32/nds32-intrinsic.md: Likewise.
9106 * config/nds32/nds32_intrinsic.h: Likewise.
9107 * config/nds32/nds32-md-auxiliary.c: Likewise.
9108 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9109 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9110 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9111 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9112 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9113 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9114 TYPE_DMAC in switch statement.
9115 * config/nds32/nds32.c: New checking and implementation for DSP
9116 extension instructions.
9117 * config/nds32/nds32.h: Likewise.
9118 * config/nds32/nds32.md: Likewise.
9119 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9120 * config/nds32/predicates.md: Implement new predicates for DSP
9123 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9125 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9126 Reformat alternatives and attributes so it is easier to identify
9127 which constraints/attributes go with which instruction.
9128 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9129 (mov<mode>_softfloat32, FMOVE64): Likewise.
9130 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9131 (mov<mode>_softfloat64, FMOVE64): Likewise.
9133 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9135 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9137 (Basic PowerPC Built-in Functions): The new name of the
9138 subsection previously known as "PowerPC Built-in Functions".
9139 (Basic PowerPC Built-in Functions Available on all Configurations):
9141 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9142 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9143 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9144 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9146 2018-05-11 Martin Jambor <mjambor@suse.cz>
9149 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9152 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9155 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9157 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9159 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9160 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9161 (ix86_handle_option): Handle -mwaitpkg.
9162 * config.gcc: New header.
9163 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9164 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9165 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9167 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9168 OPTION_MASK_ISA_WAITPKG.
9169 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9170 (ix86_option_override_internal): Add PTA_WAITPKG.
9171 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9172 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9173 IX86_BUILTIN_TPAUSE.
9174 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9175 __builtin_ia32_umwait and __builtin_ia32_tpause.
9176 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9177 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9178 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9179 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9180 UNSPECV_TPAUSE): New.
9181 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9182 * config/i386/i386.opt: Add -mwaitpkg.
9183 * config/i386/waitpkgintrin.h: New file.
9184 * config/i386/x86intrin.h: New header.
9185 * doc/invoke.texi: Add -mwaitpkg.
9187 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9190 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9192 (cortex-m0): Use armv6s-m isa.
9193 (cortex-m0plus): Likewise.
9194 (cortex-m1): Likewise.
9195 (cortex-m0.small-multiply): Likewise.
9196 (cortex-m0plus.small-multiply): Likewise.
9197 (cortex-m1.small-multiply): Likewise.
9199 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9200 Jakub Jelinek <jakub@redhat.com>
9202 PR tree-optimization/85692
9203 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9204 source permute as well.
9206 2018-05-11 Martin Liska <mliska@suse.cz>
9209 * doc/extend.texi: Document LLVM style format for no_sanitize
9212 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9214 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9215 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9216 (mode_supports_vsx_dform_quad): Likewise.
9217 (mode_supports_vmx_dform): Move these functions to be next to the
9218 other mode_supports functions.
9219 (mode_supports_dq_form): Likewise.
9220 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9221 mode_supports_dq_form.
9222 (reg_offset_addressing_ok_p): Likewise.
9223 (offsettable_ok_by_alignment): Likewise.
9224 (rs6000_legitimate_offset_address_p): Likewise.
9225 (legitimate_lo_sum_address_p): Likewise.
9226 (rs6000_legitimize_address): Likewise.
9227 (rs6000_legitimize_reload_address): Likewise.
9228 (rs6000_secondary_reload_inner): Likewise.
9229 (rs6000_preferred_reload_class): Likewise.
9230 (rs6000_output_move_128bit): Likewise.
9232 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9234 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9235 Generate SImode target register for null target.
9236 <case IX86_BUILTIN_XGETBV>: Ditto.
9237 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9238 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9240 2018-05-10 Carl Love <cel@us.ibm.com>
9242 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9243 dcbtt and dcbtstt if operands[2] is 0.
9245 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9248 * config/i386/sse.md (usadv64qi): New expander.
9250 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9252 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9253 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9254 -maltivec=be support.
9255 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9256 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9257 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9258 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9259 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9260 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9261 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9262 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9263 altivec_vsumsws): Adjust.
9264 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9265 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9266 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9268 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9269 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9270 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9271 (altivec_lve<VI_char>x): Delete expand.
9272 (*altivec_lve<VI_char>x_internal): Rename to...
9273 (altivec_lve<VI_char>x): ... this.
9274 (altivec_lvxl_<mode>): Delete expand.
9275 (*altivec_lvxl_<mode>_internal): Rename to ...
9276 (altivec_lvxl_<mode>): ... this.
9277 (altivec_stvxl_<mode>): Delete expand.
9278 (*altivec_stvxl_<mode>_internal): Rename to ...
9279 (altivec_stvxl_<mode>): ... this.
9280 (altivec_stve<VI_char>x): Delete expand.
9281 (*altivec_stve<VI_char>x_internal): Rename to ...
9282 (altivec_stve<VI_char>x): ... this.
9283 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9284 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9285 reduc_plus_scal_<mode>): Adjust.
9286 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9288 (rs6000_cpu_cpp_builtins): Adjust.
9289 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9290 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9291 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9292 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9293 -maltivec=be support.
9294 (rs6000_split_vec_extract_var): Adjust.
9295 (rs6000_split_v4si_init): Adjust.
9296 (swap_selector_for_mode): Delete.
9297 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9298 altivec_expand_stvex_be): Delete.
9299 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9300 -maltivec=be support.
9301 (rs6000_gimple_fold_builtin): Ditto.
9302 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9304 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9305 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9306 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9307 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9308 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9309 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9310 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9311 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9312 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9313 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9314 anonymous split): Adjust.
9315 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9316 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9318 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9320 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9321 when --with-gxx-include-dir is also specified.
9322 * configure: Regenerate.
9324 2018-05-09 Jim Wilson <jimw@sifive.com>
9327 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9328 * config/riscv/t-withmultilib: New.
9329 * config/riscv/withmultilib.h: New.
9330 * doc/install.texi: Document RISC-V --with-multilib-list support.
9332 2018-05-09 Richard Biener <rguenther@suse.de>
9334 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9336 (vect_bb_vectorization_profitable_p): Adjust. Compute
9337 actual scalar cost using the cost vector and the add_stmt_cost
9340 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9342 PR rtl-optimization/85645
9343 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9344 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9346 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9348 PR rtl-optimization/85645
9349 * shrink-wrap.c (spread_components): Return a boolean saying if
9350 anything was changed.
9351 (try_shrink_wrapping_separate): Iterate spread_components until
9352 nothing changes anymore.
9354 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9356 PR rtl-optimization/85645
9357 * regrename.c (build_def_use): Also kill the chains that include the
9358 destination of a REG_CFA_REGISTER note.
9360 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9362 PR rtl-optimization/85645
9363 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9364 insn that has a REG_CFA_REGISTER note.
9366 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9368 * cfgexpand.c (expand_clobber): New function.
9369 (expand_gimple_stmt_1): Use it.
9370 * tree-vect-stmts.c (vect_clobber_variable): New function,
9372 (vectorizable_simd_clone_call): ...here.
9373 (vectorizable_store): Emit a clobber either side of an
9374 IFN_STORE_LANES sequence.
9375 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9377 2018-05-09 Tom de Vries <tom@codesourcery.com>
9380 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9381 (define_insn "trap_if_false"): Add exit after trap.
9383 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9385 PR rtl-optimization/85638
9386 * bb-reorder.c: Include common/common-target.h.
9387 (create_forwarder_block): New function extracted from...
9388 (fix_up_crossing_landing_pad): ...here. Rename into...
9389 (dw2_fix_up_crossing_landing_pad): ...this.
9390 (sjlj_fix_up_crossing_landing_pad): New function.
9391 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9392 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9393 from both partitions and exit the loop after one iteration.
9395 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9398 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9400 (Basic PowerPC Built-in Functions): The new name of the
9401 subsection previously known as "PowerPC Built-in Functions".
9402 (Basic PowerPC Built-in Functions Available on all Configurations):
9404 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9406 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9408 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9410 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9413 2018-05-08 Jim Wilson <jimw@sifive.com>
9415 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9416 (LD_EMUL_SUFFIX): New.
9417 (LINK_SPEC): Use it.
9419 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9421 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9423 (Basic PowerPC Built-in Functions): The new name of the
9424 subsection previously known as "PowerPC Built-in Functions".
9425 (Basic PowerPC Built-in Functions Available on all Configurations):
9427 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9429 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9431 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9433 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9436 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9439 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9440 after cmpelim optimization.
9442 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9444 * config.gcc: Support "goldmont".
9445 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9446 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9448 * config/i386/i386.c (m_GOLDMONT): Define.
9449 (processor_target_table): Add "goldmont".
9450 (PTA_GOLDMONT): Define.
9451 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9452 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9453 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9454 (fold_builtin_cpu): Add "goldmont".
9455 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9456 (ix86_option_override_internal): Add "goldmont".
9457 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9458 (processor_type): Add PROCESSOR_GOLDMONT.
9459 * config/i386/i386.md: Add CPU "glm".
9460 * config/i386/glm.md: New file.
9461 * config/i386/x86-tune.def: Add m_GOLDMONT.
9462 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9464 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9467 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9469 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9470 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9471 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9474 * config/i386/i386.c (ix86_fold_builtin): Handle
9475 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9478 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9479 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9481 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9484 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9485 (check_arch): Likewise.
9486 (check_fpu): Return the result rather than printing it.
9487 (end arch): Fix operator precedence.
9488 (end cpu): Likewise.
9489 (END): Print the result from check_fpu.
9491 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9492 Alan Hayward <alan.hayward@arm.com>
9493 David Sherwood <david.sherwood@arm.com>
9495 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9496 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9497 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9498 (*fcmuo<mode>_and): New patterns.
9500 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9502 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9503 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9504 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9505 (cmp_op, sve_imm_con): New code attributes.
9506 (SVE_COND_INT_CMP, imm_con): Delete.
9507 (cmp_op): Remove above unspecs from int attribute.
9508 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9510 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9511 comparison-specific unspecs.
9512 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9513 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9514 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9515 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9516 (*vec_fcm<cmp_op><mode>): Rename to...
9517 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9518 (*vec_fcmuo<mode>): Rename to...
9519 (*fcmuo<mode>): ...this and adjust likewise.
9520 (*pred_fcm<cmp_op><mode>): New pattern.
9521 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9522 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9524 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9526 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9527 (aarch64_emit_sve_predicated_cond): New function.
9528 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9529 (aarch64_emit_unspec_cond_or): Replace with...
9530 (aarch64_emit_sve_or_conds): ...this new function. Use
9531 aarch64_emit_sve_ptrue_op for the individual comparisons and
9532 aarch64_emit_binop to OR them together.
9533 (aarch64_emit_inverted_unspec_cond): Replace with...
9534 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9535 aarch64_emit_sve_ptrue_op for the comparison and
9536 aarch64_emit_unop to invert the result.
9537 (aarch64_expand_sve_vec_cmp_float): Update after the above
9538 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9540 2018-05-07 Nathan Sidwell <nathan@acm.org>
9542 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9543 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9544 (Backwards Compatibility): Likewise.
9546 2018-05-07 Luis Machado <luis.machado@linaro.org>
9550 2018-05-07 Luis Machado <luis.machado@linaro.org>
9552 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9553 <prefetch_dynamic_strides>: New const bool field.
9554 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9555 prefetch_dynamic_strides.
9556 (exynosm1_prefetch_tune): Likewise.
9557 (thunderxt88_prefetch_tune): Likewise.
9558 (thunderx_prefetch_tune): Likewise.
9559 (thunderx2t99_prefetch_tune): Likewise.
9560 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9562 (aarch64_override_options_internal): Update to set
9563 PARAM_PREFETCH_DYNAMIC_STRIDES.
9564 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9565 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9566 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9567 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9568 prefetch-dynamic-strides setting.
9570 2018-05-07 Luis Machado <luis.machado@linaro.org>
9572 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9573 <minimum_stride>: New const int field.
9574 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9575 minimum_stride field.
9576 (exynosm1_prefetch_tune): Likewise.
9577 (thunderxt88_prefetch_tune): Likewise.
9578 (thunderx_prefetch_tune): Likewise.
9579 (thunderx2t99_prefetch_tune): Likewise.
9580 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9581 (aarch64_override_options_internal): Update to set
9582 PARAM_PREFETCH_MINIMUM_STRIDE.
9583 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9584 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9585 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9586 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9587 stride is constant and is below the minimum stride threshold.
9589 2018-05-07 Luis Machado <luis.machado@linaro.org>
9591 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9594 2018-05-07 Luis Machado <luis.machado@linaro.org>
9596 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9597 <prefetch_dynamic_strides>: New const bool field.
9598 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9599 prefetch_dynamic_strides.
9600 (exynosm1_prefetch_tune): Likewise.
9601 (thunderxt88_prefetch_tune): Likewise.
9602 (thunderx_prefetch_tune): Likewise.
9603 (thunderx2t99_prefetch_tune): Likewise.
9604 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9606 (aarch64_override_options_internal): Update to set
9607 PARAM_PREFETCH_DYNAMIC_STRIDES.
9608 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9609 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9610 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9611 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9612 prefetch-dynamic-strides setting.
9614 2018-05-07 Luis Machado <luis.machado@linaro.org>
9616 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9617 <minimum_stride>: New const int field.
9618 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9619 minimum_stride field.
9620 (exynosm1_prefetch_tune): Likewise.
9621 (thunderxt88_prefetch_tune): Likewise.
9622 (thunderx_prefetch_tune): Likewise.
9623 (thunderx2t99_prefetch_tune): Likewise.
9624 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9625 (aarch64_override_options_internal): Update to set
9626 PARAM_PREFETCH_MINIMUM_STRIDE.
9627 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9628 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9629 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9630 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9631 stride is constant and is below the minimum stride threshold.
9633 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9636 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9637 the type is addressable. Don't force op into register if it has
9640 2018-05-05 Roland McGrath <mcgrathr@google.com>
9643 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9644 any section for which we don't know a specific type it should have,
9645 regardless of name. Previously this was done only for the exact
9646 names ".init_array", ".fini_array", and ".preinit_array".
9647 (default_elf_asm_named_section): Add comment about
9648 relationship with default_section_type_flags and SECTION_NOTYPE.
9649 (get_section): Don't consider it a type conflict if one side has
9650 SECTION_NOTYPE and the other doesn't, as long as neither has the
9651 SECTION_BSS et al used in the default_section_type_flags logic.
9653 2018-05-05 Tom de Vries <tom@codesourcery.com>
9656 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9657 (workaround_barsyncs): New function.
9658 (nvptx_reorg): Use workaround_barsyncs.
9659 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9660 (define_expand "nvptx_membar_cta"): New define_expand.
9661 (define_insn "*nvptx_membar_cta"): New insn.
9663 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9665 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9666 To improve optimization opportunities.
9667 * builtin-types.def: The new needed builtin types for the above.
9669 2018-05-04 Richard Biener <rguenther@suse.de>
9671 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9672 * gimple-ssa-store-merging.c
9673 (imm_store_chain_info::output_merged_store): Remove redundant create,
9674 release split_store vector contents on failure.
9675 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9676 scalar stmt vector on cache hit.
9678 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9680 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9682 * config.gcc (powerpc-xilinx-eabi*): Remove.
9683 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9685 (fusion_addis_mem_combo_load): Ditto.
9686 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9688 (rs6000_cpu_cpp_builtins): Ditto.
9689 * config/rs6000/rs6000-linux.c
9690 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9691 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9692 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9694 (rs6000_setup_reg_addr_masks): Ditto.
9695 (rs6000_init_hard_regno_mode_ok): Ditto.
9696 (rs6000_option_override_internal): Ditto.
9697 (legitimate_lo_sum_address_p): Ditto.
9698 (rs6000_legitimize_address): Ditto.
9699 (rs6000_legitimize_reload_address): Ditto.
9700 (rs6000_legitimate_address_p): Ditto.
9701 (abi_v4_pass_in_fpr): Ditto.
9702 (setup_incoming_varargs): Ditto.
9703 (rs6000_gimplify_va_arg): Ditto.
9704 (rs6000_split_multireg_move): Ditto.
9705 (rs6000_savres_strategy): Ditto.
9706 (rs6000_emit_prologue_components): Ditto.
9707 (rs6000_emit_epilogue_components): Ditto.
9708 (rs6000_emit_prologue): Ditto.
9709 (rs6000_emit_epilogue): Ditto.
9710 (rs6000_elf_file_end): Ditto.
9711 (rs6000_function_value): Ditto.
9712 (rs6000_libcall_value): Ditto.
9713 * config/rs6000/rs6000.h: Ditto.
9714 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9715 (TARGET_MINMAX): ... this. New.
9716 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9717 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9718 (*movsi_internal1_single): Delete.
9719 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9720 mfpu=, mxilinx-fpu): Delete.
9721 * config/rs6000/singlefp.h: Delete.
9722 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9723 * config/rs6000/t-rs6000: Ditto.
9724 * config/rs6000/t-xilinx: Delete.
9725 * config/rs6000/titan.md: Adjust for fp_type removal.
9726 * config/rs6000/vsx.md: Remove Xilinx FP support.
9727 (VStype_simple): Delete.
9728 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9729 * config/rs6000/xfpu.h: Delete.
9730 * config/rs6000/xfpu.md: Delete.
9731 * config/rs6000/xilinx.h: Delete.
9732 * config/rs6000/xilinx.opt: Delete.
9733 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9734 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9736 2018-05-04 Tom de Vries <tom@codesourcery.com>
9739 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9742 2018-05-04 Richard Biener <rguenther@suse.de>
9745 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9746 (expand_complex_div_wide): Likewise.
9747 (expand_complex_operations_1): Likewise.
9748 (expand_complex_libcall): Preserve EH info of the original stmt.
9749 (tree_lower_complex): Handle removed blocks.
9750 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9751 on complex multiplication and division libcall builtins.
9753 2018-05-04 Richard Biener <rguenther@suse.de>
9756 * fold-const.c (negate_expr_p): Restrict negation of operand
9757 zero of a division to when we know that can happen without
9759 (fold_negate_expr_1): Likewise.
9761 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9764 * real.h (real_nextafter): Declare.
9765 * real.c (real_nextafter): New function.
9766 * fold-const-call.c (fold_const_nextafter): New function.
9767 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9768 CASE_CFN_NEXTTOWARD.
9769 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9770 even when arg1_mode is different from arg0_mode.
9772 2018-05-03 Nathan Sidwell <nathan@acm.org>
9774 * doc/extend.texi (Deprecated Features): Remove
9776 (Backwards Compatibility): Likewise.
9777 * doc/invoke.texi (C++ Language Options): Likewise.
9778 (C++ Dialect Options): Likewise.
9780 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9783 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9784 _mm512_mask_mullox_epi64): New intrinsics.
9786 2018-05-03 Tom de Vries <tom@codesourcery.com>
9789 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9790 dump files): Add offload-tree.
9792 2018-05-03 Richard Biener <rguenther@suse.de>
9794 PR tree-optimization/85615
9795 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9796 to loops not nested in BBs loop father to avoid creating multi-entry
9799 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9801 PR tree-optimization/70291
9802 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9803 arguments. Change return type to tree. Emit libcall as a new
9804 statement rather than replacing existing one when inplace_p is true.
9805 (expand_complex_multiplication_components): New function.
9806 (expand_complex_multiplication): Expand floating-point complex
9807 multiplication using the above.
9808 (expand_complex_division): Rename inner_type parameter to type.
9809 Update expand_complex_libcall call-site.
9810 (expand_complex_operations_1): Update expand_complex_multiplication
9811 and expand_complex_division call-sites.
9813 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9816 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9817 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9818 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9819 the highest significant bit of the shift count mask is clear. In
9820 check whether and[sq]i3 is needed verify that all significant bits
9821 of the shift count other than the highest are set.
9823 2018-05-02 Tom de Vries <tom@codesourcery.com>
9826 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9827 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9828 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9829 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9830 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9831 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9832 __builtin_goacc_parlevel_size.
9834 2018-05-02 Richard Biener <rguenther@suse.de>
9836 PR tree-optimization/85597
9837 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9838 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9841 2018-05-02 Tom de Vries <tom@codesourcery.com>
9844 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9845 dump files): Add ltrans-tree.
9847 2018-05-02 Tom de Vries <tom@codesourcery.com>
9850 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9851 dump files): Add wpa-ipa.
9853 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9855 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9856 powerpc*-*-linux*paired* target.
9857 * config/rs6000/750cl.h: Delete.
9858 * config/rs6000/paired.h: Delete.
9859 * config/rs6000/paired.md: Delete.
9860 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9862 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9863 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9864 comment. Remove paired float support.
9865 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9866 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9868 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9869 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9871 * config/rs6000/rs6000.c: Remove paired float support.
9872 (paired_expand_vector_init, paired_expand_vector_move,
9873 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9874 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9875 paired_expand_builtin, paired_expand_predicate_builtin,
9876 paired_init_builtins): Delete.
9877 * config/rs6000/rs6000.h: Remove paired float support.
9878 * config/rs6000/rs6000.md: Remove paired float support.
9879 (move_from_CR_ov_bit): Delete.
9880 * config/rs6000/rs6000.opt (mpaired): Delete.
9881 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9882 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9884 2018-05-02 Richard Biener <rguenther@suse.de>
9887 * gimplify.c (gimplify_save_expr): When in SSA form allow
9888 SAVE_EXPRs to compute to SSA vars.
9890 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9893 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9894 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9895 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9896 clobber operands[2], instead use a new pseudo. Formatting fixes.
9898 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9900 PR tree-optimization/85586
9901 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9902 exit early for statements in the same group if the accesses are
9905 2018-05-02 Tom de Vries <tom@codesourcery.com>
9908 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9911 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9913 PR tree-optimization/85143
9914 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9916 2018-05-01 Tom de Vries <tom@codesourcery.com>
9919 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9920 not found" error message.
9922 2018-05-01 Tom de Vries <tom@codesourcery.com>
9925 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9926 * vec.c (test_ordered_remove_if): New function.
9927 (vec_c_tests): Call test_ordered_remove_if.
9928 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9929 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9930 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9931 VEC_ORDERED_REMOVE_IF.
9933 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9935 PR tree-optimization/82665
9936 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9937 pointer subtraction where arguments come from a memchr call.
9939 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9941 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9942 --push-state --as-needed and --pop-state instead of --as-needed and
9943 --no-as-needed if ld supports it.
9944 * configure: Regenerated.
9947 * doc/install.texi2html: Replace _002d with - and _002a with * in
9948 generated html files using sed.
9950 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9953 * gcc-rich-location.c (blank_line_before_p): New function.
9954 (use_new_line): New function.
9955 (gcc_rich_location::add_fixit_insert_formatted): New function.
9956 * gcc-rich-location.h
9957 (gcc_rich_location::add_fixit_insert_formatted): New function.
9959 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9961 * selftest.c (assert_streq): Rename "expected" and "actual" to
9962 "val1" and "val2". Extend NULL-handling to cover both inputs
9963 symmetrically, while still requiring both to be non-NULL for a pass.
9964 * selftest.h (assert_streq): Rename "expected" and "actual" to
9966 (ASSERT_EQ): Likewise.
9967 (ASSERT_EQ_AT): Likewise.
9968 (ASSERT_KNOWN_EQ): Likewise.
9969 (ASSERT_KNOWN_EQ_AT): Likewise.
9970 (ASSERT_NE): Likewise.
9971 (ASSERT_MAYBE_NE): Likewise.
9972 (ASSERT_MAYBE_NE_AT): Likewise.
9973 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9974 the assertion to pass.
9975 (ASSERT_STREQ_AT): Likewise.
9977 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9979 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9980 interaction with -pie.
9982 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9984 * selftest.h: Fix alphabetization of per-source-file selftest
9987 2018-04-30 Jason Merrill <jason@redhat.com>
9989 PR c++/61982 - dead stores to destroyed objects.
9990 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9993 2018-04-30 Jason Merrill <jason@redhat.com>
9995 * tree.c (build_clobber): New.
9996 * tree.h: Declare it.
9997 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9999 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10001 * diagnostic-show-locus.c (layout::layout): Update for
10002 location_get_source_line returning a char_span.
10003 (struct char_span): Move to input.h.
10004 (struct correction): Update for fields in char_span becoming
10006 (struct source_line): Update for location_get_source_line
10007 returning a char_span.
10008 (layout::print_line): Likewise.
10009 * edit-context.c (edited_file::print_content): Likewise.
10010 (edited_file::print_diff_hunk): Likewise.
10011 (edited_file::print_run_of_changed_lines): Likewise.
10012 (edited_file::get_num_lines): Likewise.
10013 (edited_line::edited_line): Likewise.
10014 * final.c (asm_show_source): Likewise.
10015 * input.c (location_get_source_line): Convert return type
10016 from const char * to char_span, losing the final "line_len"
10018 (dump_location_info): Update for the above.
10019 (get_substring_ranges_for_loc): Likewise. Use a char_span
10020 when handling the literal within the line.
10021 (test_reading_source_line): Update for location_get_source_line
10022 returning a char_span.
10023 * input.h (class char_span): Move here from
10024 diagnostic-show-locus.c, converting from a struct to a class.
10025 Make data members private.
10026 (char_span::operator bool): New.
10027 (char_span::length): New.
10028 (char_span::get_buffer): New.
10029 (char_span::operator[]): New.
10030 (char_span::subspan): Make const.
10031 (char_span::xstrdup): New.
10032 (location_get_source_line): Convert return type from const char *
10033 to char_span, losing the final "line_size" param.
10035 2018-04-30 Jan Hubicka <jh@suse.cz>
10037 * lto-wrapper.c (ltrans_priorities): New static var.
10038 (cmp_priority): New.
10039 (run_gcc): Read priorities and if doing parallel build order
10040 the Makefile by them.
10042 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10044 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10046 2018-04-30 Richard Biener <rguenther@suse.de>
10048 * tree-cfg.c (verify_address): Remove base argument, add
10049 flag whether to check TREE_ADDRESSABLE and do that.
10050 (verify_expr): Remove.
10051 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10052 (verify_gimple_assign_single): Likewise.
10053 (verify_gimple_switch): Likewise.
10054 (verify_expr_location_1): Dereference tp once. Add (disabled)
10055 piece from verify_expr.
10056 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10058 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10060 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10062 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10064 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10065 (small_data_pattern): Likewise.
10066 (arc_rewrite_small_data): Likewise.
10067 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10068 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10069 (get_symbol_alignment): New function.
10070 (legitimate_small_data_address_p): Likewise.
10071 (legitimate_scaled_address): Update, call
10072 legitimate_small_data_address_p.
10073 (output_sdata): New static variable.
10074 (arc_print_operand): Update how we handle small data operands.
10075 (arc_print_operand_address): Likewise.
10076 (arc_legitimate_address_p): Update, use
10077 legitimate_small_data_address_p.
10078 (arc_rewrite_small_data_p): Remove.
10079 (arc_rewrite_small_data_1): Likewise.
10080 (arc_rewrite_small_data): Likewise.
10081 (small_data_pattern): Likewise.
10082 (compact_sda_memory_operand): Update to use
10083 legitimate_small_data_address_p and get_symbol_alignment.
10084 (prepare_move_operands): Don't rewite sdata pattern.
10085 (prepare_extend_operands): Remove.
10086 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10088 (zero_extendqisi2): Likewise.
10089 (zero_extendhisi2): Likewise.
10090 (extendqihi2): Likewise.
10091 (extendqisi2): Likewise.
10092 (extendhisi2): Likewise.
10093 (addsi3): Likewise.
10094 (subsi3): Likewise.
10095 (andsi3): Likewise.
10096 * config/arc/constraints.md (Usd): Change it to memory constraint.
10098 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10100 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10101 as source of std instructions.
10102 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10103 allow 6-bit constants as source for store instructions.
10104 (movdi_insn): Update instruction pattern to allow 6-bit constants
10105 as source for store instructions.
10107 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10109 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10111 2018-04-30 Nathan Sidwell <nathan@acm.org>
10112 Sandra Loosemore <sandra@codesourcery.com>
10114 * dumpfile.c (dump_open): Allow '-' for stdout.
10115 * doc/invoke.texi (Developer Options): Document dump filename
10116 determination early. Document stdin/stdout selection.
10118 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10120 Microblaze Target: PIC data text relative
10122 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10123 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10125 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10126 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10127 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10128 New addressing mode for data-text relative position indepenedent code.
10129 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10130 'ADDRESS_SYMBOLIC_TXT_REL'.
10131 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10132 (microblaze_legitimate_pic_operand): Exclude function calls from
10133 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10134 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10136 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10137 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10138 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10139 for 'address + offset'.
10140 (microblaze_expand_prologue): Add new function prologue call for
10142 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10143 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10144 table in case of TARGET_PIC_DATA_TEXT_REL.
10145 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10146 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10147 Add new macros 'UNSPEC_TEXT',
10148 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10149 + exclude function calls from 'UNSPEC_PLT' in case of data text
10151 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10152 new target hook for generating address diff vector tables in case of
10154 * doc/tm.texi : Regenerate.
10155 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10156 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10157 of addr diff vector generation.
10158 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10159 target hook definition.
10160 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10161 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10162 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10163 option for data text relative.
10165 2018-04-30 Richard Biener <rguenther@suse.de>
10167 * tree-chrec.h (evolution_function_is_constant_p): Remove
10169 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10171 2018-04-30 Richard Biener <rguenther@suse.de>
10174 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10176 2018-04-30 Richard Biener <rguenther@suse.de>
10178 PR tree-optimization/28364
10179 PR tree-optimization/85275
10180 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10181 copying first exit test.
10183 2018-04-28 Mark Wielaard <mark@klomp.org>
10185 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10186 dwarf_version >= 5.
10187 (dwarf_AT): Handle DW_AT_addr_base.
10188 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10190 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10193 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10194 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10195 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10196 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10198 2018-04-28 Richard Biener <rguenther@suse.de>
10200 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10201 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10202 to reflect use. Only add interesting stmts.
10204 2018-04-27 Martin Jambor <mjambor@suse.cz>
10207 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10208 the jump function allows for passing through aggregate values.
10210 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10212 * input.h (in_system_header_at): Convert from macro to inline
10214 (from_macro_expansion_at): Likewise.
10215 (from_macro_definition_at): Likewise.
10217 2018-04-27 Jeff Law <law@redhat.com>
10219 * config.gcc: Mark tile* targets as deprecated/obsolete.
10221 2018-04-27 Richard Biener <rguenther@suse.de>
10223 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10226 2018-04-27 Richard Biener <rguenther@suse.de>
10228 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10230 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10232 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10233 with Yd constraint. Set "preferred_for_speed" attribute from
10234 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10235 with Yd constraint.
10236 (*movdi_internal): Ditto.
10237 (movti_interunit splitters): Remove
10238 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10239 (movdi_interunit splitters): Ditto.
10240 * config/i386/constraints.md (Ye): Remove.
10241 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10243 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10246 * config/aarch64/constraints.md (Usg): Limit to 31.
10247 (Usj): Limit to 63.
10249 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10251 PR tree-optimization/85529
10252 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10253 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10254 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10255 zero extension or masking of the MSB bit.
10256 (optimize_range_tests): Add FIRST_BB argument, pass it through
10257 to optimize_range_tests_var_bound.
10258 (maybe_optimize_range_tests, reassociate_bb): Adjust
10259 optimize_range_tests callers.
10261 2018-04-26 Richard Biener <rguenther@suse.de>
10262 Jakub Jelinek <jakub@redhat.com>
10264 * cgraph.h (symbol_table): Just declare debug method here.
10265 * symtab.c (symbol_table::debug): Define.
10267 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10269 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10271 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10273 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10274 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10275 (*movdi_internal): Substitute Yi and Yj constraint with x
10276 and Ym and Yn constraint with y constraint. Update "isa"
10277 attribute and set "preferred_for_speed" attribute from
10278 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10279 (*movsi_internal): Ditto.
10280 (*movdf_internal): Ditto.
10281 (*movsf_internal): Ditto.
10282 (*zero_extendsidi2): Ditto.
10283 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10284 (sse2_loadld): Ditto.
10285 (*vec_extract<ssevecmodelower>_0): Ditto.
10286 (*vec_extractv4si_0_zext_sse4): Ditto.
10287 (vec_concatv2di): Ditto.
10288 (*vec_dup<mode>): Ditto.
10289 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10290 * config/i386/constraints.md (Yi): Remove.
10295 2018-04-26 Nathan Sidwell <nathan@acm.org>
10297 * dumpfile.c (dump_open): New.
10298 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10299 (dump_finish): Detect stdio/stderr by value not name.
10301 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10303 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10305 2018-04-26 Tom de Vries <tom@codesourcery.com>
10308 * config/nvptx/nvptx.c (verify_neutering_jumps)
10309 (verify_neutering_labels): New function
10310 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10312 2018-04-26 Tom de Vries <tom@codesourcery.com>
10315 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10316 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10319 2018-04-26 Richard Biener <rguenther@suse.de>
10320 Tom de Vries <tom@codesourcery.com>
10323 * lto-streamer-out.c (output_function): Fixup loops if required to match
10324 discovery done in the reader.
10326 2018-04-26 Richard Biener <rguenther@suse.de>
10328 PR tree-optimization/85116
10329 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10330 have a loop exit from the single latch predecessor. Remove
10331 case of header with just condition.
10332 (ch_base::copy_headers): Exclude infinite loops from any
10334 (pass_ch::execute): Record exits.
10336 2018-04-26 Richard Biener <rguenther@suse.de>
10338 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10339 prologue cost vector and pass it to vect_get_load_cost.
10340 (vect_get_peeling_costs_all_drs): Likewise.
10341 (vect_peeling_hash_get_lowest_cost): Likewise.
10342 (vect_enhance_data_refs_alignment): Likewise.
10344 2018-04-26 Richard Biener <rguenther@suse.de>
10346 PR middle-end/85450
10347 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10348 checking of integer<->pointer conversions.
10349 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10350 sign-/zero-extending pointer types.
10351 (expand_omp_for_static_chunk): Likewise.
10353 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10354 Jean Lee <xiaoyur347@gmail.com>
10356 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10357 (TARGET_ASAN_SHADOW_OFFSET): Define.
10358 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10359 true for -fsanitize=address.
10361 2018-04-25 Mark Wielaard <mark@klomp.org>
10363 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10366 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10368 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10369 than "alu", remove explicit "memory" and "imm_disp" attributes.
10370 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10372 PR middle-end/85414
10373 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10374 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10375 gen_lowpart_no_emit.
10377 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10380 * config/i386/i386.c (ix86_expand_builtin): Change memory
10381 operand to XI, extend p0 to Pmode.
10382 * config/i386/i386.md: Change unspec volatile and operand
10383 1 mode to XI, change operand 0 mode to P.
10385 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10387 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10388 GET_MODE_MASK before any checking.
10389 (nds32_can_use_bset_p): Likewise.
10390 (nds32_can_use_btgl_p): Likewise.
10392 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10394 * config/nds32/nds32-doubleword.md: New define_split pattern for
10395 illegal register number.
10397 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10399 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10401 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10403 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10405 2018-04-25 Richard Biener <rguenther@suse.de>
10407 * lto-streamer.h (LTO_major_version): Bump to 8.
10409 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10411 * BASE-VER: Set to 9.0.0.
10413 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10415 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10416 in __abskf2 and __powikf2.
10418 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10421 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10422 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10423 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10424 Use the above on operand 2. Reindent.
10425 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10427 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10430 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10432 * config/i386/i386.opt (mcet): Removed.
10433 * doc/install.texi: Remove -mcet documentation.
10434 * doc/invoke.texi: Likewise.
10436 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10439 * doc/install.texi: Remove -mcet from bootstrap-cet.
10441 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10444 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10445 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10449 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10450 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10451 containing a CONST_VECTOR.
10453 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10455 * doc/install.texi: Update newlib dependency for nvptx.
10457 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10460 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10461 instead of INTVAL when shifting x left.
10463 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10465 PR tree-optimization/85478
10466 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10467 vect_grouped_store_supported for single element vectors.
10469 2018-04-24 Richard Biener <rguenther@suse.de>
10472 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10473 load cost increase to the case of non-constant step.
10475 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10478 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10479 destination if any_malformed_asm.
10481 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10483 PR middle-end/85496
10484 * expr.c (store_field): In the bitfield case, if the value comes from
10485 a function call and is returned in registers by means of a PARALLEL,
10486 do not change the mode of the temporary unless BLKmode and VOIDmode.
10488 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10490 PR rtl-optimization/85423
10491 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10492 dependencies to debug insns when the previous insn is non-debug.
10494 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10496 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10497 enums into a single definition.
10498 (fls): Fix predicates and printing.
10501 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10503 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10504 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10505 and short u6 immediate.
10506 (check_if_valid_sleep_operand): Remove.
10507 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10509 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10511 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10512 flag_always_save_lp condition.
10513 * config/nds32/nds32.opt (malways-save-lp): New option.
10515 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10517 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10518 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10519 * config/nds32/nds32.h
10520 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10521 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10523 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10525 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10526 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10528 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10529 Chung-Ju Wu <jasonwucj@gmail.com>
10531 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10533 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10534 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10536 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10538 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10540 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10542 * config/nds32/nds32-protos.h (nds32_data_alignment,
10543 nds32_local_alignment): Declare.
10544 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10545 nds32_local_alignment): New functions.
10546 (TARGET_CONSTANT_ALIGNMENT): Define.
10547 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10549 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10551 * config/nds32/nds32.c
10552 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10553 (TARGET_MODES_TIEABLE_P): Likewise.
10555 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10557 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10558 level Ofast and Og.
10560 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10561 Chung-Ju Wu <jasonwucj@gmail.com>
10563 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10564 for unaligned access.
10565 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10567 * config/nds32/nds32-intrinsic.md: Likewise.
10568 * config/nds32/nds32_intrinsic.h: Likewise.
10569 * config/nds32/nds32.h (nds32_builtins): Likewise.
10570 * config/nds32/nds32.opt (munaligned-access): New option.
10571 * config/nds32/nds32.c (nds32_asm_file_start): Display
10572 flag_unaligned_access status.
10574 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10576 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10577 -mno-relax is present.
10578 * config/riscv/linux.h (LINK_SPEC): Ditto.
10580 2018-04-20 Martin Sebor <msebor@redhat.com>
10583 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10585 (gimple_fold_builtin_stxcpy_chk): Same.
10586 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10588 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10591 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10592 __powikf2 when long double is IEEE 128-bit.
10594 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10596 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10597 step to make sure stack always aligned.
10599 2018-04-20 Carl Love <cel@us.ibm.com>
10602 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10603 size check for arg0.
10605 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10606 Tom de Vries <tom@codesourcery.com>
10609 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10610 Emit insns for calls too.
10611 (nvptx_find_par): Always look for worker-level predecessor insn.
10612 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10614 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10615 (nvptx_process_pars): Propagate frames for calls.
10617 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10620 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10622 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10623 (ix86_handle_option): Don't handle OPT_mibt.
10624 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10626 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10628 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10629 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10630 (ix86_target_macros): Define __CET__ with flag_cf_protection
10631 for -fcf-protection.
10632 * config/i386/i386.c (isa2_opts): Remove -mibt.
10633 * config/i386/i386.h (TARGET_IBT): Removed.
10634 (TARGET_IBT_P): Likewise.
10635 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10636 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10637 * config/i386/i386.opt (mcet): Update help message.
10638 (mshstk): Likewise.
10640 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10641 -mcet as an alias for -mshstk.
10643 2018-04-20 Richard Biener <rguenther@suse.de>
10645 PR middle-end/85475
10646 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10647 complexity by forcing a single use of the multiply operand.
10649 2018-04-20 Martin Jambor <mjambor@suse.cz>
10652 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10653 recursion dependency to only apply to non-clones.
10655 2018-04-20 Martin Jambor <mjambor@suse.cz>
10658 * ipa-cp.c (create_specialized_node): Check that clones of
10659 self-recursive edges exist during IPA-CP.
10661 2018-04-19 Toon Moene <toon@moene.org>
10663 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10666 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10668 PR tree-optimization/85467
10669 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10670 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10671 VECTOR_CST element to type.
10673 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10676 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10677 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10678 (builtin_longjmp): Likewise.
10679 (save_stack_nonlocal): New pattern.
10680 (restore_stack_nonlocal): Likewise.
10682 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10685 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10686 Replace ASM_OUTPUT_LABEL with fprintf.
10688 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10691 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10692 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10693 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10694 define __IBT__ and __SHSTK__ for -fcf-protection.
10695 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10697 (ix86_trampoline_init): Likewise.
10698 (x86_output_mi_thunk): Likewise.
10699 (ix86_notrack_prefixed_insn_p): Likewise.
10700 (ix86_option_override_internal): Don't disallow -fcf-protection.
10701 * config/i386/i386.md (rdssp<mode>): Also enable for
10703 (incssp<mode>): Likewise.
10704 (nop_endbr): Likewise.
10705 * config/i386/i386.opt (mcet): Change help message to built-in
10708 (mshstk): Likewise.
10709 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10710 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10711 enable CET built-in functions.
10713 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10715 * common/config/i386/i386-common.c
10716 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10717 OPTION_MASK_ISA_MOVDIRI_UNSET,
10718 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10719 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10720 * config.gcc (movdirintrin.h): New header.
10721 * config/i386/cpuid.h (bit_MOVDIRI,
10722 bit_MOVDIR64B): New bits.
10723 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10725 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10726 (VOID, PVOID, PCVOID)): New function types.
10727 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10728 __builtin_ia32_directstoreu_u64,
10729 __builtin_ia32_movdir64b): New builtins.
10730 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10731 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10733 (ix86_valid_target_attribute_inner_p): Ditto.
10734 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10735 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10736 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10737 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10738 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10739 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10740 (movdiri<mode>, movdir64b_<mode>): New.
10741 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10742 * config/i386/immintrin.h: Include movdirintrin.h.
10743 * config/i386/movdirintrin.h: New file.
10744 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10746 2018-04-19 Richard Biener <rguenther@suse.de>
10748 PR middle-end/85455
10749 * cfg.c (clear_bb_flags): When loop state says we have
10750 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10752 2018-04-19 Richard Biener <rguenther@suse.de>
10754 PR tree-optimization/84737
10755 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10756 copying restrict info.
10757 (vect_setup_realignment): Use it.
10758 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10759 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10760 the first DR to all generated stores.
10761 (vectorizable_load): Likewise for loads.
10763 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10765 PR tree-optimization/85446
10766 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10767 the integral and pointer types to have the same precision.
10769 * doc/install.texi: Document --disable-cet being the default and
10772 2018-04-18 Martin Liska <mliska@suse.cz>
10774 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10777 2018-04-18 Martin Liska <mliska@suse.cz>
10780 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10783 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10784 arguments if they are comparable.
10786 2018-04-18 Martin Liska <mliska@suse.cz>
10789 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10792 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10795 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10798 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10799 ENDBR after calling __morestack.
10801 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10804 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10805 by using gcc_base_ver to generate a gcc_driver_version, and use
10806 it when generating GCC_DRIVER_NAME.
10807 * configure: Regenerate.
10809 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10812 * config.gcc: Obsolete powerpc*-*-*spe*.
10814 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10817 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10818 (stabstr_D): Change type of unum from unsigned int to
10819 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10822 2018-04-17 Jim Wilson <jimw@sifive.com>
10825 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10826 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10827 Set arg_pointer_offset after using pretend_args_size.
10829 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10831 PR rtl-optimization/85431
10832 * dse.c (record_store): Ignore zero width stores.
10835 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10836 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10837 __builtin_stack_restore rather than after it.
10838 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10839 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10840 argument instead of virtual_dynamic_stack_rtx.
10842 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10844 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10846 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10847 Add note to error message to explain internal mapping of overloaded
10848 built-in function name to non-overloaded built-in function name.
10849 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10852 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10855 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10856 where the inputs overlap with the output.
10858 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10860 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10861 (=v, v) alternative and explicit "memory" attribute.
10862 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10863 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10865 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10866 "sselog1" type instead of "sselog".
10867 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10868 "sselog". Remove explicit "memory" attribute.
10869 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10870 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10872 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10873 "sselog1" type instead of "sselog". Remove explicit "memory"
10875 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10876 use "sselog1" type instead of "sselog". Remove explicit "memory"
10878 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10879 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10881 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10882 "sselog1" type instead of "sselog". Remove explicit "memory"
10884 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10885 use "sselog1" type instead of "sselog". Remove explicit "memory"
10889 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10891 PR middle-end/85414
10892 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10895 2018-04-17 Martin Jambor <mjambor@suse.cz>
10898 * ipa-cp.c (create_specialized_node): Call
10899 expand_all_artificial_thunks if necessary.
10901 2018-04-17 Martin Liska <mliska@suse.cz>
10904 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10905 in message, remote space in between '_G' and '('.
10907 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10910 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10911 avx512f_vmcmp<mode>3<round_saeonly_name>,
10912 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10913 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10914 avx512f_rndscale<mode><round_saeonly_name>,
10915 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10916 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10917 Use %<iptr>2 instead of %2 for -masm=intel.
10918 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10919 avx512f_vcvttss2usi<round_saeonly_name>,
10920 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10922 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10923 avx512f_vcvttsd2usi<round_saeonly_name>,
10924 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10925 Use %q1 instead of %1 for -masm=intel.
10926 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10927 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10928 of %3 for -masm=intel.
10929 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10931 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10933 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10935 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10936 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10938 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10940 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10941 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10942 %g1 and one with %0 and %1.
10943 (avx512er_vmrcp28<mode><round_saeonly_name>,
10944 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10945 %1 for -masm=intel.
10946 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10947 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10948 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10949 of %0 and %{%4%} for -masm=intel.
10950 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10951 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10952 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10953 order of %0 and %{%5%}%{z%} for -masm=intel.
10955 2018-04-17 Jan Hubicka <jh@suse.cz>
10958 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10960 2018-04-17 Martin Liska <mliska@suse.cz>
10963 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10964 for target_clone error message. Make default implementation
10965 clone to be a local declaration.
10966 (separate_attrs): Add new argument and check for an empty
10968 (expand_target_clones): Handle it.
10969 (ipa_target_clone): Make redirection just for target_clones
10972 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10973 Tom de Vries <tom@codesourcery.com>
10975 PR middle-end/84955
10976 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10977 tiled basic blocks without omp continue statements.
10979 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10982 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10983 vec_extract expression as having side effects to make sure it gets
10986 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10989 * config/i386/i386.c (get_builtin_code_for_version): Check
10992 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10995 * config.gcc: Support "skylake".
10996 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10998 * config/i386/i386.c (m_SKYLAKE): Define.
10999 (processor_target_table): Add "skylake".
11000 (ix86_option_override_internal): Add "skylake".
11001 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11002 PROCESSOR_CANNONLAKE.
11003 (get_builtin_code_for_version): Fix priority for
11004 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11005 PROCESSOR_SKYLAKE-AVX512.
11006 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11007 (processor_type): Add PROCESSOR_SKYLAKE.
11009 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11010 Jason Merrill <jason@redhat.com>
11013 * convert.c (convert_to_integer_1): Use direct recursion for
11014 enumeral types and types with a precision less than the number
11015 of bits in their mode.
11017 2018-04-16 Julia Koval <julia.koval@intel.com>
11020 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11021 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11023 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11026 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11027 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11028 and -mno-direct-move.
11030 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11033 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11034 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11035 Ensure negative shifts result in {0}.
11037 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11039 PR rtl-optimization/79916
11040 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11041 regs (if any) to define how to gnerate SD moves when LRA is in
11044 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11046 PR rtl-optimization/85393
11047 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11048 * except.c (expand_dw2_landing_pad_for_region): Make static.
11049 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11050 a label and unconditional jump to old_bb, rather than
11051 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11054 PR rtl-optimization/85376
11055 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11056 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11057 instead of a specific value.
11059 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11060 Bin Cheng <bin.cheng@arm.com>
11062 PR tree-optimization/82965
11063 PR tree-optimization/83991
11064 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11065 by_profile_only parameter.
11066 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11067 information if the loop was predicted to iterate too many times.
11068 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11070 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11073 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11076 2018-04-13 Martin Liska <mliska@suse.cz>
11077 Jakub Jelinek <jakub@redhat.com>
11079 PR middle-end/81657
11080 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11081 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11082 * builtins.c (expand_builtin_memory_copy_args): Use
11083 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11084 handle dest_addr == pc_rtx.
11086 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11089 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11090 asked to not generate direct moves.
11091 (fix_trunc<mode>si2_stfiwx): Similar.
11092 (fix_trunc<mode>si2_internal): Similar.
11094 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11097 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11098 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11099 lookup if dest in some wider mode is known to be const0_rtx and
11100 if so, record permanent equivalence for it to be ZERO_EXTEND of
11101 the narrower mode destination.
11103 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11105 * lto-streamer-out.c (output_function): Revert 259346.
11106 * omp-expand.c (expand_oacc_for): Likewise.
11108 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11110 PR rtl-optimization/85354
11111 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11112 * sel-sched.c (sel_global_init): ... here.
11114 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11117 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11118 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11119 mode for PE-COFF targets.
11120 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11121 (i386_pe_asm_lto_end): Likewise.
11122 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11123 (TARGET_ASM_LTO_END): Likewise.
11124 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11125 (i386_pe_asm_lto_start): New function.
11126 (i386_pe_asm_lto_end): Likewise.
11128 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11129 Richard Biener <rguenther@suse.de>
11131 PR middle-end/84955
11132 * lto-streamer-out.c (output_function): Fix CFG loop state before
11134 * omp-expand.c (expand_oacc_for): Handle calls to internal
11135 functions like regular functions.
11137 2018-04-12 Richard Biener <rguenther@suse.de>
11140 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11141 for the early LTO debug to properly generate references to it
11142 during DIE emission. Do not re-use that for the skeleton for
11144 (dwarf2out_early_finish): Likewise.
11146 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11149 * config/i386/sse.md
11150 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11151 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11152 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11153 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11154 and output is a reg, avoid creating invalid lowpart subreg, but
11155 instead split into a 512-bit move. Don't split if not AVX512VL,
11156 input is xmm16+ reg and output is a mem.
11157 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11158 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11159 xmm16+ reg and output is a mem.
11161 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11163 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11164 also for flag_dwarf2_cfi_asm.
11166 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11168 PR rtl-optimization/85342
11169 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11170 a bool scalar var inside of the loop instead. Don't try to update
11171 recog_data.operand after failed apply_change_group.
11173 2018-04-12 Tom de Vries <tom@codesourcery.com>
11176 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11177 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11178 array with flexible array member as array without given dimension.
11179 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11180 argument for undefined param to true.
11182 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11185 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11186 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11187 from PowerPC section.
11188 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11189 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11190 help text that is too long.
11191 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11192 help text that is too long.
11193 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11194 help text that is too long.
11196 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11198 * config/alpha/alpha.md (stack_probe_internal): Rename
11199 from "probe_stack". Update all callers.
11201 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11203 PR rtl-optimization/84566
11204 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11205 sched_macro_fuse_insns.
11207 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11210 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11211 (compute_block_dependences): ... from here.
11213 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11215 PR tree-optimization/85331
11216 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11217 from int to HOST_WIDE_INT.
11219 2018-04-11 Martin Jambor <mjambor@suse.cz>
11222 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11223 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11224 not the same as the source val.
11225 (cgraph_edge_brings_value_p): New parameter.
11226 (gather_edges_for_value): Pass destination value to
11227 cgraph_edge_brings_value_p.
11228 (perhaps_add_new_callers): Likewise.
11229 (get_info_about_necessary_edges): Likewise and exclude values brought
11230 only by self-recursive edges.
11231 (create_specialized_node): Redirect only clones of self-calling edges.
11232 (+self_recursive_pass_through_p): New function.
11233 (find_more_scalar_values_for_callers_subset): Use it.
11234 (find_aggregate_values_for_callers_subset): Likewise.
11235 (known_aggs_to_agg_replacement_list): Removed.
11236 (decide_whether_version_node): Re-calculate known constants for all
11237 remaining context clones.
11239 2018-04-11 Richard Biener <rguenther@suse.de>
11242 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11243 from early DWARF output.
11244 (dwarf2out_early_finish): Output line info unconditionally into
11245 early DWARF and add reference to it.
11247 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11250 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11251 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11252 other than V2DFmode using iptr mode attribute.
11253 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11255 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11257 PR rtl-optimization/84659
11258 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11260 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11263 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11265 (output_loc_list): Pass address of a dummy size variable even in the
11266 locview handling loop.
11267 (index_location_lists): Add comment on why skip_loc_list_entry can't
11270 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11273 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11276 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11279 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11280 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11281 and -mstring-compare-inline-limit.
11283 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11286 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11287 for stack clash protection in a register whenever we need it to be in
11290 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11292 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11293 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11295 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11298 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11300 (mlong-double-): Ditto.
11301 * config/rs6000/sysv4.opt (msdata=): Ditto.
11302 (mtls-size=): Ditto.
11304 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11306 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11307 erroneous entries for
11308 "vector int vec_ldl (int, long int *)", and
11309 "vector unsigned int vec_ldl (int, unsigned long int *)".
11310 Add comments and entries for
11311 "vector bool char vec_ldl (int, bool char *)",
11312 "vector bool short vec_ldl (int, bool short *)",
11313 "vector bool int vec_ldl (int, bool int *)",
11314 "vector bool long long vec_ldl (int, bool long long *)",
11315 "vector pixel vec_ldl (int, pixel *)",
11316 "vector long long vec_ldl (int, long long *)",
11317 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11318 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11319 type tree bool_long_long_type_node and correct definition of
11320 bool_V2DI_type_node to make reference to this new type tree.
11321 (rs6000_mangle_type): Replace erroneous reference to
11322 bool_long_type_node with bool_long_long_type_node.
11323 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11324 comments to emphasize sign distinctions for char and int types and
11325 replace RS6000_BTI_bool_long constant with
11326 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11327 use of RS6000_BTI_pixel.
11328 (bool_long_type_node): Remove this macro definition.
11329 (bool_long_long_type_node): New macro definition
11331 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11333 PR rtl-optimization/85300
11334 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11335 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11336 simplify_unary_operation fails.
11338 2018-04-10 Martin Liska <mliska@suse.cz>
11340 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11341 cgraph_edge and ipa_ref.
11343 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11347 * config/i386/sse.md
11348 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11349 computation of the VEC_MERGE selector from mask.
11350 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11351 Fix decoding of the VEC_MERGE selector into mask.
11353 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11355 PR tree-optimization/85286
11356 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11358 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11360 * final.c (final_1): Set insn_last_address as well as
11361 insn_current_address.
11363 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11366 * explow.c (emit_stack_probe): Call validize_mem on memory location
11367 before passing it to gen_probe_stack. Create address operand and
11368 legitimize it for the probe_stack_address case.
11370 2018-04-09 Jan Hubicka <jh@suse.cz>
11373 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11374 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11375 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11377 (free_lang_data): Rebuild type inheritance graph.
11379 2018-04-09 Martin Sebor <msebor@redhat.com>
11381 * invoke.texi (-finline-small-functions): Mention other optimization
11383 (-findirect-inlining, -fpartial-inlining): Same.
11384 (-finline-functions-called-once): Same.
11385 (-freorder-blocks-and-partition): Same.
11387 2018-04-09 Jan Hubicka <jh@suse.cz>
11390 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11391 jumps; choose last target that matches the criteria (i.e.
11392 no partition changes for non-crossing jumps).
11393 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11394 support for redirecting crossing jumps to non-crossing.
11396 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11398 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11399 also for naked functions.
11401 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11403 * config/arc/arc.md (add_shift): New pattern.
11404 (add_shift2): Likewise.
11405 (sub_shift): Likewise.
11406 (sub_shift_cmp0_noout): Likewise.
11407 (compare_si_ashiftsi): Likewise.
11408 (xbfu_cmp0_noout): New combine pattern.
11409 (xbfu_cmp0"): Likewise.
11410 (movsi_set_cc_insn): Place the predicable variant first.
11411 (commutative_binary_cmp0_noout): Remove clobber.
11412 (commutative_binary_cmp0): New pattern.
11413 (noncommutative_binary_cmp0): Likewise.
11414 (noncommutative_binary_cmp0_noout): Likewise.
11415 (noncommutative_binary_comparison_result_used): Removed.
11416 (rsub_cmp0): New pattern.
11417 (rsub_cmp0_noout): Likewise.
11418 (extzvsi): Changed, keep only meaningful variants.
11419 (SQH, SEZ): New iterators.
11420 (SQH_postfix): New mode attribute.
11421 (SEZ_prefix): New code attribute.
11422 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11423 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11424 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11425 of numerical value.
11426 (noncommutative_operator): Check the availability of barrel
11429 2018-04-09 Richard Biener <rguenther@suse.de>
11431 PR tree-optimization/85284
11432 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11433 Only use the niter constraining form of simple_iv when the exit
11434 is always executed.
11436 2018-04-09 Tom de Vries <tom@codesourcery.com>
11439 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11440 (define_expand "*memory_barrier"): New define_expand.
11441 (define_insn "memory_barrier"): New insn.
11443 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11445 PR rtl-optimization/80463
11446 PR rtl-optimization/83972
11447 PR rtl-optimization/83480
11449 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11450 correct producer for the insn.
11451 (tidy_control_flow): Fixup seqnos in case of debug insns.
11453 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11455 PR rtl-optimization/83913
11457 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11458 different sched-times when merging exprs.
11460 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11462 PR rtl-optimization/83962
11464 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11465 tidy_fallthru_edge and tidy_control_flow.
11467 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11469 PR rtl-optimization/83530
11471 * sel-sched.c (force_next_insn): New global variable.
11472 (remove_insn_for_debug): When force_next_insn is true, also leave only
11473 next insn in the ready list.
11474 (sel_sched_region): When the region wasn't scheduled, make another pass
11475 over it with force_next_insn set to 1.
11477 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11479 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11481 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11482 for interrupt control.
11483 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11484 functions for interrupt control.
11485 * config/nds32/nds32-intrinsic.md: Likewise.
11486 * config/nds32/nds32_intrinsic.h: Likewise.
11487 * config/nds32/nds32.h (nds32_builtins): Likewise.
11489 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11491 * config/nds32/nds32.c (nds32_init_machine_status,
11492 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11493 strict_aligned_p field.
11494 (nds32_expand_to_rtl_hook): New function.
11495 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11496 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11498 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11499 Chung-Ju Wu <jasonwucj@gmail.com>
11501 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11502 * config/nds32/nds32-n7.md: New file.
11503 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11504 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11506 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11507 * config/nds32/nds32.md (pipeline_model): Add n7.
11508 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11509 * config/nds32/pipelines.md: Include n7 settings.
11511 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11512 Chung-Ju Wu <jasonwucj@gmail.com>
11514 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11515 * config/nds32/nds32-e8.md: New file.
11516 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11517 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11519 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11520 * config/nds32/nds32.md (pipeline_model): Add e8.
11521 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11522 * config/nds32/pipelines.md: Include e8 settings.
11524 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11525 Chung-Ju Wu <jasonwucj@gmail.com>
11527 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11528 * config/nds32/nds32-n8.md: New file.
11529 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11530 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11532 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11533 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11534 * config/nds32/nds32.md (pipeline_model): Add n8.
11535 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11536 * config/nds32/pipelines.md: Include n8 settings.
11538 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11539 Chung-Ju Wu <jasonwucj@gmail.com>
11541 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11542 * config/nds32/nds32-n9-2r1w.md: New file.
11543 * config/nds32/nds32-n9-3r2w.md: New file.
11544 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11545 nds32_register_ports): New or modify for cpu n9.
11546 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11548 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11549 * config/nds32/nds32-utils.c: New file.
11550 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11551 TARGET_MUL_SLOW): Define.
11552 * config/nds32/nds32.md (pipeline_model): New attribute.
11553 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11554 New options that support cpu n9.
11555 * config/nds32/pipelines.md: Include n9 settings.
11556 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11558 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11560 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11561 information if necessary.
11562 (output_cond_branch_compare_zero): Likewise.
11563 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11564 (nds32_target_alignment): Refine for alignment.
11565 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11566 (FUNCTION_BOUNDARY): Modify.
11567 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11569 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11571 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11573 * config/nds32/constants.md (unspec_volatile_element): Add values for
11574 TLB operation and data prefetch.
11575 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11576 functions for TLB operation and data prefetch.
11577 * config/nds32/nds32-intrinsic.md: Likewise.
11578 * config/nds32/nds32_intrinsic.h: Likewise.
11579 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11580 (nds32_print_operand): Likewise.
11581 * config/nds32/nds32.h (nds32_builtins): Likewise.
11583 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11584 Andrew Pinski <pinsika@gcc.gnu.org>
11586 PR middle-end/82976
11587 * match.pd: Use constant_boolean_node of correct type instead of
11588 boolean_true_node or boolean_false_node for simplifying
11589 pointer comparisons to zero.
11591 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11593 PR tree-optimization/80021
11594 * tree.c (verify_type_variant): Make error call in verify_variant_match
11595 translatable and remove final full stop.
11597 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11599 * config/nds32/constants.md (unspec_volatile_element): Add
11600 UNSPEC_VOLATILE_EH_RETURN.
11601 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11602 nds32_output_stack_pop): Support dwarf exception handling process.
11603 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11604 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11605 exception handling process.
11606 (nds32_compute_stack_frame): Likewise.
11607 (nds32_return_addr_rtx): Likewise.
11608 (nds32_initial_elimination_offset): Likewise.
11609 (nds32_expand_prologue): Likewise.
11610 (nds32_expand_epilogue): Likewise.
11611 (nds32_dynamic_chain_address): New function.
11612 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11613 exception handling.
11614 (DYNAMIC_CHAIN_ADDRESS): Define.
11615 (EH_RETURN_DATA_REGNO): Define.
11616 (EH_RETURN_STACKADJ_RTX): Define.
11617 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11618 patterns for dwarf exception handling.
11620 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11622 * config/nds32/nds32.h: Clean up obsolete macros.
11624 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11626 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11627 Add enum values for particular instructions.
11628 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11629 particular intrinsic functions.
11630 * config/nds32/nds32-intrinsic.md: Likewise.
11631 * config/nds32/nds32_intrinsic.h: Likewise.
11632 * config/nds32/nds32.h (nds32_builtins): Likewise.
11633 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11634 (btst, ave): New patterns for particular instructions.
11636 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11638 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11639 Add enum values for atomic load/store and memory sync.
11640 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11642 * config/nds32/nds32-intrinsic.md: Likewise.
11643 * config/nds32/nds32_intrinsic.h: Likewise.
11644 * config/nds32/nds32.h (nds32_builtins): Likewise.
11646 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11648 PR tree-optimization/85257
11649 * fold-const.c (native_encode_vector): If not all elts could fit
11650 and off is -1, return 0 rather than offset.
11651 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11652 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11653 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11654 adjust buffer in native_interpret_expr call.
11656 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11658 * config/nds32/constants.md (unspec_volatile_element): Add cache
11659 control enum values.
11660 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11661 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11662 * config/nds32/nds32.c (nds32_cctl_names): New.
11663 (nds32_print_operand): Handle cache control register names.
11664 * config/nds32/nds32.h (nds32_builtins): New enum values.
11665 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11667 * config/nds32/nds32.md (type): Add mmu.
11668 * config/nds32/pipelines.md (simple_insn): Add mmu.
11670 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11672 * config/nds32/nds32.md (type): Remove call.
11673 * config/nds32/pipelines.md (simple_insn): Likewise.
11675 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11677 * config/nds32/constants.md (unspec_volatile_element): Add
11678 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11679 UNSPEC_VOLATILE_FMFCFG.
11680 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11681 description for fmfcfg and fmfcsr.
11682 (bdesc_1arg): Add fmtcsr.
11683 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11684 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11685 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11686 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11687 unspec_fmfcfg): New patterns.
11688 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11689 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11690 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11691 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11692 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11693 __nds32__fmfcfg): Define.
11695 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11697 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11698 intrinsic register names.
11699 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11700 intrinsic register enum values and macros.
11702 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11704 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11705 for load/store addressing form.
11706 (nds32_print_operand_address): Likewise.
11708 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11711 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11712 based on LABEL_REF. Remove useless assertion.
11713 (pic_address_needs_scratch): Fix formatting.
11714 (sparc_legitimize_pic_address): Minor tweaks.
11715 (sparc_delegitimize_address): Adjust assertion accordingly.
11716 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11717 into symbolic_operand.
11718 (movsi_high_pic_label_ref): Likewise.
11719 (movsi_lo_sum_pic_label_ref): Likewise.
11720 (movdi_pic_label_ref): Likewise.
11721 (movdi_high_pic_label_ref): Likewise.
11722 (movdi_lo_sum_pic_label_ref): Likewise.
11724 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11726 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11727 custom LIB_SPEC setup.
11729 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11730 Kito Cheng <kito.cheng@gmail.com>
11732 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11733 * config/riscv/freebsd.h: New.
11735 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11737 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11738 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11741 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11742 Kito Cheng <kito.cheng@gmail.com>
11744 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11745 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11746 * config/nds32/nds32-protos.h (nds32_output_call,
11747 nds32_output_return): Declare.
11748 * config/nds32/nds32.md: Refine all the call and return patterns.
11750 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11753 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11754 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11756 PR rtl-optimization/84872
11757 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11758 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11759 EDGE_CROSSING edge.
11761 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11763 * expr.c (copy_blkmode_to_reg): Revert 254862.
11764 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11766 2018-04-06 Richard Biener <rguenther@suse.de>
11768 PR middle-end/85244
11769 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11770 after seeing a component reference with an adjacent field. Treat
11771 refs to arrays at struct end of external decls similar to
11772 refs to unconstrained commons.
11774 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11777 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11778 look through SAVE_EXPRs with non-side-effects argument. Adjust
11780 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11783 2018-04-06 Richard Biener <rguenther@suse.de>
11785 PR middle-end/85180
11786 * alias.c (find_base_term): New wrapper around find_base_term
11787 unwinding CSELIB_VAL_PTR changes.
11788 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11791 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11793 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11795 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11796 constant definitions.
11797 ("nop"): lr 0,0 -> nopr r0
11798 ("nop_lr0", "nop_lr1"): New insn definitions.
11800 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11802 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11803 NDS32_V3PUSH_AVAILABLE_P macro.
11805 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11806 Chung-Ju Wu <jasonwucj@gmail.com>
11808 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11809 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11810 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11811 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11812 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11813 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11814 * config/nds32/constraints.md: New constraints and checking for hard
11815 float configuration.
11816 * config/nds32/iterators.md: New mode iterator and attribute for hard
11817 float configuration.
11818 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11820 * config/nds32/nds32-fpu.md: New file.
11821 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11822 deal with hard float code generation.
11823 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11825 (abi_type, float_reg_number): New enum type.
11826 * config/nds32/nds32-predicates.c: New predicates for hard float.
11827 * config/nds32/nds32-protos.h: Declare functions for hard float.
11828 * config/nds32/nds32.c: Implementation for hard float configuration.
11829 * config/nds32/nds32.h: Definitions for hard float configuration.
11830 * config/nds32/nds32.md: Include hard float machine description and
11831 modify patterns for hard float configuration.
11832 * config/nds32/nds32.opt: New options for hard float configuration.
11833 * config/nds32/predicates.md: New predicates for hard float
11836 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11838 * common/config/nds32/nds32-common.c
11839 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11841 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11843 PR middle-end/85195
11844 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11845 CONSTRUCTOR_ELT (ctor, ...)->value.
11847 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11850 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11852 2018-04-05 Tom de Vries <tom@codesourcery.com>
11855 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11858 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11859 Kito Cheng <kito.cheng@gmail.com>
11861 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11862 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11863 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11864 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11866 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11867 Kito Cheng <kito.cheng@gmail.com>
11869 * config/nds32/constraints.md (Ufe): New memory constraint.
11870 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11871 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11872 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11874 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11875 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11877 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11879 * config/nds32/nds32.md: Use optimize_size in the condition for
11880 alu-shift instructions.
11882 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11884 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11886 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11888 * config/nds32/nds32.md (negsi2): Refine pattern.
11890 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11891 Chung-Ju Wu <jasonwucj@gmail.com>
11893 * config/nds32/iterators.md (shift_rotate): New code iterator.
11894 (shift): New code attribute.
11895 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11896 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11897 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11898 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11899 bit-wise operations.
11900 (andsi3, *andsi3): Ditto.
11901 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11902 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11903 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11904 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11905 nds32_ior_operand, nds32_xor_operand): New predicates.
11907 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11909 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11910 (addsi3, subsi3): ... this.
11912 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11914 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11916 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11918 * config/nds32/nds32.md: Adjust indention.
11920 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11922 * config/nds32/nds32.md (feature): New attribute.
11924 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11926 * config/nds32/nds32.md (subtype): New attribute.
11928 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11931 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11932 expansion to perform a bitwise AND of the argument followed by a
11933 boolean negation of the result.
11935 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11937 PR rtl-optimization/84878
11938 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11939 the basic block. Assert the use reference is not artificial and that
11940 it has an associated insn.
11942 2018-04-04 Michael Matz <matz@suse.de>
11944 * builtins.c (compute_objsize): Pass correct operand
11945 to array_at_struct_end_p.
11947 2018-04-04 Richard Biener <rguenther@suse.de>
11950 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11951 from contexts for DINFO_LEVEL_TERSE and below.
11953 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11955 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11956 resiter_operand condition.
11957 * config/nds32/nds32.md (*move<mode>): Ditto.
11959 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11960 Monk Chiang <sh.chiang04@gmail.com>
11962 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11964 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11966 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11968 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11969 Kito Cheng <kito.cheng@gmail.com>
11971 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11972 nds32_cond_code_str, output_cond_branch,
11973 output_cond_branch_compare_zero, nds32_expand_cbranch,
11974 nds32_expand_cstore, nds32_expand_movcc,
11975 nds32_output_cbranchsi4_equality_zero,
11976 nds32_output_cbranchsi4_equality_reg,
11977 nds32_output_cbranchsi4_equality_reg_or_const_int,
11978 nds32_output_cbranchsi4_greater_less_zero: New functions.
11979 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11980 nds32_expand_cstore, nds32_expand_movcc,
11981 nds32_output_cbranchsi4_equality_zero,
11982 nds32_output_cbranchsi4_equality_reg,
11983 nds32_output_cbranchsi4_equality_reg_or_const_int,
11984 nds32_output_cbranchsi4_greater_less_zero): Declare.
11985 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11986 nds32_rimm11s_operand): New predicates.
11987 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11988 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11991 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11993 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11994 * config/nds32/nds32.md: Ditto.
11995 * config/nds32/pipelines.md: Ditto.
11997 2018-04-04 Richard Biener <rguenther@suse.de>
11999 PR tree-optimization/85168
12000 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12001 propagating abnormals.
12003 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12005 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12007 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12008 Kito Cheng <kito.cheng@gmail.com>
12010 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12011 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12012 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12013 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12014 * config/nds32/nds32.md (sibcall_internal): New.
12015 (sibcall_register): Remove.
12016 (sibcall_immediate): Remove.
12017 (sibcall_value_internal): New.
12018 (sibcall_value_register): Remove.
12019 (sibcall_value_immediate): Remove.
12020 * config/nds32/predicates.md (nds32_general_register_operand): New.
12021 (nds32_call_address_operand): New.
12023 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12025 PR rtl-optimization/85167
12026 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12027 bb_defs if *split_p, instead preinitialize it to NULL.
12029 PR tree-optimization/85156
12030 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12031 evaluating the argument multiple times.
12033 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12035 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12037 (_mm_cvtpd_ps): Likewise.
12038 (_mm_cvttpd_epi32): Likewise.
12039 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12040 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12041 vector, pixel, and bool following altivec.h include.
12043 2018-04-03 Martin Sebor <msebor@redhat.com>
12045 * doc/extend.texi (Common Function Attributes): Clarify.
12046 (const attribute): Likewise.
12047 (pure attribute): Likewise.
12049 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12052 * config/i386/i386.c (ix86_expand_vector_set): Use
12053 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12055 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12057 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12058 instructions when changing rounding bits to preserve precision bits
12059 in the x87 control word.
12061 2018-04-03 Martin Liska <mliska@suse.cz>
12063 PR tree-optimization/82491
12064 * rtl.h (strip_offset_and_add): Replace += suboffset with
12065 poly_uint64 () + suboffset.
12067 2018-03-29 Martin Liska <mliska@suse.cz>
12068 Martin Jambor <mjambor@suse.cz>
12071 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12072 param_type is not an integral or pointer type.
12074 2018-04-03 Richard Biener <rguenther@suse.de>
12076 * sese.h (recompute_all_dominators): Remove.
12078 2018-04-02 Martin Sebor <msebor@redhat.com>
12080 * doc/invoke.texi (-Wrestrict): Fix typos.
12082 2018-04-02 Jim Wilson <jimw@sifive.com>
12084 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12085 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12086 (<optab>di3, <optab>si3_extend): Likewise.
12087 (<optab>si3_mask, <optab>si3_mask_1): New.
12088 (<optab>di3_mask, <optab>di3_mask_1): New.
12089 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12090 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12091 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12093 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12095 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12098 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12100 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12101 (nds32_canonicalize_comparison): New function.
12103 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12104 Kito Cheng <kito.cheng@gmail.com>
12105 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12107 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12108 * config/nds32/constants.md (unspec_volatile_element): Add
12109 UNSPEC_VOLATILE_RELAX_GROUP.
12110 * config/nds32/nds32-relax-opt.c: New file.
12111 * config/nds32/nds32-predicates.c
12112 (nds32_symbol_load_store_p): New function.
12113 * config/nds32/nds32-protos.h
12114 (nds32_symbol_load_store_p): Declare function.
12115 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12116 * config/nds32/nds32.c
12117 (nds32_register_pass): New function to register pass.
12118 (nds32_register_passes): New function to register passes.
12119 * config/nds32/nds32.md (relax_group): New pattern.
12120 * config/nds32/nds32.opt (mrelax-hint): New option.
12121 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12123 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12125 * config/nds32/t-nds32: Modify files dependency.
12127 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12129 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12130 (PROFILE_HOOK): Define its implementation.
12132 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12134 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12135 type and 32-bit size.
12137 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12139 PR middle-end/85090
12140 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12141 (V_128_256): New mode iterator.
12142 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12143 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12144 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12146 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12147 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12149 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12152 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12153 NaN inputs correctly.
12155 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12158 * config/rs6000/vsx.md (??r): New mode attribute.
12159 (*vsx_mov<mode>_64bit): Use it.
12160 (*vsx_mov<mode>_32bit): Likewise.
12162 2018-03-30 Martin Sebor <msebor@redhat.com>
12164 PR tree-optimization/84818
12165 * builtins.c (check_access): Use warning_n.
12167 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12170 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12172 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12175 2018-03-30 Julia Koval <julia.koval@intel.com>
12178 * x86-tune.def (movx, partial_reg_dependency): Enable for
12181 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12183 PR inline-asm/84985
12184 * lra-constraints.c (process_alt_operands): Move setting
12185 this_alternative_matches below.
12187 2018-03-29 Martin Liska <mliska@suse.cz>
12190 * doc/invoke.texi: Document how LTO works with debug info.
12191 Describe auto-load support of binutils. Mention 'x86-64'
12192 as valid option value of -march option.
12194 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12196 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12199 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12200 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12201 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12204 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12207 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12208 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12209 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12210 for RS6000_BTM_POWERPC64.
12211 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12212 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12213 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12216 (DIVDEU): Likewise.
12218 2018-03-28 Carl Love <cel@us.ibm.com>
12221 2017-09-27 Carl Love <cel@us.ibm.com>
12223 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12224 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12225 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12228 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12230 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12231 instead of __vector bool.
12232 (_mm_max_pu8): Likewise.
12233 (_mm_min_pi16): Likewise.
12235 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12238 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12239 (DIVWEUO): Likewise.
12240 (DIVDEO): Likewise.
12241 (DIVDEUO): Likewise.
12242 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12243 DIVWEUO and DIVDEUO.
12244 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12245 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12246 (div_extend): Likewise.
12247 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12249 (__builtin_divweuo): Likewise.
12250 (__builtin_divdeo): Likewise.
12251 (__builtin_divdeuo): Likewise.
12253 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12256 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12257 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12259 PR tree-optimization/82004
12260 * gimple-match-head.c (optimize_pow_to_exp): New function.
12261 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12262 Don't fold to exp if optimize_pow_to_exp is false.
12264 2018-03-28 Martin Liska <mliska@suse.cz>
12267 * calls.c (initialize_argument_information): Fix trailing space.
12268 * common.opt: Fix typo and provide better explanation for
12269 -fsanitize-coverage option.
12270 * config/i386/i386.opt: Fix typo.
12272 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12273 Martin Liska <mliska@suse.cz>
12276 * gimplify.c (asan_poison_variable): Don't do the check for
12277 gimplify_omp_ctxp here.
12278 (gimplify_decl_expr): Do it here.
12279 (gimplify_target_expr): Likewise.
12281 2018-03-28 Martin Liska <mliska@suse.cz>
12284 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12285 chkp_type_bounds_count if MPX is not enabled.
12287 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12289 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12291 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12294 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12295 function to create the function decl for complex long double
12296 multiply and divide for -mabi=ieeelongdouble.
12297 (init_float128_ieee): Call it.
12299 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12302 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12303 -fcf-protection=branch -mibt.
12304 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12306 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12309 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12310 arm_word_relocations.
12312 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12315 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12316 extern array declarations.
12318 2018-03-27 Richard Biener <rguenther@suse.de>
12320 PR middle-end/84067
12321 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12322 explicit single_use checks.
12324 2018-03-27 Richard Biener <rguenther@suse.de>
12326 PR tree-optimization/85082
12327 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12330 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12332 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12333 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12334 Turn on fasynchronous-unwind-tables and funwind-tables.
12336 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12339 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12340 (*bmi_blsr_<mode>_ccz): Ditto.
12342 2018-03-26 Tom de Vries <tom@codesourcery.com>
12344 PR tree-optimization/85063
12345 * omp-general.c (offloading_function_p): New function. Factor out
12347 * omp-offload.c (pass_omp_target_link::gate): ... here.
12348 * omp-general.h (offloading_function_p): Declare.
12349 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12350 with attribute omp declare target for offloading functions.
12352 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12354 PR tree-optimization/84005
12355 * tree-data-ref.h (get_base_for_alignment): Declare.
12356 * tree-data-ref.c (get_base_for_alignment_1): New function.
12357 (get_base_for_alignment): Likewise.
12358 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12359 get_base_for_alignment to find a suitable base object, instead
12360 of always using drb->base_address.
12362 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12364 PR inline-asm/85022
12365 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12366 known size by default.
12368 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12370 PR inline-asm/85030
12371 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12372 and non BLKmode operands.
12374 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12377 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12378 Clean up attributes.
12380 2018-03-23 Richard Biener <rguenther@suse.de>
12383 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12384 we are going to emit early debug for LTO.
12386 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12388 PR inline-asm/85034
12389 * function.c (match_asm_constraints_1): Don't optimize if input
12390 doesn't satisfy general_operand predicate for output's mode.
12392 PR inline-asm/85022
12393 * alias.c (write_dependence_p): Don't require for x_canonicalized
12394 non-VOIDmode if x has VOIDmode.
12397 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12398 just don't try to optimize it rather than assert it never happens.
12400 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12402 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12403 macro expansions for definition of ST_INTERNAL_<mode> and
12404 LD_INTERNAL_<mode> builtins.
12405 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12407 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12409 (altivec_expand_st_builtin): Likewise.
12410 (altivec_expand_builtin): Remove calls to deleted functions.
12411 (rs6000_address_for_altivec): Delete this function.
12412 * config/rs6000/vector.md: Remove expands for
12413 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12415 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12418 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12419 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12420 re-computing once computed.
12421 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12422 (arm_init_machine_status): Initialize
12423 machine->static_chain_stack_bytes.
12425 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12428 * doc/extend.texi: Add four new prototypes for vec_ld.
12429 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12430 definitions for more logical presentation.
12431 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12432 entries for V1TI variants of __builtin_altivec_ld builtin.
12433 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12434 handling of V1TI variant of LVX icode pattern.
12435 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12436 (rs6000_gimple_fold_builtin): Likewise.
12437 (altivec_init_builtins): Add code to define
12438 __builtin_altivec_lvx_v1ti function.
12440 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12442 PR inline-asm/84941
12443 * function.c (match_asm_constraints_1): Don't do the optimization
12444 if input isn't a REG, SUBREG, MEM or constant.
12446 2018-03-22 Tom de Vries <tom@codesourcery.com>
12448 PR tree-optimization/84956
12449 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12450 bb_has_abnormal_pred.
12452 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12455 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12456 DECL_INITIAL (decl) to decl at the end.
12457 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12458 adjust the comment.
12460 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12462 * doc/extend.texi (__builtin_tgmath): Document when complex
12463 integer types are treated as _Complex _Float64.
12465 2018-03-21 Tom de Vries <tom@codesourcery.com>
12467 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12469 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12471 PR tree-optimization/84960
12472 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12473 if it is ENTRY block, move them into single succ of ENTRY in that case.
12475 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12477 PR tree-optimization/84811
12478 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12479 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12480 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12481 (known_subrange_p): Update accordingly. Cast each value involved
12482 in the size comparison, rather than casting the result of the
12485 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12487 PR tree-optimization/84982
12488 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12489 by flipping the least significant bit rather than all bits from
12490 bitpos to bitpos + bitsize - 1.
12492 2018-03-21 Nathan Sidwell <nathan@acm.org>
12494 * doc/extend.texi (Deprecated Features): Remove mention of
12495 long-deleted deprecations.
12497 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12500 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12501 * configure: Regenerate.
12503 2018-03-21 Tom de Vries <tom@codesourcery.com>
12505 PR tree-optimization/83126
12506 * tree-parloops.c (num_phis): New function.
12507 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12509 2018-03-21 Nathan Sidwell <nathan@acm.org>
12511 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12512 mention anon-struct/union members and trailing attributes.
12514 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12516 PR tree-optimization/84969
12517 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12518 builtin memset partitions if they set different rhs values.
12520 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12522 PR rtl-optimization/84989
12523 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12524 VEC_DUPLICATE with scalar result mode.
12526 2018-03-21 Martin Liska <mliska@suse.cz>
12529 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12530 not intended return statement.
12532 2018-03-21 Martin Liska <mliska@suse.cz>
12535 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12536 (chkp_find_bound_slots_1): Limit number of iterations.
12538 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12541 * Minor grammar fixes for x86 options.
12543 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12546 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12547 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12549 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12552 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12553 (altivec_lvx_<mode>_1op): Likewise.
12554 (altivec_stvx_<mode>_2op): Likewise.
12555 (altivec_stvx_<mode>_1op): Likewise.
12556 (altivec_lvx_<VM2:mode>): New define_expand.
12557 (altivec_stvx_<VM2:mode>): Likewise.
12558 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12559 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12560 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12561 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12562 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12563 (rs6000_gen_lvx): Likewise.
12564 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12565 (altivec_expand_stv_builtin): Likewise.
12566 (altivec_expand_builtin): Likewise.
12567 * config/rs6000/vector.md: Likewise.
12569 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12572 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12575 2018-03-20 Richard Biener <rguenther@suse.de>
12578 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12579 sign-conversions as zero, fall back to standard scalar_stmt
12582 2018-03-20 Martin Liska <mliska@suse.cz>
12585 * predict.c (rebuild_frequencies): Handle case when we have
12586 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12588 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12591 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12592 flag_section_anchors.
12593 * varasm.c (use_blocks_for_decl_p): Remove hack for
12594 dw2_force_const_mem.
12597 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12599 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12600 be created, use lowpart_subreg of operands[0] rather than operands[0]
12602 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12603 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12604 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12605 and n constraint instead of aarch64_shift_imm_di and Usd.
12606 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12607 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12609 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12612 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12613 to favor GPR over NEON registers.
12614 (<shift>di3_neon): Likewise.
12616 2018-03-20 Tom de Vries <tom@codesourcery.com>
12619 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12620 (nvptx_process_pars): Emit bar.sync asap and alap.
12622 2018-03-20 Tom de Vries <tom@codesourcery.com>
12625 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12626 seen_label if seen_label is already set.
12628 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12631 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12632 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12633 Use 1U instead of 1. Formatting fixes.
12636 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12637 instead of TREE_TYPE (s1) for the return value.
12639 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12641 PR tree-optimization/84946
12642 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12643 bitsize + bitsize in poly_uint64 rather than poly_int64.
12646 * dwarf2asm.c: Include fold-const.c.
12647 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12648 of decl rather than decl itself.
12650 PR rtl-optimization/84643
12651 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12653 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12656 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12657 calling assemble_variable.
12659 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12662 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12663 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12665 2018-03-19 Jim Wilson <jimw@sifive.com>
12668 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12669 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12670 (riscv_first_stack_step): Likewise.
12671 (riscv_option_override): Use STACK_BOUNDARY instead of
12672 MIN_STACK_BOUNDARY.
12673 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12674 MIN_STACK_BOUNDARY.
12675 (BIGGEST_ALIGNMENT): Set to 128.
12676 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12677 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12680 2018-03-19 Richard Biener <rguenther@suse.de>
12682 PR tree-optimization/84933
12683 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12684 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12686 2018-03-19 Richard Biener <rguenther@suse.de>
12688 PR tree-optimization/84859
12689 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12690 (cond_if_else_store_replacement): Perform sinking operation on
12691 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12692 Generalize what a BB with a single eligible store is.
12694 2018-03-19 Richard Biener <rguenther@suse.de>
12696 PR tree-optimization/84929
12697 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12698 chrec_is_positive against non-chrec arg.
12700 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12703 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12705 2018-03-18 Martin Liska <mliska@suse.cz>
12707 PR rtl-optimization/84635
12708 * regrename.c (build_def_use): Use matches_mode only when
12711 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12713 PR tree-optimization/84913
12714 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12715 vectorize chains of COND_EXPRs.
12717 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12719 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12721 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12723 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12725 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12727 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12729 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12730 Kito Cheng <kito.cheng@gmail.com>
12732 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12733 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12734 (nds32_adjust_reg_alloc_order): New function.
12735 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12737 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12739 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12740 nds32_print_operand, nds32_print_operand_address): Use
12741 HOST_WIDE_INT_PRINT_DEC instead.
12743 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12745 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12747 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12750 * config/i386/i386.c (initial_ix86_tune_features,
12751 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12752 unsigned long long.
12753 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12754 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12755 rather than 1u << ix86_tune. Formatting fix.
12756 (ix86_option_override_internal): Change ix86_arch_mask from
12757 unsigned int to unsigned HOST_WIDE_INT, initialize to
12758 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12759 (ix86_function_specific_restore): Likewise.
12761 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12764 * postreload.c (reload_combine_recognize_pattern): Perform
12765 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12766 truncate_int_for_mode the result for the destination's mode.
12769 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12770 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12772 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12775 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12778 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12779 regno_allocno_class_array and sorted_pseudos.
12780 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12781 insns where regno is used.
12783 2018-03-16 Martin Liska <mliska@suse.cz>
12786 * multiple_target.c (create_dispatcher_calls): Redirect
12787 reference in the symbol table.
12789 2018-03-16 Martin Liska <mliska@suse.cz>
12792 * multiple_target.c (create_dispatcher_calls): Redirect also
12795 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12799 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12800 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12801 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12803 2018-03-16 Julia Koval <julia.koval@intel.com>
12805 * doc/invoke.texi (Skylake Server): Add CLWB.
12806 Cannonlake): Remove CLWB.
12808 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12810 PR tree-optimization/84841
12811 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12813 (FLOAT_ONE_CONST_TYPE): Define.
12814 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12815 (sort_by_operand_rank): Put entries with higher constant_type last
12816 rather than first to match comments.
12818 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12820 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12823 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12826 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12827 check and use address of target always.
12829 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12832 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12833 (indirect_thunk_bnd_needed): Likewise.
12834 (indirect_thunks_used): Likewise.
12835 (indirect_thunks_bnd_used): Likewise.
12836 (indirect_return_needed): New.
12837 (indirect_return_bnd_needed): Likewise.
12838 (output_indirect_thunk_function): Add a bool argument for
12840 (output_indirect_thunk_function): Don't generate alias for
12841 function return thunk.
12842 (ix86_code_end): Call output_indirect_thunk_function to generate
12843 function return thunks.
12844 (ix86_output_function_return): Set indirect_return_bnd_needed
12845 and indirect_return_needed instead of indirect_thunk_bnd_needed
12846 and indirect_thunk_needed.
12848 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12850 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12851 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12852 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12854 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12855 Paul Hua <paul.hua.gm@gmail.com>
12858 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12860 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12862 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12863 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12864 resp. SFmode cases.
12866 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12869 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12870 instead of GET_MODE_SIZE when comparing Units.
12872 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12875 * varasm.c (hash_section): Return an unchangeble hash value
12876 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12877 Return !aarch64_can_use_per_function_literal_pools_p ().
12879 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12882 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12883 rather than address of cmode as last argument to prepare_cmp_insn.
12885 2018-03-15 Julia Koval <julia.koval@intel.com>
12887 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12888 F_AVX512VNNI, F_AVX512BITALG): New.
12890 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12893 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12894 insn for floating-point loads and stores.
12896 2018-03-14 Carl Love <cel@us.ibm.com>
12898 * config/rs6000/rs6000-c.c: Add macro definitions for
12899 ALTIVEC_BUILTIN_VEC_PERMXOR.
12900 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12901 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12902 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12903 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12905 * config/doc/extend.texi: Add prototypes for vec_permxor.
12907 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12910 * diagnostic-show-locus.c (class layout_point): Convert m_line
12911 from int to linenum_type.
12912 (line_span::comparator): Use linenum "compare" function when
12913 comparing line numbers.
12914 (test_line_span): New function.
12915 (layout_range::contains_point): Convert param "row" from int to
12917 (layout_range::intersects_line_p): Likewise.
12918 (layout::will_show_line_p): Likewise.
12919 (layout::print_source_line): Likewise.
12920 (layout::should_print_annotation_line_p): Likewise.
12921 (layout::print_annotation_line): Likewise.
12922 (layout::print_leading_fixits): Likewise.
12923 (layout::annotation_line_showed_range_p): Likewise.
12924 (struct line_corrections): Likewise for field m_row.
12925 (line_corrections::line_corrections): Likewise for param "row".
12926 (layout::print_trailing_fixits): Likewise.
12927 (layout::get_state_at_point): Likewise.
12928 (layout::get_x_bound_for_row): Likewise.
12929 (layout::print_line): Likewise.
12930 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12931 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12932 * input.c (selftest::test_linenum_comparisons): New function.
12933 (selftest::input_c_tests): Call it.
12934 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12935 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12936 * selftest.h (ASSERT_GT): New macro.
12937 (ASSERT_GT_AT): New macro.
12938 (ASSERT_LT): New macro.
12939 (ASSERT_LT_AT): New macro.
12941 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12943 PR rtl-optimization/84780
12944 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12946 2018-03-14 Martin Liska <mliska@suse.cz>
12948 * tree.c (record_node_allocation_statistics): Use
12949 get_stats_node_kind.
12950 (get_stats_node_kind): New function extracted from
12951 record_node_allocation_statistics.
12952 (free_node): Use get_stats_node_kind.
12954 2018-03-14 Richard Biener <rguenther@suse.de>
12956 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12957 that the value-set of ANTIC_IN doesn't grow.
12960 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12962 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12963 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12965 2018-03-14 Julia Koval <julia.koval@intel.com>
12967 * config.gcc (icelake-client, icelake-server): New.
12969 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12970 (initial_ix86_arch_features): Ditto.
12971 (PTA_SKYLAKE): Add SGX.
12972 (PTA_ICELAKE): Remove.
12973 (PTA_ICELAKE_CLIENT): New.
12974 (PTA_ICELAKE_SERVER): New.
12975 (ix86_option_override_internal): Split up icelake on icelake client and
12977 (get_builtin_code_for_version): Ditto.
12978 (fold_builtin_cpu): Ditto.
12979 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12980 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12981 * config/i386/i386.h (processor_type): Ditto.
12982 * doc/invoke.texi: Ditto.
12984 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12987 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12988 INTEGER_CST offset, add it together with bitpos / 8 and
12989 sign extend based on POINTER_SIZE.
12993 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12996 * config/i386/constraints.md (Yc): New register constraint.
12997 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12998 Use Yc constraint for alternative 2 of operand 0. Remove
12999 preferred_for_speed attribute.
13001 2018-03-14 Richard Biener <rguenther@suse.de>
13003 PR tree-optimization/84830
13004 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13005 with the old one to avoid oscillations.
13007 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13010 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13012 (assign_by_spills): Return a flag of reload assignment failure.
13013 Do not process the reload assignment failures. Do not spill other
13014 reload pseudos if they has the same reg class. Update n if
13016 (lra_assign): Add a return arg. Set up from the result of
13017 assign_by_spills call.
13018 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13019 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13020 usage_insns if it is not NULL.
13021 (spill_hard_reg_in_range): New function.
13022 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13023 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13024 function prototypes.
13025 (lra_assign): Change prototype.
13026 * lra.c (lra): Add code to deal with fails by splitting hard reg
13029 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13031 * config/riscv/riscv.opt (mrelax): New option.
13032 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13033 "norelax" when riscv_mrelax is disabled.
13034 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13036 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13039 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13040 reassociation for int modes.
13042 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13044 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13045 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13047 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13048 * config/aarch64/aarch64-sve.md
13049 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13050 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13051 (*extend<mode><Vwide>2): Rename to...
13052 (aarch64_sve_extend<mode><Vwide>2): ...this.
13053 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13054 renaming the old pattern to...
13055 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13057 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13058 define_expand, renaming the old pattern to...
13059 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13060 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13061 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13062 account when deciding which SVE instruction the optab should use.
13063 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13065 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13067 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13068 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13069 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13070 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13071 (tlsdesc_small_<mode>): Turn a define_expand and use
13072 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13073 (tlsdesc_small_advsimd_<mode>): ...this.
13074 (tlsdesc_small_sve_<mode>): New pattern.
13076 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13078 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13079 (UNSPEC_UMUL_HIGHPART): New constants.
13080 (MUL_HIGHPART): New int iteraor.
13081 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13082 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13084 (*<su>mul<mode>3_highpart): New define_insn.
13086 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13089 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13092 2018-03-13 Martin Liska <mliska@suse.cz>
13095 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13097 (sem_item_optimizer::~sem_item_optimizer): Release it.
13098 (sem_item_optimizer::merge_classes): Register variable aliases.
13099 (sem_item_optimizer::fixup_pt_set): New function.
13100 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13101 * ipa-icf.h: Declare new variables and functions.
13103 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13105 PR middle-end/84834
13106 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13107 integer_pow2p@2 and test integer_pow2p in condition.
13108 (A < 0 ? C : 0): Similarly for @1.
13110 PR middle-end/84831
13111 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13112 characters starting at p contain '\0' character, don't look beyond
13116 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13117 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13120 * reg-stack.c (change_stack): Change update_end var from int to
13121 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13122 also call set_block_for_insn on the newly added insns and rescan.
13125 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13126 on the last operand.
13129 * tree.c (stabilize_reference_1): Return save_expr (e) for
13130 STATEMENT_LIST even if it doesn't have side-effects.
13132 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13134 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13136 2018-03-12 Renlin Li <renlin.li@arm.com>
13138 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13139 aarch64_output_scalar_simd_mov_immediate.
13141 2018-03-12 Martin Sebor <msebor@redhat.com>
13143 PR tree-optimization/83456
13144 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13145 for perfectly overlapping calls to memcpy.
13146 (gimple_fold_builtin_memory_chk): Same.
13147 (gimple_fold_builtin_strcpy): Handle no-warning.
13148 (gimple_fold_builtin_stxcpy_chk): Same.
13149 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13151 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13153 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13154 parameter. Use it for SFmode.
13155 (rs6000_function_arg_advance_1): Adjust.
13156 (rs6000_function_arg): Adjust.
13157 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13159 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13161 PR rtl-optimization/84169
13162 PR rtl-optimization/84780
13163 * combine.c (can_combine_p): Check for a 2-insn combination whether
13164 the destination register is used between the two insns, too.
13166 2018-03-12 Richard Biener <rguenther@suse.de>
13168 PR tree-optimization/84803
13169 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13170 for refs DR analysis didn't process.
13172 2018-03-12 Richard Biener <rguenther@suse.de>
13174 PR tree-optimization/84777
13175 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13176 force-vectorize loops ignore whether we are optimizing for size.
13178 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13180 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13181 (TARGET_MD_ASM_ADJUST): Define.
13183 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13184 Kito Cheng <kito.cheng@gmail.com>
13185 Chung-Ju Wu <jasonwucj@gmail.com>
13187 * config/nds32/nds32.c (nds32_compute_stack_frame,
13188 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13189 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13190 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13191 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13192 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13193 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13194 * config/nds32/nds32.md (prologue, epilogue): Use macro
13195 NDS32_V3PUSH_AVAILABLE_P to do checking.
13197 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13200 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13201 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13202 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13203 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13204 addition of most attributes on !orig_type_die or the attribute not
13205 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13207 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13208 Chung-Ju Wu <jasonwucj@gmail.com>
13210 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13211 __NDS32_VH__ macro.
13212 * config/nds32/nds32.opt (mvh): New option.
13214 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13215 Chung-Ju Wu <jasonwucj@gmail.com>
13217 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13219 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13220 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13223 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13224 Chung-Ju Wu <jasonwucj@gmail.com>
13226 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13228 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13229 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13231 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13232 Kito Cheng <kito.cheng@gmail.com>
13233 Chung-Ju Wu <jasonwucj@gmail.com>
13235 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13236 UNSPEC_FFMISM and UNSPEC_FLMISM.
13237 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13238 for ffb, ffmism and flmism.
13239 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13240 (unspec_ffmism): Ditto.
13241 (unspec_flmism): Ditto.
13242 (nds32_expand_builtin_impl): Check if string extension is available.
13243 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13244 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13246 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13249 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13252 * lra-assigns.c (assign_by_spills): Return a flag of reload
13253 assignment failure. Do not process the reload assignment
13254 failures. Do not spill other reload pseudos if they has the same
13256 (lra_assign): Add a return arg. Set up from the result of
13257 assign_by_spills call.
13258 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13259 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13260 usage_insns if it is not NULL.
13261 (spill_hard_reg_in_range): New function.
13262 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13263 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13264 function prototypes.
13265 (lra_assign): Change prototype.
13266 * lra.c (lra): Add code to deal with fails by splitting hard reg
13269 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13272 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13274 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13277 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13278 (dw_val_node): Add val_symbolic_view.
13279 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13280 (symview_upper_bound): New.
13281 (new_line_info_table): Initialize symviews_since_reset.
13282 (dwarf2out_source_line): Count symviews_since_reset and set
13283 symview_upper_bound.
13284 (dw_val_equal_p): Handle symview.
13285 (add_AT_symview): New.
13286 (print_dw_val): Handle symview.
13287 (attr_checksum, attr_checksum_ordered): Likewise.
13288 (same_dw_val_p, size_of_die): Likewise.
13289 (value_format, output_die): Likewise.
13290 (add_high_low_attributes): Use add_AT_symview for entry_view.
13291 (dwarf2out_finish): Reset symview_upper_bound, clear
13294 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13297 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13298 Add strict argument and use it.
13299 (rs6000_split_multireg_move): Update for new strict argument.
13300 (mem_operand_gpr): Disallow all non-offsettable addresses.
13301 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13303 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13306 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13307 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13308 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13311 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13312 decl, use remap_type if we want to use the type.
13314 2018-03-09 Martin Sebor <msebor@redhat.com>
13316 PR tree-optimization/84526
13317 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13319 (builtin_access::generic_overlap): Be prepared to handle non-array
13322 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13324 PR rtl-optimization/84682
13325 * lra-constraints.c (process_address_1): Check is_address flag
13326 for address constraints.
13327 (process_alt_operands): Likewise.
13328 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13329 preprocess_constraints.
13330 * recog.h (preprocess_constraints): Add oploc parameter.
13332 * recog.c (preprocess_constraints): Test address_operand for
13333 CT_ADDRESS constraints.
13335 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13338 * lra-assigns.c (assign_by_spills): Return a flag of reload
13339 assignment failure. Do not process the reload assignment
13340 failures. Do not spill other reload pseudos if they has the same
13342 (lra_assign): Add a return arg. Set up from the result of
13343 assign_by_spills call.
13344 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13345 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13346 usage_insns if it is not NULL.
13347 (spill_hard_reg_in_range): New function.
13348 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13349 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13350 function prototypes.
13351 (lra_assign): Change prototype.
13352 * lra.c (lra): Add code to deal with fails by splitting hard reg
13355 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13358 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13359 Accept complain bool parameter. Only emit errors if it is true.
13360 (arm_parse_cpu_option_name): Likewise.
13361 (arm_target_thumb_only): Adjust callers of the above.
13362 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13363 prototype to take a default true bool parameter.
13364 (arm_parse_arch_option_name): Likewise.
13366 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13367 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13371 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13372 * configure: Regenerate.
13373 * configure.ac ("linker --version-script option"): New.
13374 ("linker soname option"): New.
13376 2018-03-09 Richard Biener <rguenther@suse.de>
13378 PR tree-optimization/84775
13379 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13380 immediate uses of predicate stmts and mark them modified.
13383 PR tree-optimization/84178
13384 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13386 (version_loop_for_if_conversion): Delay update_ssa call.
13387 (tree_if_conversion): Delay update_ssa until after predicate
13390 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13393 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13394 when the function accesses prior frames.
13396 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13399 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13400 gen_llsym, otherwise call maybe_gen_llsym.
13402 PR inline-asm/84742
13403 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13404 has ',' character inside of it.
13406 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13409 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13410 as clobbering CC_REGNUM.
13412 2018-03-08 Richard Biener <rguenther@suse.de>
13414 PR middle-end/84552
13415 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13416 (follow_copies_to_constant): Do not follow SSA names registered
13419 2018-03-08 Richard Biener <rguenther@suse.de>
13421 PR tree-optimization/84178
13422 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13424 (version_loop_for_if_conversion): Delay update_ssa call.
13425 (tree_if_conversion): Delay update_ssa until after predicate
13428 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13430 PR tree-optimization/84178
13431 * tree-if-conv.c (release_bb_predicate): Remove the
13432 the assertion that the stmts have NULL use_ops.
13433 Discard the statements, asserting that they haven't
13434 yet been added to a BB.
13436 2018-03-08 Richard Biener <rguenther@suse.de>
13438 PR tree-optimization/84746
13439 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13440 (phi_translate): Pass in destination ANTIC_OUT set.
13441 (phi_translate_1): Likewise. For a simplified result lookup
13442 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13443 (phi_translate_set): Adjust.
13444 (do_pre_regular_insertion): Likewise.
13445 (do_pre_partial_partial_insertion): Likewise.
13447 2018-03-08 Martin Liska <mliska@suse.cz>
13449 PR gcov-profile/84735
13450 * doc/gcov.texi: Document usage of profile files.
13451 * gcov-io.h: Document changes in the format.
13453 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13457 * dwarf2out.c (struct dw_line_info_table): Update comments for
13459 (FORCE_RESET_NEXT_VIEW): New.
13460 (FORCE_RESETTING_VIEW_P): New.
13461 (RESETTING_VIEW_P): Check for -1 too.
13462 (ZERO_VIEW_P): Likewise.
13463 (new_line_info_table): Force-reset next view.
13464 (dwarf2out_begin_function): Likewise.
13465 (dwarf2out_source_line): Simplify zero_view_p initialization.
13466 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13467 view directly. Omit view when omitting .loc at line 0.
13469 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13471 PR tree-optimization/84740
13472 * tree-switch-conversion.c (process_switch): Call build_constructors
13473 only if info.phi_count is non-zero.
13475 PR tree-optimization/84739
13476 * tree-tailcall.c (find_tail_calls): Check call arguments against
13477 DECL_ARGUMENTS (current_function_decl) rather than
13478 DECL_ARGUMENTS (func) when checking for tail recursion.
13480 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13482 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13483 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13484 Volker Reichelt's entry and add entries for people that perform
13485 GCC fuzzy testing and report numerous bugs.
13487 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13490 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13491 readonly data in sdata, if that is disabled.
13492 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13493 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13494 -mreadonly-in-sdata option.
13496 2018-03-07 Martin Sebor <msebor@redhat.com>
13498 PR tree-optimization/84468
13499 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13500 basic block when looking for nul assignment.
13502 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13505 * except.h (output_function_exception_table): Adjust prototype.
13506 * except.c (output_function_exception_table): Remove FNNAME parameter
13507 and add SECTION parameter. Ouput one part of the table at a time.
13508 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13509 the first part of the exception table and emit unwind directives.
13510 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13511 (i386_pe_seh_cold_init): Likewise.
13512 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13513 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13514 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13515 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13516 * config/i386/winnt.c: Include except.h.
13517 (struct seh_frame_state): Add reg_offset, after_prologue and
13518 in_cold_section fields.
13519 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13520 (i386_pe_seh_cold_init): New function.
13521 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13522 to seh->in_cold_section.
13523 (seh_emit_push): Record the offset of the push.
13524 (seh_emit_save): Record the offet of the save.
13525 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13526 Test seh->after_prologue to disregard the epilogue.
13527 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13528 (i386_pe_end_cold_function): New function.
13530 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13533 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13534 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13537 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13539 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13540 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13542 PR middle-end/84723
13543 * multiple_target.c: Include tree-inline.h and intl.h.
13544 (expand_target_clones): Diagnose and fail if node->definition and
13545 !tree_versionable_function_p (node->decl).
13547 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13549 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13551 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13552 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13553 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13555 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13558 * combine.c (try_combine): Use reg_or_subregno instead of handling
13559 just paradoxical SUBREGs and REGs.
13561 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13563 * config/arc/arc.c (arc_finalize_pic): Remove function.
13564 (arc_must_save_register): We use single base PIC register, remove
13565 checks to save/restore the PIC register.
13566 (arc_expand_prologue): Likewise.
13567 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13569 (arc_verify_short): Likewise.
13570 (arc_attr_type): Likewise.
13571 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13572 (walk_stores): Likewise.
13573 (arc_address_cost): Make it static.
13574 (arc_verify_short): Likewise.
13575 (branch_dest): Likewise.
13576 (arc_attr_type): Likewise.
13577 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13578 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13579 (arc_final_prescan_insn): Remove inserting the nops due to
13580 hardware hazards. It is done in reorg step.
13581 (insn_length_variant_t): Remove.
13582 (insn_length_parameters_t): Likewise.
13583 (arc_insn_length_parameters): Likewise.
13584 (arc_get_insn_variants): Likewise.
13585 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13587 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13589 PR inline-asm/84683
13590 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13593 PR tree-optimization/84687
13594 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13596 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13598 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13600 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13601 Rename to ppc_speculation_barrier.
13602 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13603 __builtin_ppc_speculation_barrier.
13605 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13608 * combine.c (combine_simplify_rtx): Don't try to simplify if
13609 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13612 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13614 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13615 to 32 bytes when compiling for POWER9.
13617 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13620 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13621 regparm >= 3 with no arg reg available also for calls with
13622 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13625 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13627 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13629 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13632 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13634 2018-03-05 Richard Biener <rguenther@suse.de>
13636 PR tree-optimization/84486
13637 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13638 When inserting a __builtin_assume_aligned call set the LHS
13639 SSA name alignment info accordingly.
13641 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13643 PR tree-optimization/84114
13644 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13645 Avoid reassociation of FLOAT_MODE addition.
13647 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13649 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13650 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13651 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13652 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13653 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13654 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13655 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13657 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13658 __builtin_ia32_wbinvd): New builtins.
13659 (SPECIAL_ARGS2): New.
13660 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13661 (SPECIAL_ARGS2): New.
13662 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13663 (ix86_valid_target_attribute_inner_p): Ditto.
13664 (ix86_init_mmx_sse_builtins): Add special_args2.
13665 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13666 TARGET_WBNOINVD_P): New.
13667 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13668 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13669 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13670 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13671 * config/i386/pconfigintrin.h: New file.
13672 * config/i386/wbnoinvdintrin.h: Ditto.
13673 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13675 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13677 2018-03-05 Richard Biener <rguenther@suse.de>
13679 PR tree-optimization/84670
13680 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13682 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13683 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13684 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13685 doesn't grow if all successors (recursively) were visited at least
13688 2018-03-05 Richard Biener <rguenther@suse.de>
13690 PR tree-optimization/84650
13691 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13692 if executed in the loop pipeline.
13694 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13696 * doc/configfiles.texi (Configuration Files): Move info about
13697 conditionalizing $target-protos.h to...
13698 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13699 differs from $target-protos.h.
13701 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13702 Chung-Ju Wu <jasonwucj@gmail.com>
13704 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13705 * config/nds32/nds32-multiple.md (setmemsi): Define.
13706 * config/nds32/nds32-memory-manipulation.c
13707 (nds32_gen_dup_4_byte_to_word_value): New.
13708 (emit_setmem_word_loop): New.
13709 (emit_setmem_byte_loop): New.
13710 (nds32_expand_setmem_loop): New.
13711 (nds32_expand_setmem_loop_v3m): New.
13712 (nds32_expand_setmem_unroll): New.
13713 (nds32_expand_setmem): New.
13715 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13716 Chung-Ju Wu <jasonwucj@gmail.com>
13718 * config/nds32/nds32-memory-manipulation.c
13719 (nds32_emit_load_store): New.
13720 (nds32_emit_post_inc_load_store): New.
13721 (nds32_emit_mem_move): New.
13722 (nds32_emit_mem_move_block): New.
13723 (nds32_expand_movmemsi_loop_unknown_size): New.
13724 (nds32_expand_movmemsi_loop_known_size): New.
13725 (nds32_expand_movmemsi_loop): New.
13726 (nds32_expand_movmemsi_unroll): New.
13727 (nds32_expand_movmemqi): Rename ...
13728 (nds32_expand_movmemsi): ... to this.
13729 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13730 (movmemsi): ... to this.
13731 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13732 (nds32_expand_movmemsi): ... to this.
13734 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13735 Monk Chiang <sh.chiang04@gmail.com>
13736 Chung-Ju Wu <jasonwucj@gmail.com>
13738 * config/nds32/nds32-protos.h
13739 (nds32_expand_load_multiple): New arguments.
13740 (nds32_expand_store_multiple): Ditto.
13741 (nds32_valid_multiple_load_store): Rename ...
13742 (nds32_valid_multiple_load_store_p): ... to this.
13743 * config/nds32/nds32-memory-manipulation.c
13744 (nds32_expand_load_multiple): Refine implementation.
13745 (nds32_expand_store_multiple): Ditto.
13746 * config/nds32/nds32-multiple.md
13747 (load_multiple): Update nds32_expand_load_multiple interface.
13748 (store_multiple): Update nds32_expand_store_multiple interface.
13749 * config/nds32/nds32-predicates.c
13750 (nds32_valid_multiple_load_store): Rename ...
13751 (nds32_valid_multiple_load_store_p): ... to this and refine
13753 * config/nds32/predicates.md
13754 (nds32_load_multiple_and_update_address_operation): New predicate.
13755 (nds32_store_multiple_and_update_address_operation): New predicate.
13757 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13758 Chung-Ju Wu <jasonwucj@gmail.com>
13760 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13761 (combo): New attribute.
13762 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13764 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13766 * config/nds32/nds32.opt: Change -mcmodel= default value.
13768 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13769 Monk Chiang <sh.chiang04@gmail.com>
13770 Chung-Ju Wu <jasonwucj@gmail.com>
13772 * config/nds32/constants.md (unspec_element): New enum.
13773 * config/nds32/constraints.md (Umw): New constraint.
13774 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13775 * config/nds32/nds32-intrinsic.md: Likewise.
13776 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13777 (nds32_valid_smw_lwm_base_p): New.
13778 (nds32_output_smw_single_word): New.
13779 (nds32_output_lmw_single_word): New.
13780 (nds32_expand_unaligned_load): New.
13781 (nds32_expand_unaligned_store): New.
13782 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13783 (nds32_output_smw_single_word): Declare.
13784 (nds32_output_lmw_single_word): Declare.
13785 (nds32_expand_unaligned_load): Declare.
13786 (nds32_expand_unaligned_store): Declare.
13787 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13788 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13789 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13790 NDS32_BUILTIN_UASTORE_DW.
13791 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13794 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13795 Kito Cheng <kito.cheng@gmail.com>
13796 Chung-Ju Wu <jasonwucj@gmail.com>
13798 * config/nds32/nds32-intrinsic.c
13799 (nds32_expand_builtin_null_ftype_reg): Delete.
13800 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13801 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13802 (nds32_read_argument): New.
13803 (nds32_legitimize_target): Ditto.
13804 (nds32_legitimize_argument): Ditto.
13805 (nds32_check_constant_argument): Ditto.
13806 (nds32_expand_unop_builtin): Ditto.
13807 (nds32_expand_unopimm_builtin): Ditto.
13808 (nds32_expand_binop_builtin): Ditto.
13809 (nds32_builtin_decl_impl): Ditto.
13810 (builtin_description): Ditto.
13811 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13812 (nds32_init_builtins_impl): Ditto.
13813 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13814 (nds32_builtin_decl): New.
13815 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13816 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13818 2018-03-02 Jeff Law <law@redhat.com>
13820 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13821 (redundant_insn, fill_simple_delay_slots): Likewise.
13822 (fill_slots_from_thread): Likewise.
13823 * resource.c (mark_referenced_resources): Likewise.
13824 (mark_set_resources, find_dead_or_set_registers): Likewise.
13826 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13828 * substring-locations.h (format_warning_va): Formatting fix for
13829 ATTRIBUTE_GCC_DIAG.
13830 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13832 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13833 * substring-locations.c: Include intl.h.
13834 (format_warning_va): Turned into small wrapper around
13835 format_warning_n_va, renamed to ...
13836 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13837 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13839 (format_warning_at_substring_n): New function.
13840 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13841 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13842 format_warning_at_substring with just a shorter name instead of
13843 const function pointer.
13844 (fmtwarn_n): New function.
13845 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13846 appropriate, get rid of all the fmtstr temporaries, move conditionals
13847 with G_() wrapped string literals directly into fmtwarn arguments,
13848 cast dir.len to (int), formatting fixes.
13850 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13852 * doc/invoke.texi: Remove "Cilk Plus" references.
13854 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13855 Richard Biener <rguenther@suse.de>
13858 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13859 for error or warning attributes if CALL_FROM_THUNK_P is set.
13862 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13865 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13866 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13869 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13870 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13872 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13873 instead of -1U in last predictors element's probability member.
13875 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13878 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13879 arguments if they are comparable.
13881 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13883 PR tree-optimization/84634
13884 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13885 masks and masked_loop_p with a single loop_masks, making sure it's
13886 null for bb vectorization.
13888 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13890 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13891 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13892 loop->force_vectorize to check whether there is no alias.
13894 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13897 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13899 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13901 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13902 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13903 instead of a loop around prev_real_insn.
13904 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13907 PR inline-asm/84625
13908 * config/i386/i386.c (ix86_print_operand): Use conditional
13909 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13912 2018-03-02 Richard Biener <rguenther@suse.de>
13914 PR tree-optimization/84427
13915 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13916 (bitmap_set_subtract_values): Rewrite to handle multiple
13919 (prune_clobbered_mems): Likewise.
13920 (phi_translate): Take edge instead of pred/phiblock.
13921 (phi_translate_1): Likewise.
13922 (phi_translate_set): Likewise. Insert all translated
13923 exprs for a value into the set, keeping possibly multiple
13924 expressions per value.
13925 (compute_antic_aux): Adjust for phi_translate changes.
13926 When intersecting union the expressions and prune those
13927 not in the final value set, keeping possibly multiple
13928 expressions per value. Do not use value-insertion
13929 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13930 all expressions. Add verification that the value-sets
13931 only shrink during iteration.
13932 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13933 (do_pre_regular_insertion): Likewise.
13934 (do_pre_partial_partial_insertion): Likewise.
13936 2018-03-02 Richard Biener <rguenther@suse.de>
13939 * config/darwin.c (saved_debug_info_level): New static global.
13940 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13941 (darwin_asm_lto_end): Restore debug info generation settings.
13943 2018-03-01 Martin Liska <mliska@suse.cz>
13946 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13947 volatile arguments.
13949 2018-03-01 Richard Biener <rguenther@suse.de>
13952 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13953 type annotation with LTO when debug was disabled at compile-time.
13955 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13957 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13959 (mips_final_postscan_insn): Likewise.
13961 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13963 PR rtl-optimization/84528
13964 * alias.c (init_alias_target): Add commentary.
13965 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13966 a unique base value if the frame pointer is not eliminated
13967 to the stack pointer.
13969 2018-03-01 Tom de Vries <tom@codesourcery.com>
13971 PR rtl-optimization/83327
13972 * lra-int.h (hard_regs_spilled_into): Declare.
13973 * lra.c (hard_regs_spilled_into): Define.
13974 (init_reg_info): Init hard_regs_spilled_into.
13975 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13976 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13977 (process_bb_lives): Handle hard_regs_spilled_into.
13978 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13979 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13981 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13983 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13984 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13985 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13986 * config/rs6000/aix72.h: New file.
13988 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13990 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13991 instead of warning_at with conditional singular and plural messages
13995 * stor-layout.c (update_alignment_for_field): For
13996 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13997 && !DECL_PACKED (field), do the alignment update, just use
13998 only desired_align instead of MAX (type_align, desired_align)
14000 (place_field): Don't do known_align < desired_align handling
14001 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14002 is non-NULL, instead do it after rli->prev_field handling and
14003 only if not within a bitfield word. For DECL_PACKED (field)
14004 use type_align of BITS_PER_UNIT.
14006 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14008 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14009 superfluous parentheses and trailing spaces.
14011 2018-02-28 Richard Biener <rguenther@suse.de>
14013 PR tree-optimization/84584
14014 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14015 SCoPs with fake exit edge.
14017 2018-02-28 Martin Liska <mliska@suse.cz>
14020 * timevar.c (timer::print): Fix format to properly print 100%
14023 2018-02-28 Richard Biener <rguenther@suse.de>
14025 PR middle-end/84607
14026 * genmatch.c (capture_info::walk_match): Do not mark
14027 captured expressions without operands as expr_p given
14028 they act more like predicates and should be subject to
14029 "lost tail" side-effect preserving.
14031 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14033 PR rtl-optimization/81611
14034 * auto-inc-dec.c (attempt_change): Move dead note from
14035 mem_insn if it's the next use of regno
14036 (find_address): Take address use of reg holding
14037 non-incremented value. Add parm to limit search to the named
14039 (merge_in_block): Attempt to use a mem insn that is the next
14040 use of the original regno.
14042 2018-02-27 Martin Sebor <msebor@redhat.com>
14045 * doc/invoke.texi (-Wmissing-attributes): New option.
14046 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14048 2018-02-27 Martin Sebor <msebor@redhat.com>
14050 PR translation/84207
14051 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14052 n argument to unsigned HOST_WIDE_INT.
14053 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14054 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14055 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14056 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14058 2018-02-27 Richard Biener <rguenther@suse.de>
14060 PR tree-optimization/84512
14061 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14062 Do not use the estimate returned from record_stmt_cost for
14063 the scalar iteration cost but sum properly using add_stmt_cost.
14065 2018-02-27 Richard Biener <rguenther@suse.de>
14067 PR tree-optimization/84466
14068 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14069 Adjust last change to less strictly validate use operands.
14071 2018-02-27 Martin Liska <mliska@suse.cz>
14073 PR gcov-profile/84548
14074 * gcov.c (process_file): Allow partial overlap and consider it
14075 also as group functions.
14076 (output_lines): Properly calculate range of lines for a group.
14078 2018-02-27 Martin Liska <mliska@suse.cz>
14080 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14081 'ggc' suffixes. Change first column width.
14082 (timer::print): Fix formatting of the column.
14084 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14086 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14087 preserve inline entry blocks for the sake of debug inline
14088 entry point markers alone.
14089 (remove_unused_locals): Suggest in comments a better place to
14090 force the preservation of inline entry blocks that are
14091 otherwise unused, but do not preserve them.
14093 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14095 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14097 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14100 * config/i386/constraints.md (Bs): Replace
14101 ix86_indirect_branch_register with
14102 TARGET_INDIRECT_BRANCH_REGISTER.
14104 * config/i386/i386.md (indirect_jump): Likewise.
14105 (tablejump): Likewise.
14106 (*sibcall_memory): Likewise.
14107 (*sibcall_value_memory): Likewise.
14108 Peepholes of indirect call and jump via memory: Likewise.
14109 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14110 (*sibcall_value_GOT_32): Likewise.
14111 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14112 (GOT_memory_operand): Likewise.
14113 (call_insn_operand): Likewise.
14114 (sibcall_insn_operand): Likewise.
14115 (GOT32_symbol_operand): Likewise.
14116 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14118 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14120 PR rtl-optimization/83496
14121 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14122 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14123 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14124 redundant insn, if any.
14125 (relax_delay_slots): Likewise.
14126 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14128 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14130 PR tree-optimization/83965
14131 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14132 that grouped statements are part of a reduction chain. Return
14133 true if the statement is not marked as a reduction itself but
14134 is part of a group.
14135 (vect_recog_dot_prod_pattern): Don't check whether the statement
14136 is part of a group here.
14137 (vect_recog_sad_pattern): Likewise.
14138 (vect_recog_widen_sum_pattern): Likewise.
14140 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14143 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14145 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14148 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14150 (ix86_output_indirect_function_return): New prototype.
14151 (ix86_split_simple_return_pop_internal): Likewise.
14152 * config/i386/i386.c (indirect_return_via_cx): New.
14153 (indirect_return_via_cx_bnd): Likewise.
14154 (indirect_thunk_name): Handle return va CX_REG.
14155 (output_indirect_thunk_function): Create alias for
14156 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14157 (ix86_output_indirect_jmp): Remove the bool argument.
14158 (ix86_output_indirect_function_return): New function.
14159 (ix86_split_simple_return_pop_internal): Likewise.
14160 * config/i386/i386.md (*indirect_jump): Don't pass false
14161 to ix86_output_indirect_jmp.
14162 (*tablejump_1): Likewise.
14163 (simple_return_pop_internal): Change it to define_insn_and_split.
14164 Call ix86_split_simple_return_pop_internal to split it for
14165 -mfunction-return=.
14166 (simple_return_indirect_internal): Call
14167 ix86_output_indirect_function_return instead of
14168 ix86_output_indirect_jmp.
14170 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14173 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14174 memset and value initialization afterwards.
14176 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14178 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14180 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14183 * common/config/aarch64/aarch64-common.c
14184 (aarch_option_optimization_table[]): Switch
14185 off fomit-frame-pointer
14187 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14188 Chung-Ju Wu <jasonwucj@gmail.com>
14190 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14192 (store_multiple): Ditto.
14194 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14196 * config.gcc: Add --with-cpu support for nds32 target.
14197 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14198 * config/nds32/nds32.opt: Add -mcpu= option.
14200 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14202 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14203 isel=yes): Warn for these deprecated options.
14205 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14207 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14208 ISA_2_5_MASKS_EMBEDDED.
14210 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14212 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14213 p->max as pointers rather than using iterative_hash_expr.
14215 2018-02-23 Carl Love <cel@us.ibm.com>
14217 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14218 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14220 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14221 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14222 P8V_BUILTIN_VEC_VUNSIGNED2.
14224 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14227 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14228 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14230 * lra-constraints.c (curr_insn_transform): Set up
14231 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14233 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14234 * lra-eliminations.c (spill_pseudos): Ditto.
14235 (process_insn_for_elimination): Ditto.
14236 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14237 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14238 LRA_NON_CLOBBERED_ALT.
14240 2018-02-22 Martin Sebor <msebor@redhat.com>
14242 PR tree-optimization/84480
14243 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14244 to maybe_diag_stxncpy_trunc. Call it.
14245 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14246 from gimple_fold_builtin_strcpy. Print inlining stack.
14247 (handle_builtin_stxncpy): Print inlining stack.
14248 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14250 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14253 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14254 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14255 and -fcheck-pointer-bounds are used together.
14256 (indirect_thunk_prefix): New enum.
14257 (indirect_thunk_need_prefix): New function.
14258 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14259 "_nt" instead of "_bnd" for NOTRACK prefix.
14260 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14261 (output_indirect_thunk_function): Likewise.
14263 (ix86_code_end): Update output_indirect_thunk_function calls.
14264 (ix86_output_indirect_branch_via_reg): Replace
14265 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14266 (ix86_output_indirect_branch_via_push): Likewise.
14267 (ix86_output_function_return): Likewise.
14268 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14269 incompatible with -fcf-protection=branch and
14270 -fcheck-pointer-bounds.
14272 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14275 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14276 Change gcc_assert call to output_operand_lossage.
14278 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14280 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14282 2018-02-22 DJ Delorie <dj@redhat.com>
14283 Sebastian Perta <sebastian.perta@renesas.com>
14284 Oleg Endo <olegendo@gcc.gnu.org>
14286 * config/rx/rx.c (rx_rtx_costs): New function.
14287 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14289 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14291 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14293 2018-02-22 Martin Liska <mliska@suse.cz>
14296 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14297 Add "native" as a possible value.
14299 2018-02-22 Martin Liska <mliska@suse.cz>
14302 * config/i386/i386.c (ix86_option_override_internal):
14303 Add "native" as a possible value for -march and -mtune.
14305 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14308 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14309 to all type variants.
14311 PR tree-optimization/84503
14312 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14313 width as info->bitpos + info->bitsize - start.
14314 (merged_store_group::merge_overlapping): Simplify width computation.
14315 (check_no_overlap): New function.
14316 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14317 start + width and last_order of the group, fail if check_no_overlap
14319 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14320 to group if check_no_overlap fails.
14322 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14324 * config/rs6000/altivec.md: Delete contraint arguments to
14325 define_expand, define_split, and define_peephole2, and in
14326 define_insn_and_split if always unused.
14327 * config/rs6000/darwin.md: Ditto.
14328 * config/rs6000/dfp.md: Ditto.
14329 * config/rs6000/rs6000.md: Ditto.
14330 * config/rs6000/sync.md: Ditto.
14331 * config/rs6000/vector.md: Ditto.
14332 * config/rs6000/vsx.md: Ditto.
14334 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14336 * config/rs6000/altivec.md: Write output control strings as braced
14337 blocks instead of double-quoted strings.
14338 * config/rs6000/darwin.md: Ditto.
14339 * config/rs6000/rs6000.md: Ditto.
14340 * config/rs6000/vector.md: Ditto.
14341 * config/rs6000/vsx.md: Ditto.
14343 2018-02-21 Jason Merrill <jason@redhat.com>
14345 PR c++/84314 - ICE with templates and fastcall attribute.
14346 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14348 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14350 * ipa-cp.c (determine_versionability): Fix comment typos.
14352 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14355 * ipa-cp.c (determine_versionability): Do not version functions caling
14358 2018-02-21 Martin Liska <mliska@suse.cz>
14361 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14362 Add "native" as a possible value.
14363 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14364 the macro when native cpu detection is available.
14366 2018-02-21 Martin Liska <mliska@suse.cz>
14369 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14370 Add "native" as a possible value.
14371 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14372 when native cpu detection is available.
14374 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14375 Martin Sebor <msebor@redhat.com>
14377 PR tree-optimization/84478
14378 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14380 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14381 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14382 support which is conservatively correct, for 2 only stay conservative
14383 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14384 argument to the 2 argument get_range_strlen, adjust 6 arg
14385 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14387 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14388 (gimple_fold_builtin_strlen): Pass true as last argument to
14391 2018-02-20 Martin Sebor <msebor@redhat.com>
14393 PR middle-end/84095
14394 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14395 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14396 (builtin_memref::builtin_memref): Factor out parts into
14397 set_base_and_offset and call it.
14399 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14401 PR middle-end/84406
14402 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14403 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14404 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14405 search at the associated MODE_INT.
14407 2018-02-20 Jeff Law <law@redhat.com>
14409 PR middle-end/82123
14410 PR tree-optimization/81592
14411 PR middle-end/79257
14412 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14413 for range data rather than using global data.
14414 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14415 range data rather than using global data.
14416 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14417 pass it to children as needed.
14418 (struct directive::fmtresult): Similarly.
14419 (struct directive::set_width): Similarly.
14420 (struct directive::set_precision): Similarly.
14421 (format_integer, format_directive, parse_directive): Similarly.
14422 (format_none): Accept unnamed vr_values parameter.
14423 (format_percent, format_floating, format_character): Similarly.
14424 (format_string, format_plain): Similarly.
14425 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14426 the EVRP range analyzer for range data rather than using global data.
14427 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14428 gimple-ssa-evrp-analyze.h
14429 (class sprintf_dom_walker): Add after_dom_children member function.
14430 Add evrp_range_analyzer member.
14431 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14432 range analyzer as needed.
14433 (sprintf_dom_walker::after_dom_children): New member function.
14434 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14436 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14437 (evrp_range_analyzer::pop_to_marker): Likewise.
14439 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14441 PR tree-optimization/84419
14442 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14443 with the required type if its current type is compatible but
14446 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14448 PR middle-end/82004
14449 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14450 after vectorization.
14452 2018-02-20 Martin Liska <mliska@suse.cz>
14455 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14456 possible values if we don't have a hint.
14458 2018-02-20 Martin Liska <mliska@suse.cz>
14462 * final.c (shorten_branches): Build align_tab array with one
14464 * opts.c (finish_options): Add alignment option limit check.
14465 (MAX_CODE_ALIGN): Likewise.
14466 (MAX_CODE_ALIGN_VALUE): Likewise.
14467 * doc/invoke.texi: Document maximum allowed option value for
14468 all -falign-* options.
14470 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14473 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14474 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14475 * var-tracking.c (emit_note_insn_var_location): Remove all references
14476 to NOTE_INSN_CALL_ARG_LOCATION.
14477 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14478 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14479 Use copy_rtx_if_shared.
14480 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14481 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14482 (dwarf2out_var_location): Remove handling of
14483 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14485 * final.c (final_scan_insn): Remove all references to
14486 NOTE_INSN_CALL_ARG_LOCATION.
14487 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14488 before dumping final insns.
14489 * except.c (emit_note_eh_region_end): Remove all references to
14490 NOTE_INSN_CALL_ARG_LOCATION.
14491 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14492 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14493 * config/arc/arc.c (hwloop_optimize): Likewise.
14494 * config/arm/arm.c (create_fix_barrier): Likewise.
14495 * config/s390/s390.c (s390_chunkify_start): Likewise.
14496 * config/sh/sh.c (find_barrier): Likewise.
14497 * config/i386/i386.c (rest_of_insert_endbranch,
14498 ix86_seh_fixup_eh_fallthru): Likewise.
14499 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14500 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14501 * config/frv/frv.c (frv_function_prologue): Likewise.
14502 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14504 (note_outside_basic_block_p): Remove all references to
14505 NOTE_INSN_CALL_ARG_LOCATION.
14506 * gengtype.c (adjust_field_rtx_def): Likewise.
14507 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14509 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14510 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14513 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14516 PR tree-optimization/84452
14517 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14518 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14521 2018-02-19 Martin Liska <mliska@suse.cz>
14524 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14526 2018-02-19 Martin Liska <mliska@suse.cz>
14527 Richard Sandiford <richard.sandiford@linaro.org>
14529 PR tree-optimization/82491
14530 * gimple-fold.c (get_base_constructor): Make earlier bail out
14533 2018-02-19 Carl Love <cel@us.ibm.com>
14535 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14536 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14538 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14539 P8V_BUILTIN_VEC_NEG.
14541 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14543 * config/rl78/rl78.md (movdf): New define expand.
14545 2018-02-19 Martin Liska <mliska@suse.cz>
14548 * doc/invoke.texi: Fix typo.
14549 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14551 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14553 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14554 handle rs6000_single_float and rs6000_double_float specially for
14557 2018-02-16 Jeff Law <law@redhat.com>
14559 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14560 (pop_regs): Use it.
14562 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14565 * ipa-inline.c (inline_small_functions): Fix a typo.
14567 2018-02-16 Nathan Sidwell <nathan@acm.org>
14569 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14571 2018-02-16 Carl Love <cel@us.ibm.com>
14573 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14574 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14575 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14576 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14577 expansion to P8V_BUILTIN_VEC_FLOAT2.
14579 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14581 PR rtl-optimization/70023
14582 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14583 src_regno into account.
14585 2018-02-16 Carl Love <cel@us.ibm.com>
14587 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14588 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14589 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14590 * config/rs6000/rs6000.c: Remove case statements for
14591 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14592 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14593 and P9V_BUILTIN_VEC_VINSERT4B.
14594 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14595 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14596 * config/rs6000/vsx.md:
14597 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14600 2018-02-16 Carl Love <cel@us.ibm.com>
14602 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14604 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14606 * config/rs6000/rs6000-c.c: Add the definitions for
14607 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14608 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14609 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14610 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14611 definition for insert4b and define insn *insert3b_internal.
14612 * doc/extend.texi: Add documentation for vec_extract4b.
14614 2018-02-16 Nathan Sidwell <nathan@acm.org>
14616 * doc/extend.texi (Backwards Compatibility): Mention friend
14617 injection. Note for-scope is deprecated.
14618 * doc/invoke.texi (-ffriend-injection): Deprecate.
14620 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14622 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14623 that moved to I2, also allow destinations that are a paradoxical
14624 subreg (instead of a normal reg).
14626 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14629 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14632 2018-02-16 Richard Biener <rguenther@suse.de>
14634 PR tree-optimization/84037
14635 PR tree-optimization/84016
14637 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14638 Adjust vec_construct for the fact we need additional higher latency
14639 128bit inserts for AVX256 and AVX512 vector builds.
14640 (ix86_add_stmt_cost): Scale vector construction cost for
14643 2018-02-16 Richard Biener <rguenther@suse.de>
14645 PR tree-optimization/84417
14646 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14647 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14648 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14650 2018-02-16 Martin Liska <mliska@suse.cz>
14653 * internal-fn.def (ASAN_CHECK): Set proper flags.
14654 (ASAN_MARK): Likewise.
14656 2018-02-16 Julia Koval <julia.koval@intel.com>
14658 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14659 from PTA_CANNONLAKE.
14661 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14664 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14665 Use ++iter rather than iter++ for std::list iterators.
14666 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14667 defer deleting them until all nodes in the forest are processed. Do
14668 free even leaf nodes. Change to_process into auto_vec.
14671 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14672 * vec.h (vec_default_construct): Use memset instead of placement new
14673 if BROKEN_VALUE_INITIALIZATION is defined.
14674 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14675 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14678 PR rtl-optimization/83723
14679 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14680 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14681 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14683 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14685 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14687 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14689 PR rtl-optimization/81443
14690 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14691 from inner REGs to paradoxical SUBREGs.
14693 2018-02-16 Richard Biener <rguenther@suse.de>
14695 PR tree-optimization/84399
14696 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14697 For operands we can analyze at their definition make sure we can
14698 analyze them at each use as well.
14700 2018-02-16 Richard Biener <rguenther@suse.de>
14702 PR tree-optimization/84190
14703 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14704 volatile accesses if the decl isn't volatile.
14706 2018-02-15 Jason Merrill <jason@redhat.com>
14708 PR c++/84314 - ICE with templates and fastcall attribute.
14709 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14710 TYPE_CANONICAL on an existing type.
14712 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14714 PR tree-optimization/84383
14715 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14716 dstoff nor call operand_equal_p if dstbase is NULL.
14718 PR tree-optimization/84334
14719 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14720 also a CONSTANT_CLASS_P, punt.
14722 2018-02-14 Jim Wilson <jimw@sifive.com>
14724 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14725 first SMALL_OPERAND check. New local min_second_step. Move assert
14726 to where locals are set. Add TARGET_RVC support.
14727 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14729 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14731 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14733 2018-02-14 Martin Sebor <msebor@redhat.com>
14735 PR tree-optimization/83698
14736 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14737 arrays constrain the offset range to their bounds.
14738 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14739 (builtin_access::overlap): Avoid setting the size of overlap if it's
14741 (maybe_diag_overlap): Also consider arrays when deciding what values
14742 of offsets to include in diagnostics.
14744 2018-02-14 Martin Sebor <msebor@redhat.com>
14747 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14748 that correspond to the kind of a declaration.
14750 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14753 * config/pa/pa.md: Load address of PIC label using the linkage table
14754 if the label is nonlocal.
14756 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14758 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14759 warning message if user requests -maltivec=be.
14760 * doc/invoke.texi: Document deprecation of -maltivec=be.
14762 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14765 * config/rs6000/rs6000-c.c: Update definitions for
14766 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14767 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14769 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14772 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14773 add _get_ssp intrinsics. Remove argument from
14774 __builtin_ia32_rdssp[d|q].
14775 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14776 * config/i386/i386-builtin.def: Remove argument from
14777 __builtin_ia32_rdssp[d|q].
14778 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14779 ix86_expand_special_args_builtin for _rdssp[d|q].
14780 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14781 Clear register before usage.
14782 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14783 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14785 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14787 PR tree-optimization/84357
14788 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14789 operand 1 of an ARRAY_REF too.
14791 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14794 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14795 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14797 (set_of_reg): New struct.
14798 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14799 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14800 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14802 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14803 Split into bitclr, bitset, bitinvert patterns if appropriate.
14804 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14805 use rx_fuse_in_memory_bitop.
14806 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14807 to named insn, correct maximum insn length.
14809 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14812 * machmode.def: Define a complex mode for PARTIAL_INT.
14813 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14815 * doc/rtl.texi: Document CSPImode.
14816 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14818 (msp430_hard_regno_nregs_with_padding): Likewise.
14820 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14823 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14825 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14827 PR rtl-optimization/84169
14828 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14829 we generated a parallel as new i3 and we split that to new i2 and i3
14830 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14831 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14832 those to i2, not i1. Partially rewrite this scan code.
14834 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14837 * stor-layout.c (place_field): For variable length fields, adjust
14838 offset_align afterwards not just based on the field's alignment,
14839 but also on the size.
14841 PR middle-end/84309
14842 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14843 of exps and logs in the use_exp2 case.
14845 2018-02-13 Jeff Law <law@redhat.com>
14847 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14848 entry for "vector".
14850 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14853 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14857 * common.opt (gas-loc-support, gas-locview-support): New.
14858 (ginline-points, ginternal-reset-location-views): New.
14859 * doc/invoke.texi: Document them. Use @itemx where intended.
14860 (gvariable-location-views): Adjust.
14861 * target.def (reset_location_view): New.
14862 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14863 (TARGET_RESET_LOCATION_VIEW): New.
14864 * doc/tm.texi: Rebuilt.
14865 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14866 (dwarf2out_default_as_locview_support): New.
14867 (output_asm_line_debug_info): Use option variables.
14868 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14869 (output_loc_list): Likewise.
14870 (add_high_low_attributes): Check option variables.
14871 Don't output entry view attribute in strict mode.
14872 (gen_inlined_subroutine_die): Check option variables.
14873 (dwarf2out_inline_entry): Likewise.
14874 (init_sections_and_labels): Likewise.
14875 (dwarf2out_early_finish): Likewise.
14876 (maybe_reset_location_view): New, from...
14877 (dwarf2out_var_location): ... here. Call it.
14878 * debug.h (dwarf2out_default_as_loc_support): Declare.
14879 (dwarf2out_default_as_locview_support): Declare.
14880 * hooks.c (hook_int_rtx_insn_0): New.
14881 * hooks.h (hook_int_rtx_insn_0): Declare.
14882 * toplev.c (process_options): Take -gas-loc-support and
14883 -gas-locview-support from dwarf2out. Enable
14884 -gvariable-location-views by default only with locview
14885 assembler support. Enable -ginternal-reset-location-views by
14886 default only if the target defines the corresponding hook.
14887 Enable -ginline-points by default if location views are
14888 enabled; force it disabled if statement frontiers are
14890 * tree-inline.c (expand_call_inline): Check option variables.
14891 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14893 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14895 PR tree-optimization/84321
14896 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14897 handling. Also check whether the anti-range contains any values
14898 that satisfy the mask; switch to a VR_RANGE if not.
14900 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14903 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14905 2018-02-13 Martin Jambor <mjambor@suse.cz>
14908 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14909 of call statements, also set location of a load to a temporary.
14911 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14913 * config/rl78/rl78.c (add_vector_labels): New function.
14914 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14915 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14916 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14917 which checks that no arguments are passed.
14918 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14919 * doc/extend.texi: Documentation for the new attribute.
14921 2018-02-13 Andreas Schwab <schwab@suse.de>
14923 * config/riscv/linux.h (CPP_SPEC): Define.
14925 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14928 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14929 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14930 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14931 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14932 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14933 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14934 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14935 temporarily for AES and PCLMUL builtins.
14937 PR tree-optimization/84339
14938 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14939 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14942 PR middle-end/84309
14943 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14944 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14945 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14947 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14949 * omp-simd-clone.h: New file.
14950 * omp-simd-clone.c: Include omp-simd-clone.h.
14951 (expand_simd_clones): No longer static.
14952 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14953 cgraph.h and omp-simd-clone.h.
14954 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14955 (vect_recog_widen_shift_pattern): Formatting fix.
14956 (vect_pattern_recog_1): Don't check optab for calls.
14959 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14960 operands[2] into a REG before using gen_lowpart on it.
14962 2018-02-12 Jeff Law <law@redhat.com>
14965 * config/sh/sh.c (find_barrier): Consider a sibling call
14968 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14969 successfully back substituting a reg.
14971 2018-02-12 Richard Biener <rguenther@suse.de>
14973 PR tree-optimization/84037
14974 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14975 parameter, move visited init to caller.
14976 (vect_slp_analyze_operations): Separate cost from validity
14977 check, initialize visited once for all instances.
14978 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14980 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14982 (vect_model_promotion_demotion_cost): Likewise.
14983 (vectorizable_bswap): Guard cost modeling with !slp_node
14984 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14986 (vectorizable_call): Likewise.
14987 (vectorizable_conversion): Likewise.
14988 (vectorizable_assignment): Likewise.
14989 (vectorizable_shift): Likewise.
14990 (vectorizable_operation): Likewise.
14991 (vectorizable_store): Likewise.
14992 (vectorizable_load): Likewise.
14993 (vectorizable_condition): Likewise.
14994 (vectorizable_comparison): Likewise.
14996 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14999 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15000 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15001 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15003 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15005 PR middle-end/83665
15006 * params.def (inline-min-speedup): Increase from 8 to 15.
15007 (max-inline-insns-auto): Decrease from 40 to 30.
15008 * ipa-split.c (consider_split): Add some buffer for function to
15009 be considered inlining candidate.
15010 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15013 2018-02-12 Richard Biener <rguenther@suse.de>
15015 PR tree-optimization/84037
15016 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15017 matched stmts if we cannot swap the non-matched ones.
15019 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15021 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15022 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15023 _mm_maskz_scalef_round_ss): New intrinsics.
15024 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15025 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15026 __builtin_ia32_scalefss_round): Remove.
15027 (__builtin_ia32_scalefsd_mask_round,
15028 __builtin_ia32_scalefss_mask_round): New intrinsics.
15029 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15030 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15031 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15032 "<round_constraint>")): Changed to ...
15033 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15034 "<round_scalar_constraint>")): ... this.
15035 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15036 %0, %1, %2<round_op3>}"): Changed to ...
15037 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15038 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15039 %2<round_scalar_mask_op3>}"): ... this.
15040 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15042 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15044 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15045 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15046 (_mm_maskz_sqrt_round_ss): New intrinsics.
15047 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15048 (__builtin_ia32_sqrtsd_mask_round)
15049 (__builtin_ia32_sqrtss_mask_round): New builtins.
15050 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15051 (__builtin_ia32_sqrtss_round): Remove.
15052 (__builtin_ia32_sqrtsd_mask_round)
15053 (__builtin_ia32_sqrtss_mask_round): New builtins.
15054 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15055 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15056 ((match_operand:VF_128 1 "vector_operand"
15057 "xBm,<round_constraint>")): Changed to ...
15058 ((match_operand:VF_128 1 "vector_operand"
15059 "xBm,<round_scalar_constraint>")): ... this.
15060 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15061 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15062 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15063 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15064 %<iptr>1<round_scalar_mask_op3>}): ... this.
15065 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15066 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15068 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15071 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15072 Cast vec_cmpeq result to correct type.
15073 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15074 Cast vec_cmpgt result to correct type.
15076 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15078 * final.c (final_scan_insn_1): Renamed from...
15079 (final_scan_insn): ... this. New wrapper, to recover
15080 seen from the outermost call in recursive ones.
15081 * config/sparc/sparc.c (output_return): Drop seen from call.
15082 (output_sibcall): Likewise.
15083 * config/visium/visium.c (output_branch): Likewise.
15085 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15087 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15090 2018-02-10 Alan Modra <amodra@gmail.com>
15093 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15094 Specify LR as an input.
15096 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15099 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15100 remove_member_access_dummy_vars): New functions.
15101 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15102 lower_omp_1, execute_lower_omp): Use them.
15104 PR rtl-optimization/84308
15105 * shrink-wrap.c (spread_components): Release todo vector.
15107 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15109 PR rtl-optimization/57193
15110 * ira-color.c (struct allocno_color_data): Add member
15111 conflict_allocno_hard_prefs.
15112 (update_conflict_allocno_hard_prefs): New.
15113 (bucket_allocno_compare_func): Add a preference based on
15114 conflict_allocno_hard_prefs.
15115 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15116 (color_allocnos): Remove a dead code. Initiate
15117 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15119 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15122 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15123 constraint from =wa to wa. Avoid a subreg on the output operand,
15124 instead use a pseudo and subreg it in a move.
15125 (p9_xxbrd_<mode>): Changed to ...
15126 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15127 (p9_xxbrd_v2df): New expander.
15128 (p9_xxbrw_<mode>): Changed to ...
15129 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15130 (p9_xxbrw_v4sf): New expander.
15132 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15134 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15136 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15139 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15140 multiply in 32-bit mode.
15141 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15142 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15145 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15147 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15148 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15149 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15150 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15152 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15155 * dwarf2out.c (is_trivial_indirect_ref): New function.
15156 (dwarf2out_late_global_decl): Do not generate a location
15157 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15158 and that are not defined in the current unit.
15160 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15162 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15163 instead of a libcall for UNORDERED.
15165 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15168 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15169 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15171 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15174 * config/s390/s390.c (s390_set_current_function): Invoke
15175 s390_indirect_branch_settings also if fndecl didn't change.
15177 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15179 * config/rs6000/rs6000.md (blockage): Set length to zero.
15181 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15183 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15185 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15188 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15189 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15193 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15194 PARALLEL incoming that failed vt_get_decl_and_offset check.
15196 PR middle-end/84237
15197 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15198 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15200 (get_variable_section): For decls in named .bss* sections pass true as
15201 second argument to bss_initializer_p.
15203 2018-02-09 Marek Polacek <polacek@redhat.com>
15204 Jakub Jelinek <jakub@redhat.com>
15207 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15208 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15209 Sync some changes from cxx_fold_indirect_ref.
15211 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15213 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15215 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15216 (BLOCK_INLINE_ENTRY_LABEL): New.
15217 (dwarf2out_var_location): Disregard inline entry markers.
15218 (inline_entry_data): New struct.
15219 (inline_entry_data_hasher): New hashtable type.
15220 (inline_entry_data_hasher::hash): New.
15221 (inline_entry_data_hasher::equal): New.
15222 (inline_entry_data_table): New variable.
15223 (add_high_low_attributes): Add DW_AT_entry_pc and
15224 DW_AT_GNU_entry_view attributes if a pending entry is found
15225 in inline_entry_data_table. Add old entry_pc attribute only
15226 if debug nonbinding markers are disabled.
15227 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15228 markers are enabled.
15229 (block_within_block_p, dwarf2out_inline_entry): New.
15230 (dwarf2out_finish): Check that no entries remained in
15231 inline_entry_data_table.
15232 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15233 (final_scan_insn, notice_source_line): Likewise.
15234 (rest_of_clean_state): Skip inline entry markers.
15235 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15237 * gimple.c (gimple_build_debug_inline_entry): New.
15238 * gimple.h (enum gimple_debug_subcode): Add
15239 GIMPLE_DEBUG_INLINE_ENTRY.
15240 (gimple_build_debug_inline_entry): Declare.
15241 (gimple_debug_inline_entry_p): New.
15242 (gimple_debug_nonbind_marker_p): Adjust.
15243 * insn-notes.def (INLINE_ENTRY): New.
15244 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15245 inline entry marker notes.
15246 (print_insn): Likewise.
15247 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15248 (INSN_DEBUG_MARKER_KIND): Likewise.
15249 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15250 * tree-inline.c (expand_call_inline): Build and insert
15251 debug_inline_entry stmt.
15252 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15253 inline entry blocks early, if nonbind markers are enabled.
15254 (dump_scope_block): Dump fragment info.
15255 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15256 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15257 (gimple_build_debug_inline_entry): New.
15258 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15259 Enable/disable inline entry points too.
15260 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15261 (DEBUG_INSN): Describe inline entry markers.
15263 * common.opt (gvariable-location-views): New.
15264 (gvariable-location-views=incompat5): New.
15265 * config.in: Rebuilt.
15266 * configure: Rebuilt.
15267 * configure.ac: Test assembler for view support.
15268 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15269 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15270 * dwarf2out.c (var_loc_view): New typedef.
15271 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15272 (dwarf2out_locviews_in_attribute): New.
15273 (dwarf2out_locviews_in_loclist): New.
15274 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15275 (enum dw_line_info_opcode): Add LI_adv_address.
15276 (struct dw_line_info_table): Add view.
15277 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15278 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15279 (zero_view_p): New variable.
15280 (ZERO_VIEW_P): New macro.
15281 (output_asm_line_debug_info): New.
15282 (struct var_loc_node): Add view.
15283 (add_AT_view_list, AT_loc_list): New.
15284 (add_var_loc_to_decl): Add view param. Test it against last.
15285 (new_loc_list): Add view params. Record them.
15286 (AT_loc_list_ptr): Handle loc and view lists.
15287 (view_list_to_loc_list_val_node): New.
15288 (print_dw_val): Handle dw_val_class_view_list.
15289 (size_of_die): Likewise.
15290 (value_format): Likewise.
15291 (loc_list_has_views): New.
15292 (gen_llsym): Set vl_symbol too.
15293 (maybe_gen_llsym, skip_loc_list_entry): New.
15294 (dwarf2out_maybe_output_loclist_view_pair): New.
15295 (output_loc_list): Output view list or entries too.
15296 (output_view_list_offset): New.
15297 (output_die): Handle dw_val_class_view_list.
15298 (output_dwarf_version): New.
15299 (output_compilation_unit_header): Use it.
15300 (output_skeleton_debug_sections): Likewise.
15301 (output_rnglists, output_line_info): Likewise.
15302 (output_pubnames, output_aranges): Update version comments.
15303 (output_one_line_info_table): Output view numbers in asm comments.
15304 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15305 Call maybe_gen_llsym.
15306 (loc_list_from_tree_1): Adjust.
15307 (add_AT_location_description): Create view list attribute if
15308 needed, check it's absent otherwise.
15309 (convert_cfa_to_fb_loc_list): Adjust.
15310 (maybe_emit_file): Call output_asm_line_debug_info for test.
15311 (dwarf2out_var_location): Reset views as needed. Precompute
15312 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15313 attribute. Set view.
15314 (new_line_info_table): Reset next view.
15315 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15316 (dwarf2out_source_line): Likewise. Output view resets and labels to
15317 the assembler, or select appropriate line info opcodes.
15318 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15319 (optimize_string_length): Catch it. Adjust.
15320 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15321 dw_val_class_view_list, and remove it if no longer needed.
15322 (hash_loc_list): Hash view numbers.
15323 (loc_list_hasher::equal): Compare them.
15324 (optimize_location_lists): Check whether a view list symbol is
15325 needed, and whether the locview attribute is present, and
15326 whether they match. Remove the locview attribute if no longer
15328 (index_location_lists): Call skip_loc_list_entry for test.
15329 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15330 Use output_dwarf_version.
15331 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15332 (struct dw_val_node): Add val_view_list.
15333 * final.c (SEEN_NEXT_VIEW): New.
15334 (set_next_view_needed): New.
15335 (clear_next_view_needed): New.
15336 (maybe_output_next_view): New.
15337 (final_start_function): Rename to...
15338 (final_start_function_1): ... this. Take pointer to FIRST,
15339 add SEEN parameter. Emit param bindings in the initial view.
15340 (final_start_function): Reintroduce SEEN-less interface.
15341 (final): Rename to...
15342 (final_1): ... this. Take SEEN parameter. Output final pending
15343 next view at the end.
15344 (final): Reintroduce seen-less interface.
15345 (final_scan_insn): Output pending next view before switching
15346 sections or ending a block. Mark the next view as needed when
15347 outputting variable locations. Notify debug backend of section
15348 changes, and of location view changes.
15349 (rest_of_handle_final): Adjust.
15350 * toplev.c (process_options): Autodetect value for debug variable
15351 location views option. Warn on incompat5 without -gdwarf-5.
15352 * doc/invoke.texi (gvariable-location-views): New.
15353 (gvariable-location-views=incompat5): New.
15354 (gno-variable-location-views): New.
15356 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15358 PR tree-optimization/84136
15359 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15360 that the result of find_edge is non-NULL.
15362 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15365 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15366 storing integer register in SImode. Fix cost of 256 and 512
15367 byte aligned SSE register store.
15369 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15371 * config/i386/i386.c (ix86_multiplication_cost): Fix
15372 multiplication cost for TARGET_AVX512DQ.
15374 2018-02-08 Marek Polacek <polacek@redhat.com>
15376 PR tree-optimization/84238
15377 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15380 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15382 PR tree-optimization/84265
15383 * tree-vect-stmts.c (vectorizable_store): Don't treat
15384 VMAT_CONTIGUOUS accesses as grouped.
15385 (vectorizable_load): Likewise.
15387 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15389 PR tree-optimization/81635
15390 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15391 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15392 (test_round_for_mask): New functions.
15393 (wide_int_cc_tests): Call test_round_for_mask.
15394 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15395 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15396 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15397 range returned by get_range_info.
15399 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15402 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15403 * symtab.c: Include builtins.h
15404 (symtab_node::output_to_lto_symbol_table_p): Move here
15405 from lto-streamer-out.c:output_symbol_p.
15406 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15407 (output_symbol_p): Move all logic to symtab.c
15408 (produce_symtab): Update.
15410 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15412 * config/s390/s390-opts.h (enum indirect_branch): Define.
15413 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15414 (s390_indirect_branch_via_thunk)
15415 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15416 (enum s390_indirect_branch_type): Define.
15417 * config/s390/s390.c (struct s390_frame_layout, struct
15418 machine_function): Remove.
15419 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15420 (indirect_branch_table_label_no, indirect_branch_table_name):
15422 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15423 (enum s390_indirect_branch_option): Define.
15424 (s390_return_addr_from_memory): New function.
15425 (s390_handle_string_attribute): New function.
15426 (s390_attribute_table): Add new attribute handler.
15427 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15428 (s390_indirect_branch_via_thunk): New function.
15429 (s390_indirect_branch_via_inline_thunk): New function.
15430 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15431 sibling call optimization for non z10 compiles.
15432 (s390_emit_call): Force indirect branch target to be a single
15433 register. Add r1 clobber for non-z10 compiles.
15434 (s390_emit_epilogue): Emit return jump via return_use expander.
15435 (s390_reorg): Handle JUMP_INSNs as execute targets.
15436 (s390_option_override_internal): Perform validity checks for the
15437 new command line options.
15438 (s390_indirect_branch_attrvalue): New function.
15439 (s390_indirect_branch_settings): New function.
15440 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15441 (s390_output_indirect_thunk_function): New function.
15442 (s390_code_end): Implement target hook.
15443 (s390_case_values_threshold): Implement target hook.
15444 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15446 * config/s390/s390.h (struct s390_frame_layout)
15447 (struct machine_function): Move here from s390.c.
15448 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15449 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15450 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15451 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15452 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15453 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15454 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15455 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15456 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15457 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15458 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15459 (mnemonic attribute): Add values which aren't recognized
15461 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15462 pattern for branch conversion. Fix mnemonic attribute.
15463 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15464 indirect branch via thunk if requested.
15465 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15466 ("*indirect_jump"): Disable for branch conversion using out of
15468 ("indirect_jump_via_thunk<mode>_z10")
15469 ("indirect_jump_via_thunk<mode>")
15470 ("indirect_jump_via_inlinethunk<mode>_z10")
15471 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15472 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15473 ("casesi_jump_via_inlinethunk<mode>_z10")
15474 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15475 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15476 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15477 ("*indirect2_jump"): Disable for branch conversion.
15478 ("casesi_jump"): Turn into expander and expand patterns for branch
15480 ("return_use"): New expander.
15481 ("*return"): Emit return via thunk and rename it to ...
15482 ("*return<mode>"): ... this one.
15483 * config/s390/s390.opt: Add new options and and enum for the
15486 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15488 * lra-constraints.c (match_reload): Unconditionally use
15489 gen_lowpart_SUBREG, rather than selecting between that
15490 and equivalent gen_rtx_SUBREG code.
15492 2018-02-08 Richard Biener <rguenther@suse.de>
15494 PR tree-optimization/84233
15495 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15496 changed flag instead of boguously re-using phi_inserted.
15498 2018-02-08 Martin Jambor <mjambor@suse.cz>
15500 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15501 static local variables.
15503 2018-02-08 Richard Biener <rguenther@suse.de>
15505 PR tree-optimization/84278
15506 * tree-vect-stmts.c (vectorizable_store): When looking for
15507 smaller vector types to perform grouped strided loads/stores
15508 make sure the mode is supported by the target.
15509 (vectorizable_load): Likewise.
15511 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15513 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15514 Increase LDP/STP opportunities by adding adjacent callee-saves.
15516 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15518 PR rtl-optimization/84068
15519 PR rtl-optimization/83459
15520 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15522 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15524 PR tree-optimization/84224
15525 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15526 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15527 non-zero arguments.
15529 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15532 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15533 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15534 count, remove one USE.
15536 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15538 * doc/install.texi (Configuration): Document the
15539 --with-long-double-format={ibm,ieee} PowerPC configuration
15543 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15544 Convert from define_expand to be define_insn_and_split. Rework
15545 float/double/_Float128 conversions to QI/HI/SImode to work with
15546 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15547 conversions to QI/HImode types did a store and then a load to
15548 truncate the value. For conversions to VSX registers, don't split
15549 the insn, instead emit the code directly. Use the code iterator
15550 any_fix to combine signed and unsigned conversions.
15551 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15552 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15553 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15554 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15555 (fix_<mode>di2_hw): Likewise.
15556 (fixuns_<mode>di2_hw): Likewise.
15557 (fix_<mode>si2_hw): Likewise.
15558 (fixuns_<mode>si2_hw): Likewise.
15559 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15560 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15561 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15562 fix<uns>_trunc<SFDF:mode>si2_p8.
15563 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15564 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15565 (fix<uns>_<mode>_mem): Likewise.
15566 (fctiw<u>z_<mode>_mem): Likewise.
15567 (fix<uns>_<mode>_mem): Likewise.
15568 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15569 the register allocator from doing a direct move to the GPRs to do
15570 a store, and instead use the ISA 3.0 store byte/half-word from
15571 vector register instruction. For IEEE 128-bit floating point,
15572 also optimize stores of 32-bit ints.
15573 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15575 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15577 * genextract.c (push_pathstr_operand): New function to support
15579 (walk_rtx): Call push_pathstr_operand.
15580 (print_path): Support [a-zA-Z].
15582 2018-02-07 Richard Biener <rguenther@suse.de>
15584 PR tree-optimization/84037
15585 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15586 (cse_and_gimplify_to_preheader): Declare.
15587 (vect_get_place_in_interleaving_chain): Likewise.
15588 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15590 (_loop_vec_info::~_loop_vec_info): Delete it.
15591 (cse_and_gimplify_to_preheader): New function.
15592 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15593 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15594 (vectorizable_load): Likewise. For grouped stores always base
15595 the IV on the first element.
15596 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15597 condition before gimplifying.
15599 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15601 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15602 *DIV_EXPR and *MOD_EXPR.
15604 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15607 * config/i386/i386.c (ix86_option_override_internal): Mask out
15608 the CF_SET bit when checking -fcf-protection.
15610 2018-02-07 Tom de Vries <tom@codesourcery.com>
15613 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15616 2018-02-07 Richard Biener <rguenther@suse.de>
15618 PR tree-optimization/84204
15619 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15622 PR tree-optimization/84205
15623 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15624 special-case isl_ast_op_zdiv_r.
15626 PR tree-optimization/84223
15627 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15628 Only add conditions from within the region.
15629 (gather_bbs::after_dom_children): Adjust.
15631 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15634 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15635 * config/avr/avr.md: Only post-reload split REG-REG moves if
15636 either register is GENERAL_REG_P.
15638 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15640 PR tree-optimization/84235
15641 * tree-ssa-scopedtables.c
15642 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15643 if the subtraction is performed in floating point type where NaNs are
15644 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15645 build 1. Formatting fix.
15647 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15650 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15651 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15652 and skip it regardless of bb boundaries. Use CALL_P macro,
15653 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15654 unnecessarily, formatting fix.
15656 2018-02-06 Michael Collison <michael.collison@arm.com>
15658 * config/arm/thumb2.md:
15659 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15660 (*thumb_mov_notscc): Ditto.
15662 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15665 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15666 unsigned_fix, not "s".
15668 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15670 * configure.ac (gcc_fn_eh_frame_ro): New function.
15671 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15672 correct .eh_frame permissions.
15673 * configure: Regenerate.
15675 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15677 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15678 irrelevant options.
15680 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15682 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15683 Display warning message for -mno-speculate-indirect-jumps.
15685 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15687 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15689 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15691 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15693 PR tree-optimization/84225
15694 * tree-eh.c (find_trapping_overflow): Only call
15695 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15697 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15700 * config/i386/i386.c: Reimplement the check of possible options
15701 -mibt/-mshstk conbination. Change error messages.
15702 * doc/invoke.texi: Fix a typo: remove extra '='.
15704 2018-02-06 Marek Polacek <polacek@redhat.com>
15706 PR tree-optimization/84228
15707 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15709 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15712 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15713 emitted arch directives.
15714 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15715 __ARM_FEATURE_COPROC before changing architectures.
15717 2018-02-06 Richard Biener <rguenther@suse.de>
15719 * config/i386/i386.c (print_reg): Fix typo.
15720 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15722 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15724 * configure: Regenerate.
15726 2018-02-05 Martin Sebor <msebor@redhat.com>
15728 PR tree-optimization/83369
15729 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15732 2018-02-05 Martin Liska <mliska@suse.cz>
15734 * doc/invoke.texi: Cherry-pick upstream r323995.
15736 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15738 * ira.c (ira_init_register_move_cost): Adjust comment.
15740 2018-02-05 Martin Liska <mliska@suse.cz>
15742 PR gcov-profile/84137
15743 * doc/gcov.texi: Fix typo in documentation.
15745 2018-02-05 Martin Liska <mliska@suse.cz>
15747 PR gcov-profile/83879
15748 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15749 using dlopen functionality.
15751 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15753 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15754 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15755 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15756 _mm_maskz_range_round_ss): New intrinsics.
15757 (__builtin_ia32_rangesd128_round)
15758 (__builtin_ia32_rangess128_round): Remove.
15759 (__builtin_ia32_rangesd128_mask_round,
15760 __builtin_ia32_rangess128_mask_round): New builtins.
15761 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15762 __builtin_ia32_rangess128_round): Remove.
15763 (__builtin_ia32_rangesd128_mask_round,
15764 __builtin_ia32_rangess128_mask_round): New builtins.
15765 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15766 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15767 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15768 "<round_saeonly_constraint>")): Changed to ...
15769 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15770 "<round_saeonly_scalar_constraint>")): ... this.
15771 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15772 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15773 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15774 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15775 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15777 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15779 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15781 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15782 Remove all values except native, 8540 and 8548.
15784 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15786 * config/i386/i386.c (ix86_output_function_return): Pass
15787 INVALID_REGNUM, instead of -1, as invalid register number to
15788 indirect_thunk_name and output_indirect_thunk.
15790 2018-02-02 Julia Koval <julia.koval@intel.com>
15792 * config.gcc: Add -march=icelake.
15793 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15794 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15795 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15796 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15797 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15798 (processor_target_table): Add icelake.
15799 (ix86_option_override_internal): Handle new PTAs.
15800 (get_builtin_code_for_version): Handle icelake.
15801 (M_INTEL_COREI7_ICELAKE): New.
15802 (fold_builtin_cpu): Handle icelake.
15803 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15804 * doc/invoke.texi: Add -march=icelake.
15806 2018-02-02 Julia Koval <julia.koval@intel.com>
15808 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15809 to wide_int_bitmask.
15810 * wide-int-bitmask.h: New.
15812 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15815 * config/i386/i386.md: Replace Pmode with word_mode in
15816 builtin_setjmp_setup and builtin_longjmp to support x32.
15818 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15822 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15824 (rs6000_supported_cpu_names): New static variable.
15825 (linux_cpu_translation_table): Likewise.
15826 (elf_platform) <cpu>: Define new static variable and use it.
15827 Translate kernel AT_PLATFORM name to canonical name if needed.
15828 Error if platform name is unknown.
15830 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15833 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15835 2018-02-01 Jeff Law <law@redhat.com>
15838 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15839 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15840 the scratch if RELEASE_VIA_POP is false.
15841 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15842 If we have to save a temporary register, decrement SIZE appropriately.
15843 Pass new arguments to release_scratch_register_on_entry.
15844 (ix86_adjust_stack_and_probe): Likewise.
15845 (ix86_emit_probe_stack_range): Pass new arguments to
15846 release_scratch_register_on_entry.
15848 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15850 PR rtl-optimization/84157
15851 * combine.c (change_zero_ext): Use REG_P predicate in
15852 front of HARD_REGISTER_P predicate.
15854 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15856 * config/avr/avr.c (avr_option_override): Move disabling of
15857 -fdelete-null-pointer-checks to...
15858 * common/config/avr/avr-common.c (avr_option_optimization_table):
15861 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15863 PR tree-optimization/81635
15864 * tree-data-ref.c (split_constant_offset_1): For types that
15865 wrap on overflow, try to use range info to prove that wrapping
15868 2018-02-01 Renlin Li <renlin.li@arm.com>
15871 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15872 TAILCALL_ADDR_REGS.
15873 (aarch64_register_move_cost): Likewise.
15874 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15875 TAILCALL_ADDR_REGS.
15876 (REG_CLASS_NAMES): Likewise.
15877 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15878 TAILCALL_ADDR_REGS. Remove IP registers.
15879 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15881 2018-02-01 Richard Biener <rguenther@suse.de>
15883 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15884 for specifying RPO order and allow NULL for that.
15885 * domwalk.c (dom_walker::dom_walker): Likewise.
15886 (dom_walker::walk): Handle NULL RPO order.
15887 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15889 (rewrite_update_dom_walker): Likewise.
15890 (mark_def_dom_walker): Likewise.
15892 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15894 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15895 (aarch64_maybe_expand_sve_subreg_move): Declare.
15896 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15897 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15899 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15900 that are semantically a reverse operation.
15901 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15902 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15903 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15905 (aarch64_can_change_mode_class): For big-endian, forbid changes
15906 between two SVE modes if they have different element sizes.
15908 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15910 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15911 the TImode handling for big-endian targets.
15913 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15915 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15916 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15918 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15919 Remove BSWAP handing for big-endian targets and use the form of
15920 LD1RQ appropariate for the mode.
15922 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15924 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15925 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15926 duplicated element.
15928 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15931 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15932 check for operands that need to go through aarch64_sve_reload_be.
15934 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15936 PR tree-optimization/81661
15937 PR tree-optimization/84117
15938 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15939 * tree-eh.c: Include gimplify.h.
15940 (find_trapping_overflow, replace_trapping_overflow,
15941 rewrite_to_non_trapping_overflow): New functions.
15942 * tree-vect-loop.c: Include tree-eh.h.
15943 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15944 * tree-data-ref.c: Include tree-eh.h.
15945 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15947 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15949 PR rtl-optimization/84123
15950 * combine.c (change_zero_ext): Check if hard register satisfies
15951 can_change_dest_mode before calling gen_lowpart_SUBREG.
15953 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15956 * ira.c (ira_init_register_move_cost): Remove assert.
15958 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15960 PR rtl-optimization/84071
15961 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15962 * doc/tm.texi: Regenerate.
15964 2018-01-31 Richard Biener <rguenther@suse.de>
15966 PR tree-optimization/84132
15967 * tree-data-ref.c (analyze_miv_subscript): Properly
15968 check whether evolution_function_is_affine_multivariate_p
15969 before calling gcd_of_steps_may_divide_p.
15971 2018-01-31 Julia Koval <julia.koval@intel.com>
15974 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15975 * config/i386/i386.md (rdpid_rex64) New.
15976 (rdpid): Make 32bit only.
15978 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15981 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15982 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15984 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15987 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15989 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15991 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15993 PR rtl-optimization/84071
15994 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15995 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15997 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15999 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16000 (arc_attribute_table): Add 'aux' attribute.
16001 (arc_in_small_data_p): Consider aux like variables.
16002 (arc_is_aux_reg_p): New function.
16003 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16004 (arc_get_aux_arg): New function.
16005 (prepare_move_operands): Handle aux-register access.
16006 (arc_handle_aux_attribute): New function.
16007 * doc/extend.texi (ARC Variable attributes): Add subsection.
16009 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16011 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16012 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16013 (arc_attribute_table): Add 'uncached' attribute.
16014 (arc_print_operand): Print '.di' flag for uncached memory
16016 (arc_in_small_data_p): Do not consider for small data the uncached
16018 (arc_is_uncached_mem_p): New function.
16019 * config/arc/predicates.md (compact_store_memory_operand): Check
16020 for uncached memory accesses.
16021 (nonvol_nonimm_operand): Likewise.
16022 * doc/extend.texi (ARC Type Attribute): New subsection.
16024 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16027 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16028 falign-loops=): Add Optimization flag.
16030 2018-01-30 Jeff Law <law@redhat.com>
16033 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16034 INT_REGISTERS_SAVED. Check it prior to calling
16035 get_scratch_register_on_entry.
16036 (ix86_adjust_stack_and_probe): Similarly.
16037 (ix86_emit_probe_stack_range): Similarly.
16038 (ix86_expand_prologue): Corresponding changes.
16040 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16043 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16044 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16046 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16049 * lra-constraints.c (curr_insn_transform): Process AND in the
16052 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16054 PR rtl-optimization/83986
16055 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16056 dependence against last_pending_memory_flush in addition to
16057 pending_jump_insns.
16059 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16061 PR tree-optimization/81611
16062 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16065 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16068 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16071 2018-01-30 Richard Biener <rguenther@suse.de>
16072 Jakub Jelinek <jakub@redhat.com>
16074 PR tree-optimization/84111
16075 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16076 inner loops added during recursion, as they don't have up-to-date
16079 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16082 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16083 (can_inline_edge_by_limits_p): ... here.
16084 (can_early_inline_edge_p, check_callers,
16085 update_caller_keys, update_callee_keys, recursive_inlining,
16086 add_new_edges_to_heap, speculation_useful_p,
16087 inline_small_functions,
16088 inline_small_functions, flatten_function,
16089 inline_to_all_callers_1): Update.
16091 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16093 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16096 2018-01-30 Richard Biener <rguenther@suse.de>
16098 PR tree-optimization/83008
16099 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16100 invariant and constant vector uses in stmts when they need
16101 more than one stmt.
16103 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16106 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16107 * configure: Regenerate.
16109 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16111 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16113 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16114 Use gen_rtx_REG rather than gen_lowpart.
16116 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16118 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16119 rather than 0 when creating partial subregs.
16121 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16123 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16126 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16129 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16130 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16131 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16132 flags. This restores the settings used before the 2017-07-24.
16133 Turning off pre increment/decrement/modify allows IVOPTS to
16134 optimize DF/SF loops where the index is an int.
16136 2018-01-29 Richard Biener <rguenther@suse.de>
16137 Kelvin Nilsen <kelvin@gcc.gnu.org>
16140 * tree-vect-stmts.c (vectorizable_call): Don't call
16141 targetm.vectorize_builtin_md_vectorized_function if callee is
16144 2018-01-22 Carl Love <cel@us.ibm.com>
16146 * doc/extend.tex: Fix typo in second arg in
16147 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16149 2018-01-29 Richard Biener <rguenther@suse.de>
16151 PR tree-optimization/84086
16152 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16153 (flush_ssaname_freelist): When SSA names were released reset
16154 the SCEV hash table.
16156 2018-01-29 Richard Biener <rguenther@suse.de>
16158 PR tree-optimization/84057
16159 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16160 removed paths when removing edges.
16162 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16164 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16165 -mfunction-return=@var{choice}.
16167 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16169 PR diagnostic/84034
16170 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16171 Handle CR like TAB.
16172 (layout::print_source_line): Likewise.
16173 (test_get_line_width_without_trailing_whitespace): Add test cases.
16175 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16177 PR middle-end/84040
16178 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16181 2018-01-26 Jim Wilson <jimw@sifive.com>
16183 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16185 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16188 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16190 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16191 and CMP + SUB-immediate -> SUBS.
16193 2018-01-26 Martin Sebor <msebor@redhat.com>
16195 PR tree-optimization/83896
16196 * tree-ssa-strlen.c (get_string_len): Rename...
16197 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16198 Avoid assuming length is constant.
16199 (handle_char_store): Use HOST_WIDE_INT for string length.
16201 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16204 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16205 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16207 2018-01-26 Richard Biener <rguenther@suse.de>
16209 PR rtl-optimization/84003
16210 * dse.c (record_store): Only record redundant stores when
16211 the earlier store aliases at least all accesses the later one does.
16213 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16215 PR rtl-optimization/83985
16216 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16217 REG_CFA_RESTORE insns.
16218 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16219 REG_CFA_RESTORE insns here.
16222 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16223 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16225 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16227 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16228 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16229 (arc_init): Likewise.
16230 (arc_override_options): Likewise.
16231 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16233 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16235 * config/arc/arc.h (TARGET_DBNZ): Define.
16236 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16237 properly set the tune attribute.
16238 (dbnz): Use TARGET_DBNZ guard.
16239 * config/arc/arc.opt (mtune): Add core3 option.
16241 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16243 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16244 recognize new pic like addresses.
16245 (arc_delegitimize_address): Clean up.
16247 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16249 * config/arc/arc-arches.def: Option mrf16 valid for all
16251 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16252 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16253 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16254 * config/arc/arc-tables.opt: Regenerate.
16255 * config/arc/arc.c (arc_conditional_register_usage): Handle
16256 reduced register file case.
16257 (arc_file_start): Set must have build attributes.
16258 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16259 mrf16 option value.
16260 * config/arc/arc.opt (mrf16): Add new option.
16261 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16262 * config/arc/genmultilib.awk: Handle new mrf16 option.
16263 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16264 * config/arc/t-multilib: Regenerate.
16265 * doc/invoke.texi (ARC Options): Document mrf16 option.
16267 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16269 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16270 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16271 (arc_attribute_table): Add 'secure_call' attribute.
16272 (arc_print_operand): Print secure call operand.
16273 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16275 (arc_is_secure_call_p): New function. * config/arc/arc.md
16276 (call_i): Add support for sjli instruction.
16277 (call_value_i): Likewise.
16278 * config/arc/constraints.md (Csc): New constraint.
16280 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16281 John Eric Martin <John.Martin@emmicro-us.com>
16283 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16284 * config/arc/arc.c (_arc_jli_section): New struct.
16285 (arc_jli_section): New type.
16286 (rc_jli_sections): New static variable.
16287 (arc_handle_jli_attribute): New function.
16288 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16289 (arc_file_end): New function.
16290 (TARGET_ASM_FILE_END): Define.
16291 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16292 (arc_add_jli_section): New function.
16293 (jli_call_scan): Likewise.
16294 (arc_reorg): Call jli_call_scan.
16295 (arc_output_addsi): Remove 'S' from printing asm operand.
16296 (arc_is_jli_call_p): New function.
16297 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16299 (movhi_insn): Likewise.
16300 (movsi_insn): Likewise.
16301 (movsi_set_cc_insn): Likewise.
16302 (loadqi_update): Likewise.
16303 (load_zeroextendqisi_update): Likewise.
16304 (load_signextendqisi_update): Likewise.
16305 (loadhi_update): Likewise.
16306 (load_zeroextendhisi_update): Likewise.
16307 (load_signextendhisi_update): Likewise.
16308 (loadsi_update): Likewise.
16309 (loadsf_update): Likewise.
16310 (movsicc_insn): Likewise.
16311 (bset_insn): Likewise.
16312 (bxor_insn): Likewise.
16313 (bclr_insn): Likewise.
16314 (bmsk_insn): Likewise.
16315 (bicsi3_insn): Likewise.
16316 (cmpsi_cc_c_insn): Likewise.
16317 (movsi_ne): Likewise.
16318 (movsi_cond_exec): Likewise.
16319 (clrsbsi2): Likewise.
16320 (norm_f): Likewise.
16330 (call_i): Remove 'S' asm letter, add jli instruction.
16331 (call_value_i): Likewise.
16332 * config/arc/arc.op (mjli-always): New option.
16333 * config/arc/constraints.md (Cji): New constraint.
16334 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16336 (subsf3_fpx): Likewise.
16337 (mulsf3_fpx): Likewise.
16338 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16340 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16341 function attrbutes.
16342 * doc/invoke.texi (ARC): Document mjli-always option.
16344 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16346 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16347 avoid addition with 0 and use incw and decw where possible.
16349 2018-01-26 Richard Biener <rguenther@suse.de>
16351 PR tree-optimization/81082
16352 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16353 association if it requires casting to unsigned.
16354 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16355 from fold_plusminus_mult_expr to catch important cases late when
16356 range info is available.
16358 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16360 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16361 * configure.ac (hidden_linkonce): New test.
16362 * configure: Regenerate.
16363 * config.in: Regenerate.
16365 2018-01-26 Julia Koval <julia.koval@intel.com>
16367 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16368 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16369 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16370 _mm_mask_bitshuffle_epi64_mask): Fix type.
16371 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16372 USI_FTYPE_V4DI_V4DI_USI): Remove.
16373 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16374 __builtin_ia32_vpshufbitqmb256_mask,
16375 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16376 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16377 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16379 2018-01-26 Alan Modra <amodra@gmail.com>
16382 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16383 UNSPEC_VBPERMQ. Sort other unspecs.
16385 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16387 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16389 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16391 PR middle-end/83055
16392 * predict.c (drop_profile): Do not push/pop cfun; update also
16394 (handle_missing_profiles): Fix logic looking for zero profiles.
16396 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16398 PR middle-end/83977
16399 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16400 on functions with #pragma omp declare simd or functions with simd
16402 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16403 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16404 Remove trailing \n from warning_at calls.
16406 2018-01-25 Tom de Vries <tom@codesourcery.com>
16409 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16410 for neutered workers.
16412 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16415 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16416 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16418 2018-01-24 Jeff Law <law@redhat.com>
16421 * i386.c (get_probe_interval): Move to earlier point.
16422 (ix86_compute_frame_layout): If -fstack-clash-protection and
16423 the frame is larger than the probe interval, then use pushes
16424 to save registers rather than reg->mem moves.
16425 (ix86_expand_prologue): Remove conditional for int_registers_saved
16428 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16431 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16432 min/max for never referenced object.
16434 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16436 PR middle-end/83977
16437 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16439 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16440 attributes from DECL_ATTRIBUTES (decl) without affecting
16441 DECL_ATTRIBUTES (current_function_decl).
16442 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16443 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16445 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16447 PR tree-optimization/83979
16448 * fold-const.c (fold_comparison): Use constant_boolean_node
16449 instead of boolean_{true,false}_node.
16451 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16453 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16456 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16458 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16459 Simplify the clause that sets the length attribute.
16460 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16461 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16462 clause that sets the length attribute.
16463 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16465 2018-01-24 Tom de Vries <tom@codesourcery.com>
16468 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16469 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16470 Add strict parameter.
16471 (prevent_branch_around_nothing): Insert dummy insn between branch to
16472 label and label with no ptx insn inbetween.
16473 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16475 2018-01-24 Tom de Vries <tom@codesourcery.com>
16478 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16479 for neutered threads in warp.
16480 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16482 2018-01-24 Richard Biener <rguenther@suse.de>
16484 PR tree-optimization/83176
16485 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16488 2018-01-24 Richard Biener <rguenther@suse.de>
16490 PR tree-optimization/82819
16491 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16492 code generating pluses that are no-ops in the target precision.
16494 2018-01-24 Richard Biener <rguenther@suse.de>
16496 PR middle-end/84000
16497 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16499 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16501 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16502 to merge probabilities.
16503 * predict.c (probably_never_executed): Also mark as cold functions
16504 with global 0 profile and guessed local profile.
16505 * profile-count.c (profile_probability::combine_with_count): New
16507 * profile-count.h (profile_probability::operator*,
16508 profile_probability::operator*=, profile_probability::operator/,
16509 profile_probability::operator/=): Reduce precision to adjusted
16510 and set value to guessed on contradictory divisions.
16511 (profile_probability::combine_with_freq): Remove.
16512 (profile_probability::combine_wiht_count): Declare.
16513 (profile_count::force_nonzero):: Set to adjusted.
16514 (profile_count::probability_in):: Set quality to adjusted.
16515 * tree-ssa-tail-merge.c (replace_block_by): Use
16516 combine_with_count.
16518 2018-01-23 Andrew Waterman <andrew@sifive.com>
16519 Jim Wilson <jimw@sifive.com>
16521 * config/riscv/riscv.c (riscv_stack_boundary): New.
16522 (riscv_option_override): Set riscv_stack_boundary. Handle
16523 riscv_preferred_stack_boundary_arg.
16524 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16525 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16526 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16527 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16528 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16529 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16531 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16534 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16535 of struct ix86_frame.
16536 (ix86_expand_epilogue): Likewise. Add a local variable for
16537 the reg_save_offset field in struct ix86_frame.
16539 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16541 PR tree-optimization/82604
16542 * tree-loop-distribution.c (enum partition_kind): New enum item
16543 PKIND_PARTIAL_MEMSET.
16544 (partition_builtin_p): Support above new enum item.
16545 (generate_code_for_partition): Ditto.
16546 (compute_access_range): Differentiate cases that equality can be
16547 proven at all loops, the innermost loops or no loops.
16548 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16549 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16550 (finalize_partitions, distribute_loop): Don't fuse partition of
16551 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16552 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16553 parloop is enabled.
16555 2018-01-23 Martin Liska <mliska@suse.cz>
16557 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16558 order to ignore the predictor.
16559 (PRED_POLYMORPHIC_CALL): Likewise.
16560 (PRED_RECURSIVE_CALL): Likewise.
16562 2018-01-23 Martin Liska <mliska@suse.cz>
16564 * tree-profile.c (tree_profiling): Print function header to
16565 aware reader which function we are working on.
16566 * value-prof.c (gimple_find_values_to_profile): Do not print
16567 not interesting value histograms.
16569 2018-01-23 Martin Liska <mliska@suse.cz>
16571 * profile-count.h (enum profile_quality): Add
16572 profile_uninitialized as the first value. Do not number values
16573 as they are zero based.
16574 (profile_count::verify): Update sanity check.
16575 (profile_probability::verify): Likewise.
16577 2018-01-23 Nathan Sidwell <nathan@acm.org>
16579 * doc/invoke.texi (ffor-scope): Deprecate.
16581 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16583 PR tree-optimization/83510
16584 * domwalk.c (set_all_edges_as_executable): New function.
16585 (dom_walker::dom_walker): Convert bool param
16586 "skip_unreachable_blocks" to enum reachability. Move setup of
16587 edge flags to set_all_edges_as_executable and only do it when
16588 reachability is REACHABLE_BLOCKS.
16589 * domwalk.h (enum dom_walker::reachability): New enum.
16590 (dom_walker::dom_walker): Convert bool param
16591 "skip_unreachable_blocks" to enum reachability.
16592 (set_all_edges_as_executable): New decl.
16593 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16594 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16596 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16597 but converting true to REACHABLE_BLOCKS.
16598 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16600 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16601 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16602 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16604 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16605 if check_all_array_refs will be called.
16607 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16609 * tree.c (selftest::test_location_wrappers): Add more test
16612 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16614 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16615 (selftest::test_bit_in_range): Likewise.
16617 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16620 * doc/sourcebuild.texi (vect_float): Say that the selector
16621 only describes the situation when -funsafe-math-optimizations is on.
16622 (vect_float_strict): Document.
16624 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16626 PR tree-optimization/83965
16627 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16628 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16629 instead of checking only for a reduction.
16630 (vect_recog_widen_sum_pattern): Likewise.
16632 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16634 * predict.c (probably_never_executed): Only use precise profile info.
16635 (compute_function_frequency): Skip after inlining hack since we now
16636 have quality checking.
16638 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16640 * profile-count.h (profile_probability::very_unlikely,
16641 profile_probability::unlikely, profile_probability::even): Set
16642 precision to guessed.
16644 2018-01-23 Richard Biener <rguenther@suse.de>
16646 PR tree-optimization/83963
16647 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16648 Properly terminate dominator walk when crossing the exit edge not
16649 when visiting its source block.
16651 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16654 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16655 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16657 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16659 PR tree-optimization/83957
16660 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16661 semicolon after for body surrounded by braces.
16663 PR tree-optimization/83081
16664 * profile-count.h (profile_probability::split): New method.
16665 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16666 Use profile_probability::split.
16667 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16668 when splitting a single conditional jump into 2.
16670 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16672 PR tree-optimization/69452
16673 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16676 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16678 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16679 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16680 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16682 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16684 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16686 * config/rl78/rl78.md (movdi): New define_expand.
16687 * config/rl78/rl78.c (rl78_split_movdi): New function.
16689 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16692 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16694 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16695 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16696 128-bit to produce an UNSPEC move to get the double word with the
16697 signbit and then a shift directly to do signbit.
16698 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16699 implementation with a new version that just does either a direct
16700 move or a regular move. Move memory interface to separate insns.
16701 Move insns so they are next to the expander.
16702 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16703 with signbit move. Split big and little endian case.
16704 (signbit<mode>2_dm_mem_le): Likewise.
16705 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16706 (signbit<mode>2_dm2): Likewise.
16708 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16710 * config/rl78/rl78.md (anddi3): New define_expand.
16712 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16714 * config/rl78/rl78.md (umindi3): New define_expand.
16716 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16718 * config/rl78/rl78.md (smindi3): New define_expand.
16720 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16722 * config/rl78/rl78.md (smaxdi3): New define_expand.
16724 2018-01-22 Carl Love <cel@us.ibm.com>
16726 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16727 LVX_V1TI): Add macro expansion.
16728 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16729 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16730 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16731 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16732 Change check to determine if the instruction is a byte reversing
16733 entry. Fix typo in comment.
16734 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16735 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16736 Add def_builtin calls for new builtins.
16737 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16738 Add define_insn expansion.
16740 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16742 * config/rl78/rl78.md (umaxdi3): New define_expand.
16744 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16746 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16747 for non-QImode registers.
16749 2018-01-22 Richard Biener <rguenther@suse.de>
16751 PR tree-optimization/83963
16752 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16753 including the loop exit block.
16754 (scop_detection::merge_sese): Likewise.
16755 (scop_detection::add_scop): Do it here instead.
16757 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16759 * doc/sourcebuild.texi (arm_softfloat): Document.
16761 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16764 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16765 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16766 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16768 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16769 David Edelsohn <dje.gcc@gmail.com>
16772 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16773 Change "crset eq" to "crset 2".
16774 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16775 (*call_indirect_aix<mode>_nospec): Likewise.
16776 (*call_value_indirect_aix<mode>_nospec): Likewise.
16777 (*call_indirect_elfv2<mode>_nospec): Likewise.
16778 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16779 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16780 change assembly output from . to $.
16781 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16782 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16783 (*tablejump<mode>_internal1_nospec): Likewise.
16785 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16788 * config/sh/sh_optimize_sett_clrt.cc:
16789 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16791 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16793 PR tree-optimization/83940
16794 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16795 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16796 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16797 use it to pass back the definition type.
16798 (vect_check_store_rhs): Likewise rhs_dt_out.
16799 (vect_build_gather_load_calls): Add a mask_dt argument and use
16800 it instead of a call to vect_is_simple_use.
16801 (vectorizable_store): Update calls to vect_check_load_store_mask
16802 and vect_check_store_rhs. Use the dt returned by the latter instead
16803 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16804 instead of calls to vect_is_simple_use. Pass the scalar rather
16805 than the vector operand to vect_is_simple_use when handling
16806 second and subsequent copies of an rhs value.
16807 (vectorizable_load): Update calls to vect_check_load_store_mask
16808 and vect_build_gather_load_calls. Use the cached mask_dt and
16809 gs_info.offset_dt instead of calls to vect_is_simple_use.
16811 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16813 PR middle-end/83945
16814 * tree-emutls.c: Include gimplify.h.
16815 (lower_emutls_2): New function.
16816 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16817 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16818 it before further processing.
16821 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16822 UINTVAL (trueop1) instead of INTVAL (op1).
16824 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16828 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16829 INCOMING_FRAME_SP_OFFSET if not defined.
16830 (scan_trace): Add ENTRY argument. If true and
16831 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16832 emit a note to adjust the CFA offset.
16833 (create_cfi_notes): Adjust scan_trace callers.
16834 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16835 INCOMING_FRAME_SP_OFFSET in the CIE.
16836 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16837 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16839 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16840 * doc/tm.texi: Regenerated.
16842 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16844 PR rtl-optimization/83147
16845 * lra-constraints.c (remove_inheritance_pseudos): Use
16846 lra_substitute_pseudo_within_insn.
16848 2018-01-19 Tom de Vries <tom@codesourcery.com>
16849 Cesar Philippidis <cesar@codesourcery.com>
16852 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16854 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16857 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16858 spaces for function labels.
16860 2018-01-19 Martin Liska <mliska@suse.cz>
16862 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16863 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16864 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16865 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16866 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16867 (PRED_CONST_RETURN): Change from 69 to 65.
16868 (PRED_NULL_RETURN): Change from 91 to 71.
16869 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16870 (PRED_LOOP_GUARD): Change from 66 to 73.
16872 2018-01-19 Martin Liska <mliska@suse.cz>
16874 * predict.c (predict_insn_def): Add new assert.
16875 (struct branch_predictor): Change type to signed integer.
16876 (test_prediction_value_range): Amend test to cover
16877 PROB_UNINITIALIZED.
16878 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16879 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16880 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16881 (PRED_LOOP_IV_COMPARE): Likewise.
16882 * predict.h (PROB_UNINITIALIZED): Define new constant.
16884 2018-01-19 Martin Liska <mliska@suse.cz>
16886 * predict.c (dump_prediction): Add new format for
16887 analyze_brprob.py script which is enabled with -details
16889 * profile-count.h (precise_p): New function.
16891 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16893 PR tree-optimization/83922
16894 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16895 there are no statements that need masking.
16896 (vect_active_double_reduction_p): New function.
16897 (vect_analyze_loop_operations): Use it when handling phis that
16898 are not in the loop header.
16900 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16902 PR tree-optimization/83914
16903 * tree-vect-loop.c (vectorizable_induction): Don't convert
16904 init_expr or apply the peeling adjustment for inductions
16905 that are nested within the vectorized loop.
16907 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16909 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16912 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16916 * function.h (gimplify_parameters): Add gimple_seq * argument.
16917 * function.c: Include gimple.h and options.h.
16918 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16919 for the added local temporaries if needed.
16920 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16921 if there are any parameter cleanups, wrap whole body into a
16922 try/finally with the cleanups.
16924 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16927 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16928 Use GET_MODE_CLASS for scalar floating point.
16930 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16934 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16935 Fix call of call_cgraph_insertion_hooks.
16937 2018-01-18 Martin Sebor <msebor@redhat.com>
16939 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16941 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16944 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16947 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16950 * common.opt: (-ffile-prefix-map): New option.
16951 * opts.c (common_handle_option): Defer it.
16952 * opts-global.c (handle_common_deferred_options): Handle it.
16953 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16954 * file-prefix-map.h: New file.
16955 (remap_debug_filename, add_debug_prefix_map): ...here.
16956 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16957 * final.c (debug_prefix_map, add_debug_prefix_map
16958 remap_debug_filename): Move to...
16959 * file-prefix-map.c: New file.
16960 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16961 generalize, get rid of alloca(), use strrchr() instead of strchr().
16962 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16963 Implement in terms of add_prefix_map().
16964 (remap_macro_filename, remap_debug_filename): Implement in term of
16966 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16967 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16968 * dbxout.c: Include file-prefix-map.h.
16969 * varasm.c: Likewise.
16970 * vmsdbgout.c: Likewise.
16971 * xcoffout.c: Likewise.
16972 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16973 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16974 * doc/invoke.texi (-ffile-prefix-map): Document.
16975 (-fdebug-prefix-map): Update description.
16977 2018-01-18 Martin Liska <mliska@suse.cz>
16979 * config/i386/i386.c (indirect_thunk_name): Document that also
16981 (output_indirect_thunk): Document why both instructions
16982 (pause and lfence) are generated.
16984 2018-01-18 Richard Biener <rguenther@suse.de>
16986 PR tree-optimization/83887
16987 * graphite-scop-detection.c
16988 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16989 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16990 (scop_detection::merge_sese): Re-implement with a flood-fill
16991 algorithm that properly finds a SESE region if it exists.
16993 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16996 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16997 pointer_diff optimizations use view_convert instead of convert.
16999 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17001 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17002 Generate different code for -mno-speculate-indirect-jumps.
17003 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17004 (*call_indirect_aix<mode>): Disable for
17005 -mno-speculate-indirect-jumps.
17006 (*call_indirect_aix<mode>_nospec): New define_insn.
17007 (*call_value_indirect_aix<mode>): Disable for
17008 -mno-speculate-indirect-jumps.
17009 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17010 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17011 -mno-speculate-indirect-jumps.
17012 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17014 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17016 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17017 long double type, set the flags for noting the default long double
17018 type, even if we don't pass or return a long double type.
17020 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17023 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17026 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17028 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17029 support for merge[hl].
17030 (fold_mergehl_helper): New helper function.
17031 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17032 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17033 (altivec_vmrglw_direct): Add xxmrglw insn.
17035 2018-01-17 Andrew Waterman <andrew@sifive.com>
17037 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17038 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17040 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17043 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17044 call the lto_location_cache before reading the
17045 DECL_SOURCE_LOCATION of the types.
17047 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17048 Richard Sandiford <richard.sandiford@linaro.org>
17050 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17051 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17052 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17053 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17054 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17056 * config/aarch64/constraints.md (aarch64_movti_operand):
17058 * config/aarch64/predicates.md (Uti): Add new constraint.
17060 2018-01-17 Carl Love <cel@us.ibm.com>
17062 * config/rs6000/vsx.md (define_expand xl_len_r,
17063 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17064 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17066 (define_expand, define_insn): Move the shift left from the
17067 define_insn to the define_expand for lxvl and stxvl instructions.
17068 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17069 and XL_LEN_R definitions to PURE.
17071 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17073 * config/i386/i386.c (indirect_thunk_name): Declare regno
17074 as unsigned int. Compare regno with INVALID_REGNUM.
17075 (output_indirect_thunk): Ditto.
17076 (output_indirect_thunk_function): Ditto.
17077 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17078 in the call to output_indirect_thunk_function.
17080 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17082 PR middle-end/83884
17083 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17084 rather than the size of inner_type to determine the stack slot size
17085 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17087 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17090 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17093 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17095 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17096 endian Linux systems to optionally enable multilibs for selecting
17097 the long double type if the user configured an explicit type.
17098 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17099 have no long double multilibs if not defined.
17100 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17101 warn if the user used -mabi={ieee,ibm}longdouble and we built
17102 multilibs for long double.
17103 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17104 appropriate multilib option.
17105 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17107 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17108 for building long double multilibs.
17109 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17111 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17113 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17116 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17118 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17121 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17124 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17127 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17129 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17130 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17132 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17134 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17135 different rtl trees depending on TARGET_64BIT.
17136 (rs6000_gen_lvx): Likewise.
17138 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17140 * config/visium/visium.md (nop): Tweak comment.
17141 (hazard_nop): Likewise.
17143 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17145 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17146 -mspeculate-indirect-jumps.
17147 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17148 for -mno-speculate-indirect-jumps.
17149 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17150 (*call_value_indirect_elfv2<mode>): Disable for
17151 -mno-speculate-indirect-jumps.
17152 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17153 (indirect_jump): Emit different RTL for
17154 -mno-speculate-indirect-jumps.
17155 (*indirect_jump<mode>): Disable for
17156 -mno-speculate-indirect-jumps.
17157 (*indirect_jump<mode>_nospec): New define_insn.
17158 (tablejump): Emit different RTL for
17159 -mno-speculate-indirect-jumps.
17160 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17161 (tablejumpsi_nospec): New define_expand.
17162 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17163 (tablejumpdi_nospec): New define_expand.
17164 (*tablejump<mode>_internal1): Disable for
17165 -mno-speculate-indirect-jumps.
17166 (*tablejump<mode>_internal1_nospec): New define_insn.
17167 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17170 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17172 * caller-save.c (insert_save): Drop unnecessary parameter. All
17175 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17176 Richard Biener <rguenth@suse.de>
17179 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17180 return early, inline manually is_gimple_sizepos. Make sure if we
17181 call gimplify_expr we don't end up with a gimple constant.
17182 * tree.c (variably_modified_type_p): Don't return true for
17183 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17184 * gimplify.h (is_gimple_sizepos): Remove.
17186 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17188 PR tree-optimization/83857
17189 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17190 vectorizable_live_operation for pure SLP statements.
17191 (vectorizable_live_operation): Handle PHIs.
17193 2018-01-16 Richard Biener <rguenther@suse.de>
17195 PR tree-optimization/83867
17196 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17197 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17199 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17202 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17203 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17204 If off is not INTEGER_CST, issue a may not be aligned warning
17205 rather than isn't aligned. Use isn%'t rather than isn't.
17206 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17208 <case MULT_EXPR>: Improve the case when bottom and one of the
17209 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17210 operand, in that case check if the other operand is multiple of
17211 bottom divided by the INTEGER_CST operand.
17213 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17216 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17217 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17218 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17219 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17220 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17221 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17222 (pa_function_arg_size): New function.
17224 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17226 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17227 in a separate statement.
17229 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17231 PR tree-optimization/83847
17232 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17233 group gathers and scatters.
17235 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17237 PR rtl-optimization/86620
17238 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17240 PR rtl-optimization/83213
17241 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17242 to last if both are JUMP_INSNs.
17244 PR tree-optimization/83843
17245 * gimple-ssa-store-merging.c
17246 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17247 store_immediate_info for bswap/nop orig_stores.
17249 2018-01-15 Andrew Waterman <andrew@sifive.com>
17251 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17253 <UDIV>: Increase cost if !TARGET_DIV.
17255 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17257 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17258 (define_attr "cr_logical_3op"): New.
17259 (cceq_ior_compare): Adjust.
17260 (cceq_ior_compare_complement): Adjust.
17261 (*cceq_rev_compare): Adjust.
17262 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17263 (is_cracked_insn): Adjust.
17264 (insn_must_be_first_in_group): Adjust.
17265 * config/rs6000/40x.md: Adjust.
17266 * config/rs6000/440.md: Adjust.
17267 * config/rs6000/476.md: Adjust.
17268 * config/rs6000/601.md: Adjust.
17269 * config/rs6000/603.md: Adjust.
17270 * config/rs6000/6xx.md: Adjust.
17271 * config/rs6000/7450.md: Adjust.
17272 * config/rs6000/7xx.md: Adjust.
17273 * config/rs6000/8540.md: Adjust.
17274 * config/rs6000/cell.md: Adjust.
17275 * config/rs6000/e300c2c3.md: Adjust.
17276 * config/rs6000/e500mc.md: Adjust.
17277 * config/rs6000/e500mc64.md: Adjust.
17278 * config/rs6000/e5500.md: Adjust.
17279 * config/rs6000/e6500.md: Adjust.
17280 * config/rs6000/mpc.md: Adjust.
17281 * config/rs6000/power4.md: Adjust.
17282 * config/rs6000/power5.md: Adjust.
17283 * config/rs6000/power6.md: Adjust.
17284 * config/rs6000/power7.md: Adjust.
17285 * config/rs6000/power8.md: Adjust.
17286 * config/rs6000/power9.md: Adjust.
17287 * config/rs6000/rs64.md: Adjust.
17288 * config/rs6000/titan.md: Adjust.
17290 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17292 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17293 ix86_indirect_branch_register logic.
17295 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17297 * config/i386/constraints.md (Bs): Update
17298 ix86_indirect_branch_register check. Don't check
17299 ix86_indirect_branch_register with GOT_memory_operand.
17301 * config/i386/predicates.md (GOT_memory_operand): Don't check
17302 ix86_indirect_branch_register here.
17303 (GOT32_symbol_operand): Likewise.
17305 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17307 * config/i386/predicates.md (constant_call_address_operand):
17308 Rewrite ix86_indirect_branch_register logic.
17309 (sibcall_insn_operand): Likewise.
17311 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17313 * config/i386/constraints.md (Bs): Replace
17314 ix86_indirect_branch_thunk_register with
17315 ix86_indirect_branch_register.
17317 * config/i386/i386.md (indirect_jump): Likewise.
17318 (tablejump): Likewise.
17319 (*sibcall_memory): Likewise.
17320 (*sibcall_value_memory): Likewise.
17321 Peepholes of indirect call and jump via memory: Likewise.
17322 * config/i386/i386.opt: Likewise.
17323 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17324 (GOT_memory_operand): Likewise.
17325 (call_insn_operand): Likewise.
17326 (sibcall_insn_operand): Likewise.
17327 (GOT32_symbol_operand): Likewise.
17329 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17331 PR middle-end/83837
17332 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17333 type rather than type addr's type points to.
17334 (expand_omp_atomic_mutex): Likewise.
17335 (expand_omp_atomic): Likewise.
17337 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17340 * config/i386/i386.c (output_indirect_thunk_function): Use
17341 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17342 for __x86_return_thunk.
17344 2018-01-15 Richard Biener <rguenther@suse.de>
17346 PR middle-end/83850
17347 * expmed.c (extract_bit_field_1): Fix typo.
17349 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17352 * config/arm/iterators.md (VF): New mode iterator.
17353 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17354 Remove integer-related logic from pattern.
17355 (neon_vabd<mode>_3): Likewise.
17357 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17359 PR middle-end/82694
17360 * common.opt (fstrict-overflow): No longer an alias.
17361 (fwrapv-pointer): New option.
17362 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17363 also for pointer types based on flag_wrapv_pointer.
17364 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17365 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17366 opts->x_flag_wrapv got set.
17367 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17368 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17369 POINTER_TYPE_OVERFLOW_UNDEFINED.
17370 * match.pd: Likewise in address comparison pattern.
17371 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17373 2018-01-15 Richard Biener <rguenther@suse.de>
17376 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17377 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17378 Reset type names to their identifier if their TYPE_DECL doesn't
17379 have linkage (and thus is used for ODR and devirt).
17380 (save_debug_info_for_decl): Remove.
17381 (save_debug_info_for_type): Likewise.
17382 (add_tree_to_fld_list): Adjust.
17383 * tree-pretty-print.c (dump_generic_node): Make dumping of
17384 type names more robust.
17386 2018-01-15 Richard Biener <rguenther@suse.de>
17388 * BASE-VER: Bump to 8.0.1.
17390 2018-01-14 Martin Sebor <msebor@redhat.com>
17393 * builtins.c (check_access): Avoid warning when the no-warning bit
17396 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17398 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17399 * ira-color (allocno_hard_regs_compare): Likewise.
17401 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17404 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17405 Use .pushsection/.popsection.
17407 2018-01-14 Martin Sebor <msebor@redhat.com>
17410 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17412 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17414 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17415 entry from extra_headers.
17416 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17417 extra_headers, make the list bitwise identical to the i?86-*-* one.
17419 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17421 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17422 -mcmodel=large with -mindirect-branch=thunk,
17423 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17424 -mfunction-return=thunk-extern.
17425 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17426 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17427 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17429 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17431 * config/i386/i386.c (print_reg): Print the name of the full
17432 integer register without '%'.
17433 (ix86_print_operand): Handle 'V'.
17434 * doc/extend.texi: Document 'V' modifier.
17436 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17438 * config/i386/constraints.md (Bs): Disallow memory operand for
17439 -mindirect-branch-register.
17441 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17442 (GOT_memory_operand): Likewise.
17443 (call_insn_operand): Likewise.
17444 (sibcall_insn_operand): Likewise.
17445 (GOT32_symbol_operand): Likewise.
17446 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17447 for -mindirect-branch-register.
17448 (tablejump): Likewise.
17449 (*sibcall_memory): Likewise.
17450 (*sibcall_value_memory): Likewise.
17451 Disallow peepholes of indirect call and jump via memory for
17452 -mindirect-branch-register.
17453 (*call_pop): Replace m with Bw.
17454 (*call_value_pop): Likewise.
17455 (*sibcall_pop_memory): Replace m with Bs.
17456 * config/i386/i386.opt (mindirect-branch-register): New option.
17457 * doc/invoke.texi: Document -mindirect-branch-register option.
17459 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17461 * config/i386/i386-protos.h (ix86_output_function_return): New.
17462 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17463 set function_return_type.
17464 (indirect_thunk_name): Add ret_p to indicate thunk for function
17466 (output_indirect_thunk_function): Pass false to
17467 indirect_thunk_name.
17468 (ix86_output_indirect_branch_via_reg): Likewise.
17469 (ix86_output_indirect_branch_via_push): Likewise.
17470 (output_indirect_thunk_function): Create alias for function
17471 return thunk if regno < 0.
17472 (ix86_output_function_return): New function.
17473 (ix86_handle_fndecl_attribute): Handle function_return.
17474 (ix86_attribute_table): Add function_return.
17475 * config/i386/i386.h (machine_function): Add
17476 function_return_type.
17477 * config/i386/i386.md (simple_return_internal): Use
17478 ix86_output_function_return.
17479 (simple_return_internal_long): Likewise.
17480 * config/i386/i386.opt (mfunction-return=): New option.
17481 (indirect_branch): Mention -mfunction-return=.
17482 * doc/extend.texi: Document function_return function attribute.
17483 * doc/invoke.texi: Document -mfunction-return= option.
17485 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17487 * config/i386/i386-opts.h (indirect_branch): New.
17488 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17489 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17490 with local indirect jump when converting indirect call and jump.
17491 (ix86_set_indirect_branch_type): New.
17492 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17493 (indirectlabelno): New.
17494 (indirect_thunk_needed): Likewise.
17495 (indirect_thunk_bnd_needed): Likewise.
17496 (indirect_thunks_used): Likewise.
17497 (indirect_thunks_bnd_used): Likewise.
17498 (INDIRECT_LABEL): Likewise.
17499 (indirect_thunk_name): Likewise.
17500 (output_indirect_thunk): Likewise.
17501 (output_indirect_thunk_function): Likewise.
17502 (ix86_output_indirect_branch_via_reg): Likewise.
17503 (ix86_output_indirect_branch_via_push): Likewise.
17504 (ix86_output_indirect_branch): Likewise.
17505 (ix86_output_indirect_jmp): Likewise.
17506 (ix86_code_end): Call output_indirect_thunk_function if needed.
17507 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17509 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17510 (ix86_attribute_table): Add indirect_branch.
17511 * config/i386/i386.h (machine_function): Add indirect_branch_type
17512 and has_local_indirect_jump.
17513 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17515 (tablejump): Likewise.
17516 (*indirect_jump): Use ix86_output_indirect_jmp.
17517 (*tablejump_1): Likewise.
17518 (simple_return_indirect_internal): Likewise.
17519 * config/i386/i386.opt (mindirect-branch=): New option.
17520 (indirect_branch): New.
17523 (thunk-inline): Likewise.
17524 (thunk-extern): Likewise.
17525 * doc/extend.texi: Document indirect_branch function attribute.
17526 * doc/invoke.texi: Document -mindirect-branch= option.
17528 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17531 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17533 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17535 * ipa-inline.c (want_inline_small_function_p): Return false if
17536 inlining has already failed with CIF_FINAL_ERROR.
17537 (update_caller_keys): Call want_inline_small_function_p before
17539 (update_callee_keys): Likewise.
17541 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17543 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17545 (rs6000_quadword_masked_address_p): Likewise.
17546 (quad_aligned_load_p): Likewise.
17547 (quad_aligned_store_p): Likewise.
17548 (const_load_sequence_p): Add comment to describe the outer-most loop.
17549 (mimic_memory_attributes_and_flags): New function.
17550 (rs6000_gen_stvx): Likewise.
17551 (replace_swapped_aligned_store): Likewise.
17552 (rs6000_gen_lvx): Likewise.
17553 (replace_swapped_aligned_load): Likewise.
17554 (replace_swapped_load_constant): Capitalize argument name in
17555 comment describing this function.
17556 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17557 and stores that access quad-word aligned addresses and replace
17558 with stvx or lvx instructions when appropriate.
17559 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17560 New function prototype.
17561 (rs6000_quadword_masked_address_p): Likewise.
17562 (rs6000_gen_lvx): Likewise.
17563 (rs6000_gen_stvx): Likewise.
17564 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17565 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17566 when memory address is aligned.
17567 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17568 this split to select lvx instruction when memory address is aligned.
17569 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17570 instruction when memory address is aligned.
17571 (*vsx_le_perm_load_v16qi): Likewise.
17572 (four unnamed splitters): Modify to select the stvx instruction
17573 when memory is aligned.
17575 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17577 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17578 which appears in the queue multiple times.
17580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17581 Alan Hayward <alan.hayward@arm.com>
17582 David Sherwood <david.sherwood@arm.com>
17584 * tree-vectorizer.h (vec_lower_bound): New structure.
17585 (_loop_vec_info): Add check_nonzero and lower_bounds.
17586 (LOOP_VINFO_CHECK_NONZERO): New macro.
17587 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17588 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17589 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17590 fields. Make seg_len the distance travelled, not including the
17592 (dr_direction_indicator): Declare.
17593 (dr_zero_step_indicator): Likewise.
17594 (dr_known_forward_stride_p): Likewise.
17595 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17597 (runtime_alias_check_p): Allow runtime alias checks with
17599 (operator ==): Compare access_size and align.
17600 (prune_runtime_alias_test_list): Rework for new distinction between
17601 the access_size and seg_len.
17602 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17604 (get_segment_min_max): New function.
17605 (create_intersect_range_checks): Use it.
17606 (dr_step_indicator): New function.
17607 (dr_direction_indicator): Likewise.
17608 (dr_zero_step_indicator): Likewise.
17609 (dr_known_forward_stride_p): Likewise.
17610 * tree-loop-distribution.c (data_ref_segment_size): Return
17611 DR_STEP * (niters - 1).
17612 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17614 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17615 (vect_preserves_scalar_order_p): New function, split out from...
17616 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17617 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17618 (vect_vfa_access_size): New function.
17619 (vect_vfa_align): Likewise.
17620 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17621 (dump_lower_bound): New function.
17622 (vect_check_lower_bound): Likewise.
17623 (vect_small_gap_p): Likewise.
17624 (vectorizable_with_step_bound_p): Likewise.
17625 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17626 depencies if the vectorization factor is 1. Convert the checks
17627 for nonzero steps into checks on the bounds of DR_STEP. Try using
17628 a bunds check for variable steps if the minimum required step is
17629 relatively small. Update calls to the dr_with_seg_len
17630 constructor and to vect_compile_time_alias.
17631 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17633 (vect_loop_versioning): Call it.
17634 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17636 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17639 Alan Hayward <alan.hayward@arm.com>
17640 David Sherwood <david.sherwood@arm.com>
17642 * doc/sourcebuild.texi (vect_scatter_store): Document.
17643 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17645 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17647 * genopinit.c (main): Add supports_vec_scatter_store and
17648 supports_vec_scatter_store_cached to target_optabs.
17649 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17650 IFN_MASK_SCATTER_STORE.
17651 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17653 * internal-fn.h (internal_store_fn_p): Declare.
17654 (internal_fn_stored_value_index): Likewise.
17655 * internal-fn.c (scatter_store_direct): New macro.
17656 (expand_scatter_store_optab_fn): New function.
17657 (direct_scatter_store_optab_supported_p): New macro.
17658 (internal_store_fn_p): New function.
17659 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17660 IFN_MASK_SCATTER_STORE.
17661 (internal_fn_mask_index): Likewise.
17662 (internal_fn_stored_value_index): New function.
17663 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17664 for scatter stores.
17665 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17666 * optabs-query.c (supports_vec_scatter_store_p): New function.
17667 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17668 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17669 true for scatter stores.
17670 (vect_gather_scatter_fn_p): Handle scatter stores too.
17671 (vect_check_gather_scatter): Consider using scatter stores if
17672 supports_vec_scatter_store_p.
17673 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17674 scatter stores too.
17675 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17676 internal_fn_stored_value_index.
17677 (check_load_store_masking): Handle scatter stores too.
17678 (vect_get_store_rhs): Make public.
17679 (vectorizable_call): Use internal_store_fn_p.
17680 (vectorizable_store): Handle scatter store internal functions.
17681 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17682 when deciding whether the end of the group has been reached.
17683 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17684 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17685 (mask_scatter_store<mode>): New insns.
17687 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17688 Alan Hayward <alan.hayward@arm.com>
17689 David Sherwood <david.sherwood@arm.com>
17691 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17692 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17693 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17695 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17696 Use vect_truncate_gather_scatter_offset if we can't treat the
17697 operation as a normal gather load or scatter store.
17698 (get_group_load_store_type): Take the gather_scatter_info
17699 as argument. Try using a gather load or scatter store for
17700 single-element groups.
17701 (get_load_store_type): Update calls to get_group_load_store_type
17702 and vect_use_strided_gather_scatters_p.
17704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17705 Alan Hayward <alan.hayward@arm.com>
17706 David Sherwood <david.sherwood@arm.com>
17708 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17709 optional tree argument.
17710 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17712 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17713 but continue to use the current value as a fallback.
17714 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17715 to compare the updates.
17716 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17717 (get_load_store_type): Use it when handling a strided access.
17718 (vect_get_strided_load_store_ops): New function.
17719 (vect_get_data_ptr_increment): Likewise.
17720 (vectorizable_load): Handle strided gather loads. Always pass
17721 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17724 Alan Hayward <alan.hayward@arm.com>
17725 David Sherwood <david.sherwood@arm.com>
17727 * doc/md.texi (gather_load@var{m}): Document.
17728 (mask_gather_load@var{m}): Likewise.
17729 * genopinit.c (main): Add supports_vec_gather_load and
17730 supports_vec_gather_load_cached to target_optabs.
17731 * optabs-tree.c (init_tree_optimization_optabs): Use
17732 ggc_cleared_alloc to allocate target_optabs.
17733 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17734 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17736 * internal-fn.h (internal_load_fn_p): Declare.
17737 (internal_gather_scatter_fn_p): Likewise.
17738 (internal_fn_mask_index): Likewise.
17739 (internal_gather_scatter_fn_supported_p): Likewise.
17740 * internal-fn.c (gather_load_direct): New macro.
17741 (expand_gather_load_optab_fn): New function.
17742 (direct_gather_load_optab_supported_p): New macro.
17743 (direct_internal_fn_optab): New function.
17744 (internal_load_fn_p): Likewise.
17745 (internal_gather_scatter_fn_p): Likewise.
17746 (internal_fn_mask_index): Likewise.
17747 (internal_gather_scatter_fn_supported_p): Likewise.
17748 * optabs-query.c (supports_at_least_one_mode_p): New function.
17749 (supports_vec_gather_load_p): Likewise.
17750 * optabs-query.h (supports_vec_gather_load_p): Declare.
17751 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17752 and memory_type field.
17753 (NUM_PATTERNS): Bump to 15.
17754 * tree-vect-data-refs.c: Include internal-fn.h.
17755 (vect_gather_scatter_fn_p): New function.
17756 (vect_describe_gather_scatter_call): Likewise.
17757 (vect_check_gather_scatter): Try using internal functions for
17758 gather loads. Recognize existing calls to a gather load function.
17759 (vect_analyze_data_refs): Consider using gather loads if
17760 supports_vec_gather_load_p.
17761 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17762 (vect_get_gather_scatter_offset_type): Likewise.
17763 (vect_convert_mask_for_vectype): Likewise.
17764 (vect_add_conversion_to_patterm): Likewise.
17765 (vect_try_gather_scatter_pattern): Likewise.
17766 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17767 (vect_vect_recog_func_ptrs): Add it.
17768 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17769 internal_fn_mask_index and internal_gather_scatter_fn_p.
17770 (check_load_store_masking): Take the gather_scatter_info as an
17771 argument and handle gather loads.
17772 (vect_get_gather_scatter_ops): New function.
17773 (vectorizable_call): Check internal_load_fn_p.
17774 (vectorizable_load): Likewise. Handle gather load internal
17776 (vectorizable_store): Update call to check_load_store_masking.
17777 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17778 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17779 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17780 (aarch64_gather_scale_operand_d): New predicates.
17781 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17782 (mask_gather_load<mode>): New insns.
17784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17785 Alan Hayward <alan.hayward@arm.com>
17786 David Sherwood <david.sherwood@arm.com>
17788 * optabs.def (fold_left_plus_optab): New optab.
17789 * doc/md.texi (fold_left_plus_@var{m}): Document.
17790 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17791 * internal-fn.c (fold_left_direct): Define.
17792 (expand_fold_left_optab_fn): Likewise.
17793 (direct_fold_left_optab_supported_p): Likewise.
17794 * fold-const-call.c (fold_const_fold_left): New function.
17795 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17796 * tree-parloops.c (valid_reduction_p): New function.
17797 (gather_scalar_reductions): Use it.
17798 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17799 (vect_finish_replace_stmt): Declare.
17800 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17801 (needs_fold_left_reduction_p): New function, split out from...
17802 (vect_is_simple_reduction): ...here. Accept reductions that
17803 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17804 (vect_force_simple_reduction): Also store the reduction type in
17805 the assignment's STMT_VINFO_REDUC_TYPE.
17806 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17807 (merge_with_identity): New function.
17808 (vect_expand_fold_left): Likewise.
17809 (vectorize_fold_left_reduction): Likewise.
17810 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17811 scalar phi in place for it. Check for target support and reject
17812 cases that would reassociate the operation. Defer the transform
17813 phase to vectorize_fold_left_reduction.
17814 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17815 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17816 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17820 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17821 call to ifc_temp_var.
17823 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17824 Alan Hayward <alan.hayward@arm.com>
17825 David Sherwood <david.sherwood@arm.com>
17827 * target.def (legitimize_address_displacement): Take the original
17828 offset as a poly_int.
17829 * targhooks.h (default_legitimize_address_displacement): Update
17831 * targhooks.c (default_legitimize_address_displacement): Likewise.
17832 * doc/tm.texi: Regenerate.
17833 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17834 as an argument, moving assert of ad->disp == ad->disp_term to...
17835 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17836 Try calling targetm.legitimize_address_displacement before expanding
17837 the address rather than afterwards, and adjust for the new interface.
17838 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17839 Match the new hook interface. Handle SVE addresses.
17840 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17841 new hook interface.
17843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17845 * Makefile.in (OBJS): Add early-remat.o.
17846 * target.def (select_early_remat_modes): New hook.
17847 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17848 * doc/tm.texi: Regenerate.
17849 * targhooks.h (default_select_early_remat_modes): Declare.
17850 * targhooks.c (default_select_early_remat_modes): New function.
17851 * timevar.def (TV_EARLY_REMAT): New timevar.
17852 * passes.def (pass_early_remat): New pass.
17853 * tree-pass.h (make_pass_early_remat): Declare.
17854 * early-remat.c: New file.
17855 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17857 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17860 Alan Hayward <alan.hayward@arm.com>
17861 David Sherwood <david.sherwood@arm.com>
17863 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17864 vfm1 with a bound_epilog parameter.
17865 (vect_do_peeling): Update calls accordingly, and move the prologue
17866 call earlier in the function. Treat the base bound_epilog as 0 for
17867 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17868 this base when peeling for gaps.
17869 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17870 with fully-masked loops.
17871 (vect_estimate_min_profitable_iters): Handle the single peeled
17872 iteration in that case.
17874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17875 Alan Hayward <alan.hayward@arm.com>
17876 David Sherwood <david.sherwood@arm.com>
17878 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17879 single-element interleaving even if the size is not a power of 2.
17880 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17881 accesses for single-element interleaving if the group size is
17884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17885 Alan Hayward <alan.hayward@arm.com>
17886 David Sherwood <david.sherwood@arm.com>
17888 * doc/md.texi (fold_extract_last_@var{m}): Document.
17889 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17890 * optabs.def (fold_extract_last_optab): New optab.
17891 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17892 * internal-fn.c (fold_extract_direct): New macro.
17893 (expand_fold_extract_optab_fn): Likewise.
17894 (direct_fold_extract_optab_supported_p): Likewise.
17895 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17896 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17897 EXTRACT_LAST_REDUCTION.
17898 (get_initial_def_for_reduction): Do not create an initial vector
17899 for EXTRACT_LAST_REDUCTION reductions.
17900 (vectorizable_reduction): Leave the scalar phi in place for
17901 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17902 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17903 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17904 transform phase to vectorizable_condition.
17905 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17907 (vect_finish_stmt_generation): ...here.
17908 (vect_finish_replace_stmt): New function.
17909 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17910 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17912 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17915 Alan Hayward <alan.hayward@arm.com>
17916 David Sherwood <david.sherwood@arm.com>
17918 * doc/md.texi (extract_last_@var{m}): Document.
17919 * optabs.def (extract_last_optab): New optab.
17920 * internal-fn.def (EXTRACT_LAST): New internal function.
17921 * internal-fn.c (cond_unary_direct): New macro.
17922 (expand_cond_unary_optab_fn): Likewise.
17923 (direct_cond_unary_optab_supported_p): Likewise.
17924 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17925 loops using EXTRACT_LAST.
17926 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17927 (extract_last_<mode>): ...this optab.
17928 (vec_extract<mode><Vel>): Update accordingly.
17930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17931 Alan Hayward <alan.hayward@arm.com>
17932 David Sherwood <david.sherwood@arm.com>
17934 * target.def (empty_mask_is_expensive): New hook.
17935 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17936 * doc/tm.texi: Regenerate.
17937 * targhooks.h (default_empty_mask_is_expensive): Declare.
17938 * targhooks.c (default_empty_mask_is_expensive): New function.
17939 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17940 if the target says that empty masks are expensive.
17941 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17943 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17945 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17946 Alan Hayward <alan.hayward@arm.com>
17947 David Sherwood <david.sherwood@arm.com>
17949 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17950 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17951 (vect_use_loop_mask_for_alignment_p): New function.
17952 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17953 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17954 niters_skip argument. Make sure that the first niters_skip elements
17955 of the first iteration are inactive.
17956 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17957 Update call to vect_set_loop_masks_directly.
17958 (get_misalign_in_elems): New function, split out from...
17959 (vect_gen_prolog_loop_niters): ...here.
17960 (vect_update_init_of_dr): Take a code argument that specifies whether
17961 the adjustment should be added or subtracted.
17962 (vect_update_init_of_drs): Likewise.
17963 (vect_prepare_for_masked_peels): New function.
17964 (vect_do_peeling): Skip prologue peeling if we're using a mask
17965 instead. Update call to vect_update_inits_of_drs.
17966 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17968 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17969 alignment. Do not include the number of peeled iterations in
17970 the minimum threshold in that case.
17971 (vectorizable_induction): Adjust the start value down by
17972 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17973 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17974 Take the number of skipped iterations into account when calculating
17976 * tree-vect-stmts.c (vect_gen_while_not): New function.
17978 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17979 Alan Hayward <alan.hayward@arm.com>
17980 David Sherwood <david.sherwood@arm.com>
17982 * doc/sourcebuild.texi (vect_fully_masked): Document.
17983 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17984 default value to 0.
17985 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17987 (vect_analyze_loop_2): ...here. Don't check the vectorization
17988 factor against the number of loop iterations if the loop is
17991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17992 Alan Hayward <alan.hayward@arm.com>
17993 David Sherwood <david.sherwood@arm.com>
17995 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17996 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17997 (dump_groups): Update accordingly.
17998 (iv_use::mem_type): New member variable.
17999 (address_p): New function.
18000 (record_use): Add a mem_type argument and initialize the new
18002 (record_group_use): Add a mem_type argument. Use address_p.
18003 Remove obsolete null checks of base_object. Update call to record_use.
18004 (find_interesting_uses_op): Update call to record_group_use.
18005 (find_interesting_uses_cond): Likewise.
18006 (find_interesting_uses_address): Likewise.
18007 (get_mem_type_for_internal_fn): New function.
18008 (find_address_like_use): Likewise.
18009 (find_interesting_uses_stmt): Try find_address_like_use before
18010 calling find_interesting_uses_op.
18011 (addr_offset_valid_p): Use the iv mem_type field as the type
18012 of the addressed memory.
18013 (add_autoinc_candidates): Likewise.
18014 (get_address_cost): Likewise.
18015 (split_small_address_groups_p): Use address_p.
18016 (split_address_groups): Likewise.
18017 (add_iv_candidate_for_use): Likewise.
18018 (autoinc_possible_for_pair): Likewise.
18019 (rewrite_groups): Likewise.
18020 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18021 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18022 (get_alias_ptr_type_for_ptr_address): New function.
18023 (rewrite_use_address): Rewrite address uses in calls that were
18024 identified by find_address_like_use.
18026 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18027 Alan Hayward <alan.hayward@arm.com>
18028 David Sherwood <david.sherwood@arm.com>
18030 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18032 * gimple-expr.h (is_gimple_addressable: Likewise.
18033 * gimple-expr.c (is_gimple_address): Likewise.
18034 * internal-fn.c (expand_call_mem_ref): New function.
18035 (expand_mask_load_optab_fn): Use it.
18036 (expand_mask_store_optab_fn): Likewise.
18038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18039 Alan Hayward <alan.hayward@arm.com>
18040 David Sherwood <david.sherwood@arm.com>
18042 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18043 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18044 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18045 (cond_umax@var{mode}): Document.
18046 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18047 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18048 (cond_umin_optab, cond_umax_optab): New optabs.
18049 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18050 (COND_IOR, COND_XOR): New internal functions.
18051 * internal-fn.h (get_conditional_internal_fn): Declare.
18052 * internal-fn.c (cond_binary_direct): New macro.
18053 (expand_cond_binary_optab_fn): Likewise.
18054 (direct_cond_binary_optab_supported_p): Likewise.
18055 (get_conditional_internal_fn): New function.
18056 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18057 Cope with reduction statements that are vectorized as calls rather
18059 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18060 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18061 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18062 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18063 (UNSPEC_COND_EOR): New unspecs.
18064 (optab): Add mappings for them.
18065 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18066 (sve_int_op, sve_fp_op): New int attributes.
18068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18069 Alan Hayward <alan.hayward@arm.com>
18070 David Sherwood <david.sherwood@arm.com>
18072 * optabs.def (while_ult_optab): New optab.
18073 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18074 * internal-fn.def (WHILE_ULT): New internal function.
18075 * internal-fn.h (direct_internal_fn_supported_p): New override
18076 that takes two types as argument.
18077 * internal-fn.c (while_direct): New macro.
18078 (expand_while_optab_fn): New function.
18079 (convert_optab_supported_p): Likewise.
18080 (direct_while_optab_supported_p): New macro.
18081 * wide-int.h (wi::udiv_ceil): New function.
18082 * tree-vectorizer.h (rgroup_masks): New structure.
18083 (vec_loop_masks): New typedef.
18084 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18085 and fully_masked_p.
18086 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18087 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18088 (vect_max_vf): New function.
18089 (slpeel_make_loop_iterate_ntimes): Delete.
18090 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18091 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18092 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18093 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18094 internal-fn.h, stor-layout.h and optabs-query.h.
18095 (vect_set_loop_mask): New function.
18096 (add_preheader_seq): Likewise.
18097 (add_header_seq): Likewise.
18098 (interleave_supported_p): Likewise.
18099 (vect_maybe_permute_loop_masks): Likewise.
18100 (vect_set_loop_masks_directly): Likewise.
18101 (vect_set_loop_condition_masked): Likewise.
18102 (vect_set_loop_condition_unmasked): New function, split out from
18103 slpeel_make_loop_iterate_ntimes.
18104 (slpeel_make_loop_iterate_ntimes): Rename to..
18105 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18106 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18107 (vect_do_peeling): Update call accordingly.
18108 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18110 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18111 mask_compare_type, can_fully_mask_p and fully_masked_p.
18112 (release_vec_loop_masks): New function.
18113 (_loop_vec_info): Use it to free the loop masks.
18114 (can_produce_all_loop_masks_p): New function.
18115 (vect_get_max_nscalars_per_iter): Likewise.
18116 (vect_verify_full_masking): Likewise.
18117 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18118 retries, and free the mask rgroups before retrying. Check loop-wide
18119 reasons for disallowing fully-masked loops. Make the final decision
18120 about whether use a fully-masked loop or not.
18121 (vect_estimate_min_profitable_iters): Do not assume that peeling
18122 for the number of iterations will be needed for fully-masked loops.
18123 (vectorizable_reduction): Disable fully-masked loops.
18124 (vectorizable_live_operation): Likewise.
18125 (vect_halve_mask_nunits): New function.
18126 (vect_double_mask_nunits): Likewise.
18127 (vect_record_loop_mask): Likewise.
18128 (vect_get_loop_mask): Likewise.
18129 (vect_transform_loop): Handle the case in which the final loop
18130 iteration might handle a partial vector. Call vect_set_loop_condition
18131 instead of slpeel_make_loop_iterate_ntimes.
18132 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18133 (check_load_store_masking): New function.
18134 (prepare_load_store_mask): Likewise.
18135 (vectorizable_store): Handle fully-masked loops.
18136 (vectorizable_load): Likewise.
18137 (supportable_widening_operation): Use vect_halve_mask_nunits for
18139 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18140 (vect_gen_while): New function.
18141 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18142 (aarch64_uqdec<mode>): New insn.
18144 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18145 Alan Hayward <alan.hayward@arm.com>
18146 David Sherwood <david.sherwood@arm.com>
18148 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18149 (reduc_xor_scal_optab): New optabs.
18150 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18151 (reduc_xor_scal_@var{m}): Document.
18152 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18153 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18154 internal functions.
18155 * fold-const-call.c (fold_const_call): Handle them.
18156 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18157 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18158 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18159 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18160 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18161 (UNSPEC_XORV): New unspecs.
18162 (optab): Add entries for them.
18163 (BITWISEV): New int iterator.
18164 (bit_reduc_op): New int attributes.
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 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18171 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18172 * optabs.def (vec_shl_insert_optab): New optab.
18173 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18174 (duplicate_and_interleave): Likewise.
18175 * tree-vect-loop.c: Include internal-fn.h.
18176 (neutral_op_for_slp_reduction): New function, split out from
18177 get_initial_defs_for_reduction.
18178 (get_initial_def_for_reduction): Handle option 2 for variable-length
18179 vectors by loading the neutral value into a vector and then shifting
18180 the initial value into element 0.
18181 (get_initial_defs_for_reduction): Replace the code argument with
18182 the neutral value calculated by neutral_op_for_slp_reduction.
18183 Use gimple_build_vector for constant-length vectors.
18184 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18185 but the first group_size elements have a neutral value.
18186 Use duplicate_and_interleave otherwise.
18187 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18188 Update call to get_initial_defs_for_reduction. Handle SLP
18189 reductions for variable-length vectors by creating one vector
18190 result for each scalar result, with the elements associated
18191 with other scalar results stubbed out with the neutral value.
18192 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18193 Require IFN_VEC_SHL_INSERT for double reductions on
18194 variable-length vectors, or SLP reductions that have
18195 a neutral value. Require can_duplicate_and_interleave_p
18196 support for variable-length unchained SLP reductions if there
18197 is no neutral value, such as for MIN/MAX reductions. Also require
18198 the number of vector elements to be a multiple of the number of
18199 SLP statements when doing variable-length unchained SLP reductions.
18200 Update call to vect_create_epilog_for_reduction.
18201 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18202 and remove initial values.
18203 (duplicate_and_interleave): Make public.
18204 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18205 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18207 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18208 Alan Hayward <alan.hayward@arm.com>
18209 David Sherwood <david.sherwood@arm.com>
18211 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18212 (can_duplicate_and_interleave_p): New function.
18213 (vect_get_and_check_slp_defs): Take the vector of statements
18214 rather than just the current one. Remove excess parentheses.
18215 Restriction rejectinon of vect_constant_def and vect_external_def
18216 for variable-length vectors to boolean types, or types for which
18217 can_duplicate_and_interleave_p is false.
18218 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18219 (duplicate_and_interleave): New function.
18220 (vect_get_constant_vectors): Use gimple_build_vector for
18221 constant-length vectors and suitable variable-length constant
18222 vectors. Use duplicate_and_interleave for other variable-length
18223 vectors. Don't defer the update when inserting new statements.
18225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18226 Alan Hayward <alan.hayward@arm.com>
18227 David Sherwood <david.sherwood@arm.com>
18229 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18230 min_profitable_iters doesn't go negative.
18232 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18233 Alan Hayward <alan.hayward@arm.com>
18234 David Sherwood <david.sherwood@arm.com>
18236 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18237 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18238 * optabs.def (vec_mask_load_lanes_optab): New optab.
18239 (vec_mask_store_lanes_optab): Likewise.
18240 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18241 (MASK_STORE_LANES): Likewise.
18242 * internal-fn.c (mask_load_lanes_direct): New macro.
18243 (mask_store_lanes_direct): Likewise.
18244 (expand_mask_load_optab_fn): Handle masked operations.
18245 (expand_mask_load_lanes_optab_fn): New macro.
18246 (expand_mask_store_optab_fn): Handle masked operations.
18247 (expand_mask_store_lanes_optab_fn): New macro.
18248 (direct_mask_load_lanes_optab_supported_p): Likewise.
18249 (direct_mask_store_lanes_optab_supported_p): Likewise.
18250 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18252 (vect_load_lanes_supported): Likewise.
18253 * tree-vect-data-refs.c (strip_conversion): New function.
18254 (can_group_stmts_p): Likewise.
18255 (vect_analyze_data_ref_accesses): Use it instead of checking
18256 for a pair of assignments.
18257 (vect_store_lanes_supported): Take a masked_p parameter.
18258 (vect_load_lanes_supported): Likewise.
18259 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18260 vect_store_lanes_supported and vect_load_lanes_supported.
18261 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18262 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18263 parameter. Don't allow gaps for masked accesses.
18264 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18265 and vect_load_lanes_supported.
18266 (get_load_store_type): Take a masked_p parameter and update
18267 call to get_group_load_store_type.
18268 (vectorizable_store): Update call to get_load_store_type.
18269 Handle IFN_MASK_STORE_LANES.
18270 (vectorizable_load): Update call to get_load_store_type.
18271 Handle IFN_MASK_LOAD_LANES.
18273 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18274 Alan Hayward <alan.hayward@arm.com>
18275 David Sherwood <david.sherwood@arm.com>
18277 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18279 * config/aarch64/aarch64-protos.h
18280 (aarch64_sve_struct_memory_operand_p): Declare.
18281 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18282 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18283 (VPRED, vpred): Handle SVE structure modes.
18284 * config/aarch64/constraints.md (Utx): New constraint.
18285 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18286 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18287 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18288 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18289 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18290 structure modes. Split into pieces after RA.
18291 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18292 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18294 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18295 SVE structure modes.
18296 (aarch64_classify_address): Likewise.
18297 (sizetochar): Move earlier in file.
18298 (aarch64_print_operand): Handle SVE register lists.
18299 (aarch64_array_mode): New function.
18300 (aarch64_sve_struct_memory_operand_p): Likewise.
18301 (TARGET_ARRAY_MODE): Redefine.
18303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18304 Alan Hayward <alan.hayward@arm.com>
18305 David Sherwood <david.sherwood@arm.com>
18307 * target.def (array_mode): New target hook.
18308 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18309 * doc/tm.texi: Regenerate.
18310 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18311 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18312 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18313 targetm.array_mode.
18314 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18317 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18318 Alan Hayward <alan.hayward@arm.com>
18319 David Sherwood <david.sherwood@arm.com>
18321 * fold-const.c (fold_binary_loc): Check the argument types
18322 rather than the result type when testing for a vector operation.
18324 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18326 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18327 * doc/tm.texi: Regenerate.
18329 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18330 Alan Hayward <alan.hayward@arm.com>
18331 David Sherwood <david.sherwood@arm.com>
18333 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18334 (sve): Document new AArch64 extension.
18335 * doc/md.texi (w): Extend the description of the AArch64
18336 constraint to include SVE vectors.
18337 (Upl, Upa): Document new AArch64 predicate constraints.
18338 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18340 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18341 (msve-vector-bits=): New option.
18342 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18343 SVE when these are disabled.
18344 (sve): New extension.
18345 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18346 modes. Adjust their number of units based on aarch64_sve_vg.
18347 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18348 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18349 aarch64_addr_query_type.
18350 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18351 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18352 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18353 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18354 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18355 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18356 (aarch64_simd_imm_zero_p): Delete.
18357 (aarch64_check_zero_based_sve_index_immediate): Declare.
18358 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18359 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18360 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18361 (aarch64_sve_float_mul_immediate_p): Likewise.
18362 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18363 rather than an rtx.
18364 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18365 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18366 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18367 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18368 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18369 (aarch64_regmode_natural_size): Likewise.
18370 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18371 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18373 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18374 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18375 for VG and the SVE predicate registers.
18376 (V_ALIASES): Add a "z"-prefixed alias.
18377 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18378 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18379 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18380 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18381 (REG_CLASS_NAMES): Add entries for them.
18382 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18383 and the predicate registers.
18384 (aarch64_sve_vg): Declare.
18385 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18386 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18387 (REGMODE_NATURAL_SIZE): Define.
18388 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18390 * config/aarch64/aarch64.c: Include cfgrtl.h.
18391 (simd_immediate_info): Add a constructor for series vectors,
18392 and an associated step field.
18393 (aarch64_sve_vg): New variable.
18394 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18395 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18396 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18397 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18398 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18399 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18400 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18401 (aarch64_get_mask_mode): New functions.
18402 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18403 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18404 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18405 predicate modes and predicate registers. Explicitly restrict
18406 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18407 to store a vector mode if it is recognized by
18408 aarch64_classify_vector_mode.
18409 (aarch64_regmode_natural_size): New function.
18410 (aarch64_hard_regno_caller_save_mode): Return the original mode
18412 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18413 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18414 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18415 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18417 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18418 does not overlap dest if the function is frame-related. Handle
18420 (aarch64_split_add_offset): New function.
18421 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18422 them aarch64_add_offset.
18423 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18424 and update call to aarch64_sub_sp.
18425 (aarch64_add_cfa_expression): New function.
18426 (aarch64_expand_prologue): Pass extra temporary registers to the
18427 functions above. Handle the case in which we need to emit new
18428 DW_CFA_expressions for registers that were originally saved
18429 relative to the stack pointer, but now have to be expressed
18430 relative to the frame pointer.
18431 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18433 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18434 IP0 and IP1 values for SVE frames.
18435 (aarch64_expand_vec_series): New function.
18436 (aarch64_expand_sve_widened_duplicate): Likewise.
18437 (aarch64_expand_sve_const_vector): Likewise.
18438 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18439 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18440 into the register, rather than emitting a SET directly.
18441 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18442 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18443 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18444 (offset_9bit_signed_scaled_p): New functions.
18445 (aarch64_replicate_bitmask_imm): New function.
18446 (aarch64_bitmask_imm): Use it.
18447 (aarch64_cannot_force_const_mem): Reject expressions involving
18448 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18449 (aarch64_classify_index): Handle SVE indices, by requiring
18450 a plain register index with a scale that matches the element size.
18451 (aarch64_classify_address): Handle SVE addresses. Assert that
18452 the mode of the address is VOIDmode or an integer mode.
18453 Update call to aarch64_classify_symbol.
18454 (aarch64_classify_symbolic_expression): Update call to
18455 aarch64_classify_symbol.
18456 (aarch64_const_vec_all_in_range_p): New function.
18457 (aarch64_print_vector_float_operand): Likewise.
18458 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18459 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18460 and the FP immediates 1.0 and 0.5.
18461 (aarch64_print_address_internal): Handle SVE addresses.
18462 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18463 (aarch64_regno_regclass): Handle predicate registers.
18464 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18466 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18467 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18468 (aarch64_convert_sve_vector_bits): New function.
18469 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18470 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18471 rather than an rtx.
18472 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18473 Handle SVE vector and predicate modes. Accept VL-based constants
18474 that need only one temporary register, and VL offsets that require
18475 no temporary registers.
18476 (aarch64_conditional_register_usage): Mark the predicate registers
18477 as fixed if SVE isn't available.
18478 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18479 Return true for SVE vector and predicate modes.
18480 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18481 rather than an unsigned int. Handle SVE modes.
18482 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18484 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18486 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18487 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18488 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18489 (aarch64_sve_float_mul_immediate_p): New functions.
18490 (aarch64_sve_valid_immediate): New function.
18491 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18492 Explicitly reject structure modes. Check for INDEX constants.
18493 Handle PTRUE and PFALSE constants.
18494 (aarch64_check_zero_based_sve_index_immediate): New function.
18495 (aarch64_simd_imm_zero_p): Delete.
18496 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18497 vector modes. Accept constants in the range of CNT[BHWD].
18498 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18499 ask for an Advanced SIMD mode.
18500 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18501 (aarch64_simd_vector_alignment): Handle SVE predicates.
18502 (aarch64_vectorize_preferred_vector_alignment): New function.
18503 (aarch64_simd_vector_alignment_reachable): Use it instead of
18505 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18506 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18508 (MAX_VECT_LEN): Delete.
18509 (expand_vec_perm_d): Add a vec_flags field.
18510 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18511 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18512 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18514 (aarch64_evpc_rev): Rename to...
18515 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18516 (aarch64_evpc_rev_global): New function.
18517 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18518 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18520 (aarch64_evpc_sve_tbl): New function.
18521 (aarch64_expand_vec_perm_const_1): Update after rename of
18522 aarch64_evpc_rev. Handle SVE permutes too, trying
18523 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18524 than aarch64_evpc_tbl.
18525 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18526 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18527 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18528 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18529 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18530 (aarch64_expand_sve_vcond): New functions.
18531 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18532 of aarch64_vector_mode_p.
18533 (aarch64_dwarf_poly_indeterminate_value): New function.
18534 (aarch64_compute_pressure_classes): Likewise.
18535 (aarch64_can_change_mode_class): Likewise.
18536 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18537 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18538 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18539 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18540 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18541 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18542 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18543 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18545 (Dn, Dl, Dr): Accept const as well as const_vector.
18546 (Dz): Likewise. Compare against CONST0_RTX.
18547 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18548 of "vector" where appropriate.
18549 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18550 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18551 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18552 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18553 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18554 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18555 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18556 (v_int_equiv): Extend to SVE modes.
18557 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18559 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18560 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18561 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18562 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18563 (SVE_COND_FP_CMP): New int iterators.
18564 (perm_hilo): Handle the new unpack unspecs.
18565 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18567 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18568 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18569 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18570 (aarch64_equality_operator, aarch64_constant_vector_operand)
18571 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18572 (aarch64_sve_nonimmediate_operand): Likewise.
18573 (aarch64_sve_general_operand): Likewise.
18574 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18575 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18576 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18577 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18578 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18579 (aarch64_sve_float_arith_immediate): Likewise.
18580 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18581 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18582 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18583 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18584 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18585 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18586 (aarch64_sve_float_arith_operand): Likewise.
18587 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18588 (aarch64_sve_float_mul_operand): Likewise.
18589 (aarch64_sve_vec_perm_operand): Likewise.
18590 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18591 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18592 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18593 as well as const_vector.
18594 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18595 in file. Use CONST0_RTX and CONSTM1_RTX.
18596 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18597 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18598 Use aarch64_simd_imm_zero.
18599 * config/aarch64/aarch64-sve.md: New file.
18600 * config/aarch64/aarch64.md: Include it.
18601 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18602 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18603 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18604 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18605 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18606 (sve): New attribute.
18607 (enabled): Disable instructions with the sve attribute unless
18609 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18610 aarch64_expand_mov_immediate.
18611 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18612 CNT[BHSD] immediates.
18613 (movti): Split CONST_POLY_INT moves into two halves.
18614 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18615 Split additions that need a temporary here if the destination
18616 is the stack pointer.
18617 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18618 (*add<mode>3_poly_1): New instruction.
18619 (set_clobber_cc): New expander.
18621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18623 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18624 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18625 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18626 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18627 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18628 Change innermode from fixed_mode_size to machine_mode.
18629 (simplify_subreg): Update call accordingly. Handle a constant-sized
18630 subreg of a variable-length CONST_VECTOR.
18632 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18633 Alan Hayward <alan.hayward@arm.com>
18634 David Sherwood <david.sherwood@arm.com>
18636 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18637 (add_offset_to_base): New function, split out from...
18638 (create_mem_ref): ...here. When handling a scale other than 1,
18639 check first whether the address is valid without the offset.
18640 Add it into the base if so, leaving the index and scale as-is.
18642 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18645 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18646 fold_for_warn before checking if arg2 is INTEGER_CST.
18648 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18650 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18651 (store_multiple_operation): Delete.
18652 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18653 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18654 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18655 guarded by TARGET_STRING.
18656 (rs6000_output_load_multiple): Delete.
18657 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18658 OPTION_MASK_STRING / TARGET_STRING handling.
18659 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18660 (const rs6000_opt_masks) <"string">: Change mask to 0.
18661 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18662 (MASK_STRING): Delete.
18663 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18665 (load_multiple): Delete.
18672 (store_multiple): Delete.
18679 (movmemsi_8reg): Delete.
18680 (corresponding unnamed define_insn): Delete.
18681 (movmemsi_6reg): Delete.
18682 (corresponding unnamed define_insn): Delete.
18683 (movmemsi_4reg): Delete.
18684 (corresponding unnamed define_insn): Delete.
18685 (movmemsi_2reg): Delete.
18686 (corresponding unnamed define_insn): Delete.
18687 (movmemsi_1reg): Delete.
18688 (corresponding unnamed define_insn): Delete.
18689 * config/rs6000/rs6000.opt (mno-string): New.
18690 (mstring): Replace by deprecation warning stub.
18691 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18693 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18695 * regrename.c (regrename_do_replace): If replacing the same
18696 reg multiple times, try to reuse last created gen_raw_REG.
18699 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18700 main to workaround a bug in GDB.
18702 2018-01-12 Tom de Vries <tom@codesourcery.com>
18705 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18707 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18709 PR rtl-optimization/80481
18710 * ira-color.c (get_cap_member): New function.
18711 (allocnos_conflict_by_live_ranges_p): Use it.
18712 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18713 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18715 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18718 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18719 (*saddl_se_1): Ditto.
18720 (*ssubsi_1): Ditto.
18721 (*ssubl_se_1): Ditto.
18723 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18725 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18726 rather than wi::to_widest for DR_INITs.
18727 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18728 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18729 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18731 (vect_analyze_group_access_1): Note that here.
18733 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18735 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18736 polynomial type sizes.
18738 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18740 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18741 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18742 (gimple_add_tmp_var): Likewise.
18744 2018-01-12 Martin Liska <mliska@suse.cz>
18746 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18747 (gimple_alloc_sizes): Likewise.
18748 (dump_gimple_statistics): Use PRIu64 in printf format.
18749 * gimple.h: Change uint64_t to int.
18751 2018-01-12 Martin Liska <mliska@suse.cz>
18753 * tree-core.h: Use uint64_t instead of int.
18754 * tree.c (tree_node_counts): Likewise.
18755 (tree_node_sizes): Likewise.
18756 (dump_tree_statistics): Use PRIu64 in printf format.
18758 2018-01-12 Martin Liska <mliska@suse.cz>
18760 * Makefile.in: As qsort_chk is implemented in vec.c, add
18761 vec.o to linkage of gencfn-macros.
18762 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18763 passing the info to record_node_allocation_statistics.
18764 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18766 * ggc-common.c (struct ggc_usage): Add operator== and use
18767 it in operator< and compare function.
18768 * mem-stats.h (struct mem_usage): Likewise.
18769 * vec.c (struct vec_usage): Remove operator< and compare
18770 function. Can be simply inherited.
18772 2018-01-12 Martin Jambor <mjambor@suse.cz>
18775 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18776 * tree-ssa-math-opts.c: Include domwalk.h.
18777 (convert_mult_to_fma_1): New function.
18778 (fma_transformation_info): New type.
18779 (fma_deferring_state): Likewise.
18780 (cancel_fma_deferring): New function.
18781 (result_of_phi): Likewise.
18782 (last_fma_candidate_feeds_initial_phi): Likewise.
18783 (convert_mult_to_fma): Added deferring logic, split actual
18784 transformation to convert_mult_to_fma_1.
18785 (math_opts_dom_walker): New type.
18786 (math_opts_dom_walker::after_dom_children): New method, body moved
18787 here from pass_optimize_widening_mul::execute, added deferring logic
18789 (pass_optimize_widening_mul::execute): Moved most of code to
18790 math_opts_dom_walker::after_dom_children.
18791 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18792 * config/i386/i386.c (ix86_option_override_internal): Added
18793 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18795 2018-01-12 Richard Biener <rguenther@suse.de>
18798 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18799 inline instance vars.
18801 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18804 * config/rx/rx.c (rx_is_restricted_memory_address):
18805 Handle SUBREG case.
18807 2018-01-12 Richard Biener <rguenther@suse.de>
18809 PR tree-optimization/80846
18810 * target.def (split_reduction): New target hook.
18811 * targhooks.c (default_split_reduction): New function.
18812 * targhooks.h (default_split_reduction): Declare.
18813 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18814 target requests first reduce vectors by combining low and high
18816 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18817 (get_vectype_for_scalar_type_and_size): Export.
18818 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18819 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18820 * doc/tm.texi: Regenerate.
18821 * config/i386/i386.c (ix86_split_reduction): Implement
18822 TARGET_VECTORIZE_SPLIT_REDUCTION.
18824 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18827 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18828 in PIC mode except for TARGET_VXWORKS_RTP.
18829 * config/sparc/sparc.c: Include cfgrtl.h.
18830 (TARGET_INIT_PIC_REG): Define.
18831 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18832 (sparc_pic_register_p): New predicate.
18833 (sparc_legitimate_address_p): Use it.
18834 (sparc_legitimize_pic_address): Likewise.
18835 (sparc_delegitimize_address): Likewise.
18836 (sparc_mode_dependent_address_p): Likewise.
18837 (gen_load_pcrel_sym): Remove 4th parameter.
18838 (load_got_register): Adjust call to above. Remove obsolete stuff.
18839 (sparc_expand_prologue): Do not call load_got_register here.
18840 (sparc_flat_expand_prologue): Likewise.
18841 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18842 (sparc_use_pseudo_pic_reg): New function.
18843 (sparc_init_pic_reg): Likewise.
18844 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18845 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18847 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18849 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18850 Add item for branch_cost.
18852 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18854 PR rtl-optimization/83565
18855 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18856 not extend the result to a larger mode for rotate operations.
18857 (num_sign_bit_copies1): Likewise.
18859 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18862 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18864 Use values-Xc.o for -pedantic.
18865 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18867 2018-01-12 Martin Liska <mliska@suse.cz>
18870 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18872 (possible_polymorphic_call_targets): Use it.
18873 (ipa_devirt): Likewise.
18875 2018-01-12 Martin Liska <mliska@suse.cz>
18877 * profile-count.h (enum profile_quality): Use 0 as invalid
18878 enum value of profile_quality.
18880 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18882 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18883 -mext-string options.
18885 2018-01-12 Richard Biener <rguenther@suse.de>
18887 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18888 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18889 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18891 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18893 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18895 * configure.ac (--with-long-double-format): Add support for the
18896 configuration option to change the default long double format on
18898 * config.gcc (powerpc*-linux*-*): Likewise.
18899 * configure: Regenerate.
18900 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18901 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18902 used without modification.
18904 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18906 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18907 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18908 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18909 MISC_BUILTIN_SPEC_BARRIER.
18910 (rs6000_init_builtins): Likewise.
18911 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18913 (speculation_barrier): New define_insn.
18914 * doc/extend.texi: Document __builtin_speculation_barrier.
18916 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18919 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18920 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18921 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18923 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18924 integral modes instead of "ss" and "sd".
18925 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18926 vectors with 32-bit and 64-bit elements.
18927 (vecdupssescalarmodesuffix): New mode attribute.
18928 (vec_dup<mode>): Use it.
18930 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18933 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18934 frame if argument is passed on stack.
18936 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18939 * ree.c (combine_reaching_defs): Optimize also
18940 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18941 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18943 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18945 PR middle-end/83189
18946 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18948 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18950 PR middle-end/83718
18951 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18952 after they are computed.
18954 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18956 PR tree-optimization/83695
18957 * gimple-loop-linterchange.cc
18958 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18959 reset cached scev information after interchange.
18960 (pass_linterchange::execute): Remove call to scev_reset_htab.
18962 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18964 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18965 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18966 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18967 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18968 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18969 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18970 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18971 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18972 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18973 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18974 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18975 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18976 (V_lane_reg): Likewise.
18977 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18979 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18980 (vfmal_lane_low<mode>_intrinsic,
18981 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18982 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18983 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18984 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18985 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18986 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18988 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18990 * config/arm/arm-cpus.in (fp16fml): New feature.
18991 (ALL_SIMD): Add fp16fml.
18992 (armv8.2-a): Add fp16fml as an option.
18993 (armv8.3-a): Likewise.
18994 (armv8.4-a): Add fp16fml as part of fp16.
18995 * config/arm/arm.h (TARGET_FP16FML): Define.
18996 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18998 * config/arm/arm-modes.def (V2HF): Define.
18999 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19000 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19001 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19002 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19003 vfmsl_low, vfmsl_high): New set of builtins.
19004 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19005 (vfml_op): New code attribute.
19006 (VFMLHALVES): New int iterator.
19007 (VFML, VFMLSEL): New mode attributes.
19008 (V_reg): Define mapping for V2HF.
19009 (V_hi, V_lo): New mode attributes.
19010 (VF_constraint): Likewise.
19011 (vfml_half, vfml_half_selector): New int attributes.
19012 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19014 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19015 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19017 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19018 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19019 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19020 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19022 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19023 Document new effective target and option set.
19025 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19027 * config/arm/arm-cpus.in (armv8_4): New feature.
19028 (ARMv8_4a): New fgroup.
19029 (armv8.4-a): New arch.
19030 * config/arm/arm-tables.opt: Regenerate.
19031 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19032 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19033 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19034 Add matching rules for -march=armv8.4-a and extensions.
19035 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19037 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19040 * config/rx/rx.md (BW): New mode attribute.
19041 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19043 2018-01-11 Richard Biener <rguenther@suse.de>
19045 PR tree-optimization/83435
19046 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19047 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19048 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19050 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19051 Alan Hayward <alan.hayward@arm.com>
19052 David Sherwood <david.sherwood@arm.com>
19054 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19056 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19057 (aarch64_print_address_internal): Use it to check for a zero offset.
19059 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19060 Alan Hayward <alan.hayward@arm.com>
19061 David Sherwood <david.sherwood@arm.com>
19063 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19064 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19065 Return a poly_int64 rather than a HOST_WIDE_INT.
19066 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19067 rather than a HOST_WIDE_INT.
19068 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19069 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19070 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19071 final_offset from HOST_WIDE_INT to poly_int64.
19072 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19073 to_constant when getting the number of units in an Advanced SIMD
19075 (aarch64_builtin_vectorized_function): Check for a constant number
19077 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19079 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19080 attribute instead of GET_MODE_NUNITS.
19081 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19082 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19083 GET_MODE_SIZE for fixed-size registers.
19084 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19085 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19086 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19087 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19088 (aarch64_print_operand, aarch64_print_address_internal)
19089 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19090 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19091 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19092 Handle polynomial GET_MODE_SIZE.
19093 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19094 wider than SImode without modification.
19095 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19096 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19097 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19098 passing and returning SVE modes.
19099 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19100 rather than GEN_INT.
19101 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19102 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19103 (aarch64_allocate_and_probe_stack_space): Likewise.
19104 (aarch64_layout_frame): Cope with polynomial offsets.
19105 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19106 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19107 polynomial offsets.
19108 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19109 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19110 poly_int64 rather than a HOST_WIDE_INT.
19111 (aarch64_get_separate_components, aarch64_process_components)
19112 (aarch64_expand_prologue, aarch64_expand_epilogue)
19113 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19114 (aarch64_anchor_offset): New function, split out from...
19115 (aarch64_legitimize_address): ...here.
19116 (aarch64_builtin_vectorization_cost): Handle polynomial
19117 TYPE_VECTOR_SUBPARTS.
19118 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19120 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19121 number of elements from the PARALLEL rather than the mode.
19122 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19123 rather than GET_MODE_BITSIZE.
19124 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19125 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19126 (aarch64_expand_vec_perm_const_1): Handle polynomial
19127 d->perm.length () and d->perm elements.
19128 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19129 Apply to_constant to d->perm elements.
19130 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19131 polynomial CONST_VECTOR_NUNITS.
19132 (aarch64_move_pointer): Take amount as a poly_int64 rather
19134 (aarch64_progress_pointer): Avoid temporary variable.
19135 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19136 the mode attribute instead of GET_MODE.
19138 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19139 Alan Hayward <alan.hayward@arm.com>
19140 David Sherwood <david.sherwood@arm.com>
19142 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19143 x exists before using it.
19144 (aarch64_add_constant_internal): Rename to...
19145 (aarch64_add_offset_1): ...this. Replace regnum with separate
19146 src and dest rtxes. Handle the case in which they're different,
19147 including when the offset is zero. Replace scratchreg with an rtx.
19148 Use 2 additions if there is no spare register into which we can
19149 move a 16-bit constant.
19150 (aarch64_add_constant): Delete.
19151 (aarch64_add_offset): Replace reg with separate src and dest
19152 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19153 Use aarch64_add_offset_1.
19154 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19155 an rtx rather than an int. Take the delta as a poly_int64
19156 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19157 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19158 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19159 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19160 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19161 and aarch64_add_sp.
19162 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19163 aarch64_add_constant.
19165 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19167 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19168 Use scalar_float_mode.
19170 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19172 * config/aarch64/aarch64-simd.md
19173 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19174 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19175 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19176 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19177 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19178 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19179 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19180 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19181 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19182 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19184 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19187 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19188 targ_options->x_arm_arch_string is non NULL.
19190 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19192 * config/aarch64/aarch64.h
19193 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19195 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19198 * expmed.c (emit_store_flag_force): Swap if const op0
19199 and change VOIDmode to mode of op0.
19201 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19203 PR rtl-optimization/83761
19204 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19205 than bytes to mode_for_size.
19207 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19209 PR middle-end/83189
19210 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19211 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19214 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19216 PR middle-end/83575
19217 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19218 when in layout mode.
19219 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19220 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19223 2018-01-10 Michael Collison <michael.collison@arm.com>
19225 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19226 * config/aarch64/aarch64-option-extension.def: Add
19227 AARCH64_OPT_EXTENSION of 'fp16fml'.
19228 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19229 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19230 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19231 * config/aarch64/constraints.md (Ui7): New constraint.
19232 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19233 (VFMLA_SEL_W): Ditto.
19236 (VFMLA16_LOW): New int iterator.
19237 (VFMLA16_HIGH): Ditto.
19238 (UNSPEC_FMLAL): New unspec.
19239 (UNSPEC_FMLSL): Ditto.
19240 (UNSPEC_FMLAL2): Ditto.
19241 (UNSPEC_FMLSL2): Ditto.
19242 (f16mac): New code attribute.
19243 * config/aarch64/aarch64-simd-builtins.def
19244 (aarch64_fmlal_lowv2sf): Ditto.
19245 (aarch64_fmlsl_lowv2sf): Ditto.
19246 (aarch64_fmlalq_lowv4sf): Ditto.
19247 (aarch64_fmlslq_lowv4sf): Ditto.
19248 (aarch64_fmlal_highv2sf): Ditto.
19249 (aarch64_fmlsl_highv2sf): Ditto.
19250 (aarch64_fmlalq_highv4sf): Ditto.
19251 (aarch64_fmlslq_highv4sf): Ditto.
19252 (aarch64_fmlal_lane_lowv2sf): Ditto.
19253 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19254 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19255 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19256 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19257 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19258 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19259 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19260 (aarch64_fmlal_lane_highv2sf): Ditto.
19261 (aarch64_fmlsl_lane_highv2sf): Ditto.
19262 (aarch64_fmlal_laneq_highv2sf): Ditto.
19263 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19264 (aarch64_fmlalq_lane_highv4sf): Ditto.
19265 (aarch64_fmlsl_lane_highv4sf): Ditto.
19266 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19267 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19268 * config/aarch64/aarch64-simd.md:
19269 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19270 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19271 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19272 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19273 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19274 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19275 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19276 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19277 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19278 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19279 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19280 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19281 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19282 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19283 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19284 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19285 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19286 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19287 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19288 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19289 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19290 (vfmlsl_low_u32): Ditto.
19291 (vfmlalq_low_u32): Ditto.
19292 (vfmlslq_low_u32): Ditto.
19293 (vfmlal_high_u32): Ditto.
19294 (vfmlsl_high_u32): Ditto.
19295 (vfmlalq_high_u32): Ditto.
19296 (vfmlslq_high_u32): Ditto.
19297 (vfmlal_lane_low_u32): Ditto.
19298 (vfmlsl_lane_low_u32): Ditto.
19299 (vfmlal_laneq_low_u32): Ditto.
19300 (vfmlsl_laneq_low_u32): Ditto.
19301 (vfmlalq_lane_low_u32): Ditto.
19302 (vfmlslq_lane_low_u32): Ditto.
19303 (vfmlalq_laneq_low_u32): Ditto.
19304 (vfmlslq_laneq_low_u32): Ditto.
19305 (vfmlal_lane_high_u32): Ditto.
19306 (vfmlsl_lane_high_u32): Ditto.
19307 (vfmlal_laneq_high_u32): Ditto.
19308 (vfmlsl_laneq_high_u32): Ditto.
19309 (vfmlalq_lane_high_u32): Ditto.
19310 (vfmlslq_lane_high_u32): Ditto.
19311 (vfmlalq_laneq_high_u32): Ditto.
19312 (vfmlslq_laneq_high_u32): Ditto.
19313 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19314 (AARCH64_FL_FOR_ARCH8_4): New.
19315 (AARCH64_ISA_F16FML): New ISA flag.
19316 (TARGET_F16FML): New feature flag for fp16fml.
19317 (doc/invoke.texi): Document new fp16fml option.
19319 2018-01-10 Michael Collison <michael.collison@arm.com>
19321 * config/aarch64/aarch64-builtins.c:
19322 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19323 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19324 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19325 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19326 (AARCH64_ISA_SHA3): New ISA flag.
19327 (TARGET_SHA3): New feature flag for sha3.
19328 * config/aarch64/iterators.md (sha512_op): New int attribute.
19329 (CRYPTO_SHA512): New int iterator.
19330 (UNSPEC_SHA512H): New unspec.
19331 (UNSPEC_SHA512H2): Ditto.
19332 (UNSPEC_SHA512SU0): Ditto.
19333 (UNSPEC_SHA512SU1): Ditto.
19334 * config/aarch64/aarch64-simd-builtins.def
19335 (aarch64_crypto_sha512hqv2di): New builtin.
19336 (aarch64_crypto_sha512h2qv2di): Ditto.
19337 (aarch64_crypto_sha512su0qv2di): Ditto.
19338 (aarch64_crypto_sha512su1qv2di): Ditto.
19339 (aarch64_eor3qv8hi): Ditto.
19340 (aarch64_rax1qv2di): Ditto.
19341 (aarch64_xarqv2di): Ditto.
19342 (aarch64_bcaxqv8hi): Ditto.
19343 * config/aarch64/aarch64-simd.md:
19344 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19345 (aarch64_crypto_sha512su0qv2di): Ditto.
19346 (aarch64_crypto_sha512su1qv2di): Ditto.
19347 (aarch64_eor3qv8hi): Ditto.
19348 (aarch64_rax1qv2di): Ditto.
19349 (aarch64_xarqv2di): Ditto.
19350 (aarch64_bcaxqv8hi): Ditto.
19351 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19352 (vsha512h2q_u64): Ditto.
19353 (vsha512su0q_u64): Ditto.
19354 (vsha512su1q_u64): Ditto.
19355 (veor3q_u16): Ditto.
19356 (vrax1q_u64): Ditto.
19357 (vxarq_u64): Ditto.
19358 (vbcaxq_u16): Ditto.
19359 * config/arm/types.md (crypto_sha512): New type attribute.
19360 (crypto_sha3): Ditto.
19361 (doc/invoke.texi): Document new sha3 option.
19363 2018-01-10 Michael Collison <michael.collison@arm.com>
19365 * config/aarch64/aarch64-builtins.c:
19366 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19367 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19368 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19369 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19370 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19371 (AARCH64_ISA_SM4): New ISA flag.
19372 (TARGET_SM4): New feature flag for sm4.
19373 * config/aarch64/aarch64-simd-builtins.def
19374 (aarch64_sm3ss1qv4si): Ditto.
19375 (aarch64_sm3tt1aq4si): Ditto.
19376 (aarch64_sm3tt1bq4si): Ditto.
19377 (aarch64_sm3tt2aq4si): Ditto.
19378 (aarch64_sm3tt2bq4si): Ditto.
19379 (aarch64_sm3partw1qv4si): Ditto.
19380 (aarch64_sm3partw2qv4si): Ditto.
19381 (aarch64_sm4eqv4si): Ditto.
19382 (aarch64_sm4ekeyqv4si): Ditto.
19383 * config/aarch64/aarch64-simd.md:
19384 (aarch64_sm3ss1qv4si): Ditto.
19385 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19386 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19387 (aarch64_sm4eqv4si): Ditto.
19388 (aarch64_sm4ekeyqv4si): Ditto.
19389 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19390 (sm3part_op): Ditto.
19391 (CRYPTO_SM3TT): Ditto.
19392 (CRYPTO_SM3PART): Ditto.
19393 (UNSPEC_SM3SS1): New unspec.
19394 (UNSPEC_SM3TT1A): Ditto.
19395 (UNSPEC_SM3TT1B): Ditto.
19396 (UNSPEC_SM3TT2A): Ditto.
19397 (UNSPEC_SM3TT2B): Ditto.
19398 (UNSPEC_SM3PARTW1): Ditto.
19399 (UNSPEC_SM3PARTW2): Ditto.
19400 (UNSPEC_SM4E): Ditto.
19401 (UNSPEC_SM4EKEY): Ditto.
19402 * config/aarch64/constraints.md (Ui2): New constraint.
19403 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19404 * config/arm/types.md (crypto_sm3): New type attribute.
19405 (crypto_sm4): Ditto.
19406 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19407 (vsm3tt1aq_u32): Ditto.
19408 (vsm3tt1bq_u32): Ditto.
19409 (vsm3tt2aq_u32): Ditto.
19410 (vsm3tt2bq_u32): Ditto.
19411 (vsm3partw1q_u32): Ditto.
19412 (vsm3partw2q_u32): Ditto.
19413 (vsm4eq_u32): Ditto.
19414 (vsm4ekeyq_u32): Ditto.
19415 (doc/invoke.texi): Document new sm4 option.
19417 2018-01-10 Michael Collison <michael.collison@arm.com>
19419 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19420 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19421 (AARCH64_FL_FOR_ARCH8_4): New.
19422 (AARCH64_FL_V8_4): New flag.
19423 (doc/invoke.texi): Document new armv8.4-a option.
19425 2018-01-10 Michael Collison <michael.collison@arm.com>
19427 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19428 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19429 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19430 * config/aarch64/aarch64-option-extension.def: Add
19431 AARCH64_OPT_EXTENSION of 'sha2'.
19432 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19433 (crypto): Disable sha2 and aes if crypto disabled.
19434 (crypto): Enable aes and sha2 if enabled.
19435 (simd): Disable sha2 and aes if simd disabled.
19436 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19438 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19439 (TARGET_SHA2): New feature flag for sha2.
19440 (TARGET_AES): New feature flag for aes.
19441 * config/aarch64/aarch64-simd.md:
19442 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19443 conditional on TARGET_AES.
19444 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19445 (aarch64_crypto_sha1hsi): Make pattern conditional
19447 (aarch64_crypto_sha1hv4si): Ditto.
19448 (aarch64_be_crypto_sha1hv4si): Ditto.
19449 (aarch64_crypto_sha1su1v4si): Ditto.
19450 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19451 (aarch64_crypto_sha1su0v4si): Ditto.
19452 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19453 (aarch64_crypto_sha256su0v4si): Ditto.
19454 (aarch64_crypto_sha256su1v4si): Ditto.
19455 (doc/invoke.texi): Document new aes and sha2 options.
19457 2018-01-10 Martin Sebor <msebor@redhat.com>
19459 PR tree-optimization/83781
19460 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19463 2018-01-11 Martin Sebor <msebor@gmail.com>
19464 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19466 PR tree-optimization/83501
19467 PR tree-optimization/81703
19469 * tree-ssa-strlen.c (get_string_cst): Rename...
19470 (get_string_len): ...to this. Handle global constants.
19471 (handle_char_store): Adjust.
19473 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19474 Jim Wilson <jimw@sifive.com>
19476 * config/riscv/riscv-protos.h (riscv_output_return): New.
19477 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19478 (riscv_attribute_table, riscv_output_return),
19479 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19480 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19481 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19483 (riscv_expand_prologue): Add early return for naked function.
19484 (riscv_expand_epilogue): Likewise.
19485 (riscv_function_ok_for_sibcall): Return false for naked function.
19486 (riscv_set_current_function): New.
19487 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19488 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19489 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19490 * doc/extend.texi (RISC-V Function Attributes): New.
19492 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19494 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19495 check for 128-bit long double before checking TCmode.
19496 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19497 128-bit long doubles before checking TFmode or TCmode.
19498 (FLOAT128_IBM_P): Likewise.
19500 2018-01-10 Martin Sebor <msebor@redhat.com>
19502 PR tree-optimization/83671
19503 * builtins.c (c_strlen): Unconditionally return zero for the empty
19505 Use -Warray-bounds for warnings.
19506 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19507 for non-constant array indices with COMPONENT_REF, arrays of
19508 arrays, and pointers to arrays.
19509 (gimple_fold_builtin_strlen): Determine and set length range for
19510 non-constant character arrays.
19512 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19514 PR middle-end/81897
19515 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19518 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19520 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19522 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19525 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19526 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19527 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19528 indexed_or_indirect_operand predicate.
19529 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19530 (*vsx_le_perm_load_v8hi): Likewise.
19531 (*vsx_le_perm_load_v16qi): Likewise.
19532 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19533 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19534 (*vsx_le_perm_store_v8hi): Likewise.
19535 (*vsx_le_perm_store_v16qi): Likewise.
19536 (eight unnamed splitters): Likewise.
19538 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19540 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19541 * config/rs6000/emmintrin.h: Likewise.
19542 * config/rs6000/mmintrin.h: Likewise.
19543 * config/rs6000/xmmintrin.h: Likewise.
19545 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19548 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19550 * tree.c (tree_nop_conversion): Return true for location wrapper
19552 (maybe_wrap_with_location): New function.
19553 (selftest::check_strip_nops): New function.
19554 (selftest::test_location_wrappers): New function.
19555 (selftest::tree_c_tests): Call it.
19556 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19557 (maybe_wrap_with_location): New decl.
19558 (EXPR_LOCATION_WRAPPER_P): New macro.
19559 (location_wrapper_p): New inline function.
19560 (tree_strip_any_location_wrapper): New inline function.
19562 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19565 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19566 stack_realign_offset for the largest alignment of stack slot
19568 (ix86_find_max_used_stack_alignment): New function.
19569 (ix86_finalize_stack_frame_flags): Use it. Set
19570 max_used_stack_alignment if we don't realign stack.
19571 * config/i386/i386.h (machine_function): Add
19572 max_used_stack_alignment.
19574 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19576 * config/arm/arm.opt (-mbranch-cost): New option.
19577 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19580 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19583 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19584 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19586 2018-01-10 Richard Biener <rguenther@suse.de>
19589 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19590 early out so it also covers the case where we have a non-NULL
19593 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19595 PR tree-optimization/83753
19596 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19597 for non-strided grouped accesses if the number of elements is 1.
19599 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19602 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19603 * i386.h (TARGET_USE_GATHER): Define.
19604 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19606 2018-01-10 Martin Liska <mliska@suse.cz>
19609 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19610 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19612 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19613 CLEANUP_NO_PARTITIONING is not set.
19615 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19617 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19618 for vectors, as a partial revert of r254296.
19619 * rtl.h (const_vec_p): Delete.
19620 (const_vec_duplicate_p): Don't test for vector CONSTs.
19621 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19622 * expmed.c (make_tree): Likewise.
19625 * common.md (E, F): Use CONSTANT_P instead of checking for
19627 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19628 checking for CONST_VECTOR.
19630 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19632 PR middle-end/83575
19633 * predict.c (force_edge_cold): Handle in more sane way edges
19634 with no prediction.
19636 2018-01-09 Carl Love <cel@us.ibm.com>
19638 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19640 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19641 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19642 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19643 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19644 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19645 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19646 * config/rs6000/rs6000-protos.h: Add extern defition for
19647 rs6000_generate_float2_double_code.
19648 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19650 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19651 (float2_v2df): Add define_expand.
19653 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19656 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19657 op_mode in the force_to_mode call.
19659 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19661 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19662 instead of checking each element individually.
19663 (aarch64_evpc_uzp): Likewise.
19664 (aarch64_evpc_zip): Likewise.
19665 (aarch64_evpc_ext): Likewise.
19666 (aarch64_evpc_rev): Likewise.
19667 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19668 instead of checking each element individually. Return true without
19670 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19671 whether all selected elements come from the same input, instead of
19672 checking each element individually. Remove calls to gen_rtx_REG,
19673 start_sequence and end_sequence and instead assert that no rtl is
19676 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19678 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19679 order of HIGH and CONST checks.
19681 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19683 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19684 if the destination isn't an SSA_NAME.
19686 2018-01-09 Richard Biener <rguenther@suse.de>
19688 PR tree-optimization/83668
19689 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19691 (canonicalize_loop_form): ... here, renamed from ...
19692 (canonicalize_loop_closed_ssa_form): ... this and amended to
19693 swap successor edges for loop exit blocks to make us use
19694 the RPO order we need for initial schedule generation.
19696 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19698 PR tree-optimization/64811
19699 * match.pd: When optimizing comparisons with Inf, avoid
19700 introducing or losing exceptions from comparisons with NaN.
19702 2018-01-09 Martin Liska <mliska@suse.cz>
19705 * asan.c (shadow_mem_size): Add gcc_assert.
19707 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19709 Don't save registers in main().
19712 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19713 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19714 * config/avr/avr.c (avr_set_current_function): Don't error if
19715 naked, OS_task or OS_main are specified at the same time.
19716 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19718 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19720 * common/config/avr/avr-common.c (avr_option_optimization_table):
19721 Switch on -mmain-is-OS_task for optimizing compilations.
19723 2018-01-09 Richard Biener <rguenther@suse.de>
19725 PR tree-optimization/83572
19726 * graphite.c: Include cfganal.h.
19727 (graphite_transform_loops): Connect infinite loops to exit
19728 and remove fake edges at the end.
19730 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19732 * ipa-inline.c (edge_badness): Revert accidental checkin.
19734 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19737 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19738 symbols; not inline clones.
19740 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19743 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19744 hard registers. Formatting fixes.
19746 PR preprocessor/83722
19747 * gcc.c (try_generate_repro): Pass
19748 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19749 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19752 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19753 Kito Cheng <kito.cheng@gmail.com>
19755 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19756 (riscv_leaf_function_p): Delete.
19757 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19759 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19761 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19763 (do_ifelse): New function.
19764 (do_isel): New function.
19765 (do_sub3): New function.
19766 (do_add3): New function.
19767 (do_load_mask_compare): New function.
19768 (do_overlap_load_compare): New function.
19769 (expand_compare_loop): New function.
19770 (expand_block_compare): Call expand_compare_loop() when appropriate.
19771 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19772 option description.
19773 (-mblock-compare-inline-loop-limit): New option.
19775 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19778 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19779 Reverse order of second and third operands in first alternative.
19780 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19781 of first and second elements in UNSPEC_VPERMR vector.
19782 (altivec_expand_vec_perm_le): Likewise.
19784 2018-01-08 Jeff Law <law@redhat.com>
19786 PR rtl-optimizatin/81308
19787 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19788 (process_switch): If group_case_labels makes a change, then set
19790 (pass_convert_switch::execute): If a switch is converted, then
19791 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19793 PR rtl-optimization/81308
19794 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19797 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19799 PR target/83663 - Revert r255946
19800 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19801 generation for cases where splatting a value is not useful.
19802 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19803 across a vec_duplicate and a paradoxical subreg forming a vector
19804 mode to a vec_concat.
19806 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19808 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19809 -march=armv8.3-a variants.
19810 * config/arm/t-multilib: Likewise.
19811 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19813 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19815 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19817 (cceq_ior_compare_complement): Give it a name so I can use it, and
19818 change boolean_or_operator predicate to boolean_operator so it can
19819 be used to generate a crand.
19820 (eqne): New code iterator.
19821 (bd/bd_neg): New code_attrs.
19822 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19823 a single define_insn.
19824 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19825 decrement (bdnzt/bdnzf/bdzt/bdzf).
19826 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19827 with the new names of the branch decrement patterns, and added the
19828 names of the branch decrement conditional patterns.
19830 2018-01-08 Richard Biener <rguenther@suse.de>
19832 PR tree-optimization/83563
19833 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19836 2018-01-08 Richard Biener <rguenther@suse.de>
19838 PR middle-end/83713
19839 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19841 2018-01-08 Richard Biener <rguenther@suse.de>
19843 PR tree-optimization/83685
19844 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19845 references to abnormals.
19847 2018-01-08 Richard Biener <rguenther@suse.de>
19850 * dwarf2out.c (output_indirect_strings): Handle empty
19851 skeleton_debug_str_hash.
19852 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19854 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19856 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19857 (emit_store_direct): Likewise.
19858 (arc_trampoline_adjust_address): Likewise.
19859 (arc_asm_trampoline_template): New function.
19860 (arc_initialize_trampoline): Use asm_trampoline_template.
19861 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19862 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19863 * config/arc/arc.md (flush_icache): Delete pattern.
19865 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19867 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19868 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19871 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19874 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19875 by not USED_FOR_TARGET.
19876 (make_pass_resolve_sw_modes): Likewise.
19878 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19880 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19883 2018-01-08 Richard Biener <rguenther@suse.de>
19885 PR middle-end/83580
19886 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19888 2018-01-08 Richard Biener <rguenther@suse.de>
19890 PR middle-end/83517
19891 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19893 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19895 PR middle-end/81897
19896 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19897 basic blocks with a small number of successors.
19898 (convert_control_dep_chain_into_preds): Improve handling of
19900 (dump_predicates): Split apart into...
19901 (dump_pred_chain): ...here...
19902 (dump_pred_info): ...and here.
19903 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19904 (can_chain_union_be_invalidated_p): Improve check for invalidation
19906 (uninit_uses_cannot_happen): Avoid unnecessary if
19907 convert_control_dep_chain_into_preds yielded nothing.
19909 2018-01-06 Martin Sebor <msebor@redhat.com>
19911 PR tree-optimization/83640
19912 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19913 subtracting negative offset from size.
19914 (builtin_access::overlap): Adjust offset bounds of the access to fall
19915 within the size of the object if possible.
19917 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19919 PR rtl-optimization/83699
19920 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19921 extract_bit_field_as_subreg to cases in which the extracted
19922 value is also a vector.
19924 * lra-constraints.c (process_alt_operands): Test for the equivalence
19925 substitutions when detecting a possible reload cycle.
19927 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19930 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19931 by default if flag_selective_schedling{,2}. Formatting fixes.
19933 PR rtl-optimization/83682
19934 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19935 if it has non-VECTOR_MODE element mode.
19936 (vec_duplicate_p): Likewise.
19938 PR middle-end/83694
19939 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19940 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19942 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19945 * config/i386/i386-builtin.def
19946 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19947 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19948 Require also OPTION_MASK_ISA_AVX512F in addition to
19949 OPTION_MASK_ISA_GFNI.
19950 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19951 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19952 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19953 to OPTION_MASK_ISA_GFNI.
19954 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19955 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19956 OPTION_MASK_ISA_AVX512BW.
19957 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19958 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19959 addition to OPTION_MASK_ISA_GFNI.
19960 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19961 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19962 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19963 to OPTION_MASK_ISA_GFNI.
19964 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19965 a requirement for all ISAs rather than any of them with a few
19967 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19969 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19970 bitmasks to be enabled with 3 exceptions, instead of requiring any
19971 enabled ISA with lots of exceptions.
19972 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19973 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19974 Change avx512bw in isa attribute to avx512f.
19975 * config/i386/sgxintrin.h: Add license boilerplate.
19976 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19977 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19978 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19979 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19981 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19982 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19983 temporarily sse2 rather than sse if not enabled already.
19986 * config/i386/sse.md (VI248_VLBW): Rename to ...
19987 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19988 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19989 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19990 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19991 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19992 mode iterator instead of VI248_VLBW.
19994 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19996 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19997 (record_modified): Skip clobbers; add debug output.
19998 (param_change_prob): Use sreal frequencies.
20000 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20002 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20003 punt for user-aligned variables.
20005 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20007 * tree-chrec.c (chrec_contains_symbols): Return true for
20010 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20013 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20014 of (x|y) == x for BICS pattern.
20016 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20018 PR tree-optimization/83605
20019 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20020 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20023 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20025 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20026 * config/epiphany/rtems.h: New file.
20028 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20029 Uros Bizjak <ubizjak@gmail.com>
20032 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20033 QIreg_operand instead of register_operand predicate.
20034 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20035 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20036 comments instead of -fmitigate[-_]rop.
20038 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20041 * cgraphunit.c (symbol_table::compile): Switch to text_section
20042 before calling assembly_start debug hook.
20043 * run-rtl-passes.c (run_rtl_passes): Likewise.
20046 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20048 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20049 range_int_cst_p rather than !symbolic_range_p before calling
20050 extract_range_from_multiplicative_op_1.
20052 2018-01-04 Jeff Law <law@redhat.com>
20054 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20055 redundant test in assertion.
20057 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20059 * doc/rtl.texi: Document machine_mode wrapper classes.
20061 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20063 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20064 using tree_to_uhwi.
20066 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20068 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20069 the VEC_PERM_EXPR fold to fail.
20071 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20074 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20075 to switched_sections.
20077 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20080 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20081 test for d.testing.
20083 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20086 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20087 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20089 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20092 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20093 is BLKmode and bitpos not zero or mode change is needed.
20095 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20098 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20101 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20104 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20105 instead of MULT rtx. Update all corresponding splitters.
20106 (*saddl_se): Ditto.
20107 (*ssub<modesuffix>): Ditto.
20108 (*ssubl_se): Ditto.
20109 (*cmp_sadd_di): Update split patterns.
20110 (*cmp_sadd_si): Ditto.
20111 (*cmp_sadd_sidi): Ditto.
20112 (*cmp_ssub_di): Ditto.
20113 (*cmp_ssub_si): Ditto.
20114 (*cmp_ssub_sidi): Ditto.
20115 * config/alpha/predicates.md (const23_operand): New predicate.
20116 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20117 Look for ASHIFT, not MULT inner operand.
20118 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20120 2018-01-04 Martin Liska <mliska@suse.cz>
20122 PR gcov-profile/83669
20123 * gcov.c (output_intermediate_file): Add version to intermediate
20125 * doc/gcov.texi: Document new field 'version' in intermediate
20126 file format. Fix location of '-k' option of gcov command.
20128 2018-01-04 Martin Liska <mliska@suse.cz>
20131 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20133 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20135 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20137 2018-01-03 Martin Sebor <msebor@redhat.com>
20139 PR tree-optimization/83655
20140 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20141 checking calls with invalid arguments.
20143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20145 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20146 (vectorizable_mask_load_store): Delete.
20147 (vectorizable_call): Return false for masked loads and stores.
20148 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20149 instead of gimple_assign_rhs1.
20150 (vectorizable_load): Handle IFN_MASK_LOAD.
20151 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20155 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20157 (vectorizable_mask_load_store): ...here.
20158 (vectorizable_load): ...and here.
20160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20162 * tree-vect-stmts.c (vect_build_all_ones_mask)
20163 (vect_build_zero_merge_argument): New functions, split out from...
20164 (vectorizable_load): ...here.
20166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20168 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20170 (vectorizable_mask_load_store): ...here.
20171 (vectorizable_store): ...and here.
20173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20175 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20177 (vectorizable_mask_load_store): ...here.
20179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20181 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20182 (vect_model_store_cost): Take a vec_load_store_type instead of a
20184 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20185 (vect_model_store_cost): Take a vec_load_store_type instead of a
20187 (vectorizable_mask_load_store): Update accordingly.
20188 (vectorizable_store): Likewise.
20189 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20193 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20194 IFN_MASK_LOAD calls here rather than...
20195 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20198 Alan Hayward <alan.hayward@arm.com>
20199 David Sherwood <david.sherwood@arm.com>
20201 * expmed.c (extract_bit_field_1): For vector extracts,
20202 fall back to extract_bit_field_as_subreg if vec_extract
20205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20206 Alan Hayward <alan.hayward@arm.com>
20207 David Sherwood <david.sherwood@arm.com>
20209 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20210 they are variable or constant sized.
20211 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20212 slots for constant-sized data.
20214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20215 Alan Hayward <alan.hayward@arm.com>
20216 David Sherwood <david.sherwood@arm.com>
20218 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20219 handling COND_EXPRs with boolean comparisons, try to find a better
20220 basis for the mask type than the boolean itself.
20222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20224 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20225 is calculated and how it can be overridden.
20226 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20227 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20229 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20233 Alan Hayward <alan.hayward@arm.com>
20234 David Sherwood <david.sherwood@arm.com>
20236 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20237 Remove the mode argument.
20238 (aarch64_simd_valid_immediate): Remove the mode and inverse
20240 * config/aarch64/iterators.md (bitsize): New iterator.
20241 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20242 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20243 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20244 aarch64_simd_valid_immediate.
20245 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20246 (aarch64_reg_or_bic_imm): Likewise.
20247 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20248 with an insn_type enum and msl with a modifier_type enum.
20249 Replace element_width with a scalar_mode. Change the shift
20250 to unsigned int. Add constructors for scalar_float_mode and
20251 scalar_int_mode elements.
20252 (aarch64_vect_float_const_representable_p): Delete.
20253 (aarch64_can_const_movi_rtx_p)
20254 (aarch64_simd_scalar_immediate_valid_for_move)
20255 (aarch64_simd_make_constant): Update call to
20256 aarch64_simd_valid_immediate.
20257 (aarch64_advsimd_valid_immediate_hs): New function.
20258 (aarch64_advsimd_valid_immediate): Likewise.
20259 (aarch64_simd_valid_immediate): Remove mode and inverse
20260 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20261 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20262 and aarch64_float_const_representable_p on the result.
20263 (aarch64_output_simd_mov_immediate): Remove mode argument.
20264 Update call to aarch64_simd_valid_immediate and use of
20265 simd_immediate_info.
20266 (aarch64_output_scalar_simd_mov_immediate): Update call
20269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20270 Alan Hayward <alan.hayward@arm.com>
20271 David Sherwood <david.sherwood@arm.com>
20273 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20274 (mode_nunits): Likewise CONST_MODE_NUNITS.
20275 * machmode.def (ADJUST_NUNITS): Document.
20276 * genmodes.c (mode_data::need_nunits_adj): New field.
20277 (blank_mode): Update accordingly.
20278 (adj_nunits): New variable.
20279 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20281 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20282 listed in adj_nunits.
20283 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20284 listed in adj_nunits. Don't emit case statements for such modes.
20285 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20286 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20287 nothing if adj_nunits is nonnull.
20288 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20289 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20290 (emit_mode_fbit): Update use of print_maybe_const_decl.
20291 (emit_move_size): Likewise. Treat the array as non-const
20293 (emit_mode_adjustments): Handle adj_nunits.
20295 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20297 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20298 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20299 (VECTOR_MODES): Use it.
20300 (make_vector_modes): Take the prefix as an argument.
20302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20303 Alan Hayward <alan.hayward@arm.com>
20304 David Sherwood <david.sherwood@arm.com>
20306 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20307 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20308 for MODE_VECTOR_BOOL.
20309 * machmode.def (VECTOR_BOOL_MODE): Document.
20310 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20311 (make_vector_bool_mode): New function.
20312 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20314 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20315 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20317 * stor-layout.c (int_mode_for_mode): Likewise.
20318 * tree.c (build_vector_type_for_mode): Likewise.
20319 * varasm.c (output_constant_pool_2): Likewise.
20320 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20321 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20322 for MODE_VECTOR_BOOL.
20323 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20324 of mode class checks.
20325 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20326 instead of a list of mode class checks.
20327 (expand_vector_scalar_condition): Likewise.
20328 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20331 Alan Hayward <alan.hayward@arm.com>
20332 David Sherwood <david.sherwood@arm.com>
20334 * machmode.h (mode_size): Change from unsigned short to
20336 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20337 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20338 or if measurement_type is not polynomial.
20339 (fixed_size_mode::includes_p): Check for constant-sized modes.
20340 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20341 return a poly_uint16 rather than an unsigned short.
20342 (emit_mode_size): Change the type of mode_size from unsigned short
20343 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20344 (emit_mode_adjustments): Cope with polynomial vector sizes.
20345 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20347 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20349 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20350 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20351 * caller-save.c (setup_save_areas): Likewise.
20352 (replace_reg_with_saved_mem): Likewise.
20353 * calls.c (emit_library_call_value_1): Likewise.
20354 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20355 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20356 (gen_lowpart_for_combine): Likewise.
20357 * convert.c (convert_to_integer_1): Likewise.
20358 * cse.c (equiv_constant, cse_insn): Likewise.
20359 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20360 (cselib_subst_to_values): Likewise.
20361 * dce.c (word_dce_process_block): Likewise.
20362 * df-problems.c (df_word_lr_mark_ref): Likewise.
20363 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20364 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20365 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20366 (rtl_for_decl_location): Likewise.
20367 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20368 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20369 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20370 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20371 (expand_expr_real_1): Likewise.
20372 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20373 (pad_below): Likewise.
20374 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20375 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20376 * ira.c (get_subreg_tracking_sizes): Likewise.
20377 * ira-build.c (ira_create_allocno_objects): Likewise.
20378 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20379 (ira_sort_regnos_for_alter_reg): Likewise.
20380 * ira-costs.c (record_operand_costs): Likewise.
20381 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20382 (resolve_simple_move): Likewise.
20383 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20384 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20385 (lra_constraints): Likewise.
20386 (CONST_POOL_OK_P): Reject variable-sized modes.
20387 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20388 (add_pseudo_to_slot, lra_spill): Likewise.
20389 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20390 * optabs-query.c (get_best_extraction_insn): Likewise.
20391 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20392 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20393 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20394 * recog.c (offsettable_address_addr_space_p): Likewise.
20395 * regcprop.c (maybe_mode_change): Likewise.
20396 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20397 * regrename.c (build_def_use): Likewise.
20398 * regstat.c (dump_reg_info): Likewise.
20399 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20400 (find_reloads, find_reloads_subreg_address): Likewise.
20401 * reload1.c (eliminate_regs_1): Likewise.
20402 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20403 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20404 (simplify_binary_operation_1, simplify_subreg): Likewise.
20405 * targhooks.c (default_function_arg_padding): Likewise.
20406 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20407 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20408 (verify_gimple_assign_ternary): Likewise.
20409 * tree-inline.c (estimate_move_cost): Likewise.
20410 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20411 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20412 (get_address_cost_ainc): Likewise.
20413 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20414 (vect_supportable_dr_alignment): Likewise.
20415 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20416 (vectorizable_reduction): Likewise.
20417 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20418 (vectorizable_operation, vectorizable_load): Likewise.
20419 * tree.c (build_same_sized_truth_vector_type): Likewise.
20420 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20421 * var-tracking.c (emit_note_insn_var_location): Likewise.
20422 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20423 (ADDR_VEC_ALIGN): Likewise.
20425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20426 Alan Hayward <alan.hayward@arm.com>
20427 David Sherwood <david.sherwood@arm.com>
20429 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20431 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20432 or if measurement_type is polynomial.
20433 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20434 * combine.c (make_extraction): Likewise.
20435 * dse.c (find_shift_sequence): Likewise.
20436 * dwarf2out.c (mem_loc_descriptor): Likewise.
20437 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20438 (extract_bit_field, extract_low_bits): Likewise.
20439 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20440 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20441 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20442 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20443 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20444 * reload.c (find_reloads): Likewise.
20445 * reload1.c (alter_reg): Likewise.
20446 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20447 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20448 * tree-if-conv.c (predicate_mem_writes): Likewise.
20449 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20450 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20451 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20452 * valtrack.c (dead_debug_insert_temp): Likewise.
20453 * varasm.c (mergeable_constant_section): Likewise.
20454 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20457 Alan Hayward <alan.hayward@arm.com>
20458 David Sherwood <david.sherwood@arm.com>
20460 * expr.c (expand_assignment): Cope with polynomial mode sizes
20461 when assigning to a CONCAT.
20463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20464 Alan Hayward <alan.hayward@arm.com>
20465 David Sherwood <david.sherwood@arm.com>
20467 * machmode.h (mode_precision): Change from unsigned short to
20469 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20471 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20472 or if measurement_type is not polynomial.
20473 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20474 in which the mode is already known to be a scalar_int_mode.
20475 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20476 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20478 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20479 for GET_MODE_PRECISION.
20480 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20481 for GET_MODE_PRECISION.
20482 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20484 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20485 (expand_field_assignment, make_extraction): Likewise.
20486 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20487 (get_last_value): Likewise.
20488 * convert.c (convert_to_integer_1): Likewise.
20489 * cse.c (cse_insn): Likewise.
20490 * expr.c (expand_expr_real_1): Likewise.
20491 * lra-constraints.c (simplify_operand_subreg): Likewise.
20492 * optabs-query.c (can_atomic_load_p): Likewise.
20493 * optabs.c (expand_atomic_load): Likewise.
20494 (expand_atomic_store): Likewise.
20495 * ree.c (combine_reaching_defs): Likewise.
20496 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20497 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20498 * tree.h (type_has_mode_precision_p): Likewise.
20499 * ubsan.c (instrument_si_overflow): Likewise.
20501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20502 Alan Hayward <alan.hayward@arm.com>
20503 David Sherwood <david.sherwood@arm.com>
20505 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20506 polynomial numbers of units.
20507 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20508 (valid_vector_subparts_p): New function.
20509 (build_vector_type): Remove temporary shim and take the number
20510 of units as a poly_uint64 rather than an int.
20511 (build_opaque_vector_type): Take the number of units as a
20512 poly_uint64 rather than an int.
20513 * tree.c (build_vector_from_ctor): Handle polynomial
20514 TYPE_VECTOR_SUBPARTS.
20515 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20516 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20517 (build_vector_from_val): If the number of units is variable,
20518 use build_vec_duplicate_cst for constant operands and
20519 VEC_DUPLICATE_EXPR otherwise.
20520 (make_vector_type): Remove temporary is_constant ().
20521 (build_vector_type, build_opaque_vector_type): Take the number of
20522 units as a poly_uint64 rather than an int.
20523 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20525 * cfgexpand.c (expand_debug_expr): Likewise.
20526 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20527 (store_constructor, expand_expr_real_1): Likewise.
20528 (const_scalar_mask_from_tree): Likewise.
20529 * fold-const-call.c (fold_const_reduction): Likewise.
20530 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20531 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20532 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20533 (fold_relational_const): Likewise.
20534 (native_interpret_vector): Likewise. Change the size from an
20535 int to an unsigned int.
20536 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20537 TYPE_VECTOR_SUBPARTS.
20538 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20539 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20540 duplicating a non-constant operand into a variable-length vector.
20541 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20542 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20543 * ipa-icf.c (sem_variable::equals): Likewise.
20544 * match.pd: Likewise.
20545 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20546 * print-tree.c (print_node): Likewise.
20547 * stor-layout.c (layout_type): Likewise.
20548 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20549 * tree-cfg.c (verify_gimple_comparison): Likewise.
20550 (verify_gimple_assign_binary): Likewise.
20551 (verify_gimple_assign_ternary): Likewise.
20552 (verify_gimple_assign_single): Likewise.
20553 * tree-pretty-print.c (dump_generic_node): Likewise.
20554 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20555 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20556 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20557 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20558 (vect_shift_permute_load_chain): Likewise.
20559 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20560 (expand_vector_condition, optimize_vector_constructor): Likewise.
20561 (lower_vec_perm, get_compute_type): Likewise.
20562 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20563 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20564 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20565 (vect_recog_mask_conversion_pattern): Likewise.
20566 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20567 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20568 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20569 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20570 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20571 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20572 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20573 (supportable_widening_operation): Likewise.
20574 (supportable_narrowing_operation): Likewise.
20575 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20577 * varasm.c (output_constant): Likewise.
20579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20580 Alan Hayward <alan.hayward@arm.com>
20581 David Sherwood <david.sherwood@arm.com>
20583 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20584 so that both the length == 3 and length != 3 cases set up their
20585 own permute vectors. Add comments explaining why we know the
20586 number of elements is constant.
20587 (vect_permute_load_chain): Likewise.
20589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20590 Alan Hayward <alan.hayward@arm.com>
20591 David Sherwood <david.sherwood@arm.com>
20593 * machmode.h (mode_nunits): Change from unsigned char to
20595 (ONLY_FIXED_SIZE_MODES): New macro.
20596 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20597 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20598 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20600 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20601 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20602 or if measurement_type is not polynomial.
20603 * genmodes.c (ZERO_COEFFS): New macro.
20604 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20606 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20607 Use ZERO_COEFFS when emitting initializers.
20608 * data-streamer.h (bp_pack_poly_value): New function.
20609 (bp_unpack_poly_value): Likewise.
20610 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20611 for GET_MODE_NUNITS.
20612 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20613 for GET_MODE_NUNITS.
20614 * tree.c (make_vector_type): Remove temporary shim and make
20615 the real function take the number of units as a poly_uint64
20616 rather than an int.
20617 (build_vector_type_for_mode): Handle polynomial nunits.
20618 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20619 * emit-rtl.c (const_vec_series_p_1): Likewise.
20620 (gen_rtx_CONST_VECTOR): Likewise.
20621 * fold-const.c (test_vec_duplicate_folding): Likewise.
20622 * genrecog.c (validate_pattern): Likewise.
20623 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20624 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20625 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20626 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20627 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20628 * rtlanal.c (subreg_get_info): Likewise.
20629 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20630 (vect_grouped_load_supported): Likewise.
20631 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20632 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20633 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20634 (simplify_const_unary_operation, simplify_binary_operation_1)
20635 (simplify_const_binary_operation, simplify_ternary_operation)
20636 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20637 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20638 instead of CONST_VECTOR_NUNITS.
20639 * varasm.c (output_constant_pool_2): Likewise.
20640 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20641 explicit-encoded elements in the XVEC for variable-length vectors.
20643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20645 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20648 Alan Hayward <alan.hayward@arm.com>
20649 David Sherwood <david.sherwood@arm.com>
20651 * coretypes.h (fixed_size_mode): Declare.
20652 (fixed_size_mode_pod): New typedef.
20653 * builtins.h (target_builtins::x_apply_args_mode)
20654 (target_builtins::x_apply_result_mode): Change type to
20655 fixed_size_mode_pod.
20656 * builtins.c (apply_args_size, apply_result_size, result_vector)
20657 (expand_builtin_apply_args_1, expand_builtin_apply)
20658 (expand_builtin_return): Update accordingly.
20660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20662 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20663 * cselib.c (cselib_hash_rtx): Likewise.
20664 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20665 CONST_VECTOR encoding.
20667 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20668 Jeff Law <law@redhat.com>
20671 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20672 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20673 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20674 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20677 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20678 explicitly probe *sp in a noreturn function if there were any callee
20679 register saves or frame pointer is needed.
20681 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20684 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20685 BLKmode for ternary, binary or unary expressions.
20688 * var-tracking.c (delete_vta_debug_insn): New inline function.
20689 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20690 insns from get_insns () to NULL instead of each bb separately.
20691 Use delete_vta_debug_insn. No longer static.
20692 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20693 delete_vta_debug_insns callers.
20694 * rtl.h (delete_vta_debug_insns): Declare.
20695 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20696 instead of variable_tracking_main.
20698 2018-01-03 Martin Sebor <msebor@redhat.com>
20700 PR tree-optimization/83603
20701 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20702 arguments past the endof the argument list in functions declared
20703 without a prototype.
20704 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20705 Avoid checking when arguments are null.
20707 2018-01-03 Martin Sebor <msebor@redhat.com>
20710 * doc/extend.texi (attribute const): Fix a typo.
20711 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20712 issuing -Wsuggest-attribute for void functions.
20714 2018-01-03 Martin Sebor <msebor@redhat.com>
20716 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20717 offset_int::from instead of wide_int::to_shwi.
20718 (maybe_diag_overlap): Remove assertion.
20719 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20720 * gimple-ssa-sprintf.c (format_directive): Same.
20721 (parse_directive): Same.
20722 (sprintf_dom_walker::compute_format_length): Same.
20723 (try_substitute_return_value): Same.
20725 2018-01-03 Jeff Law <law@redhat.com>
20727 PR middle-end/83654
20728 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20729 non-constant residual for zero at runtime and avoid probing in
20730 that case. Reorganize code for trailing problem to mirror handling
20733 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20735 PR tree-optimization/83501
20736 * tree-ssa-strlen.c (get_string_cst): New.
20737 (handle_char_store): Call get_string_cst.
20739 2018-01-03 Martin Liska <mliska@suse.cz>
20741 PR tree-optimization/83593
20742 * tree-ssa-strlen.c: Include tree-cfg.h.
20743 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20744 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20745 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20747 (strlen_dom_walker::before_dom_children): Call
20748 gimple_purge_dead_eh_edges. Dump tranformation with details
20750 (strlen_dom_walker::before_dom_children): Update call by adding
20751 new argument cleanup_eh.
20752 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20754 2018-01-03 Martin Liska <mliska@suse.cz>
20757 * cif-code.def (VARIADIC_THUNK): New enum value.
20758 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20761 2018-01-03 Jan Beulich <jbeulich@suse.com>
20763 * sse.md (mov<mode>_internal): Tighten condition for when to use
20764 vmovdqu<ssescalarsize> for TI and OI modes.
20766 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20768 Update copyright years.
20770 2018-01-03 Martin Liska <mliska@suse.cz>
20773 * ipa-visibility.c (function_and_variable_visibility): Skip
20774 functions with noipa attribure.
20776 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20778 * gcc.c (process_command): Update copyright notice dates.
20779 * gcov-dump.c (print_version): Ditto.
20780 * gcov.c (print_version): Ditto.
20781 * gcov-tool.c (print_version): Ditto.
20782 * gengtype.c (create_file): Ditto.
20783 * doc/cpp.texi: Bump @copying's copyright year.
20784 * doc/cppinternals.texi: Ditto.
20785 * doc/gcc.texi: Ditto.
20786 * doc/gccint.texi: Ditto.
20787 * doc/gcov.texi: Ditto.
20788 * doc/install.texi: Ditto.
20789 * doc/invoke.texi: Ditto.
20791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20793 * vector-builder.h (vector_builder::m_full_nelts): Change from
20794 unsigned int to poly_uint64.
20795 (vector_builder::full_nelts): Update prototype accordingly.
20796 (vector_builder::new_vector): Likewise.
20797 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20798 (vector_builder::operator ==): Likewise.
20799 (vector_builder::finalize): Likewise.
20800 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20801 Take the number of elements as a poly_uint64 rather than an
20803 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20804 from unsigned int to poly_uint64.
20805 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20806 (vec_perm_indices::new_vector): Likewise.
20807 (vec_perm_indices::length): Likewise.
20808 (vec_perm_indices::nelts_per_input): Likewise.
20809 (vec_perm_indices::input_nelts): Likewise.
20810 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20811 number of elements per input as a poly_uint64 rather than an
20812 unsigned int. Use the original encoding for variable-length
20813 vectors, rather than clamping each individual element.
20814 For the second and subsequent elements in each pattern,
20815 clamp the step and base before clamping their sum.
20816 (vec_perm_indices::series_p): Handle polynomial element counts.
20817 (vec_perm_indices::all_in_range_p): Likewise.
20818 (vec_perm_indices_to_tree): Likewise.
20819 (vec_perm_indices_to_rtx): Likewise.
20820 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20821 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20822 (tree_vector_builder::new_binary_operation): Handle polynomial
20823 element counts. Return false if we need to know the number
20824 of elements at compile time.
20825 * fold-const.c (fold_vec_perm): Punt if the number of elements
20826 isn't known at compile time.
20828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20830 * vec-perm-indices.h (vec_perm_builder): Change element type
20831 from HOST_WIDE_INT to poly_int64.
20832 (vec_perm_indices::element_type): Update accordingly.
20833 (vec_perm_indices::clamp): Handle polynomial element_types.
20834 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20835 (vec_perm_indices::all_in_range_p): Likewise.
20836 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20838 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20839 polynomial vec_perm_indices element types.
20840 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20841 * fold-const.c (fold_vec_perm): Likewise.
20842 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20843 * tree-vect-generic.c (lower_vec_perm): Likewise.
20844 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20845 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20846 element type to HOST_WIDE_INT.
20848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20849 Alan Hayward <alan.hayward@arm.com>
20850 David Sherwood <david.sherwood@arm.com>
20852 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20853 rather than an int. Use plus_constant.
20854 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20855 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20858 Alan Hayward <alan.hayward@arm.com>
20859 David Sherwood <david.sherwood@arm.com>
20861 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20862 a HOST_WIDE_INT to a poly_int64.
20864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20865 Alan Hayward <alan.hayward@arm.com>
20866 David Sherwood <david.sherwood@arm.com>
20868 * calls.c (load_register_parameters): Cope with polynomial
20869 mode sizes. Require a constant size for BLKmode parameters
20870 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20871 forces a parameter to be padded at the lsb end in order to
20872 fill a complete number of words, require the parameter size
20873 to be ordered wrt UNITS_PER_WORD.
20875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20876 Alan Hayward <alan.hayward@arm.com>
20877 David Sherwood <david.sherwood@arm.com>
20879 * reload1.c (spill_stack_slot_width): Change element type
20880 from unsigned int to poly_uint64_pod.
20881 (alter_reg): Treat mode sizes as polynomial.
20883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20884 Alan Hayward <alan.hayward@arm.com>
20885 David Sherwood <david.sherwood@arm.com>
20887 * reload.c (complex_word_subreg_p): New function.
20888 (reload_inner_reg_of_subreg, push_reload): Use it.
20890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20891 Alan Hayward <alan.hayward@arm.com>
20892 David Sherwood <david.sherwood@arm.com>
20894 * lra-constraints.c (process_alt_operands): Reject matched
20895 operands whose sizes aren't ordered.
20896 (match_reload): Refer to this check here.
20898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20899 Alan Hayward <alan.hayward@arm.com>
20900 David Sherwood <david.sherwood@arm.com>
20902 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20903 that the mode size is in the set {1, 2, 4, 8, 16}.
20905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20906 Alan Hayward <alan.hayward@arm.com>
20907 David Sherwood <david.sherwood@arm.com>
20909 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20910 Use plus_constant instead of gen_rtx_PLUS.
20912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20913 Alan Hayward <alan.hayward@arm.com>
20914 David Sherwood <david.sherwood@arm.com>
20916 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20917 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20918 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20919 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20920 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20921 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20922 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20923 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20924 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20925 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20927 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20928 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20929 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20930 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20931 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20932 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20933 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20934 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20935 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20936 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20938 * expr.c (emit_move_resolve_push): Treat the input and result
20939 of PUSH_ROUNDING as a poly_int64.
20940 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20941 (emit_push_insn): Likewise.
20942 * lra-eliminations.c (mark_not_eliminable): Likewise.
20943 * recog.c (push_operand): Likewise.
20944 * reload1.c (elimination_effects): Likewise.
20945 * rtlanal.c (nonzero_bits1): Likewise.
20946 * calls.c (store_one_arg): Likewise. Require the padding to be
20947 known at compile time.
20949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20950 Alan Hayward <alan.hayward@arm.com>
20951 David Sherwood <david.sherwood@arm.com>
20953 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20954 Use plus_constant instead of gen_rtx_PLUS.
20956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20957 Alan Hayward <alan.hayward@arm.com>
20958 David Sherwood <david.sherwood@arm.com>
20960 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20961 rather than an int.
20963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20964 Alan Hayward <alan.hayward@arm.com>
20965 David Sherwood <david.sherwood@arm.com>
20967 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20968 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20969 via stack temporaries. Treat the mode size as polynomial too.
20971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20972 Alan Hayward <alan.hayward@arm.com>
20973 David Sherwood <david.sherwood@arm.com>
20975 * expr.c (expand_expr_real_2): When handling conversions involving
20976 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20977 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20978 as a poly_uint64 too.
20980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20981 Alan Hayward <alan.hayward@arm.com>
20982 David Sherwood <david.sherwood@arm.com>
20984 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20987 Alan Hayward <alan.hayward@arm.com>
20988 David Sherwood <david.sherwood@arm.com>
20990 * combine.c (can_change_dest_mode): Handle polynomial
20991 REGMODE_NATURAL_SIZE.
20992 * expmed.c (store_bit_field_1): Likewise.
20993 * expr.c (store_constructor): Likewise.
20994 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20995 and polynomial REGMODE_NATURAL_SIZE.
20996 (gen_lowpart_common): Likewise.
20997 * reginfo.c (record_subregs_of_mode): Likewise.
20998 * rtlanal.c (read_modify_subreg_p): Likewise.
21000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21001 Alan Hayward <alan.hayward@arm.com>
21002 David Sherwood <david.sherwood@arm.com>
21004 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21005 numbers of elements.
21007 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21008 Alan Hayward <alan.hayward@arm.com>
21009 David Sherwood <david.sherwood@arm.com>
21011 * match.pd: Cope with polynomial numbers of vector elements.
21013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21014 Alan Hayward <alan.hayward@arm.com>
21015 David Sherwood <david.sherwood@arm.com>
21017 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21018 in a POINTER_PLUS_EXPR.
21020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21021 Alan Hayward <alan.hayward@arm.com>
21022 David Sherwood <david.sherwood@arm.com>
21024 * omp-simd-clone.c (simd_clone_subparts): New function.
21025 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21026 (ipa_simd_modify_function_body): Likewise.
21028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21029 Alan Hayward <alan.hayward@arm.com>
21030 David Sherwood <david.sherwood@arm.com>
21032 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21033 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21034 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21035 (expand_vector_condition, vector_element): Likewise.
21036 (subparts_gt): New function.
21037 (get_compute_type): Use subparts_gt.
21038 (count_type_subparts): Delete.
21039 (expand_vector_operations_1): Use subparts_gt instead of
21040 count_type_subparts.
21042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21043 Alan Hayward <alan.hayward@arm.com>
21044 David Sherwood <david.sherwood@arm.com>
21046 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21047 (vect_compile_time_alias): ...this new function. Do the calculation
21048 on poly_ints rather than trees.
21049 (vect_prune_runtime_alias_test_list): Update call accordingly.
21051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21052 Alan Hayward <alan.hayward@arm.com>
21053 David Sherwood <david.sherwood@arm.com>
21055 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21057 (vect_schedule_slp_instance): Likewise.
21059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21060 Alan Hayward <alan.hayward@arm.com>
21061 David Sherwood <david.sherwood@arm.com>
21063 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21064 constant and extern definitions for variable-length vectors.
21065 (vect_get_constant_vectors): Note that the number of units
21066 is known to be constant.
21068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21069 Alan Hayward <alan.hayward@arm.com>
21070 David Sherwood <david.sherwood@arm.com>
21072 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21073 of units as polynomial. Choose between WIDE and NARROW based
21076 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21077 Alan Hayward <alan.hayward@arm.com>
21078 David Sherwood <david.sherwood@arm.com>
21080 * tree-vect-stmts.c (simd_clone_subparts): New function.
21081 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21083 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21084 Alan Hayward <alan.hayward@arm.com>
21085 David Sherwood <david.sherwood@arm.com>
21087 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21088 vectors as polynomial. Use build_index_vector for
21089 IFN_GOMP_SIMD_LANE.
21091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21092 Alan Hayward <alan.hayward@arm.com>
21093 David Sherwood <david.sherwood@arm.com>
21095 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21096 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21097 for variable-length vectors.
21098 (vectorizable_mask_load_store): Treat the number of units as
21099 polynomial, asserting that it is constant if the condition has
21100 already been enforced.
21101 (vectorizable_store, vectorizable_load): Likewise.
21103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21104 Alan Hayward <alan.hayward@arm.com>
21105 David Sherwood <david.sherwood@arm.com>
21107 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21108 of units as polynomial. Punt if we can't tell at compile time
21109 which vector contains the final result.
21111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21112 Alan Hayward <alan.hayward@arm.com>
21113 David Sherwood <david.sherwood@arm.com>
21115 * tree-vect-loop.c (vectorizable_induction): Treat the number
21116 of units as polynomial. Punt on SLP inductions. Use an integer
21117 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21118 cast of such a series for variable-length floating-point
21121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21122 Alan Hayward <alan.hayward@arm.com>
21123 David Sherwood <david.sherwood@arm.com>
21125 * tree.h (build_index_vector): Declare.
21126 * tree.c (build_index_vector): New function.
21127 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21128 of units as polynomial, forcibly converting it to a constant if
21129 vectorizable_reduction has already enforced the condition.
21130 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21131 to create a {1,2,3,...} vector.
21132 (vectorizable_reduction): Treat the number of units as polynomial.
21133 Choose vectype_in based on the largest scalar element size rather
21134 than the smallest number of units. Enforce the restrictions
21137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21138 Alan Hayward <alan.hayward@arm.com>
21139 David Sherwood <david.sherwood@arm.com>
21141 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21142 number of units as polynomial.
21144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21145 Alan Hayward <alan.hayward@arm.com>
21146 David Sherwood <david.sherwood@arm.com>
21148 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21149 * target.def (autovectorize_vector_sizes): Return the vector sizes
21150 by pointer, using vector_sizes rather than a bitmask.
21151 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21152 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21153 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21155 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21156 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21157 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21158 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21159 * omp-general.c (omp_max_vf): Likewise.
21160 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21161 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21162 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21163 * tree-vect-slp.c (vect_slp_bb): Likewise.
21164 * doc/tm.texi: Regenerate.
21165 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21167 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21168 the vector size as a poly_uint64 rather than an unsigned int.
21169 (current_vector_size): Change from an unsigned int to a poly_uint64.
21170 (get_vectype_for_scalar_type): Update accordingly.
21171 * tree.h (build_truth_vector_type): Take the size and number of
21172 units as a poly_uint64 rather than an unsigned int.
21173 (build_vector_type): Add a temporary overload that takes
21174 the number of units as a poly_uint64 rather than an unsigned int.
21175 * tree.c (make_vector_type): Likewise.
21176 (build_truth_vector_type): Take the number of units as a poly_uint64
21177 rather than an unsigned int.
21179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21180 Alan Hayward <alan.hayward@arm.com>
21181 David Sherwood <david.sherwood@arm.com>
21183 * target.def (get_mask_mode): Take the number of units and length
21184 as poly_uint64s rather than unsigned ints.
21185 * targhooks.h (default_get_mask_mode): Update accordingly.
21186 * targhooks.c (default_get_mask_mode): Likewise.
21187 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21188 * doc/tm.texi: Regenerate.
21190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21191 Alan Hayward <alan.hayward@arm.com>
21192 David Sherwood <david.sherwood@arm.com>
21194 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21195 * omp-general.c (omp_max_vf): Likewise.
21196 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21197 (expand_omp_simd): Handle polynomial safelen.
21198 * omp-low.c (omplow_simd_context): Add a default constructor.
21199 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21200 (lower_rec_simd_input_clauses): Update accordingly.
21201 (lower_rec_input_clauses): Likewise.
21203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21207 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21208 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21209 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21210 (vect_analyze_slp_cost): Likewise.
21211 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21212 (vect_model_load_cost): Likewise.
21214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21215 Alan Hayward <alan.hayward@arm.com>
21216 David Sherwood <david.sherwood@arm.com>
21218 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21219 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21220 from an unsigned int * to a poly_uint64_pod *.
21221 (calculate_unrolling_factor): New function.
21222 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21225 Alan Hayward <alan.hayward@arm.com>
21226 David Sherwood <david.sherwood@arm.com>
21228 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21229 from an unsigned int to a poly_uint64.
21230 (_loop_vec_info::slp_unrolling_factor): Likewise.
21231 (_loop_vec_info::vectorization_factor): Change from an int
21233 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21234 (vect_get_num_vectors): New function.
21235 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21236 (vect_get_num_copies): Use vect_get_num_vectors.
21237 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21238 to an unsigned int *.
21239 (vect_analyze_data_refs): Change min_vf from an int * to a
21241 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21242 than an unsigned HOST_WIDE_INT.
21243 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21244 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21245 to an unsigned int *.
21246 (vect_analyze_data_ref_dependences): Likewise.
21247 (vect_compute_data_ref_alignment): Handle polynomial vf.
21248 (vect_enhance_data_refs_alignment): Likewise.
21249 (vect_prune_runtime_alias_test_list): Likewise.
21250 (vect_shift_permute_load_chain): Likewise.
21251 (vect_supportable_dr_alignment): Likewise.
21252 (dependence_distance_ge_vf): Take the vectorization factor as a
21253 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21254 (vect_analyze_data_refs): Change min_vf from an int * to a
21256 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21257 vfm1 as a poly_uint64 rather than an int. Make the same change
21258 for the returned bound_scalar.
21259 (vect_gen_vector_loop_niters): Handle polynomial vf.
21260 (vect_do_peeling): Likewise. Update call to
21261 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21262 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21264 * tree-vect-loop.c (vect_determine_vectorization_factor)
21265 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21266 (vect_get_known_peeling_cost): Likewise.
21267 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21268 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21269 (vect_transform_loop): Likewise. Use the lowest possible VF when
21270 updating the upper bounds of the loop.
21271 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21272 rather than an int.
21273 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21274 polynomial unroll factors.
21275 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21276 (vect_make_slp_decision): Likewise.
21277 (vect_supported_load_permutation_p): Likewise, and polynomial
21279 (vect_analyze_slp_cost): Handle polynomial vf.
21280 (vect_slp_analyze_node_operations): Likewise.
21281 (vect_slp_analyze_bb_1): Likewise.
21282 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21283 than an unsigned HOST_WIDE_INT.
21284 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21285 (vectorizable_load): Handle polynomial vf.
21286 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21288 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21291 Alan Hayward <alan.hayward@arm.com>
21292 David Sherwood <david.sherwood@arm.com>
21294 * match.pd: Handle bit operations involving three constants
21295 and try to fold one pair.
21297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21299 * tree-vect-loop-manip.c: Include gimple-fold.h.
21300 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21301 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21302 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21303 Add a path that uses a step of VF instead of 1, but disable it
21305 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21306 and niters_no_overflow parameters. Update calls to
21307 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21308 Create a new SSA name if the latter choses to use a ste other
21309 than zero, and return it via niters_vector_mult_vf_var.
21310 * tree-vect-loop.c (vect_transform_loop): Update calls to
21311 vect_do_peeling, vect_gen_vector_loop_niters and
21312 slpeel_make_loop_iterate_ntimes.
21313 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21314 (vect_gen_vector_loop_niters): Update declarations after above changes.
21316 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21318 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21319 128-bit round to integer instructions.
21320 (ceil<mode>2): Likewise.
21321 (btrunc<mode>2): Likewise.
21322 (round<mode>2): Likewise.
21324 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21326 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21327 unaligned VSX load/store on P8/P9.
21328 (expand_block_clear): Allow the use of unaligned VSX
21329 load/store on P8/P9.
21331 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21333 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21335 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21336 swap associated with both a load and a store.
21338 2018-01-02 Andrew Waterman <andrew@sifive.com>
21340 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21341 * config/riscv/riscv.md (clear_cache): Use it.
21343 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21345 * web.c: Remove out-of-date comment.
21347 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21349 * expr.c (fixup_args_size_notes): Check that any existing
21350 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21351 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21352 (emit_single_push_insn): ...here.
21354 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21356 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21357 (const_vector_encoded_nelts): New function.
21358 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21359 (const_vector_int_elt, const_vector_elt): Declare.
21360 * emit-rtl.c (const_vector_int_elt_1): New function.
21361 (const_vector_elt): Likewise.
21362 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21363 of CONST_VECTOR_ELT.
21365 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21367 * expr.c: Include rtx-vector-builder.h.
21368 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21369 directly on the tree encoding.
21370 (const_vector_from_tree): Likewise.
21371 * optabs.c: Include rtx-vector-builder.h.
21372 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21373 sequence of "u" values.
21374 * vec-perm-indices.c: Include rtx-vector-builder.h.
21375 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21376 directly on the vec_perm_indices encoding.
21378 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21380 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21381 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21382 * rtx-vector-builder.h: New file.
21383 * rtx-vector-builder.c: Likewise.
21384 * rtl.h (rtx_def::u2): Add a const_vector field.
21385 (CONST_VECTOR_NPATTERNS): New macro.
21386 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21387 (CONST_VECTOR_DUPLICATE_P): Likewise.
21388 (CONST_VECTOR_STEPPED_P): Likewise.
21389 (CONST_VECTOR_ENCODED_ELT): Likewise.
21390 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21391 (unwrap_const_vec_duplicate): Likewise.
21392 (const_vec_series_p): Check for a non-duplicated vector encoding.
21393 Say that the function only returns true for integer vectors.
21394 * emit-rtl.c: Include rtx-vector-builder.h.
21395 (gen_const_vec_duplicate_1): Delete.
21396 (gen_const_vector): Call gen_const_vec_duplicate instead of
21397 gen_const_vec_duplicate_1.
21398 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21399 (gen_const_vec_duplicate): Use rtx_vector_builder.
21400 (gen_const_vec_series): Likewise.
21401 (gen_rtx_CONST_VECTOR): Likewise.
21402 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21403 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21404 Build a new vector rather than modifying a CONST_VECTOR in-place.
21405 (handle_special_swappables): Update call accordingly.
21406 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21407 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21408 Build a new vector rather than modifying a CONST_VECTOR in-place.
21409 (handle_special_swappables): Update call accordingly.
21411 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21413 * simplify-rtx.c (simplify_const_binary_operation): Use
21414 CONST_VECTOR_ELT instead of XVECEXP.
21416 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21418 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21419 the selector elements to be different from the data elements
21420 if the selector is a VECTOR_CST.
21421 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21422 ssizetype for the selector.
21424 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21426 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21427 before testing each element individually.
21428 * tree-vect-generic.c (lower_vec_perm): Likewise.
21430 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21432 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21433 * selftest-run-tests.c (selftest::run_tests): Call it.
21434 * vector-builder.h (vector_builder::operator ==): New function.
21435 (vector_builder::operator !=): Likewise.
21436 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21437 (vec_perm_indices::all_from_input_p): New function.
21438 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21439 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21440 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21441 instead of reading the VECTOR_CST directly. Detect whether both
21442 vector inputs are the same before constructing the vec_perm_indices,
21443 and update the number of inputs argument accordingly. Use the
21444 utility functions added above. Only construct sel2 if we need to.
21446 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21448 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21449 the broadcast of the low byte.
21450 (expand_mult_highpart): Use an explicit encoding for the permutes.
21451 * optabs-query.c (can_mult_highpart_p): Likewise.
21452 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21453 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21454 (vectorizable_bswap): Likewise.
21455 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21456 explicit encoding for the power-of-2 permutes.
21457 (vect_permute_store_chain): Likewise.
21458 (vect_grouped_load_supported): Likewise.
21459 (vect_permute_load_chain): Likewise.
21461 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21463 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21464 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21465 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21466 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21467 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21468 (vect_gen_perm_mask_any): Likewise.
21470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21472 * int-vector-builder.h: New file.
21473 * vec-perm-indices.h: Include int-vector-builder.h.
21474 (vec_perm_indices): Redefine as an int_vector_builder.
21475 (auto_vec_perm_indices): Delete.
21476 (vec_perm_builder): Redefine as a stand-alone class.
21477 (vec_perm_indices::vec_perm_indices): New function.
21478 (vec_perm_indices::clamp): Likewise.
21479 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21480 (vec_perm_indices::new_vector): New function.
21481 (vec_perm_indices::new_expanded_vector): Update for new
21482 vec_perm_indices class.
21483 (vec_perm_indices::rotate_inputs): New function.
21484 (vec_perm_indices::all_in_range_p): Operate directly on the
21485 encoded form, without computing elided elements.
21486 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21487 encoding. Update for new vec_perm_indices class.
21488 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21489 the given vec_perm_builder.
21490 (expand_vec_perm_var): Update vec_perm_builder constructor.
21491 (expand_mult_highpart): Use vec_perm_builder instead of
21492 auto_vec_perm_indices.
21493 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21494 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21495 or double series encoding as appropriate.
21496 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21497 vec_perm_indices instead of auto_vec_perm_indices.
21498 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21499 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21500 (vect_permute_store_chain): Likewise.
21501 (vect_grouped_load_supported): Likewise.
21502 (vect_permute_load_chain): Likewise.
21503 (vect_shift_permute_load_chain): Likewise.
21504 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21505 (vect_transform_slp_perm_load): Likewise.
21506 (vect_schedule_slp_instance): Likewise.
21507 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21508 (vectorizable_mask_load_store): Likewise.
21509 (vectorizable_bswap): Likewise.
21510 (vectorizable_store): Likewise.
21511 (vectorizable_load): Likewise.
21512 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21513 vec_perm_indices instead of auto_vec_perm_indices. Use
21514 tree_to_vec_perm_builder to read the vector from a tree.
21515 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21516 vec_perm_builder instead of a vec_perm_indices.
21517 (have_whole_vector_shift): Use vec_perm_builder and
21518 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21519 truncation to calc_vec_perm_mask_for_shift.
21520 (vect_create_epilog_for_reduction): Likewise.
21521 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21522 from auto_vec_perm_indices to vec_perm_indices.
21523 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21524 instead of changing individual elements.
21525 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21526 the vector in d.perm.
21527 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21528 from auto_vec_perm_indices to vec_perm_indices.
21529 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21530 instead of changing individual elements.
21531 (arm_vectorize_vec_perm_const): Use new_vector to install
21532 the vector in d.perm.
21533 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21534 Update vec_perm_builder constructor.
21535 (rs6000_expand_interleave): Likewise.
21536 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21537 (rs6000_expand_interleave): Likewise.
21539 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21541 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21542 to qimode could truncate the indices.
21543 * optabs.c (expand_vec_perm_var): Likewise.
21545 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21547 * Makefile.in (OBJS): Add vec-perm-indices.o.
21548 * vec-perm-indices.h: New file.
21549 * vec-perm-indices.c: Likewise.
21550 * target.h (vec_perm_indices): Replace with a forward class
21552 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21553 * optabs.h: Include vec-perm-indices.h.
21554 (expand_vec_perm): Delete.
21555 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21556 (expand_vec_perm_const): Declare.
21557 * target.def (vec_perm_const_ok): Replace with...
21558 (vec_perm_const): ...this new hook.
21559 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21560 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21561 * doc/tm.texi: Regenerate.
21562 * optabs.def (vec_perm_const): Delete.
21563 * doc/md.texi (vec_perm_const): Likewise.
21564 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21565 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21566 expand_vec_perm for constant permutation vectors. Assert that
21567 the mode of variable permutation vectors is the integer equivalent
21568 of the mode that is being permuted.
21569 * optabs-query.h (selector_fits_mode_p): Declare.
21570 * optabs-query.c: Include vec-perm-indices.h.
21571 (selector_fits_mode_p): New function.
21572 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21573 is defined, instead of checking whether the vec_perm_const_optab
21574 exists. Use targetm.vectorize.vec_perm_const instead of
21575 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21576 fit in the vector mode before using a variable permute.
21577 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21578 vec_perm_indices instead of an rtx.
21579 (expand_vec_perm): Replace with...
21580 (expand_vec_perm_const): ...this new function. Take the selector
21581 as a vec_perm_indices rather than an rtx. Also take the mode of
21582 the selector. Update call to shift_amt_for_vec_perm_mask.
21583 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21584 Use vec_perm_indices::new_expanded_vector to expand the original
21585 selector into bytes. Check whether the indices fit in the vector
21586 mode before using a variable permute.
21587 (expand_vec_perm_var): Make global.
21588 (expand_mult_highpart): Use expand_vec_perm_const.
21589 * fold-const.c: Includes vec-perm-indices.h.
21590 * tree-ssa-forwprop.c: Likewise.
21591 * tree-vect-data-refs.c: Likewise.
21592 * tree-vect-generic.c: Likewise.
21593 * tree-vect-loop.c: Likewise.
21594 * tree-vect-slp.c: Likewise.
21595 * tree-vect-stmts.c: Likewise.
21596 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21598 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21599 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21600 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21601 (aarch64_vectorize_vec_perm_const): ...this new function.
21602 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21603 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21604 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21605 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21606 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21607 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21608 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21610 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21611 check for NEON modes.
21612 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21613 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21614 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21615 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21617 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21618 the old VEC_PERM_CONST conditions.
21619 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21620 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21621 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21622 (ia64_vectorize_vec_perm_const_ok): Merge into...
21623 (ia64_vectorize_vec_perm_const): ...this new function.
21624 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21625 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21626 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21627 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21628 * config/mips/mips.c (mips_expand_vec_perm_const)
21629 (mips_vectorize_vec_perm_const_ok): Merge into...
21630 (mips_vectorize_vec_perm_const): ...this new function.
21631 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21632 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21633 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21634 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21635 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21636 (rs6000_expand_vec_perm_const): Delete.
21637 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21639 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21640 (altivec_expand_vec_perm_const_le): Take each operand individually.
21641 Operate on constant selectors rather than rtxes.
21642 (altivec_expand_vec_perm_const): Likewise. Update call to
21643 altivec_expand_vec_perm_const_le.
21644 (rs6000_expand_vec_perm_const): Delete.
21645 (rs6000_vectorize_vec_perm_const_ok): Delete.
21646 (rs6000_vectorize_vec_perm_const): New function.
21647 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21648 an element count and rtx array.
21649 (rs6000_expand_extract_even): Update call accordingly.
21650 (rs6000_expand_interleave): Likewise.
21651 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21652 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21653 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21654 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21655 (rs6000_expand_vec_perm_const): Delete.
21656 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21657 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21658 (altivec_expand_vec_perm_const_le): Take each operand individually.
21659 Operate on constant selectors rather than rtxes.
21660 (altivec_expand_vec_perm_const): Likewise. Update call to
21661 altivec_expand_vec_perm_const_le.
21662 (rs6000_expand_vec_perm_const): Delete.
21663 (rs6000_vectorize_vec_perm_const_ok): Delete.
21664 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21665 reference to the SPE evmerge intructions.
21666 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21667 an element count and rtx array.
21668 (rs6000_expand_extract_even): Update call accordingly.
21669 (rs6000_expand_interleave): Likewise.
21670 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21671 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21673 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21675 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21677 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21678 vector mode and that that mode matches the mode of the data
21680 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21681 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21682 directly using expand_vec_perm_1 when forcing selectors into
21684 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21686 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21688 * optabs-query.h (can_vec_perm_p): Delete.
21689 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21690 * optabs-query.c (can_vec_perm_p): Split into...
21691 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21692 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21693 particular selector is valid.
21694 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21695 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21696 (vect_grouped_load_supported): Likewise.
21697 (vect_shift_permute_load_chain): Likewise.
21698 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21699 (vect_transform_slp_perm_load): Likewise.
21700 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21701 (vectorizable_bswap): Likewise.
21702 (vect_gen_perm_mask_checked): Likewise.
21703 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21704 implementations of variable permutation vectors into account
21705 when deciding which selector to use.
21706 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21707 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21708 with a false third argument.
21709 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21710 to test whether the constant selector is valid and can_vec_perm_var_p
21711 to test whether a variable selector is valid.
21713 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21715 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21716 * optabs-query.c (can_vec_perm_p): Likewise.
21717 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21718 instead of vec_perm_indices.
21719 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21720 (vect_gen_perm_mask_checked): Likewise,
21721 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21722 (vect_gen_perm_mask_checked): Likewise,
21724 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21726 * optabs-query.h (qimode_for_vec_perm): Declare.
21727 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21728 (qimode_for_vec_perm): ...this new function.
21729 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21731 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21733 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21734 does not have a conditional at the top.
21736 2018-01-02 Richard Biener <rguenther@suse.de>
21738 * ipa-inline.c (big_speedup_p): Fix expression.
21740 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21743 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21746 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21750 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21751 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21752 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21753 cond_taken_branch_cost 3->4.
21755 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21757 PR tree-optimization/83581
21758 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21759 TODO_cleanup_cfg if any changes have been made.
21761 PR middle-end/83608
21762 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21763 convert_modes if target mode has the right side, but different mode
21766 PR middle-end/83609
21767 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21768 last argument when extracting from CONCAT. If either from_real or
21769 from_imag is NULL, use expansion through memory. If result is not
21770 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21771 the parts directly to inner mode, if even that fails, use expansion
21774 PR middle-end/83623
21775 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21776 check for bswap in mode rather than HImode and use that in expand_unop
21779 Copyright (C) 2018 Free Software Foundation, Inc.
21781 Copying and distribution of this file, with or without modification,
21782 are permitted in any medium without royalty provided the copyright
21783 notice and this notice are preserved.