[45/46] Remove vect_stmt_in_region_p
[gcc.git] / gcc / ChangeLog
1 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2
3 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
4 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
5
6 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7
8 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10 (vec_info::free_stmt_vec_info): New private member functions.
11 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13 * tree-parloops.c (gather_scalar_reductions): Remove calls to
14 set_stmt_vec_info_vec and free_stmt_vec_infos.
15 * tree-vect-loop.c (_loop_vec_info): Remove call to
16 set_stmt_vec_info_vec.
17 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
18 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
19 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
20 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
21 (vec_info::free_stmt_vec_info): ...these new functions. Remove
22 assignments in {vec_info::,}new_stmt_vec_info that are redundant
23 with the clearing in the xcalloc.
24 (stmt_vec_info_vec): Delete.
25 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
26 (vectorize_loops): Likewise.
27 (vec_info::~vec_info): Remove argument from call to
28 free_stmt_vec_infos.
29 (vec_info::add_stmt): Remove vinfo argument from call to
30 new_stmt_vec_info.
31
32 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
33
34 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
35 rather than a gimple stmt.
36 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
37 information for pattern statements when passed the original
38 statement; instead wait to be passed the pattern statement itself.
39 Don't call set_vinfo_for_stmt here.
40 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
41 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
42 stmt_vec_infos here.
43 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
44 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
45 stmt_vec_infos entry.
46
47 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
48
49 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
50 * tree-vectorizer.c (vec_info::replace_stmt): New function.
51 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
52 * tree-vect-stmts.c (vectorizable_call): Likewise.
53 (vectorizable_simd_clone_call): Likewise.
54
55 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
56
57 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
58 * tree-vectorizer.c (vec_info::remove_stmt): New function.
59 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
60 * tree-vect-loop.c (vect_transform_loop): Likewise.
61 * tree-vect-slp.c (vect_schedule_slp): Likewise.
62 * tree-vect-stmts.c (vect_remove_stores): Likewise.
63
64 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
65
66 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
67 (vect_dr_stmt): Delete.
68 * tree-vectorizer.c (vec_info::lookup_dr): New function.
69 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
70 of DR_VECT_AUX.
71 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
72 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
73 (vect_verify_datarefs_alignment, vect_peeling_supportable)
74 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
75 (vect_analyze_data_refs): Likewise.
76 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
77 argument.
78 (vect_find_same_alignment_drs): Likewise.
79 (vect_slp_analyze_node_dependences): Update calls accordingly.
80 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
81 instead of DR_VECT_AUX.
82 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
83 of a vector data references. Use vec_info::lookup_dr instead of
84 DR_VECT_AUX.
85 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
86 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
87 instead of DR_VECT_AUX.
88
89 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
90
91 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
92 dr_vec_info.
93 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
94 accordingly.
95 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
96 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
97 (vect_gen_prolog_loop_niters): Likewise.
98
99 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
100
101 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
102 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
103 (vect_known_alignment_in_bytes, vect_dr_behavior)
104 (vect_get_scalar_dr_size): Take references as dr_vec_infos
105 instead of data_references. Update calls to other routines for
106 which the same change has been made.
107 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
108 dr_vec_infos instead of stmt_vec_infos.
109 (vect_analyze_data_ref_dependence): Update call accordingly.
110 (vect_slp_analyze_data_ref_dependence)
111 (vect_record_base_alignments): Use DR_VECT_AUX.
112 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
113 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
114 (vector_alignment_reachable_p, vect_get_data_access_cost)
115 (vect_peeling_supportable, vect_analyze_group_access_1)
116 (vect_analyze_group_access, vect_analyze_data_ref_access)
117 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
118 (vect_compile_time_alias, vect_small_gap_p)
119 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
120 (vect_supportable_dr_alignment): Take references as dr_vec_infos
121 instead of data_references. Update calls to other routines for
122 which the same change has been made.
123 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
124 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
125 (vect_slp_analyze_and_verify_node_alignment)
126 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
127 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
128 (vect_setup_realignment): Use dr_vec_infos. Update calls after
129 above changes.
130 (_vect_peel_info::dr): Replace with...
131 (_vect_peel_info::dr_info): ...this new field.
132 (vect_peeling_hash_get_most_frequent)
133 (vect_peeling_hash_choose_best_peeling): Update accordingly.
134 (vect_peeling_hash_get_lowest_cost):
135 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
136 routines for which the same change has been made.
137 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
138 data_reference.
139 * tree-vect-loop-manip.c (get_misalign_in_elems)
140 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
141 above changes.
142 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
143 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
144 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
145 (get_group_load_store_type, get_negative_load_store_type)
146 (vect_get_data_ptr_increment, vectorizable_store)
147 (vectorizable_load): Likewise.
148 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
149 Update calls to other routines for which the same change has been made.
150
151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
152
153 * tree-vectorizer.h (vec_info::move_dr): New member function.
154 (dataref_aux): Rename to...
155 (dr_vec_info): ...this and add "dr" and "stmt" fields.
156 (_stmt_vec_info::dr_aux): Update accordingly.
157 (_stmt_vec_info::data_ref_info): Delete.
158 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
159 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
160 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
161 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
162 of data_ref.
163 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
164 (STMT_VINFO_DR_INFO): New macro.
165 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
166 (set_dr_misalignment): Update after rename of dataref_aux.
167 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
168 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
169 initialization of STMT_VINFO_DATA_REF.
170 * tree-vectorizer.c (vec_info::move_dr): New function.
171 * tree-vect-patterns.c (vect_recog_bool_pattern)
172 (vect_recog_mask_conversion_pattern)
173 (vect_recog_gather_scatter_pattern): Use it.
174 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
175 the "dr" and "stmt" fields of dr_vec_info instead of
176 STMT_VINFO_DATA_REF.
177
178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
179
180 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
181 (is_pattern_stmt_p): Use it.
182 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
183 on pattern statements.
184
185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
186
187 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
188 original stmt as a stmt_vec_info rather than a gimple stmt.
189 (vect_pattern_recog_1): Take the statement directly as a
190 stmt_vec_info, rather than via a gimple_stmt_iterator.
191 Update call to vect_mark_pattern_stmts.
192 (vect_pattern_recog): Update calls accordingly.
193
194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
195
196 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
197 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
198 a vect_def_type for the first argument.
199 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
200 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
201 operand if it isn't defined by a vectorized statement.
202 (vect_build_gather_load_calls): Remove the mask_dt argument and
203 update calls to vect_get_vec_def_for_stmt_copy.
204 (vectorizable_bswap): Likewise the dt argument.
205 (vectorizable_call): Update calls to vectorizable_bswap and
206 vect_get_vec_def_for_stmt_copy.
207 (vectorizable_simd_clone_call, vectorizable_assignment)
208 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
209 (vectorizable_comparison): Update calls to
210 vect_get_vec_def_for_stmt_copy.
211 (vectorizable_store): Likewise. Remove now-unnecessary calls to
212 vect_is_simple_use.
213 (vect_get_loop_based_defs): Remove dt argument and update call
214 to vect_get_vec_def_for_stmt_copy.
215 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
216 and vect_get_vec_def_for_stmt_copy.
217 (vectorizable_load): Update calls to vect_build_gather_load_calls
218 and vect_get_vec_def_for_stmt_copy.
219 * tree-vect-loop.c (vect_create_epilog_for_reduction)
220 (vectorizable_reduction, vectorizable_live_operation): Update calls
221 to vect_get_vec_def_for_stmt_copy.
222
223 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
224
225 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
226 and gimple stmt arguments with a stmt_vec_info.
227 (vect_record_base_alignments): Update calls accordingly.
228 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
229 and gimple stmt arguments with a stmt_vec_info.
230 (vect_build_slp_tree_1): Remove vinfo argument and update call
231 to vect_record_max_nunits.
232 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
233 and vect_record_max_nunits.
234
235 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
236
237 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
238 file and take a stmt_vec_info instead of a gimple stmt.
239 (supportable_widening_operation, vect_finish_replace_stmt)
240 (vect_finish_stmt_generation, vect_get_store_rhs)
241 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
242 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
243 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
244 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
245 (vect_create_data_ref_ptr, bump_vector_ptr)
246 (vect_permute_store_chain, vect_setup_realignment)
247 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
248 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
249 (vectorizable_reduction, vectorizable_induction)
250 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
251 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
252 than gimple stmts as arguments.
253 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
254 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
255 (can_group_stmts_p, vect_check_gather_scatter)
256 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
257 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
258 (vect_permute_load_chain, vect_shift_permute_load_chain)
259 (vect_transform_grouped_load)
260 (vect_record_grouped_load_vectors): Likewise.
261 * tree-vect-loop.c (vect_fixup_reduc_chain)
262 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
263 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
264 (vectorizable_reduction, vectorizable_induction)
265 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
266 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
267 (vect_get_load_store_mask): Likewise.
268 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
269 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
270 * tree-vect-stmts.c (vect_mark_relevant)
271 (is_simple_and_all_uses_invariant)
272 (exist_non_indexing_operands_for_use_p, process_use)
273 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
274 (vect_get_vec_def_for_operand, vect_get_vec_defs)
275 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
276 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
277 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
278 (get_negative_load_store_type, get_load_store_type)
279 (vect_check_load_store_mask, vect_check_store_rhs)
280 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
281 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
282 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
283 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
284 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
285 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
286 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
287 (supportable_widening_operation): Likewise.
288
289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
290
291 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
292 a stmt_vec_info instead of a gcall.
293 (vect_check_gather_scatter): Update call accordingly.
294 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
295 of a gphi.
296 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
297 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
298 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
299 instead of a gimple stmt.
300 (vect_transform_loop): Update calls accordingly.
301 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
302 stmt_vec_infos instead of gimple stmts.
303 (vect_analyze_slp_instance): Update use accordingly.
304 * tree-vect-stmts.c (read_vector_array, write_vector_array)
305 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
306 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
307 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
308 (vect_gen_widened_results_half, vect_get_loop_based_defs)
309 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
310 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
311 down to subroutines.
312
313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
314
315 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
316 of the worklist from a vector of gimple stmts to a vector of
317 stmt_vec_infos.
318 * tree-vect-stmts.c (vect_mark_relevant, process_use)
319 (vect_mark_stmts_to_be_vectorized): Likewise
320
321 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
322
323 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
324 statement before passing it to vect_analyze_stmt.
325 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
326 the chain of phi vector definitions. Track the exit phi via its
327 stmt_vec_info.
328 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
329 STMT_VINFO_REDUC_DEF.
330 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
331 stmt_vec_infos to handle the statement chains.
332 (vect_get_slp_defs): Record the first statement in the node
333 using a stmt_vec_info.
334 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
335 statements here and pass their stmt_vec_info down to subroutines.
336 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
337 down to vect_finish_stmt_generation.
338 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
339 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
340 stmt_vec_infos to subroutines.
341 (vect_remove_stores): Use stmt_vec_infos to handle the statement
342 chains.
343
344 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
345
346 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
347 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
348 (vect_permute_store_chain, vect_setup_realignment)
349 (vect_permute_load_chain, vect_shift_permute_load_chain)
350 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
351 stmts internally, and when passing values to other vectorizer routines.
352 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
353 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
354 (vect_analyze_loop_operations, get_initial_def_for_reduction)
355 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
356 (vectorizable_reduction, vectorizable_induction)
357 (vectorizable_live_operation, vect_transform_loop_stmt)
358 (vect_transform_loop): Likewise.
359 * tree-vect-patterns.c (vect_reassociating_reduction_p)
360 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
361 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
362 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
363 (vect_slp_analyze_node_operations_1): Likewise.
364 * tree-vect-stmts.c (vect_mark_relevant, process_use)
365 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
366 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
367 (vect_finish_stmt_generation_1, get_group_load_store_type)
368 (get_load_store_type, vect_build_gather_load_calls)
369 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
370 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
371 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
372 (vectorizable_store, vectorizable_load, vectorizable_condition)
373 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
374 (supportable_widening_operation): Likewise.
375 (vect_get_vector_types_for_stmt): Likewise.
376 * tree-vectorizer.h (vect_dr_behavior): Likewise.
377
378 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
379
380 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
381 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
382 (vect_permute_store_chain, vect_permute_load_chain)
383 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
384 repeated stmt_vec_info lookups.
385 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
386 (vect_update_ivs_after_vectorizer): Likewise.
387 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
388 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
389 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
390 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
391 (vect_bb_slp_scalar_cost): Likewise.
392 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
393
394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
395
396 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
397 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
398 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
399 to get gassigns and gcalls, rather than operating on generc gimple
400 stmts.
401 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
402 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
403 (vectorizable_load, vect_analyze_stmt): Likewise.
404 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
405
406 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
407
408 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
409 return stmt_vec_infos rather than gimple stmts. Do not accept
410 null arguments.
411 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
412 of a gimple stmt.
413 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
414 Update use of get_later_stmt.
415 (vect_get_constant_vectors): Update call accordingly.
416 (vect_schedule_slp_instance): Likewise
417 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
418 (vect_slp_analyze_instance_dependence): Likewise.
419 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
420
421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
422
423 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
424 (stmt_info_for_cost::stmt_info): ...this new field.
425 (add_stmt_costs): Update accordingly.
426 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
427 (vect_get_known_peeling_cost): Likewise.
428 (vect_estimate_min_profitable_iters): Likewise.
429 * tree-vect-stmts.c (record_stmt_cost): Likewise.
430
431 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
432
433 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
434 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
435 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
436 accordingly.
437 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
438
439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
440
441 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
442 a gimple stmt to a stmt_vec_info.
443 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
444
445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
446
447 * tree-vectorizer.h (vec_info::grouped_stores): Change from
448 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
449 (_loop_vec_info::reduction_chains): Likewise.
450 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
451 accordingly.
452 * tree-vect-slp.c (vect_analyze_slp): Likewise.
453
454 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
455
456 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
457 a gimple stmt to a stmt_vec_info.
458 (_stmt_vec_info::next_element): Likewise.
459 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
460 (vect_slp_analyze_and_verify_node_alignment)
461 (vect_analyze_group_access_1, vect_analyze_group_access)
462 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
463 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
464 (vect_supportable_dr_alignment): Update accordingly.
465 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
466 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
467 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
468 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
469 * tree-vect-slp.c (vect_build_slp_tree_1)
470 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
471 (vect_split_slp_store_group, vect_analyze_slp_instance)
472 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
473 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
474 (get_group_load_store_type, get_load_store_type)
475 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
476 (vect_transform_stmt, vect_remove_stores): Likewise.
477
478 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
479
480 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
481 than a gimple stmt.
482 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
483 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
484 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
485 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
486 (vector_alignment_reachable_p, vect_get_data_access_cost)
487 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
488 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
489 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
490 (vect_analyze_group_access_1, vect_analyze_group_access)
491 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
492 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
493 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
494 result of vect_dr_stmt and use the stmt_vec_info instead of
495 the associated gimple stmt.
496 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
497 (vect_gen_prolog_loop_niters): Likewise.
498 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
499
500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
501
502 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
503 to a vec<stmt_vec_info>.
504 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
505 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
506 vec<stmt_vec_info>.
507 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
508 to a vec<stmt_vec_info>.
509 (bst_traits::value_type, bst_traits::value_type): Likewise.
510 (bst_traits::hash): Update accordingly.
511 (vect_get_and_check_slp_defs): Change the stmts parameter from
512 a vec<gimple *> to a vec<stmt_vec_info>.
513 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
514 (vect_build_slp_tree): Likewise.
515 (vect_build_slp_tree_2): Likewise. Update uses of
516 SLP_TREE_SCALAR_STMTS.
517 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
518 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
519 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
520 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
521 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
522 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
523 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
524 (vect_get_constant_vectors, vect_get_slp_defs)
525 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
526 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
527 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
528 instead of gimple stmts.
529 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
530 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
531 (vect_slp_analyze_instance_dependence): Update uses of
532 SLP_TREE_SCALAR_STMTS.
533 (vect_slp_analyze_and_verify_node_alignment): Likewise.
534 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
535 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
536 (get_initial_defs_for_reduction): Likewise.
537 (vect_create_epilog_for_reduction): Likewise.
538 (vectorize_fold_left_reduction): Likewise.
539 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
540 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
541 (can_vectorize_live_stmts): Likewise.
542
543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
544
545 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
546 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
547 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
548 than gimple stmts.
549 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
550 of a gimple stmt.
551 (gather_scalar_reductions): Update after above interface changes.
552 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
553 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
554 than gimple stmts.
555 (vect_force_simple_reduction): Likewise.
556 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
557 LOOP_VINFO_REDUCTIONS.
558 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
559
560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
561
562 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
563 a gimple stmt to a stmt_vec_info.
564 * tree-vect-loop.c (vect_active_double_reduction_p)
565 (vect_force_simple_reduction, vectorizable_reduction): Update
566 accordingly.
567
568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
569
570 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
571 vec<gimple *> to a vec<stmt_vec_info>.
572 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
573 the reduction_phis argument from a vec<gimple *> to a
574 vec<stmt_vec_info>.
575 (vectorizable_reduction): Likewise the phis local variable that
576 is passed to vect_create_epilog_for_reduction. Update for new type
577 of SLP_TREE_VEC_STMTS.
578 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
579 (vectorizable_live_operation): Likewise.
580 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
581 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
582
583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
584
585 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
586 a gimple stmt to a stmt_vec_info.
587 (vectorizable_condition, vectorizable_live_operation)
588 (vectorizable_reduction, vectorizable_induction): Pass back the
589 vectorized statement as a stmt_vec_info.
590 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
591 use of STMT_VINFO_VEC_STMT.
592 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
593 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
594 as stmt_vec_infos rather than gimple stmts.
595 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
596 to a stmt_vec_info.
597 (vectorizable_live_operation): Likewise.
598 (vectorizable_reduction, vectorizable_induction): Likewise,
599 updating use of STMT_VINFO_VEC_STMT.
600 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
601 of STMT_VINFO_VEC_STMT.
602 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
603 (vectorizable_simd_clone_call, vectorizable_conversion)
604 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
605 (vectorizable_store, vectorizable_load, vectorizable_condition)
606 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
607 from a gimple stmt to a stmt_vec_info.
608 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
609 pointer to a stmt_vec_info to the vectorizable_* routines.
610
611 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
612
613 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
614 a gimple stmt to a stmt_vec_info.
615 (is_pattern_stmt_p): Update accordingly.
616 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
617 (vect_record_grouped_load_vectors): Likewise.
618 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
619 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
620 (vect_model_reduction_cost): Likewise.
621 (vect_create_epilog_for_reduction): Likewise.
622 (vectorizable_reduction, vectorizable_induction): Likewise.
623 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
624 Return the stmt_vec_info for the pattern statement.
625 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
626 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
627 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
628 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
629 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
630 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
631 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
632 (free_stmt_vec_info, vect_is_simple_use): Likewise.
633
634 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
635
636 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
637 (vect_finish_stmt_generation): Likewise.
638 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
639 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
640 (vect_build_gather_load_calls): Use the return value of the above
641 functions instead of a separate call to vinfo_for_stmt. Use narrow
642 scopes for the input gimple stmt and wider scopes for the associated
643 stmt_vec_info. Use vec_info::lookup_def when setting these
644 stmt_vec_infos from an SSA_NAME definition.
645 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
646 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
647 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
648 (vectorizable_store, vectorizable_load, vectorizable_condition)
649 (vectorizable_comparison): Likewise.
650 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
651 (vectorizable_reduction): Likewise.
652
653 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
654
655 * tree-vectorizer.h (vect_is_simple_use): Add an optional
656 stmt_vec_info * parameter before the optional gimple **.
657 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
658 (process_use, vect_get_vec_def_for_operand_1): Update callers.
659 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
660 * tree-vect-loop.c (vectorizable_reduction): Likewise.
661 (vectorizable_live_operation): Likewise.
662 * tree-vect-patterns.c (type_conversion_p): Likewise.
663 (vect_look_through_possible_promotion): Likewise.
664 (vect_recog_rotate_pattern): Likewise.
665 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
666
667 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
668
669 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
670 a typedef to a wrapper class.
671 (NULL_STMT_VEC_INFO): New macro.
672 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
673 (stmt_vec_info::operator*): New function.
674 (stmt_vec_info::operator gimple *): Likewise.
675 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
676 (add_stmt_costs): Likewise.
677 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
678 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
679 (vect_get_known_peeling_cost): Likewise.
680 (vect_estimate_min_profitable_iters): Likewise.
681 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
682 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
683 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
684 (vectorizable_store, free_stmt_vec_infos): Likewise.
685 (new_stmt_vec_info): Change return type of xcalloc to
686 _stmt_vec_info *.
687
688 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
689
690 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
691 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
692 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
693 a single_imm_use-based sequence.
694 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
695
696 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
697
698 * tree-vectorizer.h (vec_info::lookup_def): Declare.
699 * tree-vectorizer.c (vec_info::lookup_def): New function.
700 * tree-vect-patterns.c (vect_get_internal_def): Use it.
701 (vect_widened_op_tree): Likewise.
702 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
703 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
704 (vectorizable_reduction): Likewise.
705 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
706 of a gimple *.
707 (vect_is_slp_reduction): Update calls accordingly. Use
708 vec_info::lookup_def.
709 (vect_is_simple_reduction): Likewise
710 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
711
712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
713
714 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
715 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
716 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
717 of vinfo_for_stmt.
718 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
719 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
720 (vect_update_vf_for_slp, vect_analyze_loop_operations)
721 (vect_is_slp_reduction, vectorizable_induction)
722 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
723 * tree-vect-patterns.c (vect_init_pattern_stmt):
724 (vect_determine_min_output_precision_1, vect_determine_precisions)
725 (vect_pattern_recog): Likewise.
726 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
727 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
728 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
729 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
730 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
731 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
732 info field from a loop to a loop_vec_info.
733
734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
735
736 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
737 (vec_info::add_stmt): Declare.
738 * tree-vectorizer.c (vec_info::add_stmt): New function.
739 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
740 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
741 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
742 (vectorizable_induction): Likewise.
743 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
744 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
745 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
746 (vectorizable_load): Likewise.
747 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
748 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
749 (vect_recog_gather_scatter_pattern): Likewise.
750 (append_pattern_def_seq): Likewise. Remove a check that is
751 performed by add_stmt itself.
752
753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
754
755 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
756 which make_ssa_name was called with new_stmt before new_stmt
757 had been created.
758
759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
760
761 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
762 split out from...
763 (vect_is_slp_reduction): ...here...
764 (vect_is_simple_reduction): ...and here. Remove repetition of tests
765 that are already known to be false.
766
767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
768
769 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
770 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
771 STMT_VINFO_NUM_SLP_USES when it's true.
772 (vect_free_slp_instance): Add a final_p parameter and pass it to
773 vect_free_slp_tree.
774 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
775 (vect_analyze_slp_instance): Likewise.
776 (vect_slp_analyze_operations): Likewise.
777 (vect_slp_analyze_bb_1): Likewise.
778 * tree-vectorizer.c (vec_info): Likewise.
779 * tree-vect-loop.c (vect_transform_loop): Likewise.
780
781 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
782
783 * tree-vect-loop.c (vectorizable_reduction): Assert that the
784 function is not called for second and subsequent members of
785 a reduction group.
786
787 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
788
789 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
790 cases for nested loops from here to ...
791 (vect_create_epilog_for_reduction): ...here. Only call
792 vect_is_simple_use for inner-loop reductions.
793
794 2018-07-31 Martin Liska <mliska@suse.cz>
795
796 PR gcov-profile/85338
797 PR gcov-profile/85350
798 PR gcov-profile/85372
799 * profile.c (struct location_triplet): New.
800 (struct location_triplet_hash): Likewise.
801 (output_location): Do not output a BB that
802 is already recorded for a line.
803 (branch_prob): Use streamed_locations.
804
805 2018-07-31 Martin Liska <mliska@suse.cz>
806
807 PR gcov-profile/85370
808 * coverage.c (coverage_begin_function): Do not mark target
809 clones as artificial functions.
810
811 2018-07-31 Martin Liska <mliska@suse.cz>
812
813 PR gcov-profile/83813
814 PR gcov-profile/84758
815 PR gcov-profile/85217
816 PR gcov-profile/85332
817 * profile.c (branch_prob): Do not record GOTO expressions
818 for GIMPLE statements which locations are already streamed.
819
820 2018-07-31 Olivier Hainque <hainque@adacore.com>
821
822 * gcc.c (handle_spec_function): Accept a soft_matched_part
823 argument, as do_spec_1. Pass it down to ...
824 (eval_spec_function): Accept a soft_matched_part argument,
825 and pass it down to ...
826 (do_spec_2): Accept a soft_matched_part argument, and pass
827 it down to do_spec_1.
828 (do_spec_1): Pass soft_matched_part to handle_spec_function.
829 (handle_braces): Update call to handle_spec_function.
830 (driver::set_up_specs): Update calls to do_spec_2.
831 (compare_debug_dump_opt_spec_function): Likewise.
832 (compare_debug_self_opt_spec_function): Likewise.
833
834 2018-07-31 Olivier Hainque <hainque@adacore.com>
835
836 * common.opt (nolibc): New option.
837 * doc/invoke.texi (Link Options): Document it.
838 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
839 * config/alpha/linux.h: Likewise.
840 * config/arc/elf.h: Likewise.
841 * config/arm/uclinux-elf.h: Likewise.
842 * config/arm/unknown-elf.h: Likewise.
843 * config/avr/avrlibc.h: Likewise.
844 * config/bfin/bfin.h: Likewise.
845 * config/bfin/linux.h: Likewise.
846 * config/bfin/uclinux.h: Likewise.
847 * config/darwin.h: Likewise.
848 * config/darwin10.h: Likewise.
849 * config/darwin12.h: Likewise.
850 * config/gnu-user.h: Likewise.
851 * config/lm32/uclinux-elf.h: Likewise.
852 * config/pa/pa-hpux11.h: Likewise.
853 * config/pa/pa64-hpux.h: Likewise.
854 * config/sparc/sparc.h: Likewise.
855
856 2018-07-31 Olivier Hainque <hainque@adacore.com>
857
858 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
859 undefined variables.
860
861 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
862
863 PR target/86640
864 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
865 instead of GEN_INT.
866
867 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
868
869 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
870 terminated string literal.
871
872 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
873
874 PR rtl-optimization/85160
875 * combine.c (is_just_move): New function.
876 (try_combine): Allow combining two instructions into two if neither of
877 the original instructions was a move.
878
879 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
880
881 PR target/86673
882 * doc/extend.texi (Global Register Variables): Discourage use of type
883 qualifiers.
884 (Local Register Variables): Likewise.
885
886 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
887
888 PR tree-optimization/86506
889 * hwint.h (ceil_log2): Resync with hwint.c implementation.
890
891 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
892
893 PR target/86547
894 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
895 hard_regno, make sure no insn between `from` and `to` clobbers it.
896
897 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
898 Tom de Vries <tdevries@suse.de>
899
900 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
901 (PTX_DEFAULT_RUNTIME_DIM): ... this.
902 (nvptx_goacc_validate_dims): Set default worker and gang dims to
903 PTX_DEFAULT_RUNTIME_DIM.
904 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
905
906 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
907
908 * config/pa/pa.c (pa_output_addr_vec): Align address table.
909 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
910 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
911
912 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
913
914 * config/rs6000/constraints.md (wG constraint): Delete, no longer
915 used.
916 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
917 predicate to reflect toc fusion has been deleted.
918 (toc_fusion_mem_raw): Delete, no longer used.
919 (toc_fusion_mem_wrapped): Likewise.
920 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
921 fusion mask bit.
922 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
923 Delete, no longer used.
924 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
925 meant to be used for toc fusion.
926 (rs6000_debug_print_mode): Delete toc fusion debugging.
927 (rs6000_debug_reg_global): Likewise.
928 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
929 fusion and secondary reload support that were never used.
930 (rs6000_option_override_internal): Delete TOC fusion, that was only
931 partially defined, and it did not work unless you also used the
932 -mcmodel= switch.
933 (rs6000_legitimate_address_p): Delete TOC fusion support.
934 (rs6000_opt_masks): Likewise.
935 (fusion_wrap_memory_address): Delete function, no longer used.
936 (fusion_split_address); Delete TOC fusion support.
937 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
938 longer used with toc fusion being deleted.
939 (TARGET_TOC_FUSION_FP): Likewise.
940 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
941 UNSPEC.
942 (toc fusion spliter): Delete TOC fusion support.
943 (toc_fusionload_<mode>): Likewise.
944 (toc_fusionload_di): Likewise.
945 (fusion_gpr_load_<mode>): Delete generator function, this insn no
946 longer needs to be named. Rename predicate to delete TOC fusion.
947 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
948 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
949 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
950 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
951 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
952
953 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
954
955 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
956 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
957 __int128 in built-in function prototypes.
958 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
959 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
960
961 2018-07-27 Martin Sebor <msebor@redhat.com>
962
963 PR tree-optimization/86696
964 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
965 types, including enums.
966 (handle_char_store): Be prepared for the above function to fail.
967
968 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
969
970 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
971 when optimization level is lower than 2 or optimize for size.
972
973 2018-07-26 Martin Sebor <msebor@redhat.com>
974
975 PR tree-optimization/86043
976 PR tree-optimization/86042
977 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
978 (get_string_cst_length): Rename...
979 (get_min_string_length): ...to this. Add argument.
980 (handle_char_store): Extend to handle multi-character stores by
981 MEM_REF.
982 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
983 * tree.h (initializer_zerop): Add argument.
984
985 2018-07-26 Jakub Jelinek <jakub@redhat.com>
986
987 PR middle-end/86660
988 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
989 declare target to variables if they have always,{to,from,tofrom} map
990 kinds.
991
992 2018-07-26 Martin Liska <mliska@suse.cz>
993
994 PR lto/86548
995 * lto-wrapper.c: Add linker_output as prefix
996 for ltrans_output_file.
997
998 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
999
1000 PR rtl-optimization/85805
1001 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1002 value for hard registers if that was written in the same mode.
1003
1004 2018-07-26 Martin Liska <mliska@suse.cz>
1005
1006 PR gcov-profile/86536
1007 * gcov.c (format_gcov): Use printf format %.*f directly
1008 and do not handle special values.
1009
1010 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1011
1012 * common/config/arc/arc-common.c (arc_option_optimization_table):
1013 Update default optimizations for size.
1014
1015 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1016
1017 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1018 * config/arc/constraints.md (CfZ): New constraint.
1019 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1020 (subsf3_fpu): Likewise.
1021 (cmpsf_fpu): Likewise.
1022 (cmpsf_fpu_uneq): Likewise.
1023
1024 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1025
1026 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1027 accesses as well.
1028 (arc_is_uncached_mem_p): uncached applies to both the variable and
1029 the pointer.
1030
1031 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1032
1033 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1034 register names.
1035
1036 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1037
1038 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1039 field "m_scopes" from vec to auto_vec.
1040
1041 2018-07-25 Martin Liska <mliska@suse.cz>
1042
1043 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1044 return type.
1045
1046 2018-07-25 Richard Biener <rguenther@suse.de>
1047
1048 PR debug/86654
1049 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1050 special wrt context_die late.
1051 (gen_subprogram_die): Re-use DIEs in local scope.
1052
1053 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1054
1055 PR tree-optimization/86644
1056 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1057
1058 2018-07-25 Martin Liska <mliska@suse.cz>
1059
1060 PR middle-end/86645
1061 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1062 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1063
1064 2018-07-25 Martin Liska <mliska@suse.cz>
1065
1066 PR sanitizer/79635
1067 * params.def: Explain ASan abbreviation and provide
1068 a documentation link.
1069
1070 2018-07-24 Martin Sebor <msebor@redhat.com>
1071
1072 PR tree-optimization/86622
1073 PR tree-optimization/86532
1074 * builtins.h (string_length): Declare.
1075 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1076 (check_access): Be prepared for non-constant length ranges.
1077 (string_length): Make extern.
1078 * expr.c (string_constant): Only handle the minor non-constant
1079 array index. Use string_constant to compute the length of
1080 a generic string constant.
1081
1082 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1083
1084 PR tree-optimization/86618
1085 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1086 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1087
1088 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1089
1090 PR tree-optimization/86636
1091 * json.cc (json::object::set): Fix comment. Add assertions.
1092 (json::array::append): Move here from json.h. Add comment and an
1093 assertion.
1094 (json::string::string): Likewise.
1095 * json.h (json::array::append): Move to json.cc.
1096 (json::string::string): Likewise.
1097 * optinfo-emit-json.cc
1098 (optrecord_json_writer::impl_location_to_json): Assert that we
1099 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1100 wrapper around it. Expand the location once, rather than three
1101 times.
1102 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1103 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1104 wrappers.
1105 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1106 places. Fix some overlong lines.
1107
1108 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1109
1110 * config/aarch64/aarch64-simd.md
1111 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1112 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1113 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1114 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1115 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1116 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1117 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1118 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1119 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1120
1121 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1122
1123 PR middle-end/86627
1124 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1125 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1126 and abs_d == d, do the power of two handling if profitable.
1127
1128 2018-07-24 Richard Biener <rguenther@suse.de>
1129
1130 * match.pd: Add BIT_FIELD_REF canonicalizations.
1131
1132 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1133
1134 PR c/86617
1135 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1136
1137 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1138
1139 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1140 terminated STRING_CST object.
1141
1142 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1143
1144 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1145
1146 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1147
1148 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1149 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1150 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1151 the elements into a register.
1152 (rs6000_split_v4si_init_di_reg): Delete.
1153 (rs6000_split_v4si_init): Delete.
1154 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1155 (vsx_init_v4si): Rewrite as a define_expand.
1156
1157 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1158
1159 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1160 zero_extend argument from memory): New.
1161
1162 2018-07-22 Martin Sebor <msebor@redhat.com>
1163
1164 PR bootstrap/86621
1165 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1166 diagnosing calls with unknown arguments unless -Walloca-larger-than
1167 is restricted to less than PTRDIFF_MAX bytes.
1168
1169 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1170
1171 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1172
1173 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1174
1175 * pretty-print.c (text_info::set_location): Remove redundant
1176 "line_table" parameter from call to rich_location::set_range.
1177
1178 2018-07-20 Martin Sebor <msebor@redhat.com>
1179
1180 PR middle-end/82063
1181 * builtins.c (expand_builtin_alloca): Adjust.
1182 * calls.c (alloc_max_size): Simplify.
1183 * cgraphunit.c (cgraph_node::expand): Adjust.
1184 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1185 variables.
1186 (frame_larger_than_size): Same.
1187 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1188 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1189 Initialize.
1190 * doc/invoke.texi (GCC Command Options): Document option arguments.
1191 Explain byte-size arguments and suffixes.
1192 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1193 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1194 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1195 * doc/options.texi (UInteger): Expand.
1196 (Host_Wide_Int, ByteSize): Document new properties.
1197 * final.c (final_start_function_1): Include sizes in an error message.
1198 * function.c (frame_offset_overflow): Same.
1199 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1200 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1201 Diagnose unbounded alloca calls only for limits of less than
1202 PTRDIFF_MAX.
1203 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1204 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1205 for alloca(0).
1206 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1207 only for limits of less than PTRDIFF_MAX.
1208 * langhooks-def.h (lhd_handle_option): Change function argument
1209 to HOST_WIDE_INT.
1210 * langhooks.c (lhd_handle_option): Same.
1211 * langhooks.h (handle_option): Same.
1212 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1213 ByteSize flags.
1214 (var_type, var_type_struct): Same.
1215 (var_set): Handle ByteSize flag.
1216 * optc-gen.awk: Add comments to output to ease debugging. Make
1217 use of HOST_WIDE_INT where appropriate.
1218 * opts-gen-save.awk: Use %lx to format unsigned long.
1219 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1220 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1221 arguments. Parse bytes-size suffixes.
1222 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1223 (enum_value_to_arg): Same.
1224 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1225 (handle_option): Adjust.
1226 (generate_option): Change function argument to HOST_WIDE_INT.
1227 (cmdline_handle_error): Adjust.
1228 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1229 (set_option): Change function argument to HOST_WIDE_INT.
1230 (option_enabled): Handle cl_host_wide_int.
1231 (get_option_state): Handle CLVC_SIZE.
1232 (control_warning_option): Same.
1233 * opts.c (common_handle_option): Change function argument to
1234 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1235 OPT_Wvla_larger_than_.
1236 * opts.h (enum cl_var_type): Add an enumerator.
1237 * stor-layout.c (layout_decl): Print a more meaningful warning.
1238 * toplev.c (output_stack_usage): Adjust.
1239
1240 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1241
1242 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1243 call to inline_expand_builtin_string_cmp.
1244 (expand_builtin_strcmp): Likewise.
1245 (expand_builtin_strncmp): Likewise.
1246 (inline_string_cmp): Delete the last parameter, change char_type_node
1247 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1248 two operands.
1249 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1250 the inlining expansion on target where the type of the call has same or
1251 narrower precision than unsigned char.
1252
1253 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1254
1255 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1256 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1257 * common.opt (fsave-optimization-record): New option.
1258 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1259 * doc/invoke.texi (-fsave-optimization-record): New option.
1260 * dumpfile.c: Include "optinfo-emit-json.h".
1261 (struct kv_pair): Move to coretypes.h.
1262 (optgroup_options): Make non-static.
1263 (dump_context::end_scope): Call
1264 optimization_records_maybe_pop_dump_scope.
1265 * dumpfile.h (optgroup_options): New decl.
1266 * json.cc: New file.
1267 * json.h: New file.
1268 * optinfo-emit-json.cc: New file.
1269 * optinfo-emit-json.h: New file.
1270 * optinfo.cc: Include "optinfo-emit-json.h".
1271 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1272 (optinfo_enabled_p): Check optimization_records_enabled_p.
1273 (optinfo_wants_inlining_info_p): Likewise.
1274 * optinfo.h: Update comment.
1275 * profile-count.c (profile_quality_as_string): New function.
1276 * profile-count.h (profile_quality_as_string): New decl.
1277 (profile_count::quality): New accessor.
1278 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1279 and optinfo_emit_json_cc_tests.
1280 * selftest.h (selftest::json_cc_tests): New decl.
1281 (selftest::optinfo_emit_json_cc_tests): New decl.
1282 * toplev.c: Include "optinfo-emit-json.h".
1283 (compile_file): Call optimization_records_finish.
1284 (do_compile): Call optimization_records_start.
1285 * tree-ssa-live.c: Include optinfo.h.
1286 (remove_unused_scope_block_p): Retain inlining information if
1287 optinfo_wants_inlining_info_p returns true.
1288
1289 2018-07-20 Richard Biener <rguenther@suse.de>
1290
1291 PR debug/86585
1292 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1293 to cover -flto-partition=none.
1294
1295 2018-07-20 Martin Liska <mliska@suse.cz>
1296
1297 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1298 (get_decl_source_range): Remove unused function.
1299
1300 2018-07-20 Richard Biener <rguenther@suse.de>
1301
1302 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1303 (struct vn_phi_s): Likewise.
1304 (struct vn_reference_s): Likewise.
1305 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1306 for searching the slot of an entry known to be in the hash itself.
1307 (vn_phi_hasher::equal): Likewise.
1308 (vn_reference_hasher::equal): Likewise.
1309 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1310 globals.
1311 (optimistic_info, current_info): Remove, keeping only valid_info.
1312 (vn_reference_lookup_1): Remove fallback lookup.
1313 (vn_reference_lookup_2): Likewise.
1314 (vn_nary_op_lookup_1): Likewise.
1315 (vn_phi_lookup): Likewise.
1316 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1317 hash element.
1318 (vn_reference_insert): Adjust, chain the inserted hash element
1319 at last_inserted_ref.
1320 (vn_reference_insert_pieces): Likewise.
1321 (visit_reference_op_call): Likewise.
1322 (vn_nary_op_insert_into): Chain the inserted hash element at
1323 last_inserted_nary.
1324 (vn_nary_op_insert_pieces): Adjust.
1325 (vn_nary_op_insert): Likewise.
1326 (vn_nary_op_insert_stmt): Likewise.
1327 (vn_phi_insert): Adjust, chain the inserted hash element at
1328 last_inserted_phi.
1329 (process_scc): Remove clearing and copying the optimistic
1330 table. Instead remove elements inserted during an optimistic
1331 iteration from the single table we maintain.
1332 (init_scc_vn): Adjust.
1333 (free_scc_vn): Likewise.
1334 (sccvn_dom_walker::record_cond): Likewise.
1335 (sccvn_dom_walker::after_dom_children): Likewise.
1336
1337 2018-07-19 Martin Sebor <msebor@redhat.com>
1338
1339 PR tree-optimization/84047
1340 PR tree-optimization/83776
1341 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1342 (check_array_bounds): Call it.
1343
1344 2018-07-19 Martin Sebor <msebor@redhat.com>
1345
1346 * align.h (align_flags): Use member initialization.
1347
1348 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1349
1350 * Makefile.in (OBJS): Add optinfo.o.
1351 * coretypes.h (class symtab_node): New forward decl.
1352 (struct cgraph_node): New forward decl.
1353 (class varpool_node): New forward decl.
1354 * dump-context.h: New file.
1355 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1356 "tree-pass.h".
1357 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1358 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1359 (set_alt_dump_file): Likewise.
1360 (dump_context::~dump_context): New dtor.
1361 (dump_gimple_stmt): Move implementation to...
1362 (dump_context::dump_gimple_stmt): ...this new member function.
1363 Add the stmt to any pending optinfo, creating one if need be.
1364 (dump_gimple_stmt_loc): Move implementation to...
1365 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1366 Start a new optinfo and add the stmt to it.
1367 (dump_gimple_expr): Move implementation to...
1368 (dump_context::dump_gimple_expr): ...this new member function.
1369 Add the stmt to any pending optinfo, creating one if need be.
1370 (dump_gimple_expr_loc): Move implementation to...
1371 (dump_context::dump_gimple_expr_loc): ...this new member function.
1372 Start a new optinfo and add the stmt to it.
1373 (dump_generic_expr): Move implementation to...
1374 (dump_context::dump_generic_expr): ...this new member function.
1375 Add the tree to any pending optinfo, creating one if need be.
1376 (dump_generic_expr_loc): Move implementation to...
1377 (dump_context::dump_generic_expr_loc): ...this new member
1378 function. Add the tree to any pending optinfo, creating one if
1379 need be.
1380 (dump_printf): Move implementation to...
1381 (dump_context::dump_printf_va): ...this new member function. Add
1382 the text to any pending optinfo, creating one if need be.
1383 (dump_printf_loc): Move implementation to...
1384 (dump_context::dump_printf_loc_va): ...this new member function.
1385 Start a new optinfo and add the stmt to it.
1386 (dump_dec): Move implementation to...
1387 (dump_context::dump_dec): ...this new member function. Add the
1388 value to any pending optinfo, creating one if need be.
1389 (dump_context::dump_symtab_node): New member function.
1390 (dump_context::get_scope_depth): New member function.
1391 (dump_context::begin_scope): New member function.
1392 (dump_context::end_scope): New member function.
1393 (dump_context::ensure_pending_optinfo): New member function.
1394 (dump_context::begin_next_optinfo): New member function.
1395 (dump_context::end_any_optinfo): New member function.
1396 (dump_context::s_current): New global.
1397 (dump_context::s_default): New global.
1398 (dump_scope_depth): Delete global.
1399 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1400 (dump_symtab_node): New function.
1401 (get_dump_scope_depth): Reimplement in terms of dump_context.
1402 (dump_begin_scope): Likewise.
1403 (dump_end_scope): Likewise.
1404 (selftest::temp_dump_context::temp_dump_context): New ctor.
1405 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1406 (selftest::verify_item): New function.
1407 (ASSERT_IS_TEXT): New macro.
1408 (ASSERT_IS_TREE): New macro.
1409 (ASSERT_IS_GIMPLE): New macro.
1410 (selftest::test_capture_of_dump_calls): New test.
1411 (selftest::dumpfile_c_tests): Call it.
1412 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1413 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1414 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1415 descriptive comment.
1416 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1417 (dump_node, dump_bb): Move these unrelated decls.
1418 (class dump_manager): Add leading comment.
1419 * optinfo.cc: New file.
1420 * optinfo.h: New file.
1421
1422 2018-07-19 Michael Collison <michael.collison@arm.com>
1423 Richard Henderson <rth@redhat.com>
1424
1425 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1426 (subti): Handle op1 zero.
1427 (subvti4, usub4ti4): New.
1428 (*sub<GPI>3_compare1_imm): New.
1429 (sub<GPI>3_carryinCV): New.
1430 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1431 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1432
1433 2018-07-19 Michael Collison <michael.collison@arm.com>
1434 Richard Henderson <rth@redhat.com>
1435
1436 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1437 (addti3): Create simpler code if low part is already known to be 0.
1438 (addvti4, uaddvti4): New.
1439 (*add<GPI>3_compareC_cconly_imm): New.
1440 (*add<GPI>3_compareC_cconly): New.
1441 (*add<GPI>3_compareC_imm): New.
1442 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1443 handle constants within this pattern..
1444 (*add<GPI>3_compareV_cconly_imm): New.
1445 (*add<GPI>3_compareV_cconly): New.
1446 (*add<GPI>3_compareV_imm): New.
1447 (add<GPI>3_compareV): New.
1448 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1449 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1450 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1451 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1452 with 'comparison' operator.
1453 (*add<GPI>3_compareV_cconly_imm): Ditto.
1454 (*add<GPI>3_compareV_cconly): Ditto.
1455 (*add<GPI>3_compareV_imm): Ditto.
1456 (add<GPI>3_compareV): Ditto.
1457 (add<mode>3_carryinC): Ditto.
1458 (*add<mode>3_carryinC_zero): Ditto.
1459 (*add<mode>3_carryinC): Ditto.
1460 (add<mode>3_carryinV): Ditto.
1461 (*add<mode>3_carryinV_zero): Ditto.
1462 (*add<mode>3_carryinV): Ditto.
1463
1464 2018-07-19 Michael Collison <michael.collison@arm.com>
1465 Richard Henderson <rth@redhat.com>
1466
1467 * config/aarch64/aarch64-modes.def (CC_V): New.
1468 * config/aarch64/aarch64-protos.h
1469 (aarch64_addti_scratch_regs): Declare
1470 (aarch64_subvti_scratch_regs): Declare.
1471 (aarch64_expand_subvti): Declare.
1472 (aarch64_gen_unlikely_cbranch): Declare
1473 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1474 for signed overflow using CC_Vmode.
1475 (aarch64_get_condition_code_1): Handle CC_Vmode.
1476 (aarch64_gen_unlikely_cbranch): New function.
1477 (aarch64_addti_scratch_regs): New function.
1478 (aarch64_subvti_scratch_regs): New function.
1479 (aarch64_expand_subvti): New function.
1480
1481 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1482
1483 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1484 extension.
1485 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1486 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1487 extension.
1488
1489 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1490
1491 PR target/83009
1492 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1493 address check not strict.
1494
1495 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1496
1497 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1498 Umq with Umn.
1499 (store_pair_lanes<mode>): Likewise.
1500 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1501 enum value 'ADDR_QUERY_LDP_STP_N'.
1502 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1503 (aarch64_print_address_internal): Add declaration.
1504 (aarch64_print_ldpstp_address): Remove.
1505 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1506 (aarch64_print_operand): Change printing of 'y'.
1507 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1508 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1509 'true' rather than '1'.
1510 * config/aarch64/constraints.md (Uml): Likewise.
1511 (Uml): Rename to Umn.
1512 (Umq): Remove.
1513
1514 2018-07-19 Richard Biener <rguenther@suse.de>
1515
1516 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1517 a trailing array.
1518 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1519 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1520 (vn_reference_hasher): Likewise.
1521 (struct vn_tables_s): Remove obstack and alloc-pool members.
1522 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1523 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1524 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1525 (vn_reference_insert_pieces): Likewise.
1526 (alloc_vn_nary_op_noinit): Adjust.
1527 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1528 (vn_phi_eq): Adjust.
1529 (shared_lookup_phiargs): Remove.
1530 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1531 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1532 (visit_reference_op_call): Likewise.
1533 (copy_nary, copy_phi, copy_reference): Remove.
1534 (process_scc): Rewind the obstack when iterating. Do not
1535 copy the elements to valid_info but just move them from one
1536 hashtable to the other.
1537 (allocate_vn_table): Adjust.
1538 (free_vn_table): Likewise.
1539 (init_scc_vn): Likewise.
1540 (free_scc_vn): Likewise.
1541
1542 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1543
1544 PR target/86560
1545 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1546 indirect_return as function type attribute.
1547 (ix86_attribute_table): Change indirect_return to function
1548 type attribute.
1549 * doc/extend.texi: Update indirect_return attribute.
1550
1551 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1552
1553 * wide-int.h (widest2_int): New.
1554 * gimple-fold.c (arith_overflowed_p): Use it.
1555 * tree.h (widest2_int_cst): New.
1556 * tree-vrp.c (wide_int_binop_overflow): Rename from
1557 vrp_int_const_binop.
1558 Rewrite to work on trees.
1559 (extract_range_from_multiplicative_op_1): Abstract code to...
1560 (wide_int_range_min_max): ...here.
1561 (wide_int_range_cross_product): ...and here.
1562 (extract_range_from_binary_expr_1): Abstract overflow code to...
1563 (wide_int_range_mult_wrapping): ...here.
1564 * tree-vrp.h (wide_int_range_cross_product): New.
1565 (wide_int_range_mult_wrapping): New.
1566
1567 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1568 Julia Koval <julia.koval@intel.com>
1569
1570 * config/i386/x86-tune-costs.h (skylake_memcpy,
1571 skylake_memset): Replace rep_prefix with unrolling for size 512.
1572
1573 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1574
1575 PR middle-end/86544
1576 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1577 in last stmt.
1578
1579 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1580
1581 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1582 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1583 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1584 previously known as "PowerPC AltiVec Built-in Functions". Move
1585 some material to new subsubsections "PowerPC AltiVec Built-in
1586 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1587 ISA 2.07".
1588 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1589 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1590 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1591 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1592
1593 2018-07-18 Richard Biener <rguenther@suse.de>
1594
1595 PR tree-optimization/86557
1596 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1597 EXACT_DIV_EXPR.
1598
1599 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1600
1601 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1602
1603 2018-07-17 Jeff Law <law@redhat.com>
1604
1605 * config/arm/arm.c (get_label_padding): Update for recent
1606 changes to label_to_alignment.
1607
1608 PR tree-optimization/86010
1609 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1610
1611 * config/mips/mips.c (vr4130_align_insns): Update for recent
1612 changes to label_to_alignment.
1613
1614 * config/frv/frv.c (frv_label_align): Update for recent changes
1615 to label_to_alignment.
1616
1617 * config/nios2/nios2.c (nios2_label_align): Update for recent
1618 changes which dropped ALIGN_LABELS_LOG.
1619
1620 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1621
1622 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1623 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1624
1625 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1626
1627 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1628 deprecated align_labels_log.
1629
1630 2018-07-17 Richard Biener <rguenther@suse.de>
1631
1632 PR lto/86456
1633 * dwarf2out.c (init_sections_and_labels): Always generate
1634 a debug_line_str_section for early LTO debug.
1635 (dwarf2out_finish): Reset debug_line_str_hash output early.
1636 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1637 with fat LTO part.
1638 (dwarf2out_early_finish): Output debug_line_str.
1639
1640 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1641
1642 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1643 index register on z196 or later.
1644
1645 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1646
1647 * config/s390/s390.c (s390_default_align): Set default function
1648 alignment to 16.
1649 (s390_override_options_after_change): Call s390_default align.
1650 (s390_option_override_internal): Call s390_default_align.
1651 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1652
1653 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1654
1655 PR middle-end/86542
1656 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1657 to _looptemp_ clauses, other than the first two.
1658
1659 2018-07-17 Martin Liska <mliska@suse.cz>
1660
1661 * opts.c: Do not enable OPT_falign_* for -Os.
1662
1663 2018-07-17 Martin Liska <mliska@suse.cz>
1664
1665 * align.h (MAX_CODE_ALIGN): New.
1666 (MAX_CODE_ALIGN_VALUE): New.
1667 * common/config/i386/i386-common.c (ix86_handle_option):
1668 (MAX_CODE_ALIGN): Moved to align.h.
1669 * final.c (MAX_CODE_ALIGN): Likewise.
1670 * opts.c (parse_and_check_align_values):
1671 (MAX_CODE_ALIGN): Likewise.
1672 (MAX_CODE_ALIGN_VALUE): Likewise.
1673
1674 2018-07-17 Martin Liska <mliska@suse.cz>
1675
1676 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1677 in order to fulfil coding style.
1678 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1679 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1680 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1681 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1682 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1683 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1684 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1685 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1686 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1687
1688 2018-07-17 Martin Liska <mliska@suse.cz>
1689
1690 * align.h: New file.
1691 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1692 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1693 align_flags of label_to_alignment.
1694 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1695 class.
1696 * config/m68k/m68k.c: Do not use removed align_labels_value and
1697 align_loops_value.
1698 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1699 (LOOP_ALIGN): Likewise.
1700 (LABEL_ALIGN): Likewise.
1701 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1702 Remove not used macro.
1703 (rs6000_loop_align): Change return type to align_flags.
1704 (rs6000_loop_align_max_skip): Remove.
1705 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1706 Change return type to align_flags.
1707 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1708 Remove not used macro.
1709 (rs6000_loop_align): Change return type to align_flags.
1710 (rs6000_loop_align_max_skip): Remove.
1711 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1712 * config/rx/rx-protos.h (rx_align_for_label): Make it
1713 static function.
1714 * config/rx/rx.c (rx_align_for_label): Change return type
1715 to align_flags.
1716 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1717 macro definitions.
1718 into align_flags class.
1719 (LABEL_ALIGN): Likewise.
1720 (LOOP_ALIGN): Likewise.
1721 * config/s390/s390.c (s390_label_align): Use align_flags
1722 class member.
1723 (s390_asm_output_function_label): Likewise.
1724 * config/sh/sh.c (sh_override_options_after_change):
1725 Use align_flags class directly without macros.
1726 (find_barrier): Likewise.
1727 (barrier_align): Likewise.
1728 (sh_loop_align): Likewise.
1729 * config/spu/spu.c (spu_option_override):
1730 Use align_flags_tuple::get_value instead of removed macros.
1731 (spu_sched_init): Likewise.
1732 * config/spu/spu.h (GTY): Likewise.
1733 * config/visium/visium.c (visium_option_override):
1734 Set "8" as default secondary alignment.
1735 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1736 in order to guarantee secondary alignment of 8.
1737 * coretypes.h: Include align.h header file.
1738 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1739 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1740 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1741 * doc/tm.texi.in: Likewise.
1742 * final.c (struct label_alignment): Remove not used structure.
1743 (LABEL_ALIGN): Change type to align_flags.
1744 (LOOP_ALIGN): Likewise.
1745 (JUMP_ALIGN): Likewise.
1746 (default_loop_align_max_skip): Remove.
1747 (default_label_align_max_skip): Likewise.
1748 (default_jump_align_max_skip): Likewise.
1749 (default_label_align_after_barrier_max_skip):
1750 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1751 (LABEL_TO_MAX_SKIP): Remove.
1752 (label_to_alignment): Return align_flags type instead of integer.
1753 (label_to_max_skip): Remove.
1754 (align_fuzz): Use align_flags type.
1755 (compute_alignments): Use align_flags type and use align_flags::max
1756 to combine multiple alignments.
1757 (grow_label_align): Grow vec instead of C array.
1758 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1759 (shorten_branches): Use align_flags type and use align_flags::max
1760 to combine multiple alignments.
1761 (final_scan_insn_1): Remove usage of secondary alignment that comes
1762 from label alignment, but instead use proper secondary alignment
1763 which is computed in grow_label_align.
1764 * flags.h (struct align_flags_tuple): Move to align.h.
1765 (struct align_flags): Likewise.
1766 (state_align_loops): Rename to align_loops.
1767 (state_align_jumps): Rename to align_jumps.
1768 (state_align_labels): Rename to align_labels.
1769 (state_align_functions): Rename to align_functions.
1770 (align_loops_log): Remove.
1771 (align_jumps_log): Remove.
1772 (align_labels_log): Remove.
1773 (align_functions_log): Remove.
1774 (align_loops_max_skip): Remove.
1775 (align_jumps_max_skip): Remove.
1776 (align_labels_max_skip): Remove.
1777 (align_functions_max_skip): Remove.
1778 (align_loops_value): Remove.
1779 (align_jumps_value): Remove.
1780 (align_labels_value): Remove.
1781 (align_functions_value): Remove.
1782 * output.h (label_to_alignment): Change return type to align_flags.
1783 (label_to_max_skip): Remove.
1784 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1785 jump_align_max_skip macros.
1786 * targhooks.h (default_loop_align_max_skip): Remove.
1787 (default_label_align_max_skip): Likewise.
1788 (default_jump_align_max_skip): Likewise.
1789 (default_label_align_after_barrier_max_skip): Remove.
1790 * toplev.c (read_log_maxskip): Use ::normalize function.
1791 (parse_N_M): Remove not used argument and also call ::normalize.
1792 (parse_alignment_opts): Do not pass unused arguments.
1793 * varasm.c (assemble_start_function): Use directly align_functions
1794 instead of removed macros.
1795 * system.h: Do not poison removed macros.
1796
1797 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR middle-end/86539
1800 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1801 and cond temporaries don't have reference type if iterator has
1802 pointer type. For init use &for_pre_body instead of pre_p if
1803 for_pre_body is non-empty.
1804
1805 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1806
1807 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1808 double-double modes to SFmode directly directly.
1809 (trunc<mode>sf2_fprs): Delete.
1810
1811 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1812
1813 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1814 for conversions between IFmode and the decimal floating point modes.
1815 (init_float128_ieee): Use the correct names for conversions between
1816 KFmode and the decimal floating point modes.
1817
1818 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1819
1820 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1821 for the conversions between TDmode and IFmode.
1822 (init_float128_ieee): Use more correct names for the conversions
1823 between TDmode and KFmode.
1824
1825 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1826
1827 PR tree-optimization/86526
1828 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1829 (inline_expand_builtin_string_cmp): Likewise.
1830 (inline_string_cmp): Likewise. Use c_readstr instead of
1831 builtin_memcpy_read_str. Add unit_mode temporary.
1832
1833 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1834
1835 PR middle-end/86528
1836 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1837 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1838
1839 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1840
1841 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1842 Alphabetize prototypes of built-in functions, separating out
1843 built-in functions that are listed in this section but should be
1844 described elsewhere.
1845
1846 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1847
1848 PR target/86511
1849 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1850 conditional move when trapping comparison was split to a
1851 non-trapping one (and vice versa).
1852
1853 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1854
1855 * config/s390/s390.c (s390_function_profiler): Generate nops
1856 instead of profiler call sequences.
1857 * config/s390/s390.opt: Add the new option.
1858
1859 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1860
1861 * config/s390/s390.c (s390_function_profiler): Generate
1862 __mcount_loc section.
1863 * config/s390/s390.opt: Add the new option.
1864
1865 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1866
1867 * common.opt: Add the new warning.
1868 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1869 %r0,__fentry__" when -mfentry is specified.
1870 (s390_option_override_internal): Disallow -mfentry for 31-bit
1871 CPUs.
1872 * config/s390/s390.opt: Add the new option.
1873
1874 2018-07-16 Richard Biener <rguenther@suse.de>
1875
1876 PR lto/86523
1877 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1878 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1879
1880 2018-07-16 Martin Liska <mliska@suse.cz>
1881
1882 PR ipa/86529
1883 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1884 to ::get_create.
1885
1886 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1887
1888 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1889
1890 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1891
1892 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1893 for ARCHS4x.
1894 * config/arc/arc-cpus.def (hs4x): New cpu.
1895 (hs4xd): Likewise.
1896 * config/arc/arc-tables.opt: Regenerate.
1897 * config/arc/arc.c (arc_sched_issue_rate): New function.
1898 (TARGET_SCHED_ISSUE_RATE): Define.
1899 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1900 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1901 fpu_cvt.
1902 (attr tune): Add ARCHS4x tune values.
1903 (attr tune_dspmpy): Define.
1904 (*tst): Correct instruction type.
1905 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1906 * config/arc/arcHS4x.md: New file.
1907 * config/arc/fpu.md: Update instruction type attributes.
1908 * config/arc/t-multilib: Regenerate.
1909
1910 2018-07-16 Tom de Vries <tdevries@suse.de>
1911
1912 PR debug/86455
1913 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1914
1915 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1916
1917 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1918 early clobber.
1919
1920 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1921
1922 PR tree-optimization/86514
1923 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1924 conversion to a boolean type from a type with greater precision.
1925
1926 2018-07-16 Tom de Vries <tdevries@suse.de>
1927
1928 * var-tracking.c (vt_initialize): Print adjusted insn slim if
1929 dump_flags request TDF_SLIM.
1930
1931 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
1932
1933 * fold-const.c (int_const_binop_1): Abstract...
1934 (wide_int_binop): ...wide int code here.
1935 (poly_int_binop): ...poly int code here.
1936 Abstract the rest of int_const_binop_1 into int_const_binop.
1937 * fold-const.h (wide_int_binop): New.
1938 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
1939 Remove useless PLUS/MINUS_EXPR case.
1940 (zero_nonzero_bits_from_vr): Move wide int code...
1941 (zero_nonzero_bits_from_bounds): ...here.
1942 (extract_range_from_binary_expr_1): Move mask optimization code...
1943 (range_easy_mask_min_max): ...here.
1944 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
1945 (range_easy_mask_min_max): New.
1946
1947 2018-07-15 Jeff Law <law@redhat.com>
1948
1949 PR target/85993
1950 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
1951 block.
1952
1953 2018-07-14 Jim Wilson <jimw@sifive.com>
1954
1955 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
1956
1957 2018-07-14 Paul Koning <ni1d@arrl.net>
1958
1959 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
1960
1961 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
1962
1963 * lto-streamer-out.c (copy_function_or_variable): Dump info about
1964 copying section.
1965
1966 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
1967 Steve Munroe <munroesj52@gmail.com>
1968
1969 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
1970 (_mm_andnot_si128): Likewise.
1971 (_mm_or_si128): Likewise.
1972 (_mm_xor_si128): Likewise.
1973
1974 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
1975
1976 PR middle-end/78809
1977 * builtins.c (expand_builtin_memcmp): Inline the calls first
1978 when result_eq is false.
1979 (expand_builtin_strcmp): Inline the calls first.
1980 (expand_builtin_strncmp): Likewise.
1981 (inline_string_cmp): New routine. Expand a string compare
1982 call by using a sequence of char comparison.
1983 (inline_expand_builtin_string_cmp): New routine. Inline expansion
1984 a call to str(n)cmp/memcmp.
1985 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
1986 New option.
1987 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
1988
1989 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
1990
1991 * config/arm/driver-arm.c: Include arm-native.h.
1992 (host_detect_local_cpu): Use auto-generated data tables.
1993 (vendors, arm_cpu_table): Delete. Move part information to ...
1994 * config/arm/arm-cpus.in: ... here.
1995 * config/arm/parsecpu.awk (gen_native): New function.
1996 (vendor, part): New CPU fields.
1997 (END): Add support for building the native CPU detection tables.
1998 * config/arm/t-arm (arm-native.h): Add build rule.
1999 (driver-arm.o): Add dependency on arm-native.h.
2000
2001 2018-07-13 Richard Biener <rguenther@suse.de>
2002
2003 PR middle-end/85974
2004 * match.pd (addr1 - addr2): Allow either of the operand to
2005 have a conversion.
2006
2007 2018-07-13 Tom de Vries <tdevries@suse.de>
2008
2009 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2010 in remap_ssa_name.
2011
2012 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2013
2014 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2015 arrays instead of numbered variables.
2016
2017 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2018
2019 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2020 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2021
2022 2018-07-13 Richard Biener <rguenther@suse.de>
2023
2024 PR debug/86452
2025 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2026 instead of get_context_die.
2027
2028 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2029 Richard Biener <rguenther@suse.de>
2030
2031 PR middle-end/86489
2032 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2033 that the loop latch destination where phi is defined.
2034
2035 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2036
2037 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2038 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2039 (riscv_set_current_function): Extract getting interrupt type to new
2040 function.
2041 (riscv_get_interrupt_type): New function.
2042 (riscv_merge_decl_attributes): New function, checking interrupt type is
2043 same.
2044 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2045
2046 2018-07-12 Paul Koning <ni1d@arrl.net>
2047
2048 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2049 directive.
2050
2051 2018-07-12 Paul Koning <ni1d@arrl.net>
2052
2053 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2054 zero reference, add doloop_end instead.
2055 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2056 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2057 detail for doloop_end.
2058
2059 2018-07-12 Martin Sebor <msebor@redhat.com>
2060
2061 PR c/86453
2062 * attribs.c (decl_attributes): Reject conflicting attributes before
2063 calling attribute handlers.
2064
2065 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2066
2067 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2068 parameter.
2069 (gcc::dump_manager::get_dump_file_name): likewise.
2070 (dump_begin): Likewise.
2071 * dumpfile.h (dump_begin): Update prototype.
2072 (gcc::dump_manager::get_dump_file_name,
2073 gcc::dump_manager::get_dump_file_name): Update prototype.
2074
2075 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2076
2077 * internal-fn.h (vectorizable_internal_fn_p): New function.
2078 * tree-vect-slp.c (compatible_calls_p): Likewise.
2079 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2080 to internal functions.
2081 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2082
2083 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2084
2085 * fold-const.h (inverse_conditions_p): Declare.
2086 * fold-const.c (inverse_conditions_p): New function.
2087 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2088 that test the inverse condition of a conditional internal function.
2089 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2090 * internal-fn.c (internal_fn_mask_index): Handle conditional
2091 internal functions.
2092 (vectorized_internal_fn_supported_p): New function.
2093 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2094 (any_pred_load_store): Replace with...
2095 (need_to_predicate): ...this new variable.
2096 (redundant_ssa_names): New variable.
2097 (ifcvt_can_use_mask_load_store): Move initial checks to...
2098 (ifcvt_can_predicate): ...this new function. Handle tree codes
2099 for which a conditional internal function exists.
2100 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2101 instead of ifcvt_can_use_mask_load_store. Update after variable
2102 name change.
2103 (predicate_load_or_store): New function, split out from
2104 predicate_mem_writes.
2105 (check_redundant_cond_expr): New function.
2106 (value_available_p): Likewise.
2107 (predicate_rhs_code): Likewise.
2108 (predicate_mem_writes): Rename to...
2109 (predicate_statements): ...this. Use predicate_load_or_store
2110 and predicate_rhs_code.
2111 (combine_blocks, tree_if_conversion): Update after above name changes.
2112 (ifcvt_local_dce): Handle redundant_ssa_names.
2113 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2114 general conditional functions.
2115 * tree-vect-stmts.c (vectorizable_call): Likewise.
2116
2117 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2118 Alan Hayward <alan.hayward@arm.com>
2119 David Sherwood <david.sherwood@arm.com>
2120
2121 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2122 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2123 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2124 plus and minus and convert them into IFN_COND_FMA-based sequences.
2125 (convert_mult_to_fma): Handle conditional plus and minus.
2126
2127 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2128
2129 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2130 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2131 (cond_fnms_optab): New optabs.
2132 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2133 internal functions.
2134 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2135 * internal-fn.h (get_conditional_internal_fn): Declare.
2136 (get_unconditional_internal_fn): Likewise.
2137 * internal-fn.c (cond_ternary_direct): New macro.
2138 (expand_cond_ternary_optab_fn): Likewise.
2139 (direct_cond_ternary_optab_supported_p): Likewise.
2140 (FOR_EACH_COND_FN_PAIR): Likewise.
2141 (get_conditional_internal_fn): New function.
2142 (get_unconditional_internal_fn): Likewise.
2143 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2144 (gimple_match_op::gimple_match_op): Add a new overload for 5
2145 operands.
2146 (gimple_match_op::set_op): Likewise.
2147 (gimple_resimplify5): Declare.
2148 * genmatch.c (decision_tree::gen): Generate simplifications for
2149 5 operands.
2150 * gimple-match-head.c (gimple_simplify): Define an overload for
2151 5 operands. Handle calls with 5 arguments in the top-level overload.
2152 (convert_conditional_op): Handle conversions from unconditional
2153 internal functions to conditional ones.
2154 (gimple_resimplify5): New function.
2155 (build_call_internal): Pass a fifth operand.
2156 (maybe_push_res_to_seq): Likewise.
2157 (try_conditional_simplification): Try converting conditional
2158 internal functions to unconditional internal functions.
2159 Handle 3-operand unconditional forms.
2160 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2161 Define ternary equivalents of the current rules for binary conditional
2162 internal functions.
2163 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2164 ternary operations.
2165 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2166 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2167 (optab): Handle them.
2168 (SVE_COND_FP_TERNARY): New int iterator.
2169 (sve_fmla_op, sve_fmad_op): New int attributes.
2170 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2171 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2172 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2173
2174 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2175
2176 * target.def (preferred_else_value): New target hook.
2177 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2178 * doc/tm.texi: Regenerate.
2179 * targhooks.h (default_preferred_else_value): Declare.
2180 * targhooks.c (default_preferred_else_value): New function.
2181 * internal-fn.h (conditional_internal_fn_code): Declare.
2182 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2183 (get_conditional_internal_fn): Use it.
2184 (conditional_internal_fn_code): New function.
2185 * gimple-match.h (gimple_match_cond): New struct.
2186 (gimple_match_op): Add a cond member function.
2187 (gimple_match_op::gimple_match_op): Update all forms to take a
2188 gimple_match_cond.
2189 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2190 for the suboperation, but don't specify a particular else_value.
2191 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2192 (visit_nary_op, visit_reference_op_load): Pass
2193 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2194 * gimple-match-head.c: Include tree-eh.h
2195 (convert_conditional_op): New function.
2196 (maybe_resimplify_conditional_op): Likewise.
2197 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2198 (gimple_resimplify2): Likewise.
2199 (gimple_resimplify3): Likewise.
2200 (gimple_resimplify4): Likewise.
2201 (maybe_push_res_to_seq): Return null for conditional operations.
2202 (try_conditional_simplification): New function.
2203 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2204 constructor.
2205 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2206 IFN_COND_* call.
2207 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2208 function.
2209 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2210
2211 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2212
2213 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2214 DECL_FCONTEXT
2215 (hash_tree): Do not hash DECL_FCONTEXT
2216 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2217 Do not stream DECL_FCONTEXT.
2218 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2219 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2220
2221 2018-07-12 Richard Biener <rguenther@suse.de>
2222
2223 PR debug/86462
2224 * dwarf2out.c (gen_block_die): Only output blocks when they have
2225 at least one !DECL_IGNORED_P variable.
2226
2227 2018-07-12 Richard Biener <rguenther@suse.de>
2228
2229 PR target/84829
2230 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2231 Remove -mieee-fp handling.
2232
2233 2018-07-12 Richard Biener <rguenther@suse.de>
2234
2235 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2236 left-over from last patch.
2237
2238 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR tree-optimization/86492
2241 * gimple-ssa-store-merging.c
2242 (imm_store_chain_info::coalesce_immediate_stores): Call
2243 check_no_overlap even for the merge_overlapping case. Formatting fix.
2244
2245 2018-07-12 Richard Biener <rguenther@suse.de>
2246
2247 PR middle-end/86479
2248 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2249 move possibly trapping operations into the conditional.
2250
2251 2018-07-12 Richard Biener <rguenther@suse.de>
2252
2253 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2254 (vn_lookup_simplify_result): Remove recursion limit applied
2255 here.
2256 (vn_nary_build_or_lookup_1): Adjust.
2257 (try_to_simplify): Likewise.
2258 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2259 here.
2260 (gimple_resimplify2): Likewise.
2261 (gimple_resimplify3): Likewise.
2262 (gimple_resimplify4): Likewise.
2263
2264 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2265
2266 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2267 Use __mmask64 type instead of __mmask8 for __M argument.
2268 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2269 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2270 __U argument.
2271 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2272 __mmask16 for __M argument.
2273 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2274 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2275 to __mmask16 instead of __mmask8.
2276 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2277 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2278 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2279 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2280 instead of __mmask16 for __U argument.
2281 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2282 __mmask16 instead of __mmask8 for __U argument.
2283 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2284 __U argument.
2285 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2286 __mmask16.
2287 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2288 argument.
2289 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2290 __U argument.
2291 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2292 __mmask16.
2293 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2294 of __mmask16.
2295 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2296 __U argument.
2297 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2298 __U argument.
2299 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2300 __U argument.
2301 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2302 __U argument.
2303 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2304 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2305 return type as well as __M argument type and all casts from __mmask8
2306 to __mmask32.
2307 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2308 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2309 return type as well as __M argument type and all casts from __mmask8
2310 to __mmask16.
2311 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2312 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2313 return type as well as __M argument type and all casts from __mmask8
2314 to __mmask32.
2315 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2316 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2317 return type as well as __M argument type and all casts from __mmask8
2318 to __mmask16.
2319 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2320 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2321 __mmask16.
2322
2323 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2324
2325 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2326 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2327 for __U argument.
2328
2329 2018-07-11 Paul Koning <ni1d@arrl.net>
2330
2331 * doc/md.texi (define_subst): Document how multiple occurrences of
2332 the same argument in the replacement pattern are handled.
2333
2334 2018-07-11 Paul Koning <ni1d@arrl.net>
2335
2336 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2337 alphabetical order.
2338 (Common Type Attributes): Add "mode" attribute.
2339
2340 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2341
2342 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2343 stream DECL_ORIGINAL_TYPE.
2344 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2345 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2346 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2347 Do not walk original type.
2348 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2349 external decls.
2350 (write_ts_decl_non_common_tree_pointers): Do not stream
2351 DECL_ORIGINAL_TYPE
2352 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2353 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2354
2355 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2356
2357 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2358 thread twice from the same starting edge.
2359
2360 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2361
2362 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2363 * gimple.c (gimple_call_nonnull_result_p): ...here...
2364 (gimple_call_nonnull_arg): ...and here.
2365 * gimple.h (gimple_call_nonnull_result_p): New.
2366 (gimple_call_nonnull_arg): New.
2367
2368 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2369
2370 * config/arm/arm-cpus.in: Move information from fpu field of each
2371 cpu definition to the isa field.
2372 * config/arm/parsecpu.awk (fpu): Delete match rule.
2373 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2374
2375 2018-07-11 Richard Biener <rguenther@suse.de>
2376
2377 PR debug/86457
2378 * dwarf2out.c (init_sections_and_labels): Use
2379 output_asm_line_debug_info consistently.
2380 (dwarf2out_early_finish): Likewise.
2381 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2382 type units.
2383
2384 2018-07-11 Richard Biener <rguenther@suse.de>
2385
2386 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2387 Rework father_bb setting in a way to avoid propagating constants
2388 multiple times on a loop body.
2389
2390 2018-07-10 Mark Wielaard <mark@klomp.org>
2391
2392 PR debug/86459
2393 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2394
2395 2018-07-10 Richard Biener <rguenther@suse.de>
2396
2397 * hash-map.h (hash_map::iterator::operator*): Return
2398 references to key and value.
2399
2400 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c++/86443
2403 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2404 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2405 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2406 (gimplify_omp_for): For composite loops, move outer
2407 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2408 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2409 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2410 TREE_LIST for both the original class iterator and the "last" helper
2411 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2412 loop, remember has_decl_expr from outer composite loops for the
2413 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2414
2415 2018-07-09 Martin Sebor <msebor@redhat.com>
2416
2417 PR middle-end/77357
2418 PR middle-end/86428
2419 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2420 accessing implicitly initialized array elements.
2421 * expr.c (string_constant): Handle string initializers of
2422 character arrays within aggregates.
2423 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2424 Store element offset. As a special case, handle zero size.
2425 (fold_nonarray_ctor_reference): Same.
2426 (fold_ctor_reference): Add argument. Store subobject offset.
2427 * gimple-fold.h (fold_ctor_reference): Add argument.
2428
2429 2018-07-09 Paul Koning <ni1d@arrl.net>
2430
2431 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2432 (pdp11_insn_cost): New function.
2433 (pdp11_md_asm_adjust): New function.
2434 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2435 (pdp11_rtx_costs): Update to match machine better.
2436 (output_addr_const_pdp11): Correct format mismatch warnings.
2437 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2438 * config/pdp11/pdp11.md: General change to add base_cost and/or
2439 length attributes for use by new pdp11_insn_cost function.
2440 (MIN_BRANCH): Correct definition.
2441 (MIN_SOB): Ditto.
2442 (doloop_end): Use standard pattern name for looping pattern.
2443 (doloop_end_nocc): New.
2444 (movsf): Add another constraint alternative.
2445 (zero_extendqihi2): Add constraint alternatives for not in place
2446 extend.
2447 (zero_extendhisi2): Remove.
2448 (shift patterns): Add CC handling variants.
2449 (bswaphi2): New.
2450 (bswapsi2): New.
2451 (rothi3): New.
2452 (define_peephole2): New peephole to recognize mov that sets CC for
2453 subsequent test.
2454
2455 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2456
2457 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2458 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2459 wi::add.
2460
2461 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2462
2463 PR c/86420
2464 * real.c (real_nextafter): Return true if result is denormal.
2465
2466 2018-07-09 Martin Liska <mliska@suse.cz>
2467
2468 * common.opt: Add back wrongly removed attribute.
2469
2470 2018-07-09 Richard Biener <rguenther@suse.de>
2471
2472 PR debug/86413
2473 * dwarf2out.c (gen_block_die): For an early generated DIE
2474 always output high/low PC attributes.
2475
2476 2018-07-09 Tom de Vries <tdevries@suse.de>
2477
2478 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2479 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2480 onto VAR_DECL with abstract origin.
2481
2482 2018-07-07 Jim Wilson <jimw@sifive.com>
2483
2484 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2485
2486 2018-07-07 Tom de Vries <tdevries@suse.de>
2487
2488 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2489
2490 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2491
2492 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2493 overflow_type.
2494 (combine_bound): Use wide-int overflow calculation instead of
2495 rolling our own.
2496 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2497 overflow_type.
2498 * fold-const.c (int_const_binop_2): Same.
2499 (extract_muldiv_1): Same.
2500 (fold_div_compare): Same.
2501 (fold_abs_const): Same.
2502 * match.pd: Same.
2503 * poly-int.h (add): Same.
2504 (sub): Same.
2505 (neg): Same.
2506 (mul): Same.
2507 * predict.c (predict_iv_comparison): Same.
2508 * profile-count.c (slow_safe_scale_64bit): Same.
2509 * simplify-rtx.c (simplify_const_binary_operation): Same.
2510 * tree-chrec.c (tree_fold_binomial): Same.
2511 * tree-data-ref.c (split_constant_offset_1): Same.
2512 * tree-if-conv.c (idx_within_array_bound): Same.
2513 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2514 * tree-ssa-phiopt.c (minmax_replacement): Same.
2515 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2516 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2517 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2518 * wide-int.cc (wi::add_large): Same.
2519 (wi::mul_internal): Same.
2520 (wi::sub_large): Same.
2521 (wi::divmod_internal): Same.
2522 * wide-int.h: Change overflow type to overflow_type for neg, add,
2523 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2524 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2525 mul_internal, divmod_internal.
2526 (overflow_type): New enum.
2527 (accumulate_overflow): New.
2528
2529 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2530
2531 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2532 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2533
2534 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2535
2536 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2537 argument is checked for zero before entering loop, avoid checking again.
2538
2539 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2540
2541 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2542 * gimplify.h (generic_expr_could_trap_p): Likwise.
2543 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2544
2545 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2546
2547 PR tree-optimization/86401
2548 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2549 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2550 (fold_bit_and_mask): ... here. New helper function for match.pd.
2551 * fold-const.h (fold_bit_and_mask): Declare.
2552 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2553
2554 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2555
2556 PR target/86324
2557 * target.def (translate_mode_attribute): New hook.
2558 * targhooks.h (default_translate_mode_attribute): Declare.
2559 * targhooks.c (default_translate_mode_attribute): New function.
2560 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2561 * doc/tm.texi: Regenerate.
2562 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2563 (rs6000_translate_mode_attribute): New function.
2564
2565 2018-07-06 Paul Koning <ni1d@arrl.net>
2566
2567 * doc/md.texi (define_split): Document DONE and FAIL.
2568 (define_peephole2): Ditto.
2569
2570 2018-07-05 Jeff Law <law@redhat.com>
2571
2572 PR tree-optimization/86010
2573 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2574 both the head and tail of mem* and str* calls.
2575
2576 2018-07-05 Jim Wilson <jimw@sifive.com>
2577
2578 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2579
2580 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2581
2582 * config/aarch64/aarch64-simd.md: correct flags text for
2583 MIN_EXPR replacement.
2584
2585 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2586
2587 * configure: Regenerated.
2588
2589 2018-07-05 Carl Love <cel@us.ibm.com>
2590
2591 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2592 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2593 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2594 VSX_BUILTIN_DOUBLEL_V4SF.
2595
2596 2018-07-05 Martin Sebor <msebor@redhat.com>
2597
2598 PR c++/86400
2599 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2600 than its domain to compute its the upper bound of a char array.
2601
2602 2018-07-05 Nathan Sidwell <nathan@acm.org>
2603
2604 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2605 * doc/cpp.texi: Update comment.
2606 * doc/tm.texi: Rebuilt.
2607 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2608 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2609 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2610 headers affected by extern "C".
2611 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2612 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2613 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2614 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2615 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2616 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2617 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2618 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2619 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2620 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2621 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2622 config/sparc/sp64-elf.h, config/spu/spu.h,
2623 config/stormy16/stormy16.h, config/v850/v850.h,
2624 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2625 define NO_IMPLICIT_EXTERN_C.
2626 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2627
2628 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2629
2630 PR target/84711
2631 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2632 instead of GET_MODE_SIZE when comparing Units.
2633
2634 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2635
2636 PR target/84711
2637 * rtlanal.c (set_noop_p): Constrain on mode change,
2638 include hard-reg-set.h
2639
2640 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2641
2642 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2643
2644 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2645
2646 Revert
2647 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2648
2649 PR sanitizer/84250
2650 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2651 libasan.
2652 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2653
2654 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2655
2656 PR sanitizer/84250
2657 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2658 libasan.
2659 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2660
2661 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2662
2663 PR middle-end/86380
2664 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2665
2666 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2667
2668 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2669 neg_*_op* variables.
2670
2671 2018-07-04 Martin Liska <mliska@suse.cz>
2672
2673 * tree-switch-conversion.c: Define
2674 max_ratio_for_speed and max_ratio_for_size constants.
2675
2676 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2677 Martin Liska <mliska@suse.cz>
2678
2679 PR middle-end/66240
2680 PR target/45996
2681 PR c/84100
2682 * common.opt: Rename align options with 'str_' prefix.
2683 * common/config/i386/i386-common.c (set_malign_value): New
2684 function.
2685 (ix86_handle_option): Use it to set -falign-* options/
2686 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2687 type from int to string.
2688 * config/aarch64/aarch64.c: Update default values from int
2689 to string.
2690 * config/alpha/alpha.c (alpha_override_options_after_change):
2691 Likewise.
2692 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2693 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2694 max skip conditionally.
2695 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2696 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2697 max skip conditionally.
2698 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2699 max skip conditionally.
2700 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2701 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2702 max skip conditionally.
2703 * config/i386/i386.c (struct ptt): Change type from int to
2704 string.
2705 (ix86_default_align): Set default values.
2706 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2707 max skip conditionally.
2708 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2709 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2710 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2711 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2712 max skip conditionally.
2713 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2714 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2715 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2716 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2717 max skip conditionally.
2718 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2719 * config/ia64/ia64.c (ia64_option_override): Set default values
2720 for alignment options.
2721 * config/m68k/m68k.c: Handle new str_align_* options.
2722 * config/mips/mips.c (mips_set_compression_mode): Change
2723 type of constants.
2724 (mips_option_override): Set default values for options.
2725 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2726 Likewise.
2727 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2728 Likewise.
2729 * config/rx/rx.c (rx_option_override): Likewise.
2730 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2731 (LABEL_ALIGN): Use align_labels_log.
2732 (LOOP_ALIGN): Use align_loops_align.
2733 * config/s390/s390.c (s390_asm_output_function_label): Use new
2734 macros.
2735 * config/sh/sh.c (sh_override_options_after_change):
2736 Change type of constants.
2737 * config/spu/spu.c (spu_sched_init): Likewise.
2738 * config/sparc/sparc.c (sparc_option_override): Set default
2739 values for options.
2740 * config/visium/visium.c (visium_option_override): Likewise.
2741 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2742 emit p2align format with last argument if it's not needed.
2743 * doc/invoke.texi: Document extended format of -falign-*.
2744 * final.c: Use align_labels alignment.
2745 * flags.h (struct target_flag_state): Change type to use
2746 align_flags.
2747 (struct align_flags_tuple): New.
2748 (struct align_flags): Likewise.
2749 (align_loops_log): Redefine macro to use new types.
2750 (align_loops_max_skip): Redefine macro to use new types.
2751 (align_jumps_log): Redefine macro to use new types.
2752 (align_jumps_max_skip): Redefine macro to use new types.
2753 (align_labels_log): Redefine macro to use new types.
2754 (align_labels_max_skip): Redefine macro to use new types.
2755 (align_functions_log): Redefine macro to use new types.
2756 (align_loops): Redefine macro to use new types.
2757 (align_jumps): Redefine macro to use new types.
2758 (align_labels): Redefine macro to use new types.
2759 (align_functions): Redefine macro to use new types.
2760 (align_functions_max_skip): Redefine macro to use new types.
2761 (align_loops_value): New macro.
2762 (align_jumps_value): New macro.
2763 (align_labels_value): New macro.
2764 (align_functions_value): New macro.
2765 * function.c (invoke_set_current_function_hook): Propagate
2766 alignment values from flags to global variables default in
2767 topleev.h.
2768 * ipa-icf.c (sem_function::equals_wpa): Use
2769 cl_optimization_option_eq instead of memcmp.
2770 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2771 of string types.
2772 (cl_optimization_stream_in): Likewise.
2773 * optc-save-gen.awk: Support strings in cl_optimization.
2774 * opth-gen.awk: Likewise.
2775 * opts.c (finish_options): Remove error checking of invalid
2776 value ranges.
2777 (MAX_CODE_ALIGN): Remove.
2778 (MAX_CODE_ALIGN_VALUE): Likewise.
2779 (parse_and_check_align_values): New function.
2780 (check_alignment_argument): Likewise.
2781 (common_handle_option): Use check_alignment_argument.
2782 * opts.h (parse_and_check_align_values): Declare.
2783 * toplev.c (init_alignments): Remove.
2784 (read_log_maxskip): New.
2785 (parse_N_M): Likewise.
2786 (parse_alignment_opts): Likewise.
2787 (backend_init_target): Remove usage of init_alignments.
2788 * toplev.h (parse_alignment_opts): Declare.
2789 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2790 argument.
2791 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2792 * tree.c (cl_option_hasher::equal): New.
2793 * varasm.c: Use new global macros.
2794
2795 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2796
2797 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2798 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2799 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2800 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2801 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2802 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2803 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2804 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2805 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2806 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2807 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2808 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2809 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2810
2811 2018-07-04 Martin Liska <mliska@suse.cz>
2812 Jonathan Wakely <jwakely@redhat.com>
2813
2814 * coverage.c: Use correct type.
2815 * doc/invoke.texi: Language correction.
2816
2817 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2818
2819 PR target/85620
2820 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2821 ENDBRANCH for non-tail call which may return via indirect branch.
2822 * doc/extend.texi: Document indirect_return attribute.
2823
2824 2018-07-03 Martin Sebor <msebor@redhat.com>
2825
2826 PR tree-optimization/86274
2827 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2828 precondition.
2829 (format_floating): Correct handling of infinities and NaNs.
2830
2831 2018-07-03 Martin Sebor <msebor@redhat.com>
2832
2833 * print-tree.c (print_real_cst): New function.
2834 (print_node_brief): Call it.
2835 (print_node): Ditto.
2836
2837 2018-07-03 Jeff Law <law@redhat.com>
2838
2839 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2840 into a single pattern.
2841
2842 * config/h8300/h8300.md (ors code_iterator): New.
2843 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2844 a single pattern and single splitter.
2845 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2846 (iorqi3_1, xorqi3_1): Likewise.
2847 (iorqi3, xorqi3 expanders): Similarly.
2848
2849 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2850 (movmd_internal) into a single pattern using the P mode iterator.
2851 (movmd splitters): Similarly.
2852 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2853 (movsd splitters): Similarly.
2854
2855 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2856 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2857 right table based on the size of the operand.
2858 * config/h8300/h8300.md (length_table): Corresponding changes. All
2859 references to "addb", "addw" and "addl" changed to "add".
2860 (btst patterns): Merge two variants into a single pattern.
2861 (tstqi, tsthi): Likewise.
2862 (addhi3_incdec, addsi3_incdec): Likewise.
2863 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2864 (mulhi3, mulsi3): Likewise.
2865 (udivhi3, udivsi3): Likewise.
2866 (divhi3, divsi3): Likewise.
2867 (andorqi3, andorhi3, andorsi3): Likewise.
2868
2869 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2870
2871 PR target/85694
2872 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2873 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2874
2875 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2876
2877 PR tree-optimization/85694
2878 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2879 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2880 UNSPEC_URHADD.
2881 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2882 (<u>avg<mode>3_ceil): New patterns.
2883
2884 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2885
2886 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2887 scan-tree-dump directive.
2888 * gcc.dg/vect/slp-perm-2.c: Likewise.
2889 * gcc.dg/vect/slp-perm-3.c: Likewise.
2890 * gcc.dg/vect/slp-perm-5.c: Likewise.
2891 * gcc.dg/vect/slp-perm-6.c: Likewise.
2892 * gcc.dg/vect/slp-perm-7.c: Likewise.
2893 * gcc.dg/vect/slp-perm-8.c: Likewise.
2894
2895 2018-07-03 Marek Polacek <polacek@redhat.com>
2896
2897 PR middle-end/86202
2898 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2899
2900 2018-07-03 Richard Biener <rguenther@suse.de>
2901
2902 PR ipa/86389
2903 * tree-ssa-structalias.c (find_func_clobbers): Properly
2904 handle indirect calls.
2905
2906 2018-07-03 Jeff Law <law@redhat.com>
2907
2908 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2909 (shifts): New code iterator.
2910 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2911 expander. Fix HImode handling on H8/SX.
2912 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2913 (subqi3, subhi3, subsi3 expanders): Likewise.
2914 (andqi3, andhi3, andsi3 expanders): Likewise.
2915 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2916 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2917 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2918 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2919 (zero_extendqihi2, zero_extendqisi2): Likewise.
2920 (extendqihi2, extendqisi2): Likewise.
2921 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2922 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2923 (rotlqi3_1, rotlhi3_1): Likewise.
2924 (logicalhi3_sn, logicalsi3_sn): Likewise.
2925 (logicalhi3, logicalsi3): Likewise.
2926
2927 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2928
2929 * tree-vect-patterns.c (vect_recog_rotate_pattern)
2930 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
2931 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
2932 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
2933 type to append_pattern_def_seq instead of creating a stmt_vec_info
2934 directly.
2935 (build_mask_conversion): Likewise. Remove vinfo argument.
2936 (vect_add_conversion_to_patterm): Likewise, renaming to...
2937 (vect_add_conversion_to_pattern): ...this.
2938 (vect_recog_mask_conversion_pattern): Update call to
2939 build_mask_conversion. Pass the vector type to
2940 append_pattern_def_seq here too.
2941 (vect_recog_gather_scatter_pattern): Update call to
2942 vect_add_conversion_to_pattern.
2943
2944 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2945
2946 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
2947 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2948 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
2949 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
2950 STMT_VINFO_PATTERN_DEF_SEQ to null here.
2951 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
2952 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
2953 append_pattern_def_seq instead of new_pattern_def_seq.
2954 (vect_recog_divmod_pattern): Do both of the above.
2955 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
2956 is null.
2957
2958 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2959
2960 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
2961 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
2962 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
2963 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
2964 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
2965 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
2966 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
2967 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2968 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2969 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
2970 parameter with a single stmt_vec_info.
2971 (vect_recog_func_ptr): Likewise.
2972 (vect_recog_gather_scatter_pattern): Likewise, folding in...
2973 (vect_try_gather_scatter_pattern): ...this.
2974 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
2975 the stmt_vec_info of the statement to be matched. Don't clear
2976 STMT_VINFO_RELATED_STMT.
2977 (vect_pattern_recog): Update call accordingly.
2978
2979 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2980
2981 PR tree-optimization/85694
2982 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
2983 (uavgM3_ceil): Document new optabs.
2984 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
2985 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
2986 functions.
2987 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
2988 (savg_ceil_optab): New optabs.
2989 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
2990 (vect_vect_recog_func_ptrs): Add it.
2991 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
2992 constant directly from the associated lhs.
2993
2994 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2995
2996 * tree-vect-patterns.c (vect_split_statement): New function.
2997 (vect_convert_input): Use it to try to split an existing cast.
2998
2999 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3000
3001 * poly-int.h (print_hex): New function.
3002 * dumpfile.h (dump_dec, dump_hex): Declare.
3003 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3004 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3005 min_input_precision, operation_precision and operation_sign.
3006 * tree-vect-patterns.c (vect_get_range_info): New function.
3007 (vect_same_loop_or_bb_p, vect_single_imm_use)
3008 (vect_operation_fits_smaller_type): Delete.
3009 (vect_look_through_possible_promotion): Add an optional
3010 single_use_p parameter.
3011 (vect_recog_over_widening_pattern): Rewrite to use new
3012 stmt_vec_info infomration. Handle one operation at a time.
3013 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3014 (vect_truncatable_operation_p, vect_set_operation_type)
3015 (vect_set_min_input_precision): New functions.
3016 (vect_determine_min_output_precision_1): Likewise.
3017 (vect_determine_min_output_precision): Likewise.
3018 (vect_determine_precisions_from_range): Likewise.
3019 (vect_determine_precisions_from_users): Likewise.
3020 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3021 (vect_vect_recog_func_ptrs): Put over_widening first.
3022 Add cast_forwprop.
3023 (vect_pattern_recog): Call vect_determine_precisions.
3024
3025 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3026
3027 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3028 statements that have been replaced by further pattern statements.
3029 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3030
3031 2018-07-03 Richard Biener <rguenther@suse.de>
3032
3033 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3034 always set *dt. Dump vectype in vectype overload.
3035 * dumpfile.h (dump_gimple_expr): New function.
3036 (dump_gimple_expr_loc): Likewise.
3037 * dumpfile.c (dump_gimple_expr): New function.
3038 (dump_gimple_expr_loc): Likewise.
3039
3040 2018-07-02 Jeff Law <law@redhat.com>
3041
3042 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3043 the H8/300, H8/300H and H8/S variants into a single pattern.
3044 (movhi_h8300, movqi_h8300hs): Similarly.
3045 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3046 (QHI mode iterator): New.
3047
3048 * config/h8300/h8300.md: Remove trailing whitespace.
3049
3050 2018-07-02 Jim Wilson <jimw@sifive.com>
3051
3052 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3053 instead of emit_insn for interrupt returns.
3054 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3055 (riscv_sret, riscv_uret): Likewise.
3056
3057 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3058
3059 * pretty-print.c (selftest::test_pp_format): Move save and restore
3060 of quotes to class auto_fix_quotes, and add an instance.
3061 * selftest.c: Include "intl.h".
3062 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3063 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3064 * selftest.h (selftest::auto_fix_quotes): New class.
3065
3066 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3067
3068 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3069 (aarch64_sve_prepare_conditional_op): Remove.
3070 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3071 Allow aarch64_simd_reg_or_zero as select operand; remove
3072 the aarch64_sve_prepare_conditional_op call.
3073 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3074 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3075 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3076 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3077 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3078 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3079 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3080 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3081 and a splitters to match all of the *_any patterns.
3082 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3083
3084 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3085 (SVE_COND_FP_BINARY_REV): Remove.
3086 (sve_int_op_rev, sve_fp_op_rev): New.
3087 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3088 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3089 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3090 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3091 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3092 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3093 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3094 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3095 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3096
3097 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3098 Remove match_dup 1 from the inner unspec.
3099 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3100
3101 * config/aarch64/aarch64.md (movprfx): New attr.
3102 (length): Default movprfx to 8.
3103 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3104 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3105 (*<su>mul<SVE_I>3_highpart): Likewise.
3106 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3107 (*v<ASHIFT><SVE_I>3): Likewise.
3108 (*<su><MAXMIN><SVE_I>3): Likewise.
3109 (*<su><MAXMIN><SVE_F>3): Likewise.
3110 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3111 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3112 (*div<SVE_F>4): Likewise.
3113
3114 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3115
3116 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3117 in dump string.
3118
3119 2018-07-02 Richard Biener <rguenther@suse.de>
3120
3121 PR tree-optimization/86363
3122 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3123 memset argument refers to a non-variable address.
3124
3125 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3126
3127 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3128 {PLUS,MINUS}_EXPR code to...
3129 (adjust_symbolic_bound): ...here,
3130 (combine_bound): ...here,
3131 (set_value_range_with_overflow): ...and here.
3132
3133 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3134
3135 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3136 code...
3137 (extract_range_from_abs_expr): ...here.
3138
3139 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3140
3141 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3142 -fno-omit-frame-pointer when not optimizing.
3143
3144 2018-07-02 Martin Liska <mliska@suse.cz>
3145
3146 PR ipa/86279
3147 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3148 (propagate_nothrow): Likewise.
3149
3150 2018-07-02 Martin Liska <mliska@suse.cz>
3151
3152 PR ipa/86323
3153 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3154
3155 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3156
3157 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3158 function in r262149, changing "loc" param from source_location to
3159 const dump_location_t &.
3160 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3161 declaration, as above.
3162
3163 2018-07-01 Paul Koning <ni1d@arrl.net>
3164
3165 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3166 -munit-asm, -mgnu-asm, -mdec-asm.
3167 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3168 (pdp11_output_labelref): New.
3169 (pdp11_output_def): New.
3170 (pdp11_output_addr_vec_elt): New.
3171 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3172 %# and %@ format codes.
3173 (pdp11_option_override): New.
3174 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3175 (pdp11_output_ident): New.
3176 (pdp11_asm_named_section): New.
3177 (pdp11_asm_init_sections): New.
3178 (pdp11_file_start): New.
3179 (pdp11_file_end): New.
3180 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3181 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3182 %o, like %c but octal.
3183 (pdp11_option_override): New.
3184 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3185 -mdec-asm.
3186 (DATA_SECTION_ASM_OP): Ditto.
3187 (READONLY_DATA_SECTION_ASM_OP): New.
3188 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3189 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3190 (ASM_OUTPUT_LABELREF): Ditto.
3191 (ASM_OUTPUT_DEF): Ditto.
3192 (ASM_OUTPUT_EXTERNAL): New.
3193 (ASM_OUTPUT_SOURCE_FILENAME): New.
3194 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3195 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3196 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3197 %# and %@ format codes.
3198 * config/pdp11/pdp11.opt (mgnu-asm): New.
3199 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3200 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3201 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3202
3203 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3204
3205 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3206 dereferencing path[] beyond its length.
3207 (debug_path): New.
3208 (debug_all_paths): New.
3209 (rewire_first_differing_edge): New.
3210 (adjust_paths_after_duplication): New.
3211 (duplicate_thread_path): Call adjust_paths_after_duplication.
3212 Add new argument.
3213 (thread_through_all_blocks): Add new argument to
3214 duplicate_thread_path.
3215
3216 2018-06-30 Jim Wilson <jimw@sifive.com>
3217
3218 * config/riscv/predicates.md (p2m1_shift_operand): New.
3219 (high_mask_shift_operand): New.
3220 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3221 pattern using p2m1_shift_operand.
3222 (lshsi3_zero_extend_3+2): New combiner pattern using
3223 high_mask_shift_operand.
3224
3225 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3226
3227 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3228 split out from...
3229 (vect_recog_rotate_pattern): ...here.
3230 (vect_convert_input): Try to insert casts of invariants in the
3231 preheader.
3232 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3233 preheader to be empty.
3234
3235 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3236
3237 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3238 vector type. If given, install it in the new statement's
3239 STMT_VINFO_VECTYPE.
3240 (vect_element_precision): New function.
3241 (vect_unpromoted_value): New struct.
3242 (vect_unpromoted_value::vect_unpromoted_value): New function.
3243 (vect_unpromoted_value::set_op): Likewise.
3244 (vect_look_through_possible_promotion): Likewise.
3245 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3246 (vect_widened_op_tree, vect_convert_input): Likewise.
3247 (vect_convert_inputs, vect_convert_output): Likewise.
3248 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3249 to handle the optional cast of the multiplication result and
3250 vect_widened_op_tree to detect the widened multiplication itself.
3251 Do not require the input and output of promotion casts to have
3252 the same sign, but base the signedness of the operation on the
3253 input rather than the result. If the pattern includes two
3254 promotions, check that those promotions have the same sign.
3255 Do not restrict the MULT_EXPR handling to a double-width result;
3256 handle quadruple-width results and wider. Use vect_convert_inputs
3257 to convert the inputs to the common type.
3258 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3259 to handle the optional cast of the ABS result. Also allow a sign
3260 change or a sign extension between the ABS and MINUS.
3261 Use vect_widened_op_tree to detect the widened subtraction and use
3262 vect_convert_inputs to convert the inputs to the common type.
3263 (vect_handle_widen_op_by_const): Delete.
3264 (vect_recog_widen_op_pattern): New function.
3265 (vect_recog_widen_mult_pattern): Use it.
3266 (vect_recog_widen_shift_pattern): Likewise.
3267 (vect_recog_widen_sum_pattern): Use
3268 vect_look_through_possible_promotion to handle the promoted
3269 PLUS_EXPR operand.
3270
3271 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3272
3273 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3274 the containing gimple_seq *.
3275 * gimple-iterator.h (gsi_for_stmt): Declare it.
3276 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3277 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3278 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3279 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3280 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3281 checks.
3282 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3283 split out from...
3284 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3285 statement being replaced is part of an existing pattern
3286 definition sequence, inserting the new pattern statements before
3287 the original one.
3288 (vect_pattern_recog_1): Don't return a bool. If the statement
3289 is already part of a pattern, instead apply pattern matching
3290 to the pattern definition statements. Don't clear the
3291 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3292 (vect_pattern_recog): Don't break after the first match;
3293 continue processing the pattern definition statements instead.
3294 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3295
3296 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3297
3298 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3299 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3300 (vect_recog_widen_sum_pattern): Use it.
3301
3302 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3303
3304 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3305 phi is not a pattern statement and has not been replaced by
3306 a pattern statement.
3307 * tree-vect-patterns.c (type_conversion_p): Don't check
3308 STMT_VINFO_IN_PATTERN_P.
3309 (vect_recog_vector_vector_shift_pattern): Likewise.
3310 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3311 the pattern statement rather than the original statement; check
3312 directly for a WIDEN_MULT_EXPR here.
3313 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3314 vect_is_simple_use to return the pattern statement rather
3315 than the original statement; use is_pattern_stmt_p to check
3316 for such a pattern statement.
3317 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3318 to return the pattern statement rather than the original statement;
3319 don't do the same transformation here.
3320 (vect_is_simple_use): If the defining statement has been replaced
3321 by a pattern statement, return the pattern statement instead.
3322 Remove the corresponding (local) transformation from the vectype
3323 overload.
3324
3325 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3326
3327 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3328 end and default to null.
3329 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3330 (vectorizable_reduction): Update calls accordingly, dropping the
3331 gimple ** argument if the passed-back statement isn't needed.
3332 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3333 (vect_recog_rotate_pattern): Likewise.
3334 (vect_recog_mask_conversion_pattern): Likewise.
3335 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3336 (vect_mask_constant_operand_p): Likewise.
3337 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3338 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3339 (get_group_load_store_type, get_load_store_type): Likewise.
3340 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3341 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3342 (vectorizable_conversion, vectorizable_assignment): Likewise.
3343 (vectorizable_shift, vectorizable_operation): Likewise.
3344 (vectorizable_store, vect_is_simple_cond): Likewise.
3345 (vectorizable_condition, vectorizable_comparison): Likewise.
3346 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3347 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3348 and move it to the end. Cope with null def_stmt_outs.
3349
3350 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3351
3352 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3353
3354 2018-06-29 Jeff Law <law@redhat.com>
3355
3356 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3357 displacements for TARGET_V850E2V3 and newer.
3358 (TARGET_LRA_P): Remove. Defaults to LRA now.
3359 * config/v850/v850.md (sign23byte_load): Remove.
3360 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3361 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3362
3363 2018-06-29 Martin Liska <mliska@suse.cz>
3364
3365 PR lto/85759
3366 * coverage.c (coverage_init): Mangle full path name.
3367 * doc/invoke.texi: Document the change.
3368 * gcov-io.c (mangle_path): New.
3369 * gcov-io.h (mangle_path): Likewise.
3370 * gcov.c (mangle_name): Use mangle_path for path mangling.
3371
3372 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3373
3374 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3375 if starting source register is not even.
3376
3377 2018-06-29 Martin Liska <mliska@suse.cz>
3378
3379 PR tree-optimization/86263
3380 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3381 Make edge redirection.
3382
3383 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3384
3385 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3386 (dump_scope_depth): New variable.
3387 (get_dump_scope_depth): New function.
3388 (dump_begin_scope): New function.
3389 (dump_end_scope): New function.
3390 * dumpfile.h (get_dump_scope_depth): New declaration.
3391 (dump_begin_scope): New declaration.
3392 (dump_end_scope): New declaration.
3393 (class auto_dump_scope): New class.
3394 (AUTO_DUMP_SCOPE): New macro.
3395 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3396 AUTO_DUMP_SCOPE.
3397
3398 2018-06-29 Richard Biener <rguenther@suse.de>
3399
3400 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3401 compute_all_dependences succeeds.
3402 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3403 exceed --param loop-max-datarefs-for-datadeps.
3404
3405 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3406
3407 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3408
3409 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3410
3411 PR target/86348
3412 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3413 alternative 0 in preferred_for_speed attribute.
3414
3415 2018-06-28 Paul Koning <ni1d@arrl.net>
3416
3417 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3418 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3419 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3420 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3421 for shift insn patterns.
3422
3423 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3424
3425 * cgraph.c (cgraph_node::get_body): Replace assignments to
3426 "dump_file" with calls to set_dump_file.
3427 * dumpfile.c (alt_dump_file): Make static, and group with...
3428 (alt_flags): ...this definition.
3429 (dumps_are_enabled): New variable.
3430 (refresh_dumps_are_enabled): New function.
3431 (set_dump_file): New function.
3432 (set_alt_dump_file): New function.
3433 (gcc::dump_manager::dump_start): Replace assignments to
3434 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3435 set_alt_dump_file.
3436 (gcc::dump_manager::dump_finish): Likewise.
3437 * dumpfile.h (alt_dump_file): Delete decl.
3438 (dumps_are_enabled): New variable decl.
3439 (set_dump_file): New function decl.
3440 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3441 global.
3442 * tree-nested.c (lower_nested_functions): Replace assignments to
3443 "dump_file" with calls to set_dump_file.
3444
3445 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3446
3447 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3448 goto_locus of each outgoing edge of each basic block.
3449
3450 2018-06-28 Richard Biener <rguenther@suse.de>
3451
3452 * dwarf2out.c (decl_scope_table): Remove.
3453 (push_decl_scope): Likewise.
3454 (pop_decl_scope): Likewise.
3455 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3456 (gen_struct_or_union_type_die): Likewise.
3457 (gen_tagged_type_die): Likewise.
3458 (dwarf2out_init): Do not initialize decl_scope_table.
3459 (dwarf2out_c_finalize): Do not free it.
3460
3461 2018-06-28 Richard Biener <rguenther@suse.de>
3462
3463 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3464 deciding whether to not re-use a DIE.
3465
3466 2018-06-28 Richard Biener <rguenther@suse.de>
3467
3468 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3469 DW_AT_abstract_origin attribute.
3470
3471 2018-06-28 Martin Liska <mliska@suse.cz>
3472
3473 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3474 Use newly introduced constants.
3475 * tree-switch-conversion.h (struct jump_table_cluster):
3476 Define max_ratio_for_size and max_ratio_for_speed.
3477
3478 2018-06-28 Martin Liska <mliska@suse.cz>
3479
3480 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3481 Add new checking assert to catch invalid state.
3482 (jump_table_cluster::can_be_handled): Handle single case
3483 clusters.
3484 (jump_table_cluster::is_beneficial): Bail out for such case.
3485 (bit_test_cluster::find_bit_tests):
3486 Add new checking assert to catch invalid state.
3487 (bit_test_cluster::can_be_handled): Handle single case
3488 clusters.
3489 (bit_test_cluster::is_beneficial): Bail out for such case.
3490 (switch_decision_tree::analyze_switch_statement):
3491 Fix comment.
3492
3493 2018-06-28 Martin Liska <mliska@suse.cz>
3494
3495 * common.opt: Introduce -completion option.
3496 * gcc.c (driver_handle_option): Handle it.
3497 (driver::main): Print completions if completion
3498 is set.
3499 * opt-suggestions.c (option_proposer::get_completions):
3500 New function.
3501 (option_proposer::suggest_completion): Likewise.
3502 (option_proposer::find_param_completions): Likewise.
3503 (verify_autocompletions): Likewise.
3504 (test_completion_valid_options): Likewise.
3505 (test_completion_valid_params): Likewise.
3506 (in_completion_p): Likewise.
3507 (empty_completion_p): Likewise.
3508 (test_completion_partial_match): Likewise.
3509 (test_completion_garbage): Likewise.
3510 (opt_proposer_c_tests): Likewise.
3511 * opt-suggestions.h: Declare new functions.
3512 * opts.c (common_handle_option): Handle OPT__completion_.
3513 * selftest-run-tests.c (selftest::run_tests): Add
3514 opt_proposer_c_tests.
3515 * selftest.c (assert_str_startswith): New.
3516 * selftest.h (assert_str_startswith): Likewise.
3517 (opt_proposer_c_tests): New.
3518 (ASSERT_STR_STARTSWITH): Likewise.
3519
3520 2018-06-28 Martin Liska <mliska@suse.cz>
3521
3522 * Makefile.in: Add opt-suggestions.o.
3523 * gcc-main.c: Include opt-suggestions.h.
3524 * gcc.c (driver::driver): Likewise.
3525 (driver::~driver): Remove m_option_suggestions.
3526 (driver::build_option_suggestions): Moved to option_proposer.
3527 (driver::suggest_option): Likewise.
3528 (driver::handle_unrecognized_options): Use option_proposer.
3529 * gcc.h (class driver): Add new memver m_option_proposer.
3530 * opt-suggestions.c: New file.
3531 * opt-suggestions.h: New file.
3532
3533 2018-06-28 Martin Liska <mliska@suse.cz>
3534
3535 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3536 (auto_string_vec::~auto_string_vec): Likewise.
3537
3538 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3539
3540 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3541 prevent_decl_creation_for_types fields up and add reset_location field.
3542 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3543 statement if id->reset_location is true.
3544 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3545 id->reset_location is true.
3546 (copy_phis_for_bb): Force input_location on the arguments if
3547 id->reset_location is true.
3548 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3549 is set on the function to be inlined.
3550
3551 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3552
3553 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3554
3555 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3556
3557 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3558 registers for Pmode.
3559 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3560 hard registers for the clobbered pseudo.
3561
3562 2018-06-27 Paul Koning <ni1d@arrl.net>
3563
3564 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3565 mutually exclusive options.
3566 * config/pdp11/constraints.md (h): New constraint.
3567 (O): Update definition to match shift code generation.
3568 (D): New constraint.
3569 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3570 (CCFP): Remove.
3571 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3572 function.
3573 (output_jump): Change arguments.
3574 (pdp11_fixed_cc_regs): New function.
3575 (pdp11_cc_mode): Ditto.
3576 (pdp11_expand_shift): Ditto.
3577 (pdp11_assemble_shift): Ditto.
3578 (pdp11_small_shift): Ditto.
3579 (pdp11_branch_cost): Remove.
3580 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3581 from output.
3582 (pdp11_register_move_cost): Update for CC registers.
3583 (pdp11_rtx_costs): Add case for LSHIFTRT.
3584 (pdp11_output_jump): Add CCNZ mode conditional branches.
3585 (notice_update_cc_on_set): Remove.
3586 (pdp11_cc_mode): New function.
3587 (simple_memory_operand): Correct pre/post decrement case.
3588 (no_side_effect_operand): New function.
3589 (pdp11_regno_reg_class): Add CC_REGS class.
3590 (pdp11_fixed_cc_regs): New function.
3591 (pdp11_small_shift): New function.
3592 (pdp11_expand_shift): New function to expand shift insns.
3593 (pdp11_assemble_shift): New function to output shifts.
3594 (pdp11_branch_cost): Remove.
3595 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3596 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3597 (WCHAR_TYPE): Ditto.
3598 (PTRDIFF_TYPE): Ditto.
3599 (ADJUST_INSN_LENGTH): New macro.
3600 (FIXED_REGISTERS): Add CC registers.
3601 (CALL_USED_REGISTERS): Ditto.
3602 (reg_class): Ditto.
3603 (REG_CLASS_NAMES): Ditto.
3604 (REG_CLASS_CONTENTS): Ditto.
3605 (SELECT_CC_MODE): Use new function.
3606 (TARGET_FLAGS_REGNUM): New macro.
3607 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3608 (cc0_reg_rtx): Remove.
3609 (CC_STATUS_MDEP): Remove.
3610 (CC_STATUS_MDEFP_INIT): Remove.
3611 (CC_IN_FPU): Remove.
3612 (NOTICE_UPDATE_CC): Remove.
3613 (REGISTER_NAMES): Add CC registers.
3614 (BRANCH_COST): Change to constant 1.
3615 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3616 handling.
3617 * config/pdp11/pdp11.opt (mbcopy): Remove.
3618 (mbcopy-builtin): Remove.
3619 (mbranch-cheap): Remove.
3620 (mbranch-expensive): Remove.
3621 * config/pdp11/predicates.md (expand_shift_operand): Update to
3622 match shift code generation.
3623 (ccnz_operator): New predicate.
3624 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3625 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3626 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3627 exclusive options.
3628 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3629 description of O constraint.
3630
3631 2018-06-27 Jeff Law <law@redhat.com>
3632 Austin Law <austinklaw@gmail.com>
3633
3634 * config/v850/v850.md (addsi3_set_flags): New pattern.
3635 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3636 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3637 (zero_extendhisi2_v850_set_flags): Likewise.
3638 (zero_extendqisi2_v850_set_flags): Likewise.
3639 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3640 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3641 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3642
3643 * config/v850/v850-protos.h (notice_update_cc): Remove.
3644 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3645 (v850_print_operand): Handle 'D' and "d".
3646 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3647 Add handling of arithmetic/logical operations compared against zero.
3648 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3649 Do not look at v850_compare_op, instead get mode from last argument.
3650 (v850_gen_compare): Remove
3651 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3652 after reload for prologue insns.
3653 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3654 patterns.
3655 (construct_save_jarl): Likewise.
3656 (TARGET_FLAGS_REGNUM): Define.
3657 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3658 (NOTICE_UPDATE_CC): Remove.
3659 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3660 than cc0. Conditionalize on reload_completed.
3661 (cmpsi_insn, setfcc_insn): Likewise.
3662 (tst1 splitter): Turn into define_and_split which sets the flags
3663 after reload.
3664 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3665 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3666 (cstoresf4, cstoredf4): Clobber the flags.
3667 (cmpsi, cmpsf, cmpdf): Remove expanders.
3668 (setf_insn): Remove pattern.
3669 (addsi3): Turn into define_and_split which clobbers the flags after
3670 reload and a suitable pattern (addsi3_clobber_flags) for use after
3671 reload.
3672 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3673 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3674 (ashrsi3, ashrsi3_v850e2): Likewise.
3675 (bins): Clobber the flags.
3676 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3677 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3678 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3679 (call_value_internal_short, call_value_internal_long): Likewise.
3680 (callt_save_interrupt, callt_return_interrupt): Likewise.
3681 (save_interrupt, return_interrupt): Likewise.
3682 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3683 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3684 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3685 (All FP comparisons): Only allow after reload has completed.
3686 (trfsr): Likewise.
3687 (divh, divhu): Tweak output template.
3688 (branch_z_normal, branch_z_invert): Remove
3689 (branch_nz_normal, branch_nz_invert): Likewise.
3690 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3691
3692 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3693 * config/v850/v850.c (notice_update_cc): Remove.
3694 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3695 (CC_NO_CARRY): Likewise.
3696 (NOTICE_UPDATE_CC): Define to nothing.
3697 * config/v850/v850.md: Remove block comment on cc0 handling
3698 Remove "cc" attribute from all patterns. Remove cc_status handling
3699 from all patterns. Minor formatting fixes.
3700
3701 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3702
3703 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3704 (cortex-a76.cortex-a55): Likewise.
3705 * config/aarch64/aarch64-tune.md: Regenerate.
3706 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3707 cortex-a76.cortex-a55.
3708
3709 2018-06-27 Jeff Law <law@redhat.com>
3710
3711 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3712 (MULTILIB_DIRNAMES): Similarly.
3713
3714 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3715
3716 * gimple.h (gimple_return_retbnd): Delete.
3717 (gimple_return_set_retbnd): Likewise.
3718 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3719 gimple_return_set_retbnd.
3720 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3721 gimple_return_retbnd and adjust.
3722 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3723 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3724 Explicitly return NULL in a couple more cases. Move assertion
3725 on debug statements and remove unreachable code.
3726 (reset_debug_binding): Do not test id->retbnd.
3727 (expand_call_inline): Do not set it.
3728
3729 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3730
3731 * configure.ac: Add --disable-gcov option.
3732 * configure: Regenerate.
3733 * Makefile.in: Honour @enable_gcov@.
3734 * doc/install.texi: Document --disable-gcov.
3735
3736 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3737
3738 * config/arm/arm-cpus.in (cortex-a76): New entry.
3739 (cortex-a76.cortex-a55): Likewise.
3740 * config/arm/arm-tables.opt: Regenerate.
3741 * config/arm/arm-tune.md: Likewise.
3742 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3743 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3744 cortex-a76.cortex-a55.
3745
3746 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3747
3748 PR target/85769
3749 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3750
3751 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3752
3753 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3754 comment.
3755 (EPILOGUE_USES): Likewise.
3756
3757 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3758
3759 * tree-inline.c (remap_location): New function extracted from...
3760 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3761 (copy_phis_for_bb): ...here. Call remap_location.
3762 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3763
3764 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3765
3766 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3767 unaligned vsx for 16B memset.
3768
3769 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3770
3771 PR target/86285
3772 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3773 ieee128_float_type_node to long_double_type_node unless
3774 TARGET_LONG_DOUBLE_128 is set.
3775
3776 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3777
3778 * cfgloop.c (get_loop_location): Convert return type from
3779 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3780 by implicit construction from rtx_insn *, and using
3781 dump_user_location_t::from_function_decl for the fallback case.
3782 * cfgloop.h (get_loop_location): Convert return type from
3783 location_t to dump_user_location_t.
3784 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3785 dump_printf_loc to pass in a dump_location_t rather than a
3786 location_t, via the gimple stmt.
3787 * coverage.c (get_coverage_counts): Update calls to
3788 dump_printf_loc to pass in dump_location_t rather than a
3789 location_t.
3790 * doc/optinfo.texi (Dump types): Convert example of
3791 dump_printf_loc from taking "locus" to taking "insn". Update
3792 description of the "_loc" calls to cover dump_location_t.
3793 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3794 "selftest.h".
3795 (dump_user_location_t::dump_user_location_t): New constructors,
3796 from gimple *stmt and rtx_insn *.
3797 (dump_user_location_t::from_function_decl): New function.
3798 (dump_loc): Make static.
3799 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3800 const dump_location_t &.
3801 (dump_generic_expr_loc): Delete.
3802 (dump_printf_loc): Convert param "loc" from location_t to
3803 const dump_location_t &.
3804 (selftest::test_impl_location): New function.
3805 (selftest::dumpfile_c_tests): New function.
3806 * dumpfile.h: Include "profile-count.h".
3807 (class dump_user_location_t): New class.
3808 (struct dump_impl_location_t): New struct.
3809 (class dump_location_t): New class.
3810 (dump_printf_loc): Convert 2nd param from source_location to
3811 const dump_location_t &.
3812 (dump_generic_expr_loc): Delete.
3813 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3814 const dump_location_t &.
3815 * gimple-fold.c (fold_gimple_assign): Update call to
3816 dump_printf_loc to pass in a dump_location_t rather than a
3817 location_t, via the gimple stmt.
3818 (gimple_fold_call): Likewise.
3819 * gimple-loop-interchange.cc
3820 (loop_cand::analyze_iloop_reduction_var): Update for change to
3821 check_reduction_path.
3822 (tree_loop_interchange::interchange): Update for change to
3823 find_loop_location.
3824 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3825 change in return-type of find_loop_location.
3826 (graphite_regenerate_ast_isl): Likewise.
3827 * graphite-optimize-isl.c (optimize_isl): Likewise.
3828 * graphite.c (graphite_transform_loops): Likewise.
3829 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3830 pass in a dump_location_t rather than a location_t, via the
3831 gimple stmt.
3832 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3833 * ipa.c (walk_polymorphic_call_targets): Likewise.
3834 * loop-unroll.c (report_unroll): Convert "locus" param from
3835 location_t to dump_location_t.
3836 (decide_unrolling): Update for change to get_loop_location's
3837 return type.
3838 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3839 location_t to dump_user_location_t.
3840 (grid_find_single_omp_among_assignments_1): Updates calls to
3841 dump_printf_loc to pass in a dump_location_t rather than a
3842 location_t, via the gimple stmt.
3843 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3844 location_t to dump_location_t. Updates calls to dump_printf_loc
3845 to pass in a dump_location_t rather than a location_t, via the
3846 gimple stmt.
3847 (grid_inner_loop_gridifiable_p): Likewise.
3848 (grid_dist_follows_simple_pattern): Likewise.
3849 (grid_gfor_follows_tiling_pattern): Likewise.
3850 (grid_target_follows_gridifiable_pattern): Likewise.
3851 (grid_attempt_target_gridification): Convert initialization
3852 of local "grid" from memset to zero-initialization; FIXME: does
3853 this require C++11? Update call to dump_printf_loc to pass in a
3854 optinfo_location rather than a location_t, via the gimple stmt.
3855 * profile.c (read_profile_edge_counts): Updates call to
3856 dump_printf_loc to pass in a dump_location_t rather than a
3857 location_t
3858 (compute_branch_probabilities): Likewise.
3859 * selftest-run-tests.c (selftest::run_tests): Call
3860 dumpfile_c_tests.
3861 * selftest.h (dumpfile_c_tests): New decl.
3862 * tree-loop-distribution.c (pass_loop_distribution::execute):
3863 Update for change in return type of find_loop_location.
3864 * tree-parloops.c (parallelize_loops): Likewise.
3865 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3866 "locus" from location_t to dump_user_location_t.
3867 (canonicalize_loop_induction_variables): Likewise.
3868 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3869 for change in return type of find_loop_location.
3870 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3871 to dump_printf_loc to pass in a dump_location_t rather than a
3872 location_t, via the stmt.
3873 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3874 Likewise.
3875 * tree-vect-loop-manip.c (find_loop_location): Convert return
3876 type from source_location to dump_user_location_t.
3877 (vect_do_peeling): Update for above change.
3878 (vect_loop_versioning): Update for change in type of
3879 vect_location.
3880 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3881 from location_t to dump_user_location_t.
3882 (vect_estimate_min_profitable_iters): Update for change in type
3883 of vect_location.
3884 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3885 location_t to dump_location_t.
3886 (vect_slp_bb): Update for change in type of vect_location.
3887 * tree-vectorizer.c (vect_location): Convert from source_location
3888 to dump_user_location_t.
3889 (try_vectorize_loop_1): Update for change in vect_location's type.
3890 (vectorize_loops): Likewise.
3891 (increase_alignment): Likewise.
3892 * tree-vectorizer.h (vect_location): Convert from source_location
3893 to dump_user_location_t.
3894 (find_loop_location): Convert return type from source_location to
3895 dump_user_location_t.
3896 (check_reduction_path): Convert 1st param from location_t to
3897 dump_user_location_t.
3898 * value-prof.c (check_counter): Update call to dump_printf_loc to
3899 pass in a dump_user_location_t rather than a location_t; update
3900 call to error_at for change in type of "locus".
3901 (check_ic_target): Update call to dump_printf_loc to
3902 pass in a dump_user_location_t rather than a location_t, via the
3903 call_stmt.
3904
3905 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3906
3907 * config/s390/s390.h (enum processor_flags): Do not use
3908 default tune parameter when -march was specified.
3909
3910 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3911
3912 PR target/86314
3913 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3914 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3915 operands.
3916
3917 2018-06-26 Richard Biener <rguenther@suse.de>
3918
3919 PR tree-optimization/86287
3920 PR bootstrap/86316
3921 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3922 (vect_analyze_loop): Initialize n_stmts.
3923
3924 2018-06-26 Richard Biener <rguenther@suse.de>
3925
3926 PR middle-end/86271
3927 * fold-const.c (fold_convertible_p): Pointer extension
3928 isn't valid.
3929
3930 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
3931
3932 PR debug/86064
3933 * dwarf2out.c (loc_list_has_views): Adjust comments.
3934 (dw_loc_list): Split single cross-partition range with
3935 nonzero locview.
3936
3937 2018-06-25 Jeff Law <law@redhat.com>
3938
3939 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
3940 on -mbig-switch by default.
3941
3942 * config/v850/predicates.md (const_float_1_operand): Fix match_code
3943 test.
3944 (const_float_0_operand): Remove unused predicate.
3945 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
3946 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
3947 (recipsf2): New expander. Original pattern now called
3948 (recipsf2_insn).
3949 (recipdf2, recipdf2_insn): Similarly.
3950 (rsqrtsf2, rsqrtsf2_insn): Similarly
3951 (rsqrtdf2, rsqrtdf2_insn): Similarly
3952
3953 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
3954
3955 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
3956 Simplify logic for FreeBSD (twice).
3957
3958 2018-06-25 Martin Sebor <msebor@redhat.com>
3959
3960 PR tree-optimization/86204
3961 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
3962 a strnlen result if it's less than the length of the string.
3963
3964 2018-06-25 Martin Sebor <msebor@redhat.com>
3965
3966 PR tree-optimization/85700
3967 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
3968 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
3969 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
3970
3971 2018-06-25 Martin Sebor <msebor@redhat.com>
3972
3973 * doc/extend.texi (Zero-length arrays): Update and clarify.
3974
3975 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3976
3977 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3978 added IEEE/IBM long double multilib support on PowerPC little
3979 endian Linux systems.
3980 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3981 (MULTILIB_DEFAULTS): Likewise.
3982 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3983 Likewise.
3984 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3985 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3986 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3987
3988 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
3989
3990 PR middle-end/86311
3991 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
3992 (REORDER_45): Likewise.
3993
3994 2018-06-25 Jeff Law <law@redhat.com>
3995
3996 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
3997 dividend to 32 bits. Adjust length.
3998 (udivmodhi4): Cleanup output template. Fix length.
3999
4000 2018-06-25 Carl Love <cel@us.ibm.com>
4001
4002 * config/rs6000/vsx.md: Change word selector to prefered location.
4003
4004 2018-06-25 Richard Biener <rguenther@suse.de>
4005
4006 PR tree-optimization/86304
4007 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4008 epilogue-if-converted loops as well.
4009
4010 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4011
4012 * lto-section-out.c (lto_begin_section): Do not print section
4013 name for noaddr and unnumbered dumps.
4014
4015 2018-06-25 Richard Biener <rguenther@suse.de>
4016
4017 * tree-vectorizer.h (struct vec_info_shared): New structure
4018 with parts split out from struct vec_info and loop_nest from
4019 struct _loop_vec_info.
4020 (struct vec_info): Adjust accordingly.
4021 (struct _loop_vec_info): Likewise.
4022 (LOOP_VINFO_LOOP_NEST): Adjust.
4023 (LOOP_VINFO_DATAREFS): Likewise.
4024 (LOOP_VINFO_DDRS): Likewise.
4025 (struct _bb_vec_info): Likewise.
4026 (BB_VINFO_DATAREFS): Likewise.
4027 (BB_VINFO_DDRS): Likewise.
4028 (struct _stmt_vec_info): Add dr_aux member.
4029 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4030 (DR_MISALIGNMENT_UNINITIALIZED): New.
4031 (set_dr_misalignment): Adjust.
4032 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4033 (vect_analyze_loop): Adjust prototype.
4034 (vect_analyze_loop_form): Likewise.
4035 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4036 Compute dependences lazily.
4037 (vect_record_base_alignments): Use shared datarefs/ddrs.
4038 (vect_verify_datarefs_alignment): Likewise.
4039 (vect_analyze_data_refs_alignment): Likewise.
4040 (vect_analyze_data_ref_accesses): Likewise.
4041 (vect_analyze_data_refs): Likewise.
4042 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4043 constructor parameter for shared part.
4044 (vect_analyze_loop_form): Pass in shared part and adjust.
4045 (vect_analyze_loop_2): Pass in storage for the number of
4046 stmts. Move loop nest finding to the caller. Compute
4047 datarefs lazily.
4048 (vect_analyze_loop): Pass in shared part.
4049 (vect_transform_loop): Verify shared datarefs are unchanged.
4050 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4051 constructor parameter for shared part.
4052 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4053 (vect_slp_bb): Verify shared datarefs are unchanged before
4054 transform.
4055 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4056 change.
4057 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4058 DR_MISALIGNMENT_UNINITIALIZED.
4059 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4060 parameter for shared part.
4061 (vec_info::~vec_info): Adjust.
4062 (vec_info_shared::vec_info_shared): New.
4063 (vec_info_shared::~vec_info_shared): Likewise.
4064 (vec_info_shared::save_datarefs): Likewise.
4065 (vec_info_shared::check_datarefs): Likewise.
4066 (try_vectorize_loop_1): Construct shared part live for analyses
4067 of a single loop for multiple vector sizes.
4068 * tree-parloops.c (gather_scalar_reductions): Adjust.
4069
4070 2018-06-25 Richard Biener <rguenther@suse.de>
4071
4072 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4073 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4074 (vect_analyze_data_refs): Remove similar code from here and
4075 simplify accordingly.
4076
4077 2018-06-25 Richard Biener <rguenther@suse.de>
4078
4079 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4080 for reverse storage order accesses rather than asserting
4081 they cannot happen here.
4082
4083 2018-06-25 Tom de Vries <tdevries@suse.de>
4084
4085 PR debug/86257
4086 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4087 Use data16 instead of .byte for insn prefix.
4088
4089 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4090
4091 PR C++/86082
4092 * parser.c (make_char_string_pack): Pass this literal chars
4093 through cpp_interpret_string.
4094 (cp_parser_userdef_numeric_literal): Check the result of
4095 make_char_string_pack.
4096
4097 2018-06-24 Maya Rashish <coypu@sdf.org>
4098
4099 * ginclude/stddef.h: Simplify conditions around avoiding
4100 re-definition of __size_t.
4101
4102 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4103
4104 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4105 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4106
4107 2018-06-22 Maya Rashish <coypu@sdf.org>
4108
4109 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4110 made to OpenBSD and NetBSD through the years.
4111
4112 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4113
4114 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4115 behavior of vec_pack (vector double, vector double) to match
4116 behavior of vec_float2 (vector double, vector double).
4117
4118 2018-06-22 Olivier Hainque <hainque@adacore.com>
4119
4120 * gimplify.c (gimplify_function_tree): Prevent creation
4121 of a trampoline for the address of the current function
4122 passed to entry/exit instrumentation hooks.
4123
4124 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4125
4126 PR target/86222
4127 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4128 correctly.
4129
4130 2018-06-22 Martin Liska <mliska@suse.cz>
4131
4132 PR tree-optimization/86263
4133 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4134 Bail out if is_enabled is false.
4135 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4136 New declaration.
4137 (jump_table_cluster::is_enabled): New function.
4138
4139 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4140
4141 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4142 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4143 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4144 (lto_input_ts_binfo_tree_pointers): Likewise.
4145 * tree-streamer-out.c (streamer_write_tree_bitfields,
4146 write_ts_binfo_tree_pointers): Likewise.
4147 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4148
4149 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4150
4151 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4152
4153 2018-06-22 Martin Liska <mliska@suse.cz>
4154
4155 * symbol-summary.h (get): Make it pure and inline move
4156 functionality from ::get function.
4157 (get): Remove and inline into ::get and ::get_create.
4158 (get_create): Move code from ::get function.
4159
4160 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4161
4162 PR target/85994
4163 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4164 -x assembler-with-cpp.
4165
4166 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4167
4168 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4169 _FILE_OFFSET_BITS=64 for C++.
4170
4171 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4172
4173 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4174 conversion insn that shows up when pr85657-3.c is compiled using
4175 IEEE 128-bit long double.
4176 (neg<mode>2_internal): Use the correct mode to check whether the
4177 mode is IBM extended.
4178 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4179 multiply and divide external functions from being created more
4180 than once.
4181
4182 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4183
4184 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4185 functions.
4186 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4187 the edge can be forwarded.
4188 (cfg_layout_merge_blocks): Likewise.
4189
4190 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4191
4192 * except.c (finish_eh_generation): Commit edge insertions only after
4193 the EH edges have been redirected from post-landing to landing pads.
4194
4195 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4196
4197 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4198 create_tmp_var_for to create the FRAME decl.
4199 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4200
4201 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4202
4203 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4204 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4205 debug statement when resetting its value.
4206 (expand_call_inline): Copy the locus of the call onto the assignment
4207 of the return value, if any. Use local variable in more cases.
4208
4209 2018-06-21 Martin Liska <mliska@suse.cz>
4210
4211 * ipa-pure-const.c (propagate_nothrow): Use
4212 funct_state_summaries->get.
4213 (dump_malloc_lattice): Likewise.
4214 (propagate_malloc): Likewise.
4215
4216 2018-06-21 Richard Biener <rguenther@suse.de>
4217
4218 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4219 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4220 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4221 comment.
4222 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4223 BLOCK_ABSTRACT_ORIGIN unconditionally.
4224
4225 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4226
4227 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4228 deleting it.
4229 * ipa-reference.c (ipa_reference_c_finalize): Delete
4230 ipa_ref_opt_sum_summaries and set it to NULL.
4231
4232 2018-06-21 Tom de Vries <tdevries@suse.de>
4233
4234 PR tree-optimization/85859
4235 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4236 test with comment from bb_no_side_effects_p.
4237
4238 2018-06-21 Richard Biener <rguenther@suse.de>
4239
4240 PR tree-optimization/86232
4241 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4242 max for constant niter.
4243
4244 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4245
4246 * config/aarch64/aarch64-simd.md
4247 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4248
4249 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4250
4251 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4252 Make opernads of the unspec commutative.
4253
4254 2018-06-21 Richard Biener <rguenther@suse.de>
4255
4256 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4257 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4258 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4259 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4260 NULL DR_STEP.
4261 (vect_record_base_alignments): Do not record base alignment
4262 for gathers or scatters.
4263 (vect_compute_data_ref_alignment): Drop return value that is always
4264 true. Bail out early for gathers or scatters.
4265 (vect_enhance_data_refs_alignment): Bail out early for gathers
4266 or scatters.
4267 (vect_find_same_alignment_drs): Likewise.
4268 (vect_analyze_data_refs_alignment): Remove dead code.
4269 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4270 (vect_analyze_data_refs): For possible gathers or scatters do
4271 not create an alternate DR, just check their possible validity
4272 and mark them. Adjust DECL_NONALIASED handling to not rely
4273 on DR_BASE_ADDRESS.
4274 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4275 update inits of gathers or scatters.
4276 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4277 Also copy gather/scatter flag to pattern vinfo.
4278
4279 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4280
4281 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4282 behavior of vec_packsu (vector unsigned long long, vector unsigned
4283 long long) to match behavior of vec_packs with same signature.
4284
4285 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4286 Thomas Schwinge <thomas@codesourcery.com>
4287 Cesar Philippidis <cesar@codesourcery.com>
4288
4289 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4290 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4291 (gimplify_adjust_omp_clauses): Likewise.
4292 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4293 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4294 (gimplify_omp_target_update): Update handling of acc update and
4295 enter/exit data.
4296 * omp-low.c (install_var_field): Remove unused parameter
4297 base_pointers_restrict.
4298 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4299 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4300 FINALIZE}
4301 (omp_target_base_pointers_restrict_p): Delete.
4302 (scan_omp_target): Update call to scan_sharing_clauses.
4303 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4304 FINALIZE}.
4305 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4306 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4307 (convert_local_omp_clauses): Likewise.
4308 * tree-pretty-print.c (dump_omp_clause): Likewise.
4309 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4310 FINALIZE}.
4311 (omp_clause_code_name): Likewise.
4312
4313 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4314
4315 PR debug/86194
4316 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4317 be narrowed.
4318
4319 PR tree-optimization/86231
4320 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4321 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4322
4323 2018-06-20 Tom de Vries <tdevries@suse.de>
4324
4325 PR tree-optimization/86097
4326 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4327 iv type if signedness of iv type is not the same as that of *nit.
4328
4329 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4330
4331 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4332 EDGE_EH edges, verify they are all EDGE_EH.
4333
4334 2018-06-20 Maya Rashish <coypu@sdf.org>
4335
4336 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4337
4338 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4339
4340 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4341 * config/aarch64/aarch64.c (xgene1_tunings): Add
4342 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4343 (aarch64_mode_valid_for_sched_fusion_p):
4344 Allow 16-byte modes.
4345 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4346 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4347 128-bit modes.
4348 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4349 New pattern.
4350 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4351 * config/aarch64/iterators.md (VQ2): New mode iterator.
4352
4353 2018-06-20 Martin Liska <mliska@suse.cz>
4354
4355 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4356 Change default ratio from 10 to 8.
4357
4358 2018-06-20 Martin Liska <mliska@suse.cz>
4359
4360 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4361 New.
4362 (bit_test_cluster::find_bit_tests): Likewise.
4363 (switch_decision_tree::analyze_switch_statement): Find clusters.
4364 * tree-switch-conversion.h (struct jump_table_cluster): Document
4365 hierarchy.
4366
4367 2018-06-20 Martin Liska <mliska@suse.cz>
4368
4369 * tree-switch-conversion.c (switch_conversion::collect):
4370 Record m_uniq property.
4371 (switch_conversion::expand): Bail out for special conditions.
4372 (group_cluster::~group_cluster): New.
4373 (group_cluster::group_cluster): Likewise.
4374 (group_cluster::dump): Likewise.
4375 (jump_table_cluster::emit): New.
4376 (switch_decision_tree::fix_phi_operands_for_edges): New.
4377 (struct case_node): Remove struct.
4378 (jump_table_cluster::can_be_handled): New.
4379 (case_values_threshold): Moved to header.
4380 (reset_out_edges_aux): Likewise.
4381 (jump_table_cluster::is_beneficial): New.
4382 (bit_test_cluster::can_be_handled): Likewise.
4383 (add_case_node): Remove.
4384 (bit_test_cluster::is_beneficial): New.
4385 (case_bit_test::cmp): New.
4386 (bit_test_cluster::emit): New.
4387 (expand_switch_as_decision_tree_p): Remove.
4388 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4389 (fix_phi_operands_for_edge): Likewise.
4390 (switch_decision_tree::analyze_switch_statement): New.
4391 (compute_cases_per_edge): Move ...
4392 (switch_decision_tree::compute_cases_per_edge): ... here.
4393 (try_switch_expansion): Likewise.
4394 (switch_decision_tree::try_switch_expansion): Likewise.
4395 (record_phi_operand_mapping): Likewise.
4396 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4397 (emit_case_decision_tree): Likewise.
4398 (switch_decision_tree::emit): Likewise.
4399 (balance_case_nodes): Likewise.
4400 (switch_decision_tree::balance_case_nodes): Likewise.
4401 (dump_case_nodes): Likewise.
4402 (switch_decision_tree::dump_case_nodes): Likewise.
4403 (emit_jump): Likewise.
4404 (switch_decision_tree::emit_jump): Likewise.
4405 (emit_cmp_and_jump_insns): Likewise.
4406 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4407 (emit_case_nodes): Likewise.
4408 (switch_decision_tree::emit_case_nodes): Likewise.
4409 (conditional_probability): Remove.
4410 * tree-switch-conversion.h (enum cluster_type): New.
4411 (PRINT_CASE): New.
4412 (struct cluster): Likewise.
4413 (cluster::cluster): Likewise.
4414 (struct simple_cluster): Likewise.
4415 (simple_cluster::simple_cluster): Likewise.
4416 (struct group_cluster): Likewise.
4417 (struct jump_table_cluster): Likewise.
4418 (struct bit_test_cluster): Likewise.
4419 (struct min_cluster_item): Likewise.
4420 (struct case_tree_node): Likewise.
4421 (case_tree_node::case_tree_node): Likewise.
4422 (jump_table_cluster::case_values_threshold): Likewise.
4423 (struct case_bit_test): Likewise.
4424 (struct switch_decision_tree): Likewise.
4425 (struct switch_conversion): Likewise.
4426 (switch_decision_tree::reset_out_edges_aux): Likewise.
4427
4428 2018-06-20 Martin Liska <mliska@suse.cz>
4429
4430 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4431 (hoist_edge_and_branch_if_true): Likewise.
4432 (expand_switch_using_bit_tests_p): Likewise.
4433 (struct case_bit_test): Likewise.
4434 (case_bit_test_cmp): Likewise.
4435 (emit_case_bit_tests): Likewise.
4436 (switch_conversion::switch_conversion): New class.
4437 (struct switch_conv_info): Remove old struct.
4438 (collect_switch_conv_info): More to ...
4439 (switch_conversion::collect): ... this.
4440 (check_range): Likewise.
4441 (switch_conversion::check_range): Likewise.
4442 (check_all_empty_except_final): Likewise.
4443 (switch_conversion::check_all_empty_except_final): Likewise.
4444 (check_final_bb): Likewise.
4445 (switch_conversion::check_final_bb): Likewise.
4446 (create_temp_arrays): Likewise.
4447 (switch_conversion::create_temp_arrays): Likewise.
4448 (free_temp_arrays): Likewise.
4449 (gather_default_values): Likewise.
4450 (switch_conversion::gather_default_values): Likewise.
4451 (build_constructors): Likewise.
4452 (switch_conversion::build_constructors): Likewise.
4453 (constructor_contains_same_values_p): Likewise.
4454 (switch_conversion::contains_same_values_p): Likewise.
4455 (array_value_type): Likewise.
4456 (switch_conversion::array_value_type): Likewise.
4457 (build_one_array): Likewise.
4458 (switch_conversion::build_one_array): Likewise.
4459 (build_arrays): Likewise.
4460 (switch_conversion::build_arrays): Likewise.
4461 (gen_def_assigns): Likewise.
4462 (switch_conversion::gen_def_assigns): Likewise.
4463 (prune_bbs): Likewise.
4464 (switch_conversion::prune_bbs): Likewise.
4465 (fix_phi_nodes): Likewise.
4466 (switch_conversion::fix_phi_nodes): Likewise.
4467 (gen_inbound_check): Likewise.
4468 (switch_conversion::gen_inbound_check): Likewise.
4469 (process_switch): Use the newly created class.
4470 (switch_conversion::expand): New.
4471 (switch_conversion::~switch_conversion): New.
4472 * tree-switch-conversion.h: New file.
4473
4474 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4475
4476 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4477 tree-vect-patterns.c.
4478 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4479 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4480 (vect_recog_sad_pattern): Likewise.
4481 (vect_recog_widen_sum_pattern): Likewise.
4482 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4483 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4484 (vect_recog_rotate_pattern): Likewise.
4485 (vect_recog_mult_pattern): Likewise.
4486 (vect_recog_vector_vector_shift_pattern): Likewise.
4487 (vect_recog_divmod_pattern): Likewise.
4488 (vect_recog_mixed_size_cond_pattern): Likewise.
4489 (vect_recog_bool_pattern): Likewise.
4490 (vect_recog_mask_conversion_pattern): Likewise.
4491 (vect_try_gather_scatter_pattern): Likewise.
4492 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4493 (vect_recog_over_widening_pattern): Likewise.
4494 (vect_recog_gather_scatter_pattern): Likewise.
4495 (vect_recog_func_ptr): Move from tree-vectorizer.h
4496 (vect_vect_recog_func_ptrs): Move further down the file.
4497 (vect_recog_func): Likewise. Remove the third argument.
4498 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4499 (vect_pattern_recog_1): Expect the pattern function to do any
4500 necessary target tests. Also expect it to provide a vector type.
4501 Remove the type_in handling.
4502
4503 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4504
4505 * tree-vect-patterns.c (vect_pattern_detected): New function.
4506 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4507 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4508 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4509 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4510 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4511 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4512 (vect_recog_mask_conversion_pattern)
4513 (vect_try_gather_scatter_pattern): Likewise.
4514
4515 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4516
4517 * tree-vect-patterns.c (vect_get_internal_def): New function.
4518 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4519 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4520 (search_type_for_mask_1): Use it.
4521
4522 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4523
4524 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4525 redundant WIDEN_SUM_EXPR handling.
4526 (vect_recog_sad_pattern): Likewise.
4527
4528 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4529
4530 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4531 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4532 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4533 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4534 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4535
4536 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4537
4538 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4539 use the stmt_vec_info of the original bb statement for the
4540 new zero assignment, even if the call is part of a pattern.
4541
4542 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4543
4544 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4545 that the sequence is attached to the original statement rather
4546 than the pattern statement.
4547 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4548 PATTERN_DEF_SEQ from the original statement rather than
4549 the main pattern statement.
4550 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4551 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4552 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4553
4554 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4555
4556 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4557 definition statements before the early exit for statements that aren't
4558 live or relevant.
4559 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4560 split out from...
4561 (vect_transform_loop): ...here. Process pattern definition
4562 statements without first checking whether the main pattern
4563 statement is live or relevant.
4564
4565 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4566
4567 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4568 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4569
4570 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4571
4572 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4573 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4574 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4575 (expand_block_compare): Change select_block_compare_mode call.
4576 (expand_strncmp_align_check): Use new functions, fix comment.
4577 (emit_final_str_compare_gpr): New function.
4578 (expand_strn_compare): Refactor and clean up code.
4579 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4580
4581 2018-06-19 Tony Reix <tony.reix@atos.com>
4582 Damien Bergamini <damien.bergamini@atos.com>
4583 David Edelsohn <dje.gcc@gmail.com>
4584
4585 * collect2.c (static_obj): New variable.
4586 (static_libs): New variable.
4587 (is_in_list): Uncomment declaration.
4588 (main): Track AIX libraries linked statically.
4589 (is_in_list): Uncomment definition.
4590 (scan_prog_file): Don't add AIX shared libraries initializer
4591 to constructor list if linking statically.
4592
4593 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4594
4595 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4596 constant.
4597 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4598
4599 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4600
4601 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4602 blocks.
4603
4604 2018-06-19 Martin Liska <mliska@suse.cz>
4605
4606 * config/i386/i386.c (ix86_can_inline_p): Do not use
4607 ipa_fn_summaries::get_create.
4608 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4609 get.
4610 (devirtualization_time_bonus): Likewise.
4611 (ipcp_propagate_stage): Likewise.
4612 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4613 (edge_set_predicate): Likewise.
4614 (evaluate_conditions_for_known_args): Likewise.
4615 (evaluate_properties_for_edge): Likewise.
4616 (ipa_call_summary::reset): Tranform to ...
4617 (ipa_call_summary::~ipa_call_summary): ... this.
4618 (ipa_fn_summary::reset): Transform to ...
4619 (ipa_fn_summary::~ipa_fn_summary): ... this.
4620 (ipa_fn_summary_t::remove): Rename to ...
4621 (ipa_fn_summary_t::remove_callees): ... this.
4622 (ipa_fn_summary_t::duplicate): Use placement new
4623 instead of memory copy.
4624 (ipa_call_summary_t::duplicate): Likewise.
4625 (ipa_call_summary_t::remove): Remove.
4626 (dump_ipa_call_summary): Change get_create to get.
4627 (ipa_dump_fn_summary): Dump only when summary exists.
4628 (analyze_function_body): Use symbol_summary::get instead
4629 of get_create.
4630 (compute_fn_summary): Likewise.
4631 (estimate_edge_devirt_benefit): Likewise.
4632 (estimate_edge_size_and_time): Likewise.
4633 (inline_update_callee_summaries): Likewise.
4634 (remap_edge_change_prob): Likewise.
4635 (remap_edge_summaries): Likewise.
4636 (ipa_merge_fn_summary_after_inlining): Likewise.
4637 (write_ipa_call_summary): Likewise.
4638 (ipa_fn_summary_write): Likewise.
4639 (ipa_free_fn_summary): Likewise.
4640 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4641 (struct ipa_call_summary): Likewise.
4642 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4643 of get_create.
4644 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4645 (estimate_size_after_inlining): Likewise.
4646 (estimate_growth): Likewise.
4647 (growth_likely_positive): Likewise.
4648 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4649 (inline_call): Likewise.
4650 * ipa-inline.c (caller_growth_limits): Likewise.
4651 (can_inline_edge_p): Likewise.
4652 (can_inline_edge_by_limits_p): Likewise.
4653 (compute_uninlined_call_time): Likewise.
4654 (compute_inlined_call_time): Likewise.
4655 (want_inline_small_function_p): Likewise.
4656 (edge_badness): Likewise.
4657 (update_caller_keys): Likewise.
4658 (update_callee_keys): Likewise.
4659 (inline_small_functions): Likewise.
4660 (inline_to_all_callers_1): Likewise.
4661 (dump_overall_stats): Likewise.
4662 (early_inline_small_functions): Likewise.
4663 (early_inliner): Likewise.
4664 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4665 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4666 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4667 * ipa-split.c (execute_split_functions): Likewise.
4668 * symbol-summary.h: Likewise.
4669 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4670
4671 2018-06-19 Richard Biener <rguenther@suse.de>
4672
4673 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4674 (vectorize_loops): ... here. Fix dbgcnt handling.
4675 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4676
4677 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4678
4679 PR target/86197
4680 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4681 ieee128 argument takes up only one (vector) register, not two (floating
4682 point) registers.
4683
4684 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4685
4686 * gimplify.c (gimplify_init_constructor): Really never clear for an
4687 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4688
4689 2018-06-19 Richard Biener <rguenther@suse.de>
4690
4691 PR tree-optimization/86179
4692 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4693 after failed recognition.
4694
4695 2018-06-18 Martin Sebor <msebor@redhat.com>
4696
4697 PR middle-end/85602
4698 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4699 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4700 Handle integer subtraction.
4701 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4702 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4703
4704 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4705
4706 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4707 param from rtx to rtx_insn *.
4708 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4709 param.
4710 (frv_ifcvt_modify_insn): Likwise.
4711 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4712 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4713 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4714 as_a <rtx_insn *> cast to local "unprotected_region" once
4715 it's been established that it's not NULL or pc_rtx.
4716 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4717 param "sethi" from rtx to rtx_insn *.
4718 (nds32_group_float_insns): Likewise for param "insn".
4719 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4720 param.
4721 (vax_output_int_subtract): Likewise.
4722 * config/vax/vax.c (vax_output_int_add): Likewise for param
4723 "insn".
4724 (vax_output_int_subtract): Likewise.
4725 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4726 (emit_pattern_after): Likewise for param "after".
4727 (emit_insn_after): Likewise.
4728 (emit_jump_insn_after): Likewise.
4729 (emit_call_insn_after): Likewise.
4730 (emit_debug_insn_after): Likewise.
4731 (emit_pattern_before): Likewise for param "before".
4732 (emit_insn_before): Likewise.
4733 (emit_jump_insn_before): Likewise.
4734 * final.c (get_insn_template): Likewise for param "insn", removing
4735 a cast.
4736 * output.h (get_insn_template): Likewise for 2nd param.
4737 * rtl.h (emit_insn_before): Likewise.
4738 (emit_jump_insn_before): Likewise.
4739 (emit_debug_insn_before_noloc): Likewise.
4740 (emit_insn_after): Likewise.
4741 (emit_jump_insn_after): Likewise.
4742 (emit_call_insn_after): Likewise.
4743 (emit_debug_insn_after): Likewise.
4744 (set_insn_deleted): Likewise for param.
4745
4746 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4747
4748 PR target/85358
4749 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4750 floating point modes, so that IFmode is numerically greater than
4751 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4752 to declare the ordering. This prevents IFmode from being
4753 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4754 machine. Include rs6000-modes.h to share the fractional values
4755 between genmodes* and the rest of the compiler.
4756 (IFmode): Likewise.
4757 (KFmode): Likewise.
4758 (TFmode): Likewise.
4759 * config/rs6000/rs6000-modes.h: New file.
4760 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4761 meaning of rs6000_long_double_size so that 126..128 selects an
4762 appropriate 128-bit floating point type.
4763 (rs6000_option_override_internal): Likewise.
4764 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4765 (TARGET_LONG_DOUBLE_128): Change the meaning of
4766 rs6000_long_double_size so that 126..128 selects an appropriate
4767 128-bit floating point type.
4768 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4769 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4770 source and destination to match the standard usage.
4771 (truncifkf2): Likewise.
4772 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4773 ISA 2.07 to use an explicit clobber, instead of passing in a
4774 temporary.
4775 (copysign<mode>3_soft): Likewise.
4776
4777 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4778
4779 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4780 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4781 (vect_slp_analyze_instance_dependence): Likewise.
4782 (vect_enhance_data_refs_alignment): Likewise.
4783 (vect_analyze_data_refs_alignment): Likewise.
4784 (vect_slp_analyze_and_verify_instance_alignment
4785 (vect_analyze_data_ref_accesses): Likewise.
4786 (vect_prune_runtime_alias_test_list): Likewise.
4787 (vect_analyze_data_refs): Likewise.
4788 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4789 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4790 (vect_analyze_scalar_cycles_1): Likewise.
4791 (vect_get_loop_niters): Likewise.
4792 (vect_analyze_loop_form_1): Likewise.
4793 (vect_update_vf_for_slp): Likewise.
4794 (vect_analyze_loop_operations): Likewise.
4795 (vect_analyze_loop): Likewise.
4796 (vectorizable_induction): Likewise.
4797 (vect_transform_loop): Likewise.
4798 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4799 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4800 (vect_make_slp_decision): Likewise.
4801 (vect_detect_hybrid_slp): Likewise.
4802 (vect_slp_analyze_operations): Likewise.
4803 (vect_slp_bb): Likewise.
4804 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4805 (vectorizable_bswap): Likewise.
4806 (vectorizable_call): Likewise.
4807 (vectorizable_simd_clone_call): Likewise.
4808 (vectorizable_conversion): Likewise.
4809 (vectorizable_assignment): Likewise.
4810 (vectorizable_shift): Likewise.
4811 (vectorizable_operation): Likewise.
4812 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4813
4814 2018-06-18 Martin Sebor <msebor@redhat.com>
4815
4816 PR tree-optimization/81384
4817 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4818 * builtins.c (expand_builtin_strnlen): New function.
4819 (expand_builtin): Call it.
4820 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4821 * builtins.def (BUILT_IN_STRNLEN): New.
4822 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4823 Warn for bounds in excess of maximum object size.
4824 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4825 single-value ranges. Handle strnlen.
4826 (handle_builtin_strlen): Handle strnlen.
4827 (strlen_check_and_optimize_stmt): Same.
4828 * doc/extend.texi (Other Builtins): Document strnlen.
4829
4830 2018-06-18 Maya Rashish <coypu@sdf.org>
4831
4832 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4833 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4834 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4835
4836 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4837 here to ...
4838 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4839
4840 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4841
4842 * tree.c (escaped_string::escape): Replace cast to char * by
4843 const_cast<char *> (unescaped).
4844
4845 2018-06-18 Nick Clifton <nickc@redhat.com>
4846
4847 PR 84195
4848 * tree.c (escaped_string): New class. Converts an unescaped
4849 string into its escaped equivalent.
4850 (warn_deprecated_use): Use the new class to convert the
4851 deprecation message, if present.
4852 (test_escaped_strings): New self test.
4853 (test_c_tests): Add test_escaped_strings.
4854 * doc/extend.texi (deprecated): Add a note that the
4855 deprecation message is affected by the -fmessage-length
4856 option, and that control characters will be escaped.
4857 (#pragma GCC error): Document this pragma.
4858 (#pragma GCC warning): Likewise.
4859 * doc/invoke.texi (-fmessage-length): Document this option's
4860 effect on the #warning and #error preprocessor directives and
4861 the deprecated attribute.
4862
4863 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4864
4865 * tree.c (decl_value_expr_lookup): Revert latest change.
4866 (decl_value_expr_insert): Likewise.
4867
4868 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4869
4870 * gimplify.c (nonlocal_vlas): Delete.
4871 (nonlocal_vla_vars): Likewise.
4872 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4873 referenced VLAs.
4874 (gimplify_body): Do not create and destroy nonlocal_vlas.
4875 * tree-nested.c: Include diagnostic.h.
4876 (use_pointer_in_frame): Tweak.
4877 (lookup_field_for_decl): Add assertion and declare the transformation.
4878 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4879 internal error when the reference is in a wrong context. Do not
4880 create a debug decl by default.
4881 (note_nonlocal_block_vlas): Delete.
4882 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4883 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4884 create a debug decl by default.
4885 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4886 call is in a wrong context.
4887 (fixup_vla_decls): New function.
4888 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4889 debug variables were created.
4890 * tree.c (decl_value_expr_lookup): Add checking assertion.
4891 (decl_value_expr_insert): Likewise.
4892
4893 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4894
4895 PR middle-end/82479
4896 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4897 * tree-scalar-evolution.c (interpret_expr): Likewise.
4898 (expression_expensive_p): Likewise.
4899 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4900 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4901 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4902 (ssa_defined_by_minus_one_stmt_p): New.
4903
4904 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4905
4906 PR middle-end/64946
4907 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4908 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4909 * dojump.c (do_jump): Likewise.
4910 * expr.c (expand_expr_real_2): Check operand type's sign.
4911 * fold-const.c (const_unop): Handle ABSU_EXPR.
4912 (fold_abs_const): Likewise.
4913 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4914 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4915 (strip_sign_op_1): Likesise.
4916 * match.pd: Add new pattern to generate ABSU_EXPR.
4917 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4918 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4919 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4920 * tree-inline.c (estimate_operator_cost): Likewise.
4921 * tree-pretty-print.c (dump_generic_node): Likewise.
4922 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4923 * tree.def (ABSU_EXPR): New.
4924
4925 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4926
4927 PR middle-end/86095
4928 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
4929 documented as preserved for backward compatibility only.
4930 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
4931
4932 PR rtl-optimization/86108
4933 * bb-reorder.c (create_forwarder_block): Renamed to ...
4934 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
4935 jump from new landing pad to the second part.
4936 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
4937 Adjust callers.
4938
4939 2018-06-15 Jakub Jelinek <jakub@redhat.com>
4940
4941 PR middle-end/85878
4942 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
4943 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
4944 Only call store_expr for halves if the mode is the same.
4945
4946 PR middle-end/86123
4947 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
4948 Fix up comment formatting.
4949
4950 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4951
4952 * typed-splay-tree.h (typed_splay_tree::remove): New function.
4953 (typed_splay_tree::closure,
4954 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
4955 (typed_splay_tree::typed_splay_tree,
4956 typed_splay_tree::operator =): Declared private.
4957 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
4958 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
4959 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
4960 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
4961 typed_splay_tree::splay_tree_splay,
4962 typed_splay_tree::splay_tree_foreach_helper,
4963 typed_splay_tree::splay_tree_insert,
4964 typed_splay_tree::splay_tree_remove,
4965 typed_splay_tree::splay_tree_lookup,
4966 typed_splay_tree::splay_tree_predecessor,
4967 typed_splay_tree::splay_tree_successor,
4968 typed_splay_tree::splay_tree_min,
4969 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
4970 (typed_splay_tree::root, typed_splay_tree::comp,
4971 typed_splay_tree::delete_key,
4972 typed_splay_tree::delete_value): New data members.
4973 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
4974 typed_splay_tree::remove.
4975
4976 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
4977
4978 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
4979 -mginv and -mno-ginv to the assembler.
4980 * config/mips/mips.opt (-mcrc): New option.
4981 (-mginv): Likewise.
4982 * doc/invoke.text (-mcrc): Document.
4983 (-mginv): Likewise.
4984
4985 2018-06-15 Nick Clifton <nickc@redhat.com>
4986
4987 PR 84195
4988 * tree.c (escaped_string): New class. Converts an unescaped
4989 string into its escaped equivalent.
4990 (warn_deprecated_use): Use the new class to convert the
4991 deprecation message, if present.
4992 (test_escaped_strings): New self test.
4993 (test_c_tests): Add test_escaped_strings.
4994 * doc/extend.texi (deprecated): Add a note that the
4995 deprecation message is affected by the -fmessage-length
4996 option, and that control characters will be escaped.
4997 (#pragma GCC error): Document this pragma.
4998 (#pragma GCC warning): Likewise.
4999 * doc/invoke.texi (-fmessage-length): Document this option's
5000 effect on the #warning and #error preprocessor directives and
5001 the deprecated attribute.
5002
5003 2018-06-15 Richard Biener <rguenther@suse.de>
5004
5005 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5006 here, also noting vector size used.
5007 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5008 size used in MSG_OPTIMIZED_LOCATIONS dump.
5009 (pass_slp_vectorize::execute): Adjust.
5010
5011 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5012
5013 PR target/85968
5014 * config/arc/arc.c (arc_return_address_register): Fix
5015 if-condition.
5016
5017 2018-06-15 Richard Biener <rguenther@suse.de>
5018
5019 PR middle-end/86159
5020 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5021 leave useless conversion stripping to force_gimple_operand_gsi.
5022 (gimplify_build2): Likewise.
5023 (gimplify_build1): Likewise.
5024
5025 2018-06-15 Richard Biener <rguenther@suse.de>
5026
5027 PR middle-end/86076
5028 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5029 before adjusting their block.
5030
5031 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5032
5033 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5034 multilibs for *-*-rtems*.
5035 * config/riscv/t-rtems: New file.
5036
5037 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5038
5039 PR middle-end/86122
5040 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5041 unsigned_type_for returns NULL.
5042
5043 PR target/85945
5044 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5045 subregs of multi-word pseudos unless the float mode has word size.
5046
5047 2018-06-14 Richard Biener <rguenther@suse.de>
5048
5049 PR middle-end/86139
5050 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5051 duplicate and harmful type_hash_canon.
5052 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5053
5054 2018-06-14 Richard Biener <rguenther@suse.de>
5055
5056 PR ipa/86124
5057 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5058 NULL cgraph_node.
5059
5060 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5061
5062 * config/rtems.h (STDINT_LONG32): Define.
5063
5064 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5065 Prachi Godbole <prachi.godbole@imgtec.com>
5066
5067 * config/mips/mips-cpus.def: Define P6600.
5068 * config/mips/mips-tables.opt: Regenerate.
5069 * config/mips/mips.c (mips_ucbranch_type): New enum.
5070 (mips_rtx_cost_data): Add support for P6600.
5071 (mips_issue_rate): Likewise.
5072 (mips_multipass_dfa_lookahead): Likewise.
5073 (mips_avoid_hazard): Likewise.
5074 (mips_reorg_process_insns): Likewise.
5075 (mips_classify_branch_p6600): New function.
5076 * config/mips/mips.h (TUNE_P6600): New define.
5077 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5078 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5079 * config/mips/mips.md: Include p6600.md.
5080 (processor): Add p6600.
5081 * config/mips/p6600.md: New file.
5082 * doc/invoke.texi: Add p6600 to supported architectures.
5083
5084 2018-06-13 Martin Sebor <msebor@redhat.com>
5085
5086 PR tree-optimization/86114
5087 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5088 of integer types.
5089 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5090
5091 2018-06-13 Richard Biener <rguenther@suse.de>
5092
5093 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5094 Properly set vector type of the intermediate stmt.
5095 * tree-vect-stmts.c (vectorizable_operation): The destination
5096 var always has vectype_out type.
5097
5098 2018-06-13 Jeff Law <law@redhat.com>
5099
5100 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5101 integer 0 for argument to print_rtl_with_bb.
5102 (rl78_reorg): Likewise.
5103
5104 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5105
5106 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5107 from rtx to rtx_insn *.
5108 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5109 "label".
5110 (add_sched_insns_for_speculation): Likewise for local "target",
5111 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5112 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5113 from rtx_insn ** to rtx_code_label **.
5114 (reorg_emit_nops): Likewise.
5115 (c6x_reorg): Likewise for local "call_labels".
5116 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5117 rtx to rtx_insn *.
5118 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5119 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5120 the loops over LABEL_REFS.
5121 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5122 braf_label.
5123 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5124 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5125 (split_branches): Strengthen local "olabel" from rtx to
5126 rtx_insn *, adding a safe_as_a cast.
5127 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5128 to "rtx_insn *".
5129 (add_insn_after): Likewise for first two params.
5130 (add_insn_before): Likewise.
5131 (remove_insn): Likewise for param.
5132 (emit_pattern_before_noloc): Likewise for second and third params.
5133 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5134 (emit_call_insn_before_noloc): Likewise.
5135 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5136 to "rtx_insn *".
5137 (emit_barrier_before): Likewise.
5138 (emit_label_before): Strengthen "label" param from "rtx" to
5139 "rtx_code_label *". Strengthen "before" param from "rtx" to
5140 "rtx_insn *".
5141 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5142 "rtx_insn *".
5143 (emit_pattern_after_noloc): Likewise.
5144 (emit_insn_after_noloc): Likewise.
5145 (emit_jump_insn_after_noloc): Likewise.
5146 (emit_call_insn_after_noloc): Likewise.
5147 (emit_debug_insn_after_noloc): Likewise.
5148 (emit_barrier_after): Likewise.
5149 (emit_label_after): Likewise for both params.
5150 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5151 "loc" param from "int" to "location_t".
5152 (emit_insn_after_setloc): Likewise.
5153 (emit_jump_insn_after_setloc): Likewise.
5154 (emit_call_insn_after_setloc): Likewise.
5155 (emit_debug_insn_after_setloc): Likewise.
5156 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5157 "loc" param from "int" to "location_t".
5158 (emit_pattern_before): Convert NULL_RTX to NULL.
5159 (emit_insn_before_setloc): Convert "loc" param from "int" to
5160 "location_t".
5161 (emit_jump_insn_before_setloc): Likewise.
5162 (emit_call_insn_before_setloc): Likewise.
5163 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5164 rtx_insn *. Convert "loc" param from "int" to "location_t".
5165 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5166 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5167 Convert 3rd param from "int" to "location_t".
5168 (emit_barrier_before, emit_barrier_after, next_real_insn):
5169 Strengthen param from rtx to rtx_insn *.
5170 (emit_label_before): Strengthen 1st param from "rtx" to
5171 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5172 "rtx_insn *".
5173 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5174 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5175 Strengthen 2nd param from "rtx" to "rtx_insn *".
5176 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5177 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5178 Likewise. Convert 3rd param from "int" to "location_t".
5179 (emit_label_after): Strengthen 1st param from "rtx" to
5180 "rtx_code_label *".
5181 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5182 "rtx_insn *".
5183 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5184 from "rtx" to "rtx_insn *".
5185
5186 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5187
5188 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5189 bodies streamed in with -Q.
5190 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5191 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5192 * gimple-streamer-out.c: Include gimple-pretty-print.h
5193 (output_bb): Dump stmts streamed.
5194 * lto-section-out.c: Include print-tree.h
5195 (lto_begin_section): Dump sections created.
5196 (lto_output_decl_index): Dump decl encoded.
5197 * lto-streamer-out.c: Include print-tree.h
5198 (create_output_block): Dump output block created.
5199 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5200 (output_function): Dump function output.
5201 (output_constructor): Dump constructor streamed.
5202 (write_global_stream): Output indexes encoded.
5203 (produce_asm_for_decls): Dump streams encoded.
5204 * lto-streamer.c (streamer_dump_file): New global var.
5205 * lto-streamer.h (streamer_dump_file): Declare.
5206 * passes.c (ipa_write_summaries): Initialize streamer dump.
5207 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5208 in.
5209
5210 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5211
5212 PR target/86048
5213 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5214 offsets for register save directives. Emit a second batch of save
5215 directives, if need be, when the function accesses prior frames.
5216
5217 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5218
5219 * config/arc/fpu.md (fmasf4): Force operand to register.
5220 (fnmasf4): Likewise.
5221
5222 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5223
5224 * config/arc/arc-protos.h (arc_pad_return): Remove.
5225 * config/arc/arc.c (machine_function): Remove force_short_suffix
5226 and size_reason.
5227 (arc_print_operand): Adjust printing of '&'.
5228 (arc_verify_short): Remove conditional printing of short suffix.
5229 (arc_final_prescan_insn): Remove reference to size_reason.
5230 (pad_return): New function.
5231 (arc_reorg): Call pad_return.
5232 (arc_pad_return): Remove.
5233 (arc_init_machine_status): Remove reference to force_short_suffix.
5234 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5235 (attr length): When attribute iscompact is true force to 2
5236 regardless; in the case of maybe check if we want to force the
5237 instruction to have 4 bytes length.
5238 (nopv): Change it to generate 4 byte long nop as well.
5239 (blockage): New pattern.
5240 (simple_return): Remove call to arc_pad_return.
5241 (p_return_i): Likewise.
5242
5243 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5244
5245 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5246
5247 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5248
5249 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5250 ARC cores.
5251
5252 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5253
5254 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5255 for ARC700 and ARCv2.
5256
5257 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5258
5259 PR target/86076
5260 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5261 operands[2] instead of operands[1].
5262
5263
5264 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5265
5266 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5267 case, check whether the outer register overlaps an unallocatable
5268 register, not just whether it fits the required class.
5269
5270 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5271
5272 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5273 are poly_ints.
5274 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5275 (memrefs_conflict_p): Likewise.
5276 (init_alias_analysis): Likewise.
5277 * cfgexpand.c (expand_debug_expr): Likewise.
5278 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5279 * cse.c (fold_rtx): Likewise.
5280 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5281 * expr.c (emit_block_move_hints): Likewise.
5282 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5283 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5284 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5285 (emit_group_store): Likewise.
5286 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5287 to read the PRE/POST_MODIFY increment.
5288 * calls.c (store_one_arg): Use strip_offset.
5289 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5290 poly_int_rtx_p.
5291 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5292 by a VEC_SELECT.
5293 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5294 (simplify_binary_operation_1): Extend CONST_INT handling to
5295 poly_int_rtx_p.
5296 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5297 than a HOST_WIDE_INT.
5298 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5299 poly_int64.
5300 (adjust_mems, add_stores): Update accodingly.
5301 (vt_canonicalize_addr): Track polynomial offsets.
5302 (emit_note_insn_var_location): Likewise.
5303 (vt_add_function_parameter): Likewise.
5304 (vt_initialize): Likewise.
5305
5306 2018-06-12 Jeff Law <law@redhat.com>
5307
5308 * config.gcc (alpha*-*-freebsd*): Remove.
5309 * config/alpha/freebsd.h: Remove.
5310
5311 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5312
5313 PR other/69968
5314 * spellcheck-tree.c (levenshtein_distance): Rename to...
5315 (get_edit_distance): ...this, and update for underlying renaming.
5316 * spellcheck-tree.h (levenshtein_distance): Rename to...
5317 (get_edit_distance): ...this.
5318 * spellcheck.c (levenshtein_distance): Rename to...
5319 (get_edit_distance): ...this. Convert from Levenshtein distance
5320 to Damerau-Levenshtein distance by supporting transpositions of
5321 adjacent characters. Rename "v1" to "v_next" and "v0" to
5322 "v_one_ago".
5323 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5324 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5325 update for underlying renaming.
5326 (selftest::levenshtein_distance_unit_test): Rename to...
5327 (selftest::test_get_edit_distance_unit): ...this, and update for
5328 underlying renaming.
5329 (selftest::test_find_closest_string): Add example from PR 69968
5330 where transposition helps
5331 (selftest::test_metric_conditions): Update for renaming.
5332 (selftest::test_metric_conditions): Likewise.
5333 (selftest::spellcheck_c_tests): Likewise.
5334 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5335 (get_edit_distance): ...this.
5336 (best_match::consider): Update for renaming.
5337
5338 2018-06-12 Martin Sebor <msebor@redhat.com>
5339
5340 PR tree-optimization/85259
5341 * builtins.c (compute_objsize): Handle constant offsets.
5342 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5343 true iff a warning has been issued.
5344 * gimple.h (gimple_nonartificial_location): New function.
5345 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5346 gimple_nonartificial_location and handle -Wno-system-headers.
5347 (handle_builtin_stxncpy): Same.
5348
5349 2018-06-12 Martin Sebor <msebor@redhat.com>
5350
5351 PR c/85931
5352 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5353
5354 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5355
5356 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5357 BUILTIN_VEC_XST entries for pointer to double and long long.
5358
5359 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5360
5361 PR target/85990
5362 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5363 Update comments.
5364 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5365 Likewise.
5366
5367 2018-06-12 Martin Liska <mliska@suse.cz>
5368
5369 * doc/options.texi: Document IntegerRange.
5370
5371 2018-06-12 Martin Liska <mliska@suse.cz>
5372
5373 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5374 * opt-functions.awk: Handle Deprecated flag.
5375 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5376 and report error.
5377 (read_cmdline_option): Report warning for a deprecated option.
5378 * opts.h (struct cl_option): Add new field cl_deprecated.
5379 (CL_ERR_DEPRECATED): New.
5380
5381 2018-06-12 Martin Liska <mliska@suse.cz>
5382
5383 * doc/options.texi: Document Deprecated option flag.
5384
5385 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5386
5387 * config/arc/arc-arch.h (arc_extras): New enum.
5388 (arc_cpu_t):Add field extra.
5389 (arc_cpu_types): Consider the extras.
5390 * config/arc/arc-cpus.def: Add extras info.
5391 * config/arc/arc-opts.h (processor_type): Consider extra field.
5392 * config/arc/arc.c (arc_override_options): Handle extra field.
5393
5394 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5395
5396 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5397 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5398 field.
5399 * config/arc/arc.c (arc_init): Update pic warning.
5400 (irq_range): Update irq range parsing warnings.
5401 (arc_override_options): Update various warning messages.
5402 (arc_handle_aux_attribute): Likewise.
5403
5404 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5405
5406 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5407
5408 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5409
5410 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5411 compiler messages directives.
5412
5413 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5414
5415 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5416 * config/mips/mips-tables.opt: Regenerate.
5417 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5418 mips64r6.
5419 * doc/invoke.texi: Document -march=i6500.
5420
5421 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5422
5423 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5424 (i6400_gpmul): Add cpu_unit.
5425 (i6400_gpdiv): Likewise.
5426 (i6400_msa_add_d): Update reservations.
5427 (i6400_msa_int_add) Likewise.
5428 (i6400_msa_short_logic3) Likewise.
5429 (i6400_msa_short_logic2) Likewise.
5430 (i6400_msa_short_logic) Likewise.
5431 (i6400_msa_move) Likewise.
5432 (i6400_msa_cmp) Likewise.
5433 (i6400_msa_short_float2) Likewise.
5434 (i6400_msa_div_d) Likewise.
5435 (i6400_msa_long_logic1) Likewise.
5436 (i6400_msa_long_logic2) Likewise.
5437 (i6400_msa_mult) Likewise.
5438 (i6400_msa_long_float2) Likewise.
5439 (i6400_msa_long_float4) Likewise.
5440 (i6400_msa_long_float5) Likewise.
5441 (i6400_msa_long_float8) Likewise.
5442 (i6400_fpu_fadd): Include frint type.
5443 (i6400_fpu_store): New define_insn_reservation.
5444 (i6400_fpu_load): Likewise.
5445 (i6400_fpu_move): Likewise.
5446 (i6400_fpu_fcmp): Likewise.
5447 (i6400_fpu_fmadd): Likewise.
5448 (i6400_int_mult): Include imul3nc type and update reservation.
5449 (i6400_int_div): Include idiv3 type and update reservation.
5450 (i6400_int_load): Update to check type not move_type.
5451 (i6400_int_store): Likewise.
5452 (i6400_int_prefetch): Set zero latency.
5453
5454 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5455
5456 * gcc.c: Document new %@{...} sequence.
5457 (LINK_COMMAND_SPEC): Use it for the -L switches.
5458 (cpp_unique_options): Use it for the -I switches.
5459 (at_file_argbuf): New global variable.
5460 (in_at_file): Likewise.
5461 (alloc_args): Create at_file_argbuf.
5462 (clear_args): Truncate at_file_argbuf.
5463 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5464 (open_at_file): New function.
5465 (close_at_file): Likewise.
5466 (create_at_file): Delete.
5467 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5468 <'o'>: Likewise.
5469 <'@'>: New case.
5470 (validate_switches_from_spec): Deal with %@{...} sequence.
5471 (validate_switches): Likewise.
5472 (driver::finalize): Call clear_args.
5473
5474 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5475
5476 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5477
5478 2018-06-11 Martin Sebor <msebor@redhat.com>
5479
5480 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5481 (Wno-class-memaccess): Add @opindex.
5482 (Wno-templates, Wno-multiple-inheritance): Same.
5483 (Wno-virtual-inheritance, Wno-namespaces): Same.
5484 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5485 (Wno-format-overflow, Wno-format-truncation): Same.
5486 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5487 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5488 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5489 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5490 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5491 (Wno-misspelled-isr): Same.
5492
5493 2018-06-11 Martin Sebor <msebor@redhat.com>
5494
5495 * PR tree-optimization/86083
5496 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5497
5498 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5499
5500 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5501
5502 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5503
5504 PR target/85755
5505 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5506 on the correct operand.
5507 (*movdi_internal64): Ditto.
5508
5509 2018-06-11 Martin Liska <mliska@suse.cz>
5510
5511 PR tree-optimization/86089
5512 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5513
5514 2018-06-11 Julia Koval <julia.koval@intel.com>
5515
5516 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5517 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5518 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5519
5520 2018-06-11 Olivier Hainque <hainque@adacore.com>
5521
5522 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5523 for Ada with strict dwarf2.
5524
5525 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5526
5527 PR target/85755
5528 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5529 addresses.
5530
5531 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5532
5533 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5534
5535 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5536
5537 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5538 TARGET_ELF.
5539
5540 2018-06-08 Martin Liska <mliska@suse.cz>
5541
5542 * tree-cfg.h (debug_function): Fix argument type to match
5543 implementation.
5544
5545 2018-06-08 Martin Liska <mliska@suse.cz>
5546
5547 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5548 Remove usage of MPX-related (and removed) fields.
5549 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5550
5551 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5552
5553 * cfg.c (debug): Use TDF_NONE rather than 0.
5554 * cfghooks.c (debug): Likewise.
5555 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5556 (struct dump_option_value_info): Convert to...
5557 (struct kv_pair): ...this template type.
5558 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5559 rather than 0.
5560 (optinfo_verbosity_options): Likewise.
5561 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5562 OPTGROUP_NONE.
5563 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5564 than int for "optgroup_flags" param.
5565 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5566 "dump_kind" param.
5567 (dump_dec): Likewise.
5568 (dump_finish): Use TDF_NONE rather than 0.
5569 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5570 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5571 than 0. Update for change to option_ptr.
5572 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5573 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5574 0. Update for changes to optinfo_verbosity_options and
5575 optgroup_options.
5576 (opt_info_switch_p): Convert optgroup_flags from int to
5577 optgroup_flags_t.
5578 (dump_basic_block): Use dump_flags_t rather than int
5579 for "dump_kind" param.
5580 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5581 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5582 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5583 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5584 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5585 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5586 TDF_NONE): Convert from macros to...
5587 (enum dump_flag): ...this new enum.
5588 (dump_flags_t): Update to use enum.
5589 (operator|, operator&, operator~, operator|=, operator&=):
5590 Implement for dump_flags_t.
5591 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5592 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5593 Convert from macros to...
5594 (enum optgroup_flag): ...this new enum.
5595 (optgroup_flags_t): New typedef.
5596 (operator|, operator|=): Implement for optgroup_flags_t.
5597 (struct dump_file_info): Convert field "alt_flags" to
5598 dump_flags_t. Convert field "optgroup_flags" to
5599 optgroup_flags_t.
5600 (dump_basic_block): Use dump_flags_t rather than int for param.
5601 (dump_generic_expr_loc): Likewise.
5602 (dump_dec): Likewise.
5603 (dump_register): Convert param "optgroup_flags" to
5604 optgroup_flags_t.
5605 (opt_info_enable_passes): Likewise.
5606 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5607 than 0.
5608 * gimple-pretty-print.c (debug): Likewise.
5609 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5610 (merged_store_group::apply_stores): Likewise.
5611 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5612 * gimple.c (verify_gimple_pp): Likewise.
5613 * graphite-poly.c (print_pbb_body): Likewise.
5614 * passes.c (pass_manager::register_one_dump_file): Convert
5615 local "optgroup_flags" to optgroup_flags_t.
5616 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5617 (debug): Likewise.
5618 (debug_body): Likewise.
5619 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5620 to optgroup_flags_t.
5621 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5622 than 0.
5623 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5624 (convert_mult_to_fma): Likewise.
5625 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5626 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5627 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5628 "dump_kind" to dump_flags_t.
5629
5630 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5631
5632 * config/rs6000/rs6000.c (min, max): Delete.
5633
5634 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5635
5636 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5637 -mabi=spe and -mabi=no-spe.
5638
5639 2018-06-08 Martin Liska <mliska@suse.cz>
5640
5641 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5642 where we expect an existing summary.
5643
5644 2018-06-08 Martin Liska <mliska@suse.cz>
5645
5646 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5647 * ipa-inline.h (estimate_edge_growth): Likewise.
5648
5649 2018-06-08 Martin Liska <mliska@suse.cz>
5650
5651 * cgraph.c (function_version_hasher::hash): Use
5652 cgraph_node::get_uid ().
5653 (function_version_hasher::equal):
5654 * cgraph.h (cgraph_node::get_uid): New method.
5655 * ipa-inline.c (update_caller_keys): Use
5656 cgraph_node::get_uid ().
5657 (update_callee_keys): Likewise.
5658 * ipa-utils.c (searchc): Likewise.
5659 (ipa_reduced_postorder): Likewise.
5660 * lto-cgraph.c (input_node): Likewise.
5661 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5662 * symbol-summary.h (symtab_insertion): Likewise.
5663 (symtab_removal): Likewise.
5664 (symtab_duplication): Likewise.
5665 * tree-pretty-print.c (dump_function_header): Likewise.
5666 * tree-sra.c (convert_callers_for_node): Likewise.
5667
5668 2018-06-08 Martin Liska <mliska@suse.cz>
5669
5670 * cgraph.c (symbol_table::create_edge): Always assign a new
5671 unique number.
5672 (symbol_table::free_edge): Do not recycle numbers.
5673 * cgraph.h (cgraph_edge::get): New method.
5674 * symbol-summary.h (symtab_removal): Use it.
5675 (symtab_duplication): Likewise.
5676 (call_summary::hashable_uid): Remove.
5677
5678 2018-06-08 Martin Liska <mliska@suse.cz>
5679
5680 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5681 (initialize_growth_caches): Remove.
5682 (free_growth_caches): Likewise.
5683 (do_estimate_edge_time): Use edge_growth_cache.
5684 (do_estimate_edge_size): Likewise.
5685 (do_estimate_edge_hints): Likewise.
5686 * ipa-inline.c (reset_edge_caches): Likewise.
5687 (recursive_inlining): Likewise.
5688 (inline_small_functions): Likewise.
5689 * ipa-inline.h (initialize_growth_caches): Remove.
5690 (estimate_edge_size): Likewise.
5691 (estimate_edge_time): Likewise.
5692 (estimate_edge_hints): Likewise.
5693 (reset_edge_growth_cache): Likewise.
5694 * symbol-summary.h (call_summary::remove): New method.
5695
5696 2018-06-08 Martin Liska <mliska@suse.cz>
5697
5698 * ipa-cp.c (class edge_clone_summary): New summary.
5699 (grow_edge_clone_vectors): Remove.
5700 (ipcp_edge_duplication_hook): Remove.
5701 (class edge_clone_summary_t): New call_summary class.
5702 (ipcp_edge_removal_hook): Remove.
5703 (edge_clone_summary_t::duplicate): New function.
5704 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5705 (create_specialized_node): Likewise.
5706 (ipcp_driver): Initialize edge_clone_summaries and do not
5707 register hooks.
5708
5709 2018-06-08 Martin Liska <mliska@suse.cz>
5710
5711 * symbol-summary.h (get): New function.
5712 (call_summary::m_initialize_when_cloning): New class member.
5713
5714 2018-06-08 Martin Liska <mliska@suse.cz>
5715
5716 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5717 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5718 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5719 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5720 (remove_cgraph_node_from_order): Use the removed_nodes set.
5721 (do_per_function_toporder): Likwise.
5722 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5723 instead of summary_uid.
5724 (symtab_removal): Likewise.
5725 (symtab_duplication): Likewise.
5726
5727 2018-06-08 Martin Liska <mliska@suse.cz>
5728
5729 * ipa-cp.c (ipcp_store_bits_results): Use
5730 ipcp_transformation_sum.
5731 (ipcp_store_vr_results): Likewise.
5732 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5733 to ...
5734 (ipcp_transformation_initialize): ... this.
5735 (ipa_set_node_agg_value_chain):
5736 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5737 (write_ipcp_transformation_info): Likewise.
5738 (read_ipcp_transformation_info): Likewise.
5739 (ipcp_update_bits): Likewise.
5740 (ipcp_update_vr): Likewise.
5741 (ipcp_transform_function): Likewise.
5742 * ipa-prop.h: Rename ipcp_transformation_summary to
5743 ipcp_transformation.
5744 (class ipcp_transformation_t): New function summary.
5745 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5746 (ipa_get_agg_replacements_for_node): Likewise.
5747
5748 2018-06-08 Martin Liska <mliska@suse.cz>
5749
5750 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5751 of struct.
5752 (class funct_state_summary_t): New function_summary class.
5753 (has_function_state): Remove.
5754 (get_function_state): Likewise.
5755 (set_function_state): Likewise.
5756 (add_new_function): Likewise.
5757 (funct_state_summary_t::insert): New function.
5758 (duplicate_node_data): Remove.
5759 (remove_node_data): Remove.
5760 (funct_state_summary_t::duplicate): New function.
5761 (register_hooks): Create new funct_state_summaries.
5762 (pure_const_generate_summary): Use it.
5763 (pure_const_write_summary): Likewise.
5764 (pure_const_read_summary): Likewise.
5765 (propagate_pure_const): Likewise.
5766 (propagate_nothrow): Likewise.
5767 (dump_malloc_lattice): Likewise.
5768 (propagate_malloc): Likewise.
5769 (execute): Do not register hooks, just remove summary
5770 instead.
5771 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5772 constructor.
5773
5774 2018-06-08 Martin Liska <mliska@suse.cz>
5775
5776 * ipa-reference.c (remove_node_data): Remove.
5777 (duplicate_node_data): Likewise.
5778 (class ipa_ref_var_info_summary_t): New class.
5779 (class ipa_ref_opt_summary_t): Likewise.
5780 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5781 (get_reference_optimization_summary): Use
5782 ipa_ref_opt_sum_summaries.
5783 (set_reference_vars_info): Remove.
5784 (set_reference_optimization_summary): Likewise.
5785 (ipa_init): Create summaries.
5786 (init_function_info): Use function summary.
5787 (ipa_ref_opt_summary_t::duplicate): New function.
5788 (ipa_ref_opt_summary_t::remove): New function.
5789 (get_read_write_all_from_node): Fix GNU coding style.
5790 (propagate): Use function summary.
5791 (write_node_summary_p): Fix GNU coding style.
5792 (stream_out_bitmap): Likewise.
5793 (ipa_reference_read_optimization_summary): Use function summary.
5794 (ipa_reference_c_finalize): Do not release hooks.
5795
5796 2018-06-08 Martin Liska <mliska@suse.cz>
5797
5798 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5799 (analyze_function_body): Extract multiple calls of get_create.
5800 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5801 * ipa-inline.c (recursive_inlining): Use ::get method.
5802 * ipa-inline.h (estimate_edge_growth): Likewise.
5803
5804 2018-06-08 Martin Liska <mliska@suse.cz>
5805
5806 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5807 HSA_INVALID.
5808 (hsa_function_summary::hsa_function_summary): Use the new enum
5809 value.
5810 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5811 * hsa-gen.c (hsa_get_host_function): Likewise.
5812 (get_brig_function_name): Likewise.
5813 * ipa-hsa.c (process_hsa_functions): Likewise.
5814 (ipa_hsa_write_summary): Likewise.
5815 * symbol-summary.h (symtab_duplication): Use ::get function/
5816 (get): New function.
5817
5818 2018-06-08 Martin Liska <mliska@suse.cz>
5819
5820 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5821 of get.
5822 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5823 (hsa_register_kernel): Likewise.
5824 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5825 * hsa-gen.c (hsa_get_host_function): Likewise.
5826 (get_brig_function_name): Likewise.
5827 (generate_hsa): Likewise.
5828 (pass_gen_hsail::execute): Likewise.
5829 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5830 (devirtualization_time_bonus): Likewise.
5831 (ipcp_propagate_stage): Likewise.
5832 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5833 (edge_set_predicate): Likewise.
5834 (evaluate_conditions_for_known_args): Likewise.
5835 (evaluate_properties_for_edge): Likewise.
5836 (ipa_fn_summary::reset): Likewise.
5837 (ipa_fn_summary_t::duplicate): Likewise.
5838 (dump_ipa_call_summary): Likewise.
5839 (ipa_dump_fn_summary): Likewise.
5840 (analyze_function_body): Likewise.
5841 (compute_fn_summary): Likewise.
5842 (estimate_edge_devirt_benefit): Likewise.
5843 (estimate_edge_size_and_time): Likewise.
5844 (estimate_calls_size_and_time): Likewise.
5845 (estimate_node_size_and_time): Likewise.
5846 (inline_update_callee_summaries): Likewise.
5847 (remap_edge_change_prob): Likewise.
5848 (remap_edge_summaries): Likewise.
5849 (ipa_merge_fn_summary_after_inlining): Likewise.
5850 (ipa_update_overall_fn_summary): Likewise.
5851 (read_ipa_call_summary): Likewise.
5852 (inline_read_section): Likewise.
5853 (write_ipa_call_summary): Likewise.
5854 (ipa_fn_summary_write): Likewise.
5855 (ipa_free_fn_summary): Likewise.
5856 * ipa-hsa.c (process_hsa_functions): Likewise.
5857 (ipa_hsa_write_summary): Likewise.
5858 (ipa_hsa_read_section): Likewise.
5859 * ipa-icf.c (sem_function::merge): Likewise.
5860 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5861 (do_estimate_edge_time): Likewise.
5862 (estimate_size_after_inlining): Likewise.
5863 (estimate_growth): Likewise.
5864 (growth_likely_positive): Likewise.
5865 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5866 (inline_call): Likewise.
5867 * ipa-inline.c (caller_growth_limits): Likewise.
5868 (can_inline_edge_p): Likewise.
5869 (can_inline_edge_by_limits_p): Likewise.
5870 (compute_uninlined_call_time): Likewise.
5871 (compute_inlined_call_time): Likewise.
5872 (want_inline_small_function_p): Likewise.
5873 (edge_badness): Likewise.
5874 (update_caller_keys): Likewise.
5875 (update_callee_keys): Likewise.
5876 (recursive_inlining): Likewise.
5877 (inline_small_functions): Likewise.
5878 (inline_to_all_callers_1): Likewise.
5879 (dump_overall_stats): Likewise.
5880 (early_inline_small_functions): Likewise.
5881 (early_inliner): Likewise.
5882 * ipa-inline.h (estimate_edge_growth): Likewise.
5883 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5884 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5885 * ipa-prop.h (IPA_NODE_REF): Likewise.
5886 (IPA_EDGE_REF): Likewise.
5887 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5888 (propagate_malloc): Likewise.
5889 * ipa-split.c (execute_split_functions): Likewise.
5890 * symbol-summary.h: Rename get to get_create.
5891 (get): Likewise.
5892 (get_create): Likewise.
5893 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5894
5895 2018-06-08 Martin Liska <mliska@suse.cz>
5896
5897 * symbol-summary.h (release): Move definition out of class
5898 declaration.
5899 (symtab_removal): Likewise.
5900 (symtab_duplication): Likewise.
5901
5902 2018-06-08 Martin Liska <mliska@suse.cz>
5903
5904 * symbol-summary.h (function_summary): Move constructor
5905 implementation out of class declaration.
5906 (release): Likewise.
5907 (symtab_insertion): Likewise.
5908 (symtab_removal): Likewise.
5909 (symtab_duplication): Likewise.
5910 (get): Likewise.
5911
5912 2018-06-08 Martin Liska <mliska@suse.cz>
5913
5914 * Makefile.in: Remove support for MPX (macros, related functions,
5915 fields in cgraph_node, ...).
5916 * builtin-types.def (BT_BND): Likewise.
5917 (BT_FN_BND_CONST_PTR): Likewise.
5918 (BT_FN_CONST_PTR_BND): Likewise.
5919 (BT_FN_VOID_PTR_BND): Likewise.
5920 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5921 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5922 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5923 (expand_builtin_mempcpy_with_bounds): Likewise.
5924 (expand_builtin_memset_with_bounds): Likewise.
5925 (expand_builtin_memset_args): Likewise.
5926 (std_expand_builtin_va_start): Likewise.
5927 (expand_builtin): Likewise.
5928 (expand_builtin_with_bounds): Likewise.
5929 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
5930 (DEF_LIB_BUILTIN_CHKP): Likewise.
5931 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
5932 (DEF_CHKP_BUILTIN): Likewise.
5933 (BUILT_IN_MEMCPY): Likewise.
5934 (BUILT_IN_MEMMOVE): Likewise.
5935 (BUILT_IN_MEMPCPY): Likewise.
5936 (BUILT_IN_MEMSET): Likewise.
5937 (BUILT_IN_STPCPY): Likewise.
5938 (BUILT_IN_STRCAT): Likewise.
5939 (BUILT_IN_STRCHR): Likewise.
5940 (BUILT_IN_STRCPY): Likewise.
5941 (BUILT_IN_STRLEN): Likewise.
5942 (BUILT_IN_MEMCPY_CHK): Likewise.
5943 (BUILT_IN_MEMMOVE_CHK): Likewise.
5944 (BUILT_IN_MEMPCPY_CHK): Likewise.
5945 (BUILT_IN_MEMSET_CHK): Likewise.
5946 (BUILT_IN_STPCPY_CHK): Likewise.
5947 (BUILT_IN_STRCAT_CHK): Likewise.
5948 (BUILT_IN_STRCPY_CHK): Likewise.
5949 * calls.c (store_bounds): Likewise.
5950 (emit_call_1): Likewise.
5951 (special_function_p): Likewise.
5952 (maybe_warn_nonstring_arg): Likewise.
5953 (initialize_argument_information): Likewise.
5954 (finalize_must_preallocate): Likewise.
5955 (compute_argument_addresses): Likewise.
5956 (expand_call): Likewise.
5957 * cfgexpand.c (expand_call_stmt): Likewise.
5958 (expand_return): Likewise.
5959 (expand_gimple_stmt_1): Likewise.
5960 (pass_expand::execute): Likewise.
5961 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
5962 (cgraph_node::remove): Likewise.
5963 (cgraph_node::dump): Likewise.
5964 (cgraph_node::verify_node): Likewise.
5965 * cgraph.h (chkp_function_instrumented_p): Likewise.
5966 (symtab_node::get_alias_target): Likewise.
5967 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
5968 (cgraph_local_p): Likewise.
5969 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
5970 (cgraph_edge::rebuild_references): Likewise.
5971 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
5972 (walk_polymorphic_call_targets): Likewise.
5973 (cgraph_node::expand_thunk): Likewise.
5974 (symbol_table::output_weakrefs): Likewise.
5975 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
5976 (ix86_handle_option): Likewise.
5977 * config/i386/constraints.md: Likewise.
5978 * config/i386/i386-builtin-types.def (BND): Likewise.
5979 (VOID): Likewise.
5980 (PVOID): Likewise.
5981 (ULONG): Likewise.
5982 * config/i386/i386-builtin.def (BDESC_END): Likewise.
5983 (BDESC_FIRST): Likewise.
5984 (BDESC): Likewise.
5985 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
5986 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
5987 * config/i386/i386.c (enum reg_class): Likewise.
5988 (ix86_target_string): Likewise.
5989 (ix86_option_override_internal): Likewise.
5990 (ix86_conditional_register_usage): Likewise.
5991 (ix86_valid_target_attribute_inner_p): Likewise.
5992 (ix86_set_indirect_branch_type): Likewise.
5993 (ix86_set_current_function): Likewise.
5994 (ix86_function_arg_regno_p): Likewise.
5995 (init_cumulative_args): Likewise.
5996 (ix86_function_arg_advance): Likewise.
5997 (ix86_function_arg): Likewise.
5998 (ix86_pass_by_reference): Likewise.
5999 (ix86_function_value_regno_p): Likewise.
6000 (ix86_function_value_1): Likewise.
6001 (ix86_function_value_bounds): Likewise.
6002 (ix86_return_in_memory): Likewise.
6003 (ix86_setup_incoming_vararg_bounds): Likewise.
6004 (ix86_va_start): Likewise.
6005 (indirect_thunk_need_prefix): Likewise.
6006 (print_reg): Likewise.
6007 (ix86_print_operand): Likewise.
6008 (ix86_expand_call): Likewise.
6009 (ix86_output_function_return): Likewise.
6010 (reg_encoded_number): Likewise.
6011 (BDESC_VERIFYS): Likewise.
6012 (ix86_init_mpx_builtins): Likewise.
6013 (ix86_init_builtins): Likewise.
6014 (ix86_emit_cmove): Likewise.
6015 (ix86_emit_move_max): Likewise.
6016 (ix86_expand_builtin): Likewise.
6017 (ix86_builtin_mpx_function): Likewise.
6018 (ix86_get_arg_address_for_bt): Likewise.
6019 (ix86_load_bounds): Likewise.
6020 (ix86_store_bounds): Likewise.
6021 (ix86_load_returned_bounds): Likewise.
6022 (ix86_store_returned_bounds): Likewise.
6023 (ix86_class_likely_spilled_p): Likewise.
6024 (ix86_hard_regno_mode_ok): Likewise.
6025 (x86_order_regs_for_local_alloc): Likewise.
6026 (ix86_mitigate_rop): Likewise.
6027 (ix86_bnd_prefixed_insn_p): Likewise.
6028 (ix86_mpx_bound_mode): Likewise.
6029 (ix86_make_bounds_constant): Likewise.
6030 (ix86_initialize_bounds): Likewise.
6031 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6032 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6033 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6034 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6035 (TARGET_CHKP_BOUND_MODE): Likewise.
6036 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6037 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6038 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6039 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6040 * config/i386/i386.h (TARGET_MPX): Likewise.
6041 (TARGET_MPX_P): Likewise.
6042 (VALID_BND_REG_MODE): Likewise.
6043 (FIRST_BND_REG): Likewise.
6044 (LAST_BND_REG): Likewise.
6045 (enum reg_class): Likewise.
6046 (BND_REG_P): Likewise.
6047 (BND_REGNO_P): Likewise.
6048 (BNDmode): Likewise.
6049 (ADJUST_INSN_LENGTH): Likewise.
6050 * config/i386/i386.md: Likewise.
6051 * config/i386/i386.opt: Likewise.
6052 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6053 (defined): Likewise.
6054 (LINK_MPX): Likewise.
6055 (MPX_SPEC): Likewise.
6056 (LIBMPX_SPEC): Likewise.
6057 (LIBMPXWRAPPERS_SPEC): Likewise.
6058 (CHKP_SPEC): Likewise.
6059 * config/i386/predicates.md: Likewise.
6060 * dbxout.c (dbxout_type): Likewise.
6061 * doc/extend.texi: Likewise.
6062 * doc/invoke.texi: Likewise.
6063 * doc/md.texi: Likewise.
6064 * doc/tm.texi: Likewise.
6065 * doc/tm.texi.in: Likewise.
6066 * dwarf2out.c (is_base_type): Likewise.
6067 (gen_formal_types_die): Likewise.
6068 (gen_subprogram_die): Likewise.
6069 (gen_type_die_with_usage): Likewise.
6070 (gen_decl_die): Likewise.
6071 (dwarf2out_late_global_decl): Likewise.
6072 * expr.c (expand_assignment): Likewise.
6073 (emit_storent_insn): Likewise.
6074 (store_expr_with_bounds): Likewise.
6075 (store_expr): Likewise.
6076 (expand_expr_real_1): Likewise.
6077 * expr.h (store_expr_with_bounds): Likewise.
6078 * function.c (use_register_for_decl): Likewise.
6079 (struct bounds_parm_data): Likewise.
6080 (assign_parms_augmented_arg_list): Likewise.
6081 (assign_parm_find_entry_rtl): Likewise.
6082 (assign_parm_is_stack_parm): Likewise.
6083 (assign_parm_load_bounds): Likewise.
6084 (assign_bounds): Likewise.
6085 (assign_parms): Likewise.
6086 (expand_function_start): Likewise.
6087 * gcc.c (CHKP_SPEC): Likewise.
6088 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6089 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6090 (wrestrict_dom_walker::check_call): Likewise.
6091 * gimple.c (gimple_build_call_from_tree): Likewise.
6092 * gimple.h (enum gf_mask): Likewise.
6093 (gimple_call_with_bounds_p): Likewise.
6094 (gimple_call_set_with_bounds): Likewise.
6095 * gimplify.c (gimplify_init_constructor): Likewise.
6096 * ipa-cp.c (initialize_node_lattices): Likewise.
6097 (propagate_constants_across_call): Likewise.
6098 (find_more_scalar_values_for_callers_subset): Likewise.
6099 * ipa-hsa.c (process_hsa_functions): Likewise.
6100 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6101 * ipa-icf.c (sem_function::merge): Likewise.
6102 * ipa-inline.c (early_inliner): Likewise.
6103 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6104 (warn_function_cold): Likewise.
6105 (propagate_pure_const): Likewise.
6106 * ipa-ref.h (enum GTY): Likewise.
6107 * ipa-split.c (find_retbnd): Likewise.
6108 (consider_split): Likewise.
6109 (split_function): Likewise.
6110 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6111 * ipa.c (walk_polymorphic_call_targets): Likewise.
6112 (symbol_table::remove_unreachable_nodes): Likewise.
6113 (process_references): Likewise.
6114 (cgraph_build_static_cdtor_1): Likewise.
6115 * lto-cgraph.c (lto_output_node): Likewise.
6116 (output_refs): Likewise.
6117 (compute_ltrans_boundary): Likewise.
6118 (input_overwrite_node): Likewise.
6119 (input_node): Likewise.
6120 (input_cgraph_1): Likewise.
6121 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6122 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6123 (class pass_chkp_instrumentation_passes): Likewise.
6124 (make_pass_chkp_instrumentation_passes): Likewise.
6125 * passes.def: Likewise.
6126 * rtl.h (struct GTY): Likewise.
6127 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6128 * stor-layout.c (layout_type): Likewise.
6129 * symtab.c: Likewise.
6130 * target.def: Likewise.
6131 * targhooks.c (default_chkp_bound_type): Likewise.
6132 (default_chkp_bound_mode): Likewise.
6133 (default_builtin_chkp_function): Likewise.
6134 (default_chkp_function_value_bounds): Likewise.
6135 (default_chkp_make_bounds_constant): Likewise.
6136 (default_chkp_initialize_bounds): Likewise.
6137 * targhooks.h (default_chkp_bound_type): Likewise.
6138 (default_chkp_bound_mode): Likewise.
6139 (default_builtin_chkp_function): Likewise.
6140 (default_chkp_function_value_bounds): Likewise.
6141 (default_chkp_make_bounds_constant): Likewise.
6142 (default_chkp_initialize_bounds): Likewise.
6143 * toplev.c (compile_file): Likewise.
6144 (process_options): Likewise.
6145 * tree-core.h (DEF_BUILTIN): Likewise.
6146 (DEF_BUILTIN_CHKP): Likewise.
6147 * tree-inline.c (declare_return_variable): Likewise.
6148 (remap_gimple_stmt): Likewise.
6149 (copy_bb): Likewise.
6150 (initialize_inlined_parameters): Likewise.
6151 (expand_call_inline): Likewise.
6152 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6153 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6154 (make_pass_ipa_chkp_produce_thunks): Likewise.
6155 (make_pass_chkp): Likewise.
6156 (make_pass_chkp_opt): Likewise.
6157 (make_pass_chkp_instrumentation_passes): Likewise.
6158 * tree-pretty-print.c (dump_generic_node): Likewise.
6159 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6160 * tree-ssa-dce.c (propagate_necessity): Likewise.
6161 (eliminate_unnecessary_stmts): Likewise.
6162 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6163 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6164 * tree-ssa-sccvn.h: Likewise.
6165 * tree-ssa-strlen.c (get_string_length): Likewise.
6166 (valid_builtin_call): Likewise.
6167 (adjust_last_stmt): Likewise.
6168 (handle_builtin_strchr): Likewise.
6169 (handle_builtin_strcpy): Likewise.
6170 (handle_builtin_stxncpy): Likewise.
6171 (handle_builtin_memcpy): Likewise.
6172 (handle_builtin_strcat): Likewise.
6173 (strlen_check_and_optimize_stmt): Likewise.
6174 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6175 * tree-streamer-in.c: Likewise.
6176 * tree-streamer.c (record_common_node): Likewise.
6177 * tree.c (tree_code_size): Likewise.
6178 (wide_int_to_tree_1): Likewise.
6179 (type_contains_placeholder_1): Likewise.
6180 (build_common_tree_nodes): Likewise.
6181 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6182 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6183 (POINTER_BOUNDS_P): Likewise.
6184 (BOUNDED_TYPE_P): Likewise.
6185 (BOUNDED_P): Likewise.
6186 (CALL_WITH_BOUNDS_P): Likewise.
6187 (pointer_bounds_type_node): Likewise.
6188 * value-prof.c (gimple_ic): Likewise.
6189 * var-tracking.c (vt_add_function_parameters): Likewise.
6190 * varasm.c (make_decl_rtl): Likewise.
6191 (assemble_start_function): Likewise.
6192 (output_constant): Likewise.
6193 (maybe_assemble_visibility): Likewise.
6194 * varpool.c (ctor_for_folding): Likewise.
6195 * chkp-builtins.def: Remove.
6196 * ipa-chkp.c: Remove.
6197 * ipa-chkp.h: Remove.
6198 * rtl-chkp.c: Remove.
6199 * rtl-chkp.h: Remove.
6200 * tree-chkp-opt.c: Remove.
6201 * tree-chkp.c: Remove.
6202 * tree-chkp.h: Remove.
6203
6204 2018-06-07 Carl Love <cel@us.ibm.com>
6205
6206 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6207 vextract_fp_from_shortl): Add BE support.
6208
6209 2018-06-07 Paul Koning <ni1d@arrl.net>
6210
6211 * compare-elim.c (try_merge_compare): Don't merge compare if
6212 address contains a side effect.
6213 (try_eliminate_compare): Likewise.
6214
6215 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6216
6217 * config.gcc: Support "tremont".
6218 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6219 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6220 PROCESSOR_TREMONT.
6221 * config/i386/i386.c (m_TREMONT): Define.
6222 (processor_target_table): Add "tremont".
6223 (PTA_TREMONT): Define.
6224 (ix86_lea_outperforms): Add TARGET_TREMONT.
6225 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6226 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6227 and M_INTEL_GOLDMONT_PLUS.
6228 (fold_builtin_cpu): Add "tremont".
6229 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6230 (ix86_option_override_internal): Add "tremont".
6231 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6232 (processor_type): Add PROCESSOR_TREMONT.
6233 * config/i386/x86-tune.def: Add m_TREMONT.
6234 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6235
6236 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6237
6238 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6239 symbol defined for msp430i* devices to be lower case.
6240
6241 2018-06-07 Richard Biener <rguenther@suse.de>
6242
6243 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6244 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6245 Properly wrap signed arithmetic if overflow wraps.
6246
6247 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6248
6249 PR tree-optimization/69615
6250 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6251 of a cast from a same precision integral SSA_NAME in a bb dominated
6252 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6253 cast to utype if rhs2 has already a compatible type.
6254
6255 2018-06-07 Richard Biener <rguenther@suse.de>
6256
6257 PR tree-optimization/85935
6258 * graphite-scop-detection.c (find_params_in_bb): Analyze
6259 condition operands with respect to the correct loop. Assert
6260 the analysis doesn't fail.
6261
6262 2018-06-04 Carl Love <cel@us.ibm.com>
6263
6264 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6265 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6266 as it is slightly cheaper.
6267 (first_match_or_eos_index_<mode>):
6268 Calculate index using natural element order.
6269 (first_match_index_<mode>):
6270 Calculate index using natural element order.
6271 (first_match_or_eos_index_<mode>):
6272 Calculate index using natural order.
6273 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6274 for BE and LE modes.
6275 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6276 P9V_BUILTIN_VCLZLSBB_V16QI.
6277 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6278 specific.
6279
6280 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6281
6282 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6283 indentation and line wrap for many prototypes. Add missing
6284 @smallexample directives around block of prototypes for vec_xl and
6285 vec_xst.
6286
6287 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6288
6289 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6290 track if we pass or return IEEE 128-bit floating point.
6291 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6292 C++ mangling that is compatible with GCC 8.1.
6293 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6294 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6295 floating point types.
6296 (rs6000_function_arg_advance_1): Likewise.
6297 (rs6000_mangle_type): Optionally generate mangled names that match
6298 what GCC 8.1 generated for IEEE 128-bit floating point types.
6299 (rs6000_globalize_decl_name): If we have an external function that
6300 passes or returns IEEE 128-bit types, generate a weak reference
6301 from the mangled name used in GCC 8.1 to the current mangled
6302 name.
6303 (rs6000_init_builtins): Make __ibm128 use the long double type if
6304 long double is IBM extended double. Make __float128 use the long
6305 double type if long double is IEEE 128-bit.
6306
6307 PR target/85657
6308 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6309 macro for __ibm128 built-in functions.
6310 (PACK_IF): Add __ibm128 pack/unpack functions.
6311 (UNPACK_IF): Likewise.
6312 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6313 enable long double built-in functions if long double is IEEE
6314 128-bit floating point.
6315 (rs6000_invalid_builtin): Update long double built-in function
6316 error message.
6317 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6318 functions, adjust the built-in function to use the long double
6319 built-in function if __ibm128 and long double are the same type.
6320 * doc/extend.texi (PowerPC builtins): Update documention for
6321 __builtin_{,un}pack_longdouble. Add documentation for
6322 __builtin_{,un}pack_ibm128.
6323
6324 2018-06-06 Jim Wilson <jimw@sifive.com>
6325
6326 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6327 (struct machine_function): New field interrupt_mode.
6328 (riscv_handle_type_attribute): New function. Add forward declaration.
6329 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6330 (riscv_expand_epilogue): Check interrupt_mode field.
6331 (riscv_set_current_function): Check interrupt attribute args and
6332 set interrupt_mode field.
6333 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6334 (riscv_sret, riscv_uret): New.
6335 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6336 new arguments to interrupt attribute.
6337
6338 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6339
6340 PR target/63177
6341 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6342 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6343
6344 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6345
6346 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6347 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6348 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6349 several redundant entries.
6350
6351 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6352
6353 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6354 type from "rtx" to "rtx_insn *".
6355 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6356 for local "call_insn", removing cast.
6357 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6358
6359 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6360
6361 PR tree-optimization/86066
6362 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6363 for BIT_INSERT_EXPR stores.
6364
6365 2018-06-06 Richard Biener <rguenther@suse.de>
6366
6367 PR tree-optimization/86062
6368 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6369 component refs ontop
6370 of to be offsetted base.
6371
6372 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6373
6374 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6375 to be static and remove check on interrupt attribute name.
6376
6377 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6378
6379 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6380 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6381
6382 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6383
6384 PR target/79924
6385 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6386 second argument.
6387 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6388 Remove second argument, change how error is called.
6389 (aarch64_layout_arg): Remove second argument from
6390 aarch64_err_no_fpadvsimd call.
6391 (aarch64_init_cumulative_args): Ditto.
6392 (aarch64_gimplify_va_arg_expr): Ditto.
6393 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6394
6395 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6396
6397 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6398 (*simple_return_indirect_internal<mode>): Rename from
6399 simple_return_indirect_internal. Use W mode iterator.
6400 (rstorssp): New expander.
6401 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6402 (clrssbsy): New expander.
6403 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6404
6405 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6406
6407 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6408 __typeof__.
6409 (cmse_check_pointed_object): Likewise.
6410
6411 2018-06-05 Martin Liska <mliska@suse.cz>
6412
6413 PR gcov-profile/47618
6414 * doc/invoke.texi: Document how -fprofile-dir format
6415 is extended.
6416
6417 2018-06-05 Richard Biener <rguenther@suse.de>
6418
6419 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6420 removal pretend DOM info isn't available so we do not update
6421 it and only remove edges, not dominated blocks. Actually free
6422 DOM info in case we removed something. Remove unreachable blocks.
6423 (mfb_keep_latches): Work with either DOM info or marked backedges.
6424 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6425 first. Mark backedges if DOM info isn't available.
6426 (Re-)compute DOM info after cleanup_control_flow_pre.
6427
6428 2018-06-05 Richard Biener <rguenther@suse.de>
6429
6430 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6431 (locus_discrim_hasher::hash): Adjust.
6432 (locus_discrim_hasher::equal): Likewise.
6433 (next_discriminator_for_locus): Work on line directly.
6434 (same_line_p): Pass in expanded locus1 as well.
6435 (assign_discriminators): Avoid redundant location expansions.
6436
6437 2018-06-05 Richard Biener <rguenther@suse.de>
6438
6439 PR tree-optimization/86046
6440 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6441 if required after clearing TREE_ADDRESSABLE.
6442
6443 2018-06-05 Richard Biener <rguenther@suse.de>
6444
6445 PR tree-optimization/86047
6446 * tree-ssa-loop.c (for_each_index): Glob handling of all
6447 decls and constants and really handle all of them.
6448
6449 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6450
6451 PR target/81497
6452 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6453 qualifier_void_pointer and qualifier_const_void_pointer.
6454 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6455 (arm_init_builtins): Handle the above.
6456 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6457 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6458 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6459 void intrinsics.
6460
6461 2018-06-05 Martin Liska <mliska@suse.cz>
6462
6463 * auto-profile.c (read_autofdo_file): Do not use
6464 gcov_ctr_summary struct.
6465 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6466 * coverage.c (struct counts_entry): Likewise.
6467 (read_counts_file): Read just single summary entry.
6468 (get_coverage_counts): Use gcov_summary struct.
6469 * coverage.h (get_coverage_counts): Likewise.
6470 * gcov-dump.c (dump_working_sets): Likewise.
6471 (tag_summary): Dump just single summary.
6472 * gcov-io.c (gcov_write_summary): Write just histogram
6473 summary.
6474 (gcov_read_summary): Read just single summary.
6475 (compute_working_sets): Use gcov_summary struct.
6476 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6477 of GCOV_COUNTERS_SUMMABLE.
6478 (GCOV_COUNTERS_SUMMABLE): Remove.
6479 (GCOV_FIRST_VALUE_COUNTER): Replace with
6480 GCOV_COUNTER_V_INTERVAL.
6481 (struct gcov_ctr_summary): Remove.
6482 (struct gcov_summary): Directly use fields of former
6483 gcov_ctr_summary.
6484 (compute_working_sets): Use gcov_summary struct.
6485 * gcov.c (read_count_file): Do not use ctrs fields.
6486 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6487 struct.
6488 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6489 struct.
6490 * profile.c: Likewise.
6491 * profile.h: Likewise.
6492
6493 2018-06-05 Martin Liska <mliska@suse.cz>
6494
6495 PR gcov-profile/84846
6496 * gcov.c (output_lines): Print working directory only
6497 in intermediate format.
6498
6499 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6500
6501 * config/s390/s390-builtin-types.def: Add void function type.
6502 * config/s390/s390-builtins.def: Use the function type for the
6503 tbeginc builtin.
6504
6505 2018-06-04 Jim Wilson <jimw@sifive.com>
6506
6507 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6508 to int.
6509 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6510 and maybe_eh_return. Change regno to unsigned int. Use new args to
6511 handle EH_RETURN_DATA_REGNO registers properly.
6512 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6513 (riscv_expand_epilogue): Update comment. Change argument name and
6514 type. Update code to use new name and type. Pass new args to
6515 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6516 EXCEPTION_RETURN.
6517 * config/riscv/riscv.md (NORMAL_RETURN): New.
6518 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6519 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6520 (eh_return): Call gen_eh_return_internal and emit barrier.
6521 (eh_return_internal): Call riscv_expand_epilogue.
6522
6523 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6524
6525 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6526 bit_insertion field and declare can_be_merged_into method.
6527 (merged_store_group::can_be_merged_into): New method.
6528 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6529 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6530 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6531
6532 2018-06-04 Richard Biener <rguenther@suse.de>
6533
6534 PR tree-optimization/85955
6535 * builtins.c (fold_builtin_sincos): Convert pointers to
6536 destination to appropriate type before dereferencing.
6537
6538 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6539
6540 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6541
6542 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6543
6544 * expr.c (expand_expr_real_1): Force the operand into memory if
6545 its TYPE_MODE is BLKmode and if there is no integer mode for
6546 the number of bits being extracted.
6547
6548 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6549
6550 PR target/85832
6551 PR target/86036
6552 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6553 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6554
6555 2018-06-04 Richard Biener <rguenther@suse.de>
6556
6557 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6558 (cleanup_tree_cfg_noloop): ... single caller. Do
6559 start_recording_case_labels later.
6560
6561 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6562
6563 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6564 to _IMMINTRIN_H_INCLUDED.
6565 * config/i386/pconfigintrin.h: Ditto.
6566 * config/i386/waitpkgintrin.h: Ditto.
6567 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6568 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6569 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6570 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6571 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6572 waitpkgintrin.h and cldemoteintrin.h.
6573
6574 2018-06-04 Richard Biener <rguenther@suse.de>
6575
6576 PR tree-optimization/86038
6577 * tracer.c (find_best_successor): Check probability for
6578 being initialized, bail out if not.
6579
6580 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6581
6582 PR target/86003
6583 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6584 of bits to ignore when comparing architectures.
6585
6586 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6587
6588 PR tree-optimization/69615
6589 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6590 maximum or minimum of the type, try to merge it also as if
6591 range1 is + [-, x - 1] or + [x + 1, -].
6592
6593 PR c++/86025
6594 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6595
6596 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6597
6598 PR tree-optimization/86034
6599 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6600 the unsigned bitfield type in a bit insertion sequence if it does not
6601 have a larger precision than the bitfield size.
6602 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6603
6604 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6605
6606 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6607
6608 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6609
6610 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6611 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6612 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6613 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6614
6615 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6616
6617 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6618 Disable -fdelete-null-pointer-checks for ELF toolchain.
6619
6620 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6621 Kito Cheng <kito.cheng@gmail.com>
6622
6623 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6624 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6625 (nds32*-*-*): Add glibc and uclibc conditions.
6626 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6627 (TARGET_EXCEPT_UNWIND_INFO): Define.
6628 * config/nds32/elf.h: New file.
6629 * config/nds32/linux.h: New file.
6630 * config/nds32/nds32-elf.opt: New file.
6631 * config/nds32/nds32-linux.opt: New file.
6632 * config/nds32/nds32-fp-as-gp.c
6633 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6634 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6635 TARGET_LINUX_ABI.
6636 (nds32_asm_file_end): Ditto.
6637 (nds32_print_operand): Ditto.
6638 (nds32_insert_attributes): Ditto.
6639 (nds32_init_libfuncs): New function.
6640 (TARGET_HAVE_TLS): Define.
6641 (TARGET_INIT_LIBFUNCS): Define.
6642 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6643 spec content.
6644 (TARGET_ELF): Apply different mcmodel setting.
6645 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6646 been migrated into elf.h and linux.h files.
6647 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6648 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6649 (mcmodel): The content has been migrated into nds32-elf.opt and
6650 nds32-linux.opt files.
6651 * config/nds32/t-elf: New file.
6652 * config/nds32/t-linux: New file.
6653
6654 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6655 Shiva Chen <shiva0217@gmail.com>
6656
6657 * config/nds32/constants.md (unspec_volatile_element): Add
6658 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6659 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6660 optimization.
6661 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6662 (make_pass_nds32_fp_as_gp): Declare.
6663 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6664 optmization pass.
6665 (nds32_asm_function_end_prologue): Remove unused asm output.
6666 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6667 (nds32_asm_file_start): Output necessary fp_as_gp information.
6668 (nds32_option_override): Adjust register usage.
6669 (nds32_expand_prologue): Consider fp_as_gp situation.
6670 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6671 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6672 (epilogue): Ditto.
6673 (return): Ditto.
6674 (simple_return): Ditto.
6675 (omit_fp_begin): Output special directive for fp_as_gp.
6676 (omit_fp_end): Output special directive for fp_as_gp.
6677 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6678 mforbid-fp-as-gp): New options.
6679
6680 2018-06-01 Mark Wielaard <mark@klomp.org>
6681
6682 * dwarf2out.c (dwarf2out_finish): Remove generation of
6683 DW_AT_loclists_base.
6684
6685 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6686
6687 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6688 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6689 (struct merged_store_group): Add bit_insertion field.
6690 (dump_char_array): Use standard hexadecimal format.
6691 (merged_store_group::merged_store_group): Set bit_insertion to false.
6692 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6693 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6694 also print the mask in the dump file.
6695 (pass_store_merging::gate): Minor tweak.
6696 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6697 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6698 stores with INTEGER_CST stores.
6699 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6700 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6701 and use it throughout. Generate bit insertion sequences if need be.
6702 (pass_store_merging::process_store): Remove redundant condition.
6703 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6704
6705 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6706
6707 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6708 the 128-bit floating point types. Fix function comment.
6709
6710 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6711
6712 * config/aarch64/aarch64-simd.md
6713 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6714 mnemonics.
6715 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6716 mnemonics.
6717
6718 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6719
6720 PR tree-optimization/85989
6721 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6722 variable.
6723 (backprop::intersect_uses): Check it when deciding whether this
6724 is a backedge reference.
6725 (backprop::process_block): Add each phi to m_visited_phis
6726 after visiting it, then clear it at the end.
6727
6728 2018-06-01 Richard Biener <rguenther@suse.de>
6729
6730 * tree-vectorizer.h (vect_dr_stmt): New function.
6731 (vect_get_load_cost): Adjust.
6732 (vect_get_store_cost): Likewise.
6733 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6734 Use vect_dr_stmt instead of DR_SMTT.
6735 (vect_record_base_alignments): Likewise.
6736 (vect_calculate_target_alignment): Likewise.
6737 (vect_compute_data_ref_alignment): Likewise and make static.
6738 (vect_update_misalignment_for_peel): Likewise.
6739 (vect_verify_datarefs_alignment): Likewise.
6740 (vector_alignment_reachable_p): Likewise.
6741 (vect_get_data_access_cost): Likewise. Pass down
6742 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6743 (vect_get_peeling_costs_all_drs): Likewise.
6744 (vect_peeling_hash_get_lowest_cost): Likewise.
6745 (vect_enhance_data_refs_alignment): Likewise.
6746 (vect_find_same_alignment_drs): Likewise.
6747 (vect_analyze_data_refs_alignment): Likewise.
6748 (vect_analyze_group_access_1): Likewise.
6749 (vect_analyze_group_access): Likewise.
6750 (vect_analyze_data_ref_access): Likewise.
6751 (vect_analyze_data_ref_accesses): Likewise.
6752 (vect_vfa_segment_size): Likewise.
6753 (vect_small_gap_p): Likewise.
6754 (vectorizable_with_step_bound_p): Likewise.
6755 (vect_prune_runtime_alias_test_list): Likewise.
6756 (vect_analyze_data_refs): Likewise.
6757 (vect_supportable_dr_alignment): Likewise.
6758 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6759 (vect_gen_prolog_loop_niters): Likewise.
6760 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6761 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6762 modify DR_STMT.
6763 (vect_recog_mask_conversion_pattern): Likewise.
6764 (vect_try_gather_scatter_pattern): Likewise.
6765 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6766 to vect_get_store_cost.
6767 (vect_get_store_cost): Get stmt_info instead of DR.
6768 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6769 (vect_get_load_cost): Get stmt_info instead of DR.
6770
6771 2018-06-01 Richard Biener <rguenther@suse.de>
6772
6773 PR middle-end/86017
6774 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6775 vars wrapped in MEM_REFs.
6776
6777 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6778
6779 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6780 Fix subreg tests so that we only return a choice between
6781 GENERAL_REGS and FP_REGS if the original classes included both.
6782
6783 2018-06-01 Richard Biener <rguenther@suse.de>
6784
6785 PR ipa/85960
6786 * tree-ssa-structalias.c (get_function_part_constraint):
6787 Handle NULL fi->decl.
6788 (find_func_aliases_for_call): Properly handle indirect
6789 fi from direct call.
6790 (find_func_clobbers): Likewise.
6791 (ipa_pta_execute): Likewise.
6792 (create_variable_info_for): For functions that are ifunc_resolver
6793 resolve to a varinfo that contains the result of the resolver call.
6794 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6795 aliases.
6796
6797 2018-05-31 Michael Collison <michael.collison@arm.com>
6798
6799 * config/aarch64/aarch64.md:
6800 (*fix_to_zero_extenddfdi2): New pattern.
6801 * gcc.target/aarch64/fix_extend1.c: New testcase.
6802
6803 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6804
6805 PR middle-end/78809
6806 PR middle-end/83026
6807 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6808 and BUILT_IN_STRNCMP_EQ.
6809 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6810 BUILT_IN_STRNCMP_EQ.
6811 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6812 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6813 (gimple_fold_builtin): Likewise.
6814 * tree-ssa-strlen.c (compute_string_length): New function.
6815 (determine_min_obsize): New function.
6816 (handle_builtin_string_cmp): New function to handle calls to
6817 string compare functions.
6818 (strlen_optimize_stmt): Add handling to builtin string compare
6819 calls.
6820 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6821 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6822 * tree.c (build_common_builtin_nodes): Add new defines of
6823 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6824
6825 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6826
6827 PR target/85984
6828 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6829 functions with naked attribute.
6830
6831 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6832
6833 * config/i386/sse.md (avx_vec_concat<mode>):
6834 Substitute concat_tg_mode mode attribute with xtg_mode.
6835 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6836 (concat_tg_mode): Remove mode attribute.
6837
6838 2018-05-31 Martin Sebor <msebor@redhat.com>
6839
6840 PR c/82063
6841 * calls.c (alloc_max_size): Correct a logic error/typo.
6842 Treat excessive arguments as infinite. Warn for invalid arguments.
6843 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6844
6845 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6846
6847 PR target/85829
6848 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6849 and movx for Haswell.
6850
6851 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6852 Cesar Philippidis <cesar@codesourcery.com>
6853
6854 PR middle-end/85879
6855 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6856 when emitting error on private/firstprivate reductions.
6857 * omp-low.c (lower_omp_target): Avoid reference-type processing
6858 on pointers for firstprivate clause.
6859
6860 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6861
6862 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6863 (st1x2): Likewise.
6864 (st1x3): Likewise.
6865 * config/aarch64/aarch64-simd.md
6866 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6867 (aarch64_ld1_x3_<mode>): Likewise
6868 (aarch64_st1x2<VALLDIF:mode>): Likewise
6869 (aarch64_st1_x2_<mode>): Likewise
6870 (aarch64_st1x3<VALLDIF:mode>): Likewise
6871 (aarch64_st1_x3_<mode>): Likewise
6872 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6873 (vld1_s8_x3): Likewise.
6874 (vld1_u16_x3): Likewise.
6875 (vld1_s16_x3): Likewise.
6876 (vld1_u32_x3): Likewise.
6877 (vld1_s32_x3): Likewise.
6878 (vld1_u64_x3): Likewise.
6879 (vld1_s64_x3): Likewise.
6880 (vld1_f16_x3): Likewise.
6881 (vld1_f32_x3): Likewise.
6882 (vld1_f64_x3): Likewise.
6883 (vld1_p8_x3): Likewise.
6884 (vld1_p16_x3): Likewise.
6885 (vld1_p64_x3): Likewise.
6886 (vld1q_u8_x3): Likewise.
6887 (vld1q_s8_x3): Likewise.
6888 (vld1q_u16_x3): Likewise.
6889 (vld1q_s16_x3): Likewise.
6890 (vld1q_u32_x3): Likewise.
6891 (vld1q_s32_x3): Likewise.
6892 (vld1q_u64_x3): Likewise.
6893 (vld1q_s64_x3): Likewise.
6894 (vld1q_f16_x3): Likewise.
6895 (vld1q_f32_x3): Likewise.
6896 (vld1q_f64_x3): Likewise.
6897 (vld1q_p8_x3): Likewise.
6898 (vld1q_p16_x3): Likewise.
6899 (vld1q_p64_x3): Likewise.
6900 (vst1_s64_x2): Likewise.
6901 (vst1_u64_x2): Likewise.
6902 (vst1_f64_x2): Likewise.
6903 (vst1_s8_x2): Likewise.
6904 (vst1_p8_x2): Likewise.
6905 (vst1_s16_x2): Likewise.
6906 (vst1_p16_x2): Likewise.
6907 (vst1_s32_x2): Likewise.
6908 (vst1_u8_x2): Likewise.
6909 (vst1_u16_x2): Likewise.
6910 (vst1_u32_x2): Likewise.
6911 (vst1_f16_x2): Likewise.
6912 (vst1_f32_x2): Likewise.
6913 (vst1_p64_x2): Likewise.
6914 (vst1q_s8_x2): Likewise.
6915 (vst1q_p8_x2): Likewise.
6916 (vst1q_s16_x2): Likewise.
6917 (vst1q_p16_x2): Likewise.
6918 (vst1q_s32_x2): Likewise.
6919 (vst1q_s64_x2): Likewise.
6920 (vst1q_u8_x2): Likewise.
6921 (vst1q_u16_x2): Likewise.
6922 (vst1q_u32_x2): Likewise.
6923 (vst1q_u64_x2): Likewise.
6924 (vst1q_f16_x2): Likewise.
6925 (vst1q_f32_x2): Likewise.
6926 (vst1q_f64_x2): Likewise.
6927 (vst1q_p64_x2): Likewise.
6928 (vst1_s64_x3): Likewise.
6929 (vst1_u64_x3): Likewise.
6930 (vst1_f64_x3): Likewise.
6931 (vst1_s8_x3): Likewise.
6932 (vst1_p8_x3): Likewise.
6933 (vst1_s16_x3): Likewise.
6934 (vst1_p16_x3): Likewise.
6935 (vst1_s32_x3): Likewise.
6936 (vst1_u8_x3): Likewise.
6937 (vst1_u16_x3): Likewise.
6938 (vst1_u32_x3): Likewise.
6939 (vst1_f16_x3): Likewise.
6940 (vst1_f32_x3): Likewise.
6941 (vst1_p64_x3): Likewise.
6942 (vst1q_s8_x3): Likewise.
6943 (vst1q_p8_x3): Likewise.
6944 (vst1q_s16_x3): Likewise.
6945 (vst1q_p16_x3): Likewise.
6946 (vst1q_s32_x3): Likewise.
6947 (vst1q_s64_x3): Likewise.
6948 (vst1q_u8_x3): Likewise.
6949 (vst1q_u16_x3): Likewise.
6950 (vst1q_u32_x3): Likewise.
6951 (vst1q_u64_x3): Likewise.
6952 (vst1q_f16_x3): Likewise.
6953 (vst1q_f32_x3): Likewise.
6954 (vst1q_f64_x3): Likewise.
6955 (vst1q_p64_x3): Likewise.
6956
6957 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6958
6959 * config/msp430/msp430.c (msp430_output_labelref): Prepend
6960 user_label_prefix to name.
6961
6962 * tree-core.h: Update comment about the format of NAME string
6963 passed to handler in attribute_spec.
6964
6965 * config/msp430/msp430.md: Remove erroneous subreg expression from
6966 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
6967 zero_extend{q,h}isi2.
6968
6969 2018-05-30 Borislav Petkov <bp@suse.de>
6970
6971 * doc/extend.texi: Document some architecture specific
6972 constraints and sort entries.
6973
6974 2018-05-30 Martin Sebor <msebor@redhat.com>
6975
6976 PR middle-end/85369
6977 * builtins.c (expand_builtin_stpcpy_1): New function.
6978 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
6979 only if the former succeeds.
6980
6981 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6982
6983 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
6984 in saphira.
6985
6986 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6987
6988 * doc/invoke.texi (-flinker-output): Document
6989
6990 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6991
6992 * passes.c (ipa_write_summaries): Only modify statements if body
6993 is in memory.
6994 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
6995 incrementally linking.
6996 (ipa_passes): Likewise.
6997 * lto-cgraph.c (lto_output_node): When incrementally linking do not
6998 pass down resolution info.
6999 * common.opt (flag_incremental_link): Update info.
7000 * gcc.c (plugin specs): Turn flinker-output=* to
7001 -plugin-opt=-linker-output-known
7002 * toplev.c (compile_file): Also cut compilation when doing incremental
7003 link.
7004 * flag-types. (enum lto_partition_model): Add
7005 LTO_LINKER_OUTPUT_NOLTOREL.
7006 (invoke.texi): Add -flinker-output docs.
7007 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7008 link same way as WPA; do not stream in dead initializers.
7009
7010 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7011 darf2out_register_external_decl): Support incremental link.
7012
7013 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7014
7015 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7016
7017 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7018
7019 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7020 it down to simple_object_copy_lto_debug_sections.
7021 (run_gcc): Determine incremental LTO link time and configure
7022 lto1 into non-wpa mode, disable renaming of debug sections.
7023
7024 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7025
7026 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7027 descriptions of various incorrectly documented functions.
7028
7029 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7030
7031 Revert:
7032 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7033 address check not strict.
7034
7035 2018-05-30 Richard Biener <rguenther@suse.de>
7036
7037 PR tree-optimization/85964
7038 * tracer.c (better_p): Drop initialized count check, we only
7039 call the function with initialized counts now.
7040 (find_best_successor): Do find a best edge if one
7041 has uninitialized count.
7042 (find_best_predecessor): Likewise. Do BB frequency check only
7043 if count is initialized.
7044
7045 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7046
7047 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7048 (aarch64_ldrstr_offset_compare): New.
7049 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7050 load/store orderings.
7051 (aarch64_gen_adjusted_ldpstp): Likewise.
7052
7053 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7054
7055 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7056 Check for subset of GENERAL_REGS and FP_REGS.
7057 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7058 r=w alternative.
7059
7060 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7061
7062 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7063 and wi::to_poly_offset. Add the current offset and then check
7064 whether the sum fits, rather than using an unchecked addition of
7065 a checked term. Check for a shwi rather than a uhwi.
7066 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7067 (store_constructor): Use poly_int_tree_p.
7068 (expand_expr_real_1): Likewise.
7069 * function.c (assign_temp): Likewise.
7070 * fold-const.c (const_binop): Use poly_int_tree_p and
7071 wi::to_poly_offset.
7072 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7073 division.
7074 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7075 to_poly_offset for MEM offsets.
7076 * ipa-icf.c (sem_variable::equals): Likewise.
7077 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7078 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7079 wi::to_poly_offset for BIT_FIELD_REF offsets.
7080 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7081 wi::to_poly_offset.
7082 * var-tracking.c (emit_note_insn_var_location): Use
7083 tree_to_poly_uint64.
7084
7085 2018-05-29 Jim Wilson <jimw@sifive.com>
7086
7087 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7088
7089 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7090
7091 PR target/85950
7092 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7093 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7094 sequence.
7095 (sse4_1_round<mode>2): Use nonimmediate_operand
7096 for operand 1 predicate.
7097
7098 2018-05-29 Martin Sebor <msebor@redhat.com>
7099 Richard Biener <rguenther@suse.de>
7100
7101 PR testsuite/85888
7102 * calls.c (get_size_range): Call determine_value_range instead
7103 of get_value_range..
7104 * tree-vrp.h (determine_value_range): Declared new function.
7105 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7106
7107 2018-05-29 Richard Biener <rguenther@suse.de>
7108
7109 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7110 sure to use non-pattern stmts for get_earlier_stmt arguments.
7111 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7112 called on pattern stmts.
7113 (get_later_stmt): Likewise.
7114
7115 2018-05-29 Martin Liska <mliska@suse.cz>
7116
7117 PR gcov-profile/85759
7118 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7119 env variables.
7120
7121 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7122
7123 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7124 VEC_UNPACK_*_EXPR.
7125 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7126 VEC_PACK_*_EXPR.
7127
7128 PR target/85918
7129 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7130 VEC_PACK_FLOAT_EXPR): New tree codes.
7131 * tree-pretty-print.c (op_code_prio): Handle
7132 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7133 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7134 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7135 * tree-inline.c (estimate_operator_cost): Likewise.
7136 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7137 * fold-const.c (const_binop): Likewise.
7138 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7139 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7140 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7141 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7142 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7143 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7144 * expr.c (expand_expr_real_2): Likewise.
7145 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7146 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7147 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7148 optabs.
7149 * optabs.c (expand_widen_pattern_expr): For
7150 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7151 sign from result type rather than operand's type.
7152 (expand_binop_directly): For vec_packu_float_optab and
7153 vec_packs_float_optab allow result type to be different from operand's
7154 type.
7155 * optabs-tree.c (optab_for_tree_code): Handle
7156 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7157 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7158 * tree-vect-generic.c (expand_vector_operations_1): Handle
7159 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7160 VEC_PACK_FLOAT_EXPR.
7161 * tree-vect-stmts.c (supportable_widening_operation): Handle
7162 FIX_TRUNC_EXPR.
7163 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7164 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7165 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7166 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7167 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7168 mode attributes.
7169 (vec_pack<floatprefix>_float_<mode>): New expander.
7170 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7171 attributes.
7172 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7173 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7174 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7175 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7176 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7177 Document.
7178 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7179 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7180 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7181 VEC_PACK_FLOAT_EXPR): Document.
7182
7183 2018-05-29 Richard Biener <rguenther@suse.de>
7184
7185 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7186 member.
7187 (stmt_vec_info_vec): Make pointer.
7188 (init_stmt_vec_info_vec): Remove.
7189 (free_stmt_vec_info_vec): Likewise.
7190 (set_stmt_vec_info_vec): New function.
7191 (free_stmt_vec_infos): Likewise.
7192 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7193 (set_vinfo_for_stmt): Likewise.
7194 (get_earlier_stmt): Likewise.
7195 (get_later_stmt): Likewise.
7196 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7197 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7198 (vec_info::~vec_info): Free stmt_vec_infos.
7199 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7200 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7201 (pass_slp_vectorize::execute): Likewise.
7202 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7203 (free_stmt_vec_info_vec): Likewise.
7204 (set_stmt_vec_info_vec): New function.
7205 (free_stmt_vec_infos): Likewise.
7206 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7207 the global stmt_vec_info_vec.
7208 * tree-parloops.c (gather_scalar_reductions): Use
7209 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7210 vector.
7211
7212 2018-05-29 Richard Biener <rguenther@suse.de>
7213
7214 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7215
7216 2018-05-29 Martin Liska <mliska@suse.cz>
7217 David Malcolm <dmalcolm@redhat.com>
7218
7219 * vec.c (test_reverse): New.
7220 (vec_c_tests): Add new test.
7221 * vec.h (vl_ptr>::reverse): New function.
7222
7223 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7224
7225 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7226
7227 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7228 and later.
7229
7230 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7231
7232 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7233
7234 2018-05-28 Richard Biener <rguenther@suse.de>
7235
7236 PR tree-optimization/85933
7237 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7238 look at stmts marked as vectorizable.
7239
7240 2018-05-28 Richard Biener <rguenther@suse.de>
7241
7242 PR tree-optimization/85934
7243 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7244 vector boolean check before scalar optimization.
7245
7246 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7247
7248 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7249 for armv5te.
7250
7251 2018-05-28 Mark Wielaard <mark@klomp.org>
7252
7253 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7254 if it is an expression containing a minus sign.
7255
7256 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7257
7258 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7259
7260 2018-05-27 Paul Koning <ni1d@arrl.net>
7261
7262 * config/pdp11/pdp11.md (truncsihi2): Remove.
7263
7264 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7265 Chung-Ju Wu <jasonwucj@gmail.com>
7266
7267 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7268 implementation.
7269 (unaligned_store_dw): Ditto.
7270 * config/nds32/nds32-memory-manipulation.c
7271 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7272 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7273 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7274 (emit_setmem_word_loop): Rename to ...
7275 (emit_setmem_doubleword_loop): ... this.
7276 (nds32_gen_dup_4_byte_to_word_value): New function.
7277 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7278 (nds32_expand_setmem_loop): Refine implementation.
7279 (nds32_expand_setmem_loop_v3m): Ditto.
7280 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7281 pattern.
7282
7283 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7284
7285 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7286
7287 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7288
7289 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7290 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7291 machine->attr_no_prologue_p.
7292 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7293 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7294 (nds32_expand_epilogue): Consider attr_naked_p.
7295 (nds32_expand_epilogue_v3pop): Likewise.
7296 (nds32_can_use_return_insn): Likewise.
7297 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7298 attr_no_prologue_p fields.
7299 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7300
7301 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7302
7303 PR target/85918
7304 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7305 attributes.
7306 * config/i386/sse.md
7307 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7308 Rename to ...
7309 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7310 ... this.
7311 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7312 Rename to ...
7313 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7314 ... this.
7315 (*<floatsuffix>floatv2div2sf2): Rename to ...
7316 (*float<floatunssuffix>v2div2sf2): ... this.
7317 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7318 (float<floatunssuffix>v2div2sf2_mask): ... this.
7319 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7320 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7321 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7322 to ...
7323 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7324 ... this.
7325 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7326 Rename to ...
7327 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7328 ... this.
7329 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7330 Rename to ...
7331 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7332 ... this.
7333 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7334 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7335 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7336 gen_ufix_truncv8dfv8si2.
7337 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7338 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7339 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7340 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7341 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7342 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7343 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7344 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7345
7346 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7347
7348 PR target/85900
7349 PR target/85345
7350 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7351
7352 2018-05-25 Jim Wilson <jimw@sifive.com>
7353
7354 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7355 * config/riscv/riscv.c (struct machine_function): Add
7356 interrupt_handler_p and attribute_checked_p fields.
7357 (riscv_attribute_table): Add interrupt.
7358 (riscv_interrupt_type_p): New.
7359 (riscv_save_reg_p): Save extra regs for interrupt handler.
7360 (riscv_use_save_libcall): Return false for interrupt handler.
7361 (riscv_first_stack_step): Add forward declaration.
7362 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7363 for interrupt handler with large frame. Use it for saved reg list.
7364 (riscv_expand_prologue): Move flag_stack_usage_info support to
7365 eliminate duplication.
7366 (riscv_expand_epilogue): Generate mret for interrupt handler.
7367 (riscv_epilogue_uses): New.
7368 (riscv_can_use_return_insn): Return false for interrupt handler.
7369 (riscv_function_ok_for_sibcall): Likewise.
7370 (riscv_set_current_function): Add interrupt handler support.
7371 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7372 * config/riscv/riscv.md (UNSPECV_MRET): New.
7373 (GP_REGNUM): New.
7374 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7375 (riscv_mret): New.
7376 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7377
7378 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7379
7380 PR tree-optimization/85712
7381 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7382 this candidate has already been replaced in-situ by a copy.
7383
7384 2018-05-25 Jason Merrill <jason@redhat.com>
7385
7386 PR c++/80485 - inline function non-zero address.
7387 * symtab.c (nonzero_address): Check DECL_COMDAT.
7388
7389 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7390
7391 PR target/83628
7392 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7393 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7394 extension of SImode operation. Use const123_operand predicate.
7395 (*saddsi_1): Remove.
7396 (*saddl_se_1): Ditto.
7397 (*ssubsi_1): Ditto.
7398 (*ssubl_se_1): Ditto.
7399 * config/alpha/predicates.md (const123_operand): New predicate.
7400 * config/alpha/constraints.md (P): Use IN_RANGE.
7401
7402 2018-05-25 Richard Biener <rguenther@suse.de>
7403
7404 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7405 defaulted to true.
7406 (ref_maybe_used_by_stmt_p): Likewise.
7407 (stmt_may_clobber_ref_p): Likewise.
7408 (stmt_may_clobber_ref_p_1): Likewise.
7409 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7410 and pass it along.
7411 (ref_maybe_used_by_stmt_p): Likewise.
7412 (stmt_may_clobber_ref_p): Likewise.
7413 (stmt_may_clobber_ref_p_1): Likewise.
7414 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7415 the alias oracle to disambiguate DRs with stmts DR analysis
7416 couldn't handle.
7417 (vect_analyze_data_refs): Do not give up on not analyzable
7418 DRs for BB vectorization. Remove code truncating the dataref
7419 vector.
7420
7421 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7422
7423 PR target/85832
7424 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7425 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7426 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7427
7428 2018-05-25 Richard Biener <rguenther@suse.de>
7429
7430 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7431 function, combining stmt data ref gathering and fatal analysis
7432 parts.
7433 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7434 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7435 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7436 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7437 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7438
7439 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7440
7441 PR tree-optimization/85720
7442 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7443 SCC if all partitions are builtins.
7444 (version_loop_by_alias_check): New parameter. Generate cancelable
7445 runtime alias check if all partitions are builtins.
7446 (distribute_loop): Update call to above function.
7447
7448 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7449
7450 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7451 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7452 (parm_default_def_partition_arg): Ditto.
7453 (set_parm_default_def_partition): Ditto.
7454 (get_parm_default_def_partitions): Ditto and make it static.
7455 (get_undefined_value_partitions): Ditto and make it static.
7456 (remove_ssa_form): Refactor call to init_var_map here.
7457 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7458 computation for loop region.
7459 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7460 (register_default_def): Delete.
7461 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7462 (parm_default_def_partition_arg): Ditto.
7463 (set_parm_default_def_partition): Ditto.
7464 (get_parm_default_def_partitions): Ditto and make it static.
7465 (get_undefined_value_partitions): Ditto and make it static.
7466 (coalesce_with_default, coalesce_with_default): Update comment.
7467 (create_coalesce_list_for_region): New func factored out from
7468 create_outofssa_var_map.
7469 (populate_coalesce_list_for_outofssa): New func factored out from
7470 create_outofssa_var_map and coalesce_ssa_name.
7471 (create_outofssa_var_map): Delete.
7472 (coalesce_ssa_name): Refactor to support live range computation.
7473 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7474 (get_parm_default_def_partitions): Delete.
7475 (get_undefined_value_partitions): Ditto.
7476 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7477 computation for loop region.
7478 (new_tree_live_info, loe_visit_block): Ditto.
7479 (live_worklist, set_var_live_on_entry): Ditto.
7480 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7481 * tree-ssa-live.h (struct _var_map): New fields.
7482 (init_var_map): Change decl.
7483 (region_contains_p): New.
7484
7485 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7486
7487 * tree-ssa-live.h (live_merge_and_clear): Delete.
7488
7489 2018-05-25 Richard Biener <rguenther@suse.de>
7490
7491 PR c++/85912
7492 * tree-dump.c (dequeue_and_dump): Remove access to removed
7493 operand 2 of a SWITCH_EXPR.
7494
7495 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7496
7497 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7498 multiplication and division.
7499 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7500 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7501 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7502 (cond_udiv_optab, cond_umod_optab): New optabs.
7503 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7504 (IFN_COND_RDIV): New internal functions.
7505 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7506 TRUNC_MOD_EXPR and RDIV_EXPR.
7507 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7508 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7509 New unspecs.
7510 (SVE_INT_BINARY): Include mult.
7511 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7512 (optab, sve_int_op): Handle mult.
7513 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7514 UNSPEC_COND_DIV.
7515 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7516 for SVE_INT_BINARY_SD.
7517
7518 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7519
7520 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7521 (optab, sve_int_op): Handle div and udiv.
7522 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7523 for SVE_INT_BINARY_SD.
7524 (*<optab><mode>3): New insn for the same.
7525
7526 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7527
7528 * tree-vect-patterns.c: Include predict.h.
7529 (vect_recog_divmod_pattern): Restrict check for division support
7530 to when optimizing for size.
7531
7532 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7533
7534 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7535 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7536 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7537 (gimple_match_op::set_op): Likewise.
7538 (gimple_resimplify4): Declare.
7539 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7540 (expr::gen_transform): Likewise.
7541 (decision_tree::gen): Generate a simplification routine for 4 operands.
7542 * gimple-match-head.c (gimple_simplify): Add an overload for
7543 4 operands. In the top-level function, handle up to 4 call
7544 arguments and call gimple_resimplify4.
7545 (gimple_resimplify4): New function.
7546 (build_call_internal): Pass a fourth operand.
7547 (maybe_push_to_seq): Likewise.
7548 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7549 Fold VEC_COND_EXPRs of an operation and a default value into
7550 an IFN_COND_* function if possible.
7551 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7552 New unspecs.
7553 (SVE_COND_FP_BINARY): Include them.
7554 (optab, sve_fp_op): Handle them.
7555 (SVE_INT_BINARY_REV): New code iterator.
7556 (SVE_COND_FP_BINARY_REV): New int iterator.
7557 (commutative): New int attribute.
7558 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7559 Declare.
7560 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7561 function.
7562 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7563 (*cond_<optab><mode>): New patterns for reversed operands.
7564
7565 2018-05-25 Richard Biener <rguenther@suse.de>
7566
7567 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7568 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7569 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7570 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7571 * tree-vect-data-refs.c (everywhere): Adjust users.
7572 * tree-vect-loop.c (everywhere): Likewise.
7573 * tree-vect-slp.c (everywhere): Likewise.
7574 * tree-vect-stmts.c (everywhere): Likewise.
7575 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7576
7577 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7578
7579 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7580 Rename to...
7581 (gcc_cv_as_section_exclude): ... this.
7582 Try Solaris as #exclude syntax.
7583 * configure: Regenerate.
7584 * config.in: Regenerate.
7585 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7586 SECTION_EXCLUDE.
7587 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7588 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7589
7590 * varasm.c (default_elf_asm_named_section): Don't check if
7591 HAVE_GAS_SECTION_EXCLUDE is defined.
7592
7593 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7594
7595 * doc/md.texi: Update the documentation of the cond_* optabs
7596 to mention the new final operand. Fix GET_MODE_NUNITS call.
7597 Describe the scalar case too.
7598 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7599 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7600 instead of 2.
7601 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7602 (get_conditional_internal_fn): Update comment.
7603 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7604 accumulator value as a final argument to conditional functions.
7605 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7606 a define_expand and add an "else" operand. Assert for now that
7607 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7608 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7609 (*cond_<optab><mode>): New patterns.
7610 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7611 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7612 (UNSPEC_COND_EOR): Delete.
7613 (optab): Remove associated mappings.
7614 (SVE_INT_BINARY): New code iterator.
7615 (sve_int_op): Remove int attribute and add "minus" to the code
7616 attribute.
7617 (SVE_COND_INT_OP): Delete.
7618 (SVE_COND_FP_OP): Rename to...
7619 (SVE_COND_FP_BINARY): ...this.
7620
7621 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7622
7623 * optabs.c (can_reuse_operands_p): New function.
7624 (maybe_legitimize_operands): Try to reuse the results for
7625 earlier operands.
7626
7627 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7628
7629 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7630 Add {q} suffix to insn mnemonic.
7631
7632 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7633
7634 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7635 (msp430_warn_func_return): New.
7636
7637 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7638
7639 * fold-const.c (tree_nonzero_bits): New function.
7640 * fold-const.h (tree_nonzero_bits): Likewise.
7641 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7642 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7643
7644 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7645
7646 PR target/85900
7647 PR target/85345
7648 * varasm.c (assemble_alias): Check ifunc_resolver only on
7649 FUNCTION_DECL.
7650
7651 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7652
7653 PR target/85903
7654 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7655 when memory input operand is handled.
7656
7657 2018-05-24 Luis Machado <luis.machado@linaro.org>
7658
7659 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7660 global.
7661 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7662
7663 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7664
7665 * match.pd: Delay FMA folds until after vectorization.
7666
7667 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7668
7669 PR target/83009
7670 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7671 address check not strict.
7672
7673 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7674
7675 * gimple-match.h (gimple_match_op): New class.
7676 (mprts_hook): Replace parameters with a gimple_match_op *.
7677 (maybe_build_generic_op): Likewise.
7678 (gimple_simplified_result_is_gimple_val): Replace parameters with
7679 a const gimple_match_op *.
7680 (gimple_simplify): Replace code_helper * and tree * parameters with
7681 a gimple_match_op * parameter.
7682 (gimple_resimplify1): Replace code_helper *, tree and tree *
7683 parameters with a gimple_match_op * parameter.
7684 (gimple_resimplify2): Likewise.
7685 (gimple_resimplify3): Likewise.
7686 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7687 parameters with a gimple_match_op * parameter.
7688 * gimple-match-head.c (gimple_simplify): Change prototypes of
7689 auto-generated functions to take a gimple_match_op * instead of
7690 separate code_helper * and tree * parameters. Make the same
7691 change in the top-level overload and update calls to the
7692 gimple_resimplify routines. Update calls to the auto-generated
7693 functions and to maybe_push_res_to_seq in the publicly-facing
7694 operation-specific gimple_simplify overloads.
7695 (gimple_match_op::MAX_NUM_OPS): Define.
7696 (gimple_resimplify1): Replace rcode and ops with a single res_op
7697 parameter. Update call to gimple_simplify.
7698 (gimple_resimplify2): Likewise.
7699 (gimple_resimplify3): Likewise.
7700 (mprts_hook): Replace parameters with a gimple_match_op *.
7701 (maybe_build_generic_op): Likewise.
7702 (build_call_internal): Replace type, nargs and ops with
7703 a gimple_match_op *.
7704 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7705 with a single gimple_match_op *. Update calls to mprts_hook,
7706 build_call_internal and gimple_simplified_result_is_gimple_val.
7707 Factor out code that is common to the tree_code and combined_fn cases.
7708 * genmatch.c (expr::gen_transform): Replace tem_code and
7709 tem_ops with a gimple_match_op called tem_op. Update calls
7710 to the gimple_resimplify functions and maybe_push_res_to_seq.
7711 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7712 res_ops. Update call to the gimple_resimplify functions.
7713 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7714 (decision_tree::gen): Make the functions take a gimple_match_op *
7715 called res_op instead of separate res_code and res_ops parameters.
7716 Update call accordingly.
7717 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7718 and ops with a single res_op parameter. Update calls to
7719 maybe_build_generic_op and maybe_push_res_to_seq.
7720 (fold_stmt_1): Update calls to gimple_simplify and
7721 replace_stmt_with_simplification.
7722 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7723 and gimple_simplified_result_is_gimple_val.
7724 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7725 gimple_simplify.
7726 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7727 with a gimple_match_op *.
7728 (vn_nary_build_or_lookup): Likewise. Update call to
7729 vn_nary_build_or_lookup_1.
7730 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7731 gimple_match_op *. Update calls to the gimple_resimplify routines
7732 and to gimple_simplified_result_is_gimple_val.
7733 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7734 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7735 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7736 (visit_nary_op): Likewise.
7737 (visit_reference_op_load): Likewise.
7738
7739 2018-05-23 Luis Machado <luis.machado@linaro.org>
7740
7741 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7742 modifier for printing the step amount.
7743
7744 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7745
7746 PR target/78849
7747 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7748 types.
7749
7750 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7751
7752 * doc/sourcebuild.texi (Endianness): New subsubsection.
7753
7754 2018-05-23 Luis Machado <luis.machado@linaro.org>
7755
7756 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7757 <prefetch_dynamic_strides>: New const bool field.
7758 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7759 prefetch_dynamic_strides.
7760 (exynosm1_prefetch_tune): Likewise.
7761 (thunderxt88_prefetch_tune): Likewise.
7762 (thunderx_prefetch_tune): Likewise.
7763 (thunderx2t99_prefetch_tune): Likewise.
7764 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7765 false.
7766 (aarch64_override_options_internal): Update to set
7767 PARAM_PREFETCH_DYNAMIC_STRIDES.
7768 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7769 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7770 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7771 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7772 prefetch-dynamic-strides setting.
7773
7774 2018-05-23 Luis Machado <luis.machado@linaro.org>
7775
7776 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7777 <minimum_stride>: New const int field.
7778 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7779 minimum_stride field defaulting to -1.
7780 (exynosm1_prefetch_tune): Likewise.
7781 (thunderxt88_prefetch_tune): Likewise.
7782 (thunderx_prefetch_tune): Likewise.
7783 (thunderx2t99_prefetch_tune): Likewise.
7784 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7785 <default_opt_level>: Set to 3.
7786 (aarch64_override_options_internal): Update to set
7787 PARAM_PREFETCH_MINIMUM_STRIDE.
7788 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7789 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7790 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7791 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7792 stride is constant and is below the minimum stride threshold.
7793
7794 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7795
7796 * config/arm/arm-cpus.in (mode26): Delete.
7797 (armv4): Delete mode26 reference.
7798 * config/arm/arm.c (arm_configure_build_target): Delete use of
7799 isa_bit_mode26.
7800
7801 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7802
7803 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7804 New insn pattern.
7805 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7806 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7807 for non-SSE modes.
7808 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7809 (floatunsdidf2): Ditto.
7810
7811 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7812
7813 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7814 (fixuns_trunc<mode>si2_avx512f): Ditto.
7815 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7816 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7817 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7818
7819 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7820
7821 PR rtl-optimization/79985
7822 * df-scan.c (df_insn_refs_collect): Remove special case for
7823 global registers and asm statements.
7824
7825 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7826
7827 * extend.texi (Global Register Variables): Rewrite the bullet list.
7828 Note that the register is available for allocation. Note that access
7829 via inline asm must use constraints. Add note about async-signal
7830 handlers. Remove paragraph about automagic register selection.
7831
7832 2018-05-23 Richard Biener <rguenther@suse.de>
7833
7834 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7835 of fixed offset from memset VN.
7836
7837 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7838
7839 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7840 first_interp field.
7841 (alloc_cand_and_find_basis): Initialize first_interp field.
7842 (slsr_process_mul): Modify first_interp field.
7843 (slsr_process_add): Likewise.
7844 (slsr_process_cast): Modify first_interp field for each new
7845 interpretation.
7846 (slsr_process_copy): Likewise.
7847 (dump_candidate): Dump first_interp field.
7848 (replace_mult_candidate): Process all interpretations, not just
7849 subsequent ones.
7850 (replace_rhs_if_not_dup): Likewise.
7851 (replace_one_candidate): Likewise.
7852
7853 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7854
7855 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7856 Add new boolean.
7857 (aarch64_needs_frame_chain): New function.
7858 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7859
7860 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7861
7862 PR target/84882
7863 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7864 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7865 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7866 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7867 as true for strict-align.
7868 (aarch64_can_inline_p): Perform checks even when callee has no
7869 attributes to check for strict alignment.
7870 * doc/extend.texi (AArch64 Function Attributes): Document
7871 no-strict-align.
7872 * doc/invoke.texi: (AArch64 Options): Likewise.
7873
7874 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7875
7876 PR tree-optimization/85853
7877 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7878 the handling of the root of the node to...
7879 (vect_slp_analyze_node_operations_1): ...this new function,
7880 and run the whole thing with the child nodes' def types
7881 set according to their SLP node's def type.
7882
7883 2018-05-23 Richard Biener <rguenther@suse.de>
7884
7885 PR middle-end/85874
7886 * tree-data-ref.c (create_runtime_alias_checks): Defer
7887 and ignore overflow warnings.
7888
7889 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7890
7891 PR tree-optimization/85822
7892 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7893 constants.
7894
7895 2018-05-23 Richard Biener <rguenther@suse.de>
7896
7897 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7898 memset constants via native_interpret_expr.
7899
7900 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7901
7902 PR target/85345
7903 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7904 attribute.
7905 (cgraph_node::create_alias): Likewise.
7906 (cgraph_node::get_availability): Check ifunc_resolver instead
7907 of looking up ifunc attribute.
7908 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7909 * varasm.c (do_assemble_alias): Likewise.
7910 (assemble_alias): Likewise.
7911 (default_binds_local_p_3): Likewise.
7912 * cgraph.h (cgraph_node): Add ifunc_resolver.
7913 (cgraph_node::only_called_directly_or_aliased_p): Return false
7914 for IFUNC resolver.
7915 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7916 attribute.
7917 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7918 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7919 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7920 instead of looking up ifunc attribute.
7921
7922 2018-05-22 Luis Machado <luis.machado@linaro.org>
7923
7924 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7925
7926 2018-05-22 Martin Sebor <msebor@redhat.com>
7927
7928 PR middle-end/85359
7929 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
7930 only when expasion succeeds.
7931 (expand_builtin_strcmp): Same.
7932 (expand_builtin_strncmp): Same.
7933
7934 2018-05-22 Martin Sebor <msebor@redhat.com>
7935
7936 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
7937
7938 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7939 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7940
7941 * config/aarch64/aarch64-ldpstp.md: Replace uses of
7942 aarch64_mem_pair_operand with memory_operand and delete operand swapping
7943 code.
7944 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7945 Add check for legitimate_address.
7946 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
7947 (aarch64_swap_ldrstr_operands): New.
7948 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
7949 Define prototype.
7950
7951 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
7952 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7953
7954 * config/aarch64/aarch64.md: New patterns to generate stp
7955 and ldp.
7956 (store_pair_sw, store_pair_dw): New patterns to generate stp for
7957 single words and double words.
7958 (load_pair_sw, load_pair_dw): Likewise.
7959 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
7960 Delete.
7961 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
7962 Delete.
7963 * config/aarch64/aarch64-ldpstp.md: Modify peephole
7964 for different mode ldpstp and add peephole for merged zero stores.
7965 Likewise for loads.
7966 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
7967 Add size check.
7968 (aarch64_gen_store_pair): Rename calls to match new patterns.
7969 (aarch64_gen_load_pair): Rename calls to match new patterns.
7970 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
7971 (load_pair<DREG:mode><DREG2:mode>): ... This.
7972 (store_pair<mode>): Rename to...
7973 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
7974 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
7975 New mode iterators.
7976 (V_INT_EQUIV): Handle SImode.
7977 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
7978 New predicate.
7979
7980 2018-05-22 Martin Sebor <msebor@redhat.com>
7981
7982 PR c/85623
7983 * calls.c (maybe_warn_nonstring_arg): Use string length to set
7984 or ajust the presumed bound on an operation to avoid unnecessary
7985 warnings.
7986
7987 2018-05-22 Martin Sebor <msebor@redhat.com>
7988
7989 PR tree-optimization/85826
7990 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
7991 assuming that a DECL necesarily has a constant size.
7992
7993 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
7994
7995 PR middle-end/85862
7996 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
7997
7998 2018-05-22 Richard Biener <rguenther@suse.de>
7999
8000 PR tree-optimization/85834
8001 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8002 non-constant and non-zero memset arguments.
8003
8004 2018-05-22 Martin Liska <mliska@suse.cz>
8005
8006 PR ipa/85607
8007 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8008
8009 2018-05-22 Richard Biener <rguenther@suse.de>
8010
8011 PR tree-optimization/85863
8012 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8013 comparisons when vectype is specified.
8014 (vectorizable_condition): Do not specify vectype for
8015 vect_is_simple_cond when SLP vectorizing.
8016
8017 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8018
8019 PR target/85657
8020 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8021 define __ibm128 as long double.
8022 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8023 as a distinct type when IEEE 128-bit support is enabled.
8024 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8025 128-bit types to use the correct functions.
8026 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8027 convert between 128-bit floating point types that have different
8028 modes but the same representation, instead of using gen_lowpart to
8029 makean alias.
8030 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8031 KFmode.
8032 (IFKF_reg): New attributes to give the register constraints for
8033 IFmode and KFmode.
8034 (extend<mode>tf2_internal): New insns to mark an explicit
8035 conversion between 128-bit floating point types that have a
8036 different mode but share the same representation.
8037
8038 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8039
8040 PR tree-optimization/85814
8041 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8042 a null return from get_strinfo when unsharing the next
8043 strinfo in the chain.
8044
8045 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8046
8047 PR gcc/84923
8048 * varasm.c (weak_finish): Clean up weak_decls.
8049
8050 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8051
8052 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8053 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8054 UNSPEC_UADALP values.
8055 * config/aarch64/iterators.md (ABAL): New int iterator.
8056 (ABDL2): Likewise.
8057 (ADALP): Likewise.
8058 (sur): Add mappings for the above.
8059 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8060 New define_insn.
8061 (aarch64_<sur>abal<mode>_4): Likewise.
8062 (aarch64_<sur>adalp<mode>_3): Likewise.
8063 (<sur>sadv16qi): New define_expand.
8064
8065 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8066
8067 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8068 (*movdf_internal): Ditto.
8069 (*rcpsf2_sse): Ditto.
8070 (*rsqrtsf2_sse): Ditto.
8071 (*sqrt<mode>2_sse): Ditto.
8072
8073 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8074
8075 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8076 eor3q<mode>4.
8077 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8078 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8079 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8080 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8081 vbcaxq_s64): New.
8082 * config/aarch64/arm_neon.h: Likewise.
8083 * config/aarch64/iterators.md (VQ_I): New.
8084
8085 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8086
8087 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8088 arc*-*-linux*.
8089 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8090 MULTILIB_DIRNAMES
8091
8092 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8093
8094 * config/nds32/constraints.md (S): New constraint.
8095 * config/nds32/nds32.md (call_internal): Use constraint S.
8096 (call_value_internal): Likewise.
8097 (sibcall_internal): Likewise.
8098 (sibcall_value_internal): Likewise.
8099
8100 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8101 Chung-Ju Wu <jasonwucj@gmail.com>
8102
8103 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8104 into consideration.
8105
8106 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8107 Chung-Ju Wu <jasonwucj@gmail.com>
8108
8109 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8110 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8111 (nds32_rtx_costs_impl): Simplify.
8112 (nds32_address_cost_impl): Simplify.
8113 (nds32_init_rtx_costs): New function.
8114 (nds32_rtx_costs_speed_prefer): Likewise.
8115 (nds32_rtx_costs_size_prefer): Likewise.
8116 (nds32_address_cost_speed_prefer): Likewise.
8117 (nds32_address_cost_speed_fwprop): Likewise.
8118 (nds32_address_cost_size_prefer): Likewise.
8119 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8120 * config/nds32/nds32.c (nds32_option_override): Use
8121 nds32_init_rtx_costs function.
8122
8123 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8124
8125 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8126 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8127 (TARGET_PIPELINE_N8): Likewise.
8128 (TARGET_PIPELINE_N10): Likewise.
8129 (TARGET_PIPELINE_N13): Likewise.
8130 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8131
8132 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8133
8134 * config/nds32/nds32-fpu.md: Update copyright year.
8135
8136 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8137
8138 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8139
8140 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8141
8142 * config/nds32/nds32.c
8143 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8144 * config/nds32/nds32.opt (minline-asm-r15): New option.
8145
8146 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8147
8148 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8149 MASK_HW_ABS.
8150 * config/nds32/nds32.md (abssi2): New pattern.
8151
8152 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8153
8154 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8155 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8156 Merge insn pattern from sse_cvtsi2ss<round_name> and
8157 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8158 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8159 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8160 using SWI48 mode iterator.
8161 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8162 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8163 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8164 pattern from sse_cvttss2si<round_saeonly_name>
8165 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8166 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8167 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8168 using SWI48 mode iterator.
8169 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8170 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8171 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8172 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8173 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8174 using SWI48 mode iterator.
8175 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8176 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8177 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8178 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8179 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8180 SWI48 mode iterator.
8181 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8182 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8183 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8184 pattern from sse_cvttsd2si<round_saeonly_name>
8185 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8186
8187 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8188
8189 * config/nds32/nds32-md-auxiliary.c
8190 (nds32_valid_smw_lwm_base_p): Refine.
8191 (nds32_output_smw_single_word): Refine.
8192 (nds32_output_smw_double_word): New.
8193 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8194
8195 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8196
8197 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8198 (nds32_output_stack_pop): Refine.
8199 (nds32_expand_unaligned_load): Refine.
8200 (nds32_expand_unaligned_store): Refine.
8201
8202 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8203 Chung-Ju Wu <jasonwucj@gmail.com>
8204
8205 * config/nds32/constants.md: Add TP_REGNUM constant.
8206 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8207 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8208 UNSPEC_ADD32.
8209 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8210 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8211 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8212 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8213 and PIC code generation.
8214 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8215 code generation.
8216 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8217 optimization.
8218 * config/nds32/nds32.md: Support TLS and PIC.
8219 * config/nds32/nds32.c: Support TLS and PIC.
8220 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8221 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8222 predicate.
8223
8224 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8225
8226 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8227 mode with E_ prefix.
8228
8229 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8230 Chung-Ju Wu <jasonwucj@gmail.com>
8231
8232 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8233 * config/nds32/nds32-md-auxiliary.c
8234 (symbolic_reference_mentioned_p): New.
8235 (nds32_legitimize_ict_address): New.
8236 (nds32_expand_ict_move): New.
8237 (nds32_indirect_call_referenced_p): New.
8238 (nds32_symbol_binds_local_p): Delete.
8239 (nds32_long_call_p): Modify.
8240 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8241 * config/nds32/nds32-protos.h
8242 (symbolic_reference_mentioned_p): Declare.
8243 (nds32_legitimize_ict_address): Declare.
8244 (nds32_expand_ict_move): Declare.
8245 (nds32_indirect_call_referenced_p): Declare.
8246 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8247 (nds32_relax_group): Use nds32_ict_const_p as condition.
8248 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8249 (nds32_asm_file_start): Output ict_model directive in asm code.
8250 (nds32_legitimate_address_p): Consider indirect call.
8251 (nds32_print_operand): Consider indirect call.
8252 (nds32_print_operand_address): Consider indirect call.
8253 (nds32_insert_attributes): Handle "indirect_call" attribute.
8254 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8255 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8256 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8257 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8258 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8259 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8260 (TARGET_ICT_MODEL_SMALL): Define.
8261 (TARGET_ICT_MODEL_LARGE): Define.
8262 * config/nds32/nds32.md (movsi): Consider ict model.
8263 (call, call_value): Consider ict model.
8264 (sibcall, sibcall_value): Consider ict model.
8265 * config/nds32/nds32.opt (mict-model): New option.
8266 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8267 model.
8268
8269 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8270 Monk Chiang <sh.chiang04@gmail.com>
8271 Jim Wilson <jimw@sifive.com>
8272
8273 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8274 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8275 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8276 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8277 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8278 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8279 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8280 compute save_libcall_adjustment properly.
8281 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8282 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8283 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8284 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8285 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8286 (ABI_SPEC): Handle mabi=ilp32e.
8287 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8288 (RVE): Add RVE mask.
8289 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8290 <-march>: Add rv32e as an example.
8291
8292 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8293
8294 PR c++/82899
8295 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8296 (intra_create_variable_infos): Handle C++ constructors.
8297
8298 2018-05-18 Martin Liska <mliska@suse.cz>
8299
8300 * passes.def: Remove a redundant pass.
8301
8302 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8303
8304 PR bootstrap/85838
8305 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8306
8307 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8308
8309 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8310 (ARMv4): Update.
8311 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8312 (ARMv6m): Update.
8313 (armv2, armv2a, armv3, armv3m): Delete architectures.
8314 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8315 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8316 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8317 Delete cpus.
8318 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8319 (*mulsidi3adddi): Likewise.
8320 (mulsidi3): Likewise.
8321 (*mulsidi3_nov6): Likewise.
8322 (umulsidi3): Likewise.
8323 (umulsidi3_nov6): Likewise.
8324 (umaddsidi4): Likewise.
8325 (*umulsidi3adddi): Likewise.
8326 (smulsi3_highpart): Likewise.
8327 (*smulsi3_highpart_nov6): Likewise.
8328 (umulsi3_highpart): Likewise.
8329 (*umulsi3_highpart_nov6): Likewise.
8330 * config/arm/arm.h (arm_arch3m): Delete.
8331 * config/arm/arm.c (arm_arch3m): Delete.
8332 (arm_option_override_internal): Update armv3-related comment.
8333 (arm_configure_build_target): Delete use of isa_bit_mode32.
8334 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8335 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8336 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8337 (mulsa3): Likewise.
8338 (mulusa3): Likewise.
8339 * config/arm/arm-protos.h (arm_arch3m): Delete.
8340 * config/arm/arm-tables.opt: Regenerate.
8341 * config/arm/arm-tune.md: Likewise.
8342 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8343 deleted architectures.
8344
8345 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8346
8347 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8348 (armv5t, armv5te): New features.
8349 (ARMv5, ARMv5e): Delete fgroups.
8350 (ARMv5t, ARMv5te): Adjust for above changes.
8351 (ARMv6m): Likewise.
8352 (armv5, armv5e): Delete arches.
8353 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8354 arm_arch5.
8355 (*call_reg_arm): Likewise.
8356 (*call_value_reg_armv5): Likewise.
8357 (*call_value_reg_arm): Likewise.
8358 (*call_symbol): Likewise.
8359 (*call_value_symbol): Likewise.
8360 (*sibcall_insn): Likewise.
8361 (*sibcall_value_insn): Likewise.
8362 (clzsi2): Likewise.
8363 (prefetch): Likewise.
8364 (define_split and define_peephole2 dependent on arm_arch5):
8365 Likewise.
8366 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8367 arm_arch5e.
8368 (TARGET_ARM_QBIT): Likewise.
8369 (TARGET_DSP_MULTIPLY): Likewise.
8370 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8371 (arm_arch5, arm_arch5e): Delete.
8372 (arm_arch5t, arm_arch5te): Declare.
8373 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8374 (arm_arch5t): Declare.
8375 (arm_option_reconfigure_globals): Update for the above.
8376 (arm_options_perform_arch_sanity_checks): Update comment, replace
8377 use of arm_arch5 with arm_arch5t.
8378 (use_return_insn): Likewise.
8379 (arm_emit_call_insn): Likewise.
8380 (output_return_instruction): Likewise.
8381 (arm_final_prescan_insn): Likewise.
8382 (arm_coproc_builtin_available): Likewise.
8383 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8384 arm_arch5e with arm_arch5t and arm_arch5te.
8385 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8386 (arm_arch5t, arm_arch5te): Declare.
8387 * config/arm/arm-tables.opt: Regenerate.
8388 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8389 * config/arm/t-multilib: Likewise.
8390 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8391 instead of arm_arch5.
8392 (*call_reg_thumb1): Likewise.
8393 (*call_value_reg_thumb1_v5): Likewise.
8394 (*call_value_reg_thumb1): Likewise.
8395 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8396 unreachable path.
8397 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8398
8399 2018-05-18 Martin Liska <mliska@suse.cz>
8400
8401 PR gcov-profile/84846
8402 * doc/gcov.texi: Document -t option of gcov tool.
8403
8404 2018-05-18 Martin Liska <mliska@suse.cz>
8405
8406 PR gcov-profile/84846
8407 * gcov.c (print_usage): Add new -t option.
8408 (process_args): Handle the option.
8409 (generate_results): Use stdout as output when requested by
8410 the option.
8411
8412 2018-05-18 Martin Liska <mliska@suse.cz>
8413
8414 PR gcov-profile/84846
8415 * coverage.c (coverage_init): Write PWD to .gcno file.
8416 * doc/gcov.texi: Document how working directory is printed.
8417 * gcov-dump.c (dump_gcov_file): Print PWD.
8418 * gcov.c (output_intermediate_file): Likewise.
8419 (read_graph_file): Read PWD string.
8420 (output_lines): Print PWD.
8421
8422 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8423
8424 PR middle-end/85817
8425 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8426 for retval and return false if all args to phi are zero.
8427
8428 2018-05-18 Richard Biener <rguenther@suse.de>
8429
8430 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8431 method.
8432 (evrp_dom_walker::before_dom_children): Call it.
8433
8434 2018-05-18 Richard Biener <rguenther@suse.de>
8435
8436 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8437 results when processing array refs with variable index.
8438
8439 2018-05-18 Toon Moene <toon@moene.org>
8440
8441 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8442 directly after that of -floop-interchange. Indicate that both
8443 options are enabled by default when specifying -O3.
8444
8445 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8446
8447 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8448 iterator. Delete separate integer-mode vec_set<mode> expander.
8449 (aarch64_simd_vec_setv2di): Delete.
8450 (vec_setv2di): Delete.
8451 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8452 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8453 the "w, r" alternative.
8454
8455 2018-05-18 Martin Liska <mliska@suse.cz>
8456
8457 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8458 * tree-pass.h (make_pass_lower_switch_O0): New function.
8459 * tree-switch-conversion.c (node_has_low_bound): Remove.
8460 (node_has_high_bound): Likewise.
8461 (node_is_bounded): Likewise.
8462 (class pass_lower_switch): Make it a template type and create
8463 two instances.
8464 (pass_lower_switch::execute): Add template argument.
8465 (make_pass_lower_switch): New function.
8466 (make_pass_lower_switch_O0): New function.
8467 (do_jump_if_equal): Remove.
8468 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8469 all the hard work to tree optimization passes.
8470
8471 2018-05-18 Martin Liska <mliska@suse.cz>
8472
8473 * dbgcnt.c (limit_low): Renamed from limit.
8474 (limit_high): New variable.
8475 (dbg_cnt_is_enabled): Check for upper limit.
8476 (dbg_cnt): Adjust dumping.
8477 (dbg_cnt_set_limit_by_index): Add new argument for high
8478 value.
8479 (dbg_cnt_set_limit_by_name): Likewise.
8480 (dbg_cnt_process_single_pair): Parse new format.
8481 (dbg_cnt_process_opt): Use strtok.
8482 (dbg_cnt_list_all_counters): Remove 'value' and add
8483 'limit_high'.
8484 * doc/invoke.texi: Document changes.
8485
8486 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8487
8488 * doc/sourcebuild.texi (scalar_all_fma): Document.
8489 * tree.def (FMA_EXPR): Delete.
8490 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8491 * internal-fn.c (ternary_direct): New macro.
8492 (expand_ternary_optab_fn): Likewise.
8493 (direct_ternary_optab_supported_p): Likewise.
8494 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8495 * builtins.c (fold_builtin_fma): Delete.
8496 (fold_builtin_3): Don't call it.
8497 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8498 * expr.c (expand_expr_real_2): Likewise.
8499 * fold-const.c (operand_equal_p): Likewise.
8500 (fold_ternary_loc): Likewise.
8501 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8502 * gimple.c (DEFTREECODE): Likewise.
8503 * gimplify.c (gimplify_expr): Likewise.
8504 * optabs-tree.c (optab_for_tree_code): Likewise.
8505 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8506 * tree-eh.c (operation_could_trap_p): Likewise.
8507 (stmt_could_throw_1_p): Likewise.
8508 * tree-inline.c (estimate_operator_cost): Likewise.
8509 * tree-pretty-print.c (dump_generic_node): Likewise.
8510 (op_code_prio): Likewise.
8511 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8512 * tree-ssa-operands.c (get_expr_operands): Likewise.
8513 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8514 * fold-const-call.h (fold_fma): Delete.
8515 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8516 CFN_FNMA and CFN_FNMS.
8517 (fold_fma): Delete.
8518 * genmatch.c (combined_fn): New enum.
8519 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8520 (commutative_op): New function.
8521 (commutate): Use it. Handle more than 2 operands.
8522 (dt_operand::gen_gimple_expr): Use commutative_op.
8523 (parser::parse_expr): Allow :c to be used with non-binary
8524 operators if the commutative operand is known.
8525 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8526 CFN_FMS, CFN_FNMA and CFN_FNMS.
8527 (backprop::process_assign_use): Remove FMA_EXPR handling.
8528 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8529 (gen_hsa_fma): New function.
8530 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8531 IFN_FNMA and IFN_FNMS.
8532 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8533 * gimple-fold.h (follow_all_ssa_edges): Declare.
8534 * gimple-fold.c (follow_all_ssa_edges): New function.
8535 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8536 gimple_build interface and use follow_all_ssa_edges to fold the result.
8537 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8538 instead of checking for optabs directly.
8539 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8540 rather than FMA_EXPRs.
8541 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8542 call to IFN_FMA instead of an FMA_EXPR.
8543
8544 2018-05-17 Jim Wilson <jimw@sifive.com>
8545
8546 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8547 sign extended promoted subreg, and the range does not have the sign bit
8548 set, then do a sign extend.
8549
8550 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8551 test, check for sign extended subreg and/or constant operands, and
8552 do a sign extend in that case.
8553
8554 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8555
8556 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8557 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8558 Add untyped.
8559 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8560 Change logics_shift_reg to logics_shift_imm.
8561 (thunderx2t99_fp_loadpair_basic): Delete.
8562 (thunderx2t99_fp_storepair_basic): Delete.
8563 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8564 (thunderx2t99_asimd_polynomial): Delete.
8565 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8566 and neon_fp_mul_d_scalar_q.
8567 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8568 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8569 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8570 (thunderx2t99_asimd_lut): Add missing tbl types.
8571 (thunderx2t99_asimd_ext): Delete.
8572 (thunderx2t99_asimd_load1_1_mult): Delete.
8573 (thunderx2t99_asimd_load1_2_mult): Delete.
8574 (thunderx2t99_asimd_load1_ldp): New.
8575 (thunderx2t99_asimd_load1): New.
8576 (thunderx2t99_asimd_load2): Add missing *load2* types.
8577 (thunderx2t99_asimd_load3): New.
8578 (thunderx2t99_asimd_load4): New.
8579 (thunderx2t99_asimd_store1_1_mult): Delete.
8580 (thunderx2t99_asimd_store1_2_mult): Delete.
8581 (thunderx2t99_asimd_store2_mult): Delete.
8582 (thunderx2t99_asimd_store2_onelane): Delete.
8583 (thunderx2t99_asimd_store_stp): New.
8584 (thunderx2t99_asimd_store1): New.
8585 (thunderx2t99_asimd_store2): New.
8586 (thunderx2t99_asimd_store3): New.
8587 (thunderx2t99_asimd_store4): New.
8588
8589 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8590
8591 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8592 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8593
8594 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8595 Segher Boessenkool <segher@kernel.crashing.org>
8596
8597 PR target/85698
8598 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8599 operand.
8600
8601 2018-05-17 Richard Biener <rguenther@suse.de>
8602
8603 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8604 for pruning loop and prune defs feeding only already visited PHIs.
8605
8606 2018-05-17 Richard Biener <rguenther@suse.de>
8607
8608 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8609
8610 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8611 Richard Biener <rguenther@suse.de>
8612
8613 PR tree-optimization/85793
8614 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8615 for VMAT_ELEMENTWISE.
8616
8617 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8618
8619 * internal-fn.h (lookup_internal_fn): Declare
8620 * internal-fn.c (lookup_internal_fn): New function.
8621 * gimple.c (gimple_build_call_from_tree): Handle calls to
8622 internal functions.
8623 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8624 internal function names.
8625 * tree-pretty-print.c (dump_generic_node): Likewise.
8626 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8627
8628 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8629
8630 * gimple-fold.h (gimple_build): Make the function forms take
8631 combined_fn rather than built_in_function.
8632 (gimple_simplify): Likewise.
8633 * gimple-match-head.c (gimple_simplify): Likewise.
8634 * gimple-fold.c (gimple_build): Likewise.
8635 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8636 rather than gimple_build_call_internal.
8637 (get_initial_defs_for_reduction): Likewise.
8638 (vect_create_epilog_for_reduction): Likewise.
8639 (vectorizable_live_operation): Likewise.
8640
8641 2018-05-17 Martin Liska <mliska@suse.cz>
8642
8643 * gimple-ssa-sprintf.c (format_directive): Do not use
8644 space in between 'G_' and '('.
8645
8646 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8647
8648 PR target/85323
8649 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8650 even if the mask is not all ones.
8651
8652 PR target/85323
8653 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8654 vector.
8655 (ix86_gimple_fold_builtin): Likewise.
8656
8657 PR target/85323
8658 * config/i386/i386.c: Include tree-vector-builder.h.
8659 (ix86_vector_shift_count): New function.
8660 (ix86_fold_builtin): Fold shift builtins by scalar count.
8661 (ix86_gimple_fold_builtin): Likewise.
8662
8663 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8664 _mm512_setzero): New intrinsics.
8665
8666 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8667 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8668
8669 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8670 code generation for cases where splatting a value is not useful.
8671 * simplify-rtx.c (simplify_ternary_operation): Simplify
8672 vec_merge across a vec_duplicate and a paradoxical subreg forming
8673 a vector mode to a vec_concat.
8674
8675 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8676
8677 * config.gcc: Support "goldmont-plus".
8678 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8679 "goldmont-plus".
8680 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8681 PROCESSOR_GOLDMONT_PLUS.
8682 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8683 (processor_target_table): Add "goldmont-plus".
8684 (PTA_GOLDMONT_PLUS): Define.
8685 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8686 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8687 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8688 (fold_builtin_cpu): Add "goldmont-plus".
8689 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8690 (ix86_option_override_internal): Add "goldmont-plus".
8691 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8692 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8693 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8694 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8695
8696 2018-05-17 Richard Biener <rguenther@suse.de>
8697
8698 PR tree-optimization/85757
8699 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8700 remove defs that only feed that PHI from further processing.
8701
8702 2018-05-16 Jim Wilson <jimw@sifive.com>
8703
8704 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8705 asterisk to name.
8706 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8707
8708 2018-05-16 Mark Wielaard <mark@klomp.org>
8709
8710 * dwarf2out.c (count_index_strings): New function.
8711 (output_indirect_strings): Call count_index_strings and generate
8712 header for dwarf_version >= 5.
8713
8714 2018-05-16 Mark Wielaard <mark@klomp.org>
8715
8716 * dwarf2out.c (dwarf_FORM): New function.
8717 (set_indirect_string): Use dwarf_FORM.
8718 (reset_indirect_string): Likewise.
8719 (size_of_die): Likewise.
8720 (value_format): Likewise.
8721 (output_die): Likewise.
8722 (add_skeleton_AT_string): Likewise.
8723 (output_macinfo_op): Likewise.
8724 (index_string): Likewise.
8725 (output_index_string_offset): Likewise.
8726 (output_index_string): Likewise.
8727 (count_index_strings): Likewise.
8728
8729 2018-05-16 Carl Love <cel@us.ibm.com>
8730
8731 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8732 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8733
8734 2018-05-16 Martin Jambor <mjambor@suse.cz>
8735
8736 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8737 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8738
8739 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8740
8741 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8742 (fnma<mode>4): Likewise.
8743 (fms<mode>4): Likewise.
8744 (fnms<mode>4): Likewise.
8745 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8746 (aarch64_fnma<mode>4): Likewise.
8747 (aarch64_fms<mode>4): Likewise.
8748 (aarch64_fnms<mode>4): Likewise.
8749 (aarch64_fnmadd<mode>4): Likewise.
8750
8751 2018-05-16 Jason Merrill <jason@redhat.com>
8752
8753 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8754
8755 2018-05-16 Richard Biener <rguenther@suse.de>
8756
8757 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8758 (dump_stmt_cost): Declare.
8759 (add_stmt_cost): Dump cost we add.
8760 (add_stmt_costs): New function.
8761 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8762 No longer exported.
8763 (vect_analyze_stmt): Adjust prototype.
8764 (vectorizable_condition): Likewise.
8765 (vectorizable_live_operation): Likewise.
8766 (vectorizable_reduction): Likewise.
8767 (vectorizable_induction): Likewise.
8768 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8769 cost vector to pass to vectorizable_ and record afterwards.
8770 (vect_model_reduction_cost): Take cost vector argument and adjust.
8771 (vect_model_induction_cost): Likewise.
8772 (vectorizable_reduction): Likewise.
8773 (vectorizable_induction): Likewise.
8774 (vectorizable_live_operation): Likewise.
8775 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8776 SLP_TREE_NUMBER_OF_VEC_STMTS.
8777 (vect_analyze_slp_cost_1): Remove.
8778 (vect_analyze_slp_cost): Likewise.
8779 (vect_slp_analyze_node_operations): Take visited args and
8780 a target cost vector. Avoid processing already visited stmt sets.
8781 (vect_slp_analyze_operations): Use a local cost vector to gather
8782 costs and register those of non-discarded instances.
8783 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8784 (vect_schedule_slp_instance): Remove copying of
8785 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8786 zero.
8787 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8788 adding cost. Record cost entry location.
8789 (vect_prologue_cost_for_slp_op): Function to compute cost of
8790 a constant or invariant generated for SLP vect in the prologue,
8791 split out from vect_analyze_slp_cost_1.
8792 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8793 (vect_model_promotion_demotion_cost): Likewise.
8794 (vect_model_store_cost): Likewise, make static.
8795 (vect_model_load_cost): Likewise.
8796 (vectorizable_bswap): Add cost vector arg and adjust.
8797 (vectorizable_call): Likewise.
8798 (vectorizable_simd_clone_call): Likewise.
8799 (vectorizable_conversion): Likewise.
8800 (vectorizable_assignment): Likewise.
8801 (vectorizable_shift): Likewise.
8802 (vectorizable_operation): Likewise.
8803 (vectorizable_store): Likewise.
8804 (vectorizable_load): Likewise.
8805 (vectorizable_condition): Likewise.
8806 (vectorizable_comparison): Likewise.
8807 (can_vectorize_live_stmts): Likewise.
8808 (vect_analyze_stmt): Likewise.
8809 (vect_transform_stmt): Adjust calls to vectorizable_*.
8810 * tree-vectorizer.c: Include gimple-pretty-print.h.
8811 (dump_stmt_cost): New function.
8812
8813 2018-05-16 Richard Biener <rguenther@suse.de>
8814
8815 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8816 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8817 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8818 (check_name): New callback.
8819 (dse_classify_store): Track cycles via a visited bitmap of PHI
8820 defs and simplify handling of in-loop and across loop dead stores
8821 and properly fail for loop-variant refs. Handle byte-tracking with
8822 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8823 limiting the walk.
8824
8825 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8826
8827 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8828 (vect_get_mask_type_for_stmt): Likewise.
8829 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8830 split out from...
8831 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8832 to determine the statement's vector type and the vector type that
8833 should be used for calculating nunits. Deal with cases in which
8834 the type has to be deferred.
8835 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8836 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8837 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8838 (vect_determine_vf_for_stmt): New functions, split out from...
8839 (vect_determine_vectorization_factor): ...here.
8840 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8841 (vect_get_mask_type_for_stmt): New functions, split out from
8842 vect_determine_vectorization_factor.
8843
8844 2018-05-16 Richard Biener <rguenther@suse.de>
8845
8846 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8847 verify the [VEC_]COND_EXPR embedded comparison.
8848
8849 2018-05-15 Martin Sebor <msebor@redhat.com>
8850
8851 PR tree-optimization/85753
8852 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8853 RECORD_TYPE in addition to ARRAY_TYPE.
8854
8855 2018-05-15 Martin Sebor <msebor@redhat.com>
8856
8857 PR middle-end/85643
8858 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8859
8860 2018-05-15 Richard Biener <rguenther@suse.de>
8861
8862 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8863 add by_clobber_p one. Change algorithm to collect all defs
8864 representing uses we need to walk and try reducing them to
8865 a single one before failing.
8866 (dse_dom_walker::dse_optimize_stmt): Adjust.
8867
8868 2018-05-13 Mark Wielaard <mark@klomp.org>
8869
8870 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8871 (size_of_loc_descr): Likewise.
8872 (output_loc_operands): Likewise.
8873 (output_loc_operands_raw): Likewise.
8874 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8875 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8876 (hash_loc_operands): Likewise.
8877 (compare_loc_operands): Likewise.
8878
8879 2018-05-14 Mark Wielaard <mark@klomp.org>
8880
8881 * dwarf2out.c (count_index_addrs): New function.
8882 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8883
8884 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8885
8886 PR tree-optimization/83648
8887 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8888 return value as malloc candidate.
8889
8890 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8891
8892 PR ipa/85734
8893 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8894 param as true in call to suggest_attribute.
8895
8896 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8897
8898 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8899 -mreadonly-in-sdata.
8900
8901 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8902
8903 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8904 New pattern.
8905 (aarch64_crypto_aesd_fused): Likewise.
8906
8907 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8908
8909 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8910 (movsi_aarch64): Likewise.
8911 (load_pairsi): Likewise.
8912 (load_pairdi): Likewise.
8913 (store_pairsi): Likewise.
8914 (store_pairdi): Likewise.
8915 (load_pairsf): Likewise.
8916 (load_pairdf): Likewise.
8917 (store_pairsf): Likewise.
8918 (store_pairdf): Likewise.
8919 (zero_extend): Likewise.
8920 (trunc): Swap alternatives.
8921 (fcvt_target): Add '?' to prefer w over r.
8922
8923 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8924
8925 PR target/85756
8926 * config/i386/i386.md: Disallow non-commutative arithmetics in
8927 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
8928 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
8929 in the peephole2 before it.
8930
8931 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
8932
8933 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
8934 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
8935 (ix86_handle_option): Handle -mcldemote.
8936 * config.gcc: New header.
8937 * config/i386/cldemoteintrin.h: New file.
8938 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
8939 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8940 -mcldemote.
8941 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8942 OPTION_MASK_ISA_CLDEMOTE.
8943 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
8944 (ix86_valid_target_attribute_inner_p): Ditto.
8945 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
8946 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
8947 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
8948 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
8949 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
8950 (cldemote): New.
8951 * config/i386/i386.opt: Add -mcldemote.
8952 * config/i386/x86intrin.h: New header.
8953 * doc/invoke.texi: Add -mcldemote.
8954
8955 2018-05-14 Richard Biener <rguenther@suse.de>
8956
8957 * doc/match-and-simplify.texi: Adjust :s documentation.
8958
8959 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
8960
8961 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
8962 intended memcpy size.
8963 (REORDER_45): Likewise.
8964
8965 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
8966
8967 * sort.cc: New file.
8968 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
8969 * vec.c (qsort_chk): Use gcc_qsort.
8970 * Makefile.in (OBJS-libcommon): Add sort.o.
8971 (build/sort.o): New target. Use it...
8972 (BUILD_RTL): ... here, and...
8973 (build/gencfn-macros): ... here, and...
8974 (build/genmatch): ... here.
8975
8976 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8977 Chung-Ju Wu <jasonwucj@gmail.com>
8978
8979 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
8980 * config/nds32/nds32-graywolf.md: New file.
8981 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
8982 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
8983 pipeline.
8984 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
8985 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
8986 * config/nds32/nds32.md (pipeline_model): Add graywolf.
8987 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
8988 * config/nds32/pipelines.md: Include n15 settings.
8989
8990 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
8991 Chung-Ju Wu <jasonwucj@gmail.com>
8992
8993 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
8994 * config/nds32/nds32-n13.md: New file.
8995 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
8996 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
8997 pipeline.
8998 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
8999 * config/nds32/nds32.md (pipeline_model): Add n13.
9000 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9001 * config/nds32/pipelines.md: Include n13 settings.
9002
9003 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9004 Chung-Ju Wu <jasonwucj@gmail.com>
9005
9006 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9007 * config/nds32/nds32-n10.md: New file.
9008 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9009 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9010 pipeline.
9011 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9012 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9013 * config/nds32/nds32.md (pipeline_model): Add n10.
9014 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9015 * config/nds32/pipelines.md: Include n10 settings.
9016
9017 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9018 Kito Cheng <kito.cheng@gmail.com>
9019 Chung-Ju Wu <jasonwucj@gmail.com>
9020
9021 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9022 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9023 Add enum values for DSP extension instructions.
9024 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9025 New constraints.
9026 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9027 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9028 New code iterators.
9029 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9030 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9031 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9032 * config/nds32/nds32-intrinsic.md: Likewise.
9033 * config/nds32/nds32_intrinsic.h: Likewise.
9034 * config/nds32/nds32-md-auxiliary.c: Likewise.
9035 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9036 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9037 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9038 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9039 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9040 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9041 TYPE_DMAC in switch statement.
9042 * config/nds32/nds32.c: New checking and implementation for DSP
9043 extension instructions.
9044 * config/nds32/nds32.h: Likewise.
9045 * config/nds32/nds32.md: Likewise.
9046 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9047 * config/nds32/predicates.md: Implement new predicates for DSP
9048 extension.
9049
9050 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9051
9052 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9053 Reformat alternatives and attributes so it is easier to identify
9054 which constraints/attributes go with which instruction.
9055 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9056 (mov<mode>_softfloat32, FMOVE64): Likewise.
9057 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9058 (mov<mode>_softfloat64, FMOVE64): Likewise.
9059
9060 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9061
9062 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9063 subsection.
9064 (Basic PowerPC Built-in Functions): The new name of the
9065 subsection previously known as "PowerPC Built-in Functions".
9066 (Basic PowerPC Built-in Functions Available on all Configurations):
9067 New subsubsection.
9068 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9069 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9070 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9071 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9072
9073 2018-05-11 Martin Jambor <mjambor@suse.cz>
9074
9075 PR ipa/85655
9076 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9077 single const.
9078
9079 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9080
9081 PR target/85733
9082 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9083
9084 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9085
9086 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9087 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9088 (ix86_handle_option): Handle -mwaitpkg.
9089 * config.gcc: New header.
9090 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9091 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9092 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9093 function type.
9094 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9095 OPTION_MASK_ISA_WAITPKG.
9096 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9097 (ix86_option_override_internal): Add PTA_WAITPKG.
9098 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9099 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9100 IX86_BUILTIN_TPAUSE.
9101 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9102 __builtin_ia32_umwait and __builtin_ia32_tpause.
9103 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9104 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9105 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9106 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9107 UNSPECV_TPAUSE): New.
9108 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9109 * config/i386/i386.opt: Add -mwaitpkg.
9110 * config/i386/waitpkgintrin.h: New file.
9111 * config/i386/x86intrin.h: New header.
9112 * doc/invoke.texi: Add -mwaitpkg.
9113
9114 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9115
9116 PR target/85606
9117 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9118 equivalent.
9119 (cortex-m0): Use armv6s-m isa.
9120 (cortex-m0plus): Likewise.
9121 (cortex-m1): Likewise.
9122 (cortex-m0.small-multiply): Likewise.
9123 (cortex-m0plus.small-multiply): Likewise.
9124 (cortex-m1.small-multiply): Likewise.
9125
9126 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9127 Jakub Jelinek <jakub@redhat.com>
9128
9129 PR tree-optimization/85692
9130 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9131 source permute as well.
9132
9133 2018-05-11 Martin Liska <mliska@suse.cz>
9134
9135 PR sanitizer/85556
9136 * doc/extend.texi: Document LLVM style format for no_sanitize
9137 attribute.
9138
9139 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9140
9141 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9142 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9143 (mode_supports_vsx_dform_quad): Likewise.
9144 (mode_supports_vmx_dform): Move these functions to be next to the
9145 other mode_supports functions.
9146 (mode_supports_dq_form): Likewise.
9147 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9148 mode_supports_dq_form.
9149 (reg_offset_addressing_ok_p): Likewise.
9150 (offsettable_ok_by_alignment): Likewise.
9151 (rs6000_legitimate_offset_address_p): Likewise.
9152 (legitimate_lo_sum_address_p): Likewise.
9153 (rs6000_legitimize_address): Likewise.
9154 (rs6000_legitimize_reload_address): Likewise.
9155 (rs6000_secondary_reload_inner): Likewise.
9156 (rs6000_preferred_reload_class): Likewise.
9157 (rs6000_output_move_128bit): Likewise.
9158
9159 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9160
9161 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9162 Generate SImode target register for null target.
9163 <case IX86_BUILTIN_XGETBV>: Ditto.
9164 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9165 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9166
9167 2018-05-10 Carl Love <cel@us.ibm.com>
9168
9169 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9170 dcbtt and dcbtstt if operands[2] is 0.
9171
9172 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9173
9174 PR target/85693
9175 * config/i386/sse.md (usadv64qi): New expander.
9176
9177 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9178
9179 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9180 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9181 -maltivec=be support.
9182 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9183 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9184 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9185 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9186 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9187 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9188 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9189 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9190 altivec_vsumsws): Adjust.
9191 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9192 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9193 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9194 support.
9195 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9196 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9197 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9198 (altivec_lve<VI_char>x): Delete expand.
9199 (*altivec_lve<VI_char>x_internal): Rename to...
9200 (altivec_lve<VI_char>x): ... this.
9201 (altivec_lvxl_<mode>): Delete expand.
9202 (*altivec_lvxl_<mode>_internal): Rename to ...
9203 (altivec_lvxl_<mode>): ... this.
9204 (altivec_stvxl_<mode>): Delete expand.
9205 (*altivec_stvxl_<mode>_internal): Rename to ...
9206 (altivec_stvxl_<mode>): ... this.
9207 (altivec_stve<VI_char>x): Delete expand.
9208 (*altivec_stve<VI_char>x_internal): Rename to ...
9209 (altivec_stve<VI_char>x): ... this.
9210 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9211 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9212 reduc_plus_scal_<mode>): Adjust.
9213 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9214 comment.
9215 (rs6000_cpu_cpp_builtins): Adjust.
9216 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9217 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9218 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9219 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9220 -maltivec=be support.
9221 (rs6000_split_vec_extract_var): Adjust.
9222 (rs6000_split_v4si_init): Adjust.
9223 (swap_selector_for_mode): Delete.
9224 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9225 altivec_expand_stvex_be): Delete.
9226 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9227 -maltivec=be support.
9228 (rs6000_gimple_fold_builtin): Ditto.
9229 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9230 Adjust.
9231 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9232 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9233 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9234 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9235 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9236 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9237 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9238 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9239 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9240 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9241 anonymous split): Adjust.
9242 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9243 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9244
9245 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9246
9247 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9248 when --with-gxx-include-dir is also specified.
9249 * configure: Regenerate.
9250
9251 2018-05-09 Jim Wilson <jimw@sifive.com>
9252
9253 PR target/84797
9254 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9255 * config/riscv/t-withmultilib: New.
9256 * config/riscv/withmultilib.h: New.
9257 * doc/install.texi: Document RISC-V --with-multilib-list support.
9258
9259 2018-05-09 Richard Biener <rguenther@suse.de>
9260
9261 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9262 vector.
9263 (vect_bb_vectorization_profitable_p): Adjust. Compute
9264 actual scalar cost using the cost vector and the add_stmt_cost
9265 machinery.
9266
9267 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9268
9269 PR rtl-optimization/85645
9270 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9271 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9272
9273 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9274
9275 PR rtl-optimization/85645
9276 * shrink-wrap.c (spread_components): Return a boolean saying if
9277 anything was changed.
9278 (try_shrink_wrapping_separate): Iterate spread_components until
9279 nothing changes anymore.
9280
9281 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9282
9283 PR rtl-optimization/85645
9284 * regrename.c (build_def_use): Also kill the chains that include the
9285 destination of a REG_CFA_REGISTER note.
9286
9287 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9288
9289 PR rtl-optimization/85645
9290 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9291 insn that has a REG_CFA_REGISTER note.
9292
9293 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9294
9295 * cfgexpand.c (expand_clobber): New function.
9296 (expand_gimple_stmt_1): Use it.
9297 * tree-vect-stmts.c (vect_clobber_variable): New function,
9298 split out from...
9299 (vectorizable_simd_clone_call): ...here.
9300 (vectorizable_store): Emit a clobber either side of an
9301 IFN_STORE_LANES sequence.
9302 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9303
9304 2018-05-09 Tom de Vries <tom@codesourcery.com>
9305
9306 PR target/85626
9307 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9308 (define_insn "trap_if_false"): Add exit after trap.
9309
9310 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9311
9312 PR rtl-optimization/85638
9313 * bb-reorder.c: Include common/common-target.h.
9314 (create_forwarder_block): New function extracted from...
9315 (fix_up_crossing_landing_pad): ...here. Rename into...
9316 (dw2_fix_up_crossing_landing_pad): ...this.
9317 (sjlj_fix_up_crossing_landing_pad): New function.
9318 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9319 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9320 from both partitions and exit the loop after one iteration.
9321
9322 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9323
9324 Revert:
9325 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9326 subsection.
9327 (Basic PowerPC Built-in Functions): The new name of the
9328 subsection previously known as "PowerPC Built-in Functions".
9329 (Basic PowerPC Built-in Functions Available on all Configurations):
9330 New subsubsection.
9331 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9332 subsubsection.
9333 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9334 subsubsection.
9335 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9336 subsubsection.
9337 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9338 subsubsection.
9339
9340 2018-05-08 Jim Wilson <jimw@sifive.com>
9341
9342 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9343 (LD_EMUL_SUFFIX): New.
9344 (LINK_SPEC): Use it.
9345
9346 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9347
9348 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9349 subsection.
9350 (Basic PowerPC Built-in Functions): The new name of the
9351 subsection previously known as "PowerPC Built-in Functions".
9352 (Basic PowerPC Built-in Functions Available on all Configurations):
9353 New subsubsection.
9354 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9355 subsubsection.
9356 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9357 subsubsection.
9358 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9359 subsubsection.
9360 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9361 subsubsection.
9362
9363 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9364
9365 PR target/85683
9366 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9367 after cmpelim optimization.
9368
9369 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9370
9371 * config.gcc: Support "goldmont".
9372 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9373 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9374 PROCESSOR_GOLDMONT.
9375 * config/i386/i386.c (m_GOLDMONT): Define.
9376 (processor_target_table): Add "goldmont".
9377 (PTA_GOLDMONT): Define.
9378 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9379 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9380 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9381 (fold_builtin_cpu): Add "goldmont".
9382 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9383 (ix86_option_override_internal): Add "goldmont".
9384 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9385 (processor_type): Add PROCESSOR_GOLDMONT.
9386 * config/i386/i386.md: Add CPU "glm".
9387 * config/i386/glm.md: New file.
9388 * config/i386/x86-tune.def: Add m_GOLDMONT.
9389 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9390
9391 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9392
9393 PR target/85572
9394 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9395 E_V4DImode.
9396 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9397 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9398 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9399
9400 PR target/85317
9401 * config/i386/i386.c (ix86_fold_builtin): Handle
9402 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9403
9404 PR target/85480
9405 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9406 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9407
9408 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9409
9410 PR target/85658
9411 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9412 (check_arch): Likewise.
9413 (check_fpu): Return the result rather than printing it.
9414 (end arch): Fix operator precedence.
9415 (end cpu): Likewise.
9416 (END): Print the result from check_fpu.
9417
9418 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9419 Alan Hayward <alan.hayward@arm.com>
9420 David Sherwood <david.sherwood@arm.com>
9421
9422 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9423 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9424 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9425 (*fcmuo<mode>_and): New patterns.
9426
9427 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9428
9429 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9430 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9431 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9432 (cmp_op, sve_imm_con): New code attributes.
9433 (SVE_COND_INT_CMP, imm_con): Delete.
9434 (cmp_op): Remove above unspecs from int attribute.
9435 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9436 to...
9437 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9438 comparison-specific unspecs.
9439 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9440 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9441 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9442 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9443 (*vec_fcm<cmp_op><mode>): Rename to...
9444 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9445 (*vec_fcmuo<mode>): Rename to...
9446 (*fcmuo<mode>): ...this and adjust likewise.
9447 (*pred_fcm<cmp_op><mode>): New pattern.
9448 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9449 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9450 functions.
9451 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9452 and UNORDERED.
9453 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9454 (aarch64_emit_sve_predicated_cond): New function.
9455 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9456 (aarch64_emit_unspec_cond_or): Replace with...
9457 (aarch64_emit_sve_or_conds): ...this new function. Use
9458 aarch64_emit_sve_ptrue_op for the individual comparisons and
9459 aarch64_emit_binop to OR them together.
9460 (aarch64_emit_inverted_unspec_cond): Replace with...
9461 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9462 aarch64_emit_sve_ptrue_op for the comparison and
9463 aarch64_emit_unop to invert the result.
9464 (aarch64_expand_sve_vec_cmp_float): Update after the above
9465 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9466
9467 2018-05-07 Nathan Sidwell <nathan@acm.org>
9468
9469 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9470 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9471 (Backwards Compatibility): Likewise.
9472
9473 2018-05-07 Luis Machado <luis.machado@linaro.org>
9474
9475 PR bootstrap/85681
9476 Revert:
9477 2018-05-07 Luis Machado <luis.machado@linaro.org>
9478
9479 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9480 <prefetch_dynamic_strides>: New const bool field.
9481 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9482 prefetch_dynamic_strides.
9483 (exynosm1_prefetch_tune): Likewise.
9484 (thunderxt88_prefetch_tune): Likewise.
9485 (thunderx_prefetch_tune): Likewise.
9486 (thunderx2t99_prefetch_tune): Likewise.
9487 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9488 to false.
9489 (aarch64_override_options_internal): Update to set
9490 PARAM_PREFETCH_DYNAMIC_STRIDES.
9491 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9492 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9493 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9494 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9495 prefetch-dynamic-strides setting.
9496
9497 2018-05-07 Luis Machado <luis.machado@linaro.org>
9498
9499 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9500 <minimum_stride>: New const int field.
9501 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9502 minimum_stride field.
9503 (exynosm1_prefetch_tune): Likewise.
9504 (thunderxt88_prefetch_tune): Likewise.
9505 (thunderx_prefetch_tune): Likewise.
9506 (thunderx2t99_prefetch_tune): Likewise.
9507 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9508 (aarch64_override_options_internal): Update to set
9509 PARAM_PREFETCH_MINIMUM_STRIDE.
9510 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9511 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9512 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9513 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9514 stride is constant and is below the minimum stride threshold.
9515
9516 2018-05-07 Luis Machado <luis.machado@linaro.org>
9517
9518 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9519 to 512.
9520
9521 2018-05-07 Luis Machado <luis.machado@linaro.org>
9522
9523 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9524 <prefetch_dynamic_strides>: New const bool field.
9525 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9526 prefetch_dynamic_strides.
9527 (exynosm1_prefetch_tune): Likewise.
9528 (thunderxt88_prefetch_tune): Likewise.
9529 (thunderx_prefetch_tune): Likewise.
9530 (thunderx2t99_prefetch_tune): Likewise.
9531 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9532 to false.
9533 (aarch64_override_options_internal): Update to set
9534 PARAM_PREFETCH_DYNAMIC_STRIDES.
9535 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9536 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9537 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9538 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9539 prefetch-dynamic-strides setting.
9540
9541 2018-05-07 Luis Machado <luis.machado@linaro.org>
9542
9543 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9544 <minimum_stride>: New const int field.
9545 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9546 minimum_stride field.
9547 (exynosm1_prefetch_tune): Likewise.
9548 (thunderxt88_prefetch_tune): Likewise.
9549 (thunderx_prefetch_tune): Likewise.
9550 (thunderx2t99_prefetch_tune): Likewise.
9551 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9552 (aarch64_override_options_internal): Update to set
9553 PARAM_PREFETCH_MINIMUM_STRIDE.
9554 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9555 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9556 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9557 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9558 stride is constant and is below the minimum stride threshold.
9559
9560 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9561
9562 PR c++/85659
9563 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9564 the type is addressable. Don't force op into register if it has
9565 BLKmode.
9566
9567 2018-05-05 Roland McGrath <mcgrathr@google.com>
9568
9569 PR other/77609
9570 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9571 any section for which we don't know a specific type it should have,
9572 regardless of name. Previously this was done only for the exact
9573 names ".init_array", ".fini_array", and ".preinit_array".
9574 (default_elf_asm_named_section): Add comment about
9575 relationship with default_section_type_flags and SECTION_NOTYPE.
9576 (get_section): Don't consider it a type conflict if one side has
9577 SECTION_NOTYPE and the other doesn't, as long as neither has the
9578 SECTION_BSS et al used in the default_section_type_flags logic.
9579
9580 2018-05-05 Tom de Vries <tom@codesourcery.com>
9581
9582 PR target/85653
9583 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9584 (workaround_barsyncs): New function.
9585 (nvptx_reorg): Use workaround_barsyncs.
9586 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9587 (define_expand "nvptx_membar_cta"): New define_expand.
9588 (define_insn "*nvptx_membar_cta"): New insn.
9589
9590 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9591
9592 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9593 To improve optimization opportunities.
9594 * builtin-types.def: The new needed builtin types for the above.
9595
9596 2018-05-04 Richard Biener <rguenther@suse.de>
9597
9598 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9599 * gimple-ssa-store-merging.c
9600 (imm_store_chain_info::output_merged_store): Remove redundant create,
9601 release split_store vector contents on failure.
9602 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9603 scalar stmt vector on cache hit.
9604
9605 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9606
9607 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9608 Xilinx FP support.
9609 * config.gcc (powerpc-xilinx-eabi*): Remove.
9610 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9611 support.
9612 (fusion_addis_mem_combo_load): Ditto.
9613 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9614 FP support.
9615 (rs6000_cpu_cpp_builtins): Ditto.
9616 * config/rs6000/rs6000-linux.c
9617 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9618 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9619 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9620 support.
9621 (rs6000_setup_reg_addr_masks): Ditto.
9622 (rs6000_init_hard_regno_mode_ok): Ditto.
9623 (rs6000_option_override_internal): Ditto.
9624 (legitimate_lo_sum_address_p): Ditto.
9625 (rs6000_legitimize_address): Ditto.
9626 (rs6000_legitimize_reload_address): Ditto.
9627 (rs6000_legitimate_address_p): Ditto.
9628 (abi_v4_pass_in_fpr): Ditto.
9629 (setup_incoming_varargs): Ditto.
9630 (rs6000_gimplify_va_arg): Ditto.
9631 (rs6000_split_multireg_move): Ditto.
9632 (rs6000_savres_strategy): Ditto.
9633 (rs6000_emit_prologue_components): Ditto.
9634 (rs6000_emit_epilogue_components): Ditto.
9635 (rs6000_emit_prologue): Ditto.
9636 (rs6000_emit_epilogue): Ditto.
9637 (rs6000_elf_file_end): Ditto.
9638 (rs6000_function_value): Ditto.
9639 (rs6000_libcall_value): Ditto.
9640 * config/rs6000/rs6000.h: Ditto.
9641 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9642 (TARGET_MINMAX): ... this. New.
9643 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9644 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9645 (*movsi_internal1_single): Delete.
9646 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9647 mfpu=, mxilinx-fpu): Delete.
9648 * config/rs6000/singlefp.h: Delete.
9649 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9650 * config/rs6000/t-rs6000: Ditto.
9651 * config/rs6000/t-xilinx: Delete.
9652 * config/rs6000/titan.md: Adjust for fp_type removal.
9653 * config/rs6000/vsx.md: Remove Xilinx FP support.
9654 (VStype_simple): Delete.
9655 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9656 * config/rs6000/xfpu.h: Delete.
9657 * config/rs6000/xfpu.md: Delete.
9658 * config/rs6000/xilinx.h: Delete.
9659 * config/rs6000/xilinx.opt: Delete.
9660 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9661 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9662
9663 2018-05-04 Tom de Vries <tom@codesourcery.com>
9664
9665 PR libgomp/85639
9666 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9667 if ignore == 0.
9668
9669 2018-05-04 Richard Biener <rguenther@suse.de>
9670
9671 PR middle-end/85627
9672 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9673 (expand_complex_div_wide): Likewise.
9674 (expand_complex_operations_1): Likewise.
9675 (expand_complex_libcall): Preserve EH info of the original stmt.
9676 (tree_lower_complex): Handle removed blocks.
9677 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9678 on complex multiplication and division libcall builtins.
9679
9680 2018-05-04 Richard Biener <rguenther@suse.de>
9681
9682 PR middle-end/85574
9683 * fold-const.c (negate_expr_p): Restrict negation of operand
9684 zero of a division to when we know that can happen without
9685 overflow.
9686 (fold_negate_expr_1): Likewise.
9687
9688 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9689
9690 PR libstdc++/85466
9691 * real.h (real_nextafter): Declare.
9692 * real.c (real_nextafter): New function.
9693 * fold-const-call.c (fold_const_nextafter): New function.
9694 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9695 CASE_CFN_NEXTTOWARD.
9696 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9697 even when arg1_mode is different from arg0_mode.
9698
9699 2018-05-03 Nathan Sidwell <nathan@acm.org>
9700
9701 * doc/extend.texi (Deprecated Features): Remove
9702 -ffriend-injection.
9703 (Backwards Compatibility): Likewise.
9704 * doc/invoke.texi (C++ Language Options): Likewise.
9705 (C++ Dialect Options): Likewise.
9706
9707 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9708
9709 PR target/85530
9710 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9711 _mm512_mask_mullox_epi64): New intrinsics.
9712
9713 2018-05-03 Tom de Vries <tom@codesourcery.com>
9714
9715 PR testsuite/85106
9716 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9717 dump files): Add offload-tree.
9718
9719 2018-05-03 Richard Biener <rguenther@suse.de>
9720
9721 PR tree-optimization/85615
9722 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9723 to loops not nested in BBs loop father to avoid creating multi-entry
9724 loops.
9725
9726 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9727
9728 PR tree-optimization/70291
9729 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9730 arguments. Change return type to tree. Emit libcall as a new
9731 statement rather than replacing existing one when inplace_p is true.
9732 (expand_complex_multiplication_components): New function.
9733 (expand_complex_multiplication): Expand floating-point complex
9734 multiplication using the above.
9735 (expand_complex_division): Rename inner_type parameter to type.
9736 Update expand_complex_libcall call-site.
9737 (expand_complex_operations_1): Update expand_complex_multiplication
9738 and expand_complex_division call-sites.
9739
9740 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9741
9742 PR target/85582
9743 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9744 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9745 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9746 the highest significant bit of the shift count mask is clear. In
9747 check whether and[sq]i3 is needed verify that all significant bits
9748 of the shift count other than the highest are set.
9749
9750 2018-05-02 Tom de Vries <tom@codesourcery.com>
9751
9752 PR libgomp/82428
9753 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9754 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9755 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9756 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9757 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9758 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9759 __builtin_goacc_parlevel_size.
9760
9761 2018-05-02 Richard Biener <rguenther@suse.de>
9762
9763 PR tree-optimization/85597
9764 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9765 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9766 directly.
9767
9768 2018-05-02 Tom de Vries <tom@codesourcery.com>
9769
9770 PR testsuite/85106
9771 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9772 dump files): Add ltrans-tree.
9773
9774 2018-05-02 Tom de Vries <tom@codesourcery.com>
9775
9776 PR testsuite/85106
9777 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9778 dump files): Add wpa-ipa.
9779
9780 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9781
9782 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9783 powerpc*-*-linux*paired* target.
9784 * config/rs6000/750cl.h: Delete.
9785 * config/rs6000/paired.h: Delete.
9786 * config/rs6000/paired.md: Delete.
9787 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9788 float support.
9789 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9790 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9791 comment. Remove paired float support.
9792 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9793 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9794 VECTOR_PAIRED.
9795 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9796 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9797 declarations.
9798 * config/rs6000/rs6000.c: Remove paired float support.
9799 (paired_expand_vector_init, paired_expand_vector_move,
9800 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9801 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9802 paired_expand_builtin, paired_expand_predicate_builtin,
9803 paired_init_builtins): Delete.
9804 * config/rs6000/rs6000.h: Remove paired float support.
9805 * config/rs6000/rs6000.md: Remove paired float support.
9806 (move_from_CR_ov_bit): Delete.
9807 * config/rs6000/rs6000.opt (mpaired): Delete.
9808 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9809 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9810
9811 2018-05-02 Richard Biener <rguenther@suse.de>
9812
9813 PR middle-end/85567
9814 * gimplify.c (gimplify_save_expr): When in SSA form allow
9815 SAVE_EXPRs to compute to SSA vars.
9816
9817 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9818
9819 PR target/85582
9820 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9821 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9822 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9823 clobber operands[2], instead use a new pseudo. Formatting fixes.
9824
9825 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9826
9827 PR tree-optimization/85586
9828 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9829 exit early for statements in the same group if the accesses are
9830 not strided.
9831
9832 2018-05-02 Tom de Vries <tom@codesourcery.com>
9833
9834 PR lto/85451
9835 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9836 error message.
9837
9838 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9839
9840 PR tree-optimization/85143
9841 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9842
9843 2018-05-01 Tom de Vries <tom@codesourcery.com>
9844
9845 PR lto/85451
9846 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9847 not found" error message.
9848
9849 2018-05-01 Tom de Vries <tom@codesourcery.com>
9850
9851 PR other/83786
9852 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9853 * vec.c (test_ordered_remove_if): New function.
9854 (vec_c_tests): Call test_ordered_remove_if.
9855 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9856 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9857 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9858 VEC_ORDERED_REMOVE_IF.
9859
9860 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9861
9862 PR tree-optimization/82665
9863 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9864 pointer subtraction where arguments come from a memchr call.
9865
9866 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9867
9868 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9869 --push-state --as-needed and --pop-state instead of --as-needed and
9870 --no-as-needed if ld supports it.
9871 * configure: Regenerated.
9872
9873 PR web/85578
9874 * doc/install.texi2html: Replace _002d with - and _002a with * in
9875 generated html files using sed.
9876
9877 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9878
9879 PR c++/85523
9880 * gcc-rich-location.c (blank_line_before_p): New function.
9881 (use_new_line): New function.
9882 (gcc_rich_location::add_fixit_insert_formatted): New function.
9883 * gcc-rich-location.h
9884 (gcc_rich_location::add_fixit_insert_formatted): New function.
9885
9886 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9887
9888 * selftest.c (assert_streq): Rename "expected" and "actual" to
9889 "val1" and "val2". Extend NULL-handling to cover both inputs
9890 symmetrically, while still requiring both to be non-NULL for a pass.
9891 * selftest.h (assert_streq): Rename "expected" and "actual" to
9892 "val1" and "val2".
9893 (ASSERT_EQ): Likewise.
9894 (ASSERT_EQ_AT): Likewise.
9895 (ASSERT_KNOWN_EQ): Likewise.
9896 (ASSERT_KNOWN_EQ_AT): Likewise.
9897 (ASSERT_NE): Likewise.
9898 (ASSERT_MAYBE_NE): Likewise.
9899 (ASSERT_MAYBE_NE_AT): Likewise.
9900 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9901 the assertion to pass.
9902 (ASSERT_STREQ_AT): Likewise.
9903
9904 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9905
9906 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9907 interaction with -pie.
9908
9909 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9910
9911 * selftest.h: Fix alphabetization of per-source-file selftest
9912 declarations.
9913
9914 2018-04-30 Jason Merrill <jason@redhat.com>
9915
9916 PR c++/61982 - dead stores to destroyed objects.
9917 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9918 of clobber.
9919
9920 2018-04-30 Jason Merrill <jason@redhat.com>
9921
9922 * tree.c (build_clobber): New.
9923 * tree.h: Declare it.
9924 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9925
9926 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9927
9928 * diagnostic-show-locus.c (layout::layout): Update for
9929 location_get_source_line returning a char_span.
9930 (struct char_span): Move to input.h.
9931 (struct correction): Update for fields in char_span becoming
9932 private.
9933 (struct source_line): Update for location_get_source_line
9934 returning a char_span.
9935 (layout::print_line): Likewise.
9936 * edit-context.c (edited_file::print_content): Likewise.
9937 (edited_file::print_diff_hunk): Likewise.
9938 (edited_file::print_run_of_changed_lines): Likewise.
9939 (edited_file::get_num_lines): Likewise.
9940 (edited_line::edited_line): Likewise.
9941 * final.c (asm_show_source): Likewise.
9942 * input.c (location_get_source_line): Convert return type
9943 from const char * to char_span, losing the final "line_len"
9944 param.
9945 (dump_location_info): Update for the above.
9946 (get_substring_ranges_for_loc): Likewise. Use a char_span
9947 when handling the literal within the line.
9948 (test_reading_source_line): Update for location_get_source_line
9949 returning a char_span.
9950 * input.h (class char_span): Move here from
9951 diagnostic-show-locus.c, converting from a struct to a class.
9952 Make data members private.
9953 (char_span::operator bool): New.
9954 (char_span::length): New.
9955 (char_span::get_buffer): New.
9956 (char_span::operator[]): New.
9957 (char_span::subspan): Make const.
9958 (char_span::xstrdup): New.
9959 (location_get_source_line): Convert return type from const char *
9960 to char_span, losing the final "line_size" param.
9961
9962 2018-04-30 Jan Hubicka <jh@suse.cz>
9963
9964 * lto-wrapper.c (ltrans_priorities): New static var.
9965 (cmp_priority): New.
9966 (run_gcc): Read priorities and if doing parallel build order
9967 the Makefile by them.
9968
9969 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9970
9971 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
9972
9973 2018-04-30 Richard Biener <rguenther@suse.de>
9974
9975 * tree-cfg.c (verify_address): Remove base argument, add
9976 flag whether to check TREE_ADDRESSABLE and do that.
9977 (verify_expr): Remove.
9978 (verify_types_in_gimple_reference): Add pieces from verify_expr.
9979 (verify_gimple_assign_single): Likewise.
9980 (verify_gimple_switch): Likewise.
9981 (verify_expr_location_1): Dereference tp once. Add (disabled)
9982 piece from verify_expr.
9983 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
9984
9985 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9986
9987 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
9988
9989 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
9990
9991 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
9992 (small_data_pattern): Likewise.
9993 (arc_rewrite_small_data): Likewise.
9994 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
9995 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
9996 (get_symbol_alignment): New function.
9997 (legitimate_small_data_address_p): Likewise.
9998 (legitimate_scaled_address): Update, call
9999 legitimate_small_data_address_p.
10000 (output_sdata): New static variable.
10001 (arc_print_operand): Update how we handle small data operands.
10002 (arc_print_operand_address): Likewise.
10003 (arc_legitimate_address_p): Update, use
10004 legitimate_small_data_address_p.
10005 (arc_rewrite_small_data_p): Remove.
10006 (arc_rewrite_small_data_1): Likewise.
10007 (arc_rewrite_small_data): Likewise.
10008 (small_data_pattern): Likewise.
10009 (compact_sda_memory_operand): Update to use
10010 legitimate_small_data_address_p and get_symbol_alignment.
10011 (prepare_move_operands): Don't rewite sdata pattern.
10012 (prepare_extend_operands): Remove.
10013 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10014 pattern.
10015 (zero_extendqisi2): Likewise.
10016 (zero_extendhisi2): Likewise.
10017 (extendqihi2): Likewise.
10018 (extendqisi2): Likewise.
10019 (extendhisi2): Likewise.
10020 (addsi3): Likewise.
10021 (subsi3): Likewise.
10022 (andsi3): Likewise.
10023 * config/arc/constraints.md (Usd): Change it to memory constraint.
10024
10025 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10026
10027 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10028 as source of std instructions.
10029 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10030 allow 6-bit constants as source for store instructions.
10031 (movdi_insn): Update instruction pattern to allow 6-bit constants
10032 as source for store instructions.
10033
10034 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10035
10036 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10037
10038 2018-04-30 Nathan Sidwell <nathan@acm.org>
10039 Sandra Loosemore <sandra@codesourcery.com>
10040
10041 * dumpfile.c (dump_open): Allow '-' for stdout.
10042 * doc/invoke.texi (Developer Options): Document dump filename
10043 determination early. Document stdin/stdout selection.
10044
10045 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10046
10047 Microblaze Target: PIC data text relative
10048
10049 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10050 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10051 Add declaration.
10052 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10053 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10054 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10055 New addressing mode for data-text relative position indepenedent code.
10056 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10057 'ADDRESS_SYMBOLIC_TXT_REL'.
10058 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10059 (microblaze_legitimate_pic_operand): Exclude function calls from
10060 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10061 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10062 addresses cases.
10063 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10064 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10065 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10066 for 'address + offset'.
10067 (microblaze_expand_prologue): Add new function prologue call for
10068 'r20' assignation.
10069 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10070 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10071 table in case of TARGET_PIC_DATA_TEXT_REL.
10072 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10073 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10074 Add new macros 'UNSPEC_TEXT',
10075 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10076 + exclude function calls from 'UNSPEC_PLT' in case of data text
10077 relative mode.
10078 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10079 new target hook for generating address diff vector tables in case of
10080 flag_pic.
10081 * doc/tm.texi : Regenerate.
10082 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10083 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10084 of addr diff vector generation.
10085 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10086 target hook definition.
10087 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10088 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10089 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10090 option for data text relative.
10091
10092 2018-04-30 Richard Biener <rguenther@suse.de>
10093
10094 * tree-chrec.h (evolution_function_is_constant_p): Remove
10095 redundant check.
10096 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10097
10098 2018-04-30 Richard Biener <rguenther@suse.de>
10099
10100 PR bootstrap/85571
10101 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10102
10103 2018-04-30 Richard Biener <rguenther@suse.de>
10104
10105 PR tree-optimization/28364
10106 PR tree-optimization/85275
10107 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10108 copying first exit test.
10109
10110 2018-04-28 Mark Wielaard <mark@klomp.org>
10111
10112 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10113 dwarf_version >= 5.
10114 (dwarf_AT): Handle DW_AT_addr_base.
10115 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10116
10117 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10118
10119 PR target/84431
10120 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10121 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10122 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10123 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10124
10125 2018-04-28 Richard Biener <rguenther@suse.de>
10126
10127 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10128 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10129 to reflect use. Only add interesting stmts.
10130
10131 2018-04-27 Martin Jambor <mjambor@suse.cz>
10132
10133 PR ipa/85549
10134 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10135 the jump function allows for passing through aggregate values.
10136
10137 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10138
10139 * input.h (in_system_header_at): Convert from macro to inline
10140 function.
10141 (from_macro_expansion_at): Likewise.
10142 (from_macro_definition_at): Likewise.
10143
10144 2018-04-27 Jeff Law <law@redhat.com>
10145
10146 * config.gcc: Mark tile* targets as deprecated/obsolete.
10147
10148 2018-04-27 Richard Biener <rguenther@suse.de>
10149
10150 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10151 fix for ILP32.
10152
10153 2018-04-27 Richard Biener <rguenther@suse.de>
10154
10155 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10156
10157 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10158
10159 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10160 with Yd constraint. Set "preferred_for_speed" attribute from
10161 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10162 with Yd constraint.
10163 (*movdi_internal): Ditto.
10164 (movti_interunit splitters): Remove
10165 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10166 (movdi_interunit splitters): Ditto.
10167 * config/i386/constraints.md (Ye): Remove.
10168 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10169
10170 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10171
10172 PR target/85512
10173 * config/aarch64/constraints.md (Usg): Limit to 31.
10174 (Usj): Limit to 63.
10175
10176 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10177
10178 PR tree-optimization/85529
10179 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10180 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10181 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10182 zero extension or masking of the MSB bit.
10183 (optimize_range_tests): Add FIRST_BB argument, pass it through
10184 to optimize_range_tests_var_bound.
10185 (maybe_optimize_range_tests, reassociate_bb): Adjust
10186 optimize_range_tests callers.
10187
10188 2018-04-26 Richard Biener <rguenther@suse.de>
10189 Jakub Jelinek <jakub@redhat.com>
10190
10191 * cgraph.h (symbol_table): Just declare debug method here.
10192 * symtab.c (symbol_table::debug): Define.
10193
10194 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10195
10196 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10197
10198 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10199
10200 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10201 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10202 (*movdi_internal): Substitute Yi and Yj constraint with x
10203 and Ym and Yn constraint with y constraint. Update "isa"
10204 attribute and set "preferred_for_speed" attribute from
10205 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10206 (*movsi_internal): Ditto.
10207 (*movdf_internal): Ditto.
10208 (*movsf_internal): Ditto.
10209 (*zero_extendsidi2): Ditto.
10210 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10211 (sse2_loadld): Ditto.
10212 (*vec_extract<ssevecmodelower>_0): Ditto.
10213 (*vec_extractv4si_0_zext_sse4): Ditto.
10214 (vec_concatv2di): Ditto.
10215 (*vec_dup<mode>): Ditto.
10216 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10217 * config/i386/constraints.md (Yi): Remove.
10218 (Yj): Remove.
10219 (Ym): Remove.
10220 (Yn): Remove.
10221
10222 2018-04-26 Nathan Sidwell <nathan@acm.org>
10223
10224 * dumpfile.c (dump_open): New.
10225 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10226 (dump_finish): Detect stdio/stderr by value not name.
10227
10228 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10229
10230 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10231
10232 2018-04-26 Tom de Vries <tom@codesourcery.com>
10233
10234 PR target/84952
10235 * config/nvptx/nvptx.c (verify_neutering_jumps)
10236 (verify_neutering_labels): New function
10237 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10238
10239 2018-04-26 Tom de Vries <tom@codesourcery.com>
10240
10241 PR target/84025
10242 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10243 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10244 need neutering.
10245
10246 2018-04-26 Richard Biener <rguenther@suse.de>
10247 Tom de Vries <tom@codesourcery.com>
10248
10249 PR lto/85422
10250 * lto-streamer-out.c (output_function): Fixup loops if required to match
10251 discovery done in the reader.
10252
10253 2018-04-26 Richard Biener <rguenther@suse.de>
10254
10255 PR tree-optimization/85116
10256 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10257 have a loop exit from the single latch predecessor. Remove
10258 case of header with just condition.
10259 (ch_base::copy_headers): Exclude infinite loops from any
10260 processing.
10261 (pass_ch::execute): Record exits.
10262
10263 2018-04-26 Richard Biener <rguenther@suse.de>
10264
10265 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10266 prologue cost vector and pass it to vect_get_load_cost.
10267 (vect_get_peeling_costs_all_drs): Likewise.
10268 (vect_peeling_hash_get_lowest_cost): Likewise.
10269 (vect_enhance_data_refs_alignment): Likewise.
10270
10271 2018-04-26 Richard Biener <rguenther@suse.de>
10272
10273 PR middle-end/85450
10274 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10275 checking of integer<->pointer conversions.
10276 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10277 sign-/zero-extending pointer types.
10278 (expand_omp_for_static_chunk): Likewise.
10279
10280 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10281 Jean Lee <xiaoyur347@gmail.com>
10282
10283 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10284 (TARGET_ASAN_SHADOW_OFFSET): Define.
10285 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10286 true for -fsanitize=address.
10287
10288 2018-04-25 Mark Wielaard <mark@klomp.org>
10289
10290 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10291 shorter ones.
10292
10293 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10294
10295 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10296 than "alu", remove explicit "memory" and "imm_disp" attributes.
10297 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10298
10299 PR middle-end/85414
10300 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10301 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10302 gen_lowpart_no_emit.
10303
10304 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10305
10306 PR target/85473
10307 * config/i386/i386.c (ix86_expand_builtin): Change memory
10308 operand to XI, extend p0 to Pmode.
10309 * config/i386/i386.md: Change unspec volatile and operand
10310 1 mode to XI, change operand 0 mode to P.
10311
10312 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10313
10314 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10315 GET_MODE_MASK before any checking.
10316 (nds32_can_use_bset_p): Likewise.
10317 (nds32_can_use_btgl_p): Likewise.
10318
10319 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10320
10321 * config/nds32/nds32-doubleword.md: New define_split pattern for
10322 illegal register number.
10323
10324 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10325
10326 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10327
10328 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10329
10330 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10331
10332 2018-04-25 Richard Biener <rguenther@suse.de>
10333
10334 * lto-streamer.h (LTO_major_version): Bump to 8.
10335
10336 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10337
10338 * BASE-VER: Set to 9.0.0.
10339
10340 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10341
10342 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10343 in __abskf2 and __powikf2.
10344
10345 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10346
10347 PR target/85512
10348 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10349 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10350 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10351 Use the above on operand 2. Reindent.
10352 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10353
10354 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10355
10356 PR target/85485
10357 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10358 handle OPT_mcet.
10359 * config/i386/i386.opt (mcet): Removed.
10360 * doc/install.texi: Remove -mcet documentation.
10361 * doc/invoke.texi: Likewise.
10362
10363 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10364
10365 PR target/85485
10366 * doc/install.texi: Remove -mcet from bootstrap-cet.
10367
10368 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10369
10370 PR target/85511
10371 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10372 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10373 if TARGET_64BIT.
10374
10375 PR target/85503
10376 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10377 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10378 containing a CONST_VECTOR.
10379
10380 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10381
10382 * doc/install.texi: Update newlib dependency for nvptx.
10383
10384 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10385
10386 PR target/85508
10387 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10388 instead of INTVAL when shifting x left.
10389
10390 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10391
10392 PR tree-optimization/85478
10393 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10394 vect_grouped_store_supported for single element vectors.
10395
10396 2018-04-24 Richard Biener <rguenther@suse.de>
10397
10398 PR target/85491
10399 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10400 load cost increase to the case of non-constant step.
10401
10402 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10403
10404 PR target/84828
10405 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10406 destination if any_malformed_asm.
10407
10408 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10409
10410 PR middle-end/85496
10411 * expr.c (store_field): In the bitfield case, if the value comes from
10412 a function call and is returned in registers by means of a PARALLEL,
10413 do not change the mode of the temporary unless BLKmode and VOIDmode.
10414
10415 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10416
10417 PR rtl-optimization/85423
10418 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10419 dependencies to debug insns when the previous insn is non-debug.
10420
10421 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10422
10423 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10424 enums into a single definition.
10425 (fls): Fix predicates and printing.
10426 (seti): Likewise.
10427
10428 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10429
10430 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10431 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10432 and short u6 immediate.
10433 (check_if_valid_sleep_operand): Remove.
10434 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10435
10436 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10437
10438 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10439 flag_always_save_lp condition.
10440 * config/nds32/nds32.opt (malways-save-lp): New option.
10441
10442 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10443
10444 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10445 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10446 * config/nds32/nds32.h
10447 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10448 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10449
10450 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10451
10452 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10453 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10454
10455 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10456 Chung-Ju Wu <jasonwucj@gmail.com>
10457
10458 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10459 Declare.
10460 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10461 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10462
10463 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10464
10465 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10466
10467 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10468
10469 * config/nds32/nds32-protos.h (nds32_data_alignment,
10470 nds32_local_alignment): Declare.
10471 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10472 nds32_local_alignment): New functions.
10473 (TARGET_CONSTANT_ALIGNMENT): Define.
10474 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10475
10476 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10477
10478 * config/nds32/nds32.c
10479 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10480 (TARGET_MODES_TIEABLE_P): Likewise.
10481
10482 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10483
10484 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10485 level Ofast and Og.
10486
10487 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10488 Chung-Ju Wu <jasonwucj@gmail.com>
10489
10490 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10491 for unaligned access.
10492 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10493 unaligned access.
10494 * config/nds32/nds32-intrinsic.md: Likewise.
10495 * config/nds32/nds32_intrinsic.h: Likewise.
10496 * config/nds32/nds32.h (nds32_builtins): Likewise.
10497 * config/nds32/nds32.opt (munaligned-access): New option.
10498 * config/nds32/nds32.c (nds32_asm_file_start): Display
10499 flag_unaligned_access status.
10500
10501 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10502
10503 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10504 -mno-relax is present.
10505 * config/riscv/linux.h (LINK_SPEC): Ditto.
10506
10507 2018-04-20 Martin Sebor <msebor@redhat.com>
10508
10509 PR c/85365
10510 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10511 for null pointers.
10512 (gimple_fold_builtin_stxcpy_chk): Same.
10513 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10514
10515 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10516
10517 PR target/85456
10518 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10519 __powikf2 when long double is IEEE 128-bit.
10520
10521 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10522
10523 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10524 step to make sure stack always aligned.
10525
10526 2018-04-20 Carl Love <cel@us.ibm.com>
10527
10528 PR target/83402
10529 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10530 size check for arg0.
10531
10532 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10533 Tom de Vries <tom@codesourcery.com>
10534
10535 PR target/85445
10536 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10537 Emit insns for calls too.
10538 (nvptx_find_par): Always look for worker-level predecessor insn.
10539 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10540 calls.
10541 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10542 (nvptx_process_pars): Propagate frames for calls.
10543
10544 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10545
10546 PR target/85469
10547 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10548 Removed.
10549 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10550 (ix86_handle_option): Don't handle OPT_mibt.
10551 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10552 __SHSTK__.
10553 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10554 has_ibt and ibt.
10555 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10556 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10557 (ix86_target_macros): Define __CET__ with flag_cf_protection
10558 for -fcf-protection.
10559 * config/i386/i386.c (isa2_opts): Remove -mibt.
10560 * config/i386/i386.h (TARGET_IBT): Removed.
10561 (TARGET_IBT_P): Likewise.
10562 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10563 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10564 * config/i386/i386.opt (mcet): Update help message.
10565 (mshstk): Likewise.
10566 (mibt): Removed.
10567 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10568 -mcet as an alias for -mshstk.
10569
10570 2018-04-20 Richard Biener <rguenther@suse.de>
10571
10572 PR middle-end/85475
10573 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10574 complexity by forcing a single use of the multiply operand.
10575
10576 2018-04-20 Martin Jambor <mjambor@suse.cz>
10577
10578 ipa/85449
10579 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10580 recursion dependency to only apply to non-clones.
10581
10582 2018-04-20 Martin Jambor <mjambor@suse.cz>
10583
10584 ipa/85447
10585 * ipa-cp.c (create_specialized_node): Check that clones of
10586 self-recursive edges exist during IPA-CP.
10587
10588 2018-04-19 Toon Moene <toon@moene.org>
10589
10590 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10591 by -O3.
10592
10593 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10594
10595 PR tree-optimization/85467
10596 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10597 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10598 VECTOR_CST element to type.
10599
10600 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10601
10602 PR target/85397
10603 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10604 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10605 (builtin_longjmp): Likewise.
10606 (save_stack_nonlocal): New pattern.
10607 (restore_stack_nonlocal): Likewise.
10608
10609 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10610
10611 PR target/85404
10612 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10613 Replace ASM_OUTPUT_LABEL with fprintf.
10614
10615 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10616
10617 PR target/85417
10618 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10619 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10620 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10621 define __IBT__ and __SHSTK__ for -fcf-protection.
10622 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10623 TARGET_IBT.
10624 (ix86_trampoline_init): Likewise.
10625 (x86_output_mi_thunk): Likewise.
10626 (ix86_notrack_prefixed_insn_p): Likewise.
10627 (ix86_option_override_internal): Don't disallow -fcf-protection.
10628 * config/i386/i386.md (rdssp<mode>): Also enable for
10629 -fcf-protection.
10630 (incssp<mode>): Likewise.
10631 (nop_endbr): Likewise.
10632 * config/i386/i386.opt (mcet): Change help message to built-in
10633 functions only.
10634 (mibt): Likewise.
10635 (mshstk): Likewise.
10636 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10637 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10638 enable CET built-in functions.
10639
10640 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10641
10642 * common/config/i386/i386-common.c
10643 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10644 OPTION_MASK_ISA_MOVDIRI_UNSET,
10645 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10646 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10647 * config.gcc (movdirintrin.h): New header.
10648 * config/i386/cpuid.h (bit_MOVDIRI,
10649 bit_MOVDIR64B): New bits.
10650 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10651 and -mmvodir64b.
10652 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10653 (VOID, PVOID, PCVOID)): New function types.
10654 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10655 __builtin_ia32_directstoreu_u64,
10656 __builtin_ia32_movdir64b): New builtins.
10657 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10658 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10659 and -mmovdiri.
10660 (ix86_valid_target_attribute_inner_p): Ditto.
10661 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10662 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10663 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10664 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10665 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10666 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10667 (movdiri<mode>, movdir64b_<mode>): New.
10668 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10669 * config/i386/immintrin.h: Include movdirintrin.h.
10670 * config/i386/movdirintrin.h: New file.
10671 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10672
10673 2018-04-19 Richard Biener <rguenther@suse.de>
10674
10675 PR middle-end/85455
10676 * cfg.c (clear_bb_flags): When loop state says we have
10677 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10678
10679 2018-04-19 Richard Biener <rguenther@suse.de>
10680
10681 PR tree-optimization/84737
10682 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10683 copying restrict info.
10684 (vect_setup_realignment): Use it.
10685 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10686 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10687 the first DR to all generated stores.
10688 (vectorizable_load): Likewise for loads.
10689
10690 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10691
10692 PR tree-optimization/85446
10693 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10694 the integral and pointer types to have the same precision.
10695
10696 * doc/install.texi: Document --disable-cet being the default and
10697 --enable-cet=auto.
10698
10699 2018-04-18 Martin Liska <mliska@suse.cz>
10700
10701 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10702 style.
10703
10704 2018-04-18 Martin Liska <mliska@suse.cz>
10705
10706 Revert
10707 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10708
10709 PR ipa/83983
10710 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10711 arguments if they are comparable.
10712
10713 2018-04-18 Martin Liska <mliska@suse.cz>
10714
10715 Revert
10716 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10717
10718 PR lto/84805
10719 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10720 incomplete types.
10721
10722 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10723
10724 PR target/85388
10725 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10726 ENDBR after calling __morestack.
10727
10728 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10729
10730 PR jit/85384
10731 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10732 by using gcc_base_ver to generate a gcc_driver_version, and use
10733 it when generating GCC_DRIVER_NAME.
10734 * configure: Regenerate.
10735
10736 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10737
10738 PR target/81084
10739 * config.gcc: Obsolete powerpc*-*-*spe*.
10740
10741 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10742
10743 PR debug/84637
10744 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10745 (stabstr_D): Change type of unum from unsigned int to
10746 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10747 type.
10748
10749 2018-04-17 Jim Wilson <jimw@sifive.com>
10750
10751 PR 84856
10752 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10753 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10754 Set arg_pointer_offset after using pretend_args_size.
10755
10756 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10757
10758 PR rtl-optimization/85431
10759 * dse.c (record_store): Ignore zero width stores.
10760
10761 PR sanitizer/85230
10762 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10763 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10764 __builtin_stack_restore rather than after it.
10765 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10766 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10767 argument instead of virtual_dynamic_stack_rtx.
10768
10769 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10770
10771 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10772 New prototype.
10773 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10774 Add note to error message to explain internal mapping of overloaded
10775 built-in function name to non-overloaded built-in function name.
10776 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10777 function.
10778
10779 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10780
10781 PR target/85424
10782 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10783 where the inputs overlap with the output.
10784
10785 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10786
10787 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10788 (=v, v) alternative and explicit "memory" attribute.
10789 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10790 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10791 attributes.
10792 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10793 "sselog1" type instead of "sselog".
10794 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10795 "sselog". Remove explicit "memory" attribute.
10796 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10797 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10798 attributes.
10799 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10800 "sselog1" type instead of "sselog". Remove explicit "memory"
10801 attribute.
10802 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10803 use "sselog1" type instead of "sselog". Remove explicit "memory"
10804 attribute.
10805 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10806 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10807 attributes.
10808 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10809 "sselog1" type instead of "sselog". Remove explicit "memory"
10810 attribute.
10811 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10812 use "sselog1" type instead of "sselog". Remove explicit "memory"
10813 attribute.
10814
10815 PR target/85430
10816 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10817
10818 PR middle-end/85414
10819 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10820 on a SUBREG.
10821
10822 2018-04-17 Martin Jambor <mjambor@suse.cz>
10823
10824 PR ipa/85421
10825 * ipa-cp.c (create_specialized_node): Call
10826 expand_all_artificial_thunks if necessary.
10827
10828 2018-04-17 Martin Liska <mliska@suse.cz>
10829
10830 PR lto/85405
10831 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10832 in message, remote space in between '_G' and '('.
10833
10834 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10835
10836 PR target/85281
10837 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10838 avx512f_vmcmp<mode>3<round_saeonly_name>,
10839 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10840 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10841 avx512f_rndscale<mode><round_saeonly_name>,
10842 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10843 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10844 Use %<iptr>2 instead of %2 for -masm=intel.
10845 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10846 avx512f_vcvttss2usi<round_saeonly_name>,
10847 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10848 -masm=intel.
10849 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10850 avx512f_vcvttsd2usi<round_saeonly_name>,
10851 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10852 Use %q1 instead of %1 for -masm=intel.
10853 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10854 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10855 of %3 for -masm=intel.
10856 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10857 -masm=intel.
10858 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10859 -masm=intel.
10860 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10861 -masm=intel.
10862 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10863 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10864 %g1.
10865 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10866 -masm=intel.
10867 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10868 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10869 %g1 and one with %0 and %1.
10870 (avx512er_vmrcp28<mode><round_saeonly_name>,
10871 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10872 %1 for -masm=intel.
10873 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10874 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10875 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10876 of %0 and %{%4%} for -masm=intel.
10877 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10878 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10879 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10880 order of %0 and %{%5%}%{z%} for -masm=intel.
10881
10882 2018-04-17 Jan Hubicka <jh@suse.cz>
10883
10884 PR lto/85405
10885 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10886
10887 2018-04-17 Martin Liska <mliska@suse.cz>
10888
10889 PR ipa/85329
10890 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10891 for target_clone error message. Make default implementation
10892 clone to be a local declaration.
10893 (separate_attrs): Add new argument and check for an empty
10894 string.
10895 (expand_target_clones): Handle it.
10896 (ipa_target_clone): Make redirection just for target_clones
10897 functions.
10898
10899 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10900 Tom de Vries <tom@codesourcery.com>
10901
10902 PR middle-end/84955
10903 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10904 tiled basic blocks without omp continue statements.
10905
10906 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10907
10908 PR target/83660
10909 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10910 vec_extract expression as having side effects to make sure it gets
10911 a cleanup point.
10912
10913 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10914
10915 PR target/85403
10916 * config/i386/i386.c (get_builtin_code_for_version): Check
10917 error_mark_node.
10918
10919 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10920
10921 PR target/84331
10922 * config.gcc: Support "skylake".
10923 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10924 PROCESSOR_SKYLAKE.
10925 * config/i386/i386.c (m_SKYLAKE): Define.
10926 (processor_target_table): Add "skylake".
10927 (ix86_option_override_internal): Add "skylake".
10928 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
10929 PROCESSOR_CANNONLAKE.
10930 (get_builtin_code_for_version): Fix priority for
10931 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
10932 PROCESSOR_SKYLAKE-AVX512.
10933 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
10934 (processor_type): Add PROCESSOR_SKYLAKE.
10935
10936 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
10937 Jason Merrill <jason@redhat.com>
10938
10939 PR c++/85112
10940 * convert.c (convert_to_integer_1): Use direct recursion for
10941 enumeral types and types with a precision less than the number
10942 of bits in their mode.
10943
10944 2018-04-16 Julia Koval <julia.koval@intel.com>
10945
10946 PR target/84413
10947 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
10948 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
10949
10950 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
10951
10952 PR target/85293
10953 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
10954 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
10955 and -mno-direct-move.
10956
10957 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
10958
10959 PR target/83402
10960 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
10961 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
10962 Ensure negative shifts result in {0}.
10963
10964 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
10965
10966 PR rtl-optimization/79916
10967 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
10968 regs (if any) to define how to gnerate SD moves when LRA is in
10969 progress.
10970
10971 2018-04-13 Jakub Jelinek <jakub@redhat.com>
10972
10973 PR rtl-optimization/85393
10974 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
10975 * except.c (expand_dw2_landing_pad_for_region): Make static.
10976 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
10977 a label and unconditional jump to old_bb, rather than
10978 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
10979 basic block.
10980
10981 PR rtl-optimization/85376
10982 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
10983 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
10984 instead of a specific value.
10985
10986 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10987 Bin Cheng <bin.cheng@arm.com>
10988
10989 PR tree-optimization/82965
10990 PR tree-optimization/83991
10991 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
10992 by_profile_only parameter.
10993 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
10994 information if the loop was predicted to iterate too many times.
10995 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
10996
10997 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
10998
10999 PR lto/71991
11000 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11001 always inline.
11002
11003 2018-04-13 Martin Liska <mliska@suse.cz>
11004 Jakub Jelinek <jakub@redhat.com>
11005
11006 PR middle-end/81657
11007 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11008 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11009 * builtins.c (expand_builtin_memory_copy_args): Use
11010 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11011 handle dest_addr == pc_rtx.
11012
11013 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11014
11015 PR target/85291
11016 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11017 asked to not generate direct moves.
11018 (fix_trunc<mode>si2_stfiwx): Similar.
11019 (fix_trunc<mode>si2_internal): Similar.
11020
11021 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11022
11023 PR debug/83157
11024 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11025 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11026 lookup if dest in some wider mode is known to be const0_rtx and
11027 if so, record permanent equivalence for it to be ZERO_EXTEND of
11028 the narrower mode destination.
11029
11030 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11031
11032 * lto-streamer-out.c (output_function): Revert 259346.
11033 * omp-expand.c (expand_oacc_for): Likewise.
11034
11035 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11036
11037 PR rtl-optimization/85354
11038 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11039 * sel-sched.c (sel_global_init): ... here.
11040
11041 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11042
11043 PR target/85238
11044 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11045 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11046 mode for PE-COFF targets.
11047 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11048 (i386_pe_asm_lto_end): Likewise.
11049 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11050 (TARGET_ASM_LTO_END): Likewise.
11051 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11052 (i386_pe_asm_lto_start): New function.
11053 (i386_pe_asm_lto_end): Likewise.
11054
11055 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11056 Richard Biener <rguenther@suse.de>
11057
11058 PR middle-end/84955
11059 * lto-streamer-out.c (output_function): Fix CFG loop state before
11060 streaming out.
11061 * omp-expand.c (expand_oacc_for): Handle calls to internal
11062 functions like regular functions.
11063
11064 2018-04-12 Richard Biener <rguenther@suse.de>
11065
11066 PR lto/85371
11067 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11068 for the early LTO debug to properly generate references to it
11069 during DIE emission. Do not re-use that for the skeleton for
11070 split-dwarf.
11071 (dwarf2out_early_finish): Likewise.
11072
11073 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11074
11075 PR target/85328
11076 * config/i386/sse.md
11077 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11078 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11079 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11080 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11081 and output is a reg, avoid creating invalid lowpart subreg, but
11082 instead split into a 512-bit move. Don't split if not AVX512VL,
11083 input is xmm16+ reg and output is a mem.
11084 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11085 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11086 xmm16+ reg and output is a mem.
11087
11088 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11089
11090 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11091 also for flag_dwarf2_cfi_asm.
11092
11093 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11094
11095 PR rtl-optimization/85342
11096 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11097 a bool scalar var inside of the loop instead. Don't try to update
11098 recog_data.operand after failed apply_change_group.
11099
11100 2018-04-12 Tom de Vries <tom@codesourcery.com>
11101
11102 PR target/85296
11103 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11104 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11105 array with flexible array member as array without given dimension.
11106 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11107 argument for undefined param to true.
11108
11109 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11110
11111 PR target/85321
11112 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11113 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11114 from PowerPC section.
11115 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11116 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11117 help text that is too long.
11118 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11119 help text that is too long.
11120 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11121 help text that is too long.
11122
11123 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11124
11125 * config/alpha/alpha.md (stack_probe_internal): Rename
11126 from "probe_stack". Update all callers.
11127
11128 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11129
11130 PR rtl-optimization/84566
11131 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11132 sched_macro_fuse_insns.
11133
11134 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11135
11136 PR target/84301
11137 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11138 (compute_block_dependences): ... from here.
11139
11140 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11141
11142 PR tree-optimization/85331
11143 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11144 from int to HOST_WIDE_INT.
11145
11146 2018-04-11 Martin Jambor <mjambor@suse.cz>
11147
11148 PR ipa/84149
11149 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11150 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11151 not the same as the source val.
11152 (cgraph_edge_brings_value_p): New parameter.
11153 (gather_edges_for_value): Pass destination value to
11154 cgraph_edge_brings_value_p.
11155 (perhaps_add_new_callers): Likewise.
11156 (get_info_about_necessary_edges): Likewise and exclude values brought
11157 only by self-recursive edges.
11158 (create_specialized_node): Redirect only clones of self-calling edges.
11159 (+self_recursive_pass_through_p): New function.
11160 (find_more_scalar_values_for_callers_subset): Use it.
11161 (find_aggregate_values_for_callers_subset): Likewise.
11162 (known_aggs_to_agg_replacement_list): Removed.
11163 (decide_whether_version_node): Re-calculate known constants for all
11164 remaining context clones.
11165
11166 2018-04-11 Richard Biener <rguenther@suse.de>
11167
11168 PR lto/85339
11169 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11170 from early DWARF output.
11171 (dwarf2out_early_finish): Output line info unconditionally into
11172 early DWARF and add reference to it.
11173
11174 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11175
11176 PR target/85281
11177 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11178 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11179 other than V2DFmode using iptr mode attribute.
11180 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11181
11182 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11183
11184 PR rtl-optimization/84659
11185 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11186
11187 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11188
11189 PR debug/85302
11190 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11191 SIZEP is NULL.
11192 (output_loc_list): Pass address of a dummy size variable even in the
11193 locview handling loop.
11194 (index_location_lists): Add comment on why skip_loc_list_entry can't
11195 call size_of_locs.
11196
11197 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11198
11199 PR target/85261
11200 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11201 into register.
11202
11203 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11204
11205 PR target/85321
11206 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11207 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11208 and -mstring-compare-inline-limit.
11209
11210 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11211
11212 PR target/85287
11213 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11214 for stack clash protection in a register whenever we need it to be in
11215 a register.
11216
11217 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11218
11219 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11220 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11221
11222 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11223
11224 PR target/85321
11225 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11226 the help text.
11227 (mlong-double-): Ditto.
11228 * config/rs6000/sysv4.opt (msdata=): Ditto.
11229 (mtls-size=): Ditto.
11230
11231 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11232
11233 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11234 erroneous entries for
11235 "vector int vec_ldl (int, long int *)", and
11236 "vector unsigned int vec_ldl (int, unsigned long int *)".
11237 Add comments and entries for
11238 "vector bool char vec_ldl (int, bool char *)",
11239 "vector bool short vec_ldl (int, bool short *)",
11240 "vector bool int vec_ldl (int, bool int *)",
11241 "vector bool long long vec_ldl (int, bool long long *)",
11242 "vector pixel vec_ldl (int, pixel *)",
11243 "vector long long vec_ldl (int, long long *)",
11244 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11245 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11246 type tree bool_long_long_type_node and correct definition of
11247 bool_V2DI_type_node to make reference to this new type tree.
11248 (rs6000_mangle_type): Replace erroneous reference to
11249 bool_long_type_node with bool_long_long_type_node.
11250 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11251 comments to emphasize sign distinctions for char and int types and
11252 replace RS6000_BTI_bool_long constant with
11253 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11254 use of RS6000_BTI_pixel.
11255 (bool_long_type_node): Remove this macro definition.
11256 (bool_long_long_type_node): New macro definition
11257
11258 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11259
11260 PR rtl-optimization/85300
11261 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11262 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11263 simplify_unary_operation fails.
11264
11265 2018-04-10 Martin Liska <mliska@suse.cz>
11266
11267 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11268 cgraph_edge and ipa_ref.
11269
11270 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11271
11272 PR target/85177
11273 PR target/85255
11274 * config/i386/sse.md
11275 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11276 computation of the VEC_MERGE selector from mask.
11277 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11278 Fix decoding of the VEC_MERGE selector into mask.
11279
11280 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11281
11282 PR tree-optimization/85286
11283 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11284
11285 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11286
11287 * final.c (final_1): Set insn_last_address as well as
11288 insn_current_address.
11289
11290 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11291
11292 PR target/85173
11293 * explow.c (emit_stack_probe): Call validize_mem on memory location
11294 before passing it to gen_probe_stack. Create address operand and
11295 legitimize it for the probe_stack_address case.
11296
11297 2018-04-09 Jan Hubicka <jh@suse.cz>
11298
11299 PR lto/85078
11300 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11301 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11302 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11303 walk basetypes.
11304 (free_lang_data): Rebuild type inheritance graph.
11305
11306 2018-04-09 Martin Sebor <msebor@redhat.com>
11307
11308 * invoke.texi (-finline-small-functions): Mention other optimization
11309 options.
11310 (-findirect-inlining, -fpartial-inlining): Same.
11311 (-finline-functions-called-once): Same.
11312 (-freorder-blocks-and-partition): Same.
11313
11314 2018-04-09 Jan Hubicka <jh@suse.cz>
11315
11316 PR rtl/84058
11317 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11318 jumps; choose last target that matches the criteria (i.e.
11319 no partition changes for non-crossing jumps).
11320 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11321 support for redirecting crossing jumps to non-crossing.
11322
11323 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11324
11325 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11326 also for naked functions.
11327
11328 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11329
11330 * config/arc/arc.md (add_shift): New pattern.
11331 (add_shift2): Likewise.
11332 (sub_shift): Likewise.
11333 (sub_shift_cmp0_noout): Likewise.
11334 (compare_si_ashiftsi): Likewise.
11335 (xbfu_cmp0_noout): New combine pattern.
11336 (xbfu_cmp0"): Likewise.
11337 (movsi_set_cc_insn): Place the predicable variant first.
11338 (commutative_binary_cmp0_noout): Remove clobber.
11339 (commutative_binary_cmp0): New pattern.
11340 (noncommutative_binary_cmp0): Likewise.
11341 (noncommutative_binary_cmp0_noout): Likewise.
11342 (noncommutative_binary_comparison_result_used): Removed.
11343 (rsub_cmp0): New pattern.
11344 (rsub_cmp0_noout): Likewise.
11345 (extzvsi): Changed, keep only meaningful variants.
11346 (SQH, SEZ): New iterators.
11347 (SQH_postfix): New mode attribute.
11348 (SEZ_prefix): New code attribute.
11349 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11350 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11351 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11352 of numerical value.
11353 (noncommutative_operator): Check the availability of barrel
11354 shifter option.
11355
11356 2018-04-09 Richard Biener <rguenther@suse.de>
11357
11358 PR tree-optimization/85284
11359 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11360 Only use the niter constraining form of simple_iv when the exit
11361 is always executed.
11362
11363 2018-04-09 Tom de Vries <tom@codesourcery.com>
11364
11365 PR target/84041
11366 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11367 (define_expand "*memory_barrier"): New define_expand.
11368 (define_insn "memory_barrier"): New insn.
11369
11370 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11371
11372 PR rtl-optimization/80463
11373 PR rtl-optimization/83972
11374 PR rtl-optimization/83480
11375
11376 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11377 correct producer for the insn.
11378 (tidy_control_flow): Fixup seqnos in case of debug insns.
11379
11380 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11381
11382 PR rtl-optimization/83913
11383
11384 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11385 different sched-times when merging exprs.
11386
11387 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11388
11389 PR rtl-optimization/83962
11390
11391 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11392 tidy_fallthru_edge and tidy_control_flow.
11393
11394 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11395
11396 PR rtl-optimization/83530
11397
11398 * sel-sched.c (force_next_insn): New global variable.
11399 (remove_insn_for_debug): When force_next_insn is true, also leave only
11400 next insn in the ready list.
11401 (sel_sched_region): When the region wasn't scheduled, make another pass
11402 over it with force_next_insn set to 1.
11403
11404 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11405
11406 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11407 into tm_file.
11408 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11409 for interrupt control.
11410 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11411 functions for interrupt control.
11412 * config/nds32/nds32-intrinsic.md: Likewise.
11413 * config/nds32/nds32_intrinsic.h: Likewise.
11414 * config/nds32/nds32.h (nds32_builtins): Likewise.
11415
11416 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11417
11418 * config/nds32/nds32.c (nds32_init_machine_status,
11419 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11420 strict_aligned_p field.
11421 (nds32_expand_to_rtl_hook): New function.
11422 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11423 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11424
11425 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11426 Chung-Ju Wu <jasonwucj@gmail.com>
11427
11428 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11429 * config/nds32/nds32-n7.md: New file.
11430 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11431 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11432 pipeline.
11433 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11434 * config/nds32/nds32.md (pipeline_model): Add n7.
11435 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11436 * config/nds32/pipelines.md: Include n7 settings.
11437
11438 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11439 Chung-Ju Wu <jasonwucj@gmail.com>
11440
11441 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11442 * config/nds32/nds32-e8.md: New file.
11443 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11444 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11445 pipeline.
11446 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11447 * config/nds32/nds32.md (pipeline_model): Add e8.
11448 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11449 * config/nds32/pipelines.md: Include e8 settings.
11450
11451 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11452 Chung-Ju Wu <jasonwucj@gmail.com>
11453
11454 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11455 * config/nds32/nds32-n8.md: New file.
11456 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11457 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11458 pipeline.
11459 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11460 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11461 * config/nds32/nds32.md (pipeline_model): Add n8.
11462 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11463 * config/nds32/pipelines.md: Include n8 settings.
11464
11465 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11466 Chung-Ju Wu <jasonwucj@gmail.com>
11467
11468 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11469 * config/nds32/nds32-n9-2r1w.md: New file.
11470 * config/nds32/nds32-n9-3r2w.md: New file.
11471 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11472 nds32_register_ports): New or modify for cpu n9.
11473 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11474 pipeline.
11475 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11476 * config/nds32/nds32-utils.c: New file.
11477 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11478 TARGET_MUL_SLOW): Define.
11479 * config/nds32/nds32.md (pipeline_model): New attribute.
11480 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11481 New options that support cpu n9.
11482 * config/nds32/pipelines.md: Include n9 settings.
11483 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11484
11485 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11486
11487 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11488 information if necessary.
11489 (output_cond_branch_compare_zero): Likewise.
11490 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11491 (nds32_target_alignment): Refine for alignment.
11492 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11493 (FUNCTION_BOUNDARY): Modify.
11494 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11495 align case.
11496 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11497
11498 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11499
11500 * config/nds32/constants.md (unspec_volatile_element): Add values for
11501 TLB operation and data prefetch.
11502 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11503 functions for TLB operation and data prefetch.
11504 * config/nds32/nds32-intrinsic.md: Likewise.
11505 * config/nds32/nds32_intrinsic.h: Likewise.
11506 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11507 (nds32_print_operand): Likewise.
11508 * config/nds32/nds32.h (nds32_builtins): Likewise.
11509
11510 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11511 Andrew Pinski <pinsika@gcc.gnu.org>
11512
11513 PR middle-end/82976
11514 * match.pd: Use constant_boolean_node of correct type instead of
11515 boolean_true_node or boolean_false_node for simplifying
11516 pointer comparisons to zero.
11517
11518 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11519
11520 PR tree-optimization/80021
11521 * tree.c (verify_type_variant): Make error call in verify_variant_match
11522 translatable and remove final full stop.
11523
11524 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11525
11526 * config/nds32/constants.md (unspec_volatile_element): Add
11527 UNSPEC_VOLATILE_EH_RETURN.
11528 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11529 nds32_output_stack_pop): Support dwarf exception handling process.
11530 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11531 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11532 exception handling process.
11533 (nds32_compute_stack_frame): Likewise.
11534 (nds32_return_addr_rtx): Likewise.
11535 (nds32_initial_elimination_offset): Likewise.
11536 (nds32_expand_prologue): Likewise.
11537 (nds32_expand_epilogue): Likewise.
11538 (nds32_dynamic_chain_address): New function.
11539 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11540 exception handling.
11541 (DYNAMIC_CHAIN_ADDRESS): Define.
11542 (EH_RETURN_DATA_REGNO): Define.
11543 (EH_RETURN_STACKADJ_RTX): Define.
11544 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11545 patterns for dwarf exception handling.
11546
11547 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11548
11549 * config/nds32/nds32.h: Clean up obsolete macros.
11550
11551 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11552
11553 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11554 Add enum values for particular instructions.
11555 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11556 particular intrinsic functions.
11557 * config/nds32/nds32-intrinsic.md: Likewise.
11558 * config/nds32/nds32_intrinsic.h: Likewise.
11559 * config/nds32/nds32.h (nds32_builtins): Likewise.
11560 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11561 (btst, ave): New patterns for particular instructions.
11562
11563 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11564
11565 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11566 Add enum values for atomic load/store and memory sync.
11567 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11568 and memory sync.
11569 * config/nds32/nds32-intrinsic.md: Likewise.
11570 * config/nds32/nds32_intrinsic.h: Likewise.
11571 * config/nds32/nds32.h (nds32_builtins): Likewise.
11572
11573 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11574
11575 PR tree-optimization/85257
11576 * fold-const.c (native_encode_vector): If not all elts could fit
11577 and off is -1, return 0 rather than offset.
11578 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11579 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11580 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11581 adjust buffer in native_interpret_expr call.
11582
11583 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11584
11585 * config/nds32/constants.md (unspec_volatile_element): Add cache
11586 control enum values.
11587 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11588 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11589 * config/nds32/nds32.c (nds32_cctl_names): New.
11590 (nds32_print_operand): Handle cache control register names.
11591 * config/nds32/nds32.h (nds32_builtins): New enum values.
11592 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11593 macros.
11594 * config/nds32/nds32.md (type): Add mmu.
11595 * config/nds32/pipelines.md (simple_insn): Add mmu.
11596
11597 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11598
11599 * config/nds32/nds32.md (type): Remove call.
11600 * config/nds32/pipelines.md (simple_insn): Likewise.
11601
11602 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11603
11604 * config/nds32/constants.md (unspec_volatile_element): Add
11605 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11606 UNSPEC_VOLATILE_FMFCFG.
11607 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11608 description for fmfcfg and fmfcsr.
11609 (bdesc_1arg): Add fmtcsr.
11610 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11611 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11612 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11613 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11614 unspec_fmfcfg): New patterns.
11615 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11616 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11617 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11618 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11619 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11620 __nds32__fmfcfg): Define.
11621
11622 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11623
11624 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11625 intrinsic register names.
11626 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11627 intrinsic register enum values and macros.
11628
11629 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11630
11631 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11632 for load/store addressing form.
11633 (nds32_print_operand_address): Likewise.
11634
11635 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11636
11637 PR target/85196
11638 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11639 based on LABEL_REF. Remove useless assertion.
11640 (pic_address_needs_scratch): Fix formatting.
11641 (sparc_legitimize_pic_address): Minor tweaks.
11642 (sparc_delegitimize_address): Adjust assertion accordingly.
11643 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11644 into symbolic_operand.
11645 (movsi_high_pic_label_ref): Likewise.
11646 (movsi_lo_sum_pic_label_ref): Likewise.
11647 (movdi_pic_label_ref): Likewise.
11648 (movdi_high_pic_label_ref): Likewise.
11649 (movdi_lo_sum_pic_label_ref): Likewise.
11650
11651 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11652
11653 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11654 custom LIB_SPEC setup.
11655
11656 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11657 Kito Cheng <kito.cheng@gmail.com>
11658
11659 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11660 * config/riscv/freebsd.h: New.
11661
11662 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11663
11664 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11665 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11666 file.
11667
11668 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11669 Kito Cheng <kito.cheng@gmail.com>
11670
11671 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11672 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11673 * config/nds32/nds32-protos.h (nds32_output_call,
11674 nds32_output_return): Declare.
11675 * config/nds32/nds32.md: Refine all the call and return patterns.
11676
11677 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11678
11679 PR debug/85252
11680 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11681 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11682
11683 PR rtl-optimization/84872
11684 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11685 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11686 EDGE_CROSSING edge.
11687
11688 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11689
11690 * expr.c (copy_blkmode_to_reg): Revert 254862.
11691 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11692
11693 2018-04-06 Richard Biener <rguenther@suse.de>
11694
11695 PR middle-end/85244
11696 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11697 after seeing a component reference with an adjacent field. Treat
11698 refs to arrays at struct end of external decls similar to
11699 refs to unconstrained commons.
11700
11701 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11702
11703 PR sanitizer/85213
11704 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11705 look through SAVE_EXPRs with non-side-effects argument. Adjust
11706 recursive calls.
11707 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11708 save_p here.
11709
11710 2018-04-06 Richard Biener <rguenther@suse.de>
11711
11712 PR middle-end/85180
11713 * alias.c (find_base_term): New wrapper around find_base_term
11714 unwinding CSELIB_VAL_PTR changes.
11715 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11716 recursion.
11717
11718 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11719
11720 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11721 instructions.
11722 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11723 constant definitions.
11724 ("nop"): lr 0,0 -> nopr r0
11725 ("nop_lr0", "nop_lr1"): New insn definitions.
11726
11727 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11728
11729 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11730 NDS32_V3PUSH_AVAILABLE_P macro.
11731
11732 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11733 Chung-Ju Wu <jasonwucj@gmail.com>
11734
11735 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11736 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11737 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11738 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11739 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11740 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11741 * config/nds32/constraints.md: New constraints and checking for hard
11742 float configuration.
11743 * config/nds32/iterators.md: New mode iterator and attribute for hard
11744 float configuration.
11745 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11746 patterns.
11747 * config/nds32/nds32-fpu.md: New file.
11748 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11749 deal with hard float code generation.
11750 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11751 ARCH_V3S.
11752 (abi_type, float_reg_number): New enum type.
11753 * config/nds32/nds32-predicates.c: New predicates for hard float.
11754 * config/nds32/nds32-protos.h: Declare functions for hard float.
11755 * config/nds32/nds32.c: Implementation for hard float configuration.
11756 * config/nds32/nds32.h: Definitions for hard float configuration.
11757 * config/nds32/nds32.md: Include hard float machine description and
11758 modify patterns for hard float configuration.
11759 * config/nds32/nds32.opt: New options for hard float configuration.
11760 * config/nds32/predicates.md: New predicates for hard float
11761 configuration.
11762
11763 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11764
11765 * common/config/nds32/nds32-common.c
11766 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11767
11768 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11769
11770 PR middle-end/85195
11771 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11772 CONSTRUCTOR_ELT (ctor, ...)->value.
11773
11774 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11775
11776 PR target/85193
11777 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11778
11779 2018-04-05 Tom de Vries <tom@codesourcery.com>
11780
11781 PR target/85204
11782 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11783 cond jump.
11784
11785 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11786 Kito Cheng <kito.cheng@gmail.com>
11787
11788 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11789 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11790 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11791 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11792
11793 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11794 Kito Cheng <kito.cheng@gmail.com>
11795
11796 * config/nds32/constraints.md (Ufe): New memory constraint.
11797 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11798 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11799 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11800 operands.
11801 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11802 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11803
11804 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11805
11806 * config/nds32/nds32.md: Use optimize_size in the condition for
11807 alu-shift instructions.
11808
11809 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11810
11811 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11812
11813 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11814
11815 * config/nds32/nds32.md (negsi2): Refine pattern.
11816
11817 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11818 Chung-Ju Wu <jasonwucj@gmail.com>
11819
11820 * config/nds32/iterators.md (shift_rotate): New code iterator.
11821 (shift): New code attribute.
11822 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11823 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11824 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11825 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11826 bit-wise operations.
11827 (andsi3, *andsi3): Ditto.
11828 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11829 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11830 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11831 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11832 nds32_ior_operand, nds32_xor_operand): New predicates.
11833
11834 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11835
11836 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11837 (addsi3, subsi3): ... this.
11838
11839 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11840
11841 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11842
11843 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11844
11845 * config/nds32/nds32.md: Adjust indention.
11846
11847 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11848
11849 * config/nds32/nds32.md (feature): New attribute.
11850
11851 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11852
11853 * config/nds32/nds32.md (subtype): New attribute.
11854
11855 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11856
11857 PR target/85203
11858 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11859 expansion to perform a bitwise AND of the argument followed by a
11860 boolean negation of the result.
11861
11862 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11863
11864 PR rtl-optimization/84878
11865 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11866 the basic block. Assert the use reference is not artificial and that
11867 it has an associated insn.
11868
11869 2018-04-04 Michael Matz <matz@suse.de>
11870
11871 * builtins.c (compute_objsize): Pass correct operand
11872 to array_at_struct_end_p.
11873
11874 2018-04-04 Richard Biener <rguenther@suse.de>
11875
11876 PR lto/85176
11877 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11878 from contexts for DINFO_LEVEL_TERSE and below.
11879
11880 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11881
11882 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11883 resiter_operand condition.
11884 * config/nds32/nds32.md (*move<mode>): Ditto.
11885
11886 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11887 Monk Chiang <sh.chiang04@gmail.com>
11888
11889 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11890
11891 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11892
11893 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11894
11895 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11896 Kito Cheng <kito.cheng@gmail.com>
11897
11898 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11899 nds32_cond_code_str, output_cond_branch,
11900 output_cond_branch_compare_zero, nds32_expand_cbranch,
11901 nds32_expand_cstore, nds32_expand_movcc,
11902 nds32_output_cbranchsi4_equality_zero,
11903 nds32_output_cbranchsi4_equality_reg,
11904 nds32_output_cbranchsi4_equality_reg_or_const_int,
11905 nds32_output_cbranchsi4_greater_less_zero: New functions.
11906 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11907 nds32_expand_cstore, nds32_expand_movcc,
11908 nds32_output_cbranchsi4_equality_zero,
11909 nds32_output_cbranchsi4_equality_reg,
11910 nds32_output_cbranchsi4_equality_reg_or_const_int,
11911 nds32_output_cbranchsi4_greater_less_zero): Declare.
11912 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11913 nds32_rimm11s_operand): New predicates.
11914 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11915 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11916 patterns.
11917
11918 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11919
11920 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11921 * config/nds32/nds32.md: Ditto.
11922 * config/nds32/pipelines.md: Ditto.
11923
11924 2018-04-04 Richard Biener <rguenther@suse.de>
11925
11926 PR tree-optimization/85168
11927 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
11928 propagating abnormals.
11929
11930 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11931
11932 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
11933
11934 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11935 Kito Cheng <kito.cheng@gmail.com>
11936
11937 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
11938 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
11939 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
11940 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
11941 * config/nds32/nds32.md (sibcall_internal): New.
11942 (sibcall_register): Remove.
11943 (sibcall_immediate): Remove.
11944 (sibcall_value_internal): New.
11945 (sibcall_value_register): Remove.
11946 (sibcall_value_immediate): Remove.
11947 * config/nds32/predicates.md (nds32_general_register_operand): New.
11948 (nds32_call_address_operand): New.
11949
11950 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11951
11952 PR rtl-optimization/85167
11953 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
11954 bb_defs if *split_p, instead preinitialize it to NULL.
11955
11956 PR tree-optimization/85156
11957 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
11958 evaluating the argument multiple times.
11959
11960 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
11961
11962 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
11963 than vector.
11964 (_mm_cvtpd_ps): Likewise.
11965 (_mm_cvttpd_epi32): Likewise.
11966 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
11967 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
11968 vector, pixel, and bool following altivec.h include.
11969
11970 2018-04-03 Martin Sebor <msebor@redhat.com>
11971
11972 * doc/extend.texi (Common Function Attributes): Clarify.
11973 (const attribute): Likewise.
11974 (pure attribute): Likewise.
11975
11976 2018-04-03 Jakub Jelinek <jakub@redhat.com>
11977
11978 PR target/85169
11979 * config/i386/i386.c (ix86_expand_vector_set): Use
11980 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
11981
11982 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
11983
11984 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
11985 instructions when changing rounding bits to preserve precision bits
11986 in the x87 control word.
11987
11988 2018-04-03 Martin Liska <mliska@suse.cz>
11989
11990 PR tree-optimization/82491
11991 * rtl.h (strip_offset_and_add): Replace += suboffset with
11992 poly_uint64 () + suboffset.
11993
11994 2018-03-29 Martin Liska <mliska@suse.cz>
11995 Martin Jambor <mjambor@suse.cz>
11996
11997 PR ipa/84947
11998 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
11999 param_type is not an integral or pointer type.
12000
12001 2018-04-03 Richard Biener <rguenther@suse.de>
12002
12003 * sese.h (recompute_all_dominators): Remove.
12004
12005 2018-04-02 Martin Sebor <msebor@redhat.com>
12006
12007 * doc/invoke.texi (-Wrestrict): Fix typos.
12008
12009 2018-04-02 Jim Wilson <jimw@sifive.com>
12010
12011 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12012 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12013 (<optab>di3, <optab>si3_extend): Likewise.
12014 (<optab>si3_mask, <optab>si3_mask_1): New.
12015 (<optab>di3_mask, <optab>di3_mask_1): New.
12016 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12017 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12018 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12019
12020 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12021
12022 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12023 example.
12024
12025 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12026
12027 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12028 (nds32_canonicalize_comparison): New function.
12029
12030 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12031 Kito Cheng <kito.cheng@gmail.com>
12032 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12033
12034 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12035 * config/nds32/constants.md (unspec_volatile_element): Add
12036 UNSPEC_VOLATILE_RELAX_GROUP.
12037 * config/nds32/nds32-relax-opt.c: New file.
12038 * config/nds32/nds32-predicates.c
12039 (nds32_symbol_load_store_p): New function.
12040 * config/nds32/nds32-protos.h
12041 (nds32_symbol_load_store_p): Declare function.
12042 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12043 * config/nds32/nds32.c
12044 (nds32_register_pass): New function to register pass.
12045 (nds32_register_passes): New function to register passes.
12046 * config/nds32/nds32.md (relax_group): New pattern.
12047 * config/nds32/nds32.opt (mrelax-hint): New option.
12048 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12049
12050 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12051
12052 * config/nds32/t-nds32: Modify files dependency.
12053
12054 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12055
12056 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12057 (PROFILE_HOOK): Define its implementation.
12058
12059 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12060
12061 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12062 type and 32-bit size.
12063
12064 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12065
12066 PR middle-end/85090
12067 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12068 (V_128_256): New mode iterator.
12069 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12070 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12071 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12072 of V.
12073 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12074 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12075
12076 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12077
12078 PR target/83315
12079 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12080 NaN inputs correctly.
12081
12082 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12083
12084 PR target/80546
12085 * config/rs6000/vsx.md (??r): New mode attribute.
12086 (*vsx_mov<mode>_64bit): Use it.
12087 (*vsx_mov<mode>_32bit): Likewise.
12088
12089 2018-03-30 Martin Sebor <msebor@redhat.com>
12090
12091 PR tree-optimization/84818
12092 * builtins.c (check_access): Use warning_n.
12093
12094 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12095
12096 PR target/83822
12097 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12098 condition.
12099 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12100 condition.
12101
12102 2018-03-30 Julia Koval <julia.koval@intel.com>
12103
12104 PR target/84413
12105 * x86-tune.def (movx, partial_reg_dependency): Enable for
12106 m_SKYLAKE_AVX512.
12107
12108 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12109
12110 PR inline-asm/84985
12111 * lra-constraints.c (process_alt_operands): Move setting
12112 this_alternative_matches below.
12113
12114 2018-03-29 Martin Liska <mliska@suse.cz>
12115
12116 PR lto/84995.
12117 * doc/invoke.texi: Document how LTO works with debug info.
12118 Describe auto-load support of binutils. Mention 'x86-64'
12119 as valid option value of -march option.
12120
12121 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12122
12123 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12124
12125 PR c/85094
12126 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12127 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12128 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12129 checking.
12130
12131 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12132
12133 PR target/84912
12134 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12135 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12136 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12137 for RS6000_BTM_POWERPC64.
12138 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12139 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12140 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12141 definition.
12142 (DIVDE): Use it.
12143 (DIVDEU): Likewise.
12144
12145 2018-03-28 Carl Love <cel@us.ibm.com>
12146
12147 Revert
12148 2017-09-27 Carl Love <cel@us.ibm.com>
12149
12150 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12151 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12152 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12153 fctiw instruction.
12154
12155 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12156
12157 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12158 instead of __vector bool.
12159 (_mm_max_pu8): Likewise.
12160 (_mm_min_pi16): Likewise.
12161
12162 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12163
12164 PR target/84912
12165 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12166 (DIVWEUO): Likewise.
12167 (DIVDEO): Likewise.
12168 (DIVDEUO): Likewise.
12169 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12170 DIVWEUO and DIVDEUO.
12171 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12172 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12173 (div_extend): Likewise.
12174 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12175 builtin function.
12176 (__builtin_divweuo): Likewise.
12177 (__builtin_divdeo): Likewise.
12178 (__builtin_divdeuo): Likewise.
12179
12180 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12181
12182 PR target/85095
12183 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12184 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12185
12186 PR tree-optimization/82004
12187 * gimple-match-head.c (optimize_pow_to_exp): New function.
12188 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12189 Don't fold to exp if optimize_pow_to_exp is false.
12190
12191 2018-03-28 Martin Liska <mliska@suse.cz>
12192
12193 PR other/84819
12194 * calls.c (initialize_argument_information): Fix trailing space.
12195 * common.opt: Fix typo and provide better explanation for
12196 -fsanitize-coverage option.
12197 * config/i386/i386.opt: Fix typo.
12198
12199 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12200 Martin Liska <mliska@suse.cz>
12201
12202 PR sanitizer/85081
12203 * gimplify.c (asan_poison_variable): Don't do the check for
12204 gimplify_omp_ctxp here.
12205 (gimplify_decl_expr): Do it here.
12206 (gimplify_target_expr): Likewise.
12207
12208 2018-03-28 Martin Liska <mliska@suse.cz>
12209
12210 PR target/84988
12211 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12212 chkp_type_bounds_count if MPX is not enabled.
12213
12214 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12215
12216 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12217
12218 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12219
12220 PR target/84914
12221 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12222 function to create the function decl for complex long double
12223 multiply and divide for -mabi=ieeelongdouble.
12224 (init_float128_ieee): Call it.
12225
12226 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12227
12228 PR target/85044
12229 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12230 -fcf-protection=branch -mibt.
12231 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12232
12233 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12234
12235 PR target/81863
12236 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12237 arm_word_relocations.
12238
12239 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12240
12241 PR target/85056
12242 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12243 extern array declarations.
12244
12245 2018-03-27 Richard Biener <rguenther@suse.de>
12246
12247 PR middle-end/84067
12248 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12249 explicit single_use checks.
12250
12251 2018-03-27 Richard Biener <rguenther@suse.de>
12252
12253 PR tree-optimization/85082
12254 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12255 Valueize the VUSE.
12256
12257 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12258
12259 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12260 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12261 Turn on fasynchronous-unwind-tables and funwind-tables.
12262
12263 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12264
12265 PR target/85073
12266 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12267 (*bmi_blsr_<mode>_ccz): Ditto.
12268
12269 2018-03-26 Tom de Vries <tom@codesourcery.com>
12270
12271 PR tree-optimization/85063
12272 * omp-general.c (offloading_function_p): New function. Factor out
12273 of ...
12274 * omp-offload.c (pass_omp_target_link::gate): ... here.
12275 * omp-general.h (offloading_function_p): Declare.
12276 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12277 with attribute omp declare target for offloading functions.
12278
12279 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12280
12281 PR tree-optimization/84005
12282 * tree-data-ref.h (get_base_for_alignment): Declare.
12283 * tree-data-ref.c (get_base_for_alignment_1): New function.
12284 (get_base_for_alignment): Likewise.
12285 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12286 get_base_for_alignment to find a suitable base object, instead
12287 of always using drb->base_address.
12288
12289 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12290
12291 PR inline-asm/85022
12292 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12293 known size by default.
12294
12295 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12296
12297 PR inline-asm/85030
12298 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12299 and non BLKmode operands.
12300
12301 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12302
12303 PR target/85026
12304 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12305 Clean up attributes.
12306
12307 2018-03-23 Richard Biener <rguenther@suse.de>
12308
12309 PR debug/85020
12310 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12311 we are going to emit early debug for LTO.
12312
12313 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12314
12315 PR inline-asm/85034
12316 * function.c (match_asm_constraints_1): Don't optimize if input
12317 doesn't satisfy general_operand predicate for output's mode.
12318
12319 PR inline-asm/85022
12320 * alias.c (write_dependence_p): Don't require for x_canonicalized
12321 non-VOIDmode if x has VOIDmode.
12322
12323 PR sanitizer/85029
12324 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12325 just don't try to optimize it rather than assert it never happens.
12326
12327 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12328
12329 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12330 macro expansions for definition of ST_INTERNAL_<mode> and
12331 LD_INTERNAL_<mode> builtins.
12332 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12333 Remove prototype.
12334 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12335 function.
12336 (altivec_expand_st_builtin): Likewise.
12337 (altivec_expand_builtin): Remove calls to deleted functions.
12338 (rs6000_address_for_altivec): Delete this function.
12339 * config/rs6000/vector.md: Remove expands for
12340 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12341
12342 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12343
12344 PR target/84826
12345 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12346 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12347 re-computing once computed.
12348 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12349 (arm_init_machine_status): Initialize
12350 machine->static_chain_stack_bytes.
12351
12352 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12353
12354 PR target/84760
12355 * doc/extend.texi: Add four new prototypes for vec_ld.
12356 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12357 definitions for more logical presentation.
12358 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12359 entries for V1TI variants of __builtin_altivec_ld builtin.
12360 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12361 handling of V1TI variant of LVX icode pattern.
12362 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12363 (rs6000_gimple_fold_builtin): Likewise.
12364 (altivec_init_builtins): Add code to define
12365 __builtin_altivec_lvx_v1ti function.
12366
12367 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12368
12369 PR inline-asm/84941
12370 * function.c (match_asm_constraints_1): Don't do the optimization
12371 if input isn't a REG, SUBREG, MEM or constant.
12372
12373 2018-03-22 Tom de Vries <tom@codesourcery.com>
12374
12375 PR tree-optimization/84956
12376 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12377 bb_has_abnormal_pred.
12378
12379 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12380
12381 PR sanitizer/85018
12382 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12383 DECL_INITIAL (decl) to decl at the end.
12384 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12385 adjust the comment.
12386
12387 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12388
12389 * doc/extend.texi (__builtin_tgmath): Document when complex
12390 integer types are treated as _Complex _Float64.
12391
12392 2018-03-21 Tom de Vries <tom@codesourcery.com>
12393
12394 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12395
12396 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12397
12398 PR tree-optimization/84960
12399 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12400 if it is ENTRY block, move them into single succ of ENTRY in that case.
12401
12402 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12403
12404 PR tree-optimization/84811
12405 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12406 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12407 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12408 (known_subrange_p): Update accordingly. Cast each value involved
12409 in the size comparison, rather than casting the result of the
12410 subtraction.
12411
12412 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12413
12414 PR tree-optimization/84982
12415 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12416 by flipping the least significant bit rather than all bits from
12417 bitpos to bitpos + bitsize - 1.
12418
12419 2018-03-21 Nathan Sidwell <nathan@acm.org>
12420
12421 * doc/extend.texi (Deprecated Features): Remove mention of
12422 long-deleted deprecations.
12423
12424 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12425
12426 PR jit/84288
12427 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12428 * configure: Regenerate.
12429
12430 2018-03-21 Tom de Vries <tom@codesourcery.com>
12431
12432 PR tree-optimization/83126
12433 * tree-parloops.c (num_phis): New function.
12434 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12435
12436 2018-03-21 Nathan Sidwell <nathan@acm.org>
12437
12438 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12439 mention anon-struct/union members and trailing attributes.
12440
12441 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12442
12443 PR tree-optimization/84969
12444 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12445 builtin memset partitions if they set different rhs values.
12446
12447 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12448
12449 PR rtl-optimization/84989
12450 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12451 VEC_DUPLICATE with scalar result mode.
12452
12453 2018-03-21 Martin Liska <mliska@suse.cz>
12454
12455 PR ipa/84963
12456 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12457 not intended return statement.
12458
12459 2018-03-21 Martin Liska <mliska@suse.cz>
12460
12461 PR target/84988
12462 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12463 (chkp_find_bound_slots_1): Limit number of iterations.
12464
12465 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12466
12467 PR target/84838
12468 * Minor grammar fixes for x86 options.
12469
12470 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12471
12472 PR debug/84875
12473 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12474 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12475
12476 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12477
12478 PR target/83789
12479 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12480 (altivec_lvx_<mode>_1op): Likewise.
12481 (altivec_stvx_<mode>_2op): Likewise.
12482 (altivec_stvx_<mode>_1op): Likewise.
12483 (altivec_lvx_<VM2:mode>): New define_expand.
12484 (altivec_stvx_<VM2:mode>): Likewise.
12485 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12486 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12487 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12488 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12489 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12490 (rs6000_gen_lvx): Likewise.
12491 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12492 (altivec_expand_stv_builtin): Likewise.
12493 (altivec_expand_builtin): Likewise.
12494 * config/rs6000/vector.md: Likewise.
12495
12496 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12497
12498 PR target/82518
12499 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12500 BYTES_BIG_ENDIAN.
12501
12502 2018-03-20 Richard Biener <rguenther@suse.de>
12503
12504 PR target/84986
12505 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12506 sign-conversions as zero, fall back to standard scalar_stmt
12507 cost for the rest.
12508
12509 2018-03-20 Martin Liska <mliska@suse.cz>
12510
12511 PR ipa/84825
12512 * predict.c (rebuild_frequencies): Handle case when we have
12513 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12514
12515 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12516
12517 PR target/84990
12518 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12519 flag_section_anchors.
12520 * varasm.c (use_blocks_for_decl_p): Remove hack for
12521 dw2_force_const_mem.
12522
12523 PR target/84845
12524 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12525 to ...
12526 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12527 be created, use lowpart_subreg of operands[0] rather than operands[0]
12528 itself.
12529 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12530 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12531 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12532 and n constraint instead of aarch64_shift_imm_di and Usd.
12533 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12534 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12535
12536 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12537
12538 PR target/82989
12539 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12540 to favor GPR over NEON registers.
12541 (<shift>di3_neon): Likewise.
12542
12543 2018-03-20 Tom de Vries <tom@codesourcery.com>
12544
12545 PR target/84952
12546 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12547 (nvptx_process_pars): Emit bar.sync asap and alap.
12548
12549 2018-03-20 Tom de Vries <tom@codesourcery.com>
12550
12551 PR target/84954
12552 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12553 seen_label if seen_label is already set.
12554
12555 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12556
12557 PR target/84945
12558 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12559 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12560 Use 1U instead of 1. Formatting fixes.
12561
12562 PR c/84953
12563 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12564 instead of TREE_TYPE (s1) for the return value.
12565
12566 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12567
12568 PR tree-optimization/84946
12569 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12570 bitsize + bitsize in poly_uint64 rather than poly_int64.
12571
12572 PR sanitizer/78651
12573 * dwarf2asm.c: Include fold-const.c.
12574 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12575 of decl rather than decl itself.
12576
12577 PR rtl-optimization/84643
12578 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12579
12580 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12581
12582 PR sanitizer/78651
12583 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12584 calling assemble_variable.
12585
12586 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12587
12588 PR target/81647
12589 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12590 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12591
12592 2018-03-19 Jim Wilson <jimw@sifive.com>
12593
12594 PR bootstrap/84856
12595 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12596 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12597 (riscv_first_stack_step): Likewise.
12598 (riscv_option_override): Use STACK_BOUNDARY instead of
12599 MIN_STACK_BOUNDARY.
12600 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12601 MIN_STACK_BOUNDARY.
12602 (BIGGEST_ALIGNMENT): Set to 128.
12603 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12604 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12605 STACK_BOUNDARY.
12606
12607 2018-03-19 Richard Biener <rguenther@suse.de>
12608
12609 PR tree-optimization/84933
12610 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12611 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12612
12613 2018-03-19 Richard Biener <rguenther@suse.de>
12614
12615 PR tree-optimization/84859
12616 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12617 (cond_if_else_store_replacement): Perform sinking operation on
12618 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12619 Generalize what a BB with a single eligible store is.
12620
12621 2018-03-19 Richard Biener <rguenther@suse.de>
12622
12623 PR tree-optimization/84929
12624 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12625 chrec_is_positive against non-chrec arg.
12626
12627 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12628
12629 PR target/84711
12630 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12631
12632 2018-03-18 Martin Liska <mliska@suse.cz>
12633
12634 PR rtl-optimization/84635
12635 * regrename.c (build_def_use): Use matches_mode only when
12636 matches >= 0.
12637
12638 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12639
12640 PR tree-optimization/84913
12641 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12642 vectorize chains of COND_EXPRs.
12643
12644 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12645
12646 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12647
12648 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12649
12650 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12651
12652 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12653
12654 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12655
12656 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12657 Kito Cheng <kito.cheng@gmail.com>
12658
12659 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12660 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12661 (nds32_adjust_reg_alloc_order): New function.
12662 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12663
12664 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12665
12666 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12667 nds32_print_operand, nds32_print_operand_address): Use
12668 HOST_WIDE_INT_PRINT_DEC instead.
12669
12670 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12671
12672 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12673
12674 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12675
12676 PR target/84902
12677 * config/i386/i386.c (initial_ix86_tune_features,
12678 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12679 unsigned long long.
12680 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12681 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12682 rather than 1u << ix86_tune. Formatting fix.
12683 (ix86_option_override_internal): Change ix86_arch_mask from
12684 unsigned int to unsigned HOST_WIDE_INT, initialize to
12685 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12686 (ix86_function_specific_restore): Likewise.
12687
12688 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12689
12690 PR target/84899
12691 * postreload.c (reload_combine_recognize_pattern): Perform
12692 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12693 truncate_int_for_mode the result for the destination's mode.
12694
12695 PR c/84909
12696 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12697 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12698 Likewise.
12699 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12700 Likewise.
12701
12702 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12703
12704 PR target/84876
12705 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12706 regno_allocno_class_array and sorted_pseudos.
12707 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12708 insns where regno is used.
12709
12710 2018-03-16 Martin Liska <mliska@suse.cz>
12711
12712 PR ipa/84833
12713 * multiple_target.c (create_dispatcher_calls): Redirect
12714 reference in the symbol table.
12715
12716 2018-03-16 Martin Liska <mliska@suse.cz>
12717
12718 PR ipa/84722
12719 * multiple_target.c (create_dispatcher_calls): Redirect also
12720 an alias.
12721
12722 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12723
12724 PR c++/79937
12725 PR c++/82410
12726 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12727 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12728 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12729
12730 2018-03-16 Julia Koval <julia.koval@intel.com>
12731
12732 * doc/invoke.texi (Skylake Server): Add CLWB.
12733 Cannonlake): Remove CLWB.
12734
12735 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12736
12737 PR tree-optimization/84841
12738 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12739 1 << 3.
12740 (FLOAT_ONE_CONST_TYPE): Define.
12741 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12742 (sort_by_operand_rank): Put entries with higher constant_type last
12743 rather than first to match comments.
12744
12745 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12746
12747 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12748 split predicate.
12749
12750 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12751
12752 PR c++/79085
12753 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12754 check and use address of target always.
12755
12756 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12757
12758 PR target/84574
12759 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12760 (indirect_thunk_bnd_needed): Likewise.
12761 (indirect_thunks_used): Likewise.
12762 (indirect_thunks_bnd_used): Likewise.
12763 (indirect_return_needed): New.
12764 (indirect_return_bnd_needed): Likewise.
12765 (output_indirect_thunk_function): Add a bool argument for
12766 function return.
12767 (output_indirect_thunk_function): Don't generate alias for
12768 function return thunk.
12769 (ix86_code_end): Call output_indirect_thunk_function to generate
12770 function return thunks.
12771 (ix86_output_function_return): Set indirect_return_bnd_needed
12772 and indirect_return_needed instead of indirect_thunk_bnd_needed
12773 and indirect_thunk_needed.
12774
12775 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12776
12777 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12778 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12779 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12780
12781 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12782 Paul Hua <paul.hua.gm@gmail.com>
12783
12784 PR c/84852
12785 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12786
12787 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12788
12789 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12790 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12791 resp. SFmode cases.
12792
12793 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12794
12795 PR target/84711
12796 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12797 instead of GET_MODE_SIZE when comparing Units.
12798
12799 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12800
12801 PR target/68256
12802 * varasm.c (hash_section): Return an unchangeble hash value
12803 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12804 Return !aarch64_can_use_per_function_literal_pools_p ().
12805
12806 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12807
12808 PR target/84860
12809 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12810 rather than address of cmode as last argument to prepare_cmp_insn.
12811
12812 2018-03-15 Julia Koval <julia.koval@intel.com>
12813
12814 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12815 F_AVX512VNNI, F_AVX512BITALG): New.
12816
12817 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12818
12819 PR target/83451
12820 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12821 insn for floating-point loads and stores.
12822
12823 2018-03-14 Carl Love <cel@us.ibm.com>
12824
12825 * config/rs6000/rs6000-c.c: Add macro definitions for
12826 ALTIVEC_BUILTIN_VEC_PERMXOR.
12827 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12828 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12829 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12830 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12831 UNSPEC_VPERMXOR.
12832 * config/doc/extend.texi: Add prototypes for vec_permxor.
12833
12834 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12835
12836 PR c/84852
12837 * diagnostic-show-locus.c (class layout_point): Convert m_line
12838 from int to linenum_type.
12839 (line_span::comparator): Use linenum "compare" function when
12840 comparing line numbers.
12841 (test_line_span): New function.
12842 (layout_range::contains_point): Convert param "row" from int to
12843 linenum_type.
12844 (layout_range::intersects_line_p): Likewise.
12845 (layout::will_show_line_p): Likewise.
12846 (layout::print_source_line): Likewise.
12847 (layout::should_print_annotation_line_p): Likewise.
12848 (layout::print_annotation_line): Likewise.
12849 (layout::print_leading_fixits): Likewise.
12850 (layout::annotation_line_showed_range_p): Likewise.
12851 (struct line_corrections): Likewise for field m_row.
12852 (line_corrections::line_corrections): Likewise for param "row".
12853 (layout::print_trailing_fixits): Likewise.
12854 (layout::get_state_at_point): Likewise.
12855 (layout::get_x_bound_for_row): Likewise.
12856 (layout::print_line): Likewise.
12857 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12858 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12859 * input.c (selftest::test_linenum_comparisons): New function.
12860 (selftest::input_c_tests): Call it.
12861 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12862 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12863 * selftest.h (ASSERT_GT): New macro.
12864 (ASSERT_GT_AT): New macro.
12865 (ASSERT_LT): New macro.
12866 (ASSERT_LT_AT): New macro.
12867
12868 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12869
12870 PR rtl-optimization/84780
12871 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12872
12873 2018-03-14 Martin Liska <mliska@suse.cz>
12874
12875 * tree.c (record_node_allocation_statistics): Use
12876 get_stats_node_kind.
12877 (get_stats_node_kind): New function extracted from
12878 record_node_allocation_statistics.
12879 (free_node): Use get_stats_node_kind.
12880
12881 2018-03-14 Richard Biener <rguenther@suse.de>
12882
12883 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12884 that the value-set of ANTIC_IN doesn't grow.
12885
12886 Revert
12887 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12888 member.
12889 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12890 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12891
12892 2018-03-14 Julia Koval <julia.koval@intel.com>
12893
12894 * config.gcc (icelake-client, icelake-server): New.
12895 (icelake): Remove.
12896 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12897 (initial_ix86_arch_features): Ditto.
12898 (PTA_SKYLAKE): Add SGX.
12899 (PTA_ICELAKE): Remove.
12900 (PTA_ICELAKE_CLIENT): New.
12901 (PTA_ICELAKE_SERVER): New.
12902 (ix86_option_override_internal): Split up icelake on icelake client and
12903 icelake server.
12904 (get_builtin_code_for_version): Ditto.
12905 (fold_builtin_cpu): Ditto.
12906 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12907 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12908 * config/i386/i386.h (processor_type): Ditto.
12909 * doc/invoke.texi: Ditto.
12910
12911 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12912
12913 PR sanitizer/83392
12914 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12915 INTEGER_CST offset, add it together with bitpos / 8 and
12916 sign extend based on POINTER_SIZE.
12917
12918 PR target/84844
12919 Revert
12920 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12921
12922 PR target/78090
12923 * config/i386/constraints.md (Yc): New register constraint.
12924 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12925 Use Yc constraint for alternative 2 of operand 0. Remove
12926 preferred_for_speed attribute.
12927
12928 2018-03-14 Richard Biener <rguenther@suse.de>
12929
12930 PR tree-optimization/84830
12931 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
12932 with the old one to avoid oscillations.
12933
12934 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
12935
12936 PR target/83712
12937 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
12938 pseudos.
12939 (assign_by_spills): Return a flag of reload assignment failure.
12940 Do not process the reload assignment failures. Do not spill other
12941 reload pseudos if they has the same reg class. Update n if
12942 necessary.
12943 (lra_assign): Add a return arg. Set up from the result of
12944 assign_by_spills call.
12945 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
12946 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
12947 usage_insns if it is not NULL.
12948 (spill_hard_reg_in_range): New function.
12949 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
12950 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
12951 function prototypes.
12952 (lra_assign): Change prototype.
12953 * lra.c (lra): Add code to deal with fails by splitting hard reg
12954 live ranges.
12955
12956 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
12957
12958 * config/riscv/riscv.opt (mrelax): New option.
12959 * config/riscv/riscv.c (riscv_file_start): Emit ".option
12960 "norelax" when riscv_mrelax is disabled.
12961 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
12962
12963 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12964
12965 PR target/84743
12966 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
12967 reassociation for int modes.
12968
12969 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12970
12971 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
12972 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
12973 for big-endian.
12974 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
12975 * config/aarch64/aarch64-sve.md
12976 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
12977 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
12978 (*extend<mode><Vwide>2): Rename to...
12979 (aarch64_sve_extend<mode><Vwide>2): ...this.
12980 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
12981 renaming the old pattern to...
12982 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
12983 unsigned packs.
12984 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
12985 define_expand, renaming the old pattern to...
12986 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
12987 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
12988 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
12989 account when deciding which SVE instruction the optab should use.
12990 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
12991
12992 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
12993
12994 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
12995 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
12996 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
12997 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
12998 (tlsdesc_small_<mode>): Turn a define_expand and use
12999 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13000 (tlsdesc_small_advsimd_<mode>): ...this.
13001 (tlsdesc_small_sve_<mode>): New pattern.
13002
13003 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13004
13005 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13006 (UNSPEC_UMUL_HIGHPART): New constants.
13007 (MUL_HIGHPART): New int iteraor.
13008 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13009 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13010 define_expand.
13011 (*<su>mul<mode>3_highpart): New define_insn.
13012
13013 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13014
13015 PR lto/84805
13016 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13017 incomplete types.
13018
13019 2018-03-13 Martin Liska <mliska@suse.cz>
13020
13021 PR ipa/84658.
13022 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13023 vector.
13024 (sem_item_optimizer::~sem_item_optimizer): Release it.
13025 (sem_item_optimizer::merge_classes): Register variable aliases.
13026 (sem_item_optimizer::fixup_pt_set): New function.
13027 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13028 * ipa-icf.h: Declare new variables and functions.
13029
13030 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13031
13032 PR middle-end/84834
13033 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13034 integer_pow2p@2 and test integer_pow2p in condition.
13035 (A < 0 ? C : 0): Similarly for @1.
13036
13037 PR middle-end/84831
13038 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13039 characters starting at p contain '\0' character, don't look beyond
13040 that.
13041
13042 PR target/84827
13043 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13044 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13045
13046 PR target/84828
13047 * reg-stack.c (change_stack): Change update_end var from int to
13048 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13049 also call set_block_for_insn on the newly added insns and rescan.
13050
13051 PR target/84786
13052 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13053 on the last operand.
13054
13055 PR c++/84704
13056 * tree.c (stabilize_reference_1): Return save_expr (e) for
13057 STATEMENT_LIST even if it doesn't have side-effects.
13058
13059 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13060
13061 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13062
13063 2018-03-12 Renlin Li <renlin.li@arm.com>
13064
13065 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13066 aarch64_output_scalar_simd_mov_immediate.
13067
13068 2018-03-12 Martin Sebor <msebor@redhat.com>
13069
13070 PR tree-optimization/83456
13071 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13072 for perfectly overlapping calls to memcpy.
13073 (gimple_fold_builtin_memory_chk): Same.
13074 (gimple_fold_builtin_strcpy): Handle no-warning.
13075 (gimple_fold_builtin_stxcpy_chk): Same.
13076 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13077
13078 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13079
13080 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13081 parameter. Use it for SFmode.
13082 (rs6000_function_arg_advance_1): Adjust.
13083 (rs6000_function_arg): Adjust.
13084 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13085
13086 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13087
13088 PR rtl-optimization/84169
13089 PR rtl-optimization/84780
13090 * combine.c (can_combine_p): Check for a 2-insn combination whether
13091 the destination register is used between the two insns, too.
13092
13093 2018-03-12 Richard Biener <rguenther@suse.de>
13094
13095 PR tree-optimization/84803
13096 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13097 for refs DR analysis didn't process.
13098
13099 2018-03-12 Richard Biener <rguenther@suse.de>
13100
13101 PR tree-optimization/84777
13102 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13103 force-vectorize loops ignore whether we are optimizing for size.
13104
13105 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13106
13107 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13108 (TARGET_MD_ASM_ADJUST): Define.
13109
13110 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13111 Kito Cheng <kito.cheng@gmail.com>
13112 Chung-Ju Wu <jasonwucj@gmail.com>
13113
13114 * config/nds32/nds32.c (nds32_compute_stack_frame,
13115 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13116 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13117 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13118 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13119 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13120 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13121 * config/nds32/nds32.md (prologue, epilogue): Use macro
13122 NDS32_V3PUSH_AVAILABLE_P to do checking.
13123
13124 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13125
13126 PR debug/58150
13127 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13128 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13129 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13130 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13131 addition of most attributes on !orig_type_die or the attribute not
13132 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13133
13134 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13135 Chung-Ju Wu <jasonwucj@gmail.com>
13136
13137 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13138 __NDS32_VH__ macro.
13139 * config/nds32/nds32.opt (mvh): New option.
13140
13141 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13142 Chung-Ju Wu <jasonwucj@gmail.com>
13143
13144 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13145 function.
13146 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13147 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13148 definition.
13149
13150 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13151 Chung-Ju Wu <jasonwucj@gmail.com>
13152
13153 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13154 function.
13155 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13156 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13157
13158 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13159 Kito Cheng <kito.cheng@gmail.com>
13160 Chung-Ju Wu <jasonwucj@gmail.com>
13161
13162 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13163 UNSPEC_FFMISM and UNSPEC_FLMISM.
13164 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13165 for ffb, ffmism and flmism.
13166 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13167 (unspec_ffmism): Ditto.
13168 (unspec_flmism): Ditto.
13169 (nds32_expand_builtin_impl): Check if string extension is available.
13170 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13171 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13172
13173 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13174
13175 Reverting patch:
13176 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13177
13178 PR target/83712
13179 * lra-assigns.c (assign_by_spills): Return a flag of reload
13180 assignment failure. Do not process the reload assignment
13181 failures. Do not spill other reload pseudos if they has the same
13182 reg class.
13183 (lra_assign): Add a return arg. Set up from the result of
13184 assign_by_spills call.
13185 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13186 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13187 usage_insns if it is not NULL.
13188 (spill_hard_reg_in_range): New function.
13189 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13190 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13191 function prototypes.
13192 (lra_assign): Change prototype.
13193 * lra.c (lra): Add code to deal with fails by splitting hard reg
13194 live ranges.
13195
13196 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13197
13198 PR target/84807
13199 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13200
13201 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13202
13203 PR debug/84620
13204 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13205 (dw_val_node): Add val_symbolic_view.
13206 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13207 (symview_upper_bound): New.
13208 (new_line_info_table): Initialize symviews_since_reset.
13209 (dwarf2out_source_line): Count symviews_since_reset and set
13210 symview_upper_bound.
13211 (dw_val_equal_p): Handle symview.
13212 (add_AT_symview): New.
13213 (print_dw_val): Handle symview.
13214 (attr_checksum, attr_checksum_ordered): Likewise.
13215 (same_dw_val_p, size_of_die): Likewise.
13216 (value_format, output_die): Likewise.
13217 (add_high_low_attributes): Use add_AT_symview for entry_view.
13218 (dwarf2out_finish): Reset symview_upper_bound, clear
13219 zero_view_p.
13220
13221 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13222
13223 PR target/83969
13224 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13225 Add strict argument and use it.
13226 (rs6000_split_multireg_move): Update for new strict argument.
13227 (mem_operand_gpr): Disallow all non-offsettable addresses.
13228 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13229
13230 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13231
13232 PR target/84772
13233 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13234 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13235 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13236
13237 PR c++/84767
13238 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13239 decl, use remap_type if we want to use the type.
13240
13241 2018-03-09 Martin Sebor <msebor@redhat.com>
13242
13243 PR tree-optimization/84526
13244 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13245 Remove dead code.
13246 (builtin_access::generic_overlap): Be prepared to handle non-array
13247 base objects.
13248
13249 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13250
13251 PR rtl-optimization/84682
13252 * lra-constraints.c (process_address_1): Check is_address flag
13253 for address constraints.
13254 (process_alt_operands): Likewise.
13255 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13256 preprocess_constraints.
13257 * recog.h (preprocess_constraints): Add oploc parameter.
13258 Adjust callers.
13259 * recog.c (preprocess_constraints): Test address_operand for
13260 CT_ADDRESS constraints.
13261
13262 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13263
13264 PR target/83712
13265 * lra-assigns.c (assign_by_spills): Return a flag of reload
13266 assignment failure. Do not process the reload assignment
13267 failures. Do not spill other reload pseudos if they has the same
13268 reg class.
13269 (lra_assign): Add a return arg. Set up from the result of
13270 assign_by_spills call.
13271 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13272 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13273 usage_insns if it is not NULL.
13274 (spill_hard_reg_in_range): New function.
13275 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13276 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13277 function prototypes.
13278 (lra_assign): Change prototype.
13279 * lra.c (lra): Add code to deal with fails by splitting hard reg
13280 live ranges.
13281
13282 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13283
13284 PR target/83193
13285 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13286 Accept complain bool parameter. Only emit errors if it is true.
13287 (arm_parse_cpu_option_name): Likewise.
13288 (arm_target_thumb_only): Adjust callers of the above.
13289 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13290 prototype to take a default true bool parameter.
13291 (arm_parse_arch_option_name): Likewise.
13292
13293 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13294 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13295
13296 PR jit/64089
13297 PR jit/84288
13298 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13299 * configure: Regenerate.
13300 * configure.ac ("linker --version-script option"): New.
13301 ("linker soname option"): New.
13302
13303 2018-03-09 Richard Biener <rguenther@suse.de>
13304
13305 PR tree-optimization/84775
13306 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13307 immediate uses of predicate stmts and mark them modified.
13308
13309 Revert
13310 PR tree-optimization/84178
13311 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13312 to caller.
13313 (version_loop_for_if_conversion): Delay update_ssa call.
13314 (tree_if_conversion): Delay update_ssa until after predicate
13315 insertion.
13316
13317 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13318
13319 PR target/84763
13320 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13321 when the function accesses prior frames.
13322
13323 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13324
13325 PR debug/84456
13326 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13327 gen_llsym, otherwise call maybe_gen_llsym.
13328
13329 PR inline-asm/84742
13330 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13331 has ',' character inside of it.
13332
13333 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13334
13335 PR target/84748
13336 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13337 as clobbering CC_REGNUM.
13338
13339 2018-03-08 Richard Biener <rguenther@suse.de>
13340
13341 PR middle-end/84552
13342 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13343 (follow_copies_to_constant): Do not follow SSA names registered
13344 for update.
13345
13346 2018-03-08 Richard Biener <rguenther@suse.de>
13347
13348 PR tree-optimization/84178
13349 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13350 to caller.
13351 (version_loop_for_if_conversion): Delay update_ssa call.
13352 (tree_if_conversion): Delay update_ssa until after predicate
13353 insertion.
13354
13355 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13356
13357 PR tree-optimization/84178
13358 * tree-if-conv.c (release_bb_predicate): Remove the
13359 the assertion that the stmts have NULL use_ops.
13360 Discard the statements, asserting that they haven't
13361 yet been added to a BB.
13362
13363 2018-03-08 Richard Biener <rguenther@suse.de>
13364
13365 PR tree-optimization/84746
13366 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13367 (phi_translate): Pass in destination ANTIC_OUT set.
13368 (phi_translate_1): Likewise. For a simplified result lookup
13369 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13370 (phi_translate_set): Adjust.
13371 (do_pre_regular_insertion): Likewise.
13372 (do_pre_partial_partial_insertion): Likewise.
13373
13374 2018-03-08 Martin Liska <mliska@suse.cz>
13375
13376 PR gcov-profile/84735
13377 * doc/gcov.texi: Document usage of profile files.
13378 * gcov-io.h: Document changes in the format.
13379
13380 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13381
13382 PR debug/84404
13383 PR debug/84408
13384 * dwarf2out.c (struct dw_line_info_table): Update comments for
13385 view == -1.
13386 (FORCE_RESET_NEXT_VIEW): New.
13387 (FORCE_RESETTING_VIEW_P): New.
13388 (RESETTING_VIEW_P): Check for -1 too.
13389 (ZERO_VIEW_P): Likewise.
13390 (new_line_info_table): Force-reset next view.
13391 (dwarf2out_begin_function): Likewise.
13392 (dwarf2out_source_line): Simplify zero_view_p initialization.
13393 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13394 view directly. Omit view when omitting .loc at line 0.
13395
13396 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13397
13398 PR tree-optimization/84740
13399 * tree-switch-conversion.c (process_switch): Call build_constructors
13400 only if info.phi_count is non-zero.
13401
13402 PR tree-optimization/84739
13403 * tree-tailcall.c (find_tail_calls): Check call arguments against
13404 DECL_ARGUMENTS (current_function_decl) rather than
13405 DECL_ARGUMENTS (func) when checking for tail recursion.
13406
13407 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13408
13409 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13410 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13411 Volker Reichelt's entry and add entries for people that perform
13412 GCC fuzzy testing and report numerous bugs.
13413
13414 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13415
13416 PR target/82411
13417 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13418 readonly data in sdata, if that is disabled.
13419 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13420 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13421 -mreadonly-in-sdata option.
13422
13423 2018-03-07 Martin Sebor <msebor@redhat.com>
13424
13425 PR tree-optimization/84468
13426 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13427 basic block when looking for nul assignment.
13428
13429 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13430
13431 PR target/84277
13432 * except.h (output_function_exception_table): Adjust prototype.
13433 * except.c (output_function_exception_table): Remove FNNAME parameter
13434 and add SECTION parameter. Ouput one part of the table at a time.
13435 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13436 the first part of the exception table and emit unwind directives.
13437 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13438 (i386_pe_seh_cold_init): Likewise.
13439 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13440 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13441 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13442 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13443 * config/i386/winnt.c: Include except.h.
13444 (struct seh_frame_state): Add reg_offset, after_prologue and
13445 in_cold_section fields.
13446 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13447 (i386_pe_seh_cold_init): New function.
13448 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13449 to seh->in_cold_section.
13450 (seh_emit_push): Record the offset of the push.
13451 (seh_emit_save): Record the offet of the save.
13452 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13453 Test seh->after_prologue to disregard the epilogue.
13454 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13455 (i386_pe_end_cold_function): New function.
13456
13457 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13458
13459 PR fortran/84565
13460 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13461 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13462
13463 PR c++/84704
13464 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13465 on tmp_var.
13466 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13467 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13468
13469 PR middle-end/84723
13470 * multiple_target.c: Include tree-inline.h and intl.h.
13471 (expand_target_clones): Diagnose and fail if node->definition and
13472 !tree_versionable_function_p (node->decl).
13473
13474 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13475
13476 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13477 sprint_ul.
13478 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13479 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13480 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13481
13482 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13483
13484 PR target/84710
13485 * combine.c (try_combine): Use reg_or_subregno instead of handling
13486 just paradoxical SUBREGs and REGs.
13487
13488 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13489
13490 * config/arc/arc.c (arc_finalize_pic): Remove function.
13491 (arc_must_save_register): We use single base PIC register, remove
13492 checks to save/restore the PIC register.
13493 (arc_expand_prologue): Likewise.
13494 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13495 Remove.
13496 (arc_verify_short): Likewise.
13497 (arc_attr_type): Likewise.
13498 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13499 (walk_stores): Likewise.
13500 (arc_address_cost): Make it static.
13501 (arc_verify_short): Likewise.
13502 (branch_dest): Likewise.
13503 (arc_attr_type): Likewise.
13504 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13505 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13506 (arc_final_prescan_insn): Remove inserting the nops due to
13507 hardware hazards. It is done in reorg step.
13508 (insn_length_variant_t): Remove.
13509 (insn_length_parameters_t): Likewise.
13510 (arc_insn_length_parameters): Likewise.
13511 (arc_get_insn_variants): Likewise.
13512 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13513
13514 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13515
13516 PR inline-asm/84683
13517 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13518 assertion failure.
13519
13520 PR tree-optimization/84687
13521 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13522 on new_node->decl.
13523 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13524
13525 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13526
13527 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13528 Rename to ppc_speculation_barrier.
13529 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13530 __builtin_ppc_speculation_barrier.
13531
13532 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13533
13534 PR target/84700
13535 * combine.c (combine_simplify_rtx): Don't try to simplify if
13536 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13537 are equal to x.
13538
13539 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13540
13541 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13542 to 32 bytes when compiling for POWER9.
13543
13544 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13545
13546 PR target/84564
13547 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13548 regparm >= 3 with no arg reg available also for calls with
13549 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13550
13551 PR target/84524
13552 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13553 orig,vex.
13554 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13555
13556 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13557
13558 PR target/84264
13559 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13560
13561 2018-03-05 Richard Biener <rguenther@suse.de>
13562
13563 PR tree-optimization/84486
13564 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13565 When inserting a __builtin_assume_aligned call set the LHS
13566 SSA name alignment info accordingly.
13567
13568 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13569
13570 PR tree-optimization/84114
13571 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13572 Avoid reassociation of FLOAT_MODE addition.
13573
13574 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13575
13576 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13577 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13578 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13579 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13580 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13581 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13582 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13583 and -mwbnoinvd.
13584 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13585 __builtin_ia32_wbinvd): New builtins.
13586 (SPECIAL_ARGS2): New.
13587 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13588 (SPECIAL_ARGS2): New.
13589 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13590 (ix86_valid_target_attribute_inner_p): Ditto.
13591 (ix86_init_mmx_sse_builtins): Add special_args2.
13592 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13593 TARGET_WBNOINVD_P): New.
13594 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13595 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13596 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13597 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13598 * config/i386/pconfigintrin.h: New file.
13599 * config/i386/wbnoinvdintrin.h: Ditto.
13600 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13601 wbnoinvdintrin.h.
13602 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13603
13604 2018-03-05 Richard Biener <rguenther@suse.de>
13605
13606 PR tree-optimization/84670
13607 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13608 member.
13609 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13610 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13611 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13612 doesn't grow if all successors (recursively) were visited at least
13613 once.
13614
13615 2018-03-05 Richard Biener <rguenther@suse.de>
13616
13617 PR tree-optimization/84650
13618 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13619 if executed in the loop pipeline.
13620
13621 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13622
13623 * doc/configfiles.texi (Configuration Files): Move info about
13624 conditionalizing $target-protos.h to...
13625 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13626 differs from $target-protos.h.
13627
13628 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13629 Chung-Ju Wu <jasonwucj@gmail.com>
13630
13631 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13632 * config/nds32/nds32-multiple.md (setmemsi): Define.
13633 * config/nds32/nds32-memory-manipulation.c
13634 (nds32_gen_dup_4_byte_to_word_value): New.
13635 (emit_setmem_word_loop): New.
13636 (emit_setmem_byte_loop): New.
13637 (nds32_expand_setmem_loop): New.
13638 (nds32_expand_setmem_loop_v3m): New.
13639 (nds32_expand_setmem_unroll): New.
13640 (nds32_expand_setmem): New.
13641
13642 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13643 Chung-Ju Wu <jasonwucj@gmail.com>
13644
13645 * config/nds32/nds32-memory-manipulation.c
13646 (nds32_emit_load_store): New.
13647 (nds32_emit_post_inc_load_store): New.
13648 (nds32_emit_mem_move): New.
13649 (nds32_emit_mem_move_block): New.
13650 (nds32_expand_movmemsi_loop_unknown_size): New.
13651 (nds32_expand_movmemsi_loop_known_size): New.
13652 (nds32_expand_movmemsi_loop): New.
13653 (nds32_expand_movmemsi_unroll): New.
13654 (nds32_expand_movmemqi): Rename ...
13655 (nds32_expand_movmemsi): ... to this.
13656 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13657 (movmemsi): ... to this.
13658 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13659 (nds32_expand_movmemsi): ... to this.
13660
13661 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13662 Monk Chiang <sh.chiang04@gmail.com>
13663 Chung-Ju Wu <jasonwucj@gmail.com>
13664
13665 * config/nds32/nds32-protos.h
13666 (nds32_expand_load_multiple): New arguments.
13667 (nds32_expand_store_multiple): Ditto.
13668 (nds32_valid_multiple_load_store): Rename ...
13669 (nds32_valid_multiple_load_store_p): ... to this.
13670 * config/nds32/nds32-memory-manipulation.c
13671 (nds32_expand_load_multiple): Refine implementation.
13672 (nds32_expand_store_multiple): Ditto.
13673 * config/nds32/nds32-multiple.md
13674 (load_multiple): Update nds32_expand_load_multiple interface.
13675 (store_multiple): Update nds32_expand_store_multiple interface.
13676 * config/nds32/nds32-predicates.c
13677 (nds32_valid_multiple_load_store): Rename ...
13678 (nds32_valid_multiple_load_store_p): ... to this and refine
13679 implementation.
13680 * config/nds32/predicates.md
13681 (nds32_load_multiple_and_update_address_operation): New predicate.
13682 (nds32_store_multiple_and_update_address_operation): New predicate.
13683
13684 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13685 Chung-Ju Wu <jasonwucj@gmail.com>
13686
13687 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13688 (combo): New attribute.
13689 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13690
13691 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13692
13693 * config/nds32/nds32.opt: Change -mcmodel= default value.
13694
13695 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13696 Monk Chiang <sh.chiang04@gmail.com>
13697 Chung-Ju Wu <jasonwucj@gmail.com>
13698
13699 * config/nds32/constants.md (unspec_element): New enum.
13700 * config/nds32/constraints.md (Umw): New constraint.
13701 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13702 * config/nds32/nds32-intrinsic.md: Likewise.
13703 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13704 (nds32_valid_smw_lwm_base_p): New.
13705 (nds32_output_smw_single_word): New.
13706 (nds32_output_lmw_single_word): New.
13707 (nds32_expand_unaligned_load): New.
13708 (nds32_expand_unaligned_store): New.
13709 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13710 (nds32_output_smw_single_word): Declare.
13711 (nds32_output_lmw_single_word): Declare.
13712 (nds32_expand_unaligned_load): Declare.
13713 (nds32_expand_unaligned_store): Declare.
13714 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13715 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13716 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13717 NDS32_BUILTIN_UASTORE_DW.
13718 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13719 predicate.
13720
13721 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13722 Kito Cheng <kito.cheng@gmail.com>
13723 Chung-Ju Wu <jasonwucj@gmail.com>
13724
13725 * config/nds32/nds32-intrinsic.c
13726 (nds32_expand_builtin_null_ftype_reg): Delete.
13727 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13728 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13729 (nds32_read_argument): New.
13730 (nds32_legitimize_target): Ditto.
13731 (nds32_legitimize_argument): Ditto.
13732 (nds32_check_constant_argument): Ditto.
13733 (nds32_expand_unop_builtin): Ditto.
13734 (nds32_expand_unopimm_builtin): Ditto.
13735 (nds32_expand_binop_builtin): Ditto.
13736 (nds32_builtin_decl_impl): Ditto.
13737 (builtin_description): Ditto.
13738 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13739 (nds32_init_builtins_impl): Ditto.
13740 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13741 (nds32_builtin_decl): New.
13742 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13743 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13744
13745 2018-03-02 Jeff Law <law@redhat.com>
13746
13747 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13748 (redundant_insn, fill_simple_delay_slots): Likewise.
13749 (fill_slots_from_thread): Likewise.
13750 * resource.c (mark_referenced_resources): Likewise.
13751 (mark_set_resources, find_dead_or_set_registers): Likewise.
13752
13753 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13754
13755 * substring-locations.h (format_warning_va): Formatting fix for
13756 ATTRIBUTE_GCC_DIAG.
13757 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13758 argument.
13759 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13760 * substring-locations.c: Include intl.h.
13761 (format_warning_va): Turned into small wrapper around
13762 format_warning_n_va, renamed to ...
13763 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13764 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13765 use ngettext.
13766 (format_warning_at_substring_n): New function.
13767 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13768 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13769 format_warning_at_substring with just a shorter name instead of
13770 const function pointer.
13771 (fmtwarn_n): New function.
13772 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13773 appropriate, get rid of all the fmtstr temporaries, move conditionals
13774 with G_() wrapped string literals directly into fmtwarn arguments,
13775 cast dir.len to (int), formatting fixes.
13776
13777 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13778
13779 * doc/invoke.texi: Remove "Cilk Plus" references.
13780
13781 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13782 Richard Biener <rguenther@suse.de>
13783
13784 PR ipa/84628
13785 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13786 for error or warning attributes if CALL_FROM_THUNK_P is set.
13787 Formatting fixes.
13788
13789 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13790
13791 PR target/56540
13792 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13793 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13794
13795 PR target/56540
13796 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13797 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13798
13799 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13800 instead of -1U in last predictors element's probability member.
13801
13802 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13803
13804 PR ipa/83983
13805 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13806 arguments if they are comparable.
13807
13808 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13809
13810 PR tree-optimization/84634
13811 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13812 masks and masked_loop_p with a single loop_masks, making sure it's
13813 null for bb vectorization.
13814
13815 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13816
13817 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13818 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13819 loop->force_vectorize to check whether there is no alias.
13820
13821 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13822
13823 PR target/84614
13824 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13825 prototypes.
13826 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13827 comments.
13828 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13829 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13830 instead of a loop around prev_real_insn.
13831 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13832 prev_real_insn.
13833
13834 PR inline-asm/84625
13835 * config/i386/i386.c (ix86_print_operand): Use conditional
13836 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13837 zero vector.
13838
13839 2018-03-02 Richard Biener <rguenther@suse.de>
13840
13841 PR tree-optimization/84427
13842 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13843 (bitmap_set_subtract_values): Rewrite to handle multiple
13844 exprs per value.
13845 (clean): Likewise.
13846 (prune_clobbered_mems): Likewise.
13847 (phi_translate): Take edge instead of pred/phiblock.
13848 (phi_translate_1): Likewise.
13849 (phi_translate_set): Likewise. Insert all translated
13850 exprs for a value into the set, keeping possibly multiple
13851 expressions per value.
13852 (compute_antic_aux): Adjust for phi_translate changes.
13853 When intersecting union the expressions and prune those
13854 not in the final value set, keeping possibly multiple
13855 expressions per value. Do not use value-insertion
13856 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13857 all expressions. Add verification that the value-sets
13858 only shrink during iteration.
13859 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13860 (do_pre_regular_insertion): Likewise.
13861 (do_pre_partial_partial_insertion): Likewise.
13862
13863 2018-03-02 Richard Biener <rguenther@suse.de>
13864
13865 PR target/82005
13866 * config/darwin.c (saved_debug_info_level): New static global.
13867 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13868 (darwin_asm_lto_end): Restore debug info generation settings.
13869
13870 2018-03-01 Martin Liska <mliska@suse.cz>
13871
13872 PR sanitizer/82484
13873 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13874 volatile arguments.
13875
13876 2018-03-01 Richard Biener <rguenther@suse.de>
13877
13878 PR debug/84645
13879 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13880 type annotation with LTO when debug was disabled at compile-time.
13881
13882 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13883
13884 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13885 XINT with INTVAL.
13886 (mips_final_postscan_insn): Likewise.
13887
13888 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13889
13890 PR rtl-optimization/84528
13891 * alias.c (init_alias_target): Add commentary.
13892 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13893 a unique base value if the frame pointer is not eliminated
13894 to the stack pointer.
13895
13896 2018-03-01 Tom de Vries <tom@codesourcery.com>
13897
13898 PR rtl-optimization/83327
13899 * lra-int.h (hard_regs_spilled_into): Declare.
13900 * lra.c (hard_regs_spilled_into): Define.
13901 (init_reg_info): Init hard_regs_spilled_into.
13902 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13903 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13904 (process_bb_lives): Handle hard_regs_spilled_into.
13905 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13906 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13907
13908 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13909
13910 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13911 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13912 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13913 * config/rs6000/aix72.h: New file.
13914
13915 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13916
13917 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13918 instead of warning_at with conditional singular and plural messages
13919 where possible.
13920
13921 PR target/52991
13922 * stor-layout.c (update_alignment_for_field): For
13923 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13924 && !DECL_PACKED (field), do the alignment update, just use
13925 only desired_align instead of MAX (type_align, desired_align)
13926 as the alignment.
13927 (place_field): Don't do known_align < desired_align handling
13928 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
13929 is non-NULL, instead do it after rli->prev_field handling and
13930 only if not within a bitfield word. For DECL_PACKED (field)
13931 use type_align of BITS_PER_UNIT.
13932
13933 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
13934
13935 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
13936 superfluous parentheses and trailing spaces.
13937
13938 2018-02-28 Richard Biener <rguenther@suse.de>
13939
13940 PR tree-optimization/84584
13941 * graphite-scop-detection.c (scop_detection::add_scop): Discard
13942 SCoPs with fake exit edge.
13943
13944 2018-02-28 Martin Liska <mliska@suse.cz>
13945
13946 PR testsuite/84597
13947 * timevar.c (timer::print): Fix format to properly print 100%
13948 values.
13949
13950 2018-02-28 Richard Biener <rguenther@suse.de>
13951
13952 PR middle-end/84607
13953 * genmatch.c (capture_info::walk_match): Do not mark
13954 captured expressions without operands as expr_p given
13955 they act more like predicates and should be subject to
13956 "lost tail" side-effect preserving.
13957
13958 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
13959
13960 PR rtl-optimization/81611
13961 * auto-inc-dec.c (attempt_change): Move dead note from
13962 mem_insn if it's the next use of regno
13963 (find_address): Take address use of reg holding
13964 non-incremented value. Add parm to limit search to the named
13965 reg only.
13966 (merge_in_block): Attempt to use a mem insn that is the next
13967 use of the original regno.
13968
13969 2018-02-27 Martin Sebor <msebor@redhat.com>
13970
13971 PR c++/83871
13972 * doc/invoke.texi (-Wmissing-attributes): New option.
13973 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
13974
13975 2018-02-27 Martin Sebor <msebor@redhat.com>
13976
13977 PR translation/84207
13978 * diagnostic-core.h (warning_n, error_n, inform_n): Change
13979 n argument to unsigned HOST_WIDE_INT.
13980 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
13981 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
13982 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
13983 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
13984
13985 2018-02-27 Richard Biener <rguenther@suse.de>
13986
13987 PR tree-optimization/84512
13988 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
13989 Do not use the estimate returned from record_stmt_cost for
13990 the scalar iteration cost but sum properly using add_stmt_cost.
13991
13992 2018-02-27 Richard Biener <rguenther@suse.de>
13993
13994 PR tree-optimization/84466
13995 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
13996 Adjust last change to less strictly validate use operands.
13997
13998 2018-02-27 Martin Liska <mliska@suse.cz>
13999
14000 PR gcov-profile/84548
14001 * gcov.c (process_file): Allow partial overlap and consider it
14002 also as group functions.
14003 (output_lines): Properly calculate range of lines for a group.
14004
14005 2018-02-27 Martin Liska <mliska@suse.cz>
14006
14007 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14008 'ggc' suffixes. Change first column width.
14009 (timer::print): Fix formatting of the column.
14010
14011 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14012
14013 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14014 preserve inline entry blocks for the sake of debug inline
14015 entry point markers alone.
14016 (remove_unused_locals): Suggest in comments a better place to
14017 force the preservation of inline entry blocks that are
14018 otherwise unused, but do not preserve them.
14019
14020 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14021
14022 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14023
14024 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14025
14026 PR target/84039
14027 * config/i386/constraints.md (Bs): Replace
14028 ix86_indirect_branch_register with
14029 TARGET_INDIRECT_BRANCH_REGISTER.
14030 (Bw): Likewise.
14031 * config/i386/i386.md (indirect_jump): Likewise.
14032 (tablejump): Likewise.
14033 (*sibcall_memory): Likewise.
14034 (*sibcall_value_memory): Likewise.
14035 Peepholes of indirect call and jump via memory: Likewise.
14036 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14037 (*sibcall_value_GOT_32): Likewise.
14038 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14039 (GOT_memory_operand): Likewise.
14040 (call_insn_operand): Likewise.
14041 (sibcall_insn_operand): Likewise.
14042 (GOT32_symbol_operand): Likewise.
14043 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14044
14045 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14046
14047 PR rtl-optimization/83496
14048 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14049 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14050 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14051 redundant insn, if any.
14052 (relax_delay_slots): Likewise.
14053 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14054
14055 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14056
14057 PR tree-optimization/83965
14058 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14059 that grouped statements are part of a reduction chain. Return
14060 true if the statement is not marked as a reduction itself but
14061 is part of a group.
14062 (vect_recog_dot_prod_pattern): Don't check whether the statement
14063 is part of a group here.
14064 (vect_recog_sad_pattern): Likewise.
14065 (vect_recog_widen_sum_pattern): Likewise.
14066
14067 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14068
14069 PR debug/84545
14070 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14071
14072 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14073
14074 PR target/84530
14075 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14076 the bool argument.
14077 (ix86_output_indirect_function_return): New prototype.
14078 (ix86_split_simple_return_pop_internal): Likewise.
14079 * config/i386/i386.c (indirect_return_via_cx): New.
14080 (indirect_return_via_cx_bnd): Likewise.
14081 (indirect_thunk_name): Handle return va CX_REG.
14082 (output_indirect_thunk_function): Create alias for
14083 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14084 (ix86_output_indirect_jmp): Remove the bool argument.
14085 (ix86_output_indirect_function_return): New function.
14086 (ix86_split_simple_return_pop_internal): Likewise.
14087 * config/i386/i386.md (*indirect_jump): Don't pass false
14088 to ix86_output_indirect_jmp.
14089 (*tablejump_1): Likewise.
14090 (simple_return_pop_internal): Change it to define_insn_and_split.
14091 Call ix86_split_simple_return_pop_internal to split it for
14092 -mfunction-return=.
14093 (simple_return_indirect_internal): Call
14094 ix86_output_indirect_function_return instead of
14095 ix86_output_indirect_jmp.
14096
14097 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14098
14099 PR bootstrap/84405
14100 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14101 memset and value initialization afterwards.
14102
14103 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14104
14105 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14106
14107 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14108
14109 PR target/84521
14110 * common/config/aarch64/aarch64-common.c
14111 (aarch_option_optimization_table[]): Switch
14112 off fomit-frame-pointer
14113
14114 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14115 Chung-Ju Wu <jasonwucj@gmail.com>
14116
14117 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14118 volatile memory.
14119 (store_multiple): Ditto.
14120
14121 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14122
14123 * config.gcc: Add --with-cpu support for nds32 target.
14124 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14125 * config/nds32/nds32.opt: Add -mcpu= option.
14126
14127 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14128
14129 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14130 isel=yes): Warn for these deprecated options.
14131
14132 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14133
14134 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14135 ISA_2_5_MASKS_EMBEDDED.
14136
14137 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14138
14139 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14140 p->max as pointers rather than using iterative_hash_expr.
14141
14142 2018-02-23 Carl Love <cel@us.ibm.com>
14143
14144 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14145 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14146 BU_P8V_OVERLOAD_2.
14147 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14148 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14149 P8V_BUILTIN_VEC_VUNSIGNED2.
14150
14151 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14152
14153 PR target/81572
14154 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14155 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14156 LRA_UNKNOWN_ALT.
14157 * lra-constraints.c (curr_insn_transform): Set up
14158 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14159 LRA_UNKNOWN_ALT.
14160 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14161 * lra-eliminations.c (spill_pseudos): Ditto.
14162 (process_insn_for_elimination): Ditto.
14163 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14164 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14165 LRA_NON_CLOBBERED_ALT.
14166
14167 2018-02-22 Martin Sebor <msebor@redhat.com>
14168
14169 PR tree-optimization/84480
14170 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14171 to maybe_diag_stxncpy_trunc. Call it.
14172 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14173 from gimple_fold_builtin_strcpy. Print inlining stack.
14174 (handle_builtin_stxncpy): Print inlining stack.
14175 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14176
14177 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14178
14179 PR target/84176
14180 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14181 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14182 and -fcheck-pointer-bounds are used together.
14183 (indirect_thunk_prefix): New enum.
14184 (indirect_thunk_need_prefix): New function.
14185 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14186 "_nt" instead of "_bnd" for NOTRACK prefix.
14187 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14188 (output_indirect_thunk_function): Likewise.
14189 (): Likewise.
14190 (ix86_code_end): Update output_indirect_thunk_function calls.
14191 (ix86_output_indirect_branch_via_reg): Replace
14192 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14193 (ix86_output_indirect_branch_via_push): Likewise.
14194 (ix86_output_function_return): Likewise.
14195 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14196 incompatible with -fcf-protection=branch and
14197 -fcheck-pointer-bounds.
14198
14199 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14200
14201 PR target/83335
14202 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14203 Change gcc_assert call to output_operand_lossage.
14204
14205 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14206
14207 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14208
14209 2018-02-22 DJ Delorie <dj@redhat.com>
14210 Sebastian Perta <sebastian.perta@renesas.com>
14211 Oleg Endo <olegendo@gcc.gnu.org>
14212
14213 * config/rx/rx.c (rx_rtx_costs): New function.
14214 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14215
14216 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14217
14218 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14219
14220 2018-02-22 Martin Liska <mliska@suse.cz>
14221
14222 PR driver/83193
14223 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14224 Add "native" as a possible value.
14225
14226 2018-02-22 Martin Liska <mliska@suse.cz>
14227
14228 PR driver/83193
14229 * config/i386/i386.c (ix86_option_override_internal):
14230 Add "native" as a possible value for -march and -mtune.
14231
14232 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14233
14234 PR target/84502
14235 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14236 to all type variants.
14237
14238 PR tree-optimization/84503
14239 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14240 width as info->bitpos + info->bitsize - start.
14241 (merged_store_group::merge_overlapping): Simplify width computation.
14242 (check_no_overlap): New function.
14243 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14244 start + width and last_order of the group, fail if check_no_overlap
14245 fails.
14246 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14247 to group if check_no_overlap fails.
14248
14249 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14250
14251 * config/rs6000/altivec.md: Delete contraint arguments to
14252 define_expand, define_split, and define_peephole2, and in
14253 define_insn_and_split if always unused.
14254 * config/rs6000/darwin.md: Ditto.
14255 * config/rs6000/dfp.md: Ditto.
14256 * config/rs6000/rs6000.md: Ditto.
14257 * config/rs6000/sync.md: Ditto.
14258 * config/rs6000/vector.md: Ditto.
14259 * config/rs6000/vsx.md: Ditto.
14260
14261 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14262
14263 * config/rs6000/altivec.md: Write output control strings as braced
14264 blocks instead of double-quoted strings.
14265 * config/rs6000/darwin.md: Ditto.
14266 * config/rs6000/rs6000.md: Ditto.
14267 * config/rs6000/vector.md: Ditto.
14268 * config/rs6000/vsx.md: Ditto.
14269
14270 2018-02-21 Jason Merrill <jason@redhat.com>
14271
14272 PR c++/84314 - ICE with templates and fastcall attribute.
14273 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14274
14275 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14276
14277 * ipa-cp.c (determine_versionability): Fix comment typos.
14278
14279 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14280
14281 PR c/84229
14282 * ipa-cp.c (determine_versionability): Do not version functions caling
14283 va_arg_pack.
14284
14285 2018-02-21 Martin Liska <mliska@suse.cz>
14286
14287 PR driver/83193
14288 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14289 Add "native" as a possible value.
14290 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14291 the macro when native cpu detection is available.
14292
14293 2018-02-21 Martin Liska <mliska@suse.cz>
14294
14295 PR driver/83193
14296 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14297 Add "native" as a possible value.
14298 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14299 when native cpu detection is available.
14300
14301 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14302 Martin Sebor <msebor@redhat.com>
14303
14304 PR tree-optimization/84478
14305 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14306 false.
14307 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14308 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14309 support which is conservatively correct, for 2 only stay conservative
14310 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14311 argument to the 2 argument get_range_strlen, adjust 6 arg
14312 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14313 false.
14314 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14315 (gimple_fold_builtin_strlen): Pass true as last argument to
14316 get_range_strlen.
14317
14318 2018-02-20 Martin Sebor <msebor@redhat.com>
14319
14320 PR middle-end/84095
14321 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14322 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14323 (builtin_memref::builtin_memref): Factor out parts into
14324 set_base_and_offset and call it.
14325
14326 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14327
14328 PR middle-end/84406
14329 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14330 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14331 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14332 search at the associated MODE_INT.
14333
14334 2018-02-20 Jeff Law <law@redhat.com>
14335
14336 PR middle-end/82123
14337 PR tree-optimization/81592
14338 PR middle-end/79257
14339 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14340 for range data rather than using global data.
14341 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14342 range data rather than using global data.
14343 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14344 pass it to children as needed.
14345 (struct directive::fmtresult): Similarly.
14346 (struct directive::set_width): Similarly.
14347 (struct directive::set_precision): Similarly.
14348 (format_integer, format_directive, parse_directive): Similarly.
14349 (format_none): Accept unnamed vr_values parameter.
14350 (format_percent, format_floating, format_character): Similarly.
14351 (format_string, format_plain): Similarly.
14352 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14353 the EVRP range analyzer for range data rather than using global data.
14354 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14355 gimple-ssa-evrp-analyze.h
14356 (class sprintf_dom_walker): Add after_dom_children member function.
14357 Add evrp_range_analyzer member.
14358 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14359 range analyzer as needed.
14360 (sprintf_dom_walker::after_dom_children): New member function.
14361 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14362 if not optimizing.
14363 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14364 (evrp_range_analyzer::pop_to_marker): Likewise.
14365
14366 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14367
14368 PR tree-optimization/84419
14369 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14370 with the required type if its current type is compatible but
14371 different.
14372
14373 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14374
14375 PR middle-end/82004
14376 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14377 after vectorization.
14378
14379 2018-02-20 Martin Liska <mliska@suse.cz>
14380
14381 PR driver/83193
14382 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14383 possible values if we don't have a hint.
14384
14385 2018-02-20 Martin Liska <mliska@suse.cz>
14386
14387 PR c/84310
14388 PR target/79747
14389 * final.c (shorten_branches): Build align_tab array with one
14390 more element.
14391 * opts.c (finish_options): Add alignment option limit check.
14392 (MAX_CODE_ALIGN): Likewise.
14393 (MAX_CODE_ALIGN_VALUE): Likewise.
14394 * doc/invoke.texi: Document maximum allowed option value for
14395 all -falign-* options.
14396
14397 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14398
14399 PR target/84146
14400 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14401 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14402 * var-tracking.c (emit_note_insn_var_location): Remove all references
14403 to NOTE_INSN_CALL_ARG_LOCATION.
14404 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14405 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14406 Use copy_rtx_if_shared.
14407 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14408 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14409 (dwarf2out_var_location): Remove handling of
14410 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14411 on call_insn.
14412 * final.c (final_scan_insn): Remove all references to
14413 NOTE_INSN_CALL_ARG_LOCATION.
14414 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14415 before dumping final insns.
14416 * except.c (emit_note_eh_region_end): Remove all references to
14417 NOTE_INSN_CALL_ARG_LOCATION.
14418 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14419 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14420 * config/arc/arc.c (hwloop_optimize): Likewise.
14421 * config/arm/arm.c (create_fix_barrier): Likewise.
14422 * config/s390/s390.c (s390_chunkify_start): Likewise.
14423 * config/sh/sh.c (find_barrier): Likewise.
14424 * config/i386/i386.c (rest_of_insert_endbranch,
14425 ix86_seh_fixup_eh_fallthru): Likewise.
14426 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14427 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14428 * config/frv/frv.c (frv_function_prologue): Likewise.
14429 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14430 reg note.
14431 (note_outside_basic_block_p): Remove all references to
14432 NOTE_INSN_CALL_ARG_LOCATION.
14433 * gengtype.c (adjust_field_rtx_def): Likewise.
14434 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14435 Likewise.
14436 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14437 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14438
14439 PR c++/84444
14440 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14441 is ADDR_EXPR.
14442
14443 PR tree-optimization/84452
14444 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14445 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14446 is NULL.
14447
14448 2018-02-19 Martin Liska <mliska@suse.cz>
14449
14450 PR sanitizer/82183
14451 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14452
14453 2018-02-19 Martin Liska <mliska@suse.cz>
14454 Richard Sandiford <richard.sandiford@linaro.org>
14455
14456 PR tree-optimization/82491
14457 * gimple-fold.c (get_base_constructor): Make earlier bail out
14458 to prevent ubsan.
14459
14460 2018-02-19 Carl Love <cel@us.ibm.com>
14461
14462 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14463 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14464 BU_P8V_OVERLOAD_1.
14465 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14466 P8V_BUILTIN_VEC_NEG.
14467
14468 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14469
14470 * config/rl78/rl78.md (movdf): New define expand.
14471
14472 2018-02-19 Martin Liska <mliska@suse.cz>
14473
14474 PR other/80589
14475 * doc/invoke.texi: Fix typo.
14476 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14477
14478 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14479
14480 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14481 handle rs6000_single_float and rs6000_double_float specially for
14482 e500 family CPUs.
14483
14484 2018-02-16 Jeff Law <law@redhat.com>
14485
14486 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14487 (pop_regs): Use it.
14488
14489 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14490
14491 PR ipa/84425
14492 * ipa-inline.c (inline_small_functions): Fix a typo.
14493
14494 2018-02-16 Nathan Sidwell <nathan@acm.org>
14495
14496 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14497
14498 2018-02-16 Carl Love <cel@us.ibm.com>
14499
14500 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14501 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14502 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14503 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14504 expansion to P8V_BUILTIN_VEC_FLOAT2.
14505
14506 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14507
14508 PR rtl-optimization/70023
14509 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14510 src_regno into account.
14511
14512 2018-02-16 Carl Love <cel@us.ibm.com>
14513
14514 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14515 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14516 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14517 * config/rs6000/rs6000.c: Remove case statements for
14518 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14519 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14520 and P9V_BUILTIN_VEC_VINSERT4B.
14521 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14522 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14523 * config/rs6000/vsx.md:
14524 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14525 vec_insert4b.
14526
14527 2018-02-16 Carl Love <cel@us.ibm.com>
14528
14529 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14530 vec_insert4b.
14531 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14532 definitions.
14533 * config/rs6000/rs6000-c.c: Add the definitions for
14534 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14535 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14536 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14537 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14538 definition for insert4b and define insn *insert3b_internal.
14539 * doc/extend.texi: Add documentation for vec_extract4b.
14540
14541 2018-02-16 Nathan Sidwell <nathan@acm.org>
14542
14543 * doc/extend.texi (Backwards Compatibility): Mention friend
14544 injection. Note for-scope is deprecated.
14545 * doc/invoke.texi (-ffriend-injection): Deprecate.
14546
14547 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14548
14549 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14550 that moved to I2, also allow destinations that are a paradoxical
14551 subreg (instead of a normal reg).
14552
14553 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14554
14555 PR target/83831
14556 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14557 to QImode.
14558
14559 2018-02-16 Richard Biener <rguenther@suse.de>
14560
14561 PR tree-optimization/84037
14562 PR tree-optimization/84016
14563 PR target/82862
14564 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14565 Adjust vec_construct for the fact we need additional higher latency
14566 128bit inserts for AVX256 and AVX512 vector builds.
14567 (ix86_add_stmt_cost): Scale vector construction cost for
14568 elementwise loads.
14569
14570 2018-02-16 Richard Biener <rguenther@suse.de>
14571
14572 PR tree-optimization/84417
14573 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14574 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14575 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14576
14577 2018-02-16 Martin Liska <mliska@suse.cz>
14578
14579 PR sanitizer/84307
14580 * internal-fn.def (ASAN_CHECK): Set proper flags.
14581 (ASAN_MARK): Likewise.
14582
14583 2018-02-16 Julia Koval <julia.koval@intel.com>
14584
14585 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14586 from PTA_CANNONLAKE.
14587
14588 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14589
14590 PR target/84272
14591 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14592 Use ++iter rather than iter++ for std::list iterators.
14593 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14594 defer deleting them until all nodes in the forest are processed. Do
14595 free even leaf nodes. Change to_process into auto_vec.
14596
14597 PR bootstrap/84405
14598 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14599 * vec.h (vec_default_construct): Use memset instead of placement new
14600 if BROKEN_VALUE_INITIALIZATION is defined.
14601 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14602 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14603 is defined.
14604
14605 PR rtl-optimization/83723
14606 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14607 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14608 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14609 recursive calls.
14610 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14611 callers.
14612 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14613
14614 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14615
14616 PR rtl-optimization/81443
14617 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14618 from inner REGs to paradoxical SUBREGs.
14619
14620 2018-02-16 Richard Biener <rguenther@suse.de>
14621
14622 PR tree-optimization/84399
14623 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14624 For operands we can analyze at their definition make sure we can
14625 analyze them at each use as well.
14626
14627 2018-02-16 Richard Biener <rguenther@suse.de>
14628
14629 PR tree-optimization/84190
14630 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14631 volatile accesses if the decl isn't volatile.
14632
14633 2018-02-15 Jason Merrill <jason@redhat.com>
14634
14635 PR c++/84314 - ICE with templates and fastcall attribute.
14636 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14637 TYPE_CANONICAL on an existing type.
14638
14639 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14640
14641 PR tree-optimization/84383
14642 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14643 dstoff nor call operand_equal_p if dstbase is NULL.
14644
14645 PR tree-optimization/84334
14646 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14647 also a CONSTANT_CLASS_P, punt.
14648
14649 2018-02-14 Jim Wilson <jimw@sifive.com>
14650
14651 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14652 first SMALL_OPERAND check. New local min_second_step. Move assert
14653 to where locals are set. Add TARGET_RVC support.
14654 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14655
14656 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14657
14658 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14659
14660 2018-02-14 Martin Sebor <msebor@redhat.com>
14661
14662 PR tree-optimization/83698
14663 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14664 arrays constrain the offset range to their bounds.
14665 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14666 (builtin_access::overlap): Avoid setting the size of overlap if it's
14667 already been set.
14668 (maybe_diag_overlap): Also consider arrays when deciding what values
14669 of offsets to include in diagnostics.
14670
14671 2018-02-14 Martin Sebor <msebor@redhat.com>
14672
14673 PR c/84108
14674 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14675 that correspond to the kind of a declaration.
14676
14677 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14678
14679 PR target/83984
14680 * config/pa/pa.md: Load address of PIC label using the linkage table
14681 if the label is nonlocal.
14682
14683 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14684
14685 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14686 warning message if user requests -maltivec=be.
14687 * doc/invoke.texi: Document deprecation of -maltivec=be.
14688
14689 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14690
14691 PR target/84220
14692 * config/rs6000/rs6000-c.c: Update definitions for
14693 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14694 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14695
14696 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14697
14698 PR target/84239
14699 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14700 add _get_ssp intrinsics. Remove argument from
14701 __builtin_ia32_rdssp[d|q].
14702 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14703 * config/i386/i386-builtin.def: Remove argument from
14704 __builtin_ia32_rdssp[d|q].
14705 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14706 ix86_expand_special_args_builtin for _rdssp[d|q].
14707 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14708 Clear register before usage.
14709 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14710 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14711
14712 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14713
14714 PR tree-optimization/84357
14715 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14716 operand 1 of an ARRAY_REF too.
14717
14718 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14719
14720 PR target/83831
14721 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14722 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14723 declarations.
14724 (set_of_reg): New struct.
14725 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14726 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14727 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14728 functions.
14729 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14730 Split into bitclr, bitset, bitinvert patterns if appropriate.
14731 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14732 use rx_fuse_in_memory_bitop.
14733 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14734 to named insn, correct maximum insn length.
14735
14736 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14737
14738 PR target/79242
14739 * machmode.def: Define a complex mode for PARTIAL_INT.
14740 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14741 MODE_PARTIAL_INT.
14742 * doc/rtl.texi: Document CSPImode.
14743 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14744 handling.
14745 (msp430_hard_regno_nregs_with_padding): Likewise.
14746
14747 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14748
14749 PR target/84279
14750 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14751
14752 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14753
14754 PR rtl-optimization/84169
14755 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14756 we generated a parallel as new i3 and we split that to new i2 and i3
14757 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14758 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14759 those to i2, not i1. Partially rewrite this scan code.
14760
14761 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14762
14763 PR c/82210
14764 * stor-layout.c (place_field): For variable length fields, adjust
14765 offset_align afterwards not just based on the field's alignment,
14766 but also on the size.
14767
14768 PR middle-end/84309
14769 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14770 of exps and logs in the use_exp2 case.
14771
14772 2018-02-13 Jeff Law <law@redhat.com>
14773
14774 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14775 entry for "vector".
14776
14777 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14778 ARGS as unused.
14779
14780 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14781
14782 PR debug/84342
14783 PR debug/84319
14784 * common.opt (gas-loc-support, gas-locview-support): New.
14785 (ginline-points, ginternal-reset-location-views): New.
14786 * doc/invoke.texi: Document them. Use @itemx where intended.
14787 (gvariable-location-views): Adjust.
14788 * target.def (reset_location_view): New.
14789 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14790 (TARGET_RESET_LOCATION_VIEW): New.
14791 * doc/tm.texi: Rebuilt.
14792 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14793 (dwarf2out_default_as_locview_support): New.
14794 (output_asm_line_debug_info): Use option variables.
14795 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14796 (output_loc_list): Likewise.
14797 (add_high_low_attributes): Check option variables.
14798 Don't output entry view attribute in strict mode.
14799 (gen_inlined_subroutine_die): Check option variables.
14800 (dwarf2out_inline_entry): Likewise.
14801 (init_sections_and_labels): Likewise.
14802 (dwarf2out_early_finish): Likewise.
14803 (maybe_reset_location_view): New, from...
14804 (dwarf2out_var_location): ... here. Call it.
14805 * debug.h (dwarf2out_default_as_loc_support): Declare.
14806 (dwarf2out_default_as_locview_support): Declare.
14807 * hooks.c (hook_int_rtx_insn_0): New.
14808 * hooks.h (hook_int_rtx_insn_0): Declare.
14809 * toplev.c (process_options): Take -gas-loc-support and
14810 -gas-locview-support from dwarf2out. Enable
14811 -gvariable-location-views by default only with locview
14812 assembler support. Enable -ginternal-reset-location-views by
14813 default only if the target defines the corresponding hook.
14814 Enable -ginline-points by default if location views are
14815 enabled; force it disabled if statement frontiers are
14816 disabled.
14817 * tree-inline.c (expand_call_inline): Check option variables.
14818 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14819
14820 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14821
14822 PR tree-optimization/84321
14823 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14824 handling. Also check whether the anti-range contains any values
14825 that satisfy the mask; switch to a VR_RANGE if not.
14826
14827 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14828
14829 PR sanitizer/84340
14830 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14831
14832 2018-02-13 Martin Jambor <mjambor@suse.cz>
14833
14834 PR c++/83990
14835 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14836 of call statements, also set location of a load to a temporary.
14837
14838 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14839
14840 * config/rl78/rl78.c (add_vector_labels): New function.
14841 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14842 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14843 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14844 which checks that no arguments are passed.
14845 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14846 * doc/extend.texi: Documentation for the new attribute.
14847
14848 2018-02-13 Andreas Schwab <schwab@suse.de>
14849
14850 * config/riscv/linux.h (CPP_SPEC): Define.
14851
14852 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14853
14854 PR target/84335
14855 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14856 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14857 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14858 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14859 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14860 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14861 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14862 temporarily for AES and PCLMUL builtins.
14863
14864 PR tree-optimization/84339
14865 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14866 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14867 Formatting fixes.
14868
14869 PR middle-end/84309
14870 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14871 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14872 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14873 inline function.
14874 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14875 inline function.
14876 * omp-simd-clone.h: New file.
14877 * omp-simd-clone.c: Include omp-simd-clone.h.
14878 (expand_simd_clones): No longer static.
14879 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14880 cgraph.h and omp-simd-clone.h.
14881 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14882 (vect_recog_widen_shift_pattern): Formatting fix.
14883 (vect_pattern_recog_1): Don't check optab for calls.
14884
14885 PR target/84336
14886 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14887 operands[2] into a REG before using gen_lowpart on it.
14888
14889 2018-02-12 Jeff Law <law@redhat.com>
14890
14891 PR target/83760
14892 * config/sh/sh.c (find_barrier): Consider a sibling call
14893 a barrier as well.
14894
14895 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14896 successfully back substituting a reg.
14897
14898 2018-02-12 Richard Biener <rguenther@suse.de>
14899
14900 PR tree-optimization/84037
14901 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14902 parameter, move visited init to caller.
14903 (vect_slp_analyze_operations): Separate cost from validity
14904 check, initialize visited once for all instances.
14905 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14906 for all instances.
14907 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14908 out an assert.
14909 (vect_model_promotion_demotion_cost): Likewise.
14910 (vectorizable_bswap): Guard cost modeling with !slp_node
14911 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14912 SLP stmts.
14913 (vectorizable_call): Likewise.
14914 (vectorizable_conversion): Likewise.
14915 (vectorizable_assignment): Likewise.
14916 (vectorizable_shift): Likewise.
14917 (vectorizable_operation): Likewise.
14918 (vectorizable_store): Likewise.
14919 (vectorizable_load): Likewise.
14920 (vectorizable_condition): Likewise.
14921 (vectorizable_comparison): Likewise.
14922
14923 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14924
14925 PR sanitizer/84307
14926 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
14927 (ASAN_MARK): Fix fnspec to account for return value, change pointer
14928 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
14929
14930 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
14931
14932 PR middle-end/83665
14933 * params.def (inline-min-speedup): Increase from 8 to 15.
14934 (max-inline-insns-auto): Decrease from 40 to 30.
14935 * ipa-split.c (consider_split): Add some buffer for function to
14936 be considered inlining candidate.
14937 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
14938 default values.
14939
14940 2018-02-12 Richard Biener <rguenther@suse.de>
14941
14942 PR tree-optimization/84037
14943 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
14944 matched stmts if we cannot swap the non-matched ones.
14945
14946 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14947
14948 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
14949 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
14950 _mm_maskz_scalef_round_ss): New intrinsics.
14951 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
14952 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
14953 __builtin_ia32_scalefss_round): Remove.
14954 (__builtin_ia32_scalefsd_mask_round,
14955 __builtin_ia32_scalefss_mask_round): New intrinsics.
14956 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
14957 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
14958 ((match_operand:VF_128 2 "<round_nimm_predicate>"
14959 "<round_constraint>")): Changed to ...
14960 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
14961 "<round_scalar_constraint>")): ... this.
14962 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
14963 %0, %1, %2<round_op3>}"): Changed to ...
14964 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
14965 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
14966 %2<round_scalar_mask_op3>}"): ... this.
14967 * config/i386/subst.md (round_scalar_nimm_predicate): New.
14968
14969 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
14970
14971 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
14972 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
14973 (_mm_maskz_sqrt_round_ss): New intrinsics.
14974 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
14975 (__builtin_ia32_sqrtsd_mask_round)
14976 (__builtin_ia32_sqrtss_mask_round): New builtins.
14977 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
14978 (__builtin_ia32_sqrtss_round): Remove.
14979 (__builtin_ia32_sqrtsd_mask_round)
14980 (__builtin_ia32_sqrtss_mask_round): New builtins.
14981 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
14982 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
14983 ((match_operand:VF_128 1 "vector_operand"
14984 "xBm,<round_constraint>")): Changed to ...
14985 ((match_operand:VF_128 1 "vector_operand"
14986 "xBm,<round_scalar_constraint>")): ... this.
14987 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
14988 %0, %2, %<iptr>1<round_op3>}): Changed to ...
14989 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
14990 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
14991 %<iptr>1<round_scalar_mask_op3>}): ... this.
14992 ((set_attr "prefix" "<round_prefix>")): Changed to ...
14993 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
14994
14995 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
14996
14997 PR target/84266
14998 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
14999 Cast vec_cmpeq result to correct type.
15000 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15001 Cast vec_cmpgt result to correct type.
15002
15003 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15004
15005 * final.c (final_scan_insn_1): Renamed from...
15006 (final_scan_insn): ... this. New wrapper, to recover
15007 seen from the outermost call in recursive ones.
15008 * config/sparc/sparc.c (output_return): Drop seen from call.
15009 (output_sibcall): Likewise.
15010 * config/visium/visium.c (output_branch): Likewise.
15011
15012 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15013
15014 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15015 function label.
15016
15017 2018-02-10 Alan Modra <amodra@gmail.com>
15018
15019 PR target/84300
15020 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15021 Specify LR as an input.
15022
15023 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15024
15025 PR sanitizer/83987
15026 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15027 remove_member_access_dummy_vars): New functions.
15028 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15029 lower_omp_1, execute_lower_omp): Use them.
15030
15031 PR rtl-optimization/84308
15032 * shrink-wrap.c (spread_components): Release todo vector.
15033
15034 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15035
15036 PR rtl-optimization/57193
15037 * ira-color.c (struct allocno_color_data): Add member
15038 conflict_allocno_hard_prefs.
15039 (update_conflict_allocno_hard_prefs): New.
15040 (bucket_allocno_compare_func): Add a preference based on
15041 conflict_allocno_hard_prefs.
15042 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15043 (color_allocnos): Remove a dead code. Initiate
15044 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15045
15046 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15047
15048 PR target/84226
15049 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15050 constraint from =wa to wa. Avoid a subreg on the output operand,
15051 instead use a pseudo and subreg it in a move.
15052 (p9_xxbrd_<mode>): Changed to ...
15053 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15054 (p9_xxbrd_v2df): New expander.
15055 (p9_xxbrw_<mode>): Changed to ...
15056 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15057 (p9_xxbrw_v4sf): New expander.
15058
15059 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15060
15061 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15062
15063 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15064
15065 PR target/83926
15066 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15067 multiply in 32-bit mode.
15068 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15069 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15070 mode.
15071
15072 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15073
15074 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15075 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15076 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15077 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15078
15079 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15080
15081 PR lto/84213
15082 * dwarf2out.c (is_trivial_indirect_ref): New function.
15083 (dwarf2out_late_global_decl): Do not generate a location
15084 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15085 and that are not defined in the current unit.
15086
15087 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15088
15089 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15090 instead of a libcall for UNORDERED.
15091
15092 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15093
15094 PR target/82641
15095 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15096 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15097
15098 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15099
15100 PR target/PR84295
15101 * config/s390/s390.c (s390_set_current_function): Invoke
15102 s390_indirect_branch_settings also if fndecl didn't change.
15103
15104 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15105
15106 * config/rs6000/rs6000.md (blockage): Set length to zero.
15107
15108 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15109
15110 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15111
15112 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15113
15114 PR sanitizer/84285
15115 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15116 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15117 -static-lib*san.
15118
15119 PR debug/84252
15120 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15121 PARALLEL incoming that failed vt_get_decl_and_offset check.
15122
15123 PR middle-end/84237
15124 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15125 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15126 TREE_READONLY bit.
15127 (get_variable_section): For decls in named .bss* sections pass true as
15128 second argument to bss_initializer_p.
15129
15130 2018-02-09 Marek Polacek <polacek@redhat.com>
15131 Jakub Jelinek <jakub@redhat.com>
15132
15133 PR c++/83659
15134 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15135 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15136 Sync some changes from cxx_fold_indirect_ref.
15137
15138 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15139
15140 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15141 markers.
15142 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15143 (BLOCK_INLINE_ENTRY_LABEL): New.
15144 (dwarf2out_var_location): Disregard inline entry markers.
15145 (inline_entry_data): New struct.
15146 (inline_entry_data_hasher): New hashtable type.
15147 (inline_entry_data_hasher::hash): New.
15148 (inline_entry_data_hasher::equal): New.
15149 (inline_entry_data_table): New variable.
15150 (add_high_low_attributes): Add DW_AT_entry_pc and
15151 DW_AT_GNU_entry_view attributes if a pending entry is found
15152 in inline_entry_data_table. Add old entry_pc attribute only
15153 if debug nonbinding markers are disabled.
15154 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15155 markers are enabled.
15156 (block_within_block_p, dwarf2out_inline_entry): New.
15157 (dwarf2out_finish): Check that no entries remained in
15158 inline_entry_data_table.
15159 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15160 (final_scan_insn, notice_source_line): Likewise.
15161 (rest_of_clean_state): Skip inline entry markers.
15162 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15163 markers.
15164 * gimple.c (gimple_build_debug_inline_entry): New.
15165 * gimple.h (enum gimple_debug_subcode): Add
15166 GIMPLE_DEBUG_INLINE_ENTRY.
15167 (gimple_build_debug_inline_entry): Declare.
15168 (gimple_debug_inline_entry_p): New.
15169 (gimple_debug_nonbind_marker_p): Adjust.
15170 * insn-notes.def (INLINE_ENTRY): New.
15171 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15172 inline entry marker notes.
15173 (print_insn): Likewise.
15174 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15175 (INSN_DEBUG_MARKER_KIND): Likewise.
15176 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15177 * tree-inline.c (expand_call_inline): Build and insert
15178 debug_inline_entry stmt.
15179 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15180 inline entry blocks early, if nonbind markers are enabled.
15181 (dump_scope_block): Dump fragment info.
15182 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15183 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15184 (gimple_build_debug_inline_entry): New.
15185 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15186 Enable/disable inline entry points too.
15187 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15188 (DEBUG_INSN): Describe inline entry markers.
15189
15190 * common.opt (gvariable-location-views): New.
15191 (gvariable-location-views=incompat5): New.
15192 * config.in: Rebuilt.
15193 * configure: Rebuilt.
15194 * configure.ac: Test assembler for view support.
15195 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15196 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15197 * dwarf2out.c (var_loc_view): New typedef.
15198 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15199 (dwarf2out_locviews_in_attribute): New.
15200 (dwarf2out_locviews_in_loclist): New.
15201 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15202 (enum dw_line_info_opcode): Add LI_adv_address.
15203 (struct dw_line_info_table): Add view.
15204 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15205 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15206 (zero_view_p): New variable.
15207 (ZERO_VIEW_P): New macro.
15208 (output_asm_line_debug_info): New.
15209 (struct var_loc_node): Add view.
15210 (add_AT_view_list, AT_loc_list): New.
15211 (add_var_loc_to_decl): Add view param. Test it against last.
15212 (new_loc_list): Add view params. Record them.
15213 (AT_loc_list_ptr): Handle loc and view lists.
15214 (view_list_to_loc_list_val_node): New.
15215 (print_dw_val): Handle dw_val_class_view_list.
15216 (size_of_die): Likewise.
15217 (value_format): Likewise.
15218 (loc_list_has_views): New.
15219 (gen_llsym): Set vl_symbol too.
15220 (maybe_gen_llsym, skip_loc_list_entry): New.
15221 (dwarf2out_maybe_output_loclist_view_pair): New.
15222 (output_loc_list): Output view list or entries too.
15223 (output_view_list_offset): New.
15224 (output_die): Handle dw_val_class_view_list.
15225 (output_dwarf_version): New.
15226 (output_compilation_unit_header): Use it.
15227 (output_skeleton_debug_sections): Likewise.
15228 (output_rnglists, output_line_info): Likewise.
15229 (output_pubnames, output_aranges): Update version comments.
15230 (output_one_line_info_table): Output view numbers in asm comments.
15231 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15232 Call maybe_gen_llsym.
15233 (loc_list_from_tree_1): Adjust.
15234 (add_AT_location_description): Create view list attribute if
15235 needed, check it's absent otherwise.
15236 (convert_cfa_to_fb_loc_list): Adjust.
15237 (maybe_emit_file): Call output_asm_line_debug_info for test.
15238 (dwarf2out_var_location): Reset views as needed. Precompute
15239 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15240 attribute. Set view.
15241 (new_line_info_table): Reset next view.
15242 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15243 (dwarf2out_source_line): Likewise. Output view resets and labels to
15244 the assembler, or select appropriate line info opcodes.
15245 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15246 (optimize_string_length): Catch it. Adjust.
15247 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15248 dw_val_class_view_list, and remove it if no longer needed.
15249 (hash_loc_list): Hash view numbers.
15250 (loc_list_hasher::equal): Compare them.
15251 (optimize_location_lists): Check whether a view list symbol is
15252 needed, and whether the locview attribute is present, and
15253 whether they match. Remove the locview attribute if no longer
15254 needed.
15255 (index_location_lists): Call skip_loc_list_entry for test.
15256 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15257 Use output_dwarf_version.
15258 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15259 (struct dw_val_node): Add val_view_list.
15260 * final.c (SEEN_NEXT_VIEW): New.
15261 (set_next_view_needed): New.
15262 (clear_next_view_needed): New.
15263 (maybe_output_next_view): New.
15264 (final_start_function): Rename to...
15265 (final_start_function_1): ... this. Take pointer to FIRST,
15266 add SEEN parameter. Emit param bindings in the initial view.
15267 (final_start_function): Reintroduce SEEN-less interface.
15268 (final): Rename to...
15269 (final_1): ... this. Take SEEN parameter. Output final pending
15270 next view at the end.
15271 (final): Reintroduce seen-less interface.
15272 (final_scan_insn): Output pending next view before switching
15273 sections or ending a block. Mark the next view as needed when
15274 outputting variable locations. Notify debug backend of section
15275 changes, and of location view changes.
15276 (rest_of_handle_final): Adjust.
15277 * toplev.c (process_options): Autodetect value for debug variable
15278 location views option. Warn on incompat5 without -gdwarf-5.
15279 * doc/invoke.texi (gvariable-location-views): New.
15280 (gvariable-location-views=incompat5): New.
15281 (gno-variable-location-views): New.
15282
15283 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15284
15285 PR tree-optimization/84136
15286 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15287 that the result of find_edge is non-NULL.
15288
15289 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15290
15291 PR target/83008
15292 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15293 storing integer register in SImode. Fix cost of 256 and 512
15294 byte aligned SSE register store.
15295
15296 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15297
15298 * config/i386/i386.c (ix86_multiplication_cost): Fix
15299 multiplication cost for TARGET_AVX512DQ.
15300
15301 2018-02-08 Marek Polacek <polacek@redhat.com>
15302
15303 PR tree-optimization/84238
15304 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15305 get_range_strlen.
15306
15307 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15308
15309 PR tree-optimization/84265
15310 * tree-vect-stmts.c (vectorizable_store): Don't treat
15311 VMAT_CONTIGUOUS accesses as grouped.
15312 (vectorizable_load): Likewise.
15313
15314 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15315
15316 PR tree-optimization/81635
15317 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15318 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15319 (test_round_for_mask): New functions.
15320 (wide_int_cc_tests): Call test_round_for_mask.
15321 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15322 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15323 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15324 range returned by get_range_info.
15325
15326 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15327
15328 PR ipa/81360
15329 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15330 * symtab.c: Include builtins.h
15331 (symtab_node::output_to_lto_symbol_table_p): Move here
15332 from lto-streamer-out.c:output_symbol_p.
15333 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15334 (output_symbol_p): Move all logic to symtab.c
15335 (produce_symtab): Update.
15336
15337 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15338
15339 * config/s390/s390-opts.h (enum indirect_branch): Define.
15340 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15341 (s390_indirect_branch_via_thunk)
15342 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15343 (enum s390_indirect_branch_type): Define.
15344 * config/s390/s390.c (struct s390_frame_layout, struct
15345 machine_function): Remove.
15346 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15347 (indirect_branch_table_label_no, indirect_branch_table_name):
15348 Define variables.
15349 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15350 (enum s390_indirect_branch_option): Define.
15351 (s390_return_addr_from_memory): New function.
15352 (s390_handle_string_attribute): New function.
15353 (s390_attribute_table): Add new attribute handler.
15354 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15355 (s390_indirect_branch_via_thunk): New function.
15356 (s390_indirect_branch_via_inline_thunk): New function.
15357 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15358 sibling call optimization for non z10 compiles.
15359 (s390_emit_call): Force indirect branch target to be a single
15360 register. Add r1 clobber for non-z10 compiles.
15361 (s390_emit_epilogue): Emit return jump via return_use expander.
15362 (s390_reorg): Handle JUMP_INSNs as execute targets.
15363 (s390_option_override_internal): Perform validity checks for the
15364 new command line options.
15365 (s390_indirect_branch_attrvalue): New function.
15366 (s390_indirect_branch_settings): New function.
15367 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15368 (s390_output_indirect_thunk_function): New function.
15369 (s390_code_end): Implement target hook.
15370 (s390_case_values_threshold): Implement target hook.
15371 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15372 macros.
15373 * config/s390/s390.h (struct s390_frame_layout)
15374 (struct machine_function): Move here from s390.c.
15375 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15376 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15377 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15378 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15379 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15380 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15381 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15382 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15383 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15384 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15385 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15386 (mnemonic attribute): Add values which aren't recognized
15387 automatically.
15388 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15389 pattern for branch conversion. Fix mnemonic attribute.
15390 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15391 indirect branch via thunk if requested.
15392 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15393 ("*indirect_jump"): Disable for branch conversion using out of
15394 line thunks.
15395 ("indirect_jump_via_thunk<mode>_z10")
15396 ("indirect_jump_via_thunk<mode>")
15397 ("indirect_jump_via_inlinethunk<mode>_z10")
15398 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15399 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15400 ("casesi_jump_via_inlinethunk<mode>_z10")
15401 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15402 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15403 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15404 ("*indirect2_jump"): Disable for branch conversion.
15405 ("casesi_jump"): Turn into expander and expand patterns for branch
15406 conversion.
15407 ("return_use"): New expander.
15408 ("*return"): Emit return via thunk and rename it to ...
15409 ("*return<mode>"): ... this one.
15410 * config/s390/s390.opt: Add new options and and enum for the
15411 option values.
15412
15413 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15414
15415 * lra-constraints.c (match_reload): Unconditionally use
15416 gen_lowpart_SUBREG, rather than selecting between that
15417 and equivalent gen_rtx_SUBREG code.
15418
15419 2018-02-08 Richard Biener <rguenther@suse.de>
15420
15421 PR tree-optimization/84233
15422 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15423 changed flag instead of boguously re-using phi_inserted.
15424
15425 2018-02-08 Martin Jambor <mjambor@suse.cz>
15426
15427 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15428 static local variables.
15429
15430 2018-02-08 Richard Biener <rguenther@suse.de>
15431
15432 PR tree-optimization/84278
15433 * tree-vect-stmts.c (vectorizable_store): When looking for
15434 smaller vector types to perform grouped strided loads/stores
15435 make sure the mode is supported by the target.
15436 (vectorizable_load): Likewise.
15437
15438 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15439
15440 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15441 Increase LDP/STP opportunities by adding adjacent callee-saves.
15442
15443 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15444
15445 PR rtl-optimization/84068
15446 PR rtl-optimization/83459
15447 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15448
15449 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15450
15451 PR tree-optimization/84224
15452 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15453 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15454 non-zero arguments.
15455
15456 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15457
15458 PR target/84113
15459 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15460 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15461 count, remove one USE.
15462
15463 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15464
15465 * doc/install.texi (Configuration): Document the
15466 --with-long-double-format={ibm,ieee} PowerPC configuration
15467 options.
15468
15469 PR target/84154
15470 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15471 Convert from define_expand to be define_insn_and_split. Rework
15472 float/double/_Float128 conversions to QI/HI/SImode to work with
15473 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15474 conversions to QI/HImode types did a store and then a load to
15475 truncate the value. For conversions to VSX registers, don't split
15476 the insn, instead emit the code directly. Use the code iterator
15477 any_fix to combine signed and unsigned conversions.
15478 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15479 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15480 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15481 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15482 (fix_<mode>di2_hw): Likewise.
15483 (fixuns_<mode>di2_hw): Likewise.
15484 (fix_<mode>si2_hw): Likewise.
15485 (fixuns_<mode>si2_hw): Likewise.
15486 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15487 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15488 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15489 fix<uns>_trunc<SFDF:mode>si2_p8.
15490 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15491 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15492 (fix<uns>_<mode>_mem): Likewise.
15493 (fctiw<u>z_<mode>_mem): Likewise.
15494 (fix<uns>_<mode>_mem): Likewise.
15495 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15496 the register allocator from doing a direct move to the GPRs to do
15497 a store, and instead use the ISA 3.0 store byte/half-word from
15498 vector register instruction. For IEEE 128-bit floating point,
15499 also optimize stores of 32-bit ints.
15500 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15501
15502 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15503
15504 * genextract.c (push_pathstr_operand): New function to support
15505 [a-zA-Z].
15506 (walk_rtx): Call push_pathstr_operand.
15507 (print_path): Support [a-zA-Z].
15508
15509 2018-02-07 Richard Biener <rguenther@suse.de>
15510
15511 PR tree-optimization/84037
15512 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15513 (cse_and_gimplify_to_preheader): Declare.
15514 (vect_get_place_in_interleaving_chain): Likewise.
15515 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15516 ivexpr_map.
15517 (_loop_vec_info::~_loop_vec_info): Delete it.
15518 (cse_and_gimplify_to_preheader): New function.
15519 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15520 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15521 (vectorizable_load): Likewise. For grouped stores always base
15522 the IV on the first element.
15523 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15524 condition before gimplifying.
15525
15526 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15527
15528 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15529 *DIV_EXPR and *MOD_EXPR.
15530
15531 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15532
15533 PR target/84248
15534 * config/i386/i386.c (ix86_option_override_internal): Mask out
15535 the CF_SET bit when checking -fcf-protection.
15536
15537 2018-02-07 Tom de Vries <tom@codesourcery.com>
15538
15539 PR libgomp/84217
15540 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15541 enough.
15542
15543 2018-02-07 Richard Biener <rguenther@suse.de>
15544
15545 PR tree-optimization/84204
15546 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15547 this place.
15548
15549 PR tree-optimization/84205
15550 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15551 special-case isl_ast_op_zdiv_r.
15552
15553 PR tree-optimization/84223
15554 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15555 Only add conditions from within the region.
15556 (gather_bbs::after_dom_children): Adjust.
15557
15558 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15559
15560 PR target/84209
15561 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15562 * config/avr/avr.md: Only post-reload split REG-REG moves if
15563 either register is GENERAL_REG_P.
15564
15565 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15566
15567 PR tree-optimization/84235
15568 * tree-ssa-scopedtables.c
15569 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15570 if the subtraction is performed in floating point type where NaNs are
15571 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15572 build 1. Formatting fix.
15573
15574 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15575
15576 PR target/84146
15577 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15578 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15579 and skip it regardless of bb boundaries. Use CALL_P macro,
15580 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15581 unnecessarily, formatting fix.
15582
15583 2018-02-06 Michael Collison <michael.collison@arm.com>
15584
15585 * config/arm/thumb2.md:
15586 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15587 (*thumb_mov_notscc): Ditto.
15588
15589 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15590
15591 PR target/84154
15592 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15593 unsigned_fix, not "s".
15594
15595 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15596
15597 * configure.ac (gcc_fn_eh_frame_ro): New function.
15598 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15599 correct .eh_frame permissions.
15600 * configure: Regenerate.
15601
15602 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15603
15604 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15605 irrelevant options.
15606
15607 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15608
15609 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15610 Display warning message for -mno-speculate-indirect-jumps.
15611
15612 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15613
15614 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15615 Undocumented.
15616 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15617
15618 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15619
15620 PR tree-optimization/84225
15621 * tree-eh.c (find_trapping_overflow): Only call
15622 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15623
15624 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15625
15626 PR target/84145
15627 * config/i386/i386.c: Reimplement the check of possible options
15628 -mibt/-mshstk conbination. Change error messages.
15629 * doc/invoke.texi: Fix a typo: remove extra '='.
15630
15631 2018-02-06 Marek Polacek <polacek@redhat.com>
15632
15633 PR tree-optimization/84228
15634 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15635
15636 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15637
15638 PR target/82641
15639 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15640 emitted arch directives.
15641 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15642 __ARM_FEATURE_COPROC before changing architectures.
15643
15644 2018-02-06 Richard Biener <rguenther@suse.de>
15645
15646 * config/i386/i386.c (print_reg): Fix typo.
15647 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15648
15649 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15650
15651 * configure: Regenerate.
15652
15653 2018-02-05 Martin Sebor <msebor@redhat.com>
15654
15655 PR tree-optimization/83369
15656 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15657 inlining context.
15658
15659 2018-02-05 Martin Liska <mliska@suse.cz>
15660
15661 * doc/invoke.texi: Cherry-pick upstream r323995.
15662
15663 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15664
15665 * ira.c (ira_init_register_move_cost): Adjust comment.
15666
15667 2018-02-05 Martin Liska <mliska@suse.cz>
15668
15669 PR gcov-profile/84137
15670 * doc/gcov.texi: Fix typo in documentation.
15671
15672 2018-02-05 Martin Liska <mliska@suse.cz>
15673
15674 PR gcov-profile/83879
15675 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15676 using dlopen functionality.
15677
15678 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15679
15680 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15681 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15682 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15683 _mm_maskz_range_round_ss): New intrinsics.
15684 (__builtin_ia32_rangesd128_round)
15685 (__builtin_ia32_rangess128_round): Remove.
15686 (__builtin_ia32_rangesd128_mask_round,
15687 __builtin_ia32_rangess128_mask_round): New builtins.
15688 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15689 __builtin_ia32_rangess128_round): Remove.
15690 (__builtin_ia32_rangesd128_mask_round,
15691 __builtin_ia32_rangess128_mask_round): New builtins.
15692 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15693 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15694 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15695 "<round_saeonly_constraint>")): Changed to ...
15696 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15697 "<round_saeonly_scalar_constraint>")): ... this.
15698 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15699 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15700 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15701 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15702 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15703
15704 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15705
15706 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15707 options.
15708 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15709 Remove all values except native, 8540 and 8548.
15710
15711 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15712
15713 * config/i386/i386.c (ix86_output_function_return): Pass
15714 INVALID_REGNUM, instead of -1, as invalid register number to
15715 indirect_thunk_name and output_indirect_thunk.
15716
15717 2018-02-02 Julia Koval <julia.koval@intel.com>
15718
15719 * config.gcc: Add -march=icelake.
15720 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15721 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15722 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15723 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15724 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15725 (processor_target_table): Add icelake.
15726 (ix86_option_override_internal): Handle new PTAs.
15727 (get_builtin_code_for_version): Handle icelake.
15728 (M_INTEL_COREI7_ICELAKE): New.
15729 (fold_builtin_cpu): Handle icelake.
15730 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15731 * doc/invoke.texi: Add -march=icelake.
15732
15733 2018-02-02 Julia Koval <julia.koval@intel.com>
15734
15735 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15736 to wide_int_bitmask.
15737 * wide-int-bitmask.h: New.
15738
15739 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15740
15741 PR target/84066
15742 * config/i386/i386.md: Replace Pmode with word_mode in
15743 builtin_setjmp_setup and builtin_longjmp to support x32.
15744
15745 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15746
15747 PR target/56010
15748 PR target/83743
15749 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15750 #include "opts.h".
15751 (rs6000_supported_cpu_names): New static variable.
15752 (linux_cpu_translation_table): Likewise.
15753 (elf_platform) <cpu>: Define new static variable and use it.
15754 Translate kernel AT_PLATFORM name to canonical name if needed.
15755 Error if platform name is unknown.
15756
15757 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15758
15759 PR target/84089
15760 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15761
15762 2018-02-01 Jeff Law <law@redhat.com>
15763
15764 PR target/84128
15765 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15766 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15767 the scratch if RELEASE_VIA_POP is false.
15768 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15769 If we have to save a temporary register, decrement SIZE appropriately.
15770 Pass new arguments to release_scratch_register_on_entry.
15771 (ix86_adjust_stack_and_probe): Likewise.
15772 (ix86_emit_probe_stack_range): Pass new arguments to
15773 release_scratch_register_on_entry.
15774
15775 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15776
15777 PR rtl-optimization/84157
15778 * combine.c (change_zero_ext): Use REG_P predicate in
15779 front of HARD_REGISTER_P predicate.
15780
15781 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15782
15783 * config/avr/avr.c (avr_option_override): Move disabling of
15784 -fdelete-null-pointer-checks to...
15785 * common/config/avr/avr-common.c (avr_option_optimization_table):
15786 ...here.
15787
15788 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15789
15790 PR tree-optimization/81635
15791 * tree-data-ref.c (split_constant_offset_1): For types that
15792 wrap on overflow, try to use range info to prove that wrapping
15793 cannot occur.
15794
15795 2018-02-01 Renlin Li <renlin.li@arm.com>
15796
15797 PR target/83370
15798 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15799 TAILCALL_ADDR_REGS.
15800 (aarch64_register_move_cost): Likewise.
15801 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15802 TAILCALL_ADDR_REGS.
15803 (REG_CLASS_NAMES): Likewise.
15804 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15805 TAILCALL_ADDR_REGS. Remove IP registers.
15806 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15807
15808 2018-02-01 Richard Biener <rguenther@suse.de>
15809
15810 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15811 for specifying RPO order and allow NULL for that.
15812 * domwalk.c (dom_walker::dom_walker): Likewise.
15813 (dom_walker::walk): Handle NULL RPO order.
15814 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15815 in RPO order.
15816 (rewrite_update_dom_walker): Likewise.
15817 (mark_def_dom_walker): Likewise.
15818
15819 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15820
15821 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15822 (aarch64_maybe_expand_sve_subreg_move): Declare.
15823 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15824 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15825 predicate.
15826 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15827 that are semantically a reverse operation.
15828 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15829 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15830 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15831 functions.
15832 (aarch64_can_change_mode_class): For big-endian, forbid changes
15833 between two SVE modes if they have different element sizes.
15834
15835 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15836
15837 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15838 the TImode handling for big-endian targets.
15839
15840 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15841
15842 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15843 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15844 not just bytes.
15845 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15846 Remove BSWAP handing for big-endian targets and use the form of
15847 LD1RQ appropariate for the mode.
15848
15849 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15850
15851 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15852 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15853 duplicated element.
15854
15855 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15856
15857 PR tearget/83845
15858 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15859 check for operands that need to go through aarch64_sve_reload_be.
15860
15861 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15862
15863 PR tree-optimization/81661
15864 PR tree-optimization/84117
15865 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15866 * tree-eh.c: Include gimplify.h.
15867 (find_trapping_overflow, replace_trapping_overflow,
15868 rewrite_to_non_trapping_overflow): New functions.
15869 * tree-vect-loop.c: Include tree-eh.h.
15870 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15871 * tree-data-ref.c: Include tree-eh.h.
15872 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15873
15874 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15875
15876 PR rtl-optimization/84123
15877 * combine.c (change_zero_ext): Check if hard register satisfies
15878 can_change_dest_mode before calling gen_lowpart_SUBREG.
15879
15880 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15881
15882 PR target/82444
15883 * ira.c (ira_init_register_move_cost): Remove assert.
15884
15885 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15886
15887 PR rtl-optimization/84071
15888 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15889 * doc/tm.texi: Regenerate.
15890
15891 2018-01-31 Richard Biener <rguenther@suse.de>
15892
15893 PR tree-optimization/84132
15894 * tree-data-ref.c (analyze_miv_subscript): Properly
15895 check whether evolution_function_is_affine_multivariate_p
15896 before calling gcd_of_steps_may_divide_p.
15897
15898 2018-01-31 Julia Koval <julia.koval@intel.com>
15899
15900 PR target/83618
15901 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15902 * config/i386/i386.md (rdpid_rex64) New.
15903 (rdpid): Make 32bit only.
15904
15905 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15906
15907 PR lto/84105
15908 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15909 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15910
15911 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15912
15913 Revert
15914 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15915
15916 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15917
15918 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15919
15920 PR rtl-optimization/84071
15921 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15922 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15923
15924 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15925
15926 * config/arc/arc.c (arc_handle_aux_attribute): New function.
15927 (arc_attribute_table): Add 'aux' attribute.
15928 (arc_in_small_data_p): Consider aux like variables.
15929 (arc_is_aux_reg_p): New function.
15930 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
15931 (arc_get_aux_arg): New function.
15932 (prepare_move_operands): Handle aux-register access.
15933 (arc_handle_aux_attribute): New function.
15934 * doc/extend.texi (ARC Variable attributes): Add subsection.
15935
15936 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15937
15938 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
15939 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
15940 (arc_attribute_table): Add 'uncached' attribute.
15941 (arc_print_operand): Print '.di' flag for uncached memory
15942 accesses.
15943 (arc_in_small_data_p): Do not consider for small data the uncached
15944 types.
15945 (arc_is_uncached_mem_p): New function.
15946 * config/arc/predicates.md (compact_store_memory_operand): Check
15947 for uncached memory accesses.
15948 (nonvol_nonimm_operand): Likewise.
15949 * doc/extend.texi (ARC Type Attribute): New subsection.
15950
15951 2018-01-31 Jakub Jelinek <jakub@redhat.com>
15952
15953 PR c/84100
15954 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
15955 falign-loops=): Add Optimization flag.
15956
15957 2018-01-30 Jeff Law <law@redhat.com>
15958
15959 PR target/84064
15960 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
15961 INT_REGISTERS_SAVED. Check it prior to calling
15962 get_scratch_register_on_entry.
15963 (ix86_adjust_stack_and_probe): Similarly.
15964 (ix86_emit_probe_stack_range): Similarly.
15965 (ix86_expand_prologue): Corresponding changes.
15966
15967 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15968
15969 PR target/40411
15970 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
15971 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
15972
15973 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
15974
15975 PR target/84112
15976 * lra-constraints.c (curr_insn_transform): Process AND in the
15977 address.
15978
15979 2018-01-30 Jakub Jelinek <jakub@redhat.com>
15980
15981 PR rtl-optimization/83986
15982 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
15983 dependence against last_pending_memory_flush in addition to
15984 pending_jump_insns.
15985
15986 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
15987
15988 PR tree-optimization/81611
15989 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
15990 copies.
15991
15992 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15993
15994 PR target/83758
15995 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
15996 a reg rtx.
15997
15998 2018-01-30 Richard Biener <rguenther@suse.de>
15999 Jakub Jelinek <jakub@redhat.com>
16000
16001 PR tree-optimization/84111
16002 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16003 inner loops added during recursion, as they don't have up-to-date
16004 SSA form.
16005
16006 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16007
16008 PR ipa/81360
16009 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16010 (can_inline_edge_by_limits_p): ... here.
16011 (can_early_inline_edge_p, check_callers,
16012 update_caller_keys, update_callee_keys, recursive_inlining,
16013 add_new_edges_to_heap, speculation_useful_p,
16014 inline_small_functions,
16015 inline_small_functions, flatten_function,
16016 inline_to_all_callers_1): Update.
16017
16018 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16019
16020 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16021 zeros correctly.
16022
16023 2018-01-30 Richard Biener <rguenther@suse.de>
16024
16025 PR tree-optimization/83008
16026 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16027 invariant and constant vector uses in stmts when they need
16028 more than one stmt.
16029
16030 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16031
16032 PR bootstrap/84017
16033 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16034 * configure: Regenerate.
16035
16036 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16037
16038 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16039 pattern.
16040 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16041 Use gen_rtx_REG rather than gen_lowpart.
16042
16043 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16044
16045 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16046 rather than 0 when creating partial subregs.
16047
16048 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16049
16050 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16051 of usage.
16052
16053 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16054
16055 PR target/81550
16056 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16057 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16058 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16059 flags. This restores the settings used before the 2017-07-24.
16060 Turning off pre increment/decrement/modify allows IVOPTS to
16061 optimize DF/SF loops where the index is an int.
16062
16063 2018-01-29 Richard Biener <rguenther@suse.de>
16064 Kelvin Nilsen <kelvin@gcc.gnu.org>
16065
16066 PR bootstrap/80867
16067 * tree-vect-stmts.c (vectorizable_call): Don't call
16068 targetm.vectorize_builtin_md_vectorized_function if callee is
16069 NULL.
16070
16071 2018-01-22 Carl Love <cel@us.ibm.com>
16072
16073 * doc/extend.tex: Fix typo in second arg in
16074 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16075
16076 2018-01-29 Richard Biener <rguenther@suse.de>
16077
16078 PR tree-optimization/84086
16079 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16080 (flush_ssaname_freelist): When SSA names were released reset
16081 the SCEV hash table.
16082
16083 2018-01-29 Richard Biener <rguenther@suse.de>
16084
16085 PR tree-optimization/84057
16086 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16087 removed paths when removing edges.
16088
16089 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16090
16091 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16092 -mfunction-return=@var{choice}.
16093
16094 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16095
16096 PR diagnostic/84034
16097 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16098 Handle CR like TAB.
16099 (layout::print_source_line): Likewise.
16100 (test_get_line_width_without_trailing_whitespace): Add test cases.
16101
16102 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16103
16104 PR middle-end/84040
16105 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16106 debug insns.
16107
16108 2018-01-26 Jim Wilson <jimw@sifive.com>
16109
16110 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16111
16112 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16113 specified.
16114
16115 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16116
16117 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16118 and CMP + SUB-immediate -> SUBS.
16119
16120 2018-01-26 Martin Sebor <msebor@redhat.com>
16121
16122 PR tree-optimization/83896
16123 * tree-ssa-strlen.c (get_string_len): Rename...
16124 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16125 Avoid assuming length is constant.
16126 (handle_char_store): Use HOST_WIDE_INT for string length.
16127
16128 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16129
16130 PR target/81763
16131 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16132 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16133
16134 2018-01-26 Richard Biener <rguenther@suse.de>
16135
16136 PR rtl-optimization/84003
16137 * dse.c (record_store): Only record redundant stores when
16138 the earlier store aliases at least all accesses the later one does.
16139
16140 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16141
16142 PR rtl-optimization/83985
16143 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16144 REG_CFA_RESTORE insns.
16145 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16146 REG_CFA_RESTORE insns here.
16147
16148 PR c/83989
16149 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16150 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16151
16152 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16153
16154 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16155 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16156 (arc_init): Likewise.
16157 (arc_override_options): Likewise.
16158 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16159 value.
16160 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16161 support.
16162 * config/arc/arc.h (TARGET_DBNZ): Define.
16163 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16164 properly set the tune attribute.
16165 (dbnz): Use TARGET_DBNZ guard.
16166 * config/arc/arc.opt (mtune): Add core3 option.
16167
16168 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16169
16170 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16171 recognize new pic like addresses.
16172 (arc_delegitimize_address): Clean up.
16173
16174 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16175
16176 * config/arc/arc-arches.def: Option mrf16 valid for all
16177 architectures.
16178 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16179 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16180 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16181 * config/arc/arc-tables.opt: Regenerate.
16182 * config/arc/arc.c (arc_conditional_register_usage): Handle
16183 reduced register file case.
16184 (arc_file_start): Set must have build attributes.
16185 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16186 mrf16 option value.
16187 * config/arc/arc.opt (mrf16): Add new option.
16188 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16189 * config/arc/genmultilib.awk: Handle new mrf16 option.
16190 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16191 * config/arc/t-multilib: Regenerate.
16192 * doc/invoke.texi (ARC Options): Document mrf16 option.
16193
16194 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16195
16196 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16197 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16198 (arc_attribute_table): Add 'secure_call' attribute.
16199 (arc_print_operand): Print secure call operand.
16200 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16201 secure.
16202 (arc_is_secure_call_p): New function. * config/arc/arc.md
16203 (call_i): Add support for sjli instruction.
16204 (call_value_i): Likewise.
16205 * config/arc/constraints.md (Csc): New constraint.
16206
16207 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16208 John Eric Martin <John.Martin@emmicro-us.com>
16209
16210 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16211 * config/arc/arc.c (_arc_jli_section): New struct.
16212 (arc_jli_section): New type.
16213 (rc_jli_sections): New static variable.
16214 (arc_handle_jli_attribute): New function.
16215 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16216 (arc_file_end): New function.
16217 (TARGET_ASM_FILE_END): Define.
16218 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16219 (arc_add_jli_section): New function.
16220 (jli_call_scan): Likewise.
16221 (arc_reorg): Call jli_call_scan.
16222 (arc_output_addsi): Remove 'S' from printing asm operand.
16223 (arc_is_jli_call_p): New function.
16224 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16225 operand.
16226 (movhi_insn): Likewise.
16227 (movsi_insn): Likewise.
16228 (movsi_set_cc_insn): Likewise.
16229 (loadqi_update): Likewise.
16230 (load_zeroextendqisi_update): Likewise.
16231 (load_signextendqisi_update): Likewise.
16232 (loadhi_update): Likewise.
16233 (load_zeroextendhisi_update): Likewise.
16234 (load_signextendhisi_update): Likewise.
16235 (loadsi_update): Likewise.
16236 (loadsf_update): Likewise.
16237 (movsicc_insn): Likewise.
16238 (bset_insn): Likewise.
16239 (bxor_insn): Likewise.
16240 (bclr_insn): Likewise.
16241 (bmsk_insn): Likewise.
16242 (bicsi3_insn): Likewise.
16243 (cmpsi_cc_c_insn): Likewise.
16244 (movsi_ne): Likewise.
16245 (movsi_cond_exec): Likewise.
16246 (clrsbsi2): Likewise.
16247 (norm_f): Likewise.
16248 (normw): Likewise.
16249 (swap): Likewise.
16250 (divaw): Likewise.
16251 (flag): Likewise.
16252 (sr): Likewise.
16253 (kflag): Likewise.
16254 (ffs): Likewise.
16255 (ffs_f): Likewise.
16256 (fls): Likewise.
16257 (call_i): Remove 'S' asm letter, add jli instruction.
16258 (call_value_i): Likewise.
16259 * config/arc/arc.op (mjli-always): New option.
16260 * config/arc/constraints.md (Cji): New constraint.
16261 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16262 operand.
16263 (subsf3_fpx): Likewise.
16264 (mulsf3_fpx): Likewise.
16265 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16266 asm operand.
16267 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16268 function attrbutes.
16269 * doc/invoke.texi (ARC): Document mjli-always option.
16270
16271 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16272
16273 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16274 avoid addition with 0 and use incw and decw where possible.
16275
16276 2018-01-26 Richard Biener <rguenther@suse.de>
16277
16278 PR tree-optimization/81082
16279 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16280 association if it requires casting to unsigned.
16281 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16282 from fold_plusminus_mult_expr to catch important cases late when
16283 range info is available.
16284
16285 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16286
16287 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16288 * configure.ac (hidden_linkonce): New test.
16289 * configure: Regenerate.
16290 * config.in: Regenerate.
16291
16292 2018-01-26 Julia Koval <julia.koval@intel.com>
16293
16294 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16295 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16296 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16297 _mm_mask_bitshuffle_epi64_mask): Fix type.
16298 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16299 USI_FTYPE_V4DI_V4DI_USI): Remove.
16300 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16301 __builtin_ia32_vpshufbitqmb256_mask,
16302 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16303 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16304 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16305
16306 2018-01-26 Alan Modra <amodra@gmail.com>
16307
16308 PR target/84033
16309 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16310 UNSPEC_VBPERMQ. Sort other unspecs.
16311
16312 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16313
16314 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16315
16316 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16317
16318 PR middle-end/83055
16319 * predict.c (drop_profile): Do not push/pop cfun; update also
16320 node->count.
16321 (handle_missing_profiles): Fix logic looking for zero profiles.
16322
16323 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16324
16325 PR middle-end/83977
16326 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16327 on functions with #pragma omp declare simd or functions with simd
16328 attribute.
16329 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16330 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16331 Remove trailing \n from warning_at calls.
16332
16333 2018-01-25 Tom de Vries <tom@codesourcery.com>
16334
16335 PR target/84028
16336 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16337 for neutered workers.
16338
16339 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16340
16341 PR target/68467
16342 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16343 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16344
16345 2018-01-24 Jeff Law <law@redhat.com>
16346
16347 PR target/83994
16348 * i386.c (get_probe_interval): Move to earlier point.
16349 (ix86_compute_frame_layout): If -fstack-clash-protection and
16350 the frame is larger than the probe interval, then use pushes
16351 to save registers rather than reg->mem moves.
16352 (ix86_expand_prologue): Remove conditional for int_registers_saved
16353 assertion.
16354
16355 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16356
16357 PR target/84014
16358 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16359 min/max for never referenced object.
16360
16361 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16362
16363 PR middle-end/83977
16364 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16365 here.
16366 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16367 attributes from DECL_ATTRIBUTES (decl) without affecting
16368 DECL_ATTRIBUTES (current_function_decl).
16369 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16370 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16371
16372 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16373
16374 PR tree-optimization/83979
16375 * fold-const.c (fold_comparison): Use constant_boolean_node
16376 instead of boolean_{true,false}_node.
16377
16378 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16379
16380 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16381 with zero counts.
16382
16383 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16384
16385 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16386 Simplify the clause that sets the length attribute.
16387 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16388 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16389 clause that sets the length attribute.
16390 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16391
16392 2018-01-24 Tom de Vries <tom@codesourcery.com>
16393
16394 PR target/83589
16395 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16396 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16397 Add strict parameter.
16398 (prevent_branch_around_nothing): Insert dummy insn between branch to
16399 label and label with no ptx insn inbetween.
16400 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16401
16402 2018-01-24 Tom de Vries <tom@codesourcery.com>
16403
16404 PR target/81352
16405 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16406 for neutered threads in warp.
16407 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16408
16409 2018-01-24 Richard Biener <rguenther@suse.de>
16410
16411 PR tree-optimization/83176
16412 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16413 operands.
16414
16415 2018-01-24 Richard Biener <rguenther@suse.de>
16416
16417 PR tree-optimization/82819
16418 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16419 code generating pluses that are no-ops in the target precision.
16420
16421 2018-01-24 Richard Biener <rguenther@suse.de>
16422
16423 PR middle-end/84000
16424 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16425
16426 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16427
16428 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16429 to merge probabilities.
16430 * predict.c (probably_never_executed): Also mark as cold functions
16431 with global 0 profile and guessed local profile.
16432 * profile-count.c (profile_probability::combine_with_count): New
16433 member function.
16434 * profile-count.h (profile_probability::operator*,
16435 profile_probability::operator*=, profile_probability::operator/,
16436 profile_probability::operator/=): Reduce precision to adjusted
16437 and set value to guessed on contradictory divisions.
16438 (profile_probability::combine_with_freq): Remove.
16439 (profile_probability::combine_wiht_count): Declare.
16440 (profile_count::force_nonzero):: Set to adjusted.
16441 (profile_count::probability_in):: Set quality to adjusted.
16442 * tree-ssa-tail-merge.c (replace_block_by): Use
16443 combine_with_count.
16444
16445 2018-01-23 Andrew Waterman <andrew@sifive.com>
16446 Jim Wilson <jimw@sifive.com>
16447
16448 * config/riscv/riscv.c (riscv_stack_boundary): New.
16449 (riscv_option_override): Set riscv_stack_boundary. Handle
16450 riscv_preferred_stack_boundary_arg.
16451 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16452 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16453 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16454 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16455 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16456 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16457
16458 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16459
16460 PR target/83905
16461 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16462 of struct ix86_frame.
16463 (ix86_expand_epilogue): Likewise. Add a local variable for
16464 the reg_save_offset field in struct ix86_frame.
16465
16466 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16467
16468 PR tree-optimization/82604
16469 * tree-loop-distribution.c (enum partition_kind): New enum item
16470 PKIND_PARTIAL_MEMSET.
16471 (partition_builtin_p): Support above new enum item.
16472 (generate_code_for_partition): Ditto.
16473 (compute_access_range): Differentiate cases that equality can be
16474 proven at all loops, the innermost loops or no loops.
16475 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16476 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16477 (finalize_partitions, distribute_loop): Don't fuse partition of
16478 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16479 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16480 parloop is enabled.
16481
16482 2018-01-23 Martin Liska <mliska@suse.cz>
16483
16484 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16485 order to ignore the predictor.
16486 (PRED_POLYMORPHIC_CALL): Likewise.
16487 (PRED_RECURSIVE_CALL): Likewise.
16488
16489 2018-01-23 Martin Liska <mliska@suse.cz>
16490
16491 * tree-profile.c (tree_profiling): Print function header to
16492 aware reader which function we are working on.
16493 * value-prof.c (gimple_find_values_to_profile): Do not print
16494 not interesting value histograms.
16495
16496 2018-01-23 Martin Liska <mliska@suse.cz>
16497
16498 * profile-count.h (enum profile_quality): Add
16499 profile_uninitialized as the first value. Do not number values
16500 as they are zero based.
16501 (profile_count::verify): Update sanity check.
16502 (profile_probability::verify): Likewise.
16503
16504 2018-01-23 Nathan Sidwell <nathan@acm.org>
16505
16506 * doc/invoke.texi (ffor-scope): Deprecate.
16507
16508 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16509
16510 PR tree-optimization/83510
16511 * domwalk.c (set_all_edges_as_executable): New function.
16512 (dom_walker::dom_walker): Convert bool param
16513 "skip_unreachable_blocks" to enum reachability. Move setup of
16514 edge flags to set_all_edges_as_executable and only do it when
16515 reachability is REACHABLE_BLOCKS.
16516 * domwalk.h (enum dom_walker::reachability): New enum.
16517 (dom_walker::dom_walker): Convert bool param
16518 "skip_unreachable_blocks" to enum reachability.
16519 (set_all_edges_as_executable): New decl.
16520 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16521 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16522 "reachability".
16523 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16524 but converting true to REACHABLE_BLOCKS.
16525 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16526 * tree-vrp.c
16527 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16528 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16529 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16530 REACHABLE_BLOCKS.
16531 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16532 if check_all_array_refs will be called.
16533
16534 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16535
16536 * tree.c (selftest::test_location_wrappers): Add more test
16537 coverage.
16538
16539 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16540
16541 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16542 (selftest::test_bit_in_range): Likewise.
16543
16544 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16545
16546 PR testsuite/83888
16547 * doc/sourcebuild.texi (vect_float): Say that the selector
16548 only describes the situation when -funsafe-math-optimizations is on.
16549 (vect_float_strict): Document.
16550
16551 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16552
16553 PR tree-optimization/83965
16554 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16555 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16556 instead of checking only for a reduction.
16557 (vect_recog_widen_sum_pattern): Likewise.
16558
16559 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16560
16561 * predict.c (probably_never_executed): Only use precise profile info.
16562 (compute_function_frequency): Skip after inlining hack since we now
16563 have quality checking.
16564
16565 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16566
16567 * profile-count.h (profile_probability::very_unlikely,
16568 profile_probability::unlikely, profile_probability::even): Set
16569 precision to guessed.
16570
16571 2018-01-23 Richard Biener <rguenther@suse.de>
16572
16573 PR tree-optimization/83963
16574 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16575 Properly terminate dominator walk when crossing the exit edge not
16576 when visiting its source block.
16577
16578 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16579
16580 PR c++/83918
16581 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16582 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16583
16584 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16585
16586 PR tree-optimization/83957
16587 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16588 semicolon after for body surrounded by braces.
16589
16590 PR tree-optimization/83081
16591 * profile-count.h (profile_probability::split): New method.
16592 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16593 Use profile_probability::split.
16594 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16595 when splitting a single conditional jump into 2.
16596
16597 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16598
16599 PR tree-optimization/69452
16600 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16601 decl.
16602
16603 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16604
16605 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16606 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16607 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16608
16609 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16610
16611 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16612 declaration.
16613 * config/rl78/rl78.md (movdi): New define_expand.
16614 * config/rl78/rl78.c (rl78_split_movdi): New function.
16615
16616 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16617
16618 PR target/83862
16619 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16620 no longer used.
16621 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16622 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16623 128-bit to produce an UNSPEC move to get the double word with the
16624 signbit and then a shift directly to do signbit.
16625 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16626 implementation with a new version that just does either a direct
16627 move or a regular move. Move memory interface to separate insns.
16628 Move insns so they are next to the expander.
16629 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16630 with signbit move. Split big and little endian case.
16631 (signbit<mode>2_dm_mem_le): Likewise.
16632 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16633 (signbit<mode>2_dm2): Likewise.
16634
16635 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16636
16637 * config/rl78/rl78.md (anddi3): New define_expand.
16638
16639 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16640
16641 * config/rl78/rl78.md (umindi3): New define_expand.
16642
16643 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16644
16645 * config/rl78/rl78.md (smindi3): New define_expand.
16646
16647 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16648
16649 * config/rl78/rl78.md (smaxdi3): New define_expand.
16650
16651 2018-01-22 Carl Love <cel@us.ibm.com>
16652
16653 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16654 LVX_V1TI): Add macro expansion.
16655 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16656 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16657 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16658 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16659 Change check to determine if the instruction is a byte reversing
16660 entry. Fix typo in comment.
16661 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16662 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16663 Add def_builtin calls for new builtins.
16664 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16665 Add define_insn expansion.
16666
16667 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16668
16669 * config/rl78/rl78.md (umaxdi3): New define_expand.
16670
16671 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16672
16673 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16674 for non-QImode registers.
16675
16676 2018-01-22 Richard Biener <rguenther@suse.de>
16677
16678 PR tree-optimization/83963
16679 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16680 including the loop exit block.
16681 (scop_detection::merge_sese): Likewise.
16682 (scop_detection::add_scop): Do it here instead.
16683
16684 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16685
16686 * doc/sourcebuild.texi (arm_softfloat): Document.
16687
16688 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16689
16690 PR gcc/77734
16691 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16692 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16693 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16694
16695 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16696 David Edelsohn <dje.gcc@gmail.com>
16697
16698 PR target/83946
16699 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16700 Change "crset eq" to "crset 2".
16701 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16702 (*call_indirect_aix<mode>_nospec): Likewise.
16703 (*call_value_indirect_aix<mode>_nospec): Likewise.
16704 (*call_indirect_elfv2<mode>_nospec): Likewise.
16705 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16706 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16707 change assembly output from . to $.
16708 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16709 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16710 (*tablejump<mode>_internal1_nospec): Likewise.
16711
16712 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16713
16714 PR target/80870
16715 * config/sh/sh_optimize_sett_clrt.cc:
16716 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16717
16718 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16719
16720 PR tree-optimization/83940
16721 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16722 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16723 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16724 use it to pass back the definition type.
16725 (vect_check_store_rhs): Likewise rhs_dt_out.
16726 (vect_build_gather_load_calls): Add a mask_dt argument and use
16727 it instead of a call to vect_is_simple_use.
16728 (vectorizable_store): Update calls to vect_check_load_store_mask
16729 and vect_check_store_rhs. Use the dt returned by the latter instead
16730 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16731 instead of calls to vect_is_simple_use. Pass the scalar rather
16732 than the vector operand to vect_is_simple_use when handling
16733 second and subsequent copies of an rhs value.
16734 (vectorizable_load): Update calls to vect_check_load_store_mask
16735 and vect_build_gather_load_calls. Use the cached mask_dt and
16736 gs_info.offset_dt instead of calls to vect_is_simple_use.
16737
16738 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16739
16740 PR middle-end/83945
16741 * tree-emutls.c: Include gimplify.h.
16742 (lower_emutls_2): New function.
16743 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16744 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16745 it before further processing.
16746
16747 PR target/83930
16748 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16749 UINTVAL (trueop1) instead of INTVAL (op1).
16750
16751 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16752
16753 PR debug/81570
16754 PR debug/83728
16755 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16756 INCOMING_FRAME_SP_OFFSET if not defined.
16757 (scan_trace): Add ENTRY argument. If true and
16758 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16759 emit a note to adjust the CFA offset.
16760 (create_cfi_notes): Adjust scan_trace callers.
16761 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16762 INCOMING_FRAME_SP_OFFSET in the CIE.
16763 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16764 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16765 Likewise.
16766 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16767 * doc/tm.texi: Regenerated.
16768
16769 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16770
16771 PR rtl-optimization/83147
16772 * lra-constraints.c (remove_inheritance_pseudos): Use
16773 lra_substitute_pseudo_within_insn.
16774
16775 2018-01-19 Tom de Vries <tom@codesourcery.com>
16776 Cesar Philippidis <cesar@codesourcery.com>
16777
16778 PR target/83920
16779 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16780
16781 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16782
16783 PR target/83790
16784 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16785 spaces for function labels.
16786
16787 2018-01-19 Martin Liska <mliska@suse.cz>
16788
16789 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16790 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16791 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16792 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16793 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16794 (PRED_CONST_RETURN): Change from 69 to 65.
16795 (PRED_NULL_RETURN): Change from 91 to 71.
16796 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16797 (PRED_LOOP_GUARD): Change from 66 to 73.
16798
16799 2018-01-19 Martin Liska <mliska@suse.cz>
16800
16801 * predict.c (predict_insn_def): Add new assert.
16802 (struct branch_predictor): Change type to signed integer.
16803 (test_prediction_value_range): Amend test to cover
16804 PROB_UNINITIALIZED.
16805 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16806 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16807 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16808 (PRED_LOOP_IV_COMPARE): Likewise.
16809 * predict.h (PROB_UNINITIALIZED): Define new constant.
16810
16811 2018-01-19 Martin Liska <mliska@suse.cz>
16812
16813 * predict.c (dump_prediction): Add new format for
16814 analyze_brprob.py script which is enabled with -details
16815 suboption.
16816 * profile-count.h (precise_p): New function.
16817
16818 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16819
16820 PR tree-optimization/83922
16821 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16822 there are no statements that need masking.
16823 (vect_active_double_reduction_p): New function.
16824 (vect_analyze_loop_operations): Use it when handling phis that
16825 are not in the loop header.
16826
16827 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16828
16829 PR tree-optimization/83914
16830 * tree-vect-loop.c (vectorizable_induction): Don't convert
16831 init_expr or apply the peeling adjustment for inductions
16832 that are nested within the vectorized loop.
16833
16834 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16835
16836 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16837 instead of NEG.
16838
16839 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16840
16841 PR sanitizer/81715
16842 PR testsuite/83882
16843 * function.h (gimplify_parameters): Add gimple_seq * argument.
16844 * function.c: Include gimple.h and options.h.
16845 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16846 for the added local temporaries if needed.
16847 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16848 if there are any parameter cleanups, wrap whole body into a
16849 try/finally with the cleanups.
16850
16851 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16852
16853 PR target/82964
16854 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16855 Use GET_MODE_CLASS for scalar floating point.
16856
16857 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16858
16859 PR ipa/82256
16860 patch by PaX Team
16861 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16862 Fix call of call_cgraph_insertion_hooks.
16863
16864 2018-01-18 Martin Sebor <msebor@redhat.com>
16865
16866 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16867
16868 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16869
16870 PR ipa/83619
16871 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16872 frequencies.
16873
16874 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16875
16876 PR other/70268
16877 * common.opt: (-ffile-prefix-map): New option.
16878 * opts.c (common_handle_option): Defer it.
16879 * opts-global.c (handle_common_deferred_options): Handle it.
16880 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16881 * file-prefix-map.h: New file.
16882 (remap_debug_filename, add_debug_prefix_map): ...here.
16883 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16884 * final.c (debug_prefix_map, add_debug_prefix_map
16885 remap_debug_filename): Move to...
16886 * file-prefix-map.c: New file.
16887 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16888 generalize, get rid of alloca(), use strrchr() instead of strchr().
16889 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16890 Implement in terms of add_prefix_map().
16891 (remap_macro_filename, remap_debug_filename): Implement in term of
16892 remap_filename().
16893 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16894 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16895 * dbxout.c: Include file-prefix-map.h.
16896 * varasm.c: Likewise.
16897 * vmsdbgout.c: Likewise.
16898 * xcoffout.c: Likewise.
16899 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16900 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16901 * doc/invoke.texi (-ffile-prefix-map): Document.
16902 (-fdebug-prefix-map): Update description.
16903
16904 2018-01-18 Martin Liska <mliska@suse.cz>
16905
16906 * config/i386/i386.c (indirect_thunk_name): Document that also
16907 lfence is emitted.
16908 (output_indirect_thunk): Document why both instructions
16909 (pause and lfence) are generated.
16910
16911 2018-01-18 Richard Biener <rguenther@suse.de>
16912
16913 PR tree-optimization/83887
16914 * graphite-scop-detection.c
16915 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16916 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16917 (scop_detection::merge_sese): Re-implement with a flood-fill
16918 algorithm that properly finds a SESE region if it exists.
16919
16920 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16921
16922 PR c/61240
16923 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16924 pointer_diff optimizations use view_convert instead of convert.
16925
16926 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16927
16928 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16929 Generate different code for -mno-speculate-indirect-jumps.
16930 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16931 (*call_indirect_aix<mode>): Disable for
16932 -mno-speculate-indirect-jumps.
16933 (*call_indirect_aix<mode>_nospec): New define_insn.
16934 (*call_value_indirect_aix<mode>): Disable for
16935 -mno-speculate-indirect-jumps.
16936 (*call_value_indirect_aix<mode>_nospec): New define_insn.
16937 (*sibcall_nonlocal_sysv<mode>): Generate different code for
16938 -mno-speculate-indirect-jumps.
16939 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16940
16941 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16942
16943 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
16944 long double type, set the flags for noting the default long double
16945 type, even if we don't pass or return a long double type.
16946
16947 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
16948
16949 PR ipa/83051
16950 * ipa-inline.c (flatten_function): Do not overwrite final inlining
16951 failure.
16952
16953 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
16954
16955 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
16956 support for merge[hl].
16957 (fold_mergehl_helper): New helper function.
16958 (tree-vector-builder.h): New #include for tree_vector_builder usage.
16959 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
16960 (altivec_vmrglw_direct): Add xxmrglw insn.
16961
16962 2018-01-17 Andrew Waterman <andrew@sifive.com>
16963
16964 * config/riscv/riscv.c (riscv_conditional_register_usage): If
16965 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
16966
16967 2018-01-17 David Malcolm <dmalcolm@redhat.com>
16968
16969 PR lto/83121
16970 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
16971 call the lto_location_cache before reading the
16972 DECL_SOURCE_LOCATION of the types.
16973
16974 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
16975 Richard Sandiford <richard.sandiford@linaro.org>
16976
16977 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
16978 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
16979 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
16980 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
16981 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
16982 Add declaration.
16983 * config/aarch64/constraints.md (aarch64_movti_operand):
16984 Limit immediates.
16985 * config/aarch64/predicates.md (Uti): Add new constraint.
16986
16987 2018-01-17 Carl Love <cel@us.ibm.com>
16988
16989 * config/rs6000/vsx.md (define_expand xl_len_r,
16990 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
16991 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
16992 lxvll.
16993 (define_expand, define_insn): Move the shift left from the
16994 define_insn to the define_expand for lxvl and stxvl instructions.
16995 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
16996 and XL_LEN_R definitions to PURE.
16997
16998 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
16999
17000 * config/i386/i386.c (indirect_thunk_name): Declare regno
17001 as unsigned int. Compare regno with INVALID_REGNUM.
17002 (output_indirect_thunk): Ditto.
17003 (output_indirect_thunk_function): Ditto.
17004 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17005 in the call to output_indirect_thunk_function.
17006
17007 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17008
17009 PR middle-end/83884
17010 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17011 rather than the size of inner_type to determine the stack slot size
17012 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17013
17014 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17015
17016 PR target/83546
17017 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17018 to PTA_SILVERMONT.
17019
17020 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17021
17022 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17023 endian Linux systems to optionally enable multilibs for selecting
17024 the long double type if the user configured an explicit type.
17025 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17026 have no long double multilibs if not defined.
17027 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17028 warn if the user used -mabi={ieee,ibm}longdouble and we built
17029 multilibs for long double.
17030 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17031 appropriate multilib option.
17032 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17033 multilib options.
17034 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17035 for building long double multilibs.
17036 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17037
17038 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17039
17040 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17041 copies.
17042
17043 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17044 64 bits.
17045 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17046 128 bits.
17047
17048 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17049 variables.
17050
17051 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17052 return value.
17053
17054 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17055
17056 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17057 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17058
17059 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17060
17061 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17062 different rtl trees depending on TARGET_64BIT.
17063 (rs6000_gen_lvx): Likewise.
17064
17065 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17066
17067 * config/visium/visium.md (nop): Tweak comment.
17068 (hazard_nop): Likewise.
17069
17070 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17071
17072 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17073 -mspeculate-indirect-jumps.
17074 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17075 for -mno-speculate-indirect-jumps.
17076 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17077 (*call_value_indirect_elfv2<mode>): Disable for
17078 -mno-speculate-indirect-jumps.
17079 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17080 (indirect_jump): Emit different RTL for
17081 -mno-speculate-indirect-jumps.
17082 (*indirect_jump<mode>): Disable for
17083 -mno-speculate-indirect-jumps.
17084 (*indirect_jump<mode>_nospec): New define_insn.
17085 (tablejump): Emit different RTL for
17086 -mno-speculate-indirect-jumps.
17087 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17088 (tablejumpsi_nospec): New define_expand.
17089 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17090 (tablejumpdi_nospec): New define_expand.
17091 (*tablejump<mode>_internal1): Disable for
17092 -mno-speculate-indirect-jumps.
17093 (*tablejump<mode>_internal1_nospec): New define_insn.
17094 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17095 option.
17096
17097 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17098
17099 * caller-save.c (insert_save): Drop unnecessary parameter. All
17100 callers updated.
17101
17102 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17103 Richard Biener <rguenth@suse.de>
17104
17105 PR libgomp/83590
17106 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17107 return early, inline manually is_gimple_sizepos. Make sure if we
17108 call gimplify_expr we don't end up with a gimple constant.
17109 * tree.c (variably_modified_type_p): Don't return true for
17110 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17111 * gimplify.h (is_gimple_sizepos): Remove.
17112
17113 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17114
17115 PR tree-optimization/83857
17116 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17117 vectorizable_live_operation for pure SLP statements.
17118 (vectorizable_live_operation): Handle PHIs.
17119
17120 2018-01-16 Richard Biener <rguenther@suse.de>
17121
17122 PR tree-optimization/83867
17123 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17124 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17125
17126 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17127
17128 PR c/83844
17129 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17130 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17131 If off is not INTEGER_CST, issue a may not be aligned warning
17132 rather than isn't aligned. Use isn%'t rather than isn't.
17133 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17134 into MULT_EXPR.
17135 <case MULT_EXPR>: Improve the case when bottom and one of the
17136 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17137 operand, in that case check if the other operand is multiple of
17138 bottom divided by the INTEGER_CST operand.
17139
17140 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17141
17142 PR target/83858
17143 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17144 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17145 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17146 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17147 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17148 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17149 (pa_function_arg_size): New function.
17150
17151 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17152
17153 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17154 in a separate statement.
17155
17156 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17157
17158 PR tree-optimization/83847
17159 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17160 group gathers and scatters.
17161
17162 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17163
17164 PR rtl-optimization/86620
17165 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17166
17167 PR rtl-optimization/83213
17168 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17169 to last if both are JUMP_INSNs.
17170
17171 PR tree-optimization/83843
17172 * gimple-ssa-store-merging.c
17173 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17174 store_immediate_info for bswap/nop orig_stores.
17175
17176 2018-01-15 Andrew Waterman <andrew@sifive.com>
17177
17178 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17179 !TARGET_MUL.
17180 <UDIV>: Increase cost if !TARGET_DIV.
17181
17182 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17183
17184 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17185 (define_attr "cr_logical_3op"): New.
17186 (cceq_ior_compare): Adjust.
17187 (cceq_ior_compare_complement): Adjust.
17188 (*cceq_rev_compare): Adjust.
17189 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17190 (is_cracked_insn): Adjust.
17191 (insn_must_be_first_in_group): Adjust.
17192 * config/rs6000/40x.md: Adjust.
17193 * config/rs6000/440.md: Adjust.
17194 * config/rs6000/476.md: Adjust.
17195 * config/rs6000/601.md: Adjust.
17196 * config/rs6000/603.md: Adjust.
17197 * config/rs6000/6xx.md: Adjust.
17198 * config/rs6000/7450.md: Adjust.
17199 * config/rs6000/7xx.md: Adjust.
17200 * config/rs6000/8540.md: Adjust.
17201 * config/rs6000/cell.md: Adjust.
17202 * config/rs6000/e300c2c3.md: Adjust.
17203 * config/rs6000/e500mc.md: Adjust.
17204 * config/rs6000/e500mc64.md: Adjust.
17205 * config/rs6000/e5500.md: Adjust.
17206 * config/rs6000/e6500.md: Adjust.
17207 * config/rs6000/mpc.md: Adjust.
17208 * config/rs6000/power4.md: Adjust.
17209 * config/rs6000/power5.md: Adjust.
17210 * config/rs6000/power6.md: Adjust.
17211 * config/rs6000/power7.md: Adjust.
17212 * config/rs6000/power8.md: Adjust.
17213 * config/rs6000/power9.md: Adjust.
17214 * config/rs6000/rs64.md: Adjust.
17215 * config/rs6000/titan.md: Adjust.
17216
17217 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17218
17219 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17220 ix86_indirect_branch_register logic.
17221
17222 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17223
17224 * config/i386/constraints.md (Bs): Update
17225 ix86_indirect_branch_register check. Don't check
17226 ix86_indirect_branch_register with GOT_memory_operand.
17227 (Bw): Likewise.
17228 * config/i386/predicates.md (GOT_memory_operand): Don't check
17229 ix86_indirect_branch_register here.
17230 (GOT32_symbol_operand): Likewise.
17231
17232 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17233
17234 * config/i386/predicates.md (constant_call_address_operand):
17235 Rewrite ix86_indirect_branch_register logic.
17236 (sibcall_insn_operand): Likewise.
17237
17238 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17239
17240 * config/i386/constraints.md (Bs): Replace
17241 ix86_indirect_branch_thunk_register with
17242 ix86_indirect_branch_register.
17243 (Bw): Likewise.
17244 * config/i386/i386.md (indirect_jump): Likewise.
17245 (tablejump): Likewise.
17246 (*sibcall_memory): Likewise.
17247 (*sibcall_value_memory): Likewise.
17248 Peepholes of indirect call and jump via memory: Likewise.
17249 * config/i386/i386.opt: Likewise.
17250 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17251 (GOT_memory_operand): Likewise.
17252 (call_insn_operand): Likewise.
17253 (sibcall_insn_operand): Likewise.
17254 (GOT32_symbol_operand): Likewise.
17255
17256 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17257
17258 PR middle-end/83837
17259 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17260 type rather than type addr's type points to.
17261 (expand_omp_atomic_mutex): Likewise.
17262 (expand_omp_atomic): Likewise.
17263
17264 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17265
17266 PR target/83839
17267 * config/i386/i386.c (output_indirect_thunk_function): Use
17268 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17269 for __x86_return_thunk.
17270
17271 2018-01-15 Richard Biener <rguenther@suse.de>
17272
17273 PR middle-end/83850
17274 * expmed.c (extract_bit_field_1): Fix typo.
17275
17276 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17277
17278 PR target/83687
17279 * config/arm/iterators.md (VF): New mode iterator.
17280 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17281 Remove integer-related logic from pattern.
17282 (neon_vabd<mode>_3): Likewise.
17283
17284 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17285
17286 PR middle-end/82694
17287 * common.opt (fstrict-overflow): No longer an alias.
17288 (fwrapv-pointer): New option.
17289 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17290 also for pointer types based on flag_wrapv_pointer.
17291 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17292 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17293 opts->x_flag_wrapv got set.
17294 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17295 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17296 POINTER_TYPE_OVERFLOW_UNDEFINED.
17297 * match.pd: Likewise in address comparison pattern.
17298 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17299
17300 2018-01-15 Richard Biener <rguenther@suse.de>
17301
17302 PR lto/83804
17303 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17304 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17305 Reset type names to their identifier if their TYPE_DECL doesn't
17306 have linkage (and thus is used for ODR and devirt).
17307 (save_debug_info_for_decl): Remove.
17308 (save_debug_info_for_type): Likewise.
17309 (add_tree_to_fld_list): Adjust.
17310 * tree-pretty-print.c (dump_generic_node): Make dumping of
17311 type names more robust.
17312
17313 2018-01-15 Richard Biener <rguenther@suse.de>
17314
17315 * BASE-VER: Bump to 8.0.1.
17316
17317 2018-01-14 Martin Sebor <msebor@redhat.com>
17318
17319 PR other/83508
17320 * builtins.c (check_access): Avoid warning when the no-warning bit
17321 is set.
17322
17323 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17324
17325 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17326 * ira-color (allocno_hard_regs_compare): Likewise.
17327
17328 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17329
17330 PR target/83013
17331 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17332 Use .pushsection/.popsection.
17333
17334 2018-01-14 Martin Sebor <msebor@redhat.com>
17335
17336 PR c++/81327
17337 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17338
17339 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17340
17341 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17342 entry from extra_headers.
17343 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17344 extra_headers, make the list bitwise identical to the i?86-*-* one.
17345
17346 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17347
17348 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17349 -mcmodel=large with -mindirect-branch=thunk,
17350 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17351 -mfunction-return=thunk-extern.
17352 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17353 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17354 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17355
17356 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17357
17358 * config/i386/i386.c (print_reg): Print the name of the full
17359 integer register without '%'.
17360 (ix86_print_operand): Handle 'V'.
17361 * doc/extend.texi: Document 'V' modifier.
17362
17363 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17364
17365 * config/i386/constraints.md (Bs): Disallow memory operand for
17366 -mindirect-branch-register.
17367 (Bw): Likewise.
17368 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17369 (GOT_memory_operand): Likewise.
17370 (call_insn_operand): Likewise.
17371 (sibcall_insn_operand): Likewise.
17372 (GOT32_symbol_operand): Likewise.
17373 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17374 for -mindirect-branch-register.
17375 (tablejump): Likewise.
17376 (*sibcall_memory): Likewise.
17377 (*sibcall_value_memory): Likewise.
17378 Disallow peepholes of indirect call and jump via memory for
17379 -mindirect-branch-register.
17380 (*call_pop): Replace m with Bw.
17381 (*call_value_pop): Likewise.
17382 (*sibcall_pop_memory): Replace m with Bs.
17383 * config/i386/i386.opt (mindirect-branch-register): New option.
17384 * doc/invoke.texi: Document -mindirect-branch-register option.
17385
17386 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17387
17388 * config/i386/i386-protos.h (ix86_output_function_return): New.
17389 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17390 set function_return_type.
17391 (indirect_thunk_name): Add ret_p to indicate thunk for function
17392 return.
17393 (output_indirect_thunk_function): Pass false to
17394 indirect_thunk_name.
17395 (ix86_output_indirect_branch_via_reg): Likewise.
17396 (ix86_output_indirect_branch_via_push): Likewise.
17397 (output_indirect_thunk_function): Create alias for function
17398 return thunk if regno < 0.
17399 (ix86_output_function_return): New function.
17400 (ix86_handle_fndecl_attribute): Handle function_return.
17401 (ix86_attribute_table): Add function_return.
17402 * config/i386/i386.h (machine_function): Add
17403 function_return_type.
17404 * config/i386/i386.md (simple_return_internal): Use
17405 ix86_output_function_return.
17406 (simple_return_internal_long): Likewise.
17407 * config/i386/i386.opt (mfunction-return=): New option.
17408 (indirect_branch): Mention -mfunction-return=.
17409 * doc/extend.texi: Document function_return function attribute.
17410 * doc/invoke.texi: Document -mfunction-return= option.
17411
17412 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17413
17414 * config/i386/i386-opts.h (indirect_branch): New.
17415 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17416 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17417 with local indirect jump when converting indirect call and jump.
17418 (ix86_set_indirect_branch_type): New.
17419 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17420 (indirectlabelno): New.
17421 (indirect_thunk_needed): Likewise.
17422 (indirect_thunk_bnd_needed): Likewise.
17423 (indirect_thunks_used): Likewise.
17424 (indirect_thunks_bnd_used): Likewise.
17425 (INDIRECT_LABEL): Likewise.
17426 (indirect_thunk_name): Likewise.
17427 (output_indirect_thunk): Likewise.
17428 (output_indirect_thunk_function): Likewise.
17429 (ix86_output_indirect_branch_via_reg): Likewise.
17430 (ix86_output_indirect_branch_via_push): Likewise.
17431 (ix86_output_indirect_branch): Likewise.
17432 (ix86_output_indirect_jmp): Likewise.
17433 (ix86_code_end): Call output_indirect_thunk_function if needed.
17434 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17435 needed.
17436 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17437 (ix86_attribute_table): Add indirect_branch.
17438 * config/i386/i386.h (machine_function): Add indirect_branch_type
17439 and has_local_indirect_jump.
17440 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17441 to true.
17442 (tablejump): Likewise.
17443 (*indirect_jump): Use ix86_output_indirect_jmp.
17444 (*tablejump_1): Likewise.
17445 (simple_return_indirect_internal): Likewise.
17446 * config/i386/i386.opt (mindirect-branch=): New option.
17447 (indirect_branch): New.
17448 (keep): Likewise.
17449 (thunk): Likewise.
17450 (thunk-inline): Likewise.
17451 (thunk-extern): Likewise.
17452 * doc/extend.texi: Document indirect_branch function attribute.
17453 * doc/invoke.texi: Document -mindirect-branch= option.
17454
17455 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17456
17457 PR ipa/83051
17458 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17459
17460 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17461
17462 * ipa-inline.c (want_inline_small_function_p): Return false if
17463 inlining has already failed with CIF_FINAL_ERROR.
17464 (update_caller_keys): Call want_inline_small_function_p before
17465 can_inline_edge_p.
17466 (update_callee_keys): Likewise.
17467
17468 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17469
17470 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17471 New function.
17472 (rs6000_quadword_masked_address_p): Likewise.
17473 (quad_aligned_load_p): Likewise.
17474 (quad_aligned_store_p): Likewise.
17475 (const_load_sequence_p): Add comment to describe the outer-most loop.
17476 (mimic_memory_attributes_and_flags): New function.
17477 (rs6000_gen_stvx): Likewise.
17478 (replace_swapped_aligned_store): Likewise.
17479 (rs6000_gen_lvx): Likewise.
17480 (replace_swapped_aligned_load): Likewise.
17481 (replace_swapped_load_constant): Capitalize argument name in
17482 comment describing this function.
17483 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17484 and stores that access quad-word aligned addresses and replace
17485 with stvx or lvx instructions when appropriate.
17486 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17487 New function prototype.
17488 (rs6000_quadword_masked_address_p): Likewise.
17489 (rs6000_gen_lvx): Likewise.
17490 (rs6000_gen_stvx): Likewise.
17491 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17492 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17493 when memory address is aligned.
17494 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17495 this split to select lvx instruction when memory address is aligned.
17496 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17497 instruction when memory address is aligned.
17498 (*vsx_le_perm_load_v16qi): Likewise.
17499 (four unnamed splitters): Modify to select the stvx instruction
17500 when memory is aligned.
17501
17502 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17503
17504 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17505 which appears in the queue multiple times.
17506
17507 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17508 Alan Hayward <alan.hayward@arm.com>
17509 David Sherwood <david.sherwood@arm.com>
17510
17511 * tree-vectorizer.h (vec_lower_bound): New structure.
17512 (_loop_vec_info): Add check_nonzero and lower_bounds.
17513 (LOOP_VINFO_CHECK_NONZERO): New macro.
17514 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17515 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17516 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17517 fields. Make seg_len the distance travelled, not including the
17518 access size.
17519 (dr_direction_indicator): Declare.
17520 (dr_zero_step_indicator): Likewise.
17521 (dr_known_forward_stride_p): Likewise.
17522 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17523 tree-ssanames.h.
17524 (runtime_alias_check_p): Allow runtime alias checks with
17525 variable strides.
17526 (operator ==): Compare access_size and align.
17527 (prune_runtime_alias_test_list): Rework for new distinction between
17528 the access_size and seg_len.
17529 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17530 segment lengths.
17531 (get_segment_min_max): New function.
17532 (create_intersect_range_checks): Use it.
17533 (dr_step_indicator): New function.
17534 (dr_direction_indicator): Likewise.
17535 (dr_zero_step_indicator): Likewise.
17536 (dr_known_forward_stride_p): Likewise.
17537 * tree-loop-distribution.c (data_ref_segment_size): Return
17538 DR_STEP * (niters - 1).
17539 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17540 constructor.
17541 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17542 (vect_preserves_scalar_order_p): New function, split out from...
17543 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17544 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17545 (vect_vfa_access_size): New function.
17546 (vect_vfa_align): Likewise.
17547 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17548 (dump_lower_bound): New function.
17549 (vect_check_lower_bound): Likewise.
17550 (vect_small_gap_p): Likewise.
17551 (vectorizable_with_step_bound_p): Likewise.
17552 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17553 depencies if the vectorization factor is 1. Convert the checks
17554 for nonzero steps into checks on the bounds of DR_STEP. Try using
17555 a bunds check for variable steps if the minimum required step is
17556 relatively small. Update calls to the dr_with_seg_len
17557 constructor and to vect_compile_time_alias.
17558 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17559 function.
17560 (vect_loop_versioning): Call it.
17561 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17562 when retrying.
17563 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17564
17565 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17566 Alan Hayward <alan.hayward@arm.com>
17567 David Sherwood <david.sherwood@arm.com>
17568
17569 * doc/sourcebuild.texi (vect_scatter_store): Document.
17570 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17571 optabs.
17572 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17573 Document.
17574 * genopinit.c (main): Add supports_vec_scatter_store and
17575 supports_vec_scatter_store_cached to target_optabs.
17576 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17577 IFN_MASK_SCATTER_STORE.
17578 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17579 functions.
17580 * internal-fn.h (internal_store_fn_p): Declare.
17581 (internal_fn_stored_value_index): Likewise.
17582 * internal-fn.c (scatter_store_direct): New macro.
17583 (expand_scatter_store_optab_fn): New function.
17584 (direct_scatter_store_optab_supported_p): New macro.
17585 (internal_store_fn_p): New function.
17586 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17587 IFN_MASK_SCATTER_STORE.
17588 (internal_fn_mask_index): Likewise.
17589 (internal_fn_stored_value_index): New function.
17590 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17591 for scatter stores.
17592 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17593 * optabs-query.c (supports_vec_scatter_store_p): New function.
17594 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17595 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17596 true for scatter stores.
17597 (vect_gather_scatter_fn_p): Handle scatter stores too.
17598 (vect_check_gather_scatter): Consider using scatter stores if
17599 supports_vec_scatter_store_p.
17600 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17601 scatter stores too.
17602 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17603 internal_fn_stored_value_index.
17604 (check_load_store_masking): Handle scatter stores too.
17605 (vect_get_store_rhs): Make public.
17606 (vectorizable_call): Use internal_store_fn_p.
17607 (vectorizable_store): Handle scatter store internal functions.
17608 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17609 when deciding whether the end of the group has been reached.
17610 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17611 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17612 (mask_scatter_store<mode>): New insns.
17613
17614 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17615 Alan Hayward <alan.hayward@arm.com>
17616 David Sherwood <david.sherwood@arm.com>
17617
17618 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17619 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17620 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17621 function.
17622 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17623 Use vect_truncate_gather_scatter_offset if we can't treat the
17624 operation as a normal gather load or scatter store.
17625 (get_group_load_store_type): Take the gather_scatter_info
17626 as argument. Try using a gather load or scatter store for
17627 single-element groups.
17628 (get_load_store_type): Update calls to get_group_load_store_type
17629 and vect_use_strided_gather_scatters_p.
17630
17631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17632 Alan Hayward <alan.hayward@arm.com>
17633 David Sherwood <david.sherwood@arm.com>
17634
17635 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17636 optional tree argument.
17637 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17638 null target hooks.
17639 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17640 but continue to use the current value as a fallback.
17641 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17642 to compare the updates.
17643 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17644 (get_load_store_type): Use it when handling a strided access.
17645 (vect_get_strided_load_store_ops): New function.
17646 (vect_get_data_ptr_increment): Likewise.
17647 (vectorizable_load): Handle strided gather loads. Always pass
17648 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17649
17650 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17651 Alan Hayward <alan.hayward@arm.com>
17652 David Sherwood <david.sherwood@arm.com>
17653
17654 * doc/md.texi (gather_load@var{m}): Document.
17655 (mask_gather_load@var{m}): Likewise.
17656 * genopinit.c (main): Add supports_vec_gather_load and
17657 supports_vec_gather_load_cached to target_optabs.
17658 * optabs-tree.c (init_tree_optimization_optabs): Use
17659 ggc_cleared_alloc to allocate target_optabs.
17660 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17661 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17662 functions.
17663 * internal-fn.h (internal_load_fn_p): Declare.
17664 (internal_gather_scatter_fn_p): Likewise.
17665 (internal_fn_mask_index): Likewise.
17666 (internal_gather_scatter_fn_supported_p): Likewise.
17667 * internal-fn.c (gather_load_direct): New macro.
17668 (expand_gather_load_optab_fn): New function.
17669 (direct_gather_load_optab_supported_p): New macro.
17670 (direct_internal_fn_optab): New function.
17671 (internal_load_fn_p): Likewise.
17672 (internal_gather_scatter_fn_p): Likewise.
17673 (internal_fn_mask_index): Likewise.
17674 (internal_gather_scatter_fn_supported_p): Likewise.
17675 * optabs-query.c (supports_at_least_one_mode_p): New function.
17676 (supports_vec_gather_load_p): Likewise.
17677 * optabs-query.h (supports_vec_gather_load_p): Declare.
17678 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17679 and memory_type field.
17680 (NUM_PATTERNS): Bump to 15.
17681 * tree-vect-data-refs.c: Include internal-fn.h.
17682 (vect_gather_scatter_fn_p): New function.
17683 (vect_describe_gather_scatter_call): Likewise.
17684 (vect_check_gather_scatter): Try using internal functions for
17685 gather loads. Recognize existing calls to a gather load function.
17686 (vect_analyze_data_refs): Consider using gather loads if
17687 supports_vec_gather_load_p.
17688 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17689 (vect_get_gather_scatter_offset_type): Likewise.
17690 (vect_convert_mask_for_vectype): Likewise.
17691 (vect_add_conversion_to_patterm): Likewise.
17692 (vect_try_gather_scatter_pattern): Likewise.
17693 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17694 (vect_vect_recog_func_ptrs): Add it.
17695 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17696 internal_fn_mask_index and internal_gather_scatter_fn_p.
17697 (check_load_store_masking): Take the gather_scatter_info as an
17698 argument and handle gather loads.
17699 (vect_get_gather_scatter_ops): New function.
17700 (vectorizable_call): Check internal_load_fn_p.
17701 (vectorizable_load): Likewise. Handle gather load internal
17702 functions.
17703 (vectorizable_store): Update call to check_load_store_masking.
17704 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17705 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17706 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17707 (aarch64_gather_scale_operand_d): New predicates.
17708 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17709 (mask_gather_load<mode>): New insns.
17710
17711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17712 Alan Hayward <alan.hayward@arm.com>
17713 David Sherwood <david.sherwood@arm.com>
17714
17715 * optabs.def (fold_left_plus_optab): New optab.
17716 * doc/md.texi (fold_left_plus_@var{m}): Document.
17717 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17718 * internal-fn.c (fold_left_direct): Define.
17719 (expand_fold_left_optab_fn): Likewise.
17720 (direct_fold_left_optab_supported_p): Likewise.
17721 * fold-const-call.c (fold_const_fold_left): New function.
17722 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17723 * tree-parloops.c (valid_reduction_p): New function.
17724 (gather_scalar_reductions): Use it.
17725 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17726 (vect_finish_replace_stmt): Declare.
17727 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17728 (needs_fold_left_reduction_p): New function, split out from...
17729 (vect_is_simple_reduction): ...here. Accept reductions that
17730 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17731 (vect_force_simple_reduction): Also store the reduction type in
17732 the assignment's STMT_VINFO_REDUC_TYPE.
17733 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17734 (merge_with_identity): New function.
17735 (vect_expand_fold_left): Likewise.
17736 (vectorize_fold_left_reduction): Likewise.
17737 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17738 scalar phi in place for it. Check for target support and reject
17739 cases that would reassociate the operation. Defer the transform
17740 phase to vectorize_fold_left_reduction.
17741 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17742 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17743 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17744
17745 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17746
17747 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17748 call to ifc_temp_var.
17749
17750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17751 Alan Hayward <alan.hayward@arm.com>
17752 David Sherwood <david.sherwood@arm.com>
17753
17754 * target.def (legitimize_address_displacement): Take the original
17755 offset as a poly_int.
17756 * targhooks.h (default_legitimize_address_displacement): Update
17757 accordingly.
17758 * targhooks.c (default_legitimize_address_displacement): Likewise.
17759 * doc/tm.texi: Regenerate.
17760 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17761 as an argument, moving assert of ad->disp == ad->disp_term to...
17762 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17763 Try calling targetm.legitimize_address_displacement before expanding
17764 the address rather than afterwards, and adjust for the new interface.
17765 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17766 Match the new hook interface. Handle SVE addresses.
17767 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17768 new hook interface.
17769
17770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17771
17772 * Makefile.in (OBJS): Add early-remat.o.
17773 * target.def (select_early_remat_modes): New hook.
17774 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17775 * doc/tm.texi: Regenerate.
17776 * targhooks.h (default_select_early_remat_modes): Declare.
17777 * targhooks.c (default_select_early_remat_modes): New function.
17778 * timevar.def (TV_EARLY_REMAT): New timevar.
17779 * passes.def (pass_early_remat): New pass.
17780 * tree-pass.h (make_pass_early_remat): Declare.
17781 * early-remat.c: New file.
17782 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17783 function.
17784 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17785
17786 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17787 Alan Hayward <alan.hayward@arm.com>
17788 David Sherwood <david.sherwood@arm.com>
17789
17790 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17791 vfm1 with a bound_epilog parameter.
17792 (vect_do_peeling): Update calls accordingly, and move the prologue
17793 call earlier in the function. Treat the base bound_epilog as 0 for
17794 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17795 this base when peeling for gaps.
17796 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17797 with fully-masked loops.
17798 (vect_estimate_min_profitable_iters): Handle the single peeled
17799 iteration in that case.
17800
17801 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17802 Alan Hayward <alan.hayward@arm.com>
17803 David Sherwood <david.sherwood@arm.com>
17804
17805 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17806 single-element interleaving even if the size is not a power of 2.
17807 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17808 accesses for single-element interleaving if the group size is
17809 not a power of 2.
17810
17811 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17812 Alan Hayward <alan.hayward@arm.com>
17813 David Sherwood <david.sherwood@arm.com>
17814
17815 * doc/md.texi (fold_extract_last_@var{m}): Document.
17816 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17817 * optabs.def (fold_extract_last_optab): New optab.
17818 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17819 * internal-fn.c (fold_extract_direct): New macro.
17820 (expand_fold_extract_optab_fn): Likewise.
17821 (direct_fold_extract_optab_supported_p): Likewise.
17822 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17823 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17824 EXTRACT_LAST_REDUCTION.
17825 (get_initial_def_for_reduction): Do not create an initial vector
17826 for EXTRACT_LAST_REDUCTION reductions.
17827 (vectorizable_reduction): Leave the scalar phi in place for
17828 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17829 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17830 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17831 transform phase to vectorizable_condition.
17832 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17833 split out from...
17834 (vect_finish_stmt_generation): ...here.
17835 (vect_finish_replace_stmt): New function.
17836 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17837 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17838 pattern.
17839 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17840
17841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17842 Alan Hayward <alan.hayward@arm.com>
17843 David Sherwood <david.sherwood@arm.com>
17844
17845 * doc/md.texi (extract_last_@var{m}): Document.
17846 * optabs.def (extract_last_optab): New optab.
17847 * internal-fn.def (EXTRACT_LAST): New internal function.
17848 * internal-fn.c (cond_unary_direct): New macro.
17849 (expand_cond_unary_optab_fn): Likewise.
17850 (direct_cond_unary_optab_supported_p): Likewise.
17851 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17852 loops using EXTRACT_LAST.
17853 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17854 (extract_last_<mode>): ...this optab.
17855 (vec_extract<mode><Vel>): Update accordingly.
17856
17857 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17858 Alan Hayward <alan.hayward@arm.com>
17859 David Sherwood <david.sherwood@arm.com>
17860
17861 * target.def (empty_mask_is_expensive): New hook.
17862 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17863 * doc/tm.texi: Regenerate.
17864 * targhooks.h (default_empty_mask_is_expensive): Declare.
17865 * targhooks.c (default_empty_mask_is_expensive): New function.
17866 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17867 if the target says that empty masks are expensive.
17868 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17869 New function.
17870 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17871
17872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17873 Alan Hayward <alan.hayward@arm.com>
17874 David Sherwood <david.sherwood@arm.com>
17875
17876 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17877 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17878 (vect_use_loop_mask_for_alignment_p): New function.
17879 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17880 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17881 niters_skip argument. Make sure that the first niters_skip elements
17882 of the first iteration are inactive.
17883 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17884 Update call to vect_set_loop_masks_directly.
17885 (get_misalign_in_elems): New function, split out from...
17886 (vect_gen_prolog_loop_niters): ...here.
17887 (vect_update_init_of_dr): Take a code argument that specifies whether
17888 the adjustment should be added or subtracted.
17889 (vect_update_init_of_drs): Likewise.
17890 (vect_prepare_for_masked_peels): New function.
17891 (vect_do_peeling): Skip prologue peeling if we're using a mask
17892 instead. Update call to vect_update_inits_of_drs.
17893 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17894 mask_skip_niters.
17895 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17896 alignment. Do not include the number of peeled iterations in
17897 the minimum threshold in that case.
17898 (vectorizable_induction): Adjust the start value down by
17899 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17900 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17901 Take the number of skipped iterations into account when calculating
17902 the loop bounds.
17903 * tree-vect-stmts.c (vect_gen_while_not): New function.
17904
17905 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17906 Alan Hayward <alan.hayward@arm.com>
17907 David Sherwood <david.sherwood@arm.com>
17908
17909 * doc/sourcebuild.texi (vect_fully_masked): Document.
17910 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17911 default value to 0.
17912 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17913 split out from...
17914 (vect_analyze_loop_2): ...here. Don't check the vectorization
17915 factor against the number of loop iterations if the loop is
17916 fully-masked.
17917
17918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17919 Alan Hayward <alan.hayward@arm.com>
17920 David Sherwood <david.sherwood@arm.com>
17921
17922 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17923 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17924 (dump_groups): Update accordingly.
17925 (iv_use::mem_type): New member variable.
17926 (address_p): New function.
17927 (record_use): Add a mem_type argument and initialize the new
17928 mem_type field.
17929 (record_group_use): Add a mem_type argument. Use address_p.
17930 Remove obsolete null checks of base_object. Update call to record_use.
17931 (find_interesting_uses_op): Update call to record_group_use.
17932 (find_interesting_uses_cond): Likewise.
17933 (find_interesting_uses_address): Likewise.
17934 (get_mem_type_for_internal_fn): New function.
17935 (find_address_like_use): Likewise.
17936 (find_interesting_uses_stmt): Try find_address_like_use before
17937 calling find_interesting_uses_op.
17938 (addr_offset_valid_p): Use the iv mem_type field as the type
17939 of the addressed memory.
17940 (add_autoinc_candidates): Likewise.
17941 (get_address_cost): Likewise.
17942 (split_small_address_groups_p): Use address_p.
17943 (split_address_groups): Likewise.
17944 (add_iv_candidate_for_use): Likewise.
17945 (autoinc_possible_for_pair): Likewise.
17946 (rewrite_groups): Likewise.
17947 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
17948 (determine_group_iv_cost): Update after split of USE_ADDRESS.
17949 (get_alias_ptr_type_for_ptr_address): New function.
17950 (rewrite_use_address): Rewrite address uses in calls that were
17951 identified by find_address_like_use.
17952
17953 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17954 Alan Hayward <alan.hayward@arm.com>
17955 David Sherwood <david.sherwood@arm.com>
17956
17957 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
17958 TARGET_MEM_REFs.
17959 * gimple-expr.h (is_gimple_addressable: Likewise.
17960 * gimple-expr.c (is_gimple_address): Likewise.
17961 * internal-fn.c (expand_call_mem_ref): New function.
17962 (expand_mask_load_optab_fn): Use it.
17963 (expand_mask_store_optab_fn): Likewise.
17964
17965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17966 Alan Hayward <alan.hayward@arm.com>
17967 David Sherwood <david.sherwood@arm.com>
17968
17969 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
17970 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
17971 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
17972 (cond_umax@var{mode}): Document.
17973 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
17974 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
17975 (cond_umin_optab, cond_umax_optab): New optabs.
17976 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
17977 (COND_IOR, COND_XOR): New internal functions.
17978 * internal-fn.h (get_conditional_internal_fn): Declare.
17979 * internal-fn.c (cond_binary_direct): New macro.
17980 (expand_cond_binary_optab_fn): Likewise.
17981 (direct_cond_binary_optab_supported_p): Likewise.
17982 (get_conditional_internal_fn): New function.
17983 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
17984 Cope with reduction statements that are vectorized as calls rather
17985 than assignments.
17986 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
17987 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
17988 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
17989 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17990 (UNSPEC_COND_EOR): New unspecs.
17991 (optab): Add mappings for them.
17992 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
17993 (sve_int_op, sve_fp_op): New int attributes.
17994
17995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17996 Alan Hayward <alan.hayward@arm.com>
17997 David Sherwood <david.sherwood@arm.com>
17998
17999 * optabs.def (while_ult_optab): New optab.
18000 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18001 * internal-fn.def (WHILE_ULT): New internal function.
18002 * internal-fn.h (direct_internal_fn_supported_p): New override
18003 that takes two types as argument.
18004 * internal-fn.c (while_direct): New macro.
18005 (expand_while_optab_fn): New function.
18006 (convert_optab_supported_p): Likewise.
18007 (direct_while_optab_supported_p): New macro.
18008 * wide-int.h (wi::udiv_ceil): New function.
18009 * tree-vectorizer.h (rgroup_masks): New structure.
18010 (vec_loop_masks): New typedef.
18011 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18012 and fully_masked_p.
18013 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18014 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18015 (vect_max_vf): New function.
18016 (slpeel_make_loop_iterate_ntimes): Delete.
18017 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18018 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18019 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18020 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18021 internal-fn.h, stor-layout.h and optabs-query.h.
18022 (vect_set_loop_mask): New function.
18023 (add_preheader_seq): Likewise.
18024 (add_header_seq): Likewise.
18025 (interleave_supported_p): Likewise.
18026 (vect_maybe_permute_loop_masks): Likewise.
18027 (vect_set_loop_masks_directly): Likewise.
18028 (vect_set_loop_condition_masked): Likewise.
18029 (vect_set_loop_condition_unmasked): New function, split out from
18030 slpeel_make_loop_iterate_ntimes.
18031 (slpeel_make_loop_iterate_ntimes): Rename to..
18032 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18033 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18034 (vect_do_peeling): Update call accordingly.
18035 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18036 loops.
18037 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18038 mask_compare_type, can_fully_mask_p and fully_masked_p.
18039 (release_vec_loop_masks): New function.
18040 (_loop_vec_info): Use it to free the loop masks.
18041 (can_produce_all_loop_masks_p): New function.
18042 (vect_get_max_nscalars_per_iter): Likewise.
18043 (vect_verify_full_masking): Likewise.
18044 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18045 retries, and free the mask rgroups before retrying. Check loop-wide
18046 reasons for disallowing fully-masked loops. Make the final decision
18047 about whether use a fully-masked loop or not.
18048 (vect_estimate_min_profitable_iters): Do not assume that peeling
18049 for the number of iterations will be needed for fully-masked loops.
18050 (vectorizable_reduction): Disable fully-masked loops.
18051 (vectorizable_live_operation): Likewise.
18052 (vect_halve_mask_nunits): New function.
18053 (vect_double_mask_nunits): Likewise.
18054 (vect_record_loop_mask): Likewise.
18055 (vect_get_loop_mask): Likewise.
18056 (vect_transform_loop): Handle the case in which the final loop
18057 iteration might handle a partial vector. Call vect_set_loop_condition
18058 instead of slpeel_make_loop_iterate_ntimes.
18059 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18060 (check_load_store_masking): New function.
18061 (prepare_load_store_mask): Likewise.
18062 (vectorizable_store): Handle fully-masked loops.
18063 (vectorizable_load): Likewise.
18064 (supportable_widening_operation): Use vect_halve_mask_nunits for
18065 booleans.
18066 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18067 (vect_gen_while): New function.
18068 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18069 (aarch64_uqdec<mode>): New insn.
18070
18071 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18072 Alan Hayward <alan.hayward@arm.com>
18073 David Sherwood <david.sherwood@arm.com>
18074
18075 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18076 (reduc_xor_scal_optab): New optabs.
18077 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18078 (reduc_xor_scal_@var{m}): Document.
18079 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18080 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18081 internal functions.
18082 * fold-const-call.c (fold_const_call): Handle them.
18083 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18084 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18085 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18086 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18087 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18088 (UNSPEC_XORV): New unspecs.
18089 (optab): Add entries for them.
18090 (BITWISEV): New int iterator.
18091 (bit_reduc_op): New int attributes.
18092
18093 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18094 Alan Hayward <alan.hayward@arm.com>
18095 David Sherwood <david.sherwood@arm.com>
18096
18097 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18098 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18099 * optabs.def (vec_shl_insert_optab): New optab.
18100 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18101 (duplicate_and_interleave): Likewise.
18102 * tree-vect-loop.c: Include internal-fn.h.
18103 (neutral_op_for_slp_reduction): New function, split out from
18104 get_initial_defs_for_reduction.
18105 (get_initial_def_for_reduction): Handle option 2 for variable-length
18106 vectors by loading the neutral value into a vector and then shifting
18107 the initial value into element 0.
18108 (get_initial_defs_for_reduction): Replace the code argument with
18109 the neutral value calculated by neutral_op_for_slp_reduction.
18110 Use gimple_build_vector for constant-length vectors.
18111 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18112 but the first group_size elements have a neutral value.
18113 Use duplicate_and_interleave otherwise.
18114 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18115 Update call to get_initial_defs_for_reduction. Handle SLP
18116 reductions for variable-length vectors by creating one vector
18117 result for each scalar result, with the elements associated
18118 with other scalar results stubbed out with the neutral value.
18119 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18120 Require IFN_VEC_SHL_INSERT for double reductions on
18121 variable-length vectors, or SLP reductions that have
18122 a neutral value. Require can_duplicate_and_interleave_p
18123 support for variable-length unchained SLP reductions if there
18124 is no neutral value, such as for MIN/MAX reductions. Also require
18125 the number of vector elements to be a multiple of the number of
18126 SLP statements when doing variable-length unchained SLP reductions.
18127 Update call to vect_create_epilog_for_reduction.
18128 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18129 and remove initial values.
18130 (duplicate_and_interleave): Make public.
18131 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18132 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18133
18134 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18135 Alan Hayward <alan.hayward@arm.com>
18136 David Sherwood <david.sherwood@arm.com>
18137
18138 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18139 (can_duplicate_and_interleave_p): New function.
18140 (vect_get_and_check_slp_defs): Take the vector of statements
18141 rather than just the current one. Remove excess parentheses.
18142 Restriction rejectinon of vect_constant_def and vect_external_def
18143 for variable-length vectors to boolean types, or types for which
18144 can_duplicate_and_interleave_p is false.
18145 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18146 (duplicate_and_interleave): New function.
18147 (vect_get_constant_vectors): Use gimple_build_vector for
18148 constant-length vectors and suitable variable-length constant
18149 vectors. Use duplicate_and_interleave for other variable-length
18150 vectors. Don't defer the update when inserting new statements.
18151
18152 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18153 Alan Hayward <alan.hayward@arm.com>
18154 David Sherwood <david.sherwood@arm.com>
18155
18156 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18157 min_profitable_iters doesn't go negative.
18158
18159 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18160 Alan Hayward <alan.hayward@arm.com>
18161 David Sherwood <david.sherwood@arm.com>
18162
18163 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18164 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18165 * optabs.def (vec_mask_load_lanes_optab): New optab.
18166 (vec_mask_store_lanes_optab): Likewise.
18167 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18168 (MASK_STORE_LANES): Likewise.
18169 * internal-fn.c (mask_load_lanes_direct): New macro.
18170 (mask_store_lanes_direct): Likewise.
18171 (expand_mask_load_optab_fn): Handle masked operations.
18172 (expand_mask_load_lanes_optab_fn): New macro.
18173 (expand_mask_store_optab_fn): Handle masked operations.
18174 (expand_mask_store_lanes_optab_fn): New macro.
18175 (direct_mask_load_lanes_optab_supported_p): Likewise.
18176 (direct_mask_store_lanes_optab_supported_p): Likewise.
18177 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18178 parameter.
18179 (vect_load_lanes_supported): Likewise.
18180 * tree-vect-data-refs.c (strip_conversion): New function.
18181 (can_group_stmts_p): Likewise.
18182 (vect_analyze_data_ref_accesses): Use it instead of checking
18183 for a pair of assignments.
18184 (vect_store_lanes_supported): Take a masked_p parameter.
18185 (vect_load_lanes_supported): Likewise.
18186 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18187 vect_store_lanes_supported and vect_load_lanes_supported.
18188 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18189 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18190 parameter. Don't allow gaps for masked accesses.
18191 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18192 and vect_load_lanes_supported.
18193 (get_load_store_type): Take a masked_p parameter and update
18194 call to get_group_load_store_type.
18195 (vectorizable_store): Update call to get_load_store_type.
18196 Handle IFN_MASK_STORE_LANES.
18197 (vectorizable_load): Update call to get_load_store_type.
18198 Handle IFN_MASK_LOAD_LANES.
18199
18200 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18201 Alan Hayward <alan.hayward@arm.com>
18202 David Sherwood <david.sherwood@arm.com>
18203
18204 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18205 modes for SVE.
18206 * config/aarch64/aarch64-protos.h
18207 (aarch64_sve_struct_memory_operand_p): Declare.
18208 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18209 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18210 (VPRED, vpred): Handle SVE structure modes.
18211 * config/aarch64/constraints.md (Utx): New constraint.
18212 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18213 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18214 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18215 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18216 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18217 structure modes. Split into pieces after RA.
18218 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18219 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18220 New patterns.
18221 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18222 SVE structure modes.
18223 (aarch64_classify_address): Likewise.
18224 (sizetochar): Move earlier in file.
18225 (aarch64_print_operand): Handle SVE register lists.
18226 (aarch64_array_mode): New function.
18227 (aarch64_sve_struct_memory_operand_p): Likewise.
18228 (TARGET_ARRAY_MODE): Redefine.
18229
18230 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18231 Alan Hayward <alan.hayward@arm.com>
18232 David Sherwood <david.sherwood@arm.com>
18233
18234 * target.def (array_mode): New target hook.
18235 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18236 * doc/tm.texi: Regenerate.
18237 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18238 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18239 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18240 targetm.array_mode.
18241 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18242 type sizes.
18243
18244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18245 Alan Hayward <alan.hayward@arm.com>
18246 David Sherwood <david.sherwood@arm.com>
18247
18248 * fold-const.c (fold_binary_loc): Check the argument types
18249 rather than the result type when testing for a vector operation.
18250
18251 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18252
18253 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18254 * doc/tm.texi: Regenerate.
18255
18256 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18257 Alan Hayward <alan.hayward@arm.com>
18258 David Sherwood <david.sherwood@arm.com>
18259
18260 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18261 (sve): Document new AArch64 extension.
18262 * doc/md.texi (w): Extend the description of the AArch64
18263 constraint to include SVE vectors.
18264 (Upl, Upa): Document new AArch64 predicate constraints.
18265 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18266 enum.
18267 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18268 (msve-vector-bits=): New option.
18269 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18270 SVE when these are disabled.
18271 (sve): New extension.
18272 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18273 modes. Adjust their number of units based on aarch64_sve_vg.
18274 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18275 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18276 aarch64_addr_query_type.
18277 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18278 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18279 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18280 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18281 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18282 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18283 (aarch64_simd_imm_zero_p): Delete.
18284 (aarch64_check_zero_based_sve_index_immediate): Declare.
18285 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18286 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18287 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18288 (aarch64_sve_float_mul_immediate_p): Likewise.
18289 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18290 rather than an rtx.
18291 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18292 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18293 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18294 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18295 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18296 (aarch64_regmode_natural_size): Likewise.
18297 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18298 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18299 left one place.
18300 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18301 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18302 for VG and the SVE predicate registers.
18303 (V_ALIASES): Add a "z"-prefixed alias.
18304 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18305 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18306 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18307 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18308 (REG_CLASS_NAMES): Add entries for them.
18309 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18310 and the predicate registers.
18311 (aarch64_sve_vg): Declare.
18312 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18313 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18314 (REGMODE_NATURAL_SIZE): Define.
18315 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18316 SVE macros.
18317 * config/aarch64/aarch64.c: Include cfgrtl.h.
18318 (simd_immediate_info): Add a constructor for series vectors,
18319 and an associated step field.
18320 (aarch64_sve_vg): New variable.
18321 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18322 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18323 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18324 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18325 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18326 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18327 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18328 (aarch64_get_mask_mode): New functions.
18329 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18330 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18331 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18332 predicate modes and predicate registers. Explicitly restrict
18333 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18334 to store a vector mode if it is recognized by
18335 aarch64_classify_vector_mode.
18336 (aarch64_regmode_natural_size): New function.
18337 (aarch64_hard_regno_caller_save_mode): Return the original mode
18338 for predicates.
18339 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18340 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18341 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18342 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18343 functions.
18344 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18345 does not overlap dest if the function is frame-related. Handle
18346 SVE constants.
18347 (aarch64_split_add_offset): New function.
18348 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18349 them aarch64_add_offset.
18350 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18351 and update call to aarch64_sub_sp.
18352 (aarch64_add_cfa_expression): New function.
18353 (aarch64_expand_prologue): Pass extra temporary registers to the
18354 functions above. Handle the case in which we need to emit new
18355 DW_CFA_expressions for registers that were originally saved
18356 relative to the stack pointer, but now have to be expressed
18357 relative to the frame pointer.
18358 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18359 functions above.
18360 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18361 IP0 and IP1 values for SVE frames.
18362 (aarch64_expand_vec_series): New function.
18363 (aarch64_expand_sve_widened_duplicate): Likewise.
18364 (aarch64_expand_sve_const_vector): Likewise.
18365 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18366 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18367 into the register, rather than emitting a SET directly.
18368 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18369 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18370 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18371 (offset_9bit_signed_scaled_p): New functions.
18372 (aarch64_replicate_bitmask_imm): New function.
18373 (aarch64_bitmask_imm): Use it.
18374 (aarch64_cannot_force_const_mem): Reject expressions involving
18375 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18376 (aarch64_classify_index): Handle SVE indices, by requiring
18377 a plain register index with a scale that matches the element size.
18378 (aarch64_classify_address): Handle SVE addresses. Assert that
18379 the mode of the address is VOIDmode or an integer mode.
18380 Update call to aarch64_classify_symbol.
18381 (aarch64_classify_symbolic_expression): Update call to
18382 aarch64_classify_symbol.
18383 (aarch64_const_vec_all_in_range_p): New function.
18384 (aarch64_print_vector_float_operand): Likewise.
18385 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18386 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18387 and the FP immediates 1.0 and 0.5.
18388 (aarch64_print_address_internal): Handle SVE addresses.
18389 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18390 (aarch64_regno_regclass): Handle predicate registers.
18391 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18392 data modes.
18393 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18394 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18395 (aarch64_convert_sve_vector_bits): New function.
18396 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18397 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18398 rather than an rtx.
18399 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18400 Handle SVE vector and predicate modes. Accept VL-based constants
18401 that need only one temporary register, and VL offsets that require
18402 no temporary registers.
18403 (aarch64_conditional_register_usage): Mark the predicate registers
18404 as fixed if SVE isn't available.
18405 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18406 Return true for SVE vector and predicate modes.
18407 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18408 rather than an unsigned int. Handle SVE modes.
18409 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18410 SVE modes.
18411 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18412 if SVE is enabled.
18413 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18414 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18415 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18416 (aarch64_sve_float_mul_immediate_p): New functions.
18417 (aarch64_sve_valid_immediate): New function.
18418 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18419 Explicitly reject structure modes. Check for INDEX constants.
18420 Handle PTRUE and PFALSE constants.
18421 (aarch64_check_zero_based_sve_index_immediate): New function.
18422 (aarch64_simd_imm_zero_p): Delete.
18423 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18424 vector modes. Accept constants in the range of CNT[BHWD].
18425 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18426 ask for an Advanced SIMD mode.
18427 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18428 (aarch64_simd_vector_alignment): Handle SVE predicates.
18429 (aarch64_vectorize_preferred_vector_alignment): New function.
18430 (aarch64_simd_vector_alignment_reachable): Use it instead of
18431 the vector size.
18432 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18433 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18434 functions.
18435 (MAX_VECT_LEN): Delete.
18436 (expand_vec_perm_d): Add a vec_flags field.
18437 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18438 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18439 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18440 for SVE modes.
18441 (aarch64_evpc_rev): Rename to...
18442 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18443 (aarch64_evpc_rev_global): New function.
18444 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18445 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18446 MAX_VECT_LEN.
18447 (aarch64_evpc_sve_tbl): New function.
18448 (aarch64_expand_vec_perm_const_1): Update after rename of
18449 aarch64_evpc_rev. Handle SVE permutes too, trying
18450 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18451 than aarch64_evpc_tbl.
18452 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18453 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18454 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18455 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18456 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18457 (aarch64_expand_sve_vcond): New functions.
18458 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18459 of aarch64_vector_mode_p.
18460 (aarch64_dwarf_poly_indeterminate_value): New function.
18461 (aarch64_compute_pressure_classes): Likewise.
18462 (aarch64_can_change_mode_class): Likewise.
18463 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18464 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18465 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18466 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18467 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18468 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18469 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18470 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18471 constraints.
18472 (Dn, Dl, Dr): Accept const as well as const_vector.
18473 (Dz): Likewise. Compare against CONST0_RTX.
18474 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18475 of "vector" where appropriate.
18476 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18477 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18478 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18479 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18480 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18481 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18482 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18483 (v_int_equiv): Extend to SVE modes.
18484 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18485 mode attributes.
18486 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18487 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18488 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18489 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18490 (SVE_COND_FP_CMP): New int iterators.
18491 (perm_hilo): Handle the new unpack unspecs.
18492 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18493 attributes.
18494 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18495 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18496 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18497 (aarch64_equality_operator, aarch64_constant_vector_operand)
18498 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18499 (aarch64_sve_nonimmediate_operand): Likewise.
18500 (aarch64_sve_general_operand): Likewise.
18501 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18502 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18503 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18504 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18505 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18506 (aarch64_sve_float_arith_immediate): Likewise.
18507 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18508 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18509 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18510 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18511 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18512 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18513 (aarch64_sve_float_arith_operand): Likewise.
18514 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18515 (aarch64_sve_float_mul_operand): Likewise.
18516 (aarch64_sve_vec_perm_operand): Likewise.
18517 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18518 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18519 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18520 as well as const_vector.
18521 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18522 in file. Use CONST0_RTX and CONSTM1_RTX.
18523 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18524 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18525 Use aarch64_simd_imm_zero.
18526 * config/aarch64/aarch64-sve.md: New file.
18527 * config/aarch64/aarch64.md: Include it.
18528 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18529 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18530 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18531 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18532 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18533 (sve): New attribute.
18534 (enabled): Disable instructions with the sve attribute unless
18535 TARGET_SVE.
18536 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18537 aarch64_expand_mov_immediate.
18538 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18539 CNT[BHSD] immediates.
18540 (movti): Split CONST_POLY_INT moves into two halves.
18541 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18542 Split additions that need a temporary here if the destination
18543 is the stack pointer.
18544 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18545 (*add<mode>3_poly_1): New instruction.
18546 (set_clobber_cc): New expander.
18547
18548 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18549
18550 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18551 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18552 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18553 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18554 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18555 Change innermode from fixed_mode_size to machine_mode.
18556 (simplify_subreg): Update call accordingly. Handle a constant-sized
18557 subreg of a variable-length CONST_VECTOR.
18558
18559 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18560 Alan Hayward <alan.hayward@arm.com>
18561 David Sherwood <david.sherwood@arm.com>
18562
18563 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18564 (add_offset_to_base): New function, split out from...
18565 (create_mem_ref): ...here. When handling a scale other than 1,
18566 check first whether the address is valid without the offset.
18567 Add it into the base if so, leaving the index and scale as-is.
18568
18569 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18570
18571 PR c++/83778
18572 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18573 fold_for_warn before checking if arg2 is INTEGER_CST.
18574
18575 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18576
18577 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18578 (store_multiple_operation): Delete.
18579 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18580 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18581 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18582 guarded by TARGET_STRING.
18583 (rs6000_output_load_multiple): Delete.
18584 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18585 OPTION_MASK_STRING / TARGET_STRING handling.
18586 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18587 (const rs6000_opt_masks) <"string">: Change mask to 0.
18588 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18589 (MASK_STRING): Delete.
18590 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18591 parts. Simplify.
18592 (load_multiple): Delete.
18593 (*ldmsi8): Delete.
18594 (*ldmsi7): Delete.
18595 (*ldmsi6): Delete.
18596 (*ldmsi5): Delete.
18597 (*ldmsi4): Delete.
18598 (*ldmsi3): Delete.
18599 (store_multiple): Delete.
18600 (*stmsi8): Delete.
18601 (*stmsi7): Delete.
18602 (*stmsi6): Delete.
18603 (*stmsi5): Delete.
18604 (*stmsi4): Delete.
18605 (*stmsi3): Delete.
18606 (movmemsi_8reg): Delete.
18607 (corresponding unnamed define_insn): Delete.
18608 (movmemsi_6reg): Delete.
18609 (corresponding unnamed define_insn): Delete.
18610 (movmemsi_4reg): Delete.
18611 (corresponding unnamed define_insn): Delete.
18612 (movmemsi_2reg): Delete.
18613 (corresponding unnamed define_insn): Delete.
18614 (movmemsi_1reg): Delete.
18615 (corresponding unnamed define_insn): Delete.
18616 * config/rs6000/rs6000.opt (mno-string): New.
18617 (mstring): Replace by deprecation warning stub.
18618 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18619
18620 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18621
18622 * regrename.c (regrename_do_replace): If replacing the same
18623 reg multiple times, try to reuse last created gen_raw_REG.
18624
18625 PR debug/81155
18626 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18627 main to workaround a bug in GDB.
18628
18629 2018-01-12 Tom de Vries <tom@codesourcery.com>
18630
18631 PR target/83737
18632 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18633
18634 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18635
18636 PR rtl-optimization/80481
18637 * ira-color.c (get_cap_member): New function.
18638 (allocnos_conflict_by_live_ranges_p): Use it.
18639 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18640 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18641
18642 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18643
18644 PR target/83628
18645 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18646 (*saddl_se_1): Ditto.
18647 (*ssubsi_1): Ditto.
18648 (*ssubl_se_1): Ditto.
18649
18650 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18651
18652 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18653 rather than wi::to_widest for DR_INITs.
18654 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18655 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18656 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18657 INTEGER_CSTs.
18658 (vect_analyze_group_access_1): Note that here.
18659
18660 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18661
18662 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18663 polynomial type sizes.
18664
18665 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18666
18667 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18668 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18669 (gimple_add_tmp_var): Likewise.
18670
18671 2018-01-12 Martin Liska <mliska@suse.cz>
18672
18673 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18674 (gimple_alloc_sizes): Likewise.
18675 (dump_gimple_statistics): Use PRIu64 in printf format.
18676 * gimple.h: Change uint64_t to int.
18677
18678 2018-01-12 Martin Liska <mliska@suse.cz>
18679
18680 * tree-core.h: Use uint64_t instead of int.
18681 * tree.c (tree_node_counts): Likewise.
18682 (tree_node_sizes): Likewise.
18683 (dump_tree_statistics): Use PRIu64 in printf format.
18684
18685 2018-01-12 Martin Liska <mliska@suse.cz>
18686
18687 * Makefile.in: As qsort_chk is implemented in vec.c, add
18688 vec.o to linkage of gencfn-macros.
18689 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18690 passing the info to record_node_allocation_statistics.
18691 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18692 and pass the info.
18693 * ggc-common.c (struct ggc_usage): Add operator== and use
18694 it in operator< and compare function.
18695 * mem-stats.h (struct mem_usage): Likewise.
18696 * vec.c (struct vec_usage): Remove operator< and compare
18697 function. Can be simply inherited.
18698
18699 2018-01-12 Martin Jambor <mjambor@suse.cz>
18700
18701 PR target/81616
18702 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18703 * tree-ssa-math-opts.c: Include domwalk.h.
18704 (convert_mult_to_fma_1): New function.
18705 (fma_transformation_info): New type.
18706 (fma_deferring_state): Likewise.
18707 (cancel_fma_deferring): New function.
18708 (result_of_phi): Likewise.
18709 (last_fma_candidate_feeds_initial_phi): Likewise.
18710 (convert_mult_to_fma): Added deferring logic, split actual
18711 transformation to convert_mult_to_fma_1.
18712 (math_opts_dom_walker): New type.
18713 (math_opts_dom_walker::after_dom_children): New method, body moved
18714 here from pass_optimize_widening_mul::execute, added deferring logic
18715 bits.
18716 (pass_optimize_widening_mul::execute): Moved most of code to
18717 math_opts_dom_walker::after_dom_children.
18718 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18719 * config/i386/i386.c (ix86_option_override_internal): Added
18720 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18721
18722 2018-01-12 Richard Biener <rguenther@suse.de>
18723
18724 PR debug/83157
18725 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18726 inline instance vars.
18727
18728 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18729
18730 PR target/81819
18731 * config/rx/rx.c (rx_is_restricted_memory_address):
18732 Handle SUBREG case.
18733
18734 2018-01-12 Richard Biener <rguenther@suse.de>
18735
18736 PR tree-optimization/80846
18737 * target.def (split_reduction): New target hook.
18738 * targhooks.c (default_split_reduction): New function.
18739 * targhooks.h (default_split_reduction): Declare.
18740 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18741 target requests first reduce vectors by combining low and high
18742 parts.
18743 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18744 (get_vectype_for_scalar_type_and_size): Export.
18745 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18746 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18747 * doc/tm.texi: Regenerate.
18748 * config/i386/i386.c (ix86_split_reduction): Implement
18749 TARGET_VECTORIZE_SPLIT_REDUCTION.
18750
18751 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18752
18753 PR target/83368
18754 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18755 in PIC mode except for TARGET_VXWORKS_RTP.
18756 * config/sparc/sparc.c: Include cfgrtl.h.
18757 (TARGET_INIT_PIC_REG): Define.
18758 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18759 (sparc_pic_register_p): New predicate.
18760 (sparc_legitimate_address_p): Use it.
18761 (sparc_legitimize_pic_address): Likewise.
18762 (sparc_delegitimize_address): Likewise.
18763 (sparc_mode_dependent_address_p): Likewise.
18764 (gen_load_pcrel_sym): Remove 4th parameter.
18765 (load_got_register): Adjust call to above. Remove obsolete stuff.
18766 (sparc_expand_prologue): Do not call load_got_register here.
18767 (sparc_flat_expand_prologue): Likewise.
18768 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18769 (sparc_use_pseudo_pic_reg): New function.
18770 (sparc_init_pic_reg): Likewise.
18771 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18772 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18773
18774 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18775
18776 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18777 Add item for branch_cost.
18778
18779 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18780
18781 PR rtl-optimization/83565
18782 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18783 not extend the result to a larger mode for rotate operations.
18784 (num_sign_bit_copies1): Likewise.
18785
18786 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18787
18788 PR target/40411
18789 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18790 -symbolic.
18791 Use values-Xc.o for -pedantic.
18792 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18793
18794 2018-01-12 Martin Liska <mliska@suse.cz>
18795
18796 PR ipa/83054
18797 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18798 New function.
18799 (possible_polymorphic_call_targets): Use it.
18800 (ipa_devirt): Likewise.
18801
18802 2018-01-12 Martin Liska <mliska@suse.cz>
18803
18804 * profile-count.h (enum profile_quality): Use 0 as invalid
18805 enum value of profile_quality.
18806
18807 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18808
18809 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18810 -mext-string options.
18811
18812 2018-01-12 Richard Biener <rguenther@suse.de>
18813
18814 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18815 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18816 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18817 Likewise.
18818 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18819
18820 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18821
18822 * configure.ac (--with-long-double-format): Add support for the
18823 configuration option to change the default long double format on
18824 PowerPC systems.
18825 * config.gcc (powerpc*-linux*-*): Likewise.
18826 * configure: Regenerate.
18827 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18828 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18829 used without modification.
18830
18831 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18832
18833 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18834 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18835 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18836 MISC_BUILTIN_SPEC_BARRIER.
18837 (rs6000_init_builtins): Likewise.
18838 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18839 enum value.
18840 (speculation_barrier): New define_insn.
18841 * doc/extend.texi: Document __builtin_speculation_barrier.
18842
18843 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18844
18845 PR target/83203
18846 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18847 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18848 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18849 iterators.
18850 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18851 integral modes instead of "ss" and "sd".
18852 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18853 vectors with 32-bit and 64-bit elements.
18854 (vecdupssescalarmodesuffix): New mode attribute.
18855 (vec_dup<mode>): Use it.
18856
18857 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18858
18859 PR target/83330
18860 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18861 frame if argument is passed on stack.
18862
18863 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18864
18865 PR target/82682
18866 * ree.c (combine_reaching_defs): Optimize also
18867 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18868 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18869
18870 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18871
18872 PR middle-end/83189
18873 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18874
18875 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18876
18877 PR middle-end/83718
18878 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18879 after they are computed.
18880
18881 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18882
18883 PR tree-optimization/83695
18884 * gimple-loop-linterchange.cc
18885 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18886 reset cached scev information after interchange.
18887 (pass_linterchange::execute): Remove call to scev_reset_htab.
18888
18889 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18890
18891 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18892 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18893 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18894 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18895 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18896 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18897 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18898 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18899 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18900 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18901 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18902 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18903 (V_lane_reg): Likewise.
18904 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18905 New define_expand.
18906 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18907 (vfmal_lane_low<mode>_intrinsic,
18908 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18909 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18910 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18911 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18912 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18913 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18914
18915 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18916
18917 * config/arm/arm-cpus.in (fp16fml): New feature.
18918 (ALL_SIMD): Add fp16fml.
18919 (armv8.2-a): Add fp16fml as an option.
18920 (armv8.3-a): Likewise.
18921 (armv8.4-a): Add fp16fml as part of fp16.
18922 * config/arm/arm.h (TARGET_FP16FML): Define.
18923 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18924 when appropriate.
18925 * config/arm/arm-modes.def (V2HF): Define.
18926 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
18927 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
18928 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
18929 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
18930 vfmsl_low, vfmsl_high): New set of builtins.
18931 * config/arm/iterators.md (PLUSMINUS): New code iterator.
18932 (vfml_op): New code attribute.
18933 (VFMLHALVES): New int iterator.
18934 (VFML, VFMLSEL): New mode attributes.
18935 (V_reg): Define mapping for V2HF.
18936 (V_hi, V_lo): New mode attributes.
18937 (VF_constraint): Likewise.
18938 (vfml_half, vfml_half_selector): New int attributes.
18939 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
18940 define_expand.
18941 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
18942 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
18943 New define_insn.
18944 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
18945 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
18946 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
18947 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
18948 documentation.
18949 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
18950 Document new effective target and option set.
18951
18952 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18953
18954 * config/arm/arm-cpus.in (armv8_4): New feature.
18955 (ARMv8_4a): New fgroup.
18956 (armv8.4-a): New arch.
18957 * config/arm/arm-tables.opt: Regenerate.
18958 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
18959 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
18960 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
18961 Add matching rules for -march=armv8.4-a and extensions.
18962 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
18963
18964 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
18965
18966 PR target/81821
18967 * config/rx/rx.md (BW): New mode attribute.
18968 (sync_lock_test_and_setsi): Add mode suffix to insn output.
18969
18970 2018-01-11 Richard Biener <rguenther@suse.de>
18971
18972 PR tree-optimization/83435
18973 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
18974 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
18975 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
18976
18977 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18978 Alan Hayward <alan.hayward@arm.com>
18979 David Sherwood <david.sherwood@arm.com>
18980
18981 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
18982 field.
18983 (aarch64_classify_address): Initialize it. Track polynomial offsets.
18984 (aarch64_print_address_internal): Use it to check for a zero offset.
18985
18986 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
18987 Alan Hayward <alan.hayward@arm.com>
18988 David Sherwood <david.sherwood@arm.com>
18989
18990 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
18991 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
18992 Return a poly_int64 rather than a HOST_WIDE_INT.
18993 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
18994 rather than a HOST_WIDE_INT.
18995 * config/aarch64/aarch64.h (aarch64_frame): Protect with
18996 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
18997 hard_fp_offset, frame_size, initial_adjust, callee_offset and
18998 final_offset from HOST_WIDE_INT to poly_int64.
18999 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19000 to_constant when getting the number of units in an Advanced SIMD
19001 mode.
19002 (aarch64_builtin_vectorized_function): Check for a constant number
19003 of units.
19004 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19005 GET_MODE_SIZE.
19006 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19007 attribute instead of GET_MODE_NUNITS.
19008 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19009 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19010 GET_MODE_SIZE for fixed-size registers.
19011 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19012 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19013 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19014 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19015 (aarch64_print_operand, aarch64_print_address_internal)
19016 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19017 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19018 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19019 Handle polynomial GET_MODE_SIZE.
19020 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19021 wider than SImode without modification.
19022 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19023 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19024 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19025 passing and returning SVE modes.
19026 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19027 rather than GEN_INT.
19028 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19029 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19030 (aarch64_allocate_and_probe_stack_space): Likewise.
19031 (aarch64_layout_frame): Cope with polynomial offsets.
19032 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19033 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19034 polynomial offsets.
19035 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19036 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19037 poly_int64 rather than a HOST_WIDE_INT.
19038 (aarch64_get_separate_components, aarch64_process_components)
19039 (aarch64_expand_prologue, aarch64_expand_epilogue)
19040 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19041 (aarch64_anchor_offset): New function, split out from...
19042 (aarch64_legitimize_address): ...here.
19043 (aarch64_builtin_vectorization_cost): Handle polynomial
19044 TYPE_VECTOR_SUBPARTS.
19045 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19046 GET_MODE_NUNITS.
19047 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19048 number of elements from the PARALLEL rather than the mode.
19049 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19050 rather than GET_MODE_BITSIZE.
19051 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19052 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19053 (aarch64_expand_vec_perm_const_1): Handle polynomial
19054 d->perm.length () and d->perm elements.
19055 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19056 Apply to_constant to d->perm elements.
19057 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19058 polynomial CONST_VECTOR_NUNITS.
19059 (aarch64_move_pointer): Take amount as a poly_int64 rather
19060 than an int.
19061 (aarch64_progress_pointer): Avoid temporary variable.
19062 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19063 the mode attribute instead of GET_MODE.
19064
19065 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19066 Alan Hayward <alan.hayward@arm.com>
19067 David Sherwood <david.sherwood@arm.com>
19068
19069 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19070 x exists before using it.
19071 (aarch64_add_constant_internal): Rename to...
19072 (aarch64_add_offset_1): ...this. Replace regnum with separate
19073 src and dest rtxes. Handle the case in which they're different,
19074 including when the offset is zero. Replace scratchreg with an rtx.
19075 Use 2 additions if there is no spare register into which we can
19076 move a 16-bit constant.
19077 (aarch64_add_constant): Delete.
19078 (aarch64_add_offset): Replace reg with separate src and dest
19079 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19080 Use aarch64_add_offset_1.
19081 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19082 an rtx rather than an int. Take the delta as a poly_int64
19083 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19084 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19085 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19086 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19087 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19088 and aarch64_add_sp.
19089 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19090 aarch64_add_constant.
19091
19092 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19093
19094 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19095 Use scalar_float_mode.
19096
19097 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19098
19099 * config/aarch64/aarch64-simd.md
19100 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19101 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19102 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19103 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19104 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19105 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19106 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19107 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19108 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19109 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19110
19111 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19112
19113 PR target/83514
19114 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19115 targ_options->x_arm_arch_string is non NULL.
19116
19117 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19118
19119 * config/aarch64/aarch64.h
19120 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19121
19122 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19123
19124 PR target/82096
19125 * expmed.c (emit_store_flag_force): Swap if const op0
19126 and change VOIDmode to mode of op0.
19127
19128 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19129
19130 PR rtl-optimization/83761
19131 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19132 than bytes to mode_for_size.
19133
19134 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19135
19136 PR middle-end/83189
19137 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19138 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19139 profile.
19140
19141 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19142
19143 PR middle-end/83575
19144 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19145 when in layout mode.
19146 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19147 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19148 partition fixup.
19149
19150 2018-01-10 Michael Collison <michael.collison@arm.com>
19151
19152 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19153 * config/aarch64/aarch64-option-extension.def: Add
19154 AARCH64_OPT_EXTENSION of 'fp16fml'.
19155 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19156 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19157 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19158 * config/aarch64/constraints.md (Ui7): New constraint.
19159 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19160 (VFMLA_SEL_W): Ditto.
19161 (f16quad): Ditto.
19162 (f16mac1): Ditto.
19163 (VFMLA16_LOW): New int iterator.
19164 (VFMLA16_HIGH): Ditto.
19165 (UNSPEC_FMLAL): New unspec.
19166 (UNSPEC_FMLSL): Ditto.
19167 (UNSPEC_FMLAL2): Ditto.
19168 (UNSPEC_FMLSL2): Ditto.
19169 (f16mac): New code attribute.
19170 * config/aarch64/aarch64-simd-builtins.def
19171 (aarch64_fmlal_lowv2sf): Ditto.
19172 (aarch64_fmlsl_lowv2sf): Ditto.
19173 (aarch64_fmlalq_lowv4sf): Ditto.
19174 (aarch64_fmlslq_lowv4sf): Ditto.
19175 (aarch64_fmlal_highv2sf): Ditto.
19176 (aarch64_fmlsl_highv2sf): Ditto.
19177 (aarch64_fmlalq_highv4sf): Ditto.
19178 (aarch64_fmlslq_highv4sf): Ditto.
19179 (aarch64_fmlal_lane_lowv2sf): Ditto.
19180 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19181 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19182 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19183 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19184 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19185 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19186 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19187 (aarch64_fmlal_lane_highv2sf): Ditto.
19188 (aarch64_fmlsl_lane_highv2sf): Ditto.
19189 (aarch64_fmlal_laneq_highv2sf): Ditto.
19190 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19191 (aarch64_fmlalq_lane_highv4sf): Ditto.
19192 (aarch64_fmlsl_lane_highv4sf): Ditto.
19193 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19194 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19195 * config/aarch64/aarch64-simd.md:
19196 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19197 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19198 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19199 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19200 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19201 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19202 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19203 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19204 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19205 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19206 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19207 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19208 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19209 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19210 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19211 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19212 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19213 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19214 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19215 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19216 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19217 (vfmlsl_low_u32): Ditto.
19218 (vfmlalq_low_u32): Ditto.
19219 (vfmlslq_low_u32): Ditto.
19220 (vfmlal_high_u32): Ditto.
19221 (vfmlsl_high_u32): Ditto.
19222 (vfmlalq_high_u32): Ditto.
19223 (vfmlslq_high_u32): Ditto.
19224 (vfmlal_lane_low_u32): Ditto.
19225 (vfmlsl_lane_low_u32): Ditto.
19226 (vfmlal_laneq_low_u32): Ditto.
19227 (vfmlsl_laneq_low_u32): Ditto.
19228 (vfmlalq_lane_low_u32): Ditto.
19229 (vfmlslq_lane_low_u32): Ditto.
19230 (vfmlalq_laneq_low_u32): Ditto.
19231 (vfmlslq_laneq_low_u32): Ditto.
19232 (vfmlal_lane_high_u32): Ditto.
19233 (vfmlsl_lane_high_u32): Ditto.
19234 (vfmlal_laneq_high_u32): Ditto.
19235 (vfmlsl_laneq_high_u32): Ditto.
19236 (vfmlalq_lane_high_u32): Ditto.
19237 (vfmlslq_lane_high_u32): Ditto.
19238 (vfmlalq_laneq_high_u32): Ditto.
19239 (vfmlslq_laneq_high_u32): Ditto.
19240 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19241 (AARCH64_FL_FOR_ARCH8_4): New.
19242 (AARCH64_ISA_F16FML): New ISA flag.
19243 (TARGET_F16FML): New feature flag for fp16fml.
19244 (doc/invoke.texi): Document new fp16fml option.
19245
19246 2018-01-10 Michael Collison <michael.collison@arm.com>
19247
19248 * config/aarch64/aarch64-builtins.c:
19249 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19250 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19251 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19252 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19253 (AARCH64_ISA_SHA3): New ISA flag.
19254 (TARGET_SHA3): New feature flag for sha3.
19255 * config/aarch64/iterators.md (sha512_op): New int attribute.
19256 (CRYPTO_SHA512): New int iterator.
19257 (UNSPEC_SHA512H): New unspec.
19258 (UNSPEC_SHA512H2): Ditto.
19259 (UNSPEC_SHA512SU0): Ditto.
19260 (UNSPEC_SHA512SU1): Ditto.
19261 * config/aarch64/aarch64-simd-builtins.def
19262 (aarch64_crypto_sha512hqv2di): New builtin.
19263 (aarch64_crypto_sha512h2qv2di): Ditto.
19264 (aarch64_crypto_sha512su0qv2di): Ditto.
19265 (aarch64_crypto_sha512su1qv2di): Ditto.
19266 (aarch64_eor3qv8hi): Ditto.
19267 (aarch64_rax1qv2di): Ditto.
19268 (aarch64_xarqv2di): Ditto.
19269 (aarch64_bcaxqv8hi): Ditto.
19270 * config/aarch64/aarch64-simd.md:
19271 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19272 (aarch64_crypto_sha512su0qv2di): Ditto.
19273 (aarch64_crypto_sha512su1qv2di): Ditto.
19274 (aarch64_eor3qv8hi): Ditto.
19275 (aarch64_rax1qv2di): Ditto.
19276 (aarch64_xarqv2di): Ditto.
19277 (aarch64_bcaxqv8hi): Ditto.
19278 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19279 (vsha512h2q_u64): Ditto.
19280 (vsha512su0q_u64): Ditto.
19281 (vsha512su1q_u64): Ditto.
19282 (veor3q_u16): Ditto.
19283 (vrax1q_u64): Ditto.
19284 (vxarq_u64): Ditto.
19285 (vbcaxq_u16): Ditto.
19286 * config/arm/types.md (crypto_sha512): New type attribute.
19287 (crypto_sha3): Ditto.
19288 (doc/invoke.texi): Document new sha3 option.
19289
19290 2018-01-10 Michael Collison <michael.collison@arm.com>
19291
19292 * config/aarch64/aarch64-builtins.c:
19293 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19294 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19295 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19296 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19297 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19298 (AARCH64_ISA_SM4): New ISA flag.
19299 (TARGET_SM4): New feature flag for sm4.
19300 * config/aarch64/aarch64-simd-builtins.def
19301 (aarch64_sm3ss1qv4si): Ditto.
19302 (aarch64_sm3tt1aq4si): Ditto.
19303 (aarch64_sm3tt1bq4si): Ditto.
19304 (aarch64_sm3tt2aq4si): Ditto.
19305 (aarch64_sm3tt2bq4si): Ditto.
19306 (aarch64_sm3partw1qv4si): Ditto.
19307 (aarch64_sm3partw2qv4si): Ditto.
19308 (aarch64_sm4eqv4si): Ditto.
19309 (aarch64_sm4ekeyqv4si): Ditto.
19310 * config/aarch64/aarch64-simd.md:
19311 (aarch64_sm3ss1qv4si): Ditto.
19312 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19313 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19314 (aarch64_sm4eqv4si): Ditto.
19315 (aarch64_sm4ekeyqv4si): Ditto.
19316 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19317 (sm3part_op): Ditto.
19318 (CRYPTO_SM3TT): Ditto.
19319 (CRYPTO_SM3PART): Ditto.
19320 (UNSPEC_SM3SS1): New unspec.
19321 (UNSPEC_SM3TT1A): Ditto.
19322 (UNSPEC_SM3TT1B): Ditto.
19323 (UNSPEC_SM3TT2A): Ditto.
19324 (UNSPEC_SM3TT2B): Ditto.
19325 (UNSPEC_SM3PARTW1): Ditto.
19326 (UNSPEC_SM3PARTW2): Ditto.
19327 (UNSPEC_SM4E): Ditto.
19328 (UNSPEC_SM4EKEY): Ditto.
19329 * config/aarch64/constraints.md (Ui2): New constraint.
19330 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19331 * config/arm/types.md (crypto_sm3): New type attribute.
19332 (crypto_sm4): Ditto.
19333 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19334 (vsm3tt1aq_u32): Ditto.
19335 (vsm3tt1bq_u32): Ditto.
19336 (vsm3tt2aq_u32): Ditto.
19337 (vsm3tt2bq_u32): Ditto.
19338 (vsm3partw1q_u32): Ditto.
19339 (vsm3partw2q_u32): Ditto.
19340 (vsm4eq_u32): Ditto.
19341 (vsm4ekeyq_u32): Ditto.
19342 (doc/invoke.texi): Document new sm4 option.
19343
19344 2018-01-10 Michael Collison <michael.collison@arm.com>
19345
19346 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19347 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19348 (AARCH64_FL_FOR_ARCH8_4): New.
19349 (AARCH64_FL_V8_4): New flag.
19350 (doc/invoke.texi): Document new armv8.4-a option.
19351
19352 2018-01-10 Michael Collison <michael.collison@arm.com>
19353
19354 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19355 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19356 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19357 * config/aarch64/aarch64-option-extension.def: Add
19358 AARCH64_OPT_EXTENSION of 'sha2'.
19359 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19360 (crypto): Disable sha2 and aes if crypto disabled.
19361 (crypto): Enable aes and sha2 if enabled.
19362 (simd): Disable sha2 and aes if simd disabled.
19363 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19364 New flags.
19365 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19366 (TARGET_SHA2): New feature flag for sha2.
19367 (TARGET_AES): New feature flag for aes.
19368 * config/aarch64/aarch64-simd.md:
19369 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19370 conditional on TARGET_AES.
19371 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19372 (aarch64_crypto_sha1hsi): Make pattern conditional
19373 on TARGET_SHA2.
19374 (aarch64_crypto_sha1hv4si): Ditto.
19375 (aarch64_be_crypto_sha1hv4si): Ditto.
19376 (aarch64_crypto_sha1su1v4si): Ditto.
19377 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19378 (aarch64_crypto_sha1su0v4si): Ditto.
19379 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19380 (aarch64_crypto_sha256su0v4si): Ditto.
19381 (aarch64_crypto_sha256su1v4si): Ditto.
19382 (doc/invoke.texi): Document new aes and sha2 options.
19383
19384 2018-01-10 Martin Sebor <msebor@redhat.com>
19385
19386 PR tree-optimization/83781
19387 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19388 as string arrays.
19389
19390 2018-01-11 Martin Sebor <msebor@gmail.com>
19391 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19392
19393 PR tree-optimization/83501
19394 PR tree-optimization/81703
19395
19396 * tree-ssa-strlen.c (get_string_cst): Rename...
19397 (get_string_len): ...to this. Handle global constants.
19398 (handle_char_store): Adjust.
19399
19400 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19401 Jim Wilson <jimw@sifive.com>
19402
19403 * config/riscv/riscv-protos.h (riscv_output_return): New.
19404 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19405 (riscv_attribute_table, riscv_output_return),
19406 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19407 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19408 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19409 function.
19410 (riscv_expand_prologue): Add early return for naked function.
19411 (riscv_expand_epilogue): Likewise.
19412 (riscv_function_ok_for_sibcall): Return false for naked function.
19413 (riscv_set_current_function): New.
19414 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19415 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19416 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19417 * doc/extend.texi (RISC-V Function Attributes): New.
19418
19419 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19420
19421 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19422 check for 128-bit long double before checking TCmode.
19423 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19424 128-bit long doubles before checking TFmode or TCmode.
19425 (FLOAT128_IBM_P): Likewise.
19426
19427 2018-01-10 Martin Sebor <msebor@redhat.com>
19428
19429 PR tree-optimization/83671
19430 * builtins.c (c_strlen): Unconditionally return zero for the empty
19431 string.
19432 Use -Warray-bounds for warnings.
19433 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19434 for non-constant array indices with COMPONENT_REF, arrays of
19435 arrays, and pointers to arrays.
19436 (gimple_fold_builtin_strlen): Determine and set length range for
19437 non-constant character arrays.
19438
19439 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19440
19441 PR middle-end/81897
19442 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19443 empty blocks.
19444
19445 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19446
19447 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19448
19449 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19450
19451 PR target/83399
19452 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19453 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19454 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19455 indexed_or_indirect_operand predicate.
19456 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19457 (*vsx_le_perm_load_v8hi): Likewise.
19458 (*vsx_le_perm_load_v16qi): Likewise.
19459 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19460 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19461 (*vsx_le_perm_store_v8hi): Likewise.
19462 (*vsx_le_perm_store_v16qi): Likewise.
19463 (eight unnamed splitters): Likewise.
19464
19465 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19466
19467 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19468 * config/rs6000/emmintrin.h: Likewise.
19469 * config/rs6000/mmintrin.h: Likewise.
19470 * config/rs6000/xmmintrin.h: Likewise.
19471
19472 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19473
19474 PR c++/43486
19475 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19476 "public_flag".
19477 * tree.c (tree_nop_conversion): Return true for location wrapper
19478 nodes.
19479 (maybe_wrap_with_location): New function.
19480 (selftest::check_strip_nops): New function.
19481 (selftest::test_location_wrappers): New function.
19482 (selftest::tree_c_tests): Call it.
19483 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19484 (maybe_wrap_with_location): New decl.
19485 (EXPR_LOCATION_WRAPPER_P): New macro.
19486 (location_wrapper_p): New inline function.
19487 (tree_strip_any_location_wrapper): New inline function.
19488
19489 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19490
19491 PR target/83735
19492 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19493 stack_realign_offset for the largest alignment of stack slot
19494 actually used.
19495 (ix86_find_max_used_stack_alignment): New function.
19496 (ix86_finalize_stack_frame_flags): Use it. Set
19497 max_used_stack_alignment if we don't realign stack.
19498 * config/i386/i386.h (machine_function): Add
19499 max_used_stack_alignment.
19500
19501 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19502
19503 * config/arm/arm.opt (-mbranch-cost): New option.
19504 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19505 account.
19506
19507 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19508
19509 PR target/83629
19510 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19511 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19512
19513 2018-01-10 Richard Biener <rguenther@suse.de>
19514
19515 PR debug/83765
19516 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19517 early out so it also covers the case where we have a non-NULL
19518 origin.
19519
19520 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19521
19522 PR tree-optimization/83753
19523 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19524 for non-strided grouped accesses if the number of elements is 1.
19525
19526 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19527
19528 PR target/81616
19529 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19530 * i386.h (TARGET_USE_GATHER): Define.
19531 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19532
19533 2018-01-10 Martin Liska <mliska@suse.cz>
19534
19535 PR bootstrap/82831
19536 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19537 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19538 partitioning.
19539 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19540 CLEANUP_NO_PARTITIONING is not set.
19541
19542 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19543
19544 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19545 for vectors, as a partial revert of r254296.
19546 * rtl.h (const_vec_p): Delete.
19547 (const_vec_duplicate_p): Don't test for vector CONSTs.
19548 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19549 * expmed.c (make_tree): Likewise.
19550
19551 Revert:
19552 * common.md (E, F): Use CONSTANT_P instead of checking for
19553 CONST_VECTOR.
19554 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19555 checking for CONST_VECTOR.
19556
19557 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19558
19559 PR middle-end/83575
19560 * predict.c (force_edge_cold): Handle in more sane way edges
19561 with no prediction.
19562
19563 2018-01-09 Carl Love <cel@us.ibm.com>
19564
19565 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19566 V4SI, V4SF types.
19567 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19568 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19569 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19570 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19571 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19572 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19573 * config/rs6000/rs6000-protos.h: Add extern defition for
19574 rs6000_generate_float2_double_code.
19575 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19576 function.
19577 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19578 (float2_v2df): Add define_expand.
19579
19580 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19581
19582 PR target/83628
19583 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19584 op_mode in the force_to_mode call.
19585
19586 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19587
19588 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19589 instead of checking each element individually.
19590 (aarch64_evpc_uzp): Likewise.
19591 (aarch64_evpc_zip): Likewise.
19592 (aarch64_evpc_ext): Likewise.
19593 (aarch64_evpc_rev): Likewise.
19594 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19595 instead of checking each element individually. Return true without
19596 generating rtl if
19597 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19598 whether all selected elements come from the same input, instead of
19599 checking each element individually. Remove calls to gen_rtx_REG,
19600 start_sequence and end_sequence and instead assert that no rtl is
19601 generated.
19602
19603 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19604
19605 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19606 order of HIGH and CONST checks.
19607
19608 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19609
19610 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19611 if the destination isn't an SSA_NAME.
19612
19613 2018-01-09 Richard Biener <rguenther@suse.de>
19614
19615 PR tree-optimization/83668
19616 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19617 move prologue...
19618 (canonicalize_loop_form): ... here, renamed from ...
19619 (canonicalize_loop_closed_ssa_form): ... this and amended to
19620 swap successor edges for loop exit blocks to make us use
19621 the RPO order we need for initial schedule generation.
19622
19623 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19624
19625 PR tree-optimization/64811
19626 * match.pd: When optimizing comparisons with Inf, avoid
19627 introducing or losing exceptions from comparisons with NaN.
19628
19629 2018-01-09 Martin Liska <mliska@suse.cz>
19630
19631 PR sanitizer/82517
19632 * asan.c (shadow_mem_size): Add gcc_assert.
19633
19634 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19635
19636 Don't save registers in main().
19637
19638 PR target/83738
19639 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19640 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19641 * config/avr/avr.c (avr_set_current_function): Don't error if
19642 naked, OS_task or OS_main are specified at the same time.
19643 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19644 OS_main.
19645 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19646 attribute.
19647 * common/config/avr/avr-common.c (avr_option_optimization_table):
19648 Switch on -mmain-is-OS_task for optimizing compilations.
19649
19650 2018-01-09 Richard Biener <rguenther@suse.de>
19651
19652 PR tree-optimization/83572
19653 * graphite.c: Include cfganal.h.
19654 (graphite_transform_loops): Connect infinite loops to exit
19655 and remove fake edges at the end.
19656
19657 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19658
19659 * ipa-inline.c (edge_badness): Revert accidental checkin.
19660
19661 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19662
19663 PR ipa/80763
19664 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19665 symbols; not inline clones.
19666
19667 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19668
19669 PR target/83507
19670 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19671 hard registers. Formatting fixes.
19672
19673 PR preprocessor/83722
19674 * gcc.c (try_generate_repro): Pass
19675 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19676 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19677 do_report_bug.
19678
19679 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19680 Kito Cheng <kito.cheng@gmail.com>
19681
19682 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19683 (riscv_leaf_function_p): Delete.
19684 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19685
19686 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19687
19688 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19689 function.
19690 (do_ifelse): New function.
19691 (do_isel): New function.
19692 (do_sub3): New function.
19693 (do_add3): New function.
19694 (do_load_mask_compare): New function.
19695 (do_overlap_load_compare): New function.
19696 (expand_compare_loop): New function.
19697 (expand_block_compare): Call expand_compare_loop() when appropriate.
19698 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19699 option description.
19700 (-mblock-compare-inline-loop-limit): New option.
19701
19702 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19703
19704 PR target/83677
19705 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19706 Reverse order of second and third operands in first alternative.
19707 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19708 of first and second elements in UNSPEC_VPERMR vector.
19709 (altivec_expand_vec_perm_le): Likewise.
19710
19711 2018-01-08 Jeff Law <law@redhat.com>
19712
19713 PR rtl-optimizatin/81308
19714 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19715 (process_switch): If group_case_labels makes a change, then set
19716 cfg_altered.
19717 (pass_convert_switch::execute): If a switch is converted, then
19718 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19719
19720 PR rtl-optimization/81308
19721 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19722 splitting insns.
19723
19724 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19725
19726 PR target/83663 - Revert r255946
19727 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19728 generation for cases where splatting a value is not useful.
19729 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19730 across a vec_duplicate and a paradoxical subreg forming a vector
19731 mode to a vec_concat.
19732
19733 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19734
19735 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19736 -march=armv8.3-a variants.
19737 * config/arm/t-multilib: Likewise.
19738 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19739
19740 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19741
19742 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19743 to generate rtl.
19744 (cceq_ior_compare_complement): Give it a name so I can use it, and
19745 change boolean_or_operator predicate to boolean_operator so it can
19746 be used to generate a crand.
19747 (eqne): New code iterator.
19748 (bd/bd_neg): New code_attrs.
19749 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19750 a single define_insn.
19751 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19752 decrement (bdnzt/bdnzf/bdzt/bdzf).
19753 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19754 with the new names of the branch decrement patterns, and added the
19755 names of the branch decrement conditional patterns.
19756
19757 2018-01-08 Richard Biener <rguenther@suse.de>
19758
19759 PR tree-optimization/83563
19760 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19761 cache.
19762
19763 2018-01-08 Richard Biener <rguenther@suse.de>
19764
19765 PR middle-end/83713
19766 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19767
19768 2018-01-08 Richard Biener <rguenther@suse.de>
19769
19770 PR tree-optimization/83685
19771 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19772 references to abnormals.
19773
19774 2018-01-08 Richard Biener <rguenther@suse.de>
19775
19776 PR lto/83719
19777 * dwarf2out.c (output_indirect_strings): Handle empty
19778 skeleton_debug_str_hash.
19779 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19780
19781 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19782
19783 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19784 (emit_store_direct): Likewise.
19785 (arc_trampoline_adjust_address): Likewise.
19786 (arc_asm_trampoline_template): New function.
19787 (arc_initialize_trampoline): Use asm_trampoline_template.
19788 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19789 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19790 * config/arc/arc.md (flush_icache): Delete pattern.
19791
19792 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19793
19794 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19795 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19796 munaligned-access.
19797
19798 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19799
19800 PR target/83681
19801 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19802 by not USED_FOR_TARGET.
19803 (make_pass_resolve_sw_modes): Likewise.
19804
19805 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19806
19807 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19808 USED_FOR_TARGET.
19809
19810 2018-01-08 Richard Biener <rguenther@suse.de>
19811
19812 PR middle-end/83580
19813 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19814
19815 2018-01-08 Richard Biener <rguenther@suse.de>
19816
19817 PR middle-end/83517
19818 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19819
19820 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19821
19822 PR middle-end/81897
19823 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19824 basic blocks with a small number of successors.
19825 (convert_control_dep_chain_into_preds): Improve handling of
19826 forwarder blocks.
19827 (dump_predicates): Split apart into...
19828 (dump_pred_chain): ...here...
19829 (dump_pred_info): ...and here.
19830 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19831 (can_chain_union_be_invalidated_p): Improve check for invalidation
19832 of paths.
19833 (uninit_uses_cannot_happen): Avoid unnecessary if
19834 convert_control_dep_chain_into_preds yielded nothing.
19835
19836 2018-01-06 Martin Sebor <msebor@redhat.com>
19837
19838 PR tree-optimization/83640
19839 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19840 subtracting negative offset from size.
19841 (builtin_access::overlap): Adjust offset bounds of the access to fall
19842 within the size of the object if possible.
19843
19844 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19845
19846 PR rtl-optimization/83699
19847 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19848 extract_bit_field_as_subreg to cases in which the extracted
19849 value is also a vector.
19850
19851 * lra-constraints.c (process_alt_operands): Test for the equivalence
19852 substitutions when detecting a possible reload cycle.
19853
19854 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19855
19856 PR debug/83480
19857 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19858 by default if flag_selective_schedling{,2}. Formatting fixes.
19859
19860 PR rtl-optimization/83682
19861 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19862 if it has non-VECTOR_MODE element mode.
19863 (vec_duplicate_p): Likewise.
19864
19865 PR middle-end/83694
19866 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19867 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19868
19869 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19870
19871 PR target/83604
19872 * config/i386/i386-builtin.def
19873 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19874 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19875 Require also OPTION_MASK_ISA_AVX512F in addition to
19876 OPTION_MASK_ISA_GFNI.
19877 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19878 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19879 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19880 to OPTION_MASK_ISA_GFNI.
19881 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19882 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19883 OPTION_MASK_ISA_AVX512BW.
19884 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19885 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19886 addition to OPTION_MASK_ISA_GFNI.
19887 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19888 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19889 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19890 to OPTION_MASK_ISA_GFNI.
19891 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19892 a requirement for all ISAs rather than any of them with a few
19893 exceptions.
19894 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19895 processing.
19896 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19897 bitmasks to be enabled with 3 exceptions, instead of requiring any
19898 enabled ISA with lots of exceptions.
19899 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19900 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19901 Change avx512bw in isa attribute to avx512f.
19902 * config/i386/sgxintrin.h: Add license boilerplate.
19903 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19904 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19905 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19906 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19907 defined.
19908 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19909 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19910 temporarily sse2 rather than sse if not enabled already.
19911
19912 PR target/83604
19913 * config/i386/sse.md (VI248_VLBW): Rename to ...
19914 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19915 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19916 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19917 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19918 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19919 mode iterator instead of VI248_VLBW.
19920
19921 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19922
19923 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19924 (record_modified): Skip clobbers; add debug output.
19925 (param_change_prob): Use sreal frequencies.
19926
19927 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19928
19929 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
19930 punt for user-aligned variables.
19931
19932 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
19933
19934 * tree-chrec.c (chrec_contains_symbols): Return true for
19935 POLY_INT_CST.
19936
19937 2018-01-05 Sudakshina Das <sudi.das@arm.com>
19938
19939 PR target/82439
19940 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
19941 of (x|y) == x for BICS pattern.
19942
19943 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19944
19945 PR tree-optimization/83605
19946 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
19947 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
19948 can throw.
19949
19950 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
19951
19952 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
19953 * config/epiphany/rtems.h: New file.
19954
19955 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19956 Uros Bizjak <ubizjak@gmail.com>
19957
19958 PR target/83554
19959 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
19960 QIreg_operand instead of register_operand predicate.
19961 * config/i386/i386.c (ix86_rop_should_change_byte_p,
19962 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
19963 comments instead of -fmitigate[-_]rop.
19964
19965 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19966
19967 PR bootstrap/81926
19968 * cgraphunit.c (symbol_table::compile): Switch to text_section
19969 before calling assembly_start debug hook.
19970 * run-rtl-passes.c (run_rtl_passes): Likewise.
19971 Include output.h.
19972
19973 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19974
19975 * tree-vrp.c (extract_range_from_binary_expr_1): Check
19976 range_int_cst_p rather than !symbolic_range_p before calling
19977 extract_range_from_multiplicative_op_1.
19978
19979 2018-01-04 Jeff Law <law@redhat.com>
19980
19981 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
19982 redundant test in assertion.
19983
19984 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19985
19986 * doc/rtl.texi: Document machine_mode wrapper classes.
19987
19988 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19989
19990 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
19991 using tree_to_uhwi.
19992
19993 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
19994
19995 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
19996 the VEC_PERM_EXPR fold to fail.
19997
19998 2018-01-04 Jakub Jelinek <jakub@redhat.com>
19999
20000 PR debug/83585
20001 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20002 to switched_sections.
20003
20004 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20005
20006 PR target/83680
20007 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20008 test for d.testing.
20009
20010 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20011
20012 PR target/83387
20013 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20014 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20015
20016 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20017
20018 PR debug/83666
20019 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20020 is BLKmode and bitpos not zero or mode change is needed.
20021
20022 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20023
20024 PR target/83675
20025 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20026 TARGET_VIS2.
20027
20028 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20029
20030 PR target/83628
20031 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20032 instead of MULT rtx. Update all corresponding splitters.
20033 (*saddl_se): Ditto.
20034 (*ssub<modesuffix>): Ditto.
20035 (*ssubl_se): Ditto.
20036 (*cmp_sadd_di): Update split patterns.
20037 (*cmp_sadd_si): Ditto.
20038 (*cmp_sadd_sidi): Ditto.
20039 (*cmp_ssub_di): Ditto.
20040 (*cmp_ssub_si): Ditto.
20041 (*cmp_ssub_sidi): Ditto.
20042 * config/alpha/predicates.md (const23_operand): New predicate.
20043 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20044 Look for ASHIFT, not MULT inner operand.
20045 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20046
20047 2018-01-04 Martin Liska <mliska@suse.cz>
20048
20049 PR gcov-profile/83669
20050 * gcov.c (output_intermediate_file): Add version to intermediate
20051 gcov file.
20052 * doc/gcov.texi: Document new field 'version' in intermediate
20053 file format. Fix location of '-k' option of gcov command.
20054
20055 2018-01-04 Martin Liska <mliska@suse.cz>
20056
20057 PR ipa/82352
20058 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20059
20060 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20061
20062 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20063
20064 2018-01-03 Martin Sebor <msebor@redhat.com>
20065
20066 PR tree-optimization/83655
20067 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20068 checking calls with invalid arguments.
20069
20070 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20071
20072 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20073 (vectorizable_mask_load_store): Delete.
20074 (vectorizable_call): Return false for masked loads and stores.
20075 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20076 instead of gimple_assign_rhs1.
20077 (vectorizable_load): Handle IFN_MASK_LOAD.
20078 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20079
20080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20081
20082 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20083 split out from..,
20084 (vectorizable_mask_load_store): ...here.
20085 (vectorizable_load): ...and here.
20086
20087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20088
20089 * tree-vect-stmts.c (vect_build_all_ones_mask)
20090 (vect_build_zero_merge_argument): New functions, split out from...
20091 (vectorizable_load): ...here.
20092
20093 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20094
20095 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20096 split out from...
20097 (vectorizable_mask_load_store): ...here.
20098 (vectorizable_store): ...and here.
20099
20100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20101
20102 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20103 split out from...
20104 (vectorizable_mask_load_store): ...here.
20105
20106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20107
20108 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20109 (vect_model_store_cost): Take a vec_load_store_type instead of a
20110 vect_def_type.
20111 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20112 (vect_model_store_cost): Take a vec_load_store_type instead of a
20113 vect_def_type.
20114 (vectorizable_mask_load_store): Update accordingly.
20115 (vectorizable_store): Likewise.
20116 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20117
20118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20119
20120 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20121 IFN_MASK_LOAD calls here rather than...
20122 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20123
20124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20125 Alan Hayward <alan.hayward@arm.com>
20126 David Sherwood <david.sherwood@arm.com>
20127
20128 * expmed.c (extract_bit_field_1): For vector extracts,
20129 fall back to extract_bit_field_as_subreg if vec_extract
20130 isn't available.
20131
20132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20133 Alan Hayward <alan.hayward@arm.com>
20134 David Sherwood <david.sherwood@arm.com>
20135
20136 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20137 they are variable or constant sized.
20138 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20139 slots for constant-sized data.
20140
20141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20142 Alan Hayward <alan.hayward@arm.com>
20143 David Sherwood <david.sherwood@arm.com>
20144
20145 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20146 handling COND_EXPRs with boolean comparisons, try to find a better
20147 basis for the mask type than the boolean itself.
20148
20149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20150
20151 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20152 is calculated and how it can be overridden.
20153 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20154 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20155 if defined.
20156 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20157 if nonzero.
20158
20159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20160 Alan Hayward <alan.hayward@arm.com>
20161 David Sherwood <david.sherwood@arm.com>
20162
20163 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20164 Remove the mode argument.
20165 (aarch64_simd_valid_immediate): Remove the mode and inverse
20166 arguments.
20167 * config/aarch64/iterators.md (bitsize): New iterator.
20168 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20169 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20170 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20171 aarch64_simd_valid_immediate.
20172 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20173 (aarch64_reg_or_bic_imm): Likewise.
20174 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20175 with an insn_type enum and msl with a modifier_type enum.
20176 Replace element_width with a scalar_mode. Change the shift
20177 to unsigned int. Add constructors for scalar_float_mode and
20178 scalar_int_mode elements.
20179 (aarch64_vect_float_const_representable_p): Delete.
20180 (aarch64_can_const_movi_rtx_p)
20181 (aarch64_simd_scalar_immediate_valid_for_move)
20182 (aarch64_simd_make_constant): Update call to
20183 aarch64_simd_valid_immediate.
20184 (aarch64_advsimd_valid_immediate_hs): New function.
20185 (aarch64_advsimd_valid_immediate): Likewise.
20186 (aarch64_simd_valid_immediate): Remove mode and inverse
20187 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20188 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20189 and aarch64_float_const_representable_p on the result.
20190 (aarch64_output_simd_mov_immediate): Remove mode argument.
20191 Update call to aarch64_simd_valid_immediate and use of
20192 simd_immediate_info.
20193 (aarch64_output_scalar_simd_mov_immediate): Update call
20194 accordingly.
20195
20196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20197 Alan Hayward <alan.hayward@arm.com>
20198 David Sherwood <david.sherwood@arm.com>
20199
20200 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20201 (mode_nunits): Likewise CONST_MODE_NUNITS.
20202 * machmode.def (ADJUST_NUNITS): Document.
20203 * genmodes.c (mode_data::need_nunits_adj): New field.
20204 (blank_mode): Update accordingly.
20205 (adj_nunits): New variable.
20206 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20207 parameter.
20208 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20209 listed in adj_nunits.
20210 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20211 listed in adj_nunits. Don't emit case statements for such modes.
20212 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20213 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20214 nothing if adj_nunits is nonnull.
20215 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20216 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20217 (emit_mode_fbit): Update use of print_maybe_const_decl.
20218 (emit_move_size): Likewise. Treat the array as non-const
20219 if adj_nunits.
20220 (emit_mode_adjustments): Handle adj_nunits.
20221
20222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20223
20224 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20225 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20226 (VECTOR_MODES): Use it.
20227 (make_vector_modes): Take the prefix as an argument.
20228
20229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20230 Alan Hayward <alan.hayward@arm.com>
20231 David Sherwood <david.sherwood@arm.com>
20232
20233 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20234 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20235 for MODE_VECTOR_BOOL.
20236 * machmode.def (VECTOR_BOOL_MODE): Document.
20237 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20238 (make_vector_bool_mode): New function.
20239 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20240 MODE_VECTOR_BOOL.
20241 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20242 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20243 Likewise.
20244 * stor-layout.c (int_mode_for_mode): Likewise.
20245 * tree.c (build_vector_type_for_mode): Likewise.
20246 * varasm.c (output_constant_pool_2): Likewise.
20247 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20248 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20249 for MODE_VECTOR_BOOL.
20250 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20251 of mode class checks.
20252 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20253 instead of a list of mode class checks.
20254 (expand_vector_scalar_condition): Likewise.
20255 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20256
20257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20258 Alan Hayward <alan.hayward@arm.com>
20259 David Sherwood <david.sherwood@arm.com>
20260
20261 * machmode.h (mode_size): Change from unsigned short to
20262 poly_uint16_pod.
20263 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20264 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20265 or if measurement_type is not polynomial.
20266 (fixed_size_mode::includes_p): Check for constant-sized modes.
20267 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20268 return a poly_uint16 rather than an unsigned short.
20269 (emit_mode_size): Change the type of mode_size from unsigned short
20270 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20271 (emit_mode_adjustments): Cope with polynomial vector sizes.
20272 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20273 for GET_MODE_SIZE.
20274 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20275 for GET_MODE_SIZE.
20276 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20277 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20278 * caller-save.c (setup_save_areas): Likewise.
20279 (replace_reg_with_saved_mem): Likewise.
20280 * calls.c (emit_library_call_value_1): Likewise.
20281 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20282 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20283 (gen_lowpart_for_combine): Likewise.
20284 * convert.c (convert_to_integer_1): Likewise.
20285 * cse.c (equiv_constant, cse_insn): Likewise.
20286 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20287 (cselib_subst_to_values): Likewise.
20288 * dce.c (word_dce_process_block): Likewise.
20289 * df-problems.c (df_word_lr_mark_ref): Likewise.
20290 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20291 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20292 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20293 (rtl_for_decl_location): Likewise.
20294 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20295 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20296 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20297 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20298 (expand_expr_real_1): Likewise.
20299 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20300 (pad_below): Likewise.
20301 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20302 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20303 * ira.c (get_subreg_tracking_sizes): Likewise.
20304 * ira-build.c (ira_create_allocno_objects): Likewise.
20305 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20306 (ira_sort_regnos_for_alter_reg): Likewise.
20307 * ira-costs.c (record_operand_costs): Likewise.
20308 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20309 (resolve_simple_move): Likewise.
20310 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20311 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20312 (lra_constraints): Likewise.
20313 (CONST_POOL_OK_P): Reject variable-sized modes.
20314 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20315 (add_pseudo_to_slot, lra_spill): Likewise.
20316 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20317 * optabs-query.c (get_best_extraction_insn): Likewise.
20318 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20319 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20320 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20321 * recog.c (offsettable_address_addr_space_p): Likewise.
20322 * regcprop.c (maybe_mode_change): Likewise.
20323 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20324 * regrename.c (build_def_use): Likewise.
20325 * regstat.c (dump_reg_info): Likewise.
20326 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20327 (find_reloads, find_reloads_subreg_address): Likewise.
20328 * reload1.c (eliminate_regs_1): Likewise.
20329 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20330 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20331 (simplify_binary_operation_1, simplify_subreg): Likewise.
20332 * targhooks.c (default_function_arg_padding): Likewise.
20333 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20334 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20335 (verify_gimple_assign_ternary): Likewise.
20336 * tree-inline.c (estimate_move_cost): Likewise.
20337 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20338 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20339 (get_address_cost_ainc): Likewise.
20340 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20341 (vect_supportable_dr_alignment): Likewise.
20342 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20343 (vectorizable_reduction): Likewise.
20344 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20345 (vectorizable_operation, vectorizable_load): Likewise.
20346 * tree.c (build_same_sized_truth_vector_type): Likewise.
20347 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20348 * var-tracking.c (emit_note_insn_var_location): Likewise.
20349 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20350 (ADDR_VEC_ALIGN): Likewise.
20351
20352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20353 Alan Hayward <alan.hayward@arm.com>
20354 David Sherwood <david.sherwood@arm.com>
20355
20356 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20357 unsigned short.
20358 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20359 or if measurement_type is polynomial.
20360 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20361 * combine.c (make_extraction): Likewise.
20362 * dse.c (find_shift_sequence): Likewise.
20363 * dwarf2out.c (mem_loc_descriptor): Likewise.
20364 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20365 (extract_bit_field, extract_low_bits): Likewise.
20366 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20367 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20368 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20369 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20370 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20371 * reload.c (find_reloads): Likewise.
20372 * reload1.c (alter_reg): Likewise.
20373 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20374 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20375 * tree-if-conv.c (predicate_mem_writes): Likewise.
20376 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20377 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20378 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20379 * valtrack.c (dead_debug_insert_temp): Likewise.
20380 * varasm.c (mergeable_constant_section): Likewise.
20381 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20382
20383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20384 Alan Hayward <alan.hayward@arm.com>
20385 David Sherwood <david.sherwood@arm.com>
20386
20387 * expr.c (expand_assignment): Cope with polynomial mode sizes
20388 when assigning to a CONCAT.
20389
20390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20391 Alan Hayward <alan.hayward@arm.com>
20392 David Sherwood <david.sherwood@arm.com>
20393
20394 * machmode.h (mode_precision): Change from unsigned short to
20395 poly_uint16_pod.
20396 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20397 short.
20398 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20399 or if measurement_type is not polynomial.
20400 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20401 in which the mode is already known to be a scalar_int_mode.
20402 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20403 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20404 initializer.
20405 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20406 for GET_MODE_PRECISION.
20407 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20408 for GET_MODE_PRECISION.
20409 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20410 as polynomial.
20411 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20412 (expand_field_assignment, make_extraction): Likewise.
20413 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20414 (get_last_value): Likewise.
20415 * convert.c (convert_to_integer_1): Likewise.
20416 * cse.c (cse_insn): Likewise.
20417 * expr.c (expand_expr_real_1): Likewise.
20418 * lra-constraints.c (simplify_operand_subreg): Likewise.
20419 * optabs-query.c (can_atomic_load_p): Likewise.
20420 * optabs.c (expand_atomic_load): Likewise.
20421 (expand_atomic_store): Likewise.
20422 * ree.c (combine_reaching_defs): Likewise.
20423 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20424 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20425 * tree.h (type_has_mode_precision_p): Likewise.
20426 * ubsan.c (instrument_si_overflow): Likewise.
20427
20428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20429 Alan Hayward <alan.hayward@arm.com>
20430 David Sherwood <david.sherwood@arm.com>
20431
20432 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20433 polynomial numbers of units.
20434 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20435 (valid_vector_subparts_p): New function.
20436 (build_vector_type): Remove temporary shim and take the number
20437 of units as a poly_uint64 rather than an int.
20438 (build_opaque_vector_type): Take the number of units as a
20439 poly_uint64 rather than an int.
20440 * tree.c (build_vector_from_ctor): Handle polynomial
20441 TYPE_VECTOR_SUBPARTS.
20442 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20443 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20444 (build_vector_from_val): If the number of units is variable,
20445 use build_vec_duplicate_cst for constant operands and
20446 VEC_DUPLICATE_EXPR otherwise.
20447 (make_vector_type): Remove temporary is_constant ().
20448 (build_vector_type, build_opaque_vector_type): Take the number of
20449 units as a poly_uint64 rather than an int.
20450 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20451 VECTOR_CST_NELTS.
20452 * cfgexpand.c (expand_debug_expr): Likewise.
20453 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20454 (store_constructor, expand_expr_real_1): Likewise.
20455 (const_scalar_mask_from_tree): Likewise.
20456 * fold-const-call.c (fold_const_reduction): Likewise.
20457 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20458 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20459 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20460 (fold_relational_const): Likewise.
20461 (native_interpret_vector): Likewise. Change the size from an
20462 int to an unsigned int.
20463 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20464 TYPE_VECTOR_SUBPARTS.
20465 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20466 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20467 duplicating a non-constant operand into a variable-length vector.
20468 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20469 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20470 * ipa-icf.c (sem_variable::equals): Likewise.
20471 * match.pd: Likewise.
20472 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20473 * print-tree.c (print_node): Likewise.
20474 * stor-layout.c (layout_type): Likewise.
20475 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20476 * tree-cfg.c (verify_gimple_comparison): Likewise.
20477 (verify_gimple_assign_binary): Likewise.
20478 (verify_gimple_assign_ternary): Likewise.
20479 (verify_gimple_assign_single): Likewise.
20480 * tree-pretty-print.c (dump_generic_node): Likewise.
20481 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20482 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20483 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20484 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20485 (vect_shift_permute_load_chain): Likewise.
20486 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20487 (expand_vector_condition, optimize_vector_constructor): Likewise.
20488 (lower_vec_perm, get_compute_type): Likewise.
20489 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20490 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20491 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20492 (vect_recog_mask_conversion_pattern): Likewise.
20493 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20494 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20495 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20496 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20497 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20498 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20499 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20500 (supportable_widening_operation): Likewise.
20501 (supportable_narrowing_operation): Likewise.
20502 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20503 Likewise.
20504 * varasm.c (output_constant): Likewise.
20505
20506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20507 Alan Hayward <alan.hayward@arm.com>
20508 David Sherwood <david.sherwood@arm.com>
20509
20510 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20511 so that both the length == 3 and length != 3 cases set up their
20512 own permute vectors. Add comments explaining why we know the
20513 number of elements is constant.
20514 (vect_permute_load_chain): Likewise.
20515
20516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20517 Alan Hayward <alan.hayward@arm.com>
20518 David Sherwood <david.sherwood@arm.com>
20519
20520 * machmode.h (mode_nunits): Change from unsigned char to
20521 poly_uint16_pod.
20522 (ONLY_FIXED_SIZE_MODES): New macro.
20523 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20524 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20525 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20526 New typedefs.
20527 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20528 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20529 or if measurement_type is not polynomial.
20530 * genmodes.c (ZERO_COEFFS): New macro.
20531 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20532 poly_uint16.
20533 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20534 Use ZERO_COEFFS when emitting initializers.
20535 * data-streamer.h (bp_pack_poly_value): New function.
20536 (bp_unpack_poly_value): Likewise.
20537 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20538 for GET_MODE_NUNITS.
20539 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20540 for GET_MODE_NUNITS.
20541 * tree.c (make_vector_type): Remove temporary shim and make
20542 the real function take the number of units as a poly_uint64
20543 rather than an int.
20544 (build_vector_type_for_mode): Handle polynomial nunits.
20545 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20546 * emit-rtl.c (const_vec_series_p_1): Likewise.
20547 (gen_rtx_CONST_VECTOR): Likewise.
20548 * fold-const.c (test_vec_duplicate_folding): Likewise.
20549 * genrecog.c (validate_pattern): Likewise.
20550 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20551 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20552 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20553 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20554 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20555 * rtlanal.c (subreg_get_info): Likewise.
20556 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20557 (vect_grouped_load_supported): Likewise.
20558 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20559 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20560 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20561 (simplify_const_unary_operation, simplify_binary_operation_1)
20562 (simplify_const_binary_operation, simplify_ternary_operation)
20563 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20564 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20565 instead of CONST_VECTOR_NUNITS.
20566 * varasm.c (output_constant_pool_2): Likewise.
20567 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20568 explicit-encoded elements in the XVEC for variable-length vectors.
20569
20570 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20571
20572 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20573
20574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20575 Alan Hayward <alan.hayward@arm.com>
20576 David Sherwood <david.sherwood@arm.com>
20577
20578 * coretypes.h (fixed_size_mode): Declare.
20579 (fixed_size_mode_pod): New typedef.
20580 * builtins.h (target_builtins::x_apply_args_mode)
20581 (target_builtins::x_apply_result_mode): Change type to
20582 fixed_size_mode_pod.
20583 * builtins.c (apply_args_size, apply_result_size, result_vector)
20584 (expand_builtin_apply_args_1, expand_builtin_apply)
20585 (expand_builtin_return): Update accordingly.
20586
20587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20588
20589 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20590 * cselib.c (cselib_hash_rtx): Likewise.
20591 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20592 CONST_VECTOR encoding.
20593
20594 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20595 Jeff Law <law@redhat.com>
20596
20597 PR target/83641
20598 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20599 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20600 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20601 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20602
20603 PR target/83641
20604 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20605 explicitly probe *sp in a noreturn function if there were any callee
20606 register saves or frame pointer is needed.
20607
20608 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20609
20610 PR debug/83621
20611 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20612 BLKmode for ternary, binary or unary expressions.
20613
20614 PR debug/83645
20615 * var-tracking.c (delete_vta_debug_insn): New inline function.
20616 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20617 insns from get_insns () to NULL instead of each bb separately.
20618 Use delete_vta_debug_insn. No longer static.
20619 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20620 delete_vta_debug_insns callers.
20621 * rtl.h (delete_vta_debug_insns): Declare.
20622 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20623 instead of variable_tracking_main.
20624
20625 2018-01-03 Martin Sebor <msebor@redhat.com>
20626
20627 PR tree-optimization/83603
20628 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20629 arguments past the endof the argument list in functions declared
20630 without a prototype.
20631 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20632 Avoid checking when arguments are null.
20633
20634 2018-01-03 Martin Sebor <msebor@redhat.com>
20635
20636 PR c/83559
20637 * doc/extend.texi (attribute const): Fix a typo.
20638 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20639 issuing -Wsuggest-attribute for void functions.
20640
20641 2018-01-03 Martin Sebor <msebor@redhat.com>
20642
20643 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20644 offset_int::from instead of wide_int::to_shwi.
20645 (maybe_diag_overlap): Remove assertion.
20646 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20647 * gimple-ssa-sprintf.c (format_directive): Same.
20648 (parse_directive): Same.
20649 (sprintf_dom_walker::compute_format_length): Same.
20650 (try_substitute_return_value): Same.
20651
20652 2018-01-03 Jeff Law <law@redhat.com>
20653
20654 PR middle-end/83654
20655 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20656 non-constant residual for zero at runtime and avoid probing in
20657 that case. Reorganize code for trailing problem to mirror handling
20658 of the residual.
20659
20660 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20661
20662 PR tree-optimization/83501
20663 * tree-ssa-strlen.c (get_string_cst): New.
20664 (handle_char_store): Call get_string_cst.
20665
20666 2018-01-03 Martin Liska <mliska@suse.cz>
20667
20668 PR tree-optimization/83593
20669 * tree-ssa-strlen.c: Include tree-cfg.h.
20670 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20671 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20672 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20673 to false.
20674 (strlen_dom_walker::before_dom_children): Call
20675 gimple_purge_dead_eh_edges. Dump tranformation with details
20676 dump flags.
20677 (strlen_dom_walker::before_dom_children): Update call by adding
20678 new argument cleanup_eh.
20679 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20680
20681 2018-01-03 Martin Liska <mliska@suse.cz>
20682
20683 PR ipa/83549
20684 * cif-code.def (VARIADIC_THUNK): New enum value.
20685 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20686 thunks.
20687
20688 2018-01-03 Jan Beulich <jbeulich@suse.com>
20689
20690 * sse.md (mov<mode>_internal): Tighten condition for when to use
20691 vmovdqu<ssescalarsize> for TI and OI modes.
20692
20693 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20694
20695 Update copyright years.
20696
20697 2018-01-03 Martin Liska <mliska@suse.cz>
20698
20699 PR ipa/83594
20700 * ipa-visibility.c (function_and_variable_visibility): Skip
20701 functions with noipa attribure.
20702
20703 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20704
20705 * gcc.c (process_command): Update copyright notice dates.
20706 * gcov-dump.c (print_version): Ditto.
20707 * gcov.c (print_version): Ditto.
20708 * gcov-tool.c (print_version): Ditto.
20709 * gengtype.c (create_file): Ditto.
20710 * doc/cpp.texi: Bump @copying's copyright year.
20711 * doc/cppinternals.texi: Ditto.
20712 * doc/gcc.texi: Ditto.
20713 * doc/gccint.texi: Ditto.
20714 * doc/gcov.texi: Ditto.
20715 * doc/install.texi: Ditto.
20716 * doc/invoke.texi: Ditto.
20717
20718 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20719
20720 * vector-builder.h (vector_builder::m_full_nelts): Change from
20721 unsigned int to poly_uint64.
20722 (vector_builder::full_nelts): Update prototype accordingly.
20723 (vector_builder::new_vector): Likewise.
20724 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20725 (vector_builder::operator ==): Likewise.
20726 (vector_builder::finalize): Likewise.
20727 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20728 Take the number of elements as a poly_uint64 rather than an
20729 unsigned int.
20730 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20731 from unsigned int to poly_uint64.
20732 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20733 (vec_perm_indices::new_vector): Likewise.
20734 (vec_perm_indices::length): Likewise.
20735 (vec_perm_indices::nelts_per_input): Likewise.
20736 (vec_perm_indices::input_nelts): Likewise.
20737 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20738 number of elements per input as a poly_uint64 rather than an
20739 unsigned int. Use the original encoding for variable-length
20740 vectors, rather than clamping each individual element.
20741 For the second and subsequent elements in each pattern,
20742 clamp the step and base before clamping their sum.
20743 (vec_perm_indices::series_p): Handle polynomial element counts.
20744 (vec_perm_indices::all_in_range_p): Likewise.
20745 (vec_perm_indices_to_tree): Likewise.
20746 (vec_perm_indices_to_rtx): Likewise.
20747 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20748 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20749 (tree_vector_builder::new_binary_operation): Handle polynomial
20750 element counts. Return false if we need to know the number
20751 of elements at compile time.
20752 * fold-const.c (fold_vec_perm): Punt if the number of elements
20753 isn't known at compile time.
20754
20755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20756
20757 * vec-perm-indices.h (vec_perm_builder): Change element type
20758 from HOST_WIDE_INT to poly_int64.
20759 (vec_perm_indices::element_type): Update accordingly.
20760 (vec_perm_indices::clamp): Handle polynomial element_types.
20761 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20762 (vec_perm_indices::all_in_range_p): Likewise.
20763 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20764 than shwi trees.
20765 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20766 polynomial vec_perm_indices element types.
20767 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20768 * fold-const.c (fold_vec_perm): Likewise.
20769 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20770 * tree-vect-generic.c (lower_vec_perm): Likewise.
20771 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20772 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20773 element type to HOST_WIDE_INT.
20774
20775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20776 Alan Hayward <alan.hayward@arm.com>
20777 David Sherwood <david.sherwood@arm.com>
20778
20779 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20780 rather than an int. Use plus_constant.
20781 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20782 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20783
20784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20785 Alan Hayward <alan.hayward@arm.com>
20786 David Sherwood <david.sherwood@arm.com>
20787
20788 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20789 a HOST_WIDE_INT to a poly_int64.
20790
20791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20792 Alan Hayward <alan.hayward@arm.com>
20793 David Sherwood <david.sherwood@arm.com>
20794
20795 * calls.c (load_register_parameters): Cope with polynomial
20796 mode sizes. Require a constant size for BLKmode parameters
20797 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20798 forces a parameter to be padded at the lsb end in order to
20799 fill a complete number of words, require the parameter size
20800 to be ordered wrt UNITS_PER_WORD.
20801
20802 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20803 Alan Hayward <alan.hayward@arm.com>
20804 David Sherwood <david.sherwood@arm.com>
20805
20806 * reload1.c (spill_stack_slot_width): Change element type
20807 from unsigned int to poly_uint64_pod.
20808 (alter_reg): Treat mode sizes as polynomial.
20809
20810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20811 Alan Hayward <alan.hayward@arm.com>
20812 David Sherwood <david.sherwood@arm.com>
20813
20814 * reload.c (complex_word_subreg_p): New function.
20815 (reload_inner_reg_of_subreg, push_reload): Use it.
20816
20817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20818 Alan Hayward <alan.hayward@arm.com>
20819 David Sherwood <david.sherwood@arm.com>
20820
20821 * lra-constraints.c (process_alt_operands): Reject matched
20822 operands whose sizes aren't ordered.
20823 (match_reload): Refer to this check here.
20824
20825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20826 Alan Hayward <alan.hayward@arm.com>
20827 David Sherwood <david.sherwood@arm.com>
20828
20829 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20830 that the mode size is in the set {1, 2, 4, 8, 16}.
20831
20832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20833 Alan Hayward <alan.hayward@arm.com>
20834 David Sherwood <david.sherwood@arm.com>
20835
20836 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20837 Use plus_constant instead of gen_rtx_PLUS.
20838
20839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20840 Alan Hayward <alan.hayward@arm.com>
20841 David Sherwood <david.sherwood@arm.com>
20842
20843 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20844 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20845 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20846 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20847 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20848 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20849 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20850 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20851 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20852 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20853 a poly_int64.
20854 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20855 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20856 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20857 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20858 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20859 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20860 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20861 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20862 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20863 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20864 function.
20865 * expr.c (emit_move_resolve_push): Treat the input and result
20866 of PUSH_ROUNDING as a poly_int64.
20867 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20868 (emit_push_insn): Likewise.
20869 * lra-eliminations.c (mark_not_eliminable): Likewise.
20870 * recog.c (push_operand): Likewise.
20871 * reload1.c (elimination_effects): Likewise.
20872 * rtlanal.c (nonzero_bits1): Likewise.
20873 * calls.c (store_one_arg): Likewise. Require the padding to be
20874 known at compile time.
20875
20876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20877 Alan Hayward <alan.hayward@arm.com>
20878 David Sherwood <david.sherwood@arm.com>
20879
20880 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20881 Use plus_constant instead of gen_rtx_PLUS.
20882
20883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20884 Alan Hayward <alan.hayward@arm.com>
20885 David Sherwood <david.sherwood@arm.com>
20886
20887 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20888 rather than an int.
20889
20890 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20891 Alan Hayward <alan.hayward@arm.com>
20892 David Sherwood <david.sherwood@arm.com>
20893
20894 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20895 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20896 via stack temporaries. Treat the mode size as polynomial too.
20897
20898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20899 Alan Hayward <alan.hayward@arm.com>
20900 David Sherwood <david.sherwood@arm.com>
20901
20902 * expr.c (expand_expr_real_2): When handling conversions involving
20903 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20904 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20905 as a poly_uint64 too.
20906
20907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20908 Alan Hayward <alan.hayward@arm.com>
20909 David Sherwood <david.sherwood@arm.com>
20910
20911 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
20912
20913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20914 Alan Hayward <alan.hayward@arm.com>
20915 David Sherwood <david.sherwood@arm.com>
20916
20917 * combine.c (can_change_dest_mode): Handle polynomial
20918 REGMODE_NATURAL_SIZE.
20919 * expmed.c (store_bit_field_1): Likewise.
20920 * expr.c (store_constructor): Likewise.
20921 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20922 and polynomial REGMODE_NATURAL_SIZE.
20923 (gen_lowpart_common): Likewise.
20924 * reginfo.c (record_subregs_of_mode): Likewise.
20925 * rtlanal.c (read_modify_subreg_p): Likewise.
20926
20927 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20928 Alan Hayward <alan.hayward@arm.com>
20929 David Sherwood <david.sherwood@arm.com>
20930
20931 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
20932 numbers of elements.
20933
20934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20935 Alan Hayward <alan.hayward@arm.com>
20936 David Sherwood <david.sherwood@arm.com>
20937
20938 * match.pd: Cope with polynomial numbers of vector elements.
20939
20940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20941 Alan Hayward <alan.hayward@arm.com>
20942 David Sherwood <david.sherwood@arm.com>
20943
20944 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
20945 in a POINTER_PLUS_EXPR.
20946
20947 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20948 Alan Hayward <alan.hayward@arm.com>
20949 David Sherwood <david.sherwood@arm.com>
20950
20951 * omp-simd-clone.c (simd_clone_subparts): New function.
20952 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
20953 (ipa_simd_modify_function_body): Likewise.
20954
20955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20956 Alan Hayward <alan.hayward@arm.com>
20957 David Sherwood <david.sherwood@arm.com>
20958
20959 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
20960 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
20961 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
20962 (expand_vector_condition, vector_element): Likewise.
20963 (subparts_gt): New function.
20964 (get_compute_type): Use subparts_gt.
20965 (count_type_subparts): Delete.
20966 (expand_vector_operations_1): Use subparts_gt instead of
20967 count_type_subparts.
20968
20969 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20970 Alan Hayward <alan.hayward@arm.com>
20971 David Sherwood <david.sherwood@arm.com>
20972
20973 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
20974 (vect_compile_time_alias): ...this new function. Do the calculation
20975 on poly_ints rather than trees.
20976 (vect_prune_runtime_alias_test_list): Update call accordingly.
20977
20978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20979 Alan Hayward <alan.hayward@arm.com>
20980 David Sherwood <david.sherwood@arm.com>
20981
20982 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
20983 numbers of units.
20984 (vect_schedule_slp_instance): Likewise.
20985
20986 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20987 Alan Hayward <alan.hayward@arm.com>
20988 David Sherwood <david.sherwood@arm.com>
20989
20990 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
20991 constant and extern definitions for variable-length vectors.
20992 (vect_get_constant_vectors): Note that the number of units
20993 is known to be constant.
20994
20995 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20996 Alan Hayward <alan.hayward@arm.com>
20997 David Sherwood <david.sherwood@arm.com>
20998
20999 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21000 of units as polynomial. Choose between WIDE and NARROW based
21001 on multiple_p.
21002
21003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21004 Alan Hayward <alan.hayward@arm.com>
21005 David Sherwood <david.sherwood@arm.com>
21006
21007 * tree-vect-stmts.c (simd_clone_subparts): New function.
21008 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21009
21010 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21011 Alan Hayward <alan.hayward@arm.com>
21012 David Sherwood <david.sherwood@arm.com>
21013
21014 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21015 vectors as polynomial. Use build_index_vector for
21016 IFN_GOMP_SIMD_LANE.
21017
21018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21019 Alan Hayward <alan.hayward@arm.com>
21020 David Sherwood <david.sherwood@arm.com>
21021
21022 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21023 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21024 for variable-length vectors.
21025 (vectorizable_mask_load_store): Treat the number of units as
21026 polynomial, asserting that it is constant if the condition has
21027 already been enforced.
21028 (vectorizable_store, vectorizable_load): Likewise.
21029
21030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21031 Alan Hayward <alan.hayward@arm.com>
21032 David Sherwood <david.sherwood@arm.com>
21033
21034 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21035 of units as polynomial. Punt if we can't tell at compile time
21036 which vector contains the final result.
21037
21038 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21039 Alan Hayward <alan.hayward@arm.com>
21040 David Sherwood <david.sherwood@arm.com>
21041
21042 * tree-vect-loop.c (vectorizable_induction): Treat the number
21043 of units as polynomial. Punt on SLP inductions. Use an integer
21044 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21045 cast of such a series for variable-length floating-point
21046 reductions.
21047
21048 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21049 Alan Hayward <alan.hayward@arm.com>
21050 David Sherwood <david.sherwood@arm.com>
21051
21052 * tree.h (build_index_vector): Declare.
21053 * tree.c (build_index_vector): New function.
21054 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21055 of units as polynomial, forcibly converting it to a constant if
21056 vectorizable_reduction has already enforced the condition.
21057 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21058 to create a {1,2,3,...} vector.
21059 (vectorizable_reduction): Treat the number of units as polynomial.
21060 Choose vectype_in based on the largest scalar element size rather
21061 than the smallest number of units. Enforce the restrictions
21062 relied on above.
21063
21064 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21065 Alan Hayward <alan.hayward@arm.com>
21066 David Sherwood <david.sherwood@arm.com>
21067
21068 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21069 number of units as polynomial.
21070
21071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21072 Alan Hayward <alan.hayward@arm.com>
21073 David Sherwood <david.sherwood@arm.com>
21074
21075 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21076 * target.def (autovectorize_vector_sizes): Return the vector sizes
21077 by pointer, using vector_sizes rather than a bitmask.
21078 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21079 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21080 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21081 Likewise.
21082 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21083 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21084 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21085 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21086 * omp-general.c (omp_max_vf): Likewise.
21087 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21088 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21089 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21090 * tree-vect-slp.c (vect_slp_bb): Likewise.
21091 * doc/tm.texi: Regenerate.
21092 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21093 to a poly_uint64.
21094 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21095 the vector size as a poly_uint64 rather than an unsigned int.
21096 (current_vector_size): Change from an unsigned int to a poly_uint64.
21097 (get_vectype_for_scalar_type): Update accordingly.
21098 * tree.h (build_truth_vector_type): Take the size and number of
21099 units as a poly_uint64 rather than an unsigned int.
21100 (build_vector_type): Add a temporary overload that takes
21101 the number of units as a poly_uint64 rather than an unsigned int.
21102 * tree.c (make_vector_type): Likewise.
21103 (build_truth_vector_type): Take the number of units as a poly_uint64
21104 rather than an unsigned int.
21105
21106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21107 Alan Hayward <alan.hayward@arm.com>
21108 David Sherwood <david.sherwood@arm.com>
21109
21110 * target.def (get_mask_mode): Take the number of units and length
21111 as poly_uint64s rather than unsigned ints.
21112 * targhooks.h (default_get_mask_mode): Update accordingly.
21113 * targhooks.c (default_get_mask_mode): Likewise.
21114 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21115 * doc/tm.texi: Regenerate.
21116
21117 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21118 Alan Hayward <alan.hayward@arm.com>
21119 David Sherwood <david.sherwood@arm.com>
21120
21121 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21122 * omp-general.c (omp_max_vf): Likewise.
21123 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21124 (expand_omp_simd): Handle polynomial safelen.
21125 * omp-low.c (omplow_simd_context): Add a default constructor.
21126 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21127 (lower_rec_simd_input_clauses): Update accordingly.
21128 (lower_rec_input_clauses): Likewise.
21129
21130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21131 Alan Hayward <alan.hayward@arm.com>
21132 David Sherwood <david.sherwood@arm.com>
21133
21134 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21135 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21136 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21137 (vect_analyze_slp_cost): Likewise.
21138 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21139 (vect_model_load_cost): Likewise.
21140
21141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21142 Alan Hayward <alan.hayward@arm.com>
21143 David Sherwood <david.sherwood@arm.com>
21144
21145 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21146 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21147 from an unsigned int * to a poly_uint64_pod *.
21148 (calculate_unrolling_factor): New function.
21149 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21150
21151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21152 Alan Hayward <alan.hayward@arm.com>
21153 David Sherwood <david.sherwood@arm.com>
21154
21155 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21156 from an unsigned int to a poly_uint64.
21157 (_loop_vec_info::slp_unrolling_factor): Likewise.
21158 (_loop_vec_info::vectorization_factor): Change from an int
21159 to a poly_uint64.
21160 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21161 (vect_get_num_vectors): New function.
21162 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21163 (vect_get_num_copies): Use vect_get_num_vectors.
21164 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21165 to an unsigned int *.
21166 (vect_analyze_data_refs): Change min_vf from an int * to a
21167 poly_uint64 *.
21168 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21169 than an unsigned HOST_WIDE_INT.
21170 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21171 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21172 to an unsigned int *.
21173 (vect_analyze_data_ref_dependences): Likewise.
21174 (vect_compute_data_ref_alignment): Handle polynomial vf.
21175 (vect_enhance_data_refs_alignment): Likewise.
21176 (vect_prune_runtime_alias_test_list): Likewise.
21177 (vect_shift_permute_load_chain): Likewise.
21178 (vect_supportable_dr_alignment): Likewise.
21179 (dependence_distance_ge_vf): Take the vectorization factor as a
21180 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21181 (vect_analyze_data_refs): Change min_vf from an int * to a
21182 poly_uint64 *.
21183 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21184 vfm1 as a poly_uint64 rather than an int. Make the same change
21185 for the returned bound_scalar.
21186 (vect_gen_vector_loop_niters): Handle polynomial vf.
21187 (vect_do_peeling): Likewise. Update call to
21188 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21189 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21190 be constant.
21191 * tree-vect-loop.c (vect_determine_vectorization_factor)
21192 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21193 (vect_get_known_peeling_cost): Likewise.
21194 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21195 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21196 (vect_transform_loop): Likewise. Use the lowest possible VF when
21197 updating the upper bounds of the loop.
21198 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21199 rather than an int.
21200 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21201 polynomial unroll factors.
21202 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21203 (vect_make_slp_decision): Likewise.
21204 (vect_supported_load_permutation_p): Likewise, and polynomial
21205 vf too.
21206 (vect_analyze_slp_cost): Handle polynomial vf.
21207 (vect_slp_analyze_node_operations): Likewise.
21208 (vect_slp_analyze_bb_1): Likewise.
21209 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21210 than an unsigned HOST_WIDE_INT.
21211 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21212 (vectorizable_load): Handle polynomial vf.
21213 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21214 a poly_uint64.
21215 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21216
21217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21218 Alan Hayward <alan.hayward@arm.com>
21219 David Sherwood <david.sherwood@arm.com>
21220
21221 * match.pd: Handle bit operations involving three constants
21222 and try to fold one pair.
21223
21224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21225
21226 * tree-vect-loop-manip.c: Include gimple-fold.h.
21227 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21228 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21229 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21230 Add a path that uses a step of VF instead of 1, but disable it
21231 for now.
21232 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21233 and niters_no_overflow parameters. Update calls to
21234 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21235 Create a new SSA name if the latter choses to use a ste other
21236 than zero, and return it via niters_vector_mult_vf_var.
21237 * tree-vect-loop.c (vect_transform_loop): Update calls to
21238 vect_do_peeling, vect_gen_vector_loop_niters and
21239 slpeel_make_loop_iterate_ntimes.
21240 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21241 (vect_gen_vector_loop_niters): Update declarations after above changes.
21242
21243 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21244
21245 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21246 128-bit round to integer instructions.
21247 (ceil<mode>2): Likewise.
21248 (btrunc<mode>2): Likewise.
21249 (round<mode>2): Likewise.
21250
21251 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21252
21253 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21254 unaligned VSX load/store on P8/P9.
21255 (expand_block_clear): Allow the use of unaligned VSX
21256 load/store on P8/P9.
21257
21258 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21259
21260 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21261 New function.
21262 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21263 swap associated with both a load and a store.
21264
21265 2018-01-02 Andrew Waterman <andrew@sifive.com>
21266
21267 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21268 * config/riscv/riscv.md (clear_cache): Use it.
21269
21270 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21271
21272 * web.c: Remove out-of-date comment.
21273
21274 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21275
21276 * expr.c (fixup_args_size_notes): Check that any existing
21277 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21278 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21279 (emit_single_push_insn): ...here.
21280
21281 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21282
21283 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21284 (const_vector_encoded_nelts): New function.
21285 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21286 (const_vector_int_elt, const_vector_elt): Declare.
21287 * emit-rtl.c (const_vector_int_elt_1): New function.
21288 (const_vector_elt): Likewise.
21289 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21290 of CONST_VECTOR_ELT.
21291
21292 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21293
21294 * expr.c: Include rtx-vector-builder.h.
21295 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21296 directly on the tree encoding.
21297 (const_vector_from_tree): Likewise.
21298 * optabs.c: Include rtx-vector-builder.h.
21299 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21300 sequence of "u" values.
21301 * vec-perm-indices.c: Include rtx-vector-builder.h.
21302 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21303 directly on the vec_perm_indices encoding.
21304
21305 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21306
21307 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21308 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21309 * rtx-vector-builder.h: New file.
21310 * rtx-vector-builder.c: Likewise.
21311 * rtl.h (rtx_def::u2): Add a const_vector field.
21312 (CONST_VECTOR_NPATTERNS): New macro.
21313 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21314 (CONST_VECTOR_DUPLICATE_P): Likewise.
21315 (CONST_VECTOR_STEPPED_P): Likewise.
21316 (CONST_VECTOR_ENCODED_ELT): Likewise.
21317 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21318 (unwrap_const_vec_duplicate): Likewise.
21319 (const_vec_series_p): Check for a non-duplicated vector encoding.
21320 Say that the function only returns true for integer vectors.
21321 * emit-rtl.c: Include rtx-vector-builder.h.
21322 (gen_const_vec_duplicate_1): Delete.
21323 (gen_const_vector): Call gen_const_vec_duplicate instead of
21324 gen_const_vec_duplicate_1.
21325 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21326 (gen_const_vec_duplicate): Use rtx_vector_builder.
21327 (gen_const_vec_series): Likewise.
21328 (gen_rtx_CONST_VECTOR): Likewise.
21329 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21330 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21331 Build a new vector rather than modifying a CONST_VECTOR in-place.
21332 (handle_special_swappables): Update call accordingly.
21333 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21334 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21335 Build a new vector rather than modifying a CONST_VECTOR in-place.
21336 (handle_special_swappables): Update call accordingly.
21337
21338 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21339
21340 * simplify-rtx.c (simplify_const_binary_operation): Use
21341 CONST_VECTOR_ELT instead of XVECEXP.
21342
21343 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21344
21345 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21346 the selector elements to be different from the data elements
21347 if the selector is a VECTOR_CST.
21348 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21349 ssizetype for the selector.
21350
21351 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21352
21353 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21354 before testing each element individually.
21355 * tree-vect-generic.c (lower_vec_perm): Likewise.
21356
21357 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21358
21359 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21360 * selftest-run-tests.c (selftest::run_tests): Call it.
21361 * vector-builder.h (vector_builder::operator ==): New function.
21362 (vector_builder::operator !=): Likewise.
21363 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21364 (vec_perm_indices::all_from_input_p): New function.
21365 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21366 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21367 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21368 instead of reading the VECTOR_CST directly. Detect whether both
21369 vector inputs are the same before constructing the vec_perm_indices,
21370 and update the number of inputs argument accordingly. Use the
21371 utility functions added above. Only construct sel2 if we need to.
21372
21373 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21374
21375 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21376 the broadcast of the low byte.
21377 (expand_mult_highpart): Use an explicit encoding for the permutes.
21378 * optabs-query.c (can_mult_highpart_p): Likewise.
21379 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21380 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21381 (vectorizable_bswap): Likewise.
21382 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21383 explicit encoding for the power-of-2 permutes.
21384 (vect_permute_store_chain): Likewise.
21385 (vect_grouped_load_supported): Likewise.
21386 (vect_permute_load_chain): Likewise.
21387
21388 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21389
21390 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21391 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21392 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21393 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21394 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21395 (vect_gen_perm_mask_any): Likewise.
21396
21397 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21398
21399 * int-vector-builder.h: New file.
21400 * vec-perm-indices.h: Include int-vector-builder.h.
21401 (vec_perm_indices): Redefine as an int_vector_builder.
21402 (auto_vec_perm_indices): Delete.
21403 (vec_perm_builder): Redefine as a stand-alone class.
21404 (vec_perm_indices::vec_perm_indices): New function.
21405 (vec_perm_indices::clamp): Likewise.
21406 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21407 (vec_perm_indices::new_vector): New function.
21408 (vec_perm_indices::new_expanded_vector): Update for new
21409 vec_perm_indices class.
21410 (vec_perm_indices::rotate_inputs): New function.
21411 (vec_perm_indices::all_in_range_p): Operate directly on the
21412 encoded form, without computing elided elements.
21413 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21414 encoding. Update for new vec_perm_indices class.
21415 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21416 the given vec_perm_builder.
21417 (expand_vec_perm_var): Update vec_perm_builder constructor.
21418 (expand_mult_highpart): Use vec_perm_builder instead of
21419 auto_vec_perm_indices.
21420 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21421 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21422 or double series encoding as appropriate.
21423 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21424 vec_perm_indices instead of auto_vec_perm_indices.
21425 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21426 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21427 (vect_permute_store_chain): Likewise.
21428 (vect_grouped_load_supported): Likewise.
21429 (vect_permute_load_chain): Likewise.
21430 (vect_shift_permute_load_chain): Likewise.
21431 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21432 (vect_transform_slp_perm_load): Likewise.
21433 (vect_schedule_slp_instance): Likewise.
21434 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21435 (vectorizable_mask_load_store): Likewise.
21436 (vectorizable_bswap): Likewise.
21437 (vectorizable_store): Likewise.
21438 (vectorizable_load): Likewise.
21439 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21440 vec_perm_indices instead of auto_vec_perm_indices. Use
21441 tree_to_vec_perm_builder to read the vector from a tree.
21442 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21443 vec_perm_builder instead of a vec_perm_indices.
21444 (have_whole_vector_shift): Use vec_perm_builder and
21445 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21446 truncation to calc_vec_perm_mask_for_shift.
21447 (vect_create_epilog_for_reduction): Likewise.
21448 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21449 from auto_vec_perm_indices to vec_perm_indices.
21450 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21451 instead of changing individual elements.
21452 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21453 the vector in d.perm.
21454 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21455 from auto_vec_perm_indices to vec_perm_indices.
21456 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21457 instead of changing individual elements.
21458 (arm_vectorize_vec_perm_const): Use new_vector to install
21459 the vector in d.perm.
21460 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21461 Update vec_perm_builder constructor.
21462 (rs6000_expand_interleave): Likewise.
21463 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21464 (rs6000_expand_interleave): Likewise.
21465
21466 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21467
21468 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21469 to qimode could truncate the indices.
21470 * optabs.c (expand_vec_perm_var): Likewise.
21471
21472 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21473
21474 * Makefile.in (OBJS): Add vec-perm-indices.o.
21475 * vec-perm-indices.h: New file.
21476 * vec-perm-indices.c: Likewise.
21477 * target.h (vec_perm_indices): Replace with a forward class
21478 declaration.
21479 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21480 * optabs.h: Include vec-perm-indices.h.
21481 (expand_vec_perm): Delete.
21482 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21483 (expand_vec_perm_const): Declare.
21484 * target.def (vec_perm_const_ok): Replace with...
21485 (vec_perm_const): ...this new hook.
21486 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21487 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21488 * doc/tm.texi: Regenerate.
21489 * optabs.def (vec_perm_const): Delete.
21490 * doc/md.texi (vec_perm_const): Likewise.
21491 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21492 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21493 expand_vec_perm for constant permutation vectors. Assert that
21494 the mode of variable permutation vectors is the integer equivalent
21495 of the mode that is being permuted.
21496 * optabs-query.h (selector_fits_mode_p): Declare.
21497 * optabs-query.c: Include vec-perm-indices.h.
21498 (selector_fits_mode_p): New function.
21499 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21500 is defined, instead of checking whether the vec_perm_const_optab
21501 exists. Use targetm.vectorize.vec_perm_const instead of
21502 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21503 fit in the vector mode before using a variable permute.
21504 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21505 vec_perm_indices instead of an rtx.
21506 (expand_vec_perm): Replace with...
21507 (expand_vec_perm_const): ...this new function. Take the selector
21508 as a vec_perm_indices rather than an rtx. Also take the mode of
21509 the selector. Update call to shift_amt_for_vec_perm_mask.
21510 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21511 Use vec_perm_indices::new_expanded_vector to expand the original
21512 selector into bytes. Check whether the indices fit in the vector
21513 mode before using a variable permute.
21514 (expand_vec_perm_var): Make global.
21515 (expand_mult_highpart): Use expand_vec_perm_const.
21516 * fold-const.c: Includes vec-perm-indices.h.
21517 * tree-ssa-forwprop.c: Likewise.
21518 * tree-vect-data-refs.c: Likewise.
21519 * tree-vect-generic.c: Likewise.
21520 * tree-vect-loop.c: Likewise.
21521 * tree-vect-slp.c: Likewise.
21522 * tree-vect-stmts.c: Likewise.
21523 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21524 Delete.
21525 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21526 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21527 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21528 (aarch64_vectorize_vec_perm_const): ...this new function.
21529 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21530 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21531 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21532 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21533 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21534 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21535 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21536 into...
21537 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21538 check for NEON modes.
21539 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21540 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21541 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21542 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21543 into...
21544 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21545 the old VEC_PERM_CONST conditions.
21546 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21547 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21548 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21549 (ia64_vectorize_vec_perm_const_ok): Merge into...
21550 (ia64_vectorize_vec_perm_const): ...this new function.
21551 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21552 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21553 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21554 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21555 * config/mips/mips.c (mips_expand_vec_perm_const)
21556 (mips_vectorize_vec_perm_const_ok): Merge into...
21557 (mips_vectorize_vec_perm_const): ...this new function.
21558 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21559 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21560 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21561 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21562 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21563 (rs6000_expand_vec_perm_const): Delete.
21564 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21565 Delete.
21566 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21567 (altivec_expand_vec_perm_const_le): Take each operand individually.
21568 Operate on constant selectors rather than rtxes.
21569 (altivec_expand_vec_perm_const): Likewise. Update call to
21570 altivec_expand_vec_perm_const_le.
21571 (rs6000_expand_vec_perm_const): Delete.
21572 (rs6000_vectorize_vec_perm_const_ok): Delete.
21573 (rs6000_vectorize_vec_perm_const): New function.
21574 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21575 an element count and rtx array.
21576 (rs6000_expand_extract_even): Update call accordingly.
21577 (rs6000_expand_interleave): Likewise.
21578 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21579 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21580 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21581 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21582 (rs6000_expand_vec_perm_const): Delete.
21583 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21584 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21585 (altivec_expand_vec_perm_const_le): Take each operand individually.
21586 Operate on constant selectors rather than rtxes.
21587 (altivec_expand_vec_perm_const): Likewise. Update call to
21588 altivec_expand_vec_perm_const_le.
21589 (rs6000_expand_vec_perm_const): Delete.
21590 (rs6000_vectorize_vec_perm_const_ok): Delete.
21591 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21592 reference to the SPE evmerge intructions.
21593 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21594 an element count and rtx array.
21595 (rs6000_expand_extract_even): Update call accordingly.
21596 (rs6000_expand_interleave): Likewise.
21597 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21598 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21599 new function.
21600 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21601
21602 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21603
21604 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21605 vector mode and that that mode matches the mode of the data
21606 being permuted.
21607 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21608 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21609 directly using expand_vec_perm_1 when forcing selectors into
21610 registers.
21611 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21612
21613 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21614
21615 * optabs-query.h (can_vec_perm_p): Delete.
21616 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21617 * optabs-query.c (can_vec_perm_p): Split into...
21618 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21619 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21620 particular selector is valid.
21621 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21622 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21623 (vect_grouped_load_supported): Likewise.
21624 (vect_shift_permute_load_chain): Likewise.
21625 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21626 (vect_transform_slp_perm_load): Likewise.
21627 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21628 (vectorizable_bswap): Likewise.
21629 (vect_gen_perm_mask_checked): Likewise.
21630 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21631 implementations of variable permutation vectors into account
21632 when deciding which selector to use.
21633 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21634 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21635 with a false third argument.
21636 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21637 to test whether the constant selector is valid and can_vec_perm_var_p
21638 to test whether a variable selector is valid.
21639
21640 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21641
21642 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21643 * optabs-query.c (can_vec_perm_p): Likewise.
21644 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21645 instead of vec_perm_indices.
21646 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21647 (vect_gen_perm_mask_checked): Likewise,
21648 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21649 (vect_gen_perm_mask_checked): Likewise,
21650
21651 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21652
21653 * optabs-query.h (qimode_for_vec_perm): Declare.
21654 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21655 (qimode_for_vec_perm): ...this new function.
21656 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21657
21658 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21659
21660 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21661 does not have a conditional at the top.
21662
21663 2018-01-02 Richard Biener <rguenther@suse.de>
21664
21665 * ipa-inline.c (big_speedup_p): Fix expression.
21666
21667 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21668
21669 PR target/81616
21670 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21671 for generic 4->6.
21672
21673 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21674
21675 PR target/81616
21676 Generic tuning.
21677 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21678 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21679 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21680 cond_taken_branch_cost 3->4.
21681
21682 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21683
21684 PR tree-optimization/83581
21685 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21686 TODO_cleanup_cfg if any changes have been made.
21687
21688 PR middle-end/83608
21689 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21690 convert_modes if target mode has the right side, but different mode
21691 class.
21692
21693 PR middle-end/83609
21694 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21695 last argument when extracting from CONCAT. If either from_real or
21696 from_imag is NULL, use expansion through memory. If result is not
21697 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21698 the parts directly to inner mode, if even that fails, use expansion
21699 through memory.
21700
21701 PR middle-end/83623
21702 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21703 check for bswap in mode rather than HImode and use that in expand_unop
21704 too.
21705 \f
21706 Copyright (C) 2018 Free Software Foundation, Inc.
21707
21708 Copying and distribution of this file, with or without modification,
21709 are permitted in any medium without royalty provided the copyright
21710 notice and this notice are preserved.