]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ChangeLog
Add __builtin_speculation_safe_value
[thirdparty/gcc.git] / gcc / ChangeLog
1 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2
3 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
4 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
5 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7 list.
8 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
14 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
15 * builtins.c (expand_speculation_safe_value): New function.
16 (expand_builtin): Call it.
17 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
18 * doc/extend.texi: Document __builtin_speculation_safe_value.
19 * doc/md.texi: Document "speculation_barrier" pattern.
20 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
21 TARGET_HAVE_SPECULATION_SAFE_VALUE.
22 * doc/tm.texi: Regenerated.
23 * target.def (have_speculation_safe_value, speculation_safe_value): New
24 hooks.
25 * targhooks.c (default_have_speculation_safe_value): New function.
26 (default_speculation_safe_value): New function.
27 * targhooks.h (default_have_speculation_safe_value): Add prototype.
28 (default_speculation_safe_value): Add prototype.
29
30 2018-07-31 David Malcolm <dmalcolm@redhat.com>
31
32 * dump-context.h (dump_context::dump_loc): New decl.
33 * dumpfile.c (dump_context::dump_loc): New member function.
34 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
35 and dump_gimple_stmt.
36 (dump_context::dump_gimple_expr_loc): Likewise, using
37 dump_gimple_expr.
38 (dump_context::dump_generic_expr_loc): Likewise, using
39 dump_generic_expr.
40 (dump_context::dump_printf_loc_va): Likewise, using
41 dump_printf_va.
42 (dump_context::begin_scope): Explicitly using the global function
43 "dump_loc", rather than the member function.
44
45 2018-07-31 Martin Sebor <msebor@redhat.com>
46
47 PR tree-optimization/86741
48 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
49
50 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
51
52 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
53 depend on whether prefetch instructions will be emitted or not.
54 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
55 will be emitted or not.
56 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
57 (TARGET_SETMEM_PFD): New macros.
58
59 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
60
61 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
62 (NULL_STMT_VEC_INFO): Delete.
63 (stmt_vec_info::operator*): Likewise.
64 (stmt_vec_info::operator gimple *): Likewise.
65 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
66 of NULL_STMT_VEC_INFO.
67 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
68 (vect_reassociating_reduction_p): Likewise.
69 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
70 (vectorizable_store): Likewise.
71 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
72 (vec_info::free_stmt_vec_infos): Likewise.
73
74 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
75
76 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
77 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
78
79 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
80
81 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
82 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
83 (vec_info::free_stmt_vec_info): New private member functions.
84 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
85 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
86 * tree-parloops.c (gather_scalar_reductions): Remove calls to
87 set_stmt_vec_info_vec and free_stmt_vec_infos.
88 * tree-vect-loop.c (_loop_vec_info): Remove call to
89 set_stmt_vec_info_vec.
90 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
91 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
92 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
93 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
94 (vec_info::free_stmt_vec_info): ...these new functions. Remove
95 assignments in {vec_info::,}new_stmt_vec_info that are redundant
96 with the clearing in the xcalloc.
97 (stmt_vec_info_vec): Delete.
98 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
99 (vectorize_loops): Likewise.
100 (vec_info::~vec_info): Remove argument from call to
101 free_stmt_vec_infos.
102 (vec_info::add_stmt): Remove vinfo argument from call to
103 new_stmt_vec_info.
104
105 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
106
107 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
108 rather than a gimple stmt.
109 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
110 information for pattern statements when passed the original
111 statement; instead wait to be passed the pattern statement itself.
112 Don't call set_vinfo_for_stmt here.
113 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
114 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
115 stmt_vec_infos here.
116 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
117 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
118 stmt_vec_infos entry.
119
120 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
121
122 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
123 * tree-vectorizer.c (vec_info::replace_stmt): New function.
124 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
125 * tree-vect-stmts.c (vectorizable_call): Likewise.
126 (vectorizable_simd_clone_call): Likewise.
127
128 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
129
130 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
131 * tree-vectorizer.c (vec_info::remove_stmt): New function.
132 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
133 * tree-vect-loop.c (vect_transform_loop): Likewise.
134 * tree-vect-slp.c (vect_schedule_slp): Likewise.
135 * tree-vect-stmts.c (vect_remove_stores): Likewise.
136
137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
138
139 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
140 (vect_dr_stmt): Delete.
141 * tree-vectorizer.c (vec_info::lookup_dr): New function.
142 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
143 of DR_VECT_AUX.
144 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
145 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
146 (vect_verify_datarefs_alignment, vect_peeling_supportable)
147 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
148 (vect_analyze_data_refs): Likewise.
149 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
150 argument.
151 (vect_find_same_alignment_drs): Likewise.
152 (vect_slp_analyze_node_dependences): Update calls accordingly.
153 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
154 instead of DR_VECT_AUX.
155 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
156 of a vector data references. Use vec_info::lookup_dr instead of
157 DR_VECT_AUX.
158 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
159 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
160 instead of DR_VECT_AUX.
161
162 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
163
164 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
165 dr_vec_info.
166 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
167 accordingly.
168 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
169 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
170 (vect_gen_prolog_loop_niters): Likewise.
171
172 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
173
174 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
175 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
176 (vect_known_alignment_in_bytes, vect_dr_behavior)
177 (vect_get_scalar_dr_size): Take references as dr_vec_infos
178 instead of data_references. Update calls to other routines for
179 which the same change has been made.
180 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
181 dr_vec_infos instead of stmt_vec_infos.
182 (vect_analyze_data_ref_dependence): Update call accordingly.
183 (vect_slp_analyze_data_ref_dependence)
184 (vect_record_base_alignments): Use DR_VECT_AUX.
185 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
186 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
187 (vector_alignment_reachable_p, vect_get_data_access_cost)
188 (vect_peeling_supportable, vect_analyze_group_access_1)
189 (vect_analyze_group_access, vect_analyze_data_ref_access)
190 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
191 (vect_compile_time_alias, vect_small_gap_p)
192 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
193 (vect_supportable_dr_alignment): Take references as dr_vec_infos
194 instead of data_references. Update calls to other routines for
195 which the same change has been made.
196 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
197 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
198 (vect_slp_analyze_and_verify_node_alignment)
199 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
200 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
201 (vect_setup_realignment): Use dr_vec_infos. Update calls after
202 above changes.
203 (_vect_peel_info::dr): Replace with...
204 (_vect_peel_info::dr_info): ...this new field.
205 (vect_peeling_hash_get_most_frequent)
206 (vect_peeling_hash_choose_best_peeling): Update accordingly.
207 (vect_peeling_hash_get_lowest_cost):
208 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
209 routines for which the same change has been made.
210 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
211 data_reference.
212 * tree-vect-loop-manip.c (get_misalign_in_elems)
213 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
214 above changes.
215 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
216 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
217 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
218 (get_group_load_store_type, get_negative_load_store_type)
219 (vect_get_data_ptr_increment, vectorizable_store)
220 (vectorizable_load): Likewise.
221 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
222 Update calls to other routines for which the same change has been made.
223
224 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
225
226 * tree-vectorizer.h (vec_info::move_dr): New member function.
227 (dataref_aux): Rename to...
228 (dr_vec_info): ...this and add "dr" and "stmt" fields.
229 (_stmt_vec_info::dr_aux): Update accordingly.
230 (_stmt_vec_info::data_ref_info): Delete.
231 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
232 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
233 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
234 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
235 of data_ref.
236 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
237 (STMT_VINFO_DR_INFO): New macro.
238 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
239 (set_dr_misalignment): Update after rename of dataref_aux.
240 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
241 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
242 initialization of STMT_VINFO_DATA_REF.
243 * tree-vectorizer.c (vec_info::move_dr): New function.
244 * tree-vect-patterns.c (vect_recog_bool_pattern)
245 (vect_recog_mask_conversion_pattern)
246 (vect_recog_gather_scatter_pattern): Use it.
247 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
248 the "dr" and "stmt" fields of dr_vec_info instead of
249 STMT_VINFO_DATA_REF.
250
251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
252
253 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
254 (is_pattern_stmt_p): Use it.
255 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
256 on pattern statements.
257
258 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
259
260 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
261 original stmt as a stmt_vec_info rather than a gimple stmt.
262 (vect_pattern_recog_1): Take the statement directly as a
263 stmt_vec_info, rather than via a gimple_stmt_iterator.
264 Update call to vect_mark_pattern_stmts.
265 (vect_pattern_recog): Update calls accordingly.
266
267 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
268
269 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
270 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
271 a vect_def_type for the first argument.
272 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
273 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
274 operand if it isn't defined by a vectorized statement.
275 (vect_build_gather_load_calls): Remove the mask_dt argument and
276 update calls to vect_get_vec_def_for_stmt_copy.
277 (vectorizable_bswap): Likewise the dt argument.
278 (vectorizable_call): Update calls to vectorizable_bswap and
279 vect_get_vec_def_for_stmt_copy.
280 (vectorizable_simd_clone_call, vectorizable_assignment)
281 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
282 (vectorizable_comparison): Update calls to
283 vect_get_vec_def_for_stmt_copy.
284 (vectorizable_store): Likewise. Remove now-unnecessary calls to
285 vect_is_simple_use.
286 (vect_get_loop_based_defs): Remove dt argument and update call
287 to vect_get_vec_def_for_stmt_copy.
288 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
289 and vect_get_vec_def_for_stmt_copy.
290 (vectorizable_load): Update calls to vect_build_gather_load_calls
291 and vect_get_vec_def_for_stmt_copy.
292 * tree-vect-loop.c (vect_create_epilog_for_reduction)
293 (vectorizable_reduction, vectorizable_live_operation): Update calls
294 to vect_get_vec_def_for_stmt_copy.
295
296 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
297
298 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
299 and gimple stmt arguments with a stmt_vec_info.
300 (vect_record_base_alignments): Update calls accordingly.
301 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
302 and gimple stmt arguments with a stmt_vec_info.
303 (vect_build_slp_tree_1): Remove vinfo argument and update call
304 to vect_record_max_nunits.
305 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
306 and vect_record_max_nunits.
307
308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
309
310 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
311 file and take a stmt_vec_info instead of a gimple stmt.
312 (supportable_widening_operation, vect_finish_replace_stmt)
313 (vect_finish_stmt_generation, vect_get_store_rhs)
314 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
315 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
316 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
317 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
318 (vect_create_data_ref_ptr, bump_vector_ptr)
319 (vect_permute_store_chain, vect_setup_realignment)
320 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
321 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
322 (vectorizable_reduction, vectorizable_induction)
323 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
324 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
325 than gimple stmts as arguments.
326 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
327 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
328 (can_group_stmts_p, vect_check_gather_scatter)
329 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
330 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
331 (vect_permute_load_chain, vect_shift_permute_load_chain)
332 (vect_transform_grouped_load)
333 (vect_record_grouped_load_vectors): Likewise.
334 * tree-vect-loop.c (vect_fixup_reduc_chain)
335 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
336 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
337 (vectorizable_reduction, vectorizable_induction)
338 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
339 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
340 (vect_get_load_store_mask): Likewise.
341 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
342 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
343 * tree-vect-stmts.c (vect_mark_relevant)
344 (is_simple_and_all_uses_invariant)
345 (exist_non_indexing_operands_for_use_p, process_use)
346 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
347 (vect_get_vec_def_for_operand, vect_get_vec_defs)
348 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
349 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
350 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
351 (get_negative_load_store_type, get_load_store_type)
352 (vect_check_load_store_mask, vect_check_store_rhs)
353 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
354 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
355 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
356 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
357 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
358 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
359 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
360 (supportable_widening_operation): Likewise.
361
362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
363
364 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
365 a stmt_vec_info instead of a gcall.
366 (vect_check_gather_scatter): Update call accordingly.
367 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
368 of a gphi.
369 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
370 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
371 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
372 instead of a gimple stmt.
373 (vect_transform_loop): Update calls accordingly.
374 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
375 stmt_vec_infos instead of gimple stmts.
376 (vect_analyze_slp_instance): Update use accordingly.
377 * tree-vect-stmts.c (read_vector_array, write_vector_array)
378 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
379 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
380 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
381 (vect_gen_widened_results_half, vect_get_loop_based_defs)
382 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
383 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
384 down to subroutines.
385
386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
387
388 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
389 of the worklist from a vector of gimple stmts to a vector of
390 stmt_vec_infos.
391 * tree-vect-stmts.c (vect_mark_relevant, process_use)
392 (vect_mark_stmts_to_be_vectorized): Likewise
393
394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
395
396 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
397 statement before passing it to vect_analyze_stmt.
398 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
399 the chain of phi vector definitions. Track the exit phi via its
400 stmt_vec_info.
401 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
402 STMT_VINFO_REDUC_DEF.
403 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
404 stmt_vec_infos to handle the statement chains.
405 (vect_get_slp_defs): Record the first statement in the node
406 using a stmt_vec_info.
407 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
408 statements here and pass their stmt_vec_info down to subroutines.
409 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
410 down to vect_finish_stmt_generation.
411 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
412 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
413 stmt_vec_infos to subroutines.
414 (vect_remove_stores): Use stmt_vec_infos to handle the statement
415 chains.
416
417 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
418
419 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
420 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
421 (vect_permute_store_chain, vect_setup_realignment)
422 (vect_permute_load_chain, vect_shift_permute_load_chain)
423 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
424 stmts internally, and when passing values to other vectorizer routines.
425 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
426 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
427 (vect_analyze_loop_operations, get_initial_def_for_reduction)
428 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
429 (vectorizable_reduction, vectorizable_induction)
430 (vectorizable_live_operation, vect_transform_loop_stmt)
431 (vect_transform_loop): Likewise.
432 * tree-vect-patterns.c (vect_reassociating_reduction_p)
433 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
434 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
435 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
436 (vect_slp_analyze_node_operations_1): Likewise.
437 * tree-vect-stmts.c (vect_mark_relevant, process_use)
438 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
439 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
440 (vect_finish_stmt_generation_1, get_group_load_store_type)
441 (get_load_store_type, vect_build_gather_load_calls)
442 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
443 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
444 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
445 (vectorizable_store, vectorizable_load, vectorizable_condition)
446 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
447 (supportable_widening_operation): Likewise.
448 (vect_get_vector_types_for_stmt): Likewise.
449 * tree-vectorizer.h (vect_dr_behavior): Likewise.
450
451 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
452
453 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
454 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
455 (vect_permute_store_chain, vect_permute_load_chain)
456 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
457 repeated stmt_vec_info lookups.
458 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
459 (vect_update_ivs_after_vectorizer): Likewise.
460 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
461 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
462 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
463 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
464 (vect_bb_slp_scalar_cost): Likewise.
465 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
466
467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
468
469 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
470 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
471 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
472 to get gassigns and gcalls, rather than operating on generc gimple
473 stmts.
474 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
475 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
476 (vectorizable_load, vect_analyze_stmt): Likewise.
477 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
478
479 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
480
481 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
482 return stmt_vec_infos rather than gimple stmts. Do not accept
483 null arguments.
484 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
485 of a gimple stmt.
486 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
487 Update use of get_later_stmt.
488 (vect_get_constant_vectors): Update call accordingly.
489 (vect_schedule_slp_instance): Likewise
490 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
491 (vect_slp_analyze_instance_dependence): Likewise.
492 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
493
494 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
495
496 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
497 (stmt_info_for_cost::stmt_info): ...this new field.
498 (add_stmt_costs): Update accordingly.
499 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
500 (vect_get_known_peeling_cost): Likewise.
501 (vect_estimate_min_profitable_iters): Likewise.
502 * tree-vect-stmts.c (record_stmt_cost): Likewise.
503
504 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
505
506 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
507 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
508 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
509 accordingly.
510 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
511
512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
513
514 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
515 a gimple stmt to a stmt_vec_info.
516 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
517
518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
519
520 * tree-vectorizer.h (vec_info::grouped_stores): Change from
521 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
522 (_loop_vec_info::reduction_chains): Likewise.
523 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
524 accordingly.
525 * tree-vect-slp.c (vect_analyze_slp): Likewise.
526
527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
528
529 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
530 a gimple stmt to a stmt_vec_info.
531 (_stmt_vec_info::next_element): Likewise.
532 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
533 (vect_slp_analyze_and_verify_node_alignment)
534 (vect_analyze_group_access_1, vect_analyze_group_access)
535 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
536 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
537 (vect_supportable_dr_alignment): Update accordingly.
538 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
539 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
540 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
541 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
542 * tree-vect-slp.c (vect_build_slp_tree_1)
543 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
544 (vect_split_slp_store_group, vect_analyze_slp_instance)
545 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
546 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
547 (get_group_load_store_type, get_load_store_type)
548 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
549 (vect_transform_stmt, vect_remove_stores): Likewise.
550
551 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
552
553 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
554 than a gimple stmt.
555 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
556 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
557 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
558 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
559 (vector_alignment_reachable_p, vect_get_data_access_cost)
560 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
561 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
562 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
563 (vect_analyze_group_access_1, vect_analyze_group_access)
564 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
565 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
566 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
567 result of vect_dr_stmt and use the stmt_vec_info instead of
568 the associated gimple stmt.
569 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
570 (vect_gen_prolog_loop_niters): Likewise.
571 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
572
573 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
574
575 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
576 to a vec<stmt_vec_info>.
577 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
578 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
579 vec<stmt_vec_info>.
580 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
581 to a vec<stmt_vec_info>.
582 (bst_traits::value_type, bst_traits::value_type): Likewise.
583 (bst_traits::hash): Update accordingly.
584 (vect_get_and_check_slp_defs): Change the stmts parameter from
585 a vec<gimple *> to a vec<stmt_vec_info>.
586 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
587 (vect_build_slp_tree): Likewise.
588 (vect_build_slp_tree_2): Likewise. Update uses of
589 SLP_TREE_SCALAR_STMTS.
590 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
591 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
592 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
593 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
594 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
595 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
596 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
597 (vect_get_constant_vectors, vect_get_slp_defs)
598 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
599 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
600 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
601 instead of gimple stmts.
602 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
603 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
604 (vect_slp_analyze_instance_dependence): Update uses of
605 SLP_TREE_SCALAR_STMTS.
606 (vect_slp_analyze_and_verify_node_alignment): Likewise.
607 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
608 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
609 (get_initial_defs_for_reduction): Likewise.
610 (vect_create_epilog_for_reduction): Likewise.
611 (vectorize_fold_left_reduction): Likewise.
612 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
613 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
614 (can_vectorize_live_stmts): Likewise.
615
616 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
617
618 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
619 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
620 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
621 than gimple stmts.
622 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
623 of a gimple stmt.
624 (gather_scalar_reductions): Update after above interface changes.
625 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
626 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
627 than gimple stmts.
628 (vect_force_simple_reduction): Likewise.
629 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
630 LOOP_VINFO_REDUCTIONS.
631 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
632
633 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
634
635 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
636 a gimple stmt to a stmt_vec_info.
637 * tree-vect-loop.c (vect_active_double_reduction_p)
638 (vect_force_simple_reduction, vectorizable_reduction): Update
639 accordingly.
640
641 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
642
643 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
644 vec<gimple *> to a vec<stmt_vec_info>.
645 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
646 the reduction_phis argument from a vec<gimple *> to a
647 vec<stmt_vec_info>.
648 (vectorizable_reduction): Likewise the phis local variable that
649 is passed to vect_create_epilog_for_reduction. Update for new type
650 of SLP_TREE_VEC_STMTS.
651 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
652 (vectorizable_live_operation): Likewise.
653 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
654 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
655
656 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
657
658 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
659 a gimple stmt to a stmt_vec_info.
660 (vectorizable_condition, vectorizable_live_operation)
661 (vectorizable_reduction, vectorizable_induction): Pass back the
662 vectorized statement as a stmt_vec_info.
663 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
664 use of STMT_VINFO_VEC_STMT.
665 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
666 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
667 as stmt_vec_infos rather than gimple stmts.
668 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
669 to a stmt_vec_info.
670 (vectorizable_live_operation): Likewise.
671 (vectorizable_reduction, vectorizable_induction): Likewise,
672 updating use of STMT_VINFO_VEC_STMT.
673 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
674 of STMT_VINFO_VEC_STMT.
675 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
676 (vectorizable_simd_clone_call, vectorizable_conversion)
677 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
678 (vectorizable_store, vectorizable_load, vectorizable_condition)
679 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
680 from a gimple stmt to a stmt_vec_info.
681 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
682 pointer to a stmt_vec_info to the vectorizable_* routines.
683
684 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
685
686 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
687 a gimple stmt to a stmt_vec_info.
688 (is_pattern_stmt_p): Update accordingly.
689 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
690 (vect_record_grouped_load_vectors): Likewise.
691 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
692 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
693 (vect_model_reduction_cost): Likewise.
694 (vect_create_epilog_for_reduction): Likewise.
695 (vectorizable_reduction, vectorizable_induction): Likewise.
696 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
697 Return the stmt_vec_info for the pattern statement.
698 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
699 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
700 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
701 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
702 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
703 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
704 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
705 (free_stmt_vec_info, vect_is_simple_use): Likewise.
706
707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
708
709 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
710 (vect_finish_stmt_generation): Likewise.
711 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
712 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
713 (vect_build_gather_load_calls): Use the return value of the above
714 functions instead of a separate call to vinfo_for_stmt. Use narrow
715 scopes for the input gimple stmt and wider scopes for the associated
716 stmt_vec_info. Use vec_info::lookup_def when setting these
717 stmt_vec_infos from an SSA_NAME definition.
718 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
719 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
720 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
721 (vectorizable_store, vectorizable_load, vectorizable_condition)
722 (vectorizable_comparison): Likewise.
723 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
724 (vectorizable_reduction): Likewise.
725
726 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
727
728 * tree-vectorizer.h (vect_is_simple_use): Add an optional
729 stmt_vec_info * parameter before the optional gimple **.
730 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
731 (process_use, vect_get_vec_def_for_operand_1): Update callers.
732 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
733 * tree-vect-loop.c (vectorizable_reduction): Likewise.
734 (vectorizable_live_operation): Likewise.
735 * tree-vect-patterns.c (type_conversion_p): Likewise.
736 (vect_look_through_possible_promotion): Likewise.
737 (vect_recog_rotate_pattern): Likewise.
738 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
739
740 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
741
742 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
743 a typedef to a wrapper class.
744 (NULL_STMT_VEC_INFO): New macro.
745 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
746 (stmt_vec_info::operator*): New function.
747 (stmt_vec_info::operator gimple *): Likewise.
748 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
749 (add_stmt_costs): Likewise.
750 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
751 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
752 (vect_get_known_peeling_cost): Likewise.
753 (vect_estimate_min_profitable_iters): Likewise.
754 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
755 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
756 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
757 (vectorizable_store, free_stmt_vec_infos): Likewise.
758 (new_stmt_vec_info): Change return type of xcalloc to
759 _stmt_vec_info *.
760
761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
762
763 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
764 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
765 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
766 a single_imm_use-based sequence.
767 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
768
769 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
770
771 * tree-vectorizer.h (vec_info::lookup_def): Declare.
772 * tree-vectorizer.c (vec_info::lookup_def): New function.
773 * tree-vect-patterns.c (vect_get_internal_def): Use it.
774 (vect_widened_op_tree): Likewise.
775 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
776 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
777 (vectorizable_reduction): Likewise.
778 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
779 of a gimple *.
780 (vect_is_slp_reduction): Update calls accordingly. Use
781 vec_info::lookup_def.
782 (vect_is_simple_reduction): Likewise
783 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
784
785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
786
787 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
788 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
789 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
790 of vinfo_for_stmt.
791 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
792 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
793 (vect_update_vf_for_slp, vect_analyze_loop_operations)
794 (vect_is_slp_reduction, vectorizable_induction)
795 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
796 * tree-vect-patterns.c (vect_init_pattern_stmt):
797 (vect_determine_min_output_precision_1, vect_determine_precisions)
798 (vect_pattern_recog): Likewise.
799 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
800 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
801 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
802 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
803 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
804 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
805 info field from a loop to a loop_vec_info.
806
807 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
808
809 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
810 (vec_info::add_stmt): Declare.
811 * tree-vectorizer.c (vec_info::add_stmt): New function.
812 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
813 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
814 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
815 (vectorizable_induction): Likewise.
816 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
817 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
818 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
819 (vectorizable_load): Likewise.
820 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
821 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
822 (vect_recog_gather_scatter_pattern): Likewise.
823 (append_pattern_def_seq): Likewise. Remove a check that is
824 performed by add_stmt itself.
825
826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
827
828 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
829 which make_ssa_name was called with new_stmt before new_stmt
830 had been created.
831
832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
833
834 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
835 split out from...
836 (vect_is_slp_reduction): ...here...
837 (vect_is_simple_reduction): ...and here. Remove repetition of tests
838 that are already known to be false.
839
840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
841
842 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
843 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
844 STMT_VINFO_NUM_SLP_USES when it's true.
845 (vect_free_slp_instance): Add a final_p parameter and pass it to
846 vect_free_slp_tree.
847 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
848 (vect_analyze_slp_instance): Likewise.
849 (vect_slp_analyze_operations): Likewise.
850 (vect_slp_analyze_bb_1): Likewise.
851 * tree-vectorizer.c (vec_info): Likewise.
852 * tree-vect-loop.c (vect_transform_loop): Likewise.
853
854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
855
856 * tree-vect-loop.c (vectorizable_reduction): Assert that the
857 function is not called for second and subsequent members of
858 a reduction group.
859
860 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
861
862 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
863 cases for nested loops from here to ...
864 (vect_create_epilog_for_reduction): ...here. Only call
865 vect_is_simple_use for inner-loop reductions.
866
867 2018-07-31 Martin Liska <mliska@suse.cz>
868
869 PR gcov-profile/85338
870 PR gcov-profile/85350
871 PR gcov-profile/85372
872 * profile.c (struct location_triplet): New.
873 (struct location_triplet_hash): Likewise.
874 (output_location): Do not output a BB that
875 is already recorded for a line.
876 (branch_prob): Use streamed_locations.
877
878 2018-07-31 Martin Liska <mliska@suse.cz>
879
880 PR gcov-profile/85370
881 * coverage.c (coverage_begin_function): Do not mark target
882 clones as artificial functions.
883
884 2018-07-31 Martin Liska <mliska@suse.cz>
885
886 PR gcov-profile/83813
887 PR gcov-profile/84758
888 PR gcov-profile/85217
889 PR gcov-profile/85332
890 * profile.c (branch_prob): Do not record GOTO expressions
891 for GIMPLE statements which locations are already streamed.
892
893 2018-07-31 Olivier Hainque <hainque@adacore.com>
894
895 * gcc.c (handle_spec_function): Accept a soft_matched_part
896 argument, as do_spec_1. Pass it down to ...
897 (eval_spec_function): Accept a soft_matched_part argument,
898 and pass it down to ...
899 (do_spec_2): Accept a soft_matched_part argument, and pass
900 it down to do_spec_1.
901 (do_spec_1): Pass soft_matched_part to handle_spec_function.
902 (handle_braces): Update call to handle_spec_function.
903 (driver::set_up_specs): Update calls to do_spec_2.
904 (compare_debug_dump_opt_spec_function): Likewise.
905 (compare_debug_self_opt_spec_function): Likewise.
906
907 2018-07-31 Olivier Hainque <hainque@adacore.com>
908
909 * common.opt (nolibc): New option.
910 * doc/invoke.texi (Link Options): Document it.
911 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
912 * config/alpha/linux.h: Likewise.
913 * config/arc/elf.h: Likewise.
914 * config/arm/uclinux-elf.h: Likewise.
915 * config/arm/unknown-elf.h: Likewise.
916 * config/avr/avrlibc.h: Likewise.
917 * config/bfin/bfin.h: Likewise.
918 * config/bfin/linux.h: Likewise.
919 * config/bfin/uclinux.h: Likewise.
920 * config/darwin.h: Likewise.
921 * config/darwin10.h: Likewise.
922 * config/darwin12.h: Likewise.
923 * config/gnu-user.h: Likewise.
924 * config/lm32/uclinux-elf.h: Likewise.
925 * config/pa/pa-hpux11.h: Likewise.
926 * config/pa/pa64-hpux.h: Likewise.
927 * config/sparc/sparc.h: Likewise.
928
929 2018-07-31 Olivier Hainque <hainque@adacore.com>
930
931 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
932 undefined variables.
933
934 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
935
936 PR target/86640
937 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
938 instead of GEN_INT.
939
940 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
941
942 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
943 terminated string literal.
944
945 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
946
947 PR rtl-optimization/85160
948 * combine.c (is_just_move): New function.
949 (try_combine): Allow combining two instructions into two if neither of
950 the original instructions was a move.
951
952 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
953
954 PR target/86673
955 * doc/extend.texi (Global Register Variables): Discourage use of type
956 qualifiers.
957 (Local Register Variables): Likewise.
958
959 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
960
961 PR tree-optimization/86506
962 * hwint.h (ceil_log2): Resync with hwint.c implementation.
963
964 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
965
966 PR target/86547
967 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
968 hard_regno, make sure no insn between `from` and `to` clobbers it.
969
970 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
971 Tom de Vries <tdevries@suse.de>
972
973 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
974 (PTX_DEFAULT_RUNTIME_DIM): ... this.
975 (nvptx_goacc_validate_dims): Set default worker and gang dims to
976 PTX_DEFAULT_RUNTIME_DIM.
977 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
978
979 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
980
981 * config/pa/pa.c (pa_output_addr_vec): Align address table.
982 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
983 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
984
985 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
986
987 * config/rs6000/constraints.md (wG constraint): Delete, no longer
988 used.
989 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
990 predicate to reflect toc fusion has been deleted.
991 (toc_fusion_mem_raw): Delete, no longer used.
992 (toc_fusion_mem_wrapped): Likewise.
993 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
994 fusion mask bit.
995 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
996 Delete, no longer used.
997 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
998 meant to be used for toc fusion.
999 (rs6000_debug_print_mode): Delete toc fusion debugging.
1000 (rs6000_debug_reg_global): Likewise.
1001 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
1002 fusion and secondary reload support that were never used.
1003 (rs6000_option_override_internal): Delete TOC fusion, that was only
1004 partially defined, and it did not work unless you also used the
1005 -mcmodel= switch.
1006 (rs6000_legitimate_address_p): Delete TOC fusion support.
1007 (rs6000_opt_masks): Likewise.
1008 (fusion_wrap_memory_address): Delete function, no longer used.
1009 (fusion_split_address); Delete TOC fusion support.
1010 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
1011 longer used with toc fusion being deleted.
1012 (TARGET_TOC_FUSION_FP): Likewise.
1013 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
1014 UNSPEC.
1015 (toc fusion spliter): Delete TOC fusion support.
1016 (toc_fusionload_<mode>): Likewise.
1017 (toc_fusionload_di): Likewise.
1018 (fusion_gpr_load_<mode>): Delete generator function, this insn no
1019 longer needs to be named. Rename predicate to delete TOC fusion.
1020 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1021 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1022 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
1023 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
1024 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
1025
1026 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
1027
1028 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
1029 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
1030 __int128 in built-in function prototypes.
1031 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
1032 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
1033
1034 2018-07-27 Martin Sebor <msebor@redhat.com>
1035
1036 PR tree-optimization/86696
1037 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
1038 types, including enums.
1039 (handle_char_store): Be prepared for the above function to fail.
1040
1041 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
1042
1043 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
1044 when optimization level is lower than 2 or optimize for size.
1045
1046 2018-07-26 Martin Sebor <msebor@redhat.com>
1047
1048 PR tree-optimization/86043
1049 PR tree-optimization/86042
1050 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
1051 (get_string_cst_length): Rename...
1052 (get_min_string_length): ...to this. Add argument.
1053 (handle_char_store): Extend to handle multi-character stores by
1054 MEM_REF.
1055 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
1056 * tree.h (initializer_zerop): Add argument.
1057
1058 2018-07-26 Jakub Jelinek <jakub@redhat.com>
1059
1060 PR middle-end/86660
1061 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
1062 declare target to variables if they have always,{to,from,tofrom} map
1063 kinds.
1064
1065 2018-07-26 Martin Liska <mliska@suse.cz>
1066
1067 PR lto/86548
1068 * lto-wrapper.c: Add linker_output as prefix
1069 for ltrans_output_file.
1070
1071 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
1072
1073 PR rtl-optimization/85805
1074 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
1075 value for hard registers if that was written in the same mode.
1076
1077 2018-07-26 Martin Liska <mliska@suse.cz>
1078
1079 PR gcov-profile/86536
1080 * gcov.c (format_gcov): Use printf format %.*f directly
1081 and do not handle special values.
1082
1083 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1084
1085 * common/config/arc/arc-common.c (arc_option_optimization_table):
1086 Update default optimizations for size.
1087
1088 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1089
1090 * config/arc/arc.md (movsf_insn): Add short instruction selection.
1091 * config/arc/constraints.md (CfZ): New constraint.
1092 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
1093 (subsf3_fpu): Likewise.
1094 (cmpsf_fpu): Likewise.
1095 (cmpsf_fpu_uneq): Likewise.
1096
1097 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1098
1099 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
1100 accesses as well.
1101 (arc_is_uncached_mem_p): uncached applies to both the variable and
1102 the pointer.
1103
1104 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
1105
1106 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
1107 register names.
1108
1109 2018-07-25 David Malcolm <dmalcolm@redhat.com>
1110
1111 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
1112 field "m_scopes" from vec to auto_vec.
1113
1114 2018-07-25 Martin Liska <mliska@suse.cz>
1115
1116 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
1117 return type.
1118
1119 2018-07-25 Richard Biener <rguenther@suse.de>
1120
1121 PR debug/86654
1122 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
1123 special wrt context_die late.
1124 (gen_subprogram_die): Re-use DIEs in local scope.
1125
1126 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
1127
1128 PR tree-optimization/86644
1129 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
1130
1131 2018-07-25 Martin Liska <mliska@suse.cz>
1132
1133 PR middle-end/86645
1134 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
1135 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
1136
1137 2018-07-25 Martin Liska <mliska@suse.cz>
1138
1139 PR sanitizer/79635
1140 * params.def: Explain ASan abbreviation and provide
1141 a documentation link.
1142
1143 2018-07-24 Martin Sebor <msebor@redhat.com>
1144
1145 PR tree-optimization/86622
1146 PR tree-optimization/86532
1147 * builtins.h (string_length): Declare.
1148 * builtins.c (c_strlen): Correct handling of non-constant offsets.
1149 (check_access): Be prepared for non-constant length ranges.
1150 (string_length): Make extern.
1151 * expr.c (string_constant): Only handle the minor non-constant
1152 array index. Use string_constant to compute the length of
1153 a generic string constant.
1154
1155 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
1156
1157 PR tree-optimization/86618
1158 * tree-vect-stmts.c (vectorizable_call): Don't take the address
1159 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
1160
1161 2018-07-24 David Malcolm <dmalcolm@redhat.com>
1162
1163 PR tree-optimization/86636
1164 * json.cc (json::object::set): Fix comment. Add assertions.
1165 (json::array::append): Move here from json.h. Add comment and an
1166 assertion.
1167 (json::string::string): Likewise.
1168 * json.h (json::array::append): Move to json.cc.
1169 (json::string::string): Likewise.
1170 * optinfo-emit-json.cc
1171 (optrecord_json_writer::impl_location_to_json): Assert that we
1172 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
1173 wrapper around it. Expand the location once, rather than three
1174 times.
1175 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
1176 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
1177 wrappers.
1178 (optrecord_json_writer::optinfo_to_json): Likewise, in four
1179 places. Fix some overlong lines.
1180
1181 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
1182
1183 * config/aarch64/aarch64-simd.md
1184 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
1185 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
1186 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
1187 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
1188 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
1189 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
1190 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
1191 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
1192 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
1193
1194 2018-07-24 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR middle-end/86627
1197 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
1198 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
1199 and abs_d == d, do the power of two handling if profitable.
1200
1201 2018-07-24 Richard Biener <rguenther@suse.de>
1202
1203 * match.pd: Add BIT_FIELD_REF canonicalizations.
1204
1205 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1206
1207 PR c/86617
1208 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
1209
1210 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1211
1212 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
1213 terminated STRING_CST object.
1214
1215 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
1216
1217 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
1218
1219 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1220
1221 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
1222 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
1223 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
1224 the elements into a register.
1225 (rs6000_split_v4si_init_di_reg): Delete.
1226 (rs6000_split_v4si_init): Delete.
1227 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
1228 (vsx_init_v4si): Rewrite as a define_expand.
1229
1230 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
1231
1232 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
1233 zero_extend argument from memory): New.
1234
1235 2018-07-22 Martin Sebor <msebor@redhat.com>
1236
1237 PR bootstrap/86621
1238 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
1239 diagnosing calls with unknown arguments unless -Walloca-larger-than
1240 is restricted to less than PTRDIFF_MAX bytes.
1241
1242 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
1243
1244 * doc/gcov.texi (Invoking Gcov): Editorial changes.
1245
1246 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1247
1248 * pretty-print.c (text_info::set_location): Remove redundant
1249 "line_table" parameter from call to rich_location::set_range.
1250
1251 2018-07-20 Martin Sebor <msebor@redhat.com>
1252
1253 PR middle-end/82063
1254 * builtins.c (expand_builtin_alloca): Adjust.
1255 * calls.c (alloc_max_size): Simplify.
1256 * cgraphunit.c (cgraph_node::expand): Adjust.
1257 * common.opt (larger_than_size, warn_frame_larger_than): Remove
1258 variables.
1259 (frame_larger_than_size): Same.
1260 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
1261 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
1262 Initialize.
1263 * doc/invoke.texi (GCC Command Options): Document option arguments.
1264 Explain byte-size arguments and suffixes.
1265 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
1266 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
1267 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
1268 * doc/options.texi (UInteger): Expand.
1269 (Host_Wide_Int, ByteSize): Document new properties.
1270 * final.c (final_start_function_1): Include sizes in an error message.
1271 * function.c (frame_offset_overflow): Same.
1272 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
1273 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
1274 Diagnose unbounded alloca calls only for limits of less than
1275 PTRDIFF_MAX.
1276 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
1277 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
1278 for alloca(0).
1279 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
1280 only for limits of less than PTRDIFF_MAX.
1281 * langhooks-def.h (lhd_handle_option): Change function argument
1282 to HOST_WIDE_INT.
1283 * langhooks.c (lhd_handle_option): Same.
1284 * langhooks.h (handle_option): Same.
1285 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
1286 ByteSize flags.
1287 (var_type, var_type_struct): Same.
1288 (var_set): Handle ByteSize flag.
1289 * optc-gen.awk: Add comments to output to ease debugging. Make
1290 use of HOST_WIDE_INT where appropriate.
1291 * opts-gen-save.awk: Use %lx to format unsigned long.
1292 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
1293 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
1294 arguments. Parse bytes-size suffixes.
1295 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
1296 (enum_value_to_arg): Same.
1297 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
1298 (handle_option): Adjust.
1299 (generate_option): Change function argument to HOST_WIDE_INT.
1300 (cmdline_handle_error): Adjust.
1301 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
1302 (set_option): Change function argument to HOST_WIDE_INT.
1303 (option_enabled): Handle cl_host_wide_int.
1304 (get_option_state): Handle CLVC_SIZE.
1305 (control_warning_option): Same.
1306 * opts.c (common_handle_option): Change function argument to
1307 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
1308 OPT_Wvla_larger_than_.
1309 * opts.h (enum cl_var_type): Add an enumerator.
1310 * stor-layout.c (layout_decl): Print a more meaningful warning.
1311 * toplev.c (output_stack_usage): Adjust.
1312
1313 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
1314
1315 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
1316 call to inline_expand_builtin_string_cmp.
1317 (expand_builtin_strcmp): Likewise.
1318 (expand_builtin_strncmp): Likewise.
1319 (inline_string_cmp): Delete the last parameter, change char_type_node
1320 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
1321 two operands.
1322 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
1323 the inlining expansion on target where the type of the call has same or
1324 narrower precision than unsigned char.
1325
1326 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1327
1328 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
1329 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
1330 * common.opt (fsave-optimization-record): New option.
1331 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
1332 * doc/invoke.texi (-fsave-optimization-record): New option.
1333 * dumpfile.c: Include "optinfo-emit-json.h".
1334 (struct kv_pair): Move to coretypes.h.
1335 (optgroup_options): Make non-static.
1336 (dump_context::end_scope): Call
1337 optimization_records_maybe_pop_dump_scope.
1338 * dumpfile.h (optgroup_options): New decl.
1339 * json.cc: New file.
1340 * json.h: New file.
1341 * optinfo-emit-json.cc: New file.
1342 * optinfo-emit-json.h: New file.
1343 * optinfo.cc: Include "optinfo-emit-json.h".
1344 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
1345 (optinfo_enabled_p): Check optimization_records_enabled_p.
1346 (optinfo_wants_inlining_info_p): Likewise.
1347 * optinfo.h: Update comment.
1348 * profile-count.c (profile_quality_as_string): New function.
1349 * profile-count.h (profile_quality_as_string): New decl.
1350 (profile_count::quality): New accessor.
1351 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
1352 and optinfo_emit_json_cc_tests.
1353 * selftest.h (selftest::json_cc_tests): New decl.
1354 (selftest::optinfo_emit_json_cc_tests): New decl.
1355 * toplev.c: Include "optinfo-emit-json.h".
1356 (compile_file): Call optimization_records_finish.
1357 (do_compile): Call optimization_records_start.
1358 * tree-ssa-live.c: Include optinfo.h.
1359 (remove_unused_scope_block_p): Retain inlining information if
1360 optinfo_wants_inlining_info_p returns true.
1361
1362 2018-07-20 Richard Biener <rguenther@suse.de>
1363
1364 PR debug/86585
1365 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
1366 to cover -flto-partition=none.
1367
1368 2018-07-20 Martin Liska <mliska@suse.cz>
1369
1370 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
1371 (get_decl_source_range): Remove unused function.
1372
1373 2018-07-20 Richard Biener <rguenther@suse.de>
1374
1375 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
1376 (struct vn_phi_s): Likewise.
1377 (struct vn_reference_s): Likewise.
1378 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
1379 for searching the slot of an entry known to be in the hash itself.
1380 (vn_phi_hasher::equal): Likewise.
1381 (vn_reference_hasher::equal): Likewise.
1382 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
1383 globals.
1384 (optimistic_info, current_info): Remove, keeping only valid_info.
1385 (vn_reference_lookup_1): Remove fallback lookup.
1386 (vn_reference_lookup_2): Likewise.
1387 (vn_nary_op_lookup_1): Likewise.
1388 (vn_phi_lookup): Likewise.
1389 (vn_nary_build_or_lookup_1): Make sure to not chain the built
1390 hash element.
1391 (vn_reference_insert): Adjust, chain the inserted hash element
1392 at last_inserted_ref.
1393 (vn_reference_insert_pieces): Likewise.
1394 (visit_reference_op_call): Likewise.
1395 (vn_nary_op_insert_into): Chain the inserted hash element at
1396 last_inserted_nary.
1397 (vn_nary_op_insert_pieces): Adjust.
1398 (vn_nary_op_insert): Likewise.
1399 (vn_nary_op_insert_stmt): Likewise.
1400 (vn_phi_insert): Adjust, chain the inserted hash element at
1401 last_inserted_phi.
1402 (process_scc): Remove clearing and copying the optimistic
1403 table. Instead remove elements inserted during an optimistic
1404 iteration from the single table we maintain.
1405 (init_scc_vn): Adjust.
1406 (free_scc_vn): Likewise.
1407 (sccvn_dom_walker::record_cond): Likewise.
1408 (sccvn_dom_walker::after_dom_children): Likewise.
1409
1410 2018-07-19 Martin Sebor <msebor@redhat.com>
1411
1412 PR tree-optimization/84047
1413 PR tree-optimization/83776
1414 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
1415 (check_array_bounds): Call it.
1416
1417 2018-07-19 Martin Sebor <msebor@redhat.com>
1418
1419 * align.h (align_flags): Use member initialization.
1420
1421 2018-07-19 David Malcolm <dmalcolm@redhat.com>
1422
1423 * Makefile.in (OBJS): Add optinfo.o.
1424 * coretypes.h (class symtab_node): New forward decl.
1425 (struct cgraph_node): New forward decl.
1426 (class varpool_node): New forward decl.
1427 * dump-context.h: New file.
1428 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
1429 "tree-pass.h".
1430 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
1431 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
1432 (set_alt_dump_file): Likewise.
1433 (dump_context::~dump_context): New dtor.
1434 (dump_gimple_stmt): Move implementation to...
1435 (dump_context::dump_gimple_stmt): ...this new member function.
1436 Add the stmt to any pending optinfo, creating one if need be.
1437 (dump_gimple_stmt_loc): Move implementation to...
1438 (dump_context::dump_gimple_stmt_loc): ...this new member function.
1439 Start a new optinfo and add the stmt to it.
1440 (dump_gimple_expr): Move implementation to...
1441 (dump_context::dump_gimple_expr): ...this new member function.
1442 Add the stmt to any pending optinfo, creating one if need be.
1443 (dump_gimple_expr_loc): Move implementation to...
1444 (dump_context::dump_gimple_expr_loc): ...this new member function.
1445 Start a new optinfo and add the stmt to it.
1446 (dump_generic_expr): Move implementation to...
1447 (dump_context::dump_generic_expr): ...this new member function.
1448 Add the tree to any pending optinfo, creating one if need be.
1449 (dump_generic_expr_loc): Move implementation to...
1450 (dump_context::dump_generic_expr_loc): ...this new member
1451 function. Add the tree to any pending optinfo, creating one if
1452 need be.
1453 (dump_printf): Move implementation to...
1454 (dump_context::dump_printf_va): ...this new member function. Add
1455 the text to any pending optinfo, creating one if need be.
1456 (dump_printf_loc): Move implementation to...
1457 (dump_context::dump_printf_loc_va): ...this new member function.
1458 Start a new optinfo and add the stmt to it.
1459 (dump_dec): Move implementation to...
1460 (dump_context::dump_dec): ...this new member function. Add the
1461 value to any pending optinfo, creating one if need be.
1462 (dump_context::dump_symtab_node): New member function.
1463 (dump_context::get_scope_depth): New member function.
1464 (dump_context::begin_scope): New member function.
1465 (dump_context::end_scope): New member function.
1466 (dump_context::ensure_pending_optinfo): New member function.
1467 (dump_context::begin_next_optinfo): New member function.
1468 (dump_context::end_any_optinfo): New member function.
1469 (dump_context::s_current): New global.
1470 (dump_context::s_default): New global.
1471 (dump_scope_depth): Delete global.
1472 (dumpfile_ensure_any_optinfo_are_flushed): New function.
1473 (dump_symtab_node): New function.
1474 (get_dump_scope_depth): Reimplement in terms of dump_context.
1475 (dump_begin_scope): Likewise.
1476 (dump_end_scope): Likewise.
1477 (selftest::temp_dump_context::temp_dump_context): New ctor.
1478 (selftest::temp_dump_context::~temp_dump_context): New dtor.
1479 (selftest::verify_item): New function.
1480 (ASSERT_IS_TEXT): New macro.
1481 (ASSERT_IS_TREE): New macro.
1482 (ASSERT_IS_GIMPLE): New macro.
1483 (selftest::test_capture_of_dump_calls): New test.
1484 (selftest::dumpfile_c_tests): Call it.
1485 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
1486 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
1487 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
1488 descriptive comment.
1489 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
1490 (dump_node, dump_bb): Move these unrelated decls.
1491 (class dump_manager): Add leading comment.
1492 * optinfo.cc: New file.
1493 * optinfo.h: New file.
1494
1495 2018-07-19 Michael Collison <michael.collison@arm.com>
1496 Richard Henderson <rth@redhat.com>
1497
1498 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
1499 (subti): Handle op1 zero.
1500 (subvti4, usub4ti4): New.
1501 (*sub<GPI>3_compare1_imm): New.
1502 (sub<GPI>3_carryinCV): New.
1503 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
1504 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
1505
1506 2018-07-19 Michael Collison <michael.collison@arm.com>
1507 Richard Henderson <rth@redhat.com>
1508
1509 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
1510 (addti3): Create simpler code if low part is already known to be 0.
1511 (addvti4, uaddvti4): New.
1512 (*add<GPI>3_compareC_cconly_imm): New.
1513 (*add<GPI>3_compareC_cconly): New.
1514 (*add<GPI>3_compareC_imm): New.
1515 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
1516 handle constants within this pattern..
1517 (*add<GPI>3_compareV_cconly_imm): New.
1518 (*add<GPI>3_compareV_cconly): New.
1519 (*add<GPI>3_compareV_imm): New.
1520 (add<GPI>3_compareV): New.
1521 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
1522 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
1523 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
1524 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
1525 with 'comparison' operator.
1526 (*add<GPI>3_compareV_cconly_imm): Ditto.
1527 (*add<GPI>3_compareV_cconly): Ditto.
1528 (*add<GPI>3_compareV_imm): Ditto.
1529 (add<GPI>3_compareV): Ditto.
1530 (add<mode>3_carryinC): Ditto.
1531 (*add<mode>3_carryinC_zero): Ditto.
1532 (*add<mode>3_carryinC): Ditto.
1533 (add<mode>3_carryinV): Ditto.
1534 (*add<mode>3_carryinV_zero): Ditto.
1535 (*add<mode>3_carryinV): Ditto.
1536
1537 2018-07-19 Michael Collison <michael.collison@arm.com>
1538 Richard Henderson <rth@redhat.com>
1539
1540 * config/aarch64/aarch64-modes.def (CC_V): New.
1541 * config/aarch64/aarch64-protos.h
1542 (aarch64_addti_scratch_regs): Declare
1543 (aarch64_subvti_scratch_regs): Declare.
1544 (aarch64_expand_subvti): Declare.
1545 (aarch64_gen_unlikely_cbranch): Declare
1546 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
1547 for signed overflow using CC_Vmode.
1548 (aarch64_get_condition_code_1): Handle CC_Vmode.
1549 (aarch64_gen_unlikely_cbranch): New function.
1550 (aarch64_addti_scratch_regs): New function.
1551 (aarch64_subvti_scratch_regs): New function.
1552 (aarch64_expand_subvti): New function.
1553
1554 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1555
1556 * config/aarch64/aarch64-option-extensions.def: New entry for profile
1557 extension.
1558 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
1559 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
1560 extension.
1561
1562 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1563
1564 PR target/83009
1565 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
1566 address check not strict.
1567
1568 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
1569
1570 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
1571 Umq with Umn.
1572 (store_pair_lanes<mode>): Likewise.
1573 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
1574 enum value 'ADDR_QUERY_LDP_STP_N'.
1575 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
1576 (aarch64_print_address_internal): Add declaration.
1577 (aarch64_print_ldpstp_address): Remove.
1578 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
1579 (aarch64_print_operand): Change printing of 'y'.
1580 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
1581 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
1582 'true' rather than '1'.
1583 * config/aarch64/constraints.md (Uml): Likewise.
1584 (Uml): Rename to Umn.
1585 (Umq): Remove.
1586
1587 2018-07-19 Richard Biener <rguenther@suse.de>
1588
1589 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
1590 a trailing array.
1591 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
1592 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
1593 (vn_reference_hasher): Likewise.
1594 (struct vn_tables_s): Remove obstack and alloc-pool members.
1595 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
1596 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
1597 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
1598 (vn_reference_insert_pieces): Likewise.
1599 (alloc_vn_nary_op_noinit): Adjust.
1600 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
1601 (vn_phi_eq): Adjust.
1602 (shared_lookup_phiargs): Remove.
1603 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
1604 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
1605 (visit_reference_op_call): Likewise.
1606 (copy_nary, copy_phi, copy_reference): Remove.
1607 (process_scc): Rewind the obstack when iterating. Do not
1608 copy the elements to valid_info but just move them from one
1609 hashtable to the other.
1610 (allocate_vn_table): Adjust.
1611 (free_vn_table): Likewise.
1612 (init_scc_vn): Likewise.
1613 (free_scc_vn): Likewise.
1614
1615 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
1616
1617 PR target/86560
1618 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
1619 indirect_return as function type attribute.
1620 (ix86_attribute_table): Change indirect_return to function
1621 type attribute.
1622 * doc/extend.texi: Update indirect_return attribute.
1623
1624 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
1625
1626 * wide-int.h (widest2_int): New.
1627 * gimple-fold.c (arith_overflowed_p): Use it.
1628 * tree.h (widest2_int_cst): New.
1629 * tree-vrp.c (wide_int_binop_overflow): Rename from
1630 vrp_int_const_binop.
1631 Rewrite to work on trees.
1632 (extract_range_from_multiplicative_op_1): Abstract code to...
1633 (wide_int_range_min_max): ...here.
1634 (wide_int_range_cross_product): ...and here.
1635 (extract_range_from_binary_expr_1): Abstract overflow code to...
1636 (wide_int_range_mult_wrapping): ...here.
1637 * tree-vrp.h (wide_int_range_cross_product): New.
1638 (wide_int_range_mult_wrapping): New.
1639
1640 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
1641 Julia Koval <julia.koval@intel.com>
1642
1643 * config/i386/x86-tune-costs.h (skylake_memcpy,
1644 skylake_memset): Replace rep_prefix with unrolling for size 512.
1645
1646 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
1647
1648 PR middle-end/86544
1649 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle comparision with EQ_EXPR
1650 in last stmt.
1651
1652 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
1653
1654 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
1655 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
1656 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
1657 previously known as "PowerPC AltiVec Built-in Functions". Move
1658 some material to new subsubsections "PowerPC AltiVec Built-in
1659 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
1660 ISA 2.07".
1661 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
1662 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
1663 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
1664 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
1665
1666 2018-07-18 Richard Biener <rguenther@suse.de>
1667
1668 PR tree-optimization/86557
1669 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
1670 EXACT_DIV_EXPR.
1671
1672 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
1673
1674 * config/s390/s390.c (s390_function_profiler): Generate CFI.
1675
1676 2018-07-17 Jeff Law <law@redhat.com>
1677
1678 * config/arm/arm.c (get_label_padding): Update for recent
1679 changes to label_to_alignment.
1680
1681 PR tree-optimization/86010
1682 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
1683
1684 * config/mips/mips.c (vr4130_align_insns): Update for recent
1685 changes to label_to_alignment.
1686
1687 * config/frv/frv.c (frv_label_align): Update for recent changes
1688 to label_to_alignment.
1689
1690 * config/nios2/nios2.c (nios2_label_align): Update for recent
1691 changes which dropped ALIGN_LABELS_LOG.
1692
1693 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
1694
1695 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
1696 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
1697
1698 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
1699
1700 * config/arc/arc.c (arc_label_align): Use align_labels instead of
1701 deprecated align_labels_log.
1702
1703 2018-07-17 Richard Biener <rguenther@suse.de>
1704
1705 PR lto/86456
1706 * dwarf2out.c (init_sections_and_labels): Always generate
1707 a debug_line_str_section for early LTO debug.
1708 (dwarf2out_finish): Reset debug_line_str_hash output early.
1709 Bump counter for extra dwarf5 .debug_loc labels to not conflict
1710 with fat LTO part.
1711 (dwarf2out_early_finish): Output debug_line_str.
1712
1713 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1714
1715 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
1716 index register on z196 or later.
1717
1718 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
1719
1720 * config/s390/s390.c (s390_default_align): Set default function
1721 alignment to 16.
1722 (s390_override_options_after_change): Call s390_default align.
1723 (s390_option_override_internal): Call s390_default_align.
1724 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
1725
1726 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1727
1728 PR middle-end/86542
1729 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
1730 to _looptemp_ clauses, other than the first two.
1731
1732 2018-07-17 Martin Liska <mliska@suse.cz>
1733
1734 * opts.c: Do not enable OPT_falign_* for -Os.
1735
1736 2018-07-17 Martin Liska <mliska@suse.cz>
1737
1738 * align.h (MAX_CODE_ALIGN): New.
1739 (MAX_CODE_ALIGN_VALUE): New.
1740 * common/config/i386/i386-common.c (ix86_handle_option):
1741 (MAX_CODE_ALIGN): Moved to align.h.
1742 * final.c (MAX_CODE_ALIGN): Likewise.
1743 * opts.c (parse_and_check_align_values):
1744 (MAX_CODE_ALIGN): Likewise.
1745 (MAX_CODE_ALIGN_VALUE): Likewise.
1746
1747 2018-07-17 Martin Liska <mliska@suse.cz>
1748
1749 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
1750 in order to fulfil coding style.
1751 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
1752 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1753 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
1754 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
1755 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
1756 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
1757 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
1758 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
1759 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
1760
1761 2018-07-17 Martin Liska <mliska@suse.cz>
1762
1763 * align.h: New file.
1764 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions directly.
1765 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
1766 align_flags of label_to_alignment.
1767 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into align_flags
1768 class.
1769 * config/m68k/m68k.c: Do not use removed align_labels_value and
1770 align_loops_value.
1771 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
1772 (LOOP_ALIGN): Likewise.
1773 (LABEL_ALIGN): Likewise.
1774 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1775 Remove not used macro.
1776 (rs6000_loop_align): Change return type to align_flags.
1777 (rs6000_loop_align_max_skip): Remove.
1778 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
1779 Change return type to align_flags.
1780 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
1781 Remove not used macro.
1782 (rs6000_loop_align): Change return type to align_flags.
1783 (rs6000_loop_align_max_skip): Remove.
1784 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
1785 * config/rx/rx-protos.h (rx_align_for_label): Make it
1786 static function.
1787 * config/rx/rx.c (rx_align_for_label): Change return type
1788 to align_flags.
1789 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
1790 macro definitions.
1791 into align_flags class.
1792 (LABEL_ALIGN): Likewise.
1793 (LOOP_ALIGN): Likewise.
1794 * config/s390/s390.c (s390_label_align): Use align_flags
1795 class member.
1796 (s390_asm_output_function_label): Likewise.
1797 * config/sh/sh.c (sh_override_options_after_change):
1798 Use align_flags class directly without macros.
1799 (find_barrier): Likewise.
1800 (barrier_align): Likewise.
1801 (sh_loop_align): Likewise.
1802 * config/spu/spu.c (spu_option_override):
1803 Use align_flags_tuple::get_value instead of removed macros.
1804 (spu_sched_init): Likewise.
1805 * config/spu/spu.h (GTY): Likewise.
1806 * config/visium/visium.c (visium_option_override):
1807 Set "8" as default secondary alignment.
1808 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
1809 in order to guarantee secondary alignment of 8.
1810 * coretypes.h: Include align.h header file.
1811 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
1812 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
1813 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
1814 * doc/tm.texi.in: Likewise.
1815 * final.c (struct label_alignment): Remove not used structure.
1816 (LABEL_ALIGN): Change type to align_flags.
1817 (LOOP_ALIGN): Likewise.
1818 (JUMP_ALIGN): Likewise.
1819 (default_loop_align_max_skip): Remove.
1820 (default_label_align_max_skip): Likewise.
1821 (default_jump_align_max_skip): Likewise.
1822 (default_label_align_after_barrier_max_skip):
1823 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
1824 (LABEL_TO_MAX_SKIP): Remove.
1825 (label_to_alignment): Return align_flags type instead of integer.
1826 (label_to_max_skip): Remove.
1827 (align_fuzz): Use align_flags type.
1828 (compute_alignments): Use align_flags type and use align_flags::max
1829 to combine multiple alignments.
1830 (grow_label_align): Grow vec instead of C array.
1831 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
1832 (shorten_branches): Use align_flags type and use align_flags::max
1833 to combine multiple alignments.
1834 (final_scan_insn_1): Remove usage of secondary alignment that comes
1835 from label alignment, but instead use proper secondary alignment
1836 which is computed in grow_label_align.
1837 * flags.h (struct align_flags_tuple): Move to align.h.
1838 (struct align_flags): Likewise.
1839 (state_align_loops): Rename to align_loops.
1840 (state_align_jumps): Rename to align_jumps.
1841 (state_align_labels): Rename to align_labels.
1842 (state_align_functions): Rename to align_functions.
1843 (align_loops_log): Remove.
1844 (align_jumps_log): Remove.
1845 (align_labels_log): Remove.
1846 (align_functions_log): Remove.
1847 (align_loops_max_skip): Remove.
1848 (align_jumps_max_skip): Remove.
1849 (align_labels_max_skip): Remove.
1850 (align_functions_max_skip): Remove.
1851 (align_loops_value): Remove.
1852 (align_jumps_value): Remove.
1853 (align_labels_value): Remove.
1854 (align_functions_value): Remove.
1855 * output.h (label_to_alignment): Change return type to align_flags.
1856 (label_to_max_skip): Remove.
1857 * target.def: Remove loop_align_max_skip, label_align_max_skip,
1858 jump_align_max_skip macros.
1859 * targhooks.h (default_loop_align_max_skip): Remove.
1860 (default_label_align_max_skip): Likewise.
1861 (default_jump_align_max_skip): Likewise.
1862 (default_label_align_after_barrier_max_skip): Remove.
1863 * toplev.c (read_log_maxskip): Use ::normalize function.
1864 (parse_N_M): Remove not used argument and also call ::normalize.
1865 (parse_alignment_opts): Do not pass unused arguments.
1866 * varasm.c (assemble_start_function): Use directly align_functions
1867 instead of removed macros.
1868 * system.h: Do not poison removed macros.
1869
1870 2018-07-17 Jakub Jelinek <jakub@redhat.com>
1871
1872 PR middle-end/86539
1873 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
1874 and cond temporaries don't have reference type if iterator has
1875 pointer type. For init use &for_pre_body instead of pre_p if
1876 for_pre_body is non-empty.
1877
1878 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1879
1880 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
1881 double-double modes to SFmode directly directly.
1882 (trunc<mode>sf2_fprs): Delete.
1883
1884 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1885
1886 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
1887 for conversions between IFmode and the decimal floating point modes.
1888 (init_float128_ieee): Use the correct names for conversions between
1889 KFmode and the decimal floating point modes.
1890
1891 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
1892
1893 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
1894 for the conversions between TDmode and IFmode.
1895 (init_float128_ieee): Use more correct names for the conversions
1896 between TDmode and KFmode.
1897
1898 2018-07-16 Jakub Jelinek <jakub@redhat.com>
1899
1900 PR tree-optimization/86526
1901 * builtins.c (expand_builtin_memcmp): Formatting fixes.
1902 (inline_expand_builtin_string_cmp): Likewise.
1903 (inline_string_cmp): Likewise. Use c_readstr instead of
1904 builtin_memcpy_read_str. Add unit_mode temporary.
1905
1906 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1907
1908 PR middle-end/86528
1909 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
1910 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
1911
1912 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
1913
1914 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
1915 Alphabetize prototypes of built-in functions, separating out
1916 built-in functions that are listed in this section but should be
1917 described elsewhere.
1918
1919 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
1920
1921 PR target/86511
1922 * expmed.c (emit_store_flag): Do not emit setcc followed by a
1923 conditional move when trapping comparison was split to a
1924 non-trapping one (and vice versa).
1925
1926 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1927
1928 * config/s390/s390.c (s390_function_profiler): Generate nops
1929 instead of profiler call sequences.
1930 * config/s390/s390.opt: Add the new option.
1931
1932 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1933
1934 * config/s390/s390.c (s390_function_profiler): Generate
1935 __mcount_loc section.
1936 * config/s390/s390.opt: Add the new option.
1937
1938 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
1939
1940 * common.opt: Add the new warning.
1941 * config/s390/s390.c (s390_function_profiler): Emit "brasl
1942 %r0,__fentry__" when -mfentry is specified.
1943 (s390_option_override_internal): Disallow -mfentry for 31-bit
1944 CPUs.
1945 * config/s390/s390.opt: Add the new option.
1946
1947 2018-07-16 Richard Biener <rguenther@suse.de>
1948
1949 PR lto/86523
1950 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
1951 for function-local FUNCTION_DECL and RESULT_DECL immediately.
1952
1953 2018-07-16 Martin Liska <mliska@suse.cz>
1954
1955 PR ipa/86529
1956 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
1957 to ::get_create.
1958
1959 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1960
1961 * config/arc/arcHS.md: Update ARCHS scheduling rules.
1962
1963 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
1964
1965 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
1966 for ARCHS4x.
1967 * config/arc/arc-cpus.def (hs4x): New cpu.
1968 (hs4xd): Likewise.
1969 * config/arc/arc-tables.opt: Regenerate.
1970 * config/arc/arc.c (arc_sched_issue_rate): New function.
1971 (TARGET_SCHED_ISSUE_RATE): Define.
1972 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
1973 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
1974 fpu_cvt.
1975 (attr tune): Add ARCHS4x tune values.
1976 (attr tune_dspmpy): Define.
1977 (*tst): Correct instruction type.
1978 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
1979 * config/arc/arcHS4x.md: New file.
1980 * config/arc/fpu.md: Update instruction type attributes.
1981 * config/arc/t-multilib: Regenerate.
1982
1983 2018-07-16 Tom de Vries <tdevries@suse.de>
1984
1985 PR debug/86455
1986 * var-tracking.c (vt_initialize): Fix pre_dec handling.
1987
1988 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
1989
1990 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
1991 early clobber.
1992
1993 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
1994
1995 PR tree-optimization/86514
1996 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
1997 conversion to a boolean type from a type with greater precision.
1998
1999 2018-07-16 Tom de Vries <tdevries@suse.de>
2000
2001 * var-tracking.c (vt_initialize): Print adjusted insn slim if
2002 dump_flags request TDF_SLIM.
2003
2004 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
2005
2006 * fold-const.c (int_const_binop_1): Abstract...
2007 (wide_int_binop): ...wide int code here.
2008 (poly_int_binop): ...poly int code here.
2009 Abstract the rest of int_const_binop_1 into int_const_binop.
2010 * fold-const.h (wide_int_binop): New.
2011 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
2012 Remove useless PLUS/MINUS_EXPR case.
2013 (zero_nonzero_bits_from_vr): Move wide int code...
2014 (zero_nonzero_bits_from_bounds): ...here.
2015 (extract_range_from_binary_expr_1): Move mask optimization code...
2016 (range_easy_mask_min_max): ...here.
2017 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
2018 (range_easy_mask_min_max): New.
2019
2020 2018-07-15 Jeff Law <law@redhat.com>
2021
2022 PR target/85993
2023 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
2024 block.
2025
2026 2018-07-14 Jim Wilson <jimw@sifive.com>
2027
2028 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2029
2030 2018-07-14 Paul Koning <ni1d@arrl.net>
2031
2032 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2033
2034 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
2035
2036 * lto-streamer-out.c (copy_function_or_variable): Dump info about
2037 copying section.
2038
2039 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
2040 Steve Munroe <munroesj52@gmail.com>
2041
2042 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
2043 (_mm_andnot_si128): Likewise.
2044 (_mm_or_si128): Likewise.
2045 (_mm_xor_si128): Likewise.
2046
2047 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
2048
2049 PR middle-end/78809
2050 * builtins.c (expand_builtin_memcmp): Inline the calls first
2051 when result_eq is false.
2052 (expand_builtin_strcmp): Inline the calls first.
2053 (expand_builtin_strncmp): Likewise.
2054 (inline_string_cmp): New routine. Expand a string compare
2055 call by using a sequence of char comparison.
2056 (inline_expand_builtin_string_cmp): New routine. Inline expansion
2057 a call to str(n)cmp/memcmp.
2058 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
2059 New option.
2060 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2061
2062 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
2063
2064 * config/arm/driver-arm.c: Include arm-native.h.
2065 (host_detect_local_cpu): Use auto-generated data tables.
2066 (vendors, arm_cpu_table): Delete. Move part information to ...
2067 * config/arm/arm-cpus.in: ... here.
2068 * config/arm/parsecpu.awk (gen_native): New function.
2069 (vendor, part): New CPU fields.
2070 (END): Add support for building the native CPU detection tables.
2071 * config/arm/t-arm (arm-native.h): Add build rule.
2072 (driver-arm.o): Add dependency on arm-native.h.
2073
2074 2018-07-13 Richard Biener <rguenther@suse.de>
2075
2076 PR middle-end/85974
2077 * match.pd (addr1 - addr2): Allow either of the operand to
2078 have a conversion.
2079
2080 2018-07-13 Tom de Vries <tdevries@suse.de>
2081
2082 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
2083 in remap_ssa_name.
2084
2085 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
2086
2087 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
2088 arrays instead of numbered variables.
2089
2090 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
2093 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2094
2095 2018-07-13 Richard Biener <rguenther@suse.de>
2096
2097 PR debug/86452
2098 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
2099 instead of get_context_die.
2100
2101 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2102 Richard Biener <rguenther@suse.de>
2103
2104 PR middle-end/86489
2105 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
2106 that the loop latch destination where phi is defined.
2107
2108 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
2109
2110 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
2111 (riscv_expand_epilogue): Add assertion to check interrupt mode.
2112 (riscv_set_current_function): Extract getting interrupt type to new
2113 function.
2114 (riscv_get_interrupt_type): New function.
2115 (riscv_merge_decl_attributes): New function, checking interrupt type is
2116 same.
2117 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
2118
2119 2018-07-12 Paul Koning <ni1d@arrl.net>
2120
2121 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
2122 directive.
2123
2124 2018-07-12 Paul Koning <ni1d@arrl.net>
2125
2126 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
2127 zero reference, add doloop_end instead.
2128 * doc/md.texi (decrement_and_branch_until_zero): Remove.
2129 (Looping patterns): Remove decrement_and_branch_until_zero. Add
2130 detail for doloop_end.
2131
2132 2018-07-12 Martin Sebor <msebor@redhat.com>
2133
2134 PR c/86453
2135 * attribs.c (decl_attributes): Reject conflicting attributes before
2136 calling attribute handlers.
2137
2138 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2139
2140 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
2141 parameter.
2142 (gcc::dump_manager::get_dump_file_name): likewise.
2143 (dump_begin): Likewise.
2144 * dumpfile.h (dump_begin): Update prototype.
2145 (gcc::dump_manager::get_dump_file_name,
2146 gcc::dump_manager::get_dump_file_name): Update prototype.
2147
2148 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2149
2150 * internal-fn.h (vectorizable_internal_fn_p): New function.
2151 * tree-vect-slp.c (compatible_calls_p): Likewise.
2152 (vect_build_slp_tree_1): Remove nops argument. Handle calls
2153 to internal functions.
2154 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2155
2156 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2157
2158 * fold-const.h (inverse_conditions_p): Declare.
2159 * fold-const.c (inverse_conditions_p): New function.
2160 * match.pd: Use inverse_conditions_p. Add folds of view_converts
2161 that test the inverse condition of a conditional internal function.
2162 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
2163 * internal-fn.c (internal_fn_mask_index): Handle conditional
2164 internal functions.
2165 (vectorized_internal_fn_supported_p): New function.
2166 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
2167 (any_pred_load_store): Replace with...
2168 (need_to_predicate): ...this new variable.
2169 (redundant_ssa_names): New variable.
2170 (ifcvt_can_use_mask_load_store): Move initial checks to...
2171 (ifcvt_can_predicate): ...this new function. Handle tree codes
2172 for which a conditional internal function exists.
2173 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
2174 instead of ifcvt_can_use_mask_load_store. Update after variable
2175 name change.
2176 (predicate_load_or_store): New function, split out from
2177 predicate_mem_writes.
2178 (check_redundant_cond_expr): New function.
2179 (value_available_p): Likewise.
2180 (predicate_rhs_code): Likewise.
2181 (predicate_mem_writes): Rename to...
2182 (predicate_statements): ...this. Use predicate_load_or_store
2183 and predicate_rhs_code.
2184 (combine_blocks, tree_if_conversion): Update after above name changes.
2185 (ifcvt_local_dce): Handle redundant_ssa_names.
2186 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
2187 general conditional functions.
2188 * tree-vect-stmts.c (vectorizable_call): Likewise.
2189
2190 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2191 Alan Hayward <alan.hayward@arm.com>
2192 David Sherwood <david.sherwood@arm.com>
2193
2194 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
2195 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
2196 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
2197 plus and minus and convert them into IFN_COND_FMA-based sequences.
2198 (convert_mult_to_fma): Handle conditional plus and minus.
2199
2200 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2201
2202 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
2203 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
2204 (cond_fnms_optab): New optabs.
2205 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
2206 internal functions.
2207 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
2208 * internal-fn.h (get_conditional_internal_fn): Declare.
2209 (get_unconditional_internal_fn): Likewise.
2210 * internal-fn.c (cond_ternary_direct): New macro.
2211 (expand_cond_ternary_optab_fn): Likewise.
2212 (direct_cond_ternary_optab_supported_p): Likewise.
2213 (FOR_EACH_COND_FN_PAIR): Likewise.
2214 (get_conditional_internal_fn): New function.
2215 (get_unconditional_internal_fn): Likewise.
2216 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
2217 (gimple_match_op::gimple_match_op): Add a new overload for 5
2218 operands.
2219 (gimple_match_op::set_op): Likewise.
2220 (gimple_resimplify5): Declare.
2221 * genmatch.c (decision_tree::gen): Generate simplifications for
2222 5 operands.
2223 * gimple-match-head.c (gimple_simplify): Define an overload for
2224 5 operands. Handle calls with 5 arguments in the top-level overload.
2225 (convert_conditional_op): Handle conversions from unconditional
2226 internal functions to conditional ones.
2227 (gimple_resimplify5): New function.
2228 (build_call_internal): Pass a fifth operand.
2229 (maybe_push_res_to_seq): Likewise.
2230 (try_conditional_simplification): Try converting conditional
2231 internal functions to unconditional internal functions.
2232 Handle 3-operand unconditional forms.
2233 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
2234 Define ternary equivalents of the current rules for binary conditional
2235 internal functions.
2236 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
2237 ternary operations.
2238 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
2239 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
2240 (optab): Handle them.
2241 (SVE_COND_FP_TERNARY): New int iterator.
2242 (sve_fmla_op, sve_fmad_op): New int attributes.
2243 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
2244 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
2245 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2246
2247 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
2248
2249 * target.def (preferred_else_value): New target hook.
2250 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
2251 * doc/tm.texi: Regenerate.
2252 * targhooks.h (default_preferred_else_value): Declare.
2253 * targhooks.c (default_preferred_else_value): New function.
2254 * internal-fn.h (conditional_internal_fn_code): Declare.
2255 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
2256 (get_conditional_internal_fn): Use it.
2257 (conditional_internal_fn_code): New function.
2258 * gimple-match.h (gimple_match_cond): New struct.
2259 (gimple_match_op): Add a cond member function.
2260 (gimple_match_op::gimple_match_op): Update all forms to take a
2261 gimple_match_cond.
2262 * genmatch.c (expr::gen_transform): Use the same condition as res_op
2263 for the suboperation, but don't specify a particular else_value.
2264 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
2265 (visit_nary_op, visit_reference_op_load): Pass
2266 gimple_match_cond::UNCOND to the gimple_match_op constructor.
2267 * gimple-match-head.c: Include tree-eh.h
2268 (convert_conditional_op): New function.
2269 (maybe_resimplify_conditional_op): Likewise.
2270 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
2271 (gimple_resimplify2): Likewise.
2272 (gimple_resimplify3): Likewise.
2273 (gimple_resimplify4): Likewise.
2274 (maybe_push_res_to_seq): Return null for conditional operations.
2275 (try_conditional_simplification): New function.
2276 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
2277 constructor.
2278 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
2279 IFN_COND_* call.
2280 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
2281 function.
2282 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
2283
2284 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
2285
2286 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
2287 DECL_FCONTEXT
2288 (hash_tree): Do not hash DECL_FCONTEXT
2289 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
2290 Do not stream DECL_FCONTEXT.
2291 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
2292 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2293
2294 2018-07-12 Richard Biener <rguenther@suse.de>
2295
2296 PR debug/86462
2297 * dwarf2out.c (gen_block_die): Only output blocks when they have
2298 at least one !DECL_IGNORED_P variable.
2299
2300 2018-07-12 Richard Biener <rguenther@suse.de>
2301
2302 PR target/84829
2303 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
2304 Remove -mieee-fp handling.
2305
2306 2018-07-12 Richard Biener <rguenther@suse.de>
2307
2308 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
2309 left-over from last patch.
2310
2311 2018-07-12 Jakub Jelinek <jakub@redhat.com>
2312
2313 PR tree-optimization/86492
2314 * gimple-ssa-store-merging.c
2315 (imm_store_chain_info::coalesce_immediate_stores): Call
2316 check_no_overlap even for the merge_overlapping case. Formatting fix.
2317
2318 2018-07-12 Richard Biener <rguenther@suse.de>
2319
2320 PR middle-end/86479
2321 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
2322 move possibly trapping operations into the conditional.
2323
2324 2018-07-12 Richard Biener <rguenther@suse.de>
2325
2326 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2327 (vn_lookup_simplify_result): Remove recursion limit applied
2328 here.
2329 (vn_nary_build_or_lookup_1): Adjust.
2330 (try_to_simplify): Likewise.
2331 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2332 here.
2333 (gimple_resimplify2): Likewise.
2334 (gimple_resimplify3): Likewise.
2335 (gimple_resimplify4): Likewise.
2336
2337 2018-07-11 Jakub Jelinek <jakub@redhat.com>
2338
2339 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
2340 Use __mmask64 type instead of __mmask8 for __M argument.
2341 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
2342 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
2343 __U argument.
2344 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
2345 __mmask16 for __M argument.
2346 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
2347 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
2348 to __mmask16 instead of __mmask8.
2349 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
2350 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
2351 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
2352 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
2353 instead of __mmask16 for __U argument.
2354 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
2355 __mmask16 instead of __mmask8 for __U argument.
2356 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
2357 __U argument.
2358 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
2359 __mmask16.
2360 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
2361 argument.
2362 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
2363 __U argument.
2364 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
2365 __mmask16.
2366 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
2367 of __mmask16.
2368 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
2369 __U argument.
2370 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
2371 __U argument.
2372 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
2373 __U argument.
2374 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
2375 __U argument.
2376 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
2377 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
2378 return type as well as __M argument type and all casts from __mmask8
2379 to __mmask32.
2380 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
2381 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
2382 return type as well as __M argument type and all casts from __mmask8
2383 to __mmask16.
2384 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
2385 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
2386 return type as well as __M argument type and all casts from __mmask8
2387 to __mmask32.
2388 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
2389 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
2390 return type as well as __M argument type and all casts from __mmask8
2391 to __mmask16.
2392 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
2393 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
2394 __mmask16.
2395
2396 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
2397
2398 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
2399 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
2400 for __U argument.
2401
2402 2018-07-11 Paul Koning <ni1d@arrl.net>
2403
2404 * doc/md.texi (define_subst): Document how multiple occurrences of
2405 the same argument in the replacement pattern are handled.
2406
2407 2018-07-11 Paul Koning <ni1d@arrl.net>
2408
2409 * doc/extend.texi (Common Variable Attributes): Move "mode" into
2410 alphabetical order.
2411 (Common Type Attributes): Add "mode" attribute.
2412
2413 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
2414
2415 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
2416 stream DECL_ORIGINAL_TYPE.
2417 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
2418 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
2419 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
2420 Do not walk original type.
2421 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
2422 external decls.
2423 (write_ts_decl_non_common_tree_pointers): Do not stream
2424 DECL_ORIGINAL_TYPE
2425 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
2426 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2427
2428 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2429
2430 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
2431 thread twice from the same starting edge.
2432
2433 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
2434
2435 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
2436 * gimple.c (gimple_call_nonnull_result_p): ...here...
2437 (gimple_call_nonnull_arg): ...and here.
2438 * gimple.h (gimple_call_nonnull_result_p): New.
2439 (gimple_call_nonnull_arg): New.
2440
2441 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
2442
2443 * config/arm/arm-cpus.in: Move information from fpu field of each
2444 cpu definition to the isa field.
2445 * config/arm/parsecpu.awk (fpu): Delete match rule.
2446 (gen_comm_data): Don't add bits from the CPU's FPU entry.
2447
2448 2018-07-11 Richard Biener <rguenther@suse.de>
2449
2450 PR debug/86457
2451 * dwarf2out.c (init_sections_and_labels): Use
2452 output_asm_line_debug_info consistently.
2453 (dwarf2out_early_finish): Likewise.
2454 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
2455 type units.
2456
2457 2018-07-11 Richard Biener <rguenther@suse.de>
2458
2459 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
2460 Rework father_bb setting in a way to avoid propagating constants
2461 multiple times on a loop body.
2462
2463 2018-07-10 Mark Wielaard <mark@klomp.org>
2464
2465 PR debug/86459
2466 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2467
2468 2018-07-10 Richard Biener <rguenther@suse.de>
2469
2470 * hash-map.h (hash_map::iterator::operator*): Return
2471 references to key and value.
2472
2473 2018-07-10 Jakub Jelinek <jakub@redhat.com>
2474
2475 PR c++/86443
2476 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
2477 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
2478 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
2479 (gimplify_omp_for): For composite loops, move outer
2480 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
2481 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
2482 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
2483 TREE_LIST for both the original class iterator and the "last" helper
2484 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
2485 loop, remember has_decl_expr from outer composite loops for the
2486 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2487
2488 2018-07-09 Martin Sebor <msebor@redhat.com>
2489
2490 PR middle-end/77357
2491 PR middle-end/86428
2492 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
2493 accessing implicitly initialized array elements.
2494 * expr.c (string_constant): Handle string initializers of
2495 character arrays within aggregates.
2496 * gimple-fold.c (fold_array_ctor_reference): Add argument.
2497 Store element offset. As a special case, handle zero size.
2498 (fold_nonarray_ctor_reference): Same.
2499 (fold_ctor_reference): Add argument. Store subobject offset.
2500 * gimple-fold.h (fold_ctor_reference): Add argument.
2501
2502 2018-07-09 Paul Koning <ni1d@arrl.net>
2503
2504 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
2505 (pdp11_insn_cost): New function.
2506 (pdp11_md_asm_adjust): New function.
2507 (TARGET_INVALID_WITHIN_DOLOOP): Define.
2508 (pdp11_rtx_costs): Update to match machine better.
2509 (output_addr_const_pdp11): Correct format mismatch warnings.
2510 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
2511 * config/pdp11/pdp11.md: General change to add base_cost and/or
2512 length attributes for use by new pdp11_insn_cost function.
2513 (MIN_BRANCH): Correct definition.
2514 (MIN_SOB): Ditto.
2515 (doloop_end): Use standard pattern name for looping pattern.
2516 (doloop_end_nocc): New.
2517 (movsf): Add another constraint alternative.
2518 (zero_extendqihi2): Add constraint alternatives for not in place
2519 extend.
2520 (zero_extendhisi2): Remove.
2521 (shift patterns): Add CC handling variants.
2522 (bswaphi2): New.
2523 (bswapsi2): New.
2524 (rothi3): New.
2525 (define_peephole2): New peephole to recognize mov that sets CC for
2526 subsequent test.
2527
2528 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2529
2530 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
2531 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
2532 wi::add.
2533
2534 2018-07-09 Jakub Jelinek <jakub@redhat.com>
2535
2536 PR c/86420
2537 * real.c (real_nextafter): Return true if result is denormal.
2538
2539 2018-07-09 Martin Liska <mliska@suse.cz>
2540
2541 * common.opt: Add back wrongly removed attribute.
2542
2543 2018-07-09 Richard Biener <rguenther@suse.de>
2544
2545 PR debug/86413
2546 * dwarf2out.c (gen_block_die): For an early generated DIE
2547 always output high/low PC attributes.
2548
2549 2018-07-09 Tom de Vries <tdevries@suse.de>
2550
2551 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
2552 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
2553 onto VAR_DECL with abstract origin.
2554
2555 2018-07-07 Jim Wilson <jimw@sifive.com>
2556
2557 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2558
2559 2018-07-07 Tom de Vries <tdevries@suse.de>
2560
2561 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2562
2563 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
2564
2565 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
2566 overflow_type.
2567 (combine_bound): Use wide-int overflow calculation instead of
2568 rolling our own.
2569 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
2570 overflow_type.
2571 * fold-const.c (int_const_binop_2): Same.
2572 (extract_muldiv_1): Same.
2573 (fold_div_compare): Same.
2574 (fold_abs_const): Same.
2575 * match.pd: Same.
2576 * poly-int.h (add): Same.
2577 (sub): Same.
2578 (neg): Same.
2579 (mul): Same.
2580 * predict.c (predict_iv_comparison): Same.
2581 * profile-count.c (slow_safe_scale_64bit): Same.
2582 * simplify-rtx.c (simplify_const_binary_operation): Same.
2583 * tree-chrec.c (tree_fold_binomial): Same.
2584 * tree-data-ref.c (split_constant_offset_1): Same.
2585 * tree-if-conv.c (idx_within_array_bound): Same.
2586 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
2587 * tree-ssa-phiopt.c (minmax_replacement): Same.
2588 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
2589 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
2590 * vr-values.c (vr_values::adjust_range_with_scev): Same.
2591 * wide-int.cc (wi::add_large): Same.
2592 (wi::mul_internal): Same.
2593 (wi::sub_large): Same.
2594 (wi::divmod_internal): Same.
2595 * wide-int.h: Change overflow type to overflow_type for neg, add,
2596 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
2597 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
2598 mul_internal, divmod_internal.
2599 (overflow_type): New enum.
2600 (accumulate_overflow): New.
2601
2602 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2603
2604 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
2605 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2606
2607 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2608
2609 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
2610 argument is checked for zero before entering loop, avoid checking again.
2611
2612 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
2613
2614 * gimplify.h (generic_expr_could_trap_p): Set as global function.
2615 * gimplify.h (generic_expr_could_trap_p): Likwise.
2616 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2617
2618 2018-07-06 Jakub Jelinek <jakub@redhat.com>
2619
2620 PR tree-optimization/86401
2621 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
2622 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
2623 (fold_bit_and_mask): ... here. New helper function for match.pd.
2624 * fold-const.h (fold_bit_and_mask): Declare.
2625 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2626
2627 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
2628
2629 PR target/86324
2630 * target.def (translate_mode_attribute): New hook.
2631 * targhooks.h (default_translate_mode_attribute): Declare.
2632 * targhooks.c (default_translate_mode_attribute): New function.
2633 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
2634 * doc/tm.texi: Regenerate.
2635 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
2636 (rs6000_translate_mode_attribute): New function.
2637
2638 2018-07-06 Paul Koning <ni1d@arrl.net>
2639
2640 * doc/md.texi (define_split): Document DONE and FAIL.
2641 (define_peephole2): Ditto.
2642
2643 2018-07-05 Jeff Law <law@redhat.com>
2644
2645 PR tree-optimization/86010
2646 * tree-ssa-dse.c (compute_trims): More aggressively trim at
2647 both the head and tail of mem* and str* calls.
2648
2649 2018-07-05 Jim Wilson <jimw@sifive.com>
2650
2651 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2652
2653 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
2654
2655 * config/aarch64/aarch64-simd.md: correct flags text for
2656 MIN_EXPR replacement.
2657
2658 2018-07-05 James Clarke <jrtc27@jrtc27.com>
2659
2660 * configure: Regenerated.
2661
2662 2018-07-05 Carl Love <cel@us.ibm.com>
2663
2664 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
2665 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
2666 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
2667 VSX_BUILTIN_DOUBLEL_V4SF.
2668
2669 2018-07-05 Martin Sebor <msebor@redhat.com>
2670
2671 PR c++/86400
2672 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
2673 than its domain to compute its the upper bound of a char array.
2674
2675 2018-07-05 Nathan Sidwell <nathan@acm.org>
2676
2677 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
2678 * doc/cpp.texi: Update comment.
2679 * doc/tm.texi: Rebuilt.
2680 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
2681 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
2682 * doc/extend.texi (Backwards Compatibility): Clarify it is system
2683 headers affected by extern "C".
2684 * system.h: Poison NO_IMPLICIT_EXTERN_C.
2685 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
2686 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
2687 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
2688 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
2689 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
2690 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
2691 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
2692 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
2693 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
2694 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
2695 config/sparc/sp64-elf.h, config/spu/spu.h,
2696 config/stormy16/stormy16.h, config/v850/v850.h,
2697 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
2698 define NO_IMPLICIT_EXTERN_C.
2699 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2700
2701 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2702
2703 PR target/84711
2704 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
2705 instead of GET_MODE_SIZE when comparing Units.
2706
2707 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2708
2709 PR target/84711
2710 * rtlanal.c (set_noop_p): Constrain on mode change,
2711 include hard-reg-set.h
2712
2713 2018-07-05 Tamar Christina <tamar.christina@arm.com>
2714
2715 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2716
2717 2018-07-05 Jakub Jelinek <jakub@redhat.com>
2718
2719 Revert
2720 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2721
2722 PR sanitizer/84250
2723 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2724 libasan.
2725 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2726
2727 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
2728
2729 PR sanitizer/84250
2730 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
2731 libasan.
2732 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2733
2734 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
2735
2736 PR middle-end/86380
2737 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2738
2739 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
2740
2741 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
2742 neg_*_op* variables.
2743
2744 2018-07-04 Martin Liska <mliska@suse.cz>
2745
2746 * tree-switch-conversion.c: Define
2747 max_ratio_for_speed and max_ratio_for_size constants.
2748
2749 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2750 Martin Liska <mliska@suse.cz>
2751
2752 PR middle-end/66240
2753 PR target/45996
2754 PR c/84100
2755 * common.opt: Rename align options with 'str_' prefix.
2756 * common/config/i386/i386-common.c (set_malign_value): New
2757 function.
2758 (ix86_handle_option): Use it to set -falign-* options/
2759 * config/aarch64/aarch64-protos.h (struct tune_params): Change
2760 type from int to string.
2761 * config/aarch64/aarch64.c: Update default values from int
2762 to string.
2763 * config/alpha/alpha.c (alpha_override_options_after_change):
2764 Likewise.
2765 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
2766 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2767 max skip conditionally.
2768 * config/i386/freebsd.h (SUBALIGN_LOG): New.
2769 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2770 max skip conditionally.
2771 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2772 max skip conditionally.
2773 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
2774 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2775 max skip conditionally.
2776 * config/i386/i386.c (struct ptt): Change type from int to
2777 string.
2778 (ix86_default_align): Set default values.
2779 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
2780 max skip conditionally.
2781 * config/i386/iamcu.h (SUBALIGN_LOG): New.
2782 (ASM_OUTPUT_MAX_SKIP_ALIGN):
2783 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
2784 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2785 max skip conditionally.
2786 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
2787 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
2788 * config/i386/x86-64.h (SUBALIGN_LOG): New.
2789 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
2790 max skip conditionally.
2791 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2792 * config/ia64/ia64.c (ia64_option_override): Set default values
2793 for alignment options.
2794 * config/m68k/m68k.c: Handle new str_align_* options.
2795 * config/mips/mips.c (mips_set_compression_mode): Change
2796 type of constants.
2797 (mips_option_override): Set default values for options.
2798 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2799 Likewise.
2800 * config/rs6000/rs6000.c (rs6000_option_override_internal):
2801 Likewise.
2802 * config/rx/rx.c (rx_option_override): Likewise.
2803 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
2804 (LABEL_ALIGN): Use align_labels_log.
2805 (LOOP_ALIGN): Use align_loops_align.
2806 * config/s390/s390.c (s390_asm_output_function_label): Use new
2807 macros.
2808 * config/sh/sh.c (sh_override_options_after_change):
2809 Change type of constants.
2810 * config/spu/spu.c (spu_sched_init): Likewise.
2811 * config/sparc/sparc.c (sparc_option_override): Set default
2812 values for options.
2813 * config/visium/visium.c (visium_option_override): Likewise.
2814 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
2815 emit p2align format with last argument if it's not needed.
2816 * doc/invoke.texi: Document extended format of -falign-*.
2817 * final.c: Use align_labels alignment.
2818 * flags.h (struct target_flag_state): Change type to use
2819 align_flags.
2820 (struct align_flags_tuple): New.
2821 (struct align_flags): Likewise.
2822 (align_loops_log): Redefine macro to use new types.
2823 (align_loops_max_skip): Redefine macro to use new types.
2824 (align_jumps_log): Redefine macro to use new types.
2825 (align_jumps_max_skip): Redefine macro to use new types.
2826 (align_labels_log): Redefine macro to use new types.
2827 (align_labels_max_skip): Redefine macro to use new types.
2828 (align_functions_log): Redefine macro to use new types.
2829 (align_loops): Redefine macro to use new types.
2830 (align_jumps): Redefine macro to use new types.
2831 (align_labels): Redefine macro to use new types.
2832 (align_functions): Redefine macro to use new types.
2833 (align_functions_max_skip): Redefine macro to use new types.
2834 (align_loops_value): New macro.
2835 (align_jumps_value): New macro.
2836 (align_labels_value): New macro.
2837 (align_functions_value): New macro.
2838 * function.c (invoke_set_current_function_hook): Propagate
2839 alignment values from flags to global variables default in
2840 topleev.h.
2841 * ipa-icf.c (sem_function::equals_wpa): Use
2842 cl_optimization_option_eq instead of memcmp.
2843 * lto-streamer.h (cl_optimization_stream_out): Support streaming
2844 of string types.
2845 (cl_optimization_stream_in): Likewise.
2846 * optc-save-gen.awk: Support strings in cl_optimization.
2847 * opth-gen.awk: Likewise.
2848 * opts.c (finish_options): Remove error checking of invalid
2849 value ranges.
2850 (MAX_CODE_ALIGN): Remove.
2851 (MAX_CODE_ALIGN_VALUE): Likewise.
2852 (parse_and_check_align_values): New function.
2853 (check_alignment_argument): Likewise.
2854 (common_handle_option): Use check_alignment_argument.
2855 * opts.h (parse_and_check_align_values): Declare.
2856 * toplev.c (init_alignments): Remove.
2857 (read_log_maxskip): New.
2858 (parse_N_M): Likewise.
2859 (parse_alignment_opts): Likewise.
2860 (backend_init_target): Remove usage of init_alignments.
2861 * toplev.h (parse_alignment_opts): Declare.
2862 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
2863 argument.
2864 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
2865 * tree.c (cl_option_hasher::equal): New.
2866 * varasm.c: Use new global macros.
2867
2868 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
2869
2870 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
2871 Use a simpler align directive also if MAXSKIP = ALIGN-1.
2872 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2873 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2874 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2875 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
2876 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
2877 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
2878 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
2879 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2880 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2881 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2882 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2883
2884 2018-07-04 Martin Liska <mliska@suse.cz>
2885 Jonathan Wakely <jwakely@redhat.com>
2886
2887 * coverage.c: Use correct type.
2888 * doc/invoke.texi: Language correction.
2889
2890 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
2891
2892 PR target/85620
2893 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
2894 ENDBRANCH for non-tail call which may return via indirect branch.
2895 * doc/extend.texi: Document indirect_return attribute.
2896
2897 2018-07-03 Martin Sebor <msebor@redhat.com>
2898
2899 PR tree-optimization/86274
2900 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
2901 precondition.
2902 (format_floating): Correct handling of infinities and NaNs.
2903
2904 2018-07-03 Martin Sebor <msebor@redhat.com>
2905
2906 * print-tree.c (print_real_cst): New function.
2907 (print_node_brief): Call it.
2908 (print_node): Ditto.
2909
2910 2018-07-03 Jeff Law <law@redhat.com>
2911
2912 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
2913 into a single pattern.
2914
2915 * config/h8300/h8300.md (ors code_iterator): New.
2916 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
2917 a single pattern and single splitter.
2918 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
2919 (iorqi3_1, xorqi3_1): Likewise.
2920 (iorqi3, xorqi3 expanders): Similarly.
2921
2922 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
2923 (movmd_internal) into a single pattern using the P mode iterator.
2924 (movmd splitters): Similarly.
2925 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
2926 (movsd splitters): Similarly.
2927
2928 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
2929 ADDB, ADDW and ADDL into a single ADD attribute which selects the
2930 right table based on the size of the operand.
2931 * config/h8300/h8300.md (length_table): Corresponding changes. All
2932 references to "addb", "addw" and "addl" changed to "add".
2933 (btst patterns): Merge two variants into a single pattern.
2934 (tstqi, tsthi): Likewise.
2935 (addhi3_incdec, addsi3_incdec): Likewise.
2936 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
2937 (mulhi3, mulsi3): Likewise.
2938 (udivhi3, udivsi3): Likewise.
2939 (divhi3, divsi3): Likewise.
2940 (andorqi3, andorhi3, andorsi3): Likewise.
2941
2942 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
2943
2944 PR target/85694
2945 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
2946 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2947
2948 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
2949
2950 PR tree-optimization/85694
2951 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
2952 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
2953 UNSPEC_URHADD.
2954 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
2955 (<u>avg<mode>3_ceil): New patterns.
2956
2957 2018-07-03 David Malcolm <dmalcolm@redhat.com>
2958
2959 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
2960 scan-tree-dump directive.
2961 * gcc.dg/vect/slp-perm-2.c: Likewise.
2962 * gcc.dg/vect/slp-perm-3.c: Likewise.
2963 * gcc.dg/vect/slp-perm-5.c: Likewise.
2964 * gcc.dg/vect/slp-perm-6.c: Likewise.
2965 * gcc.dg/vect/slp-perm-7.c: Likewise.
2966 * gcc.dg/vect/slp-perm-8.c: Likewise.
2967
2968 2018-07-03 Marek Polacek <polacek@redhat.com>
2969
2970 PR middle-end/86202
2971 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2972
2973 2018-07-03 Richard Biener <rguenther@suse.de>
2974
2975 PR ipa/86389
2976 * tree-ssa-structalias.c (find_func_clobbers): Properly
2977 handle indirect calls.
2978
2979 2018-07-03 Jeff Law <law@redhat.com>
2980
2981 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
2982 (shifts): New code iterator.
2983 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
2984 expander. Fix HImode handling on H8/SX.
2985 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
2986 (subqi3, subhi3, subsi3 expanders): Likewise.
2987 (andqi3, andhi3, andsi3 expanders): Likewise.
2988 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
2989 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
2990 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
2991 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
2992 (zero_extendqihi2, zero_extendqisi2): Likewise.
2993 (extendqihi2, extendqisi2): Likewise.
2994 (rotlqi3, rotlhi3, rotlsi3): Likewise.
2995 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
2996 (rotlqi3_1, rotlhi3_1): Likewise.
2997 (logicalhi3_sn, logicalsi3_sn): Likewise.
2998 (logicalhi3, logicalsi3): Likewise.
2999
3000 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3001
3002 * tree-vect-patterns.c (vect_recog_rotate_pattern)
3003 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3004 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
3005 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
3006 type to append_pattern_def_seq instead of creating a stmt_vec_info
3007 directly.
3008 (build_mask_conversion): Likewise. Remove vinfo argument.
3009 (vect_add_conversion_to_patterm): Likewise, renaming to...
3010 (vect_add_conversion_to_pattern): ...this.
3011 (vect_recog_mask_conversion_pattern): Update call to
3012 build_mask_conversion. Pass the vector type to
3013 append_pattern_def_seq here too.
3014 (vect_recog_gather_scatter_pattern): Update call to
3015 vect_add_conversion_to_pattern.
3016
3017 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3018
3019 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
3020 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3021 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
3022 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
3023 STMT_VINFO_PATTERN_DEF_SEQ to null here.
3024 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
3025 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
3026 append_pattern_def_seq instead of new_pattern_def_seq.
3027 (vect_recog_divmod_pattern): Do both of the above.
3028 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
3029 is null.
3030
3031 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3032
3033 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
3034 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
3035 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
3036 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
3037 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
3038 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3039 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
3040 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
3041 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
3042 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
3043 parameter with a single stmt_vec_info.
3044 (vect_recog_func_ptr): Likewise.
3045 (vect_recog_gather_scatter_pattern): Likewise, folding in...
3046 (vect_try_gather_scatter_pattern): ...this.
3047 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
3048 the stmt_vec_info of the statement to be matched. Don't clear
3049 STMT_VINFO_RELATED_STMT.
3050 (vect_pattern_recog): Update call accordingly.
3051
3052 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3053
3054 PR tree-optimization/85694
3055 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
3056 (uavgM3_ceil): Document new optabs.
3057 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
3058 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
3059 functions.
3060 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
3061 (savg_ceil_optab): New optabs.
3062 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
3063 (vect_vect_recog_func_ptrs): Add it.
3064 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
3065 constant directly from the associated lhs.
3066
3067 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3068
3069 * tree-vect-patterns.c (vect_split_statement): New function.
3070 (vect_convert_input): Use it to try to split an existing cast.
3071
3072 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3073
3074 * poly-int.h (print_hex): New function.
3075 * dumpfile.h (dump_dec, dump_hex): Declare.
3076 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
3077 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
3078 min_input_precision, operation_precision and operation_sign.
3079 * tree-vect-patterns.c (vect_get_range_info): New function.
3080 (vect_same_loop_or_bb_p, vect_single_imm_use)
3081 (vect_operation_fits_smaller_type): Delete.
3082 (vect_look_through_possible_promotion): Add an optional
3083 single_use_p parameter.
3084 (vect_recog_over_widening_pattern): Rewrite to use new
3085 stmt_vec_info infomration. Handle one operation at a time.
3086 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
3087 (vect_truncatable_operation_p, vect_set_operation_type)
3088 (vect_set_min_input_precision): New functions.
3089 (vect_determine_min_output_precision_1): Likewise.
3090 (vect_determine_min_output_precision): Likewise.
3091 (vect_determine_precisions_from_range): Likewise.
3092 (vect_determine_precisions_from_users): Likewise.
3093 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
3094 (vect_vect_recog_func_ptrs): Put over_widening first.
3095 Add cast_forwprop.
3096 (vect_pattern_recog): Call vect_determine_precisions.
3097
3098 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
3099
3100 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
3101 statements that have been replaced by further pattern statements.
3102 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
3103
3104 2018-07-03 Richard Biener <rguenther@suse.de>
3105
3106 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
3107 always set *dt. Dump vectype in vectype overload.
3108 * dumpfile.h (dump_gimple_expr): New function.
3109 (dump_gimple_expr_loc): Likewise.
3110 * dumpfile.c (dump_gimple_expr): New function.
3111 (dump_gimple_expr_loc): Likewise.
3112
3113 2018-07-02 Jeff Law <law@redhat.com>
3114
3115 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
3116 the H8/300, H8/300H and H8/S variants into a single pattern.
3117 (movhi_h8300, movqi_h8300hs): Similarly.
3118 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
3119 (QHI mode iterator): New.
3120
3121 * config/h8300/h8300.md: Remove trailing whitespace.
3122
3123 2018-07-02 Jim Wilson <jimw@sifive.com>
3124
3125 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
3126 instead of emit_insn for interrupt returns.
3127 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
3128 (riscv_sret, riscv_uret): Likewise.
3129
3130 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3131
3132 * pretty-print.c (selftest::test_pp_format): Move save and restore
3133 of quotes to class auto_fix_quotes, and add an instance.
3134 * selftest.c: Include "intl.h".
3135 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
3136 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
3137 * selftest.h (selftest::auto_fix_quotes): New class.
3138
3139 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
3140
3141 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
3142 (aarch64_sve_prepare_conditional_op): Remove.
3143 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
3144 Allow aarch64_simd_reg_or_zero as select operand; remove
3145 the aarch64_sve_prepare_conditional_op call.
3146 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
3147 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3148 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
3149 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
3150 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
3151 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
3152 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
3153 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
3154 and a splitters to match all of the *_any patterns.
3155 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
3156
3157 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
3158 (SVE_COND_FP_BINARY_REV): Remove.
3159 (sve_int_op_rev, sve_fp_op_rev): New.
3160 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
3161 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
3162 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
3163 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
3164 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
3165 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
3166 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
3167 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
3168 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
3169
3170 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
3171 Remove match_dup 1 from the inner unspec.
3172 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
3173
3174 * config/aarch64/aarch64.md (movprfx): New attr.
3175 (length): Default movprfx to 8.
3176 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
3177 (*madd<SVE_I>, *msub<SVE_I): Likewise.
3178 (*<su>mul<SVE_I>3_highpart): Likewise.
3179 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
3180 (*v<ASHIFT><SVE_I>3): Likewise.
3181 (*<su><MAXMIN><SVE_I>3): Likewise.
3182 (*<su><MAXMIN><SVE_F>3): Likewise.
3183 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
3184 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
3185 (*div<SVE_F>4): Likewise.
3186
3187 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
3188
3189 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
3190 in dump string.
3191
3192 2018-07-02 Richard Biener <rguenther@suse.de>
3193
3194 PR tree-optimization/86363
3195 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
3196 memset argument refers to a non-variable address.
3197
3198 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3199
3200 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
3201 {PLUS,MINUS}_EXPR code to...
3202 (adjust_symbolic_bound): ...here,
3203 (combine_bound): ...here,
3204 (set_value_range_with_overflow): ...and here.
3205
3206 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
3207
3208 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
3209 code...
3210 (extract_range_from_abs_expr): ...here.
3211
3212 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3213
3214 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3215 -fno-omit-frame-pointer when not optimizing.
3216
3217 2018-07-02 Martin Liska <mliska@suse.cz>
3218
3219 PR ipa/86279
3220 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
3221 (propagate_nothrow): Likewise.
3222
3223 2018-07-02 Martin Liska <mliska@suse.cz>
3224
3225 PR ipa/86323
3226 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
3227
3228 2018-07-02 David Malcolm <dmalcolm@redhat.com>
3229
3230 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
3231 function in r262149, changing "loc" param from source_location to
3232 const dump_location_t &.
3233 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
3234 declaration, as above.
3235
3236 2018-07-01 Paul Koning <ni1d@arrl.net>
3237
3238 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3239 -munit-asm, -mgnu-asm, -mdec-asm.
3240 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
3241 (pdp11_output_labelref): New.
3242 (pdp11_output_def): New.
3243 (pdp11_output_addr_vec_elt): New.
3244 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
3245 %# and %@ format codes.
3246 (pdp11_option_override): New.
3247 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
3248 (pdp11_output_ident): New.
3249 (pdp11_asm_named_section): New.
3250 (pdp11_asm_init_sections): New.
3251 (pdp11_file_start): New.
3252 (pdp11_file_end): New.
3253 (output_ascii): Use .ascii/.asciz for -mdec-asm.
3254 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
3255 %o, like %c but octal.
3256 (pdp11_option_override): New.
3257 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
3258 -mdec-asm.
3259 (DATA_SECTION_ASM_OP): Ditto.
3260 (READONLY_DATA_SECTION_ASM_OP): New.
3261 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
3262 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
3263 (ASM_OUTPUT_LABELREF): Ditto.
3264 (ASM_OUTPUT_DEF): Ditto.
3265 (ASM_OUTPUT_EXTERNAL): New.
3266 (ASM_OUTPUT_SOURCE_FILENAME): New.
3267 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
3268 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
3269 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
3270 %# and %@ format codes.
3271 * config/pdp11/pdp11.opt (mgnu-asm): New.
3272 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
3273 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
3274 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
3275
3276 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
3277
3278 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
3279 dereferencing path[] beyond its length.
3280 (debug_path): New.
3281 (debug_all_paths): New.
3282 (rewire_first_differing_edge): New.
3283 (adjust_paths_after_duplication): New.
3284 (duplicate_thread_path): Call adjust_paths_after_duplication.
3285 Add new argument.
3286 (thread_through_all_blocks): Add new argument to
3287 duplicate_thread_path.
3288
3289 2018-06-30 Jim Wilson <jimw@sifive.com>
3290
3291 * config/riscv/predicates.md (p2m1_shift_operand): New.
3292 (high_mask_shift_operand): New.
3293 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
3294 pattern using p2m1_shift_operand.
3295 (lshsi3_zero_extend_3+2): New combiner pattern using
3296 high_mask_shift_operand.
3297
3298 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3299
3300 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
3301 split out from...
3302 (vect_recog_rotate_pattern): ...here.
3303 (vect_convert_input): Try to insert casts of invariants in the
3304 preheader.
3305 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
3306 preheader to be empty.
3307
3308 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3309
3310 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
3311 vector type. If given, install it in the new statement's
3312 STMT_VINFO_VECTYPE.
3313 (vect_element_precision): New function.
3314 (vect_unpromoted_value): New struct.
3315 (vect_unpromoted_value::vect_unpromoted_value): New function.
3316 (vect_unpromoted_value::set_op): Likewise.
3317 (vect_look_through_possible_promotion): Likewise.
3318 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
3319 (vect_widened_op_tree, vect_convert_input): Likewise.
3320 (vect_convert_inputs, vect_convert_output): Likewise.
3321 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
3322 to handle the optional cast of the multiplication result and
3323 vect_widened_op_tree to detect the widened multiplication itself.
3324 Do not require the input and output of promotion casts to have
3325 the same sign, but base the signedness of the operation on the
3326 input rather than the result. If the pattern includes two
3327 promotions, check that those promotions have the same sign.
3328 Do not restrict the MULT_EXPR handling to a double-width result;
3329 handle quadruple-width results and wider. Use vect_convert_inputs
3330 to convert the inputs to the common type.
3331 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
3332 to handle the optional cast of the ABS result. Also allow a sign
3333 change or a sign extension between the ABS and MINUS.
3334 Use vect_widened_op_tree to detect the widened subtraction and use
3335 vect_convert_inputs to convert the inputs to the common type.
3336 (vect_handle_widen_op_by_const): Delete.
3337 (vect_recog_widen_op_pattern): New function.
3338 (vect_recog_widen_mult_pattern): Use it.
3339 (vect_recog_widen_shift_pattern): Likewise.
3340 (vect_recog_widen_sum_pattern): Use
3341 vect_look_through_possible_promotion to handle the promoted
3342 PLUS_EXPR operand.
3343
3344 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3345
3346 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
3347 the containing gimple_seq *.
3348 * gimple-iterator.h (gsi_for_stmt): Declare it.
3349 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
3350 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
3351 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
3352 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
3353 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
3354 checks.
3355 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
3356 split out from...
3357 (vect_mark_pattern_stmts): ...here. Handle cases in which the
3358 statement being replaced is part of an existing pattern
3359 definition sequence, inserting the new pattern statements before
3360 the original one.
3361 (vect_pattern_recog_1): Don't return a bool. If the statement
3362 is already part of a pattern, instead apply pattern matching
3363 to the pattern definition statements. Don't clear the
3364 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
3365 (vect_pattern_recog): Don't break after the first match;
3366 continue processing the pattern definition statements instead.
3367 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
3368
3369 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3370
3371 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
3372 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
3373 (vect_recog_widen_sum_pattern): Use it.
3374
3375 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3376
3377 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3378 phi is not a pattern statement and has not been replaced by
3379 a pattern statement.
3380 * tree-vect-patterns.c (type_conversion_p): Don't check
3381 STMT_VINFO_IN_PATTERN_P.
3382 (vect_recog_vector_vector_shift_pattern): Likewise.
3383 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
3384 the pattern statement rather than the original statement; check
3385 directly for a WIDEN_MULT_EXPR here.
3386 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
3387 vect_is_simple_use to return the pattern statement rather
3388 than the original statement; use is_pattern_stmt_p to check
3389 for such a pattern statement.
3390 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
3391 to return the pattern statement rather than the original statement;
3392 don't do the same transformation here.
3393 (vect_is_simple_use): If the defining statement has been replaced
3394 by a pattern statement, return the pattern statement instead.
3395 Remove the corresponding (local) transformation from the vectype
3396 overload.
3397
3398 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
3399
3400 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
3401 end and default to null.
3402 * tree-vect-loop.c (vect_create_epilog_for_reduction)
3403 (vectorizable_reduction): Update calls accordingly, dropping the
3404 gimple ** argument if the passed-back statement isn't needed.
3405 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
3406 (vect_recog_rotate_pattern): Likewise.
3407 (vect_recog_mask_conversion_pattern): Likewise.
3408 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3409 (vect_mask_constant_operand_p): Likewise.
3410 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
3411 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
3412 (get_group_load_store_type, get_load_store_type): Likewise.
3413 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
3414 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
3415 (vectorizable_conversion, vectorizable_assignment): Likewise.
3416 (vectorizable_shift, vectorizable_operation): Likewise.
3417 (vectorizable_store, vect_is_simple_cond): Likewise.
3418 (vectorizable_condition, vectorizable_comparison): Likewise.
3419 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
3420 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
3421 and move it to the end. Cope with null def_stmt_outs.
3422
3423 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3424
3425 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
3426
3427 2018-06-29 Jeff Law <law@redhat.com>
3428
3429 * config/v850/v850.c (v850_legitimate_address_p): Handle large
3430 displacements for TARGET_V850E2V3 and newer.
3431 (TARGET_LRA_P): Remove. Defaults to LRA now.
3432 * config/v850/v850.md (sign23byte_load): Remove.
3433 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
3434 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
3435
3436 2018-06-29 Martin Liska <mliska@suse.cz>
3437
3438 PR lto/85759
3439 * coverage.c (coverage_init): Mangle full path name.
3440 * doc/invoke.texi: Document the change.
3441 * gcov-io.c (mangle_path): New.
3442 * gcov-io.h (mangle_path): Likewise.
3443 * gcov.c (mangle_name): Use mangle_path for path mangling.
3444
3445 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3446
3447 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
3448 if starting source register is not even.
3449
3450 2018-06-29 Martin Liska <mliska@suse.cz>
3451
3452 PR tree-optimization/86263
3453 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
3454 Make edge redirection.
3455
3456 2018-06-29 David Malcolm <dmalcolm@redhat.com>
3457
3458 * dumpfile.c (dump_loc): Add indentation based on scope depth.
3459 (dump_scope_depth): New variable.
3460 (get_dump_scope_depth): New function.
3461 (dump_begin_scope): New function.
3462 (dump_end_scope): New function.
3463 * dumpfile.h (get_dump_scope_depth): New declaration.
3464 (dump_begin_scope): New declaration.
3465 (dump_end_scope): New declaration.
3466 (class auto_dump_scope): New class.
3467 (AUTO_DUMP_SCOPE): New macro.
3468 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
3469 AUTO_DUMP_SCOPE.
3470
3471 2018-06-29 Richard Biener <rguenther@suse.de>
3472
3473 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
3474 compute_all_dependences succeeds.
3475 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
3476 exceed --param loop-max-datarefs-for-datadeps.
3477
3478 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3479
3480 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3481
3482 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
3483
3484 PR target/86348
3485 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
3486 alternative 0 in preferred_for_speed attribute.
3487
3488 2018-06-28 Paul Koning <ni1d@arrl.net>
3489
3490 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
3491 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
3492 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
3493 * config/pdp11/pdp11.md: Correct "length" attribute calculation
3494 for shift insn patterns.
3495
3496 2018-06-28 David Malcolm <dmalcolm@redhat.com>
3497
3498 * cgraph.c (cgraph_node::get_body): Replace assignments to
3499 "dump_file" with calls to set_dump_file.
3500 * dumpfile.c (alt_dump_file): Make static, and group with...
3501 (alt_flags): ...this definition.
3502 (dumps_are_enabled): New variable.
3503 (refresh_dumps_are_enabled): New function.
3504 (set_dump_file): New function.
3505 (set_alt_dump_file): New function.
3506 (gcc::dump_manager::dump_start): Replace assignments to
3507 "dump_file" and "alt_dump_file" with calls to set_dump_file and
3508 set_alt_dump_file.
3509 (gcc::dump_manager::dump_finish): Likewise.
3510 * dumpfile.h (alt_dump_file): Delete decl.
3511 (dumps_are_enabled): New variable decl.
3512 (set_dump_file): New function decl.
3513 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
3514 global.
3515 * tree-nested.c (lower_nested_functions): Replace assignments to
3516 "dump_file" with calls to set_dump_file.
3517
3518 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3519
3520 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
3521 goto_locus of each outgoing edge of each basic block.
3522
3523 2018-06-28 Richard Biener <rguenther@suse.de>
3524
3525 * dwarf2out.c (decl_scope_table): Remove.
3526 (push_decl_scope): Likewise.
3527 (pop_decl_scope): Likewise.
3528 (gen_type_die_for_member): Do not call push/pop_decl_scope.
3529 (gen_struct_or_union_type_die): Likewise.
3530 (gen_tagged_type_die): Likewise.
3531 (dwarf2out_init): Do not initialize decl_scope_table.
3532 (dwarf2out_c_finalize): Do not free it.
3533
3534 2018-06-28 Richard Biener <rguenther@suse.de>
3535
3536 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
3537 deciding whether to not re-use a DIE.
3538
3539 2018-06-28 Richard Biener <rguenther@suse.de>
3540
3541 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
3542 DW_AT_abstract_origin attribute.
3543
3544 2018-06-28 Martin Liska <mliska@suse.cz>
3545
3546 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
3547 Use newly introduced constants.
3548 * tree-switch-conversion.h (struct jump_table_cluster):
3549 Define max_ratio_for_size and max_ratio_for_speed.
3550
3551 2018-06-28 Martin Liska <mliska@suse.cz>
3552
3553 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
3554 Add new checking assert to catch invalid state.
3555 (jump_table_cluster::can_be_handled): Handle single case
3556 clusters.
3557 (jump_table_cluster::is_beneficial): Bail out for such case.
3558 (bit_test_cluster::find_bit_tests):
3559 Add new checking assert to catch invalid state.
3560 (bit_test_cluster::can_be_handled): Handle single case
3561 clusters.
3562 (bit_test_cluster::is_beneficial): Bail out for such case.
3563 (switch_decision_tree::analyze_switch_statement):
3564 Fix comment.
3565
3566 2018-06-28 Martin Liska <mliska@suse.cz>
3567
3568 * common.opt: Introduce -completion option.
3569 * gcc.c (driver_handle_option): Handle it.
3570 (driver::main): Print completions if completion
3571 is set.
3572 * opt-suggestions.c (option_proposer::get_completions):
3573 New function.
3574 (option_proposer::suggest_completion): Likewise.
3575 (option_proposer::find_param_completions): Likewise.
3576 (verify_autocompletions): Likewise.
3577 (test_completion_valid_options): Likewise.
3578 (test_completion_valid_params): Likewise.
3579 (in_completion_p): Likewise.
3580 (empty_completion_p): Likewise.
3581 (test_completion_partial_match): Likewise.
3582 (test_completion_garbage): Likewise.
3583 (opt_proposer_c_tests): Likewise.
3584 * opt-suggestions.h: Declare new functions.
3585 * opts.c (common_handle_option): Handle OPT__completion_.
3586 * selftest-run-tests.c (selftest::run_tests): Add
3587 opt_proposer_c_tests.
3588 * selftest.c (assert_str_startswith): New.
3589 * selftest.h (assert_str_startswith): Likewise.
3590 (opt_proposer_c_tests): New.
3591 (ASSERT_STR_STARTSWITH): Likewise.
3592
3593 2018-06-28 Martin Liska <mliska@suse.cz>
3594
3595 * Makefile.in: Add opt-suggestions.o.
3596 * gcc-main.c: Include opt-suggestions.h.
3597 * gcc.c (driver::driver): Likewise.
3598 (driver::~driver): Remove m_option_suggestions.
3599 (driver::build_option_suggestions): Moved to option_proposer.
3600 (driver::suggest_option): Likewise.
3601 (driver::handle_unrecognized_options): Use option_proposer.
3602 * gcc.h (class driver): Add new memver m_option_proposer.
3603 * opt-suggestions.c: New file.
3604 * opt-suggestions.h: New file.
3605
3606 2018-06-28 Martin Liska <mliska@suse.cz>
3607
3608 * vec.h (class auto_string_vec): New (moved from auto_argvec).
3609 (auto_string_vec::~auto_string_vec): Likewise.
3610
3611 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
3612
3613 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
3614 prevent_decl_creation_for_types fields up and add reset_location field.
3615 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
3616 statement if id->reset_location is true.
3617 (copy_edges_for_bb): Do not set goto_locus on the new edges if
3618 id->reset_location is true.
3619 (copy_phis_for_bb): Force input_location on the arguments if
3620 id->reset_location is true.
3621 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
3622 is set on the function to be inlined.
3623
3624 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
3625
3626 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
3627
3628 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
3629
3630 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
3631 registers for Pmode.
3632 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
3633 hard registers for the clobbered pseudo.
3634
3635 2018-06-27 Paul Koning <ni1d@arrl.net>
3636
3637 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
3638 mutually exclusive options.
3639 * config/pdp11/constraints.md (h): New constraint.
3640 (O): Update definition to match shift code generation.
3641 (D): New constraint.
3642 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
3643 (CCFP): Remove.
3644 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
3645 function.
3646 (output_jump): Change arguments.
3647 (pdp11_fixed_cc_regs): New function.
3648 (pdp11_cc_mode): Ditto.
3649 (pdp11_expand_shift): Ditto.
3650 (pdp11_assemble_shift): Ditto.
3651 (pdp11_small_shift): Ditto.
3652 (pdp11_branch_cost): Remove.
3653 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
3654 from output.
3655 (pdp11_register_move_cost): Update for CC registers.
3656 (pdp11_rtx_costs): Add case for LSHIFTRT.
3657 (pdp11_output_jump): Add CCNZ mode conditional branches.
3658 (notice_update_cc_on_set): Remove.
3659 (pdp11_cc_mode): New function.
3660 (simple_memory_operand): Correct pre/post decrement case.
3661 (no_side_effect_operand): New function.
3662 (pdp11_regno_reg_class): Add CC_REGS class.
3663 (pdp11_fixed_cc_regs): New function.
3664 (pdp11_small_shift): New function.
3665 (pdp11_expand_shift): New function to expand shift insns.
3666 (pdp11_assemble_shift): New function to output shifts.
3667 (pdp11_branch_cost): Remove.
3668 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
3669 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
3670 (WCHAR_TYPE): Ditto.
3671 (PTRDIFF_TYPE): Ditto.
3672 (ADJUST_INSN_LENGTH): New macro.
3673 (FIXED_REGISTERS): Add CC registers.
3674 (CALL_USED_REGISTERS): Ditto.
3675 (reg_class): Ditto.
3676 (REG_CLASS_NAMES): Ditto.
3677 (REG_CLASS_CONTENTS): Ditto.
3678 (SELECT_CC_MODE): Use new function.
3679 (TARGET_FLAGS_REGNUM): New macro.
3680 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
3681 (cc0_reg_rtx): Remove.
3682 (CC_STATUS_MDEP): Remove.
3683 (CC_STATUS_MDEFP_INIT): Remove.
3684 (CC_IN_FPU): Remove.
3685 (NOTICE_UPDATE_CC): Remove.
3686 (REGISTER_NAMES): Add CC registers.
3687 (BRANCH_COST): Change to constant 1.
3688 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
3689 handling.
3690 * config/pdp11/pdp11.opt (mbcopy): Remove.
3691 (mbcopy-builtin): Remove.
3692 (mbranch-cheap): Remove.
3693 (mbranch-expensive): Remove.
3694 * config/pdp11/predicates.md (expand_shift_operand): Update to
3695 match shift code generation.
3696 (ccnz_operator): New predicate.
3697 * doc/invoke.texi (PDP-11 Options): Remove deleted options
3698 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
3699 Remove non-existent option -mabshi, -mno-abshi. Document mutually
3700 exclusive options.
3701 * doc/md.texi (PDP-11): Document new D and h constraints. Update
3702 description of O constraint.
3703
3704 2018-06-27 Jeff Law <law@redhat.com>
3705 Austin Law <austinklaw@gmail.com>
3706
3707 * config/v850/v850.md (addsi3_set_flags): New pattern.
3708 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
3709 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
3710 (zero_extendhisi2_v850_set_flags): Likewise.
3711 (zero_extendqisi2_v850_set_flags): Likewise.
3712 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
3713 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
3714 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
3715
3716 * config/v850/v850-protos.h (notice_update_cc): Remove.
3717 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
3718 (v850_print_operand): Handle 'D' and "d".
3719 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
3720 Add handling of arithmetic/logical operations compared against zero.
3721 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
3722 Do not look at v850_compare_op, instead get mode from last argument.
3723 (v850_gen_compare): Remove
3724 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
3725 after reload for prologue insns.
3726 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
3727 patterns.
3728 (construct_save_jarl): Likewise.
3729 (TARGET_FLAGS_REGNUM): Define.
3730 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
3731 (NOTICE_UPDATE_CC): Remove.
3732 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
3733 than cc0. Conditionalize on reload_completed.
3734 (cmpsi_insn, setfcc_insn): Likewise.
3735 (tst1 splitter): Turn into define_and_split which sets the flags
3736 after reload.
3737 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
3738 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
3739 (cstoresf4, cstoredf4): Clobber the flags.
3740 (cmpsi, cmpsf, cmpdf): Remove expanders.
3741 (setf_insn): Remove pattern.
3742 (addsi3): Turn into define_and_split which clobbers the flags after
3743 reload and a suitable pattern (addsi3_clobber_flags) for use after
3744 reload.
3745 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
3746 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
3747 (ashrsi3, ashrsi3_v850e2): Likewise.
3748 (bins): Clobber the flags.
3749 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
3750 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
3751 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
3752 (call_value_internal_short, call_value_internal_long): Likewise.
3753 (callt_save_interrupt, callt_return_interrupt): Likewise.
3754 (save_interrupt, return_interrupt): Likewise.
3755 (callt_save_all_interrupt, save_all_interrupt): Likewise.
3756 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
3757 (restore_all_interrupt, _restore_all_interrupt): Likewise.
3758 (All FP comparisons): Only allow after reload has completed.
3759 (trfsr): Likewise.
3760 (divh, divhu): Tweak output template.
3761 (branch_z_normal, branch_z_invert): Remove
3762 (branch_nz_normal, branch_nz_invert): Likewise.
3763 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
3764
3765 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
3766 * config/v850/v850.c (notice_update_cc): Remove.
3767 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
3768 (CC_NO_CARRY): Likewise.
3769 (NOTICE_UPDATE_CC): Define to nothing.
3770 * config/v850/v850.md: Remove block comment on cc0 handling
3771 Remove "cc" attribute from all patterns. Remove cc_status handling
3772 from all patterns. Minor formatting fixes.
3773
3774 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3775
3776 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
3777 (cortex-a76.cortex-a55): Likewise.
3778 * config/aarch64/aarch64-tune.md: Regenerate.
3779 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
3780 cortex-a76.cortex-a55.
3781
3782 2018-06-27 Jeff Law <law@redhat.com>
3783
3784 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
3785 (MULTILIB_DIRNAMES): Similarly.
3786
3787 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
3788
3789 * gimple.h (gimple_return_retbnd): Delete.
3790 (gimple_return_set_retbnd): Likewise.
3791 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
3792 gimple_return_set_retbnd.
3793 * gimple-pretty-print.c (dump_gimple_return): Remove call to
3794 gimple_return_retbnd and adjust.
3795 * tree-inline.h (struct copy_body_data): Remove retbnd field.
3796 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
3797 Explicitly return NULL in a couple more cases. Move assertion
3798 on debug statements and remove unreachable code.
3799 (reset_debug_binding): Do not test id->retbnd.
3800 (expand_call_inline): Do not set it.
3801
3802 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
3803
3804 * configure.ac: Add --disable-gcov option.
3805 * configure: Regenerate.
3806 * Makefile.in: Honour @enable_gcov@.
3807 * doc/install.texi: Document --disable-gcov.
3808
3809 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3810
3811 * config/arm/arm-cpus.in (cortex-a76): New entry.
3812 (cortex-a76.cortex-a55): Likewise.
3813 * config/arm/arm-tables.opt: Regenerate.
3814 * config/arm/arm-tune.md: Likewise.
3815 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
3816 * doc/invoke.texi (ARM Options): Document cortex-a76 and
3817 cortex-a76.cortex-a55.
3818
3819 2018-06-27 Tamar Christina <tamar.christina@arm.com>
3820
3821 PR target/85769
3822 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
3823
3824 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
3825
3826 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
3827 comment.
3828 (EPILOGUE_USES): Likewise.
3829
3830 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
3831
3832 * tree-inline.c (remap_location): New function extracted from...
3833 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
3834 (copy_phis_for_bb): ...here. Call remap_location.
3835 (copy_cfg_body): Adjust call to copy_edges_for_bb.
3836
3837 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3838
3839 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3840 unaligned vsx for 16B memset.
3841
3842 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3843
3844 PR target/86285
3845 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3846 ieee128_float_type_node to long_double_type_node unless
3847 TARGET_LONG_DOUBLE_128 is set.
3848
3849 2018-06-26 David Malcolm <dmalcolm@redhat.com>
3850
3851 * cfgloop.c (get_loop_location): Convert return type from
3852 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
3853 by implicit construction from rtx_insn *, and using
3854 dump_user_location_t::from_function_decl for the fallback case.
3855 * cfgloop.h (get_loop_location): Convert return type from
3856 location_t to dump_user_location_t.
3857 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
3858 dump_printf_loc to pass in a dump_location_t rather than a
3859 location_t, via the gimple stmt.
3860 * coverage.c (get_coverage_counts): Update calls to
3861 dump_printf_loc to pass in dump_location_t rather than a
3862 location_t.
3863 * doc/optinfo.texi (Dump types): Convert example of
3864 dump_printf_loc from taking "locus" to taking "insn". Update
3865 description of the "_loc" calls to cover dump_location_t.
3866 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
3867 "selftest.h".
3868 (dump_user_location_t::dump_user_location_t): New constructors,
3869 from gimple *stmt and rtx_insn *.
3870 (dump_user_location_t::from_function_decl): New function.
3871 (dump_loc): Make static.
3872 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
3873 const dump_location_t &.
3874 (dump_generic_expr_loc): Delete.
3875 (dump_printf_loc): Convert param "loc" from location_t to
3876 const dump_location_t &.
3877 (selftest::test_impl_location): New function.
3878 (selftest::dumpfile_c_tests): New function.
3879 * dumpfile.h: Include "profile-count.h".
3880 (class dump_user_location_t): New class.
3881 (struct dump_impl_location_t): New struct.
3882 (class dump_location_t): New class.
3883 (dump_printf_loc): Convert 2nd param from source_location to
3884 const dump_location_t &.
3885 (dump_generic_expr_loc): Delete.
3886 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
3887 const dump_location_t &.
3888 * gimple-fold.c (fold_gimple_assign): Update call to
3889 dump_printf_loc to pass in a dump_location_t rather than a
3890 location_t, via the gimple stmt.
3891 (gimple_fold_call): Likewise.
3892 * gimple-loop-interchange.cc
3893 (loop_cand::analyze_iloop_reduction_var): Update for change to
3894 check_reduction_path.
3895 (tree_loop_interchange::interchange): Update for change to
3896 find_loop_location.
3897 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
3898 change in return-type of find_loop_location.
3899 (graphite_regenerate_ast_isl): Likewise.
3900 * graphite-optimize-isl.c (optimize_isl): Likewise.
3901 * graphite.c (graphite_transform_loops): Likewise.
3902 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
3903 pass in a dump_location_t rather than a location_t, via the
3904 gimple stmt.
3905 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3906 * ipa.c (walk_polymorphic_call_targets): Likewise.
3907 * loop-unroll.c (report_unroll): Convert "locus" param from
3908 location_t to dump_location_t.
3909 (decide_unrolling): Update for change to get_loop_location's
3910 return type.
3911 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
3912 location_t to dump_user_location_t.
3913 (grid_find_single_omp_among_assignments_1): Updates calls to
3914 dump_printf_loc to pass in a dump_location_t rather than a
3915 location_t, via the gimple stmt.
3916 (grid_parallel_clauses_gridifiable): Convert "tloc" from
3917 location_t to dump_location_t. Updates calls to dump_printf_loc
3918 to pass in a dump_location_t rather than a location_t, via the
3919 gimple stmt.
3920 (grid_inner_loop_gridifiable_p): Likewise.
3921 (grid_dist_follows_simple_pattern): Likewise.
3922 (grid_gfor_follows_tiling_pattern): Likewise.
3923 (grid_target_follows_gridifiable_pattern): Likewise.
3924 (grid_attempt_target_gridification): Convert initialization
3925 of local "grid" from memset to zero-initialization; FIXME: does
3926 this require C++11? Update call to dump_printf_loc to pass in a
3927 optinfo_location rather than a location_t, via the gimple stmt.
3928 * profile.c (read_profile_edge_counts): Updates call to
3929 dump_printf_loc to pass in a dump_location_t rather than a
3930 location_t
3931 (compute_branch_probabilities): Likewise.
3932 * selftest-run-tests.c (selftest::run_tests): Call
3933 dumpfile_c_tests.
3934 * selftest.h (dumpfile_c_tests): New decl.
3935 * tree-loop-distribution.c (pass_loop_distribution::execute):
3936 Update for change in return type of find_loop_location.
3937 * tree-parloops.c (parallelize_loops): Likewise.
3938 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
3939 "locus" from location_t to dump_user_location_t.
3940 (canonicalize_loop_induction_variables): Likewise.
3941 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
3942 for change in return type of find_loop_location.
3943 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
3944 to dump_printf_loc to pass in a dump_location_t rather than a
3945 location_t, via the stmt.
3946 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
3947 Likewise.
3948 * tree-vect-loop-manip.c (find_loop_location): Convert return
3949 type from source_location to dump_user_location_t.
3950 (vect_do_peeling): Update for above change.
3951 (vect_loop_versioning): Update for change in type of
3952 vect_location.
3953 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
3954 from location_t to dump_user_location_t.
3955 (vect_estimate_min_profitable_iters): Update for change in type
3956 of vect_location.
3957 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
3958 location_t to dump_location_t.
3959 (vect_slp_bb): Update for change in type of vect_location.
3960 * tree-vectorizer.c (vect_location): Convert from source_location
3961 to dump_user_location_t.
3962 (try_vectorize_loop_1): Update for change in vect_location's type.
3963 (vectorize_loops): Likewise.
3964 (increase_alignment): Likewise.
3965 * tree-vectorizer.h (vect_location): Convert from source_location
3966 to dump_user_location_t.
3967 (find_loop_location): Convert return type from source_location to
3968 dump_user_location_t.
3969 (check_reduction_path): Convert 1st param from location_t to
3970 dump_user_location_t.
3971 * value-prof.c (check_counter): Update call to dump_printf_loc to
3972 pass in a dump_user_location_t rather than a location_t; update
3973 call to error_at for change in type of "locus".
3974 (check_ic_target): Update call to dump_printf_loc to
3975 pass in a dump_user_location_t rather than a location_t, via the
3976 call_stmt.
3977
3978 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
3979
3980 * config/s390/s390.h (enum processor_flags): Do not use
3981 default tune parameter when -march was specified.
3982
3983 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3984
3985 PR target/86314
3986 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3987 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3988 operands.
3989
3990 2018-06-26 Richard Biener <rguenther@suse.de>
3991
3992 PR tree-optimization/86287
3993 PR bootstrap/86316
3994 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
3995 (vect_analyze_loop): Initialize n_stmts.
3996
3997 2018-06-26 Richard Biener <rguenther@suse.de>
3998
3999 PR middle-end/86271
4000 * fold-const.c (fold_convertible_p): Pointer extension
4001 isn't valid.
4002
4003 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
4004
4005 PR debug/86064
4006 * dwarf2out.c (loc_list_has_views): Adjust comments.
4007 (dw_loc_list): Split single cross-partition range with
4008 nonzero locview.
4009
4010 2018-06-25 Jeff Law <law@redhat.com>
4011
4012 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
4013 on -mbig-switch by default.
4014
4015 * config/v850/predicates.md (const_float_1_operand): Fix match_code
4016 test.
4017 (const_float_0_operand): Remove unused predicate.
4018 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
4019 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
4020 (recipsf2): New expander. Original pattern now called
4021 (recipsf2_insn).
4022 (recipdf2, recipdf2_insn): Similarly.
4023 (rsqrtsf2, rsqrtsf2_insn): Similarly
4024 (rsqrtdf2, rsqrtdf2_insn): Similarly
4025
4026 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
4027
4028 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
4029 Simplify logic for FreeBSD (twice).
4030
4031 2018-06-25 Martin Sebor <msebor@redhat.com>
4032
4033 PR tree-optimization/86204
4034 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
4035 a strnlen result if it's less than the length of the string.
4036
4037 2018-06-25 Martin Sebor <msebor@redhat.com>
4038
4039 PR tree-optimization/85700
4040 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
4041 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
4042 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
4043
4044 2018-06-25 Martin Sebor <msebor@redhat.com>
4045
4046 * doc/extend.texi (Zero-length arrays): Update and clarify.
4047
4048 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
4049
4050 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
4051 added IEEE/IBM long double multilib support on PowerPC little
4052 endian Linux systems.
4053 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
4054 (MULTILIB_DEFAULTS): Likewise.
4055 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4056 Likewise.
4057 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
4058 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
4059 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
4060
4061 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
4062
4063 PR middle-end/86311
4064 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
4065 (REORDER_45): Likewise.
4066
4067 2018-06-25 Jeff Law <law@redhat.com>
4068
4069 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
4070 dividend to 32 bits. Adjust length.
4071 (udivmodhi4): Cleanup output template. Fix length.
4072
4073 2018-06-25 Carl Love <cel@us.ibm.com>
4074
4075 * config/rs6000/vsx.md: Change word selector to prefered location.
4076
4077 2018-06-25 Richard Biener <rguenther@suse.de>
4078
4079 PR tree-optimization/86304
4080 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
4081 epilogue-if-converted loops as well.
4082
4083 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
4084
4085 * lto-section-out.c (lto_begin_section): Do not print section
4086 name for noaddr and unnumbered dumps.
4087
4088 2018-06-25 Richard Biener <rguenther@suse.de>
4089
4090 * tree-vectorizer.h (struct vec_info_shared): New structure
4091 with parts split out from struct vec_info and loop_nest from
4092 struct _loop_vec_info.
4093 (struct vec_info): Adjust accordingly.
4094 (struct _loop_vec_info): Likewise.
4095 (LOOP_VINFO_LOOP_NEST): Adjust.
4096 (LOOP_VINFO_DATAREFS): Likewise.
4097 (LOOP_VINFO_DDRS): Likewise.
4098 (struct _bb_vec_info): Likewise.
4099 (BB_VINFO_DATAREFS): Likewise.
4100 (BB_VINFO_DDRS): Likewise.
4101 (struct _stmt_vec_info): Add dr_aux member.
4102 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
4103 (DR_MISALIGNMENT_UNINITIALIZED): New.
4104 (set_dr_misalignment): Adjust.
4105 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
4106 (vect_analyze_loop): Adjust prototype.
4107 (vect_analyze_loop_form): Likewise.
4108 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4109 Compute dependences lazily.
4110 (vect_record_base_alignments): Use shared datarefs/ddrs.
4111 (vect_verify_datarefs_alignment): Likewise.
4112 (vect_analyze_data_refs_alignment): Likewise.
4113 (vect_analyze_data_ref_accesses): Likewise.
4114 (vect_analyze_data_refs): Likewise.
4115 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
4116 constructor parameter for shared part.
4117 (vect_analyze_loop_form): Pass in shared part and adjust.
4118 (vect_analyze_loop_2): Pass in storage for the number of
4119 stmts. Move loop nest finding to the caller. Compute
4120 datarefs lazily.
4121 (vect_analyze_loop): Pass in shared part.
4122 (vect_transform_loop): Verify shared datarefs are unchanged.
4123 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
4124 constructor parameter for shared part.
4125 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
4126 (vect_slp_bb): Verify shared datarefs are unchanged before
4127 transform.
4128 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
4129 change.
4130 (new_stmt_vec_info): Initialize DR_AUX misalignment to
4131 DR_MISALIGNMENT_UNINITIALIZED.
4132 * tree-vectorizer.c (vec_info::vec_info): Add constructor
4133 parameter for shared part.
4134 (vec_info::~vec_info): Adjust.
4135 (vec_info_shared::vec_info_shared): New.
4136 (vec_info_shared::~vec_info_shared): Likewise.
4137 (vec_info_shared::save_datarefs): Likewise.
4138 (vec_info_shared::check_datarefs): Likewise.
4139 (try_vectorize_loop_1): Construct shared part live for analyses
4140 of a single loop for multiple vector sizes.
4141 * tree-parloops.c (gather_scalar_reductions): Adjust.
4142
4143 2018-06-25 Richard Biener <rguenther@suse.de>
4144
4145 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
4146 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
4147 (vect_analyze_data_refs): Remove similar code from here and
4148 simplify accordingly.
4149
4150 2018-06-25 Richard Biener <rguenther@suse.de>
4151
4152 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
4153 for reverse storage order accesses rather than asserting
4154 they cannot happen here.
4155
4156 2018-06-25 Tom de Vries <tdevries@suse.de>
4157
4158 PR debug/86257
4159 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
4160 Use data16 instead of .byte for insn prefix.
4161
4162 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
4163
4164 PR C++/86082
4165 * parser.c (make_char_string_pack): Pass this literal chars
4166 through cpp_interpret_string.
4167 (cp_parser_userdef_numeric_literal): Check the result of
4168 make_char_string_pack.
4169
4170 2018-06-24 Maya Rashish <coypu@sdf.org>
4171
4172 * ginclude/stddef.h: Simplify conditions around avoiding
4173 re-definition of __size_t.
4174
4175 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4176
4177 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
4178 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
4179
4180 2018-06-22 Maya Rashish <coypu@sdf.org>
4181
4182 * doc/invoke.texi (mno-fancy-math-387): Update for changes
4183 made to OpenBSD and NetBSD through the years.
4184
4185 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
4186
4187 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4188 behavior of vec_pack (vector double, vector double) to match
4189 behavior of vec_float2 (vector double, vector double).
4190
4191 2018-06-22 Olivier Hainque <hainque@adacore.com>
4192
4193 * gimplify.c (gimplify_function_tree): Prevent creation
4194 of a trampoline for the address of the current function
4195 passed to entry/exit instrumentation hooks.
4196
4197 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
4198
4199 PR target/86222
4200 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
4201 correctly.
4202
4203 2018-06-22 Martin Liska <mliska@suse.cz>
4204
4205 PR tree-optimization/86263
4206 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4207 Bail out if is_enabled is false.
4208 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
4209 New declaration.
4210 (jump_table_cluster::is_enabled): New function.
4211
4212 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4213
4214 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4215 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
4216 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
4217 (lto_input_ts_binfo_tree_pointers): Likewise.
4218 * tree-streamer-out.c (streamer_write_tree_bitfields,
4219 write_ts_binfo_tree_pointers): Likewise.
4220 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
4221
4222 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
4223
4224 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
4225
4226 2018-06-22 Martin Liska <mliska@suse.cz>
4227
4228 * symbol-summary.h (get): Make it pure and inline move
4229 functionality from ::get function.
4230 (get): Remove and inline into ::get and ::get_create.
4231 (get_create): Move code from ::get function.
4232
4233 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4234
4235 PR target/85994
4236 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
4237 -x assembler-with-cpp.
4238
4239 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4240
4241 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
4242 _FILE_OFFSET_BITS=64 for C++.
4243
4244 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
4245
4246 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
4247 conversion insn that shows up when pr85657-3.c is compiled using
4248 IEEE 128-bit long double.
4249 (neg<mode>2_internal): Use the correct mode to check whether the
4250 mode is IBM extended.
4251 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
4252 multiply and divide external functions from being created more
4253 than once.
4254
4255 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4256
4257 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
4258 functions.
4259 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
4260 the edge can be forwarded.
4261 (cfg_layout_merge_blocks): Likewise.
4262
4263 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4264
4265 * except.c (finish_eh_generation): Commit edge insertions only after
4266 the EH edges have been redirected from post-landing to landing pads.
4267
4268 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4269
4270 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
4271 create_tmp_var_for to create the FRAME decl.
4272 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
4273
4274 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
4275
4276 * tree-inline.c (copy_edges_for_bb): Minor tweak.
4277 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
4278 debug statement when resetting its value.
4279 (expand_call_inline): Copy the locus of the call onto the assignment
4280 of the return value, if any. Use local variable in more cases.
4281
4282 2018-06-21 Martin Liska <mliska@suse.cz>
4283
4284 * ipa-pure-const.c (propagate_nothrow): Use
4285 funct_state_summaries->get.
4286 (dump_malloc_lattice): Likewise.
4287 (propagate_malloc): Likewise.
4288
4289 2018-06-21 Richard Biener <rguenther@suse.de>
4290
4291 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
4292 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
4293 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
4294 comment.
4295 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
4296 BLOCK_ABSTRACT_ORIGIN unconditionally.
4297
4298 2018-06-21 David Malcolm <dmalcolm@redhat.com>
4299
4300 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
4301 deleting it.
4302 * ipa-reference.c (ipa_reference_c_finalize): Delete
4303 ipa_ref_opt_sum_summaries and set it to NULL.
4304
4305 2018-06-21 Tom de Vries <tdevries@suse.de>
4306
4307 PR tree-optimization/85859
4308 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
4309 test with comment from bb_no_side_effects_p.
4310
4311 2018-06-21 Richard Biener <rguenther@suse.de>
4312
4313 PR tree-optimization/86232
4314 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
4315 max for constant niter.
4316
4317 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4318
4319 * config/aarch64/aarch64-simd.md
4320 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
4321
4322 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
4323
4324 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
4325 Make opernads of the unspec commutative.
4326
4327 2018-06-21 Richard Biener <rguenther@suse.de>
4328
4329 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
4330 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
4331 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
4332 (vect_analyze_data_ref_dependence): Re-order checks to deal with
4333 NULL DR_STEP.
4334 (vect_record_base_alignments): Do not record base alignment
4335 for gathers or scatters.
4336 (vect_compute_data_ref_alignment): Drop return value that is always
4337 true. Bail out early for gathers or scatters.
4338 (vect_enhance_data_refs_alignment): Bail out early for gathers
4339 or scatters.
4340 (vect_find_same_alignment_drs): Likewise.
4341 (vect_analyze_data_refs_alignment): Remove dead code.
4342 (vect_slp_analyze_and_verify_node_alignment): Likewise.
4343 (vect_analyze_data_refs): For possible gathers or scatters do
4344 not create an alternate DR, just check their possible validity
4345 and mark them. Adjust DECL_NONALIASED handling to not rely
4346 on DR_BASE_ADDRESS.
4347 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
4348 update inits of gathers or scatters.
4349 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
4350 Also copy gather/scatter flag to pattern vinfo.
4351
4352 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
4353
4354 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
4355 behavior of vec_packsu (vector unsigned long long, vector unsigned
4356 long long) to match behavior of vec_packs with same signature.
4357
4358 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4359 Thomas Schwinge <thomas@codesourcery.com>
4360 Cesar Philippidis <cesar@codesourcery.com>
4361
4362 * gimplify.c (gimplify_scan_omp_clauses): Add support for
4363 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4364 (gimplify_adjust_omp_clauses): Likewise.
4365 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
4366 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
4367 (gimplify_omp_target_update): Update handling of acc update and
4368 enter/exit data.
4369 * omp-low.c (install_var_field): Remove unused parameter
4370 base_pointers_restrict.
4371 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
4372 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
4373 FINALIZE}
4374 (omp_target_base_pointers_restrict_p): Delete.
4375 (scan_omp_target): Update call to scan_sharing_clauses.
4376 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
4377 FINALIZE}.
4378 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4379 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4380 (convert_local_omp_clauses): Likewise.
4381 * tree-pretty-print.c (dump_omp_clause): Likewise.
4382 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
4383 FINALIZE}.
4384 (omp_clause_code_name): Likewise.
4385
4386 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4387
4388 PR debug/86194
4389 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
4390 be narrowed.
4391
4392 PR tree-optimization/86231
4393 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
4394 anti-range don't overwrite *vr0min before using it to compute *vr0max.
4395
4396 2018-06-20 Tom de Vries <tdevries@suse.de>
4397
4398 PR tree-optimization/86097
4399 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
4400 iv type if signedness of iv type is not the same as that of *nit.
4401
4402 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4403
4404 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
4405 EDGE_EH edges, verify they are all EDGE_EH.
4406
4407 2018-06-20 Maya Rashish <coypu@sdf.org>
4408
4409 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
4410
4411 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4412
4413 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
4414 * config/aarch64/aarch64.c (xgene1_tunings): Add
4415 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
4416 (aarch64_mode_valid_for_sched_fusion_p):
4417 Allow 16-byte modes.
4418 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
4419 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
4420 128-bit modes.
4421 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
4422 New pattern.
4423 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
4424 * config/aarch64/iterators.md (VQ2): New mode iterator.
4425
4426 2018-06-20 Martin Liska <mliska@suse.cz>
4427
4428 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
4429 Change default ratio from 10 to 8.
4430
4431 2018-06-20 Martin Liska <mliska@suse.cz>
4432
4433 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4434 New.
4435 (bit_test_cluster::find_bit_tests): Likewise.
4436 (switch_decision_tree::analyze_switch_statement): Find clusters.
4437 * tree-switch-conversion.h (struct jump_table_cluster): Document
4438 hierarchy.
4439
4440 2018-06-20 Martin Liska <mliska@suse.cz>
4441
4442 * tree-switch-conversion.c (switch_conversion::collect):
4443 Record m_uniq property.
4444 (switch_conversion::expand): Bail out for special conditions.
4445 (group_cluster::~group_cluster): New.
4446 (group_cluster::group_cluster): Likewise.
4447 (group_cluster::dump): Likewise.
4448 (jump_table_cluster::emit): New.
4449 (switch_decision_tree::fix_phi_operands_for_edges): New.
4450 (struct case_node): Remove struct.
4451 (jump_table_cluster::can_be_handled): New.
4452 (case_values_threshold): Moved to header.
4453 (reset_out_edges_aux): Likewise.
4454 (jump_table_cluster::is_beneficial): New.
4455 (bit_test_cluster::can_be_handled): Likewise.
4456 (add_case_node): Remove.
4457 (bit_test_cluster::is_beneficial): New.
4458 (case_bit_test::cmp): New.
4459 (bit_test_cluster::emit): New.
4460 (expand_switch_as_decision_tree_p): Remove.
4461 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
4462 (fix_phi_operands_for_edge): Likewise.
4463 (switch_decision_tree::analyze_switch_statement): New.
4464 (compute_cases_per_edge): Move ...
4465 (switch_decision_tree::compute_cases_per_edge): ... here.
4466 (try_switch_expansion): Likewise.
4467 (switch_decision_tree::try_switch_expansion): Likewise.
4468 (record_phi_operand_mapping): Likewise.
4469 (switch_decision_tree::record_phi_operand_mapping): Likewise.
4470 (emit_case_decision_tree): Likewise.
4471 (switch_decision_tree::emit): Likewise.
4472 (balance_case_nodes): Likewise.
4473 (switch_decision_tree::balance_case_nodes): Likewise.
4474 (dump_case_nodes): Likewise.
4475 (switch_decision_tree::dump_case_nodes): Likewise.
4476 (emit_jump): Likewise.
4477 (switch_decision_tree::emit_jump): Likewise.
4478 (emit_cmp_and_jump_insns): Likewise.
4479 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
4480 (emit_case_nodes): Likewise.
4481 (switch_decision_tree::emit_case_nodes): Likewise.
4482 (conditional_probability): Remove.
4483 * tree-switch-conversion.h (enum cluster_type): New.
4484 (PRINT_CASE): New.
4485 (struct cluster): Likewise.
4486 (cluster::cluster): Likewise.
4487 (struct simple_cluster): Likewise.
4488 (simple_cluster::simple_cluster): Likewise.
4489 (struct group_cluster): Likewise.
4490 (struct jump_table_cluster): Likewise.
4491 (struct bit_test_cluster): Likewise.
4492 (struct min_cluster_item): Likewise.
4493 (struct case_tree_node): Likewise.
4494 (case_tree_node::case_tree_node): Likewise.
4495 (jump_table_cluster::case_values_threshold): Likewise.
4496 (struct case_bit_test): Likewise.
4497 (struct switch_decision_tree): Likewise.
4498 (struct switch_conversion): Likewise.
4499 (switch_decision_tree::reset_out_edges_aux): Likewise.
4500
4501 2018-06-20 Martin Liska <mliska@suse.cz>
4502
4503 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
4504 (hoist_edge_and_branch_if_true): Likewise.
4505 (expand_switch_using_bit_tests_p): Likewise.
4506 (struct case_bit_test): Likewise.
4507 (case_bit_test_cmp): Likewise.
4508 (emit_case_bit_tests): Likewise.
4509 (switch_conversion::switch_conversion): New class.
4510 (struct switch_conv_info): Remove old struct.
4511 (collect_switch_conv_info): More to ...
4512 (switch_conversion::collect): ... this.
4513 (check_range): Likewise.
4514 (switch_conversion::check_range): Likewise.
4515 (check_all_empty_except_final): Likewise.
4516 (switch_conversion::check_all_empty_except_final): Likewise.
4517 (check_final_bb): Likewise.
4518 (switch_conversion::check_final_bb): Likewise.
4519 (create_temp_arrays): Likewise.
4520 (switch_conversion::create_temp_arrays): Likewise.
4521 (free_temp_arrays): Likewise.
4522 (gather_default_values): Likewise.
4523 (switch_conversion::gather_default_values): Likewise.
4524 (build_constructors): Likewise.
4525 (switch_conversion::build_constructors): Likewise.
4526 (constructor_contains_same_values_p): Likewise.
4527 (switch_conversion::contains_same_values_p): Likewise.
4528 (array_value_type): Likewise.
4529 (switch_conversion::array_value_type): Likewise.
4530 (build_one_array): Likewise.
4531 (switch_conversion::build_one_array): Likewise.
4532 (build_arrays): Likewise.
4533 (switch_conversion::build_arrays): Likewise.
4534 (gen_def_assigns): Likewise.
4535 (switch_conversion::gen_def_assigns): Likewise.
4536 (prune_bbs): Likewise.
4537 (switch_conversion::prune_bbs): Likewise.
4538 (fix_phi_nodes): Likewise.
4539 (switch_conversion::fix_phi_nodes): Likewise.
4540 (gen_inbound_check): Likewise.
4541 (switch_conversion::gen_inbound_check): Likewise.
4542 (process_switch): Use the newly created class.
4543 (switch_conversion::expand): New.
4544 (switch_conversion::~switch_conversion): New.
4545 * tree-switch-conversion.h: New file.
4546
4547 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4548
4549 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
4550 tree-vect-patterns.c.
4551 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
4552 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
4553 (vect_recog_sad_pattern): Likewise.
4554 (vect_recog_widen_sum_pattern): Likewise.
4555 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
4556 (vect_recog_widen_shift_pattern): Remove the type_in argument.
4557 (vect_recog_rotate_pattern): Likewise.
4558 (vect_recog_mult_pattern): Likewise.
4559 (vect_recog_vector_vector_shift_pattern): Likewise.
4560 (vect_recog_divmod_pattern): Likewise.
4561 (vect_recog_mixed_size_cond_pattern): Likewise.
4562 (vect_recog_bool_pattern): Likewise.
4563 (vect_recog_mask_conversion_pattern): Likewise.
4564 (vect_try_gather_scatter_pattern): Likewise.
4565 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
4566 (vect_recog_over_widening_pattern): Likewise.
4567 (vect_recog_gather_scatter_pattern): Likewise.
4568 (vect_recog_func_ptr): Move from tree-vectorizer.h
4569 (vect_vect_recog_func_ptrs): Move further down the file.
4570 (vect_recog_func): Likewise. Remove the third argument.
4571 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
4572 (vect_pattern_recog_1): Expect the pattern function to do any
4573 necessary target tests. Also expect it to provide a vector type.
4574 Remove the type_in handling.
4575
4576 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4577
4578 * tree-vect-patterns.c (vect_pattern_detected): New function.
4579 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
4580 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
4581 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
4582 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
4583 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4584 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4585 (vect_recog_mask_conversion_pattern)
4586 (vect_try_gather_scatter_pattern): Likewise.
4587
4588 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4589
4590 * tree-vect-patterns.c (vect_get_internal_def): New function.
4591 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4592 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
4593 (search_type_for_mask_1): Use it.
4594
4595 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4596
4597 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4598 redundant WIDEN_SUM_EXPR handling.
4599 (vect_recog_sad_pattern): Likewise.
4600
4601 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4602
4603 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
4604 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
4605 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
4606 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
4607 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
4608
4609 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4610
4611 * tree-vect-stmts.c (vectorizable_call): Make sure that we
4612 use the stmt_vec_info of the original bb statement for the
4613 new zero assignment, even if the call is part of a pattern.
4614
4615 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4616
4617 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
4618 that the sequence is attached to the original statement rather
4619 than the pattern statement.
4620 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
4621 PATTERN_DEF_SEQ from the original statement rather than
4622 the main pattern statement.
4623 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
4624 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
4625 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
4626
4627 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
4628
4629 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
4630 definition statements before the early exit for statements that aren't
4631 live or relevant.
4632 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
4633 split out from...
4634 (vect_transform_loop): ...here. Process pattern definition
4635 statements without first checking whether the main pattern
4636 statement is live or relevant.
4637
4638 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4639
4640 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
4641 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
4642
4643 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
4644
4645 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
4646 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
4647 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
4648 (expand_block_compare): Change select_block_compare_mode call.
4649 (expand_strncmp_align_check): Use new functions, fix comment.
4650 (emit_final_str_compare_gpr): New function.
4651 (expand_strn_compare): Refactor and clean up code.
4652 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
4653
4654 2018-06-19 Tony Reix <tony.reix@atos.com>
4655 Damien Bergamini <damien.bergamini@atos.com>
4656 David Edelsohn <dje.gcc@gmail.com>
4657
4658 * collect2.c (static_obj): New variable.
4659 (static_libs): New variable.
4660 (is_in_list): Uncomment declaration.
4661 (main): Track AIX libraries linked statically.
4662 (is_in_list): Uncomment definition.
4663 (scan_prog_file): Don't add AIX shared libraries initializer
4664 to constructor list if linking statically.
4665
4666 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
4667
4668 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
4669 constant.
4670 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
4671
4672 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
4673
4674 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
4675 blocks.
4676
4677 2018-06-19 Martin Liska <mliska@suse.cz>
4678
4679 * config/i386/i386.c (ix86_can_inline_p): Do not use
4680 ipa_fn_summaries::get_create.
4681 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
4682 get.
4683 (devirtualization_time_bonus): Likewise.
4684 (ipcp_propagate_stage): Likewise.
4685 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
4686 (edge_set_predicate): Likewise.
4687 (evaluate_conditions_for_known_args): Likewise.
4688 (evaluate_properties_for_edge): Likewise.
4689 (ipa_call_summary::reset): Tranform to ...
4690 (ipa_call_summary::~ipa_call_summary): ... this.
4691 (ipa_fn_summary::reset): Transform to ...
4692 (ipa_fn_summary::~ipa_fn_summary): ... this.
4693 (ipa_fn_summary_t::remove): Rename to ...
4694 (ipa_fn_summary_t::remove_callees): ... this.
4695 (ipa_fn_summary_t::duplicate): Use placement new
4696 instead of memory copy.
4697 (ipa_call_summary_t::duplicate): Likewise.
4698 (ipa_call_summary_t::remove): Remove.
4699 (dump_ipa_call_summary): Change get_create to get.
4700 (ipa_dump_fn_summary): Dump only when summary exists.
4701 (analyze_function_body): Use symbol_summary::get instead
4702 of get_create.
4703 (compute_fn_summary): Likewise.
4704 (estimate_edge_devirt_benefit): Likewise.
4705 (estimate_edge_size_and_time): Likewise.
4706 (inline_update_callee_summaries): Likewise.
4707 (remap_edge_change_prob): Likewise.
4708 (remap_edge_summaries): Likewise.
4709 (ipa_merge_fn_summary_after_inlining): Likewise.
4710 (write_ipa_call_summary): Likewise.
4711 (ipa_fn_summary_write): Likewise.
4712 (ipa_free_fn_summary): Likewise.
4713 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
4714 (struct ipa_call_summary): Likewise.
4715 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
4716 of get_create.
4717 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
4718 (estimate_size_after_inlining): Likewise.
4719 (estimate_growth): Likewise.
4720 (growth_likely_positive): Likewise.
4721 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
4722 (inline_call): Likewise.
4723 * ipa-inline.c (caller_growth_limits): Likewise.
4724 (can_inline_edge_p): Likewise.
4725 (can_inline_edge_by_limits_p): Likewise.
4726 (compute_uninlined_call_time): Likewise.
4727 (compute_inlined_call_time): Likewise.
4728 (want_inline_small_function_p): Likewise.
4729 (edge_badness): Likewise.
4730 (update_caller_keys): Likewise.
4731 (update_callee_keys): Likewise.
4732 (inline_small_functions): Likewise.
4733 (inline_to_all_callers_1): Likewise.
4734 (dump_overall_stats): Likewise.
4735 (early_inline_small_functions): Likewise.
4736 (early_inliner): Likewise.
4737 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
4738 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
4739 * ipa-pure-const.c (malloc_candidate_p): Likewise.
4740 * ipa-split.c (execute_split_functions): Likewise.
4741 * symbol-summary.h: Likewise.
4742 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
4743
4744 2018-06-19 Richard Biener <rguenther@suse.de>
4745
4746 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
4747 (vectorize_loops): ... here. Fix dbgcnt handling.
4748 (try_vectorize_loop): Wrap try_vectorize_loop_1.
4749
4750 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
4751
4752 PR target/86197
4753 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
4754 ieee128 argument takes up only one (vector) register, not two (floating
4755 point) registers.
4756
4757 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
4758
4759 * gimplify.c (gimplify_init_constructor): Really never clear for an
4760 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
4761
4762 2018-06-19 Richard Biener <rguenther@suse.de>
4763
4764 PR tree-optimization/86179
4765 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
4766 after failed recognition.
4767
4768 2018-06-18 Martin Sebor <msebor@redhat.com>
4769
4770 PR middle-end/85602
4771 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
4772 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
4773 Handle integer subtraction.
4774 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
4775 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
4776
4777 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4778
4779 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
4780 param from rtx to rtx_insn *.
4781 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
4782 param.
4783 (frv_ifcvt_modify_insn): Likwise.
4784 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
4785 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
4786 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
4787 as_a <rtx_insn *> cast to local "unprotected_region" once
4788 it's been established that it's not NULL or pc_rtx.
4789 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
4790 param "sethi" from rtx to rtx_insn *.
4791 (nds32_group_float_insns): Likewise for param "insn".
4792 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
4793 param.
4794 (vax_output_int_subtract): Likewise.
4795 * config/vax/vax.c (vax_output_int_add): Likewise for param
4796 "insn".
4797 (vax_output_int_subtract): Likewise.
4798 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
4799 (emit_pattern_after): Likewise for param "after".
4800 (emit_insn_after): Likewise.
4801 (emit_jump_insn_after): Likewise.
4802 (emit_call_insn_after): Likewise.
4803 (emit_debug_insn_after): Likewise.
4804 (emit_pattern_before): Likewise for param "before".
4805 (emit_insn_before): Likewise.
4806 (emit_jump_insn_before): Likewise.
4807 * final.c (get_insn_template): Likewise for param "insn", removing
4808 a cast.
4809 * output.h (get_insn_template): Likewise for 2nd param.
4810 * rtl.h (emit_insn_before): Likewise.
4811 (emit_jump_insn_before): Likewise.
4812 (emit_debug_insn_before_noloc): Likewise.
4813 (emit_insn_after): Likewise.
4814 (emit_jump_insn_after): Likewise.
4815 (emit_call_insn_after): Likewise.
4816 (emit_debug_insn_after): Likewise.
4817 (set_insn_deleted): Likewise for param.
4818
4819 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
4820
4821 PR target/85358
4822 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
4823 floating point modes, so that IFmode is numerically greater than
4824 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
4825 to declare the ordering. This prevents IFmode from being
4826 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
4827 machine. Include rs6000-modes.h to share the fractional values
4828 between genmodes* and the rest of the compiler.
4829 (IFmode): Likewise.
4830 (KFmode): Likewise.
4831 (TFmode): Likewise.
4832 * config/rs6000/rs6000-modes.h: New file.
4833 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
4834 meaning of rs6000_long_double_size so that 126..128 selects an
4835 appropriate 128-bit floating point type.
4836 (rs6000_option_override_internal): Likewise.
4837 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
4838 (TARGET_LONG_DOUBLE_128): Change the meaning of
4839 rs6000_long_double_size so that 126..128 selects an appropriate
4840 128-bit floating point type.
4841 (LONG_DOUBLE_TYPE_SIZE): Update comment.
4842 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
4843 source and destination to match the standard usage.
4844 (truncifkf2): Likewise.
4845 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
4846 ISA 2.07 to use an explicit clobber, instead of passing in a
4847 temporary.
4848 (copysign<mode>3_soft): Likewise.
4849
4850 2018-06-18 David Malcolm <dmalcolm@redhat.com>
4851
4852 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
4853 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
4854 (vect_slp_analyze_instance_dependence): Likewise.
4855 (vect_enhance_data_refs_alignment): Likewise.
4856 (vect_analyze_data_refs_alignment): Likewise.
4857 (vect_slp_analyze_and_verify_instance_alignment
4858 (vect_analyze_data_ref_accesses): Likewise.
4859 (vect_prune_runtime_alias_test_list): Likewise.
4860 (vect_analyze_data_refs): Likewise.
4861 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
4862 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
4863 (vect_analyze_scalar_cycles_1): Likewise.
4864 (vect_get_loop_niters): Likewise.
4865 (vect_analyze_loop_form_1): Likewise.
4866 (vect_update_vf_for_slp): Likewise.
4867 (vect_analyze_loop_operations): Likewise.
4868 (vect_analyze_loop): Likewise.
4869 (vectorizable_induction): Likewise.
4870 (vect_transform_loop): Likewise.
4871 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
4872 * tree-vect-slp.c (vect_analyze_slp): Likewise.
4873 (vect_make_slp_decision): Likewise.
4874 (vect_detect_hybrid_slp): Likewise.
4875 (vect_slp_analyze_operations): Likewise.
4876 (vect_slp_bb): Likewise.
4877 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
4878 (vectorizable_bswap): Likewise.
4879 (vectorizable_call): Likewise.
4880 (vectorizable_simd_clone_call): Likewise.
4881 (vectorizable_conversion): Likewise.
4882 (vectorizable_assignment): Likewise.
4883 (vectorizable_shift): Likewise.
4884 (vectorizable_operation): Likewise.
4885 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
4886
4887 2018-06-18 Martin Sebor <msebor@redhat.com>
4888
4889 PR tree-optimization/81384
4890 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
4891 * builtins.c (expand_builtin_strnlen): New function.
4892 (expand_builtin): Call it.
4893 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
4894 * builtins.def (BUILT_IN_STRNLEN): New.
4895 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
4896 Warn for bounds in excess of maximum object size.
4897 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
4898 single-value ranges. Handle strnlen.
4899 (handle_builtin_strlen): Handle strnlen.
4900 (strlen_check_and_optimize_stmt): Same.
4901 * doc/extend.texi (Other Builtins): Document strnlen.
4902
4903 2018-06-18 Maya Rashish <coypu@sdf.org>
4904
4905 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
4906 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
4907 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
4908
4909 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
4910 here to ...
4911 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
4912
4913 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4914
4915 * tree.c (escaped_string::escape): Replace cast to char * by
4916 const_cast<char *> (unescaped).
4917
4918 2018-06-18 Nick Clifton <nickc@redhat.com>
4919
4920 PR 84195
4921 * tree.c (escaped_string): New class. Converts an unescaped
4922 string into its escaped equivalent.
4923 (warn_deprecated_use): Use the new class to convert the
4924 deprecation message, if present.
4925 (test_escaped_strings): New self test.
4926 (test_c_tests): Add test_escaped_strings.
4927 * doc/extend.texi (deprecated): Add a note that the
4928 deprecation message is affected by the -fmessage-length
4929 option, and that control characters will be escaped.
4930 (#pragma GCC error): Document this pragma.
4931 (#pragma GCC warning): Likewise.
4932 * doc/invoke.texi (-fmessage-length): Document this option's
4933 effect on the #warning and #error preprocessor directives and
4934 the deprecated attribute.
4935
4936 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4937
4938 * tree.c (decl_value_expr_lookup): Revert latest change.
4939 (decl_value_expr_insert): Likewise.
4940
4941 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4942
4943 * gimplify.c (nonlocal_vlas): Delete.
4944 (nonlocal_vla_vars): Likewise.
4945 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
4946 referenced VLAs.
4947 (gimplify_body): Do not create and destroy nonlocal_vlas.
4948 * tree-nested.c: Include diagnostic.h.
4949 (use_pointer_in_frame): Tweak.
4950 (lookup_field_for_decl): Add assertion and declare the transformation.
4951 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
4952 internal error when the reference is in a wrong context. Do not
4953 create a debug decl by default.
4954 (note_nonlocal_block_vlas): Delete.
4955 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
4956 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
4957 create a debug decl by default.
4958 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
4959 call is in a wrong context.
4960 (fixup_vla_decls): New function.
4961 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
4962 debug variables were created.
4963 * tree.c (decl_value_expr_lookup): Add checking assertion.
4964 (decl_value_expr_insert): Likewise.
4965
4966 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4967
4968 PR middle-end/82479
4969 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
4970 * tree-scalar-evolution.c (interpret_expr): Likewise.
4971 (expression_expensive_p): Likewise.
4972 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
4973 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
4974 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
4975 (ssa_defined_by_minus_one_stmt_p): New.
4976
4977 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4978
4979 PR middle-end/64946
4980 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
4981 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
4982 * dojump.c (do_jump): Likewise.
4983 * expr.c (expand_expr_real_2): Check operand type's sign.
4984 * fold-const.c (const_unop): Handle ABSU_EXPR.
4985 (fold_abs_const): Likewise.
4986 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
4987 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
4988 (strip_sign_op_1): Likesise.
4989 * match.pd: Add new pattern to generate ABSU_EXPR.
4990 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
4991 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4992 * tree-eh.c (operation_could_trap_helper_p): Likewise.
4993 * tree-inline.c (estimate_operator_cost): Likewise.
4994 * tree-pretty-print.c (dump_generic_node): Likewise.
4995 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
4996 * tree.def (ABSU_EXPR): New.
4997
4998 2018-06-16 Jakub Jelinek <jakub@redhat.com>
4999
5000 PR middle-end/86095
5001 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
5002 documented as preserved for backward compatibility only.
5003 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
5004
5005 PR rtl-optimization/86108
5006 * bb-reorder.c (create_forwarder_block): Renamed to ...
5007 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
5008 jump from new landing pad to the second part.
5009 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
5010 Adjust callers.
5011
5012 2018-06-15 Jakub Jelinek <jakub@redhat.com>
5013
5014 PR middle-end/85878
5015 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
5016 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
5017 Only call store_expr for halves if the mode is the same.
5018
5019 PR middle-end/86123
5020 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
5021 Fix up comment formatting.
5022
5023 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
5024
5025 * typed-splay-tree.h (typed_splay_tree::remove): New function.
5026 (typed_splay_tree::closure,
5027 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
5028 (typed_splay_tree::typed_splay_tree,
5029 typed_splay_tree::operator =): Declared private.
5030 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
5031 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
5032 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
5033 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
5034 typed_splay_tree::splay_tree_splay,
5035 typed_splay_tree::splay_tree_foreach_helper,
5036 typed_splay_tree::splay_tree_insert,
5037 typed_splay_tree::splay_tree_remove,
5038 typed_splay_tree::splay_tree_lookup,
5039 typed_splay_tree::splay_tree_predecessor,
5040 typed_splay_tree::splay_tree_successor,
5041 typed_splay_tree::splay_tree_min,
5042 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
5043 (typed_splay_tree::root, typed_splay_tree::comp,
5044 typed_splay_tree::delete_key,
5045 typed_splay_tree::delete_value): New data members.
5046 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
5047 typed_splay_tree::remove.
5048
5049 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
5050
5051 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
5052 -mginv and -mno-ginv to the assembler.
5053 * config/mips/mips.opt (-mcrc): New option.
5054 (-mginv): Likewise.
5055 * doc/invoke.text (-mcrc): Document.
5056 (-mginv): Likewise.
5057
5058 2018-06-15 Nick Clifton <nickc@redhat.com>
5059
5060 PR 84195
5061 * tree.c (escaped_string): New class. Converts an unescaped
5062 string into its escaped equivalent.
5063 (warn_deprecated_use): Use the new class to convert the
5064 deprecation message, if present.
5065 (test_escaped_strings): New self test.
5066 (test_c_tests): Add test_escaped_strings.
5067 * doc/extend.texi (deprecated): Add a note that the
5068 deprecation message is affected by the -fmessage-length
5069 option, and that control characters will be escaped.
5070 (#pragma GCC error): Document this pragma.
5071 (#pragma GCC warning): Likewise.
5072 * doc/invoke.texi (-fmessage-length): Document this option's
5073 effect on the #warning and #error preprocessor directives and
5074 the deprecated attribute.
5075
5076 2018-06-15 Richard Biener <rguenther@suse.de>
5077
5078 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
5079 here, also noting vector size used.
5080 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
5081 size used in MSG_OPTIMIZED_LOCATIONS dump.
5082 (pass_slp_vectorize::execute): Adjust.
5083
5084 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
5085
5086 PR target/85968
5087 * config/arc/arc.c (arc_return_address_register): Fix
5088 if-condition.
5089
5090 2018-06-15 Richard Biener <rguenther@suse.de>
5091
5092 PR middle-end/86159
5093 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
5094 leave useless conversion stripping to force_gimple_operand_gsi.
5095 (gimplify_build2): Likewise.
5096 (gimplify_build1): Likewise.
5097
5098 2018-06-15 Richard Biener <rguenther@suse.de>
5099
5100 PR middle-end/86076
5101 * tree-cfg.c (move_stmt_op): unshare invariant addresses
5102 before adjusting their block.
5103
5104 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
5105
5106 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
5107 multilibs for *-*-rtems*.
5108 * config/riscv/t-rtems: New file.
5109
5110 2018-06-14 Jakub Jelinek <jakub@redhat.com>
5111
5112 PR middle-end/86122
5113 * match.pd ((A +- CST1) +- CST2): Punt if last resort
5114 unsigned_type_for returns NULL.
5115
5116 PR target/85945
5117 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
5118 subregs of multi-word pseudos unless the float mode has word size.
5119
5120 2018-06-14 Richard Biener <rguenther@suse.de>
5121
5122 PR middle-end/86139
5123 * tree-vect-generic.c (build_word_mode_vector_type): Remove
5124 duplicate and harmful type_hash_canon.
5125 * tree.c (type_hash_canon): Assert we didn't find ourselves.
5126
5127 2018-06-14 Richard Biener <rguenther@suse.de>
5128
5129 PR ipa/86124
5130 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
5131 NULL cgraph_node.
5132
5133 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
5134
5135 * config/rtems.h (STDINT_LONG32): Define.
5136
5137 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
5138 Prachi Godbole <prachi.godbole@imgtec.com>
5139
5140 * config/mips/mips-cpus.def: Define P6600.
5141 * config/mips/mips-tables.opt: Regenerate.
5142 * config/mips/mips.c (mips_ucbranch_type): New enum.
5143 (mips_rtx_cost_data): Add support for P6600.
5144 (mips_issue_rate): Likewise.
5145 (mips_multipass_dfa_lookahead): Likewise.
5146 (mips_avoid_hazard): Likewise.
5147 (mips_reorg_process_insns): Likewise.
5148 (mips_classify_branch_p6600): New function.
5149 * config/mips/mips.h (TUNE_P6600): New define.
5150 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
5151 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
5152 * config/mips/mips.md: Include p6600.md.
5153 (processor): Add p6600.
5154 * config/mips/p6600.md: New file.
5155 * doc/invoke.texi: Add p6600 to supported architectures.
5156
5157 2018-06-13 Martin Sebor <msebor@redhat.com>
5158
5159 PR tree-optimization/86114
5160 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
5161 of integer types.
5162 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
5163
5164 2018-06-13 Richard Biener <rguenther@suse.de>
5165
5166 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
5167 Properly set vector type of the intermediate stmt.
5168 * tree-vect-stmts.c (vectorizable_operation): The destination
5169 var always has vectype_out type.
5170
5171 2018-06-13 Jeff Law <law@redhat.com>
5172
5173 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
5174 integer 0 for argument to print_rtl_with_bb.
5175 (rl78_reorg): Likewise.
5176
5177 2018-06-13 David Malcolm <dmalcolm@redhat.com>
5178
5179 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
5180 from rtx to rtx_insn *.
5181 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
5182 "label".
5183 (add_sched_insns_for_speculation): Likewise for local "target",
5184 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5185 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
5186 from rtx_insn ** to rtx_code_label **.
5187 (reorg_emit_nops): Likewise.
5188 (c6x_reorg): Likewise for local "call_labels".
5189 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
5190 rtx to rtx_insn *.
5191 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
5192 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
5193 the loops over LABEL_REFS.
5194 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
5195 braf_label.
5196 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
5197 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
5198 (split_branches): Strengthen local "olabel" from rtx to
5199 rtx_insn *, adding a safe_as_a cast.
5200 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
5201 to "rtx_insn *".
5202 (add_insn_after): Likewise for first two params.
5203 (add_insn_before): Likewise.
5204 (remove_insn): Likewise for param.
5205 (emit_pattern_before_noloc): Likewise for second and third params.
5206 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
5207 (emit_call_insn_before_noloc): Likewise.
5208 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
5209 to "rtx_insn *".
5210 (emit_barrier_before): Likewise.
5211 (emit_label_before): Strengthen "label" param from "rtx" to
5212 "rtx_code_label *". Strengthen "before" param from "rtx" to
5213 "rtx_insn *".
5214 (emit_insn_after_1): Strengthen "after" param from "rtx" to
5215 "rtx_insn *".
5216 (emit_pattern_after_noloc): Likewise.
5217 (emit_insn_after_noloc): Likewise.
5218 (emit_jump_insn_after_noloc): Likewise.
5219 (emit_call_insn_after_noloc): Likewise.
5220 (emit_debug_insn_after_noloc): Likewise.
5221 (emit_barrier_after): Likewise.
5222 (emit_label_after): Likewise for both params.
5223 (emit_pattern_after_setloc): Likewise for "after" param. Convert
5224 "loc" param from "int" to "location_t".
5225 (emit_insn_after_setloc): Likewise.
5226 (emit_jump_insn_after_setloc): Likewise.
5227 (emit_call_insn_after_setloc): Likewise.
5228 (emit_debug_insn_after_setloc): Likewise.
5229 (emit_pattern_before_setloc): Likewise for "before" param. Convert
5230 "loc" param from "int" to "location_t".
5231 (emit_pattern_before): Convert NULL_RTX to NULL.
5232 (emit_insn_before_setloc): Convert "loc" param from "int" to
5233 "location_t".
5234 (emit_jump_insn_before_setloc): Likewise.
5235 (emit_call_insn_before_setloc): Likewise.
5236 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
5237 rtx_insn *. Convert "loc" param from "int" to "location_t".
5238 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
5239 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
5240 Convert 3rd param from "int" to "location_t".
5241 (emit_barrier_before, emit_barrier_after, next_real_insn):
5242 Strengthen param from rtx to rtx_insn *.
5243 (emit_label_before): Strengthen 1st param from "rtx" to
5244 "rtx_code_label *". Strengthen 2nd param from "rtx" to
5245 "rtx_insn *".
5246 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
5247 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
5248 Strengthen 2nd param from "rtx" to "rtx_insn *".
5249 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
5250 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
5251 Likewise. Convert 3rd param from "int" to "location_t".
5252 (emit_label_after): Strengthen 1st param from "rtx" to
5253 "rtx_code_label *".
5254 (next_real_insn, remove_insn): Strengthen param from "rtx" to
5255 "rtx_insn *".
5256 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
5257 from "rtx" to "rtx_insn *".
5258
5259 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
5260
5261 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
5262 bodies streamed in with -Q.
5263 * dumpfile.c (dump_files): Add lto-stream-out dump file.
5264 * dumpfile.h (tree_dump_index): Add lto_stream_out.
5265 * gimple-streamer-out.c: Include gimple-pretty-print.h
5266 (output_bb): Dump stmts streamed.
5267 * lto-section-out.c: Include print-tree.h
5268 (lto_begin_section): Dump sections created.
5269 (lto_output_decl_index): Dump decl encoded.
5270 * lto-streamer-out.c: Include print-tree.h
5271 (create_output_block): Dump output block created.
5272 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
5273 (output_function): Dump function output.
5274 (output_constructor): Dump constructor streamed.
5275 (write_global_stream): Output indexes encoded.
5276 (produce_asm_for_decls): Dump streams encoded.
5277 * lto-streamer.c (streamer_dump_file): New global var.
5278 * lto-streamer.h (streamer_dump_file): Declare.
5279 * passes.c (ipa_write_summaries): Initialize streamer dump.
5280 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
5281 in.
5282
5283 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
5284
5285 PR target/86048
5286 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
5287 offsets for register save directives. Emit a second batch of save
5288 directives, if need be, when the function accesses prior frames.
5289
5290 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5291
5292 * config/arc/fpu.md (fmasf4): Force operand to register.
5293 (fnmasf4): Likewise.
5294
5295 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5296
5297 * config/arc/arc-protos.h (arc_pad_return): Remove.
5298 * config/arc/arc.c (machine_function): Remove force_short_suffix
5299 and size_reason.
5300 (arc_print_operand): Adjust printing of '&'.
5301 (arc_verify_short): Remove conditional printing of short suffix.
5302 (arc_final_prescan_insn): Remove reference to size_reason.
5303 (pad_return): New function.
5304 (arc_reorg): Call pad_return.
5305 (arc_pad_return): Remove.
5306 (arc_init_machine_status): Remove reference to force_short_suffix.
5307 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
5308 (attr length): When attribute iscompact is true force to 2
5309 regardless; in the case of maybe check if we want to force the
5310 instruction to have 4 bytes length.
5311 (nopv): Change it to generate 4 byte long nop as well.
5312 (blockage): New pattern.
5313 (simple_return): Remove call to arc_pad_return.
5314 (p_return_i): Likewise.
5315
5316 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5317
5318 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
5319
5320 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5321
5322 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
5323 ARC cores.
5324
5325 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5326
5327 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
5328 for ARC700 and ARCv2.
5329
5330 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
5331
5332 PR target/86076
5333 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
5334 operands[2] instead of operands[1].
5335
5336
5337 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5338
5339 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
5340 case, check whether the outer register overlaps an unallocatable
5341 register, not just whether it fits the required class.
5342
5343 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
5344
5345 * poly-int.h (can_div_trunc_p): Add new overload in which all values
5346 are poly_ints.
5347 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
5348 (memrefs_conflict_p): Likewise.
5349 (init_alias_analysis): Likewise.
5350 * cfgexpand.c (expand_debug_expr): Likewise.
5351 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
5352 * cse.c (fold_rtx): Likewise.
5353 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
5354 * expr.c (emit_block_move_hints): Likewise.
5355 (clear_storage_hints, push_block, emit_push_insn): Likewise.
5356 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
5357 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
5358 (emit_group_store): Likewise.
5359 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
5360 to read the PRE/POST_MODIFY increment.
5361 * calls.c (store_one_arg): Use strip_offset.
5362 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
5363 poly_int_rtx_p.
5364 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
5365 by a VEC_SELECT.
5366 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
5367 (simplify_binary_operation_1): Extend CONST_INT handling to
5368 poly_int_rtx_p.
5369 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
5370 than a HOST_WIDE_INT.
5371 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
5372 poly_int64.
5373 (adjust_mems, add_stores): Update accodingly.
5374 (vt_canonicalize_addr): Track polynomial offsets.
5375 (emit_note_insn_var_location): Likewise.
5376 (vt_add_function_parameter): Likewise.
5377 (vt_initialize): Likewise.
5378
5379 2018-06-12 Jeff Law <law@redhat.com>
5380
5381 * config.gcc (alpha*-*-freebsd*): Remove.
5382 * config/alpha/freebsd.h: Remove.
5383
5384 2018-06-12 David Malcolm <dmalcolm@redhat.com>
5385
5386 PR other/69968
5387 * spellcheck-tree.c (levenshtein_distance): Rename to...
5388 (get_edit_distance): ...this, and update for underlying renaming.
5389 * spellcheck-tree.h (levenshtein_distance): Rename to...
5390 (get_edit_distance): ...this.
5391 * spellcheck.c (levenshtein_distance): Rename to...
5392 (get_edit_distance): ...this. Convert from Levenshtein distance
5393 to Damerau-Levenshtein distance by supporting transpositions of
5394 adjacent characters. Rename "v1" to "v_next" and "v0" to
5395 "v_one_ago".
5396 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
5397 (selftest::test_edit_distance_unit_test_oneway): ...this, and
5398 update for underlying renaming.
5399 (selftest::levenshtein_distance_unit_test): Rename to...
5400 (selftest::test_get_edit_distance_unit): ...this, and update for
5401 underlying renaming.
5402 (selftest::test_find_closest_string): Add example from PR 69968
5403 where transposition helps
5404 (selftest::test_metric_conditions): Update for renaming.
5405 (selftest::test_metric_conditions): Likewise.
5406 (selftest::spellcheck_c_tests): Likewise.
5407 * spellcheck.h (levenshtein_distance): Rename both overloads to...
5408 (get_edit_distance): ...this.
5409 (best_match::consider): Update for renaming.
5410
5411 2018-06-12 Martin Sebor <msebor@redhat.com>
5412
5413 PR tree-optimization/85259
5414 * builtins.c (compute_objsize): Handle constant offsets.
5415 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
5416 true iff a warning has been issued.
5417 * gimple.h (gimple_nonartificial_location): New function.
5418 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
5419 gimple_nonartificial_location and handle -Wno-system-headers.
5420 (handle_builtin_stxncpy): Same.
5421
5422 2018-06-12 Martin Sebor <msebor@redhat.com>
5423
5424 PR c/85931
5425 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
5426
5427 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
5428
5429 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
5430 BUILTIN_VEC_XST entries for pointer to double and long long.
5431
5432 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
5433
5434 PR target/85990
5435 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5436 Update comments.
5437 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
5438 Likewise.
5439
5440 2018-06-12 Martin Liska <mliska@suse.cz>
5441
5442 * doc/options.texi: Document IntegerRange.
5443
5444 2018-06-12 Martin Liska <mliska@suse.cz>
5445
5446 * config/i386/i386.opt: Make MPX-related options as Deprecated.
5447 * opt-functions.awk: Handle Deprecated flag.
5448 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
5449 and report error.
5450 (read_cmdline_option): Report warning for a deprecated option.
5451 * opts.h (struct cl_option): Add new field cl_deprecated.
5452 (CL_ERR_DEPRECATED): New.
5453
5454 2018-06-12 Martin Liska <mliska@suse.cz>
5455
5456 * doc/options.texi: Document Deprecated option flag.
5457
5458 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5459
5460 * config/arc/arc-arch.h (arc_extras): New enum.
5461 (arc_cpu_t):Add field extra.
5462 (arc_cpu_types): Consider the extras.
5463 * config/arc/arc-cpus.def: Add extras info.
5464 * config/arc/arc-opts.h (processor_type): Consider extra field.
5465 * config/arc/arc.c (arc_override_options): Handle extra field.
5466
5467 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
5468
5469 * config/arc/arc-arch.h: Update ARC_OPTX macro.
5470 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
5471 field.
5472 * config/arc/arc.c (arc_init): Update pic warning.
5473 (irq_range): Update irq range parsing warnings.
5474 (arc_override_options): Update various warning messages.
5475 (arc_handle_aux_attribute): Likewise.
5476
5477 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
5478
5479 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
5480
5481 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5482
5483 * doc/sourcebuild.texi: Document usage of line number 0 in verify
5484 compiler messages directives.
5485
5486 2018-06-12 Matthew Fortune <mfortune@gmail.com>
5487
5488 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
5489 * config/mips/mips-tables.opt: Regenerate.
5490 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
5491 mips64r6.
5492 * doc/invoke.texi: Document -march=i6500.
5493
5494 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
5495
5496 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
5497 (i6400_gpmul): Add cpu_unit.
5498 (i6400_gpdiv): Likewise.
5499 (i6400_msa_add_d): Update reservations.
5500 (i6400_msa_int_add) Likewise.
5501 (i6400_msa_short_logic3) Likewise.
5502 (i6400_msa_short_logic2) Likewise.
5503 (i6400_msa_short_logic) Likewise.
5504 (i6400_msa_move) Likewise.
5505 (i6400_msa_cmp) Likewise.
5506 (i6400_msa_short_float2) Likewise.
5507 (i6400_msa_div_d) Likewise.
5508 (i6400_msa_long_logic1) Likewise.
5509 (i6400_msa_long_logic2) Likewise.
5510 (i6400_msa_mult) Likewise.
5511 (i6400_msa_long_float2) Likewise.
5512 (i6400_msa_long_float4) Likewise.
5513 (i6400_msa_long_float5) Likewise.
5514 (i6400_msa_long_float8) Likewise.
5515 (i6400_fpu_fadd): Include frint type.
5516 (i6400_fpu_store): New define_insn_reservation.
5517 (i6400_fpu_load): Likewise.
5518 (i6400_fpu_move): Likewise.
5519 (i6400_fpu_fcmp): Likewise.
5520 (i6400_fpu_fmadd): Likewise.
5521 (i6400_int_mult): Include imul3nc type and update reservation.
5522 (i6400_int_div): Include idiv3 type and update reservation.
5523 (i6400_int_load): Update to check type not move_type.
5524 (i6400_int_store): Likewise.
5525 (i6400_int_prefetch): Set zero latency.
5526
5527 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
5528
5529 * gcc.c: Document new %@{...} sequence.
5530 (LINK_COMMAND_SPEC): Use it for the -L switches.
5531 (cpp_unique_options): Use it for the -I switches.
5532 (at_file_argbuf): New global variable.
5533 (in_at_file): Likewise.
5534 (alloc_args): Create at_file_argbuf.
5535 (clear_args): Truncate at_file_argbuf.
5536 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
5537 (open_at_file): New function.
5538 (close_at_file): Likewise.
5539 (create_at_file): Delete.
5540 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
5541 <'o'>: Likewise.
5542 <'@'>: New case.
5543 (validate_switches_from_spec): Deal with %@{...} sequence.
5544 (validate_switches): Likewise.
5545 (driver::finalize): Call clear_args.
5546
5547 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5548
5549 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
5550
5551 2018-06-11 Martin Sebor <msebor@redhat.com>
5552
5553 * doc/invoke.texi (-Wall): List -Wc++17-compat.
5554 (Wno-class-memaccess): Add @opindex.
5555 (Wno-templates, Wno-multiple-inheritance): Same.
5556 (Wno-virtual-inheritance, Wno-namespaces): Same.
5557 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
5558 (Wno-format-overflow, Wno-format-truncation): Same.
5559 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
5560 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
5561 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
5562 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
5563 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
5564 (Wno-misspelled-isr): Same.
5565
5566 2018-06-11 Martin Sebor <msebor@redhat.com>
5567
5568 * PR tree-optimization/86083
5569 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
5570
5571 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
5572
5573 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
5574
5575 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
5576
5577 PR target/85755
5578 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
5579 on the correct operand.
5580 (*movdi_internal64): Ditto.
5581
5582 2018-06-11 Martin Liska <mliska@suse.cz>
5583
5584 PR tree-optimization/86089
5585 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
5586
5587 2018-06-11 Julia Koval <julia.koval@intel.com>
5588
5589 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
5590 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
5591 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
5592
5593 2018-06-11 Olivier Hainque <hainque@adacore.com>
5594
5595 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
5596 for Ada with strict dwarf2.
5597
5598 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
5599
5600 PR target/85755
5601 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
5602 addresses.
5603
5604 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
5605
5606 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
5607
5608 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
5609
5610 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
5611 TARGET_ELF.
5612
5613 2018-06-08 Martin Liska <mliska@suse.cz>
5614
5615 * tree-cfg.h (debug_function): Fix argument type to match
5616 implementation.
5617
5618 2018-06-08 Martin Liska <mliska@suse.cz>
5619
5620 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
5621 Remove usage of MPX-related (and removed) fields.
5622 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
5623
5624 2018-06-08 David Malcolm <dmalcolm@redhat.com>
5625
5626 * cfg.c (debug): Use TDF_NONE rather than 0.
5627 * cfghooks.c (debug): Likewise.
5628 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
5629 (struct dump_option_value_info): Convert to...
5630 (struct kv_pair): ...this template type.
5631 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
5632 rather than 0.
5633 (optinfo_verbosity_options): Likewise.
5634 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
5635 OPTGROUP_NONE.
5636 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
5637 than int for "optgroup_flags" param.
5638 (dump_generic_expr_loc): Use dump_flags_t rather than int for
5639 "dump_kind" param.
5640 (dump_dec): Likewise.
5641 (dump_finish): Use TDF_NONE rather than 0.
5642 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
5643 rather than int for "optgroup_flags" param. Use TDF_NONE rather
5644 than 0. Update for change to option_ptr.
5645 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
5646 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
5647 0. Update for changes to optinfo_verbosity_options and
5648 optgroup_options.
5649 (opt_info_switch_p): Convert optgroup_flags from int to
5650 optgroup_flags_t.
5651 (dump_basic_block): Use dump_flags_t rather than int
5652 for "dump_kind" param.
5653 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
5654 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
5655 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
5656 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
5657 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
5658 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
5659 TDF_NONE): Convert from macros to...
5660 (enum dump_flag): ...this new enum.
5661 (dump_flags_t): Update to use enum.
5662 (operator|, operator&, operator~, operator|=, operator&=):
5663 Implement for dump_flags_t.
5664 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
5665 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
5666 Convert from macros to...
5667 (enum optgroup_flag): ...this new enum.
5668 (optgroup_flags_t): New typedef.
5669 (operator|, operator|=): Implement for optgroup_flags_t.
5670 (struct dump_file_info): Convert field "alt_flags" to
5671 dump_flags_t. Convert field "optgroup_flags" to
5672 optgroup_flags_t.
5673 (dump_basic_block): Use dump_flags_t rather than int for param.
5674 (dump_generic_expr_loc): Likewise.
5675 (dump_dec): Likewise.
5676 (dump_register): Convert param "optgroup_flags" to
5677 optgroup_flags_t.
5678 (opt_info_enable_passes): Likewise.
5679 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
5680 than 0.
5681 * gimple-pretty-print.c (debug): Likewise.
5682 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
5683 (merged_store_group::apply_stores): Likewise.
5684 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
5685 * gimple.c (verify_gimple_pp): Likewise.
5686 * graphite-poly.c (print_pbb_body): Likewise.
5687 * passes.c (pass_manager::register_one_dump_file): Convert
5688 local "optgroup_flags" to optgroup_flags_t.
5689 * print-tree.c (print_node): Use TDF_NONE rather than 0.
5690 (debug): Likewise.
5691 (debug_body): Likewise.
5692 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
5693 to optgroup_flags_t.
5694 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
5695 than 0.
5696 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
5697 (convert_mult_to_fma): Likewise.
5698 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
5699 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
5700 * tree-vect-data-refs.c (dump_lower_bound): Convert param
5701 "dump_kind" to dump_flags_t.
5702
5703 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5704
5705 * config/rs6000/rs6000.c (min, max): Delete.
5706
5707 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
5708
5709 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
5710 -mabi=spe and -mabi=no-spe.
5711
5712 2018-06-08 Martin Liska <mliska@suse.cz>
5713
5714 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
5715 where we expect an existing summary.
5716
5717 2018-06-08 Martin Liska <mliska@suse.cz>
5718
5719 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
5720 * ipa-inline.h (estimate_edge_growth): Likewise.
5721
5722 2018-06-08 Martin Liska <mliska@suse.cz>
5723
5724 * cgraph.c (function_version_hasher::hash): Use
5725 cgraph_node::get_uid ().
5726 (function_version_hasher::equal):
5727 * cgraph.h (cgraph_node::get_uid): New method.
5728 * ipa-inline.c (update_caller_keys): Use
5729 cgraph_node::get_uid ().
5730 (update_callee_keys): Likewise.
5731 * ipa-utils.c (searchc): Likewise.
5732 (ipa_reduced_postorder): Likewise.
5733 * lto-cgraph.c (input_node): Likewise.
5734 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
5735 * symbol-summary.h (symtab_insertion): Likewise.
5736 (symtab_removal): Likewise.
5737 (symtab_duplication): Likewise.
5738 * tree-pretty-print.c (dump_function_header): Likewise.
5739 * tree-sra.c (convert_callers_for_node): Likewise.
5740
5741 2018-06-08 Martin Liska <mliska@suse.cz>
5742
5743 * cgraph.c (symbol_table::create_edge): Always assign a new
5744 unique number.
5745 (symbol_table::free_edge): Do not recycle numbers.
5746 * cgraph.h (cgraph_edge::get): New method.
5747 * symbol-summary.h (symtab_removal): Use it.
5748 (symtab_duplication): Likewise.
5749 (call_summary::hashable_uid): Remove.
5750
5751 2018-06-08 Martin Liska <mliska@suse.cz>
5752
5753 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
5754 (initialize_growth_caches): Remove.
5755 (free_growth_caches): Likewise.
5756 (do_estimate_edge_time): Use edge_growth_cache.
5757 (do_estimate_edge_size): Likewise.
5758 (do_estimate_edge_hints): Likewise.
5759 * ipa-inline.c (reset_edge_caches): Likewise.
5760 (recursive_inlining): Likewise.
5761 (inline_small_functions): Likewise.
5762 * ipa-inline.h (initialize_growth_caches): Remove.
5763 (estimate_edge_size): Likewise.
5764 (estimate_edge_time): Likewise.
5765 (estimate_edge_hints): Likewise.
5766 (reset_edge_growth_cache): Likewise.
5767 * symbol-summary.h (call_summary::remove): New method.
5768
5769 2018-06-08 Martin Liska <mliska@suse.cz>
5770
5771 * ipa-cp.c (class edge_clone_summary): New summary.
5772 (grow_edge_clone_vectors): Remove.
5773 (ipcp_edge_duplication_hook): Remove.
5774 (class edge_clone_summary_t): New call_summary class.
5775 (ipcp_edge_removal_hook): Remove.
5776 (edge_clone_summary_t::duplicate): New function.
5777 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
5778 (create_specialized_node): Likewise.
5779 (ipcp_driver): Initialize edge_clone_summaries and do not
5780 register hooks.
5781
5782 2018-06-08 Martin Liska <mliska@suse.cz>
5783
5784 * symbol-summary.h (get): New function.
5785 (call_summary::m_initialize_when_cloning): New class member.
5786
5787 2018-06-08 Martin Liska <mliska@suse.cz>
5788
5789 * cgraph.c (cgraph_node::remove): Do not recycle uid.
5790 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
5791 (symbol_table::allocate_cgraph_symbol): Do not set uid.
5792 * passes.c (uid_hash_t): Record removed_nodes by their uids.
5793 (remove_cgraph_node_from_order): Use the removed_nodes set.
5794 (do_per_function_toporder): Likwise.
5795 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
5796 instead of summary_uid.
5797 (symtab_removal): Likewise.
5798 (symtab_duplication): Likewise.
5799
5800 2018-06-08 Martin Liska <mliska@suse.cz>
5801
5802 * ipa-cp.c (ipcp_store_bits_results): Use
5803 ipcp_transformation_sum.
5804 (ipcp_store_vr_results): Likewise.
5805 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
5806 to ...
5807 (ipcp_transformation_initialize): ... this.
5808 (ipa_set_node_agg_value_chain):
5809 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
5810 (write_ipcp_transformation_info): Likewise.
5811 (read_ipcp_transformation_info): Likewise.
5812 (ipcp_update_bits): Likewise.
5813 (ipcp_update_vr): Likewise.
5814 (ipcp_transform_function): Likewise.
5815 * ipa-prop.h: Rename ipcp_transformation_summary to
5816 ipcp_transformation.
5817 (class ipcp_transformation_t): New function summary.
5818 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
5819 (ipa_get_agg_replacements_for_node): Likewise.
5820
5821 2018-06-08 Martin Liska <mliska@suse.cz>
5822
5823 * ipa-pure-const.c (struct funct_state_d): Do it class instead
5824 of struct.
5825 (class funct_state_summary_t): New function_summary class.
5826 (has_function_state): Remove.
5827 (get_function_state): Likewise.
5828 (set_function_state): Likewise.
5829 (add_new_function): Likewise.
5830 (funct_state_summary_t::insert): New function.
5831 (duplicate_node_data): Remove.
5832 (remove_node_data): Remove.
5833 (funct_state_summary_t::duplicate): New function.
5834 (register_hooks): Create new funct_state_summaries.
5835 (pure_const_generate_summary): Use it.
5836 (pure_const_write_summary): Likewise.
5837 (pure_const_read_summary): Likewise.
5838 (propagate_pure_const): Likewise.
5839 (propagate_nothrow): Likewise.
5840 (dump_malloc_lattice): Likewise.
5841 (propagate_malloc): Likewise.
5842 (execute): Do not register hooks, just remove summary
5843 instead.
5844 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
5845 constructor.
5846
5847 2018-06-08 Martin Liska <mliska@suse.cz>
5848
5849 * ipa-reference.c (remove_node_data): Remove.
5850 (duplicate_node_data): Likewise.
5851 (class ipa_ref_var_info_summary_t): New class.
5852 (class ipa_ref_opt_summary_t): Likewise.
5853 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
5854 (get_reference_optimization_summary): Use
5855 ipa_ref_opt_sum_summaries.
5856 (set_reference_vars_info): Remove.
5857 (set_reference_optimization_summary): Likewise.
5858 (ipa_init): Create summaries.
5859 (init_function_info): Use function summary.
5860 (ipa_ref_opt_summary_t::duplicate): New function.
5861 (ipa_ref_opt_summary_t::remove): New function.
5862 (get_read_write_all_from_node): Fix GNU coding style.
5863 (propagate): Use function summary.
5864 (write_node_summary_p): Fix GNU coding style.
5865 (stream_out_bitmap): Likewise.
5866 (ipa_reference_read_optimization_summary): Use function summary.
5867 (ipa_reference_c_finalize): Do not release hooks.
5868
5869 2018-06-08 Martin Liska <mliska@suse.cz>
5870
5871 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
5872 (analyze_function_body): Extract multiple calls of get_create.
5873 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5874 * ipa-inline.c (recursive_inlining): Use ::get method.
5875 * ipa-inline.h (estimate_edge_growth): Likewise.
5876
5877 2018-06-08 Martin Liska <mliska@suse.cz>
5878
5879 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
5880 HSA_INVALID.
5881 (hsa_function_summary::hsa_function_summary): Use the new enum
5882 value.
5883 (hsa_gpu_implementation_p): Use hsa_summaries::get.
5884 * hsa-gen.c (hsa_get_host_function): Likewise.
5885 (get_brig_function_name): Likewise.
5886 * ipa-hsa.c (process_hsa_functions): Likewise.
5887 (ipa_hsa_write_summary): Likewise.
5888 * symbol-summary.h (symtab_duplication): Use ::get function/
5889 (get): New function.
5890
5891 2018-06-08 Martin Liska <mliska@suse.cz>
5892
5893 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
5894 of get.
5895 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
5896 (hsa_register_kernel): Likewise.
5897 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
5898 * hsa-gen.c (hsa_get_host_function): Likewise.
5899 (get_brig_function_name): Likewise.
5900 (generate_hsa): Likewise.
5901 (pass_gen_hsail::execute): Likewise.
5902 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
5903 (devirtualization_time_bonus): Likewise.
5904 (ipcp_propagate_stage): Likewise.
5905 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
5906 (edge_set_predicate): Likewise.
5907 (evaluate_conditions_for_known_args): Likewise.
5908 (evaluate_properties_for_edge): Likewise.
5909 (ipa_fn_summary::reset): Likewise.
5910 (ipa_fn_summary_t::duplicate): Likewise.
5911 (dump_ipa_call_summary): Likewise.
5912 (ipa_dump_fn_summary): Likewise.
5913 (analyze_function_body): Likewise.
5914 (compute_fn_summary): Likewise.
5915 (estimate_edge_devirt_benefit): Likewise.
5916 (estimate_edge_size_and_time): Likewise.
5917 (estimate_calls_size_and_time): Likewise.
5918 (estimate_node_size_and_time): Likewise.
5919 (inline_update_callee_summaries): Likewise.
5920 (remap_edge_change_prob): Likewise.
5921 (remap_edge_summaries): Likewise.
5922 (ipa_merge_fn_summary_after_inlining): Likewise.
5923 (ipa_update_overall_fn_summary): Likewise.
5924 (read_ipa_call_summary): Likewise.
5925 (inline_read_section): Likewise.
5926 (write_ipa_call_summary): Likewise.
5927 (ipa_fn_summary_write): Likewise.
5928 (ipa_free_fn_summary): Likewise.
5929 * ipa-hsa.c (process_hsa_functions): Likewise.
5930 (ipa_hsa_write_summary): Likewise.
5931 (ipa_hsa_read_section): Likewise.
5932 * ipa-icf.c (sem_function::merge): Likewise.
5933 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
5934 (do_estimate_edge_time): Likewise.
5935 (estimate_size_after_inlining): Likewise.
5936 (estimate_growth): Likewise.
5937 (growth_likely_positive): Likewise.
5938 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
5939 (inline_call): Likewise.
5940 * ipa-inline.c (caller_growth_limits): Likewise.
5941 (can_inline_edge_p): Likewise.
5942 (can_inline_edge_by_limits_p): Likewise.
5943 (compute_uninlined_call_time): Likewise.
5944 (compute_inlined_call_time): Likewise.
5945 (want_inline_small_function_p): Likewise.
5946 (edge_badness): Likewise.
5947 (update_caller_keys): Likewise.
5948 (update_callee_keys): Likewise.
5949 (recursive_inlining): Likewise.
5950 (inline_small_functions): Likewise.
5951 (inline_to_all_callers_1): Likewise.
5952 (dump_overall_stats): Likewise.
5953 (early_inline_small_functions): Likewise.
5954 (early_inliner): Likewise.
5955 * ipa-inline.h (estimate_edge_growth): Likewise.
5956 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
5957 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5958 * ipa-prop.h (IPA_NODE_REF): Likewise.
5959 (IPA_EDGE_REF): Likewise.
5960 * ipa-pure-const.c (malloc_candidate_p): Likewise.
5961 (propagate_malloc): Likewise.
5962 * ipa-split.c (execute_split_functions): Likewise.
5963 * symbol-summary.h: Rename get to get_create.
5964 (get): Likewise.
5965 (get_create): Likewise.
5966 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
5967
5968 2018-06-08 Martin Liska <mliska@suse.cz>
5969
5970 * symbol-summary.h (release): Move definition out of class
5971 declaration.
5972 (symtab_removal): Likewise.
5973 (symtab_duplication): Likewise.
5974
5975 2018-06-08 Martin Liska <mliska@suse.cz>
5976
5977 * symbol-summary.h (function_summary): Move constructor
5978 implementation out of class declaration.
5979 (release): Likewise.
5980 (symtab_insertion): Likewise.
5981 (symtab_removal): Likewise.
5982 (symtab_duplication): Likewise.
5983 (get): Likewise.
5984
5985 2018-06-08 Martin Liska <mliska@suse.cz>
5986
5987 * Makefile.in: Remove support for MPX (macros, related functions,
5988 fields in cgraph_node, ...).
5989 * builtin-types.def (BT_BND): Likewise.
5990 (BT_FN_BND_CONST_PTR): Likewise.
5991 (BT_FN_CONST_PTR_BND): Likewise.
5992 (BT_FN_VOID_PTR_BND): Likewise.
5993 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
5994 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
5995 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
5996 (expand_builtin_mempcpy_with_bounds): Likewise.
5997 (expand_builtin_memset_with_bounds): Likewise.
5998 (expand_builtin_memset_args): Likewise.
5999 (std_expand_builtin_va_start): Likewise.
6000 (expand_builtin): Likewise.
6001 (expand_builtin_with_bounds): Likewise.
6002 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
6003 (DEF_LIB_BUILTIN_CHKP): Likewise.
6004 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
6005 (DEF_CHKP_BUILTIN): Likewise.
6006 (BUILT_IN_MEMCPY): Likewise.
6007 (BUILT_IN_MEMMOVE): Likewise.
6008 (BUILT_IN_MEMPCPY): Likewise.
6009 (BUILT_IN_MEMSET): Likewise.
6010 (BUILT_IN_STPCPY): Likewise.
6011 (BUILT_IN_STRCAT): Likewise.
6012 (BUILT_IN_STRCHR): Likewise.
6013 (BUILT_IN_STRCPY): Likewise.
6014 (BUILT_IN_STRLEN): Likewise.
6015 (BUILT_IN_MEMCPY_CHK): Likewise.
6016 (BUILT_IN_MEMMOVE_CHK): Likewise.
6017 (BUILT_IN_MEMPCPY_CHK): Likewise.
6018 (BUILT_IN_MEMSET_CHK): Likewise.
6019 (BUILT_IN_STPCPY_CHK): Likewise.
6020 (BUILT_IN_STRCAT_CHK): Likewise.
6021 (BUILT_IN_STRCPY_CHK): Likewise.
6022 * calls.c (store_bounds): Likewise.
6023 (emit_call_1): Likewise.
6024 (special_function_p): Likewise.
6025 (maybe_warn_nonstring_arg): Likewise.
6026 (initialize_argument_information): Likewise.
6027 (finalize_must_preallocate): Likewise.
6028 (compute_argument_addresses): Likewise.
6029 (expand_call): Likewise.
6030 * cfgexpand.c (expand_call_stmt): Likewise.
6031 (expand_return): Likewise.
6032 (expand_gimple_stmt_1): Likewise.
6033 (pass_expand::execute): Likewise.
6034 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
6035 (cgraph_node::remove): Likewise.
6036 (cgraph_node::dump): Likewise.
6037 (cgraph_node::verify_node): Likewise.
6038 * cgraph.h (chkp_function_instrumented_p): Likewise.
6039 (symtab_node::get_alias_target): Likewise.
6040 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
6041 (cgraph_local_p): Likewise.
6042 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
6043 (cgraph_edge::rebuild_references): Likewise.
6044 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
6045 (walk_polymorphic_call_targets): Likewise.
6046 (cgraph_node::expand_thunk): Likewise.
6047 (symbol_table::output_weakrefs): Likewise.
6048 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
6049 (ix86_handle_option): Likewise.
6050 * config/i386/constraints.md: Likewise.
6051 * config/i386/i386-builtin-types.def (BND): Likewise.
6052 (VOID): Likewise.
6053 (PVOID): Likewise.
6054 (ULONG): Likewise.
6055 * config/i386/i386-builtin.def (BDESC_END): Likewise.
6056 (BDESC_FIRST): Likewise.
6057 (BDESC): Likewise.
6058 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
6059 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
6060 * config/i386/i386.c (enum reg_class): Likewise.
6061 (ix86_target_string): Likewise.
6062 (ix86_option_override_internal): Likewise.
6063 (ix86_conditional_register_usage): Likewise.
6064 (ix86_valid_target_attribute_inner_p): Likewise.
6065 (ix86_set_indirect_branch_type): Likewise.
6066 (ix86_set_current_function): Likewise.
6067 (ix86_function_arg_regno_p): Likewise.
6068 (init_cumulative_args): Likewise.
6069 (ix86_function_arg_advance): Likewise.
6070 (ix86_function_arg): Likewise.
6071 (ix86_pass_by_reference): Likewise.
6072 (ix86_function_value_regno_p): Likewise.
6073 (ix86_function_value_1): Likewise.
6074 (ix86_function_value_bounds): Likewise.
6075 (ix86_return_in_memory): Likewise.
6076 (ix86_setup_incoming_vararg_bounds): Likewise.
6077 (ix86_va_start): Likewise.
6078 (indirect_thunk_need_prefix): Likewise.
6079 (print_reg): Likewise.
6080 (ix86_print_operand): Likewise.
6081 (ix86_expand_call): Likewise.
6082 (ix86_output_function_return): Likewise.
6083 (reg_encoded_number): Likewise.
6084 (BDESC_VERIFYS): Likewise.
6085 (ix86_init_mpx_builtins): Likewise.
6086 (ix86_init_builtins): Likewise.
6087 (ix86_emit_cmove): Likewise.
6088 (ix86_emit_move_max): Likewise.
6089 (ix86_expand_builtin): Likewise.
6090 (ix86_builtin_mpx_function): Likewise.
6091 (ix86_get_arg_address_for_bt): Likewise.
6092 (ix86_load_bounds): Likewise.
6093 (ix86_store_bounds): Likewise.
6094 (ix86_load_returned_bounds): Likewise.
6095 (ix86_store_returned_bounds): Likewise.
6096 (ix86_class_likely_spilled_p): Likewise.
6097 (ix86_hard_regno_mode_ok): Likewise.
6098 (x86_order_regs_for_local_alloc): Likewise.
6099 (ix86_mitigate_rop): Likewise.
6100 (ix86_bnd_prefixed_insn_p): Likewise.
6101 (ix86_mpx_bound_mode): Likewise.
6102 (ix86_make_bounds_constant): Likewise.
6103 (ix86_initialize_bounds): Likewise.
6104 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
6105 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
6106 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
6107 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
6108 (TARGET_CHKP_BOUND_MODE): Likewise.
6109 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
6110 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
6111 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
6112 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
6113 * config/i386/i386.h (TARGET_MPX): Likewise.
6114 (TARGET_MPX_P): Likewise.
6115 (VALID_BND_REG_MODE): Likewise.
6116 (FIRST_BND_REG): Likewise.
6117 (LAST_BND_REG): Likewise.
6118 (enum reg_class): Likewise.
6119 (BND_REG_P): Likewise.
6120 (BND_REGNO_P): Likewise.
6121 (BNDmode): Likewise.
6122 (ADJUST_INSN_LENGTH): Likewise.
6123 * config/i386/i386.md: Likewise.
6124 * config/i386/i386.opt: Likewise.
6125 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
6126 (defined): Likewise.
6127 (LINK_MPX): Likewise.
6128 (MPX_SPEC): Likewise.
6129 (LIBMPX_SPEC): Likewise.
6130 (LIBMPXWRAPPERS_SPEC): Likewise.
6131 (CHKP_SPEC): Likewise.
6132 * config/i386/predicates.md: Likewise.
6133 * dbxout.c (dbxout_type): Likewise.
6134 * doc/extend.texi: Likewise.
6135 * doc/invoke.texi: Likewise.
6136 * doc/md.texi: Likewise.
6137 * doc/tm.texi: Likewise.
6138 * doc/tm.texi.in: Likewise.
6139 * dwarf2out.c (is_base_type): Likewise.
6140 (gen_formal_types_die): Likewise.
6141 (gen_subprogram_die): Likewise.
6142 (gen_type_die_with_usage): Likewise.
6143 (gen_decl_die): Likewise.
6144 (dwarf2out_late_global_decl): Likewise.
6145 * expr.c (expand_assignment): Likewise.
6146 (emit_storent_insn): Likewise.
6147 (store_expr_with_bounds): Likewise.
6148 (store_expr): Likewise.
6149 (expand_expr_real_1): Likewise.
6150 * expr.h (store_expr_with_bounds): Likewise.
6151 * function.c (use_register_for_decl): Likewise.
6152 (struct bounds_parm_data): Likewise.
6153 (assign_parms_augmented_arg_list): Likewise.
6154 (assign_parm_find_entry_rtl): Likewise.
6155 (assign_parm_is_stack_parm): Likewise.
6156 (assign_parm_load_bounds): Likewise.
6157 (assign_bounds): Likewise.
6158 (assign_parms): Likewise.
6159 (expand_function_start): Likewise.
6160 * gcc.c (CHKP_SPEC): Likewise.
6161 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6162 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
6163 (wrestrict_dom_walker::check_call): Likewise.
6164 * gimple.c (gimple_build_call_from_tree): Likewise.
6165 * gimple.h (enum gf_mask): Likewise.
6166 (gimple_call_with_bounds_p): Likewise.
6167 (gimple_call_set_with_bounds): Likewise.
6168 * gimplify.c (gimplify_init_constructor): Likewise.
6169 * ipa-cp.c (initialize_node_lattices): Likewise.
6170 (propagate_constants_across_call): Likewise.
6171 (find_more_scalar_values_for_callers_subset): Likewise.
6172 * ipa-hsa.c (process_hsa_functions): Likewise.
6173 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
6174 * ipa-icf.c (sem_function::merge): Likewise.
6175 * ipa-inline.c (early_inliner): Likewise.
6176 * ipa-pure-const.c (warn_function_noreturn): Likewise.
6177 (warn_function_cold): Likewise.
6178 (propagate_pure_const): Likewise.
6179 * ipa-ref.h (enum GTY): Likewise.
6180 * ipa-split.c (find_retbnd): Likewise.
6181 (consider_split): Likewise.
6182 (split_function): Likewise.
6183 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6184 * ipa.c (walk_polymorphic_call_targets): Likewise.
6185 (symbol_table::remove_unreachable_nodes): Likewise.
6186 (process_references): Likewise.
6187 (cgraph_build_static_cdtor_1): Likewise.
6188 * lto-cgraph.c (lto_output_node): Likewise.
6189 (output_refs): Likewise.
6190 (compute_ltrans_boundary): Likewise.
6191 (input_overwrite_node): Likewise.
6192 (input_node): Likewise.
6193 (input_cgraph_1): Likewise.
6194 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
6195 * passes.c (pass_manager::execute_early_local_passes): Likewise.
6196 (class pass_chkp_instrumentation_passes): Likewise.
6197 (make_pass_chkp_instrumentation_passes): Likewise.
6198 * passes.def: Likewise.
6199 * rtl.h (struct GTY): Likewise.
6200 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
6201 * stor-layout.c (layout_type): Likewise.
6202 * symtab.c: Likewise.
6203 * target.def: Likewise.
6204 * targhooks.c (default_chkp_bound_type): Likewise.
6205 (default_chkp_bound_mode): Likewise.
6206 (default_builtin_chkp_function): Likewise.
6207 (default_chkp_function_value_bounds): Likewise.
6208 (default_chkp_make_bounds_constant): Likewise.
6209 (default_chkp_initialize_bounds): Likewise.
6210 * targhooks.h (default_chkp_bound_type): Likewise.
6211 (default_chkp_bound_mode): Likewise.
6212 (default_builtin_chkp_function): Likewise.
6213 (default_chkp_function_value_bounds): Likewise.
6214 (default_chkp_make_bounds_constant): Likewise.
6215 (default_chkp_initialize_bounds): Likewise.
6216 * toplev.c (compile_file): Likewise.
6217 (process_options): Likewise.
6218 * tree-core.h (DEF_BUILTIN): Likewise.
6219 (DEF_BUILTIN_CHKP): Likewise.
6220 * tree-inline.c (declare_return_variable): Likewise.
6221 (remap_gimple_stmt): Likewise.
6222 (copy_bb): Likewise.
6223 (initialize_inlined_parameters): Likewise.
6224 (expand_call_inline): Likewise.
6225 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
6226 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
6227 (make_pass_ipa_chkp_produce_thunks): Likewise.
6228 (make_pass_chkp): Likewise.
6229 (make_pass_chkp_opt): Likewise.
6230 (make_pass_chkp_instrumentation_passes): Likewise.
6231 * tree-pretty-print.c (dump_generic_node): Likewise.
6232 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
6233 * tree-ssa-dce.c (propagate_necessity): Likewise.
6234 (eliminate_unnecessary_stmts): Likewise.
6235 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
6236 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6237 * tree-ssa-sccvn.h: Likewise.
6238 * tree-ssa-strlen.c (get_string_length): Likewise.
6239 (valid_builtin_call): Likewise.
6240 (adjust_last_stmt): Likewise.
6241 (handle_builtin_strchr): Likewise.
6242 (handle_builtin_strcpy): Likewise.
6243 (handle_builtin_stxncpy): Likewise.
6244 (handle_builtin_memcpy): Likewise.
6245 (handle_builtin_strcat): Likewise.
6246 (strlen_check_and_optimize_stmt): Likewise.
6247 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
6248 * tree-streamer-in.c: Likewise.
6249 * tree-streamer.c (record_common_node): Likewise.
6250 * tree.c (tree_code_size): Likewise.
6251 (wide_int_to_tree_1): Likewise.
6252 (type_contains_placeholder_1): Likewise.
6253 (build_common_tree_nodes): Likewise.
6254 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
6255 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
6256 (POINTER_BOUNDS_P): Likewise.
6257 (BOUNDED_TYPE_P): Likewise.
6258 (BOUNDED_P): Likewise.
6259 (CALL_WITH_BOUNDS_P): Likewise.
6260 (pointer_bounds_type_node): Likewise.
6261 * value-prof.c (gimple_ic): Likewise.
6262 * var-tracking.c (vt_add_function_parameters): Likewise.
6263 * varasm.c (make_decl_rtl): Likewise.
6264 (assemble_start_function): Likewise.
6265 (output_constant): Likewise.
6266 (maybe_assemble_visibility): Likewise.
6267 * varpool.c (ctor_for_folding): Likewise.
6268 * chkp-builtins.def: Remove.
6269 * ipa-chkp.c: Remove.
6270 * ipa-chkp.h: Remove.
6271 * rtl-chkp.c: Remove.
6272 * rtl-chkp.h: Remove.
6273 * tree-chkp-opt.c: Remove.
6274 * tree-chkp.c: Remove.
6275 * tree-chkp.h: Remove.
6276
6277 2018-06-07 Carl Love <cel@us.ibm.com>
6278
6279 * config/rs6000/vsx.md (vextract_fp_from_shorth,
6280 vextract_fp_from_shortl): Add BE support.
6281
6282 2018-06-07 Paul Koning <ni1d@arrl.net>
6283
6284 * compare-elim.c (try_merge_compare): Don't merge compare if
6285 address contains a side effect.
6286 (try_eliminate_compare): Likewise.
6287
6288 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
6289
6290 * config.gcc: Support "tremont".
6291 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
6292 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6293 PROCESSOR_TREMONT.
6294 * config/i386/i386.c (m_TREMONT): Define.
6295 (processor_target_table): Add "tremont".
6296 (PTA_TREMONT): Define.
6297 (ix86_lea_outperforms): Add TARGET_TREMONT.
6298 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
6299 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
6300 and M_INTEL_GOLDMONT_PLUS.
6301 (fold_builtin_cpu): Add "tremont".
6302 (ix86_add_stmt_cost): Add TARGET_TREMONT.
6303 (ix86_option_override_internal): Add "tremont".
6304 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
6305 (processor_type): Add PROCESSOR_TREMONT.
6306 * config/i386/x86-tune.def: Add m_TREMONT.
6307 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
6308
6309 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6310
6311 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
6312 symbol defined for msp430i* devices to be lower case.
6313
6314 2018-06-07 Richard Biener <rguenther@suse.de>
6315
6316 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
6317 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
6318 Properly wrap signed arithmetic if overflow wraps.
6319
6320 2018-06-07 Jakub Jelinek <jakub@redhat.com>
6321
6322 PR tree-optimization/69615
6323 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
6324 of a cast from a same precision integral SSA_NAME in a bb dominated
6325 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
6326 cast to utype if rhs2 has already a compatible type.
6327
6328 2018-06-07 Richard Biener <rguenther@suse.de>
6329
6330 PR tree-optimization/85935
6331 * graphite-scop-detection.c (find_params_in_bb): Analyze
6332 condition operands with respect to the correct loop. Assert
6333 the analysis doesn't fail.
6334
6335 2018-06-04 Carl Love <cel@us.ibm.com>
6336
6337 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
6338 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
6339 as it is slightly cheaper.
6340 (first_match_or_eos_index_<mode>):
6341 Calculate index using natural element order.
6342 (first_match_index_<mode>):
6343 Calculate index using natural element order.
6344 (first_match_or_eos_index_<mode>):
6345 Calculate index using natural order.
6346 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
6347 for BE and LE modes.
6348 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
6349 P9V_BUILTIN_VCLZLSBB_V16QI.
6350 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
6351 specific.
6352
6353 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6354
6355 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
6356 indentation and line wrap for many prototypes. Add missing
6357 @smallexample directives around block of prototypes for vec_xl and
6358 vec_xst.
6359
6360 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
6361
6362 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
6363 track if we pass or return IEEE 128-bit floating point.
6364 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
6365 C++ mangling that is compatible with GCC 8.1.
6366 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
6367 (init_cumulative_args): Note if we pass or return IEEE 128-bit
6368 floating point types.
6369 (rs6000_function_arg_advance_1): Likewise.
6370 (rs6000_mangle_type): Optionally generate mangled names that match
6371 what GCC 8.1 generated for IEEE 128-bit floating point types.
6372 (rs6000_globalize_decl_name): If we have an external function that
6373 passes or returns IEEE 128-bit types, generate a weak reference
6374 from the mangled name used in GCC 8.1 to the current mangled
6375 name.
6376 (rs6000_init_builtins): Make __ibm128 use the long double type if
6377 long double is IBM extended double. Make __float128 use the long
6378 double type if long double is IEEE 128-bit.
6379
6380 PR target/85657
6381 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
6382 macro for __ibm128 built-in functions.
6383 (PACK_IF): Add __ibm128 pack/unpack functions.
6384 (UNPACK_IF): Likewise.
6385 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
6386 enable long double built-in functions if long double is IEEE
6387 128-bit floating point.
6388 (rs6000_invalid_builtin): Update long double built-in function
6389 error message.
6390 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
6391 functions, adjust the built-in function to use the long double
6392 built-in function if __ibm128 and long double are the same type.
6393 * doc/extend.texi (PowerPC builtins): Update documention for
6394 __builtin_{,un}pack_longdouble. Add documentation for
6395 __builtin_{,un}pack_ibm128.
6396
6397 2018-06-06 Jim Wilson <jimw@sifive.com>
6398
6399 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
6400 (struct machine_function): New field interrupt_mode.
6401 (riscv_handle_type_attribute): New function. Add forward declaration.
6402 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
6403 (riscv_expand_epilogue): Check interrupt_mode field.
6404 (riscv_set_current_function): Check interrupt attribute args and
6405 set interrupt_mode field.
6406 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
6407 (riscv_sret, riscv_uret): New.
6408 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
6409 new arguments to interrupt attribute.
6410
6411 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
6412
6413 PR target/63177
6414 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
6415 Don't handle -mcpu=power8 if -mpower9-vector is also used.
6416
6417 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
6418
6419 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
6420 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
6421 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
6422 several redundant entries.
6423
6424 2018-06-06 David Malcolm <dmalcolm@redhat.com>
6425
6426 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
6427 type from "rtx" to "rtx_insn *".
6428 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
6429 for local "call_insn", removing cast.
6430 (ix86_expand_call): Likewise, introducing a "call_insn" local.
6431
6432 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
6433
6434 PR tree-optimization/86066
6435 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
6436 for BIT_INSERT_EXPR stores.
6437
6438 2018-06-06 Richard Biener <rguenther@suse.de>
6439
6440 PR tree-optimization/86062
6441 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
6442 component refs ontop
6443 of to be offsetted base.
6444
6445 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6446
6447 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
6448 to be static and remove check on interrupt attribute name.
6449
6450 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
6451
6452 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
6453 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
6454
6455 2018-06-05 Steve Ellcey <sellcey@cavium.com>
6456
6457 PR target/79924
6458 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
6459 second argument.
6460 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
6461 Remove second argument, change how error is called.
6462 (aarch64_layout_arg): Remove second argument from
6463 aarch64_err_no_fpadvsimd call.
6464 (aarch64_init_cumulative_args): Ditto.
6465 (aarch64_gimplify_va_arg_expr): Ditto.
6466 * config/aarch64/aarch64.md (mov<mode>): Ditto.
6467
6468 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
6469
6470 * config/i386/i386.md (simple_return_indirect_internal): New expander.
6471 (*simple_return_indirect_internal<mode>): Rename from
6472 simple_return_indirect_internal. Use W mode iterator.
6473 (rstorssp): New expander.
6474 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
6475 (clrssbsy): New expander.
6476 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
6477
6478 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
6479
6480 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
6481 __typeof__.
6482 (cmse_check_pointed_object): Likewise.
6483
6484 2018-06-05 Martin Liska <mliska@suse.cz>
6485
6486 PR gcov-profile/47618
6487 * doc/invoke.texi: Document how -fprofile-dir format
6488 is extended.
6489
6490 2018-06-05 Richard Biener <rguenther@suse.de>
6491
6492 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
6493 removal pretend DOM info isn't available so we do not update
6494 it and only remove edges, not dominated blocks. Actually free
6495 DOM info in case we removed something. Remove unreachable blocks.
6496 (mfb_keep_latches): Work with either DOM info or marked backedges.
6497 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
6498 first. Mark backedges if DOM info isn't available.
6499 (Re-)compute DOM info after cleanup_control_flow_pre.
6500
6501 2018-06-05 Richard Biener <rguenther@suse.de>
6502
6503 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
6504 (locus_discrim_hasher::hash): Adjust.
6505 (locus_discrim_hasher::equal): Likewise.
6506 (next_discriminator_for_locus): Work on line directly.
6507 (same_line_p): Pass in expanded locus1 as well.
6508 (assign_discriminators): Avoid redundant location expansions.
6509
6510 2018-06-05 Richard Biener <rguenther@suse.de>
6511
6512 PR tree-optimization/86046
6513 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
6514 if required after clearing TREE_ADDRESSABLE.
6515
6516 2018-06-05 Richard Biener <rguenther@suse.de>
6517
6518 PR tree-optimization/86047
6519 * tree-ssa-loop.c (for_each_index): Glob handling of all
6520 decls and constants and really handle all of them.
6521
6522 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6523
6524 PR target/81497
6525 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
6526 qualifier_void_pointer and qualifier_const_void_pointer.
6527 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
6528 (arm_init_builtins): Handle the above.
6529 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
6530 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
6531 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
6532 void intrinsics.
6533
6534 2018-06-05 Martin Liska <mliska@suse.cz>
6535
6536 * auto-profile.c (read_autofdo_file): Do not use
6537 gcov_ctr_summary struct.
6538 (afdo_callsite_hot_enough_for_early_inline): Likewise.
6539 * coverage.c (struct counts_entry): Likewise.
6540 (read_counts_file): Read just single summary entry.
6541 (get_coverage_counts): Use gcov_summary struct.
6542 * coverage.h (get_coverage_counts): Likewise.
6543 * gcov-dump.c (dump_working_sets): Likewise.
6544 (tag_summary): Dump just single summary.
6545 * gcov-io.c (gcov_write_summary): Write just histogram
6546 summary.
6547 (gcov_read_summary): Read just single summary.
6548 (compute_working_sets): Use gcov_summary struct.
6549 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
6550 of GCOV_COUNTERS_SUMMABLE.
6551 (GCOV_COUNTERS_SUMMABLE): Remove.
6552 (GCOV_FIRST_VALUE_COUNTER): Replace with
6553 GCOV_COUNTER_V_INTERVAL.
6554 (struct gcov_ctr_summary): Remove.
6555 (struct gcov_summary): Directly use fields of former
6556 gcov_ctr_summary.
6557 (compute_working_sets): Use gcov_summary struct.
6558 * gcov.c (read_count_file): Do not use ctrs fields.
6559 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
6560 struct.
6561 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
6562 struct.
6563 * profile.c: Likewise.
6564 * profile.h: Likewise.
6565
6566 2018-06-05 Martin Liska <mliska@suse.cz>
6567
6568 PR gcov-profile/84846
6569 * gcov.c (output_lines): Print working directory only
6570 in intermediate format.
6571
6572 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
6573
6574 * config/s390/s390-builtin-types.def: Add void function type.
6575 * config/s390/s390-builtins.def: Use the function type for the
6576 tbeginc builtin.
6577
6578 2018-06-04 Jim Wilson <jimw@sifive.com>
6579
6580 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
6581 to int.
6582 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
6583 and maybe_eh_return. Change regno to unsigned int. Use new args to
6584 handle EH_RETURN_DATA_REGNO registers properly.
6585 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
6586 (riscv_expand_epilogue): Update comment. Change argument name and
6587 type. Update code to use new name and type. Pass new args to
6588 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
6589 EXCEPTION_RETURN.
6590 * config/riscv/riscv.md (NORMAL_RETURN): New.
6591 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
6592 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
6593 (eh_return): Call gen_eh_return_internal and emit barrier.
6594 (eh_return_internal): Call riscv_expand_epilogue.
6595
6596 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
6597
6598 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
6599 bit_insertion field and declare can_be_merged_into method.
6600 (merged_store_group::can_be_merged_into): New method.
6601 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
6602 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
6603 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
6604
6605 2018-06-04 Richard Biener <rguenther@suse.de>
6606
6607 PR tree-optimization/85955
6608 * builtins.c (fold_builtin_sincos): Convert pointers to
6609 destination to appropriate type before dereferencing.
6610
6611 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
6612
6613 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
6614
6615 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
6616
6617 * expr.c (expand_expr_real_1): Force the operand into memory if
6618 its TYPE_MODE is BLKmode and if there is no integer mode for
6619 the number of bits being extracted.
6620
6621 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6622
6623 PR target/85832
6624 PR target/86036
6625 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
6626 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
6627
6628 2018-06-04 Richard Biener <rguenther@suse.de>
6629
6630 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
6631 (cleanup_tree_cfg_noloop): ... single caller. Do
6632 start_recording_case_labels later.
6633
6634 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
6635
6636 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
6637 to _IMMINTRIN_H_INCLUDED.
6638 * config/i386/pconfigintrin.h: Ditto.
6639 * config/i386/waitpkgintrin.h: Ditto.
6640 * config/i386/immintrin.h: Add includes for sgxintrin.h,
6641 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
6642 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
6643 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
6644 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
6645 waitpkgintrin.h and cldemoteintrin.h.
6646
6647 2018-06-04 Richard Biener <rguenther@suse.de>
6648
6649 PR tree-optimization/86038
6650 * tracer.c (find_best_successor): Check probability for
6651 being initialized, bail out if not.
6652
6653 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
6654
6655 PR target/86003
6656 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
6657 of bits to ignore when comparing architectures.
6658
6659 2018-06-04 Jakub Jelinek <jakub@redhat.com>
6660
6661 PR tree-optimization/69615
6662 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
6663 maximum or minimum of the type, try to merge it also as if
6664 range1 is + [-, x - 1] or + [x + 1, -].
6665
6666 PR c++/86025
6667 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
6668
6669 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
6670
6671 PR tree-optimization/86034
6672 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
6673 the unsigned bitfield type in a bit insertion sequence if it does not
6674 have a larger precision than the bitfield size.
6675 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
6676
6677 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
6678
6679 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
6680
6681 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6682
6683 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
6684 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
6685 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
6686 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
6687
6688 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
6689
6690 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
6691 Disable -fdelete-null-pointer-checks for ELF toolchain.
6692
6693 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6694 Kito Cheng <kito.cheng@gmail.com>
6695
6696 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
6697 (nds32le-*-*, nds32be-*-*): Integrate checking process.
6698 (nds32*-*-*): Add glibc and uclibc conditions.
6699 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
6700 (TARGET_EXCEPT_UNWIND_INFO): Define.
6701 * config/nds32/elf.h: New file.
6702 * config/nds32/linux.h: New file.
6703 * config/nds32/nds32-elf.opt: New file.
6704 * config/nds32/nds32-linux.opt: New file.
6705 * config/nds32/nds32-fp-as-gp.c
6706 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
6707 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
6708 TARGET_LINUX_ABI.
6709 (nds32_asm_file_end): Ditto.
6710 (nds32_print_operand): Ditto.
6711 (nds32_insert_attributes): Ditto.
6712 (nds32_init_libfuncs): New function.
6713 (TARGET_HAVE_TLS): Define.
6714 (TARGET_INIT_LIBFUNCS): Define.
6715 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
6716 spec content.
6717 (TARGET_ELF): Apply different mcmodel setting.
6718 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
6719 been migrated into elf.h and linux.h files.
6720 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
6721 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
6722 (mcmodel): The content has been migrated into nds32-elf.opt and
6723 nds32-linux.opt files.
6724 * config/nds32/t-elf: New file.
6725 * config/nds32/t-linux: New file.
6726
6727 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
6728 Shiva Chen <shiva0217@gmail.com>
6729
6730 * config/nds32/constants.md (unspec_volatile_element): Add
6731 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
6732 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
6733 optimization.
6734 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
6735 (make_pass_nds32_fp_as_gp): Declare.
6736 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
6737 optmization pass.
6738 (nds32_asm_function_end_prologue): Remove unused asm output.
6739 (nds32_asm_function_begin_epilogue): Remove unused asm output.
6740 (nds32_asm_file_start): Output necessary fp_as_gp information.
6741 (nds32_option_override): Adjust register usage.
6742 (nds32_expand_prologue): Consider fp_as_gp situation.
6743 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
6744 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
6745 (epilogue): Ditto.
6746 (return): Ditto.
6747 (simple_return): Ditto.
6748 (omit_fp_begin): Output special directive for fp_as_gp.
6749 (omit_fp_end): Output special directive for fp_as_gp.
6750 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
6751 mforbid-fp-as-gp): New options.
6752
6753 2018-06-01 Mark Wielaard <mark@klomp.org>
6754
6755 * dwarf2out.c (dwarf2out_finish): Remove generation of
6756 DW_AT_loclists_base.
6757
6758 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
6759
6760 * gimple-ssa-store-merging.c: Include gimple-fold.h.
6761 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
6762 (struct merged_store_group): Add bit_insertion field.
6763 (dump_char_array): Use standard hexadecimal format.
6764 (merged_store_group::merged_store_group): Set bit_insertion to false.
6765 (merged_store_group::apply_stores): Use optimal buffer size. Deal
6766 with BIT_INSERT_EXPR stores. Move up code updating the mask and
6767 also print the mask in the dump file.
6768 (pass_store_merging::gate): Minor tweak.
6769 (imm_store_chain_info::coalesce_immediate): Fix wrong association
6770 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
6771 stores with INTEGER_CST stores.
6772 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
6773 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
6774 and use it throughout. Generate bit insertion sequences if need be.
6775 (pass_store_merging::process_store): Remove redundant condition.
6776 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
6777
6778 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
6779
6780 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
6781 the 128-bit floating point types. Fix function comment.
6782
6783 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6784
6785 * config/aarch64/aarch64-simd.md
6786 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
6787 mnemonics.
6788 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
6789 mnemonics.
6790
6791 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6792
6793 PR tree-optimization/85989
6794 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
6795 variable.
6796 (backprop::intersect_uses): Check it when deciding whether this
6797 is a backedge reference.
6798 (backprop::process_block): Add each phi to m_visited_phis
6799 after visiting it, then clear it at the end.
6800
6801 2018-06-01 Richard Biener <rguenther@suse.de>
6802
6803 * tree-vectorizer.h (vect_dr_stmt): New function.
6804 (vect_get_load_cost): Adjust.
6805 (vect_get_store_cost): Likewise.
6806 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
6807 Use vect_dr_stmt instead of DR_SMTT.
6808 (vect_record_base_alignments): Likewise.
6809 (vect_calculate_target_alignment): Likewise.
6810 (vect_compute_data_ref_alignment): Likewise and make static.
6811 (vect_update_misalignment_for_peel): Likewise.
6812 (vect_verify_datarefs_alignment): Likewise.
6813 (vector_alignment_reachable_p): Likewise.
6814 (vect_get_data_access_cost): Likewise. Pass down
6815 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
6816 (vect_get_peeling_costs_all_drs): Likewise.
6817 (vect_peeling_hash_get_lowest_cost): Likewise.
6818 (vect_enhance_data_refs_alignment): Likewise.
6819 (vect_find_same_alignment_drs): Likewise.
6820 (vect_analyze_data_refs_alignment): Likewise.
6821 (vect_analyze_group_access_1): Likewise.
6822 (vect_analyze_group_access): Likewise.
6823 (vect_analyze_data_ref_access): Likewise.
6824 (vect_analyze_data_ref_accesses): Likewise.
6825 (vect_vfa_segment_size): Likewise.
6826 (vect_small_gap_p): Likewise.
6827 (vectorizable_with_step_bound_p): Likewise.
6828 (vect_prune_runtime_alias_test_list): Likewise.
6829 (vect_analyze_data_refs): Likewise.
6830 (vect_supportable_dr_alignment): Likewise.
6831 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6832 (vect_gen_prolog_loop_niters): Likewise.
6833 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6834 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
6835 modify DR_STMT.
6836 (vect_recog_mask_conversion_pattern): Likewise.
6837 (vect_try_gather_scatter_pattern): Likewise.
6838 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
6839 to vect_get_store_cost.
6840 (vect_get_store_cost): Get stmt_info instead of DR.
6841 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
6842 (vect_get_load_cost): Get stmt_info instead of DR.
6843
6844 2018-06-01 Richard Biener <rguenther@suse.de>
6845
6846 PR middle-end/86017
6847 * gimple-fold.c (var_decl_component_p): Also allow offsetted
6848 vars wrapped in MEM_REFs.
6849
6850 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
6851
6852 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
6853 Fix subreg tests so that we only return a choice between
6854 GENERAL_REGS and FP_REGS if the original classes included both.
6855
6856 2018-06-01 Richard Biener <rguenther@suse.de>
6857
6858 PR ipa/85960
6859 * tree-ssa-structalias.c (get_function_part_constraint):
6860 Handle NULL fi->decl.
6861 (find_func_aliases_for_call): Properly handle indirect
6862 fi from direct call.
6863 (find_func_clobbers): Likewise.
6864 (ipa_pta_execute): Likewise.
6865 (create_variable_info_for): For functions that are ifunc_resolver
6866 resolve to a varinfo that contains the result of the resolver call.
6867 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
6868 aliases.
6869
6870 2018-05-31 Michael Collison <michael.collison@arm.com>
6871
6872 * config/aarch64/aarch64.md:
6873 (*fix_to_zero_extenddfdi2): New pattern.
6874 * gcc.target/aarch64/fix_extend1.c: New testcase.
6875
6876 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
6877
6878 PR middle-end/78809
6879 PR middle-end/83026
6880 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
6881 and BUILT_IN_STRNCMP_EQ.
6882 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
6883 BUILT_IN_STRNCMP_EQ.
6884 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
6885 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6886 (gimple_fold_builtin): Likewise.
6887 * tree-ssa-strlen.c (compute_string_length): New function.
6888 (determine_min_obsize): New function.
6889 (handle_builtin_string_cmp): New function to handle calls to
6890 string compare functions.
6891 (strlen_optimize_stmt): Add handling to builtin string compare
6892 calls.
6893 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
6894 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
6895 * tree.c (build_common_builtin_nodes): Add new defines of
6896 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
6897
6898 2018-05-31 Jakub Jelinek <jakub@redhat.com>
6899
6900 PR target/85984
6901 * bb-reorder.c (pass_partition_blocks::gate): Return false for
6902 functions with naked attribute.
6903
6904 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
6905
6906 * config/i386/sse.md (avx_vec_concat<mode>):
6907 Substitute concat_tg_mode mode attribute with xtg_mode.
6908 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
6909 (concat_tg_mode): Remove mode attribute.
6910
6911 2018-05-31 Martin Sebor <msebor@redhat.com>
6912
6913 PR c/82063
6914 * calls.c (alloc_max_size): Correct a logic error/typo.
6915 Treat excessive arguments as infinite. Warn for invalid arguments.
6916 * doc/invoke.texi (-Walloc-size-larger-than): Update.
6917
6918 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
6919
6920 PR target/85829
6921 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
6922 and movx for Haswell.
6923
6924 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
6925 Cesar Philippidis <cesar@codesourcery.com>
6926
6927 PR middle-end/85879
6928 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
6929 when emitting error on private/firstprivate reductions.
6930 * omp-low.c (lower_omp_target): Avoid reference-type processing
6931 on pointers for firstprivate clause.
6932
6933 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
6934
6935 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
6936 (st1x2): Likewise.
6937 (st1x3): Likewise.
6938 * config/aarch64/aarch64-simd.md
6939 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
6940 (aarch64_ld1_x3_<mode>): Likewise
6941 (aarch64_st1x2<VALLDIF:mode>): Likewise
6942 (aarch64_st1_x2_<mode>): Likewise
6943 (aarch64_st1x3<VALLDIF:mode>): Likewise
6944 (aarch64_st1_x3_<mode>): Likewise
6945 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
6946 (vld1_s8_x3): Likewise.
6947 (vld1_u16_x3): Likewise.
6948 (vld1_s16_x3): Likewise.
6949 (vld1_u32_x3): Likewise.
6950 (vld1_s32_x3): Likewise.
6951 (vld1_u64_x3): Likewise.
6952 (vld1_s64_x3): Likewise.
6953 (vld1_f16_x3): Likewise.
6954 (vld1_f32_x3): Likewise.
6955 (vld1_f64_x3): Likewise.
6956 (vld1_p8_x3): Likewise.
6957 (vld1_p16_x3): Likewise.
6958 (vld1_p64_x3): Likewise.
6959 (vld1q_u8_x3): Likewise.
6960 (vld1q_s8_x3): Likewise.
6961 (vld1q_u16_x3): Likewise.
6962 (vld1q_s16_x3): Likewise.
6963 (vld1q_u32_x3): Likewise.
6964 (vld1q_s32_x3): Likewise.
6965 (vld1q_u64_x3): Likewise.
6966 (vld1q_s64_x3): Likewise.
6967 (vld1q_f16_x3): Likewise.
6968 (vld1q_f32_x3): Likewise.
6969 (vld1q_f64_x3): Likewise.
6970 (vld1q_p8_x3): Likewise.
6971 (vld1q_p16_x3): Likewise.
6972 (vld1q_p64_x3): Likewise.
6973 (vst1_s64_x2): Likewise.
6974 (vst1_u64_x2): Likewise.
6975 (vst1_f64_x2): Likewise.
6976 (vst1_s8_x2): Likewise.
6977 (vst1_p8_x2): Likewise.
6978 (vst1_s16_x2): Likewise.
6979 (vst1_p16_x2): Likewise.
6980 (vst1_s32_x2): Likewise.
6981 (vst1_u8_x2): Likewise.
6982 (vst1_u16_x2): Likewise.
6983 (vst1_u32_x2): Likewise.
6984 (vst1_f16_x2): Likewise.
6985 (vst1_f32_x2): Likewise.
6986 (vst1_p64_x2): Likewise.
6987 (vst1q_s8_x2): Likewise.
6988 (vst1q_p8_x2): Likewise.
6989 (vst1q_s16_x2): Likewise.
6990 (vst1q_p16_x2): Likewise.
6991 (vst1q_s32_x2): Likewise.
6992 (vst1q_s64_x2): Likewise.
6993 (vst1q_u8_x2): Likewise.
6994 (vst1q_u16_x2): Likewise.
6995 (vst1q_u32_x2): Likewise.
6996 (vst1q_u64_x2): Likewise.
6997 (vst1q_f16_x2): Likewise.
6998 (vst1q_f32_x2): Likewise.
6999 (vst1q_f64_x2): Likewise.
7000 (vst1q_p64_x2): Likewise.
7001 (vst1_s64_x3): Likewise.
7002 (vst1_u64_x3): Likewise.
7003 (vst1_f64_x3): Likewise.
7004 (vst1_s8_x3): Likewise.
7005 (vst1_p8_x3): Likewise.
7006 (vst1_s16_x3): Likewise.
7007 (vst1_p16_x3): Likewise.
7008 (vst1_s32_x3): Likewise.
7009 (vst1_u8_x3): Likewise.
7010 (vst1_u16_x3): Likewise.
7011 (vst1_u32_x3): Likewise.
7012 (vst1_f16_x3): Likewise.
7013 (vst1_f32_x3): Likewise.
7014 (vst1_p64_x3): Likewise.
7015 (vst1q_s8_x3): Likewise.
7016 (vst1q_p8_x3): Likewise.
7017 (vst1q_s16_x3): Likewise.
7018 (vst1q_p16_x3): Likewise.
7019 (vst1q_s32_x3): Likewise.
7020 (vst1q_s64_x3): Likewise.
7021 (vst1q_u8_x3): Likewise.
7022 (vst1q_u16_x3): Likewise.
7023 (vst1q_u32_x3): Likewise.
7024 (vst1q_u64_x3): Likewise.
7025 (vst1q_f16_x3): Likewise.
7026 (vst1q_f32_x3): Likewise.
7027 (vst1q_f64_x3): Likewise.
7028 (vst1q_p64_x3): Likewise.
7029
7030 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7031
7032 * config/msp430/msp430.c (msp430_output_labelref): Prepend
7033 user_label_prefix to name.
7034
7035 * tree-core.h: Update comment about the format of NAME string
7036 passed to handler in attribute_spec.
7037
7038 * config/msp430/msp430.md: Remove erroneous subreg expression from
7039 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
7040 zero_extend{q,h}isi2.
7041
7042 2018-05-30 Borislav Petkov <bp@suse.de>
7043
7044 * doc/extend.texi: Document some architecture specific
7045 constraints and sort entries.
7046
7047 2018-05-30 Martin Sebor <msebor@redhat.com>
7048
7049 PR middle-end/85369
7050 * builtins.c (expand_builtin_stpcpy_1): New function.
7051 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
7052 only if the former succeeds.
7053
7054 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
7055
7056 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
7057 in saphira.
7058
7059 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7060
7061 * doc/invoke.texi (-flinker-output): Document
7062
7063 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7064
7065 * passes.c (ipa_write_summaries): Only modify statements if body
7066 is in memory.
7067 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
7068 incrementally linking.
7069 (ipa_passes): Likewise.
7070 * lto-cgraph.c (lto_output_node): When incrementally linking do not
7071 pass down resolution info.
7072 * common.opt (flag_incremental_link): Update info.
7073 * gcc.c (plugin specs): Turn flinker-output=* to
7074 -plugin-opt=-linker-output-known
7075 * toplev.c (compile_file): Also cut compilation when doing incremental
7076 link.
7077 * flag-types. (enum lto_partition_model): Add
7078 LTO_LINKER_OUTPUT_NOLTOREL.
7079 (invoke.texi): Add -flinker-output docs.
7080 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
7081 link same way as WPA; do not stream in dead initializers.
7082
7083 * dwarf2out.c (dwarf2out_die_ref_for_decl,
7084 darf2out_register_external_decl): Support incremental link.
7085
7086 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7087
7088 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
7089
7090 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
7091
7092 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
7093 it down to simple_object_copy_lto_debug_sections.
7094 (run_gcc): Determine incremental LTO link time and configure
7095 lto1 into non-wpa mode, disable renaming of debug sections.
7096
7097 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
7098
7099 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
7100 descriptions of various incorrectly documented functions.
7101
7102 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
7103
7104 Revert:
7105 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7106 address check not strict.
7107
7108 2018-05-30 Richard Biener <rguenther@suse.de>
7109
7110 PR tree-optimization/85964
7111 * tracer.c (better_p): Drop initialized count check, we only
7112 call the function with initialized counts now.
7113 (find_best_successor): Do find a best edge if one
7114 has uninitialized count.
7115 (find_best_predecessor): Likewise. Do BB frequency check only
7116 if count is initialized.
7117
7118 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
7119
7120 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
7121 (aarch64_ldrstr_offset_compare): New.
7122 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
7123 load/store orderings.
7124 (aarch64_gen_adjusted_ldpstp): Likewise.
7125
7126 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
7127
7128 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
7129 Check for subset of GENERAL_REGS and FP_REGS.
7130 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
7131 r=w alternative.
7132
7133 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
7134
7135 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
7136 and wi::to_poly_offset. Add the current offset and then check
7137 whether the sum fits, rather than using an unchecked addition of
7138 a checked term. Check for a shwi rather than a uhwi.
7139 * expr.c (get_bit_range): Use tree_to_poly_uint64.
7140 (store_constructor): Use poly_int_tree_p.
7141 (expand_expr_real_1): Likewise.
7142 * function.c (assign_temp): Likewise.
7143 * fold-const.c (const_binop): Use poly_int_tree_p and
7144 wi::to_poly_offset.
7145 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
7146 division.
7147 * ipa-icf-gimple.c (func_checker::compare_operand): Use
7148 to_poly_offset for MEM offsets.
7149 * ipa-icf.c (sem_variable::equals): Likewise.
7150 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
7151 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
7152 wi::to_poly_offset for BIT_FIELD_REF offsets.
7153 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
7154 wi::to_poly_offset.
7155 * var-tracking.c (emit_note_insn_var_location): Use
7156 tree_to_poly_uint64.
7157
7158 2018-05-29 Jim Wilson <jimw@sifive.com>
7159
7160 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
7161
7162 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
7163
7164 PR target/85950
7165 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
7166 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
7167 sequence.
7168 (sse4_1_round<mode>2): Use nonimmediate_operand
7169 for operand 1 predicate.
7170
7171 2018-05-29 Martin Sebor <msebor@redhat.com>
7172 Richard Biener <rguenther@suse.de>
7173
7174 PR testsuite/85888
7175 * calls.c (get_size_range): Call determine_value_range instead
7176 of get_value_range..
7177 * tree-vrp.h (determine_value_range): Declared new function.
7178 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
7179
7180 2018-05-29 Richard Biener <rguenther@suse.de>
7181
7182 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
7183 sure to use non-pattern stmts for get_earlier_stmt arguments.
7184 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
7185 called on pattern stmts.
7186 (get_later_stmt): Likewise.
7187
7188 2018-05-29 Martin Liska <mliska@suse.cz>
7189
7190 PR gcov-profile/85759
7191 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
7192 env variables.
7193
7194 2018-05-29 Jakub Jelinek <jakub@redhat.com>
7195
7196 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
7197 VEC_UNPACK_*_EXPR.
7198 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
7199 VEC_PACK_*_EXPR.
7200
7201 PR target/85918
7202 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7203 VEC_PACK_FLOAT_EXPR): New tree codes.
7204 * tree-pretty-print.c (op_code_prio): Handle
7205 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7206 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7207 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7208 * tree-inline.c (estimate_operator_cost): Likewise.
7209 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
7210 * fold-const.c (const_binop): Likewise.
7211 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
7212 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
7213 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7214 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
7215 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
7216 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
7217 * expr.c (expand_expr_real_2): Likewise.
7218 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
7219 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
7220 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
7221 optabs.
7222 * optabs.c (expand_widen_pattern_expr): For
7223 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
7224 sign from result type rather than operand's type.
7225 (expand_binop_directly): For vec_packu_float_optab and
7226 vec_packs_float_optab allow result type to be different from operand's
7227 type.
7228 * optabs-tree.c (optab_for_tree_code): Handle
7229 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7230 VEC_PACK_FLOAT_EXPR. Formatting fixes.
7231 * tree-vect-generic.c (expand_vector_operations_1): Handle
7232 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
7233 VEC_PACK_FLOAT_EXPR.
7234 * tree-vect-stmts.c (supportable_widening_operation): Handle
7235 FIX_TRUNC_EXPR.
7236 (supportable_narrowing_operation): Handle FLOAT_EXPR.
7237 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
7238 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
7239 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
7240 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
7241 mode attributes.
7242 (vec_pack<floatprefix>_float_<mode>): New expander.
7243 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
7244 attributes.
7245 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
7246 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
7247 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
7248 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
7249 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
7250 Document.
7251 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
7252 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
7253 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
7254 VEC_PACK_FLOAT_EXPR): Document.
7255
7256 2018-05-29 Richard Biener <rguenther@suse.de>
7257
7258 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
7259 member.
7260 (stmt_vec_info_vec): Make pointer.
7261 (init_stmt_vec_info_vec): Remove.
7262 (free_stmt_vec_info_vec): Likewise.
7263 (set_stmt_vec_info_vec): New function.
7264 (free_stmt_vec_infos): Likewise.
7265 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
7266 (set_vinfo_for_stmt): Likewise.
7267 (get_earlier_stmt): Likewise.
7268 (get_later_stmt): Likewise.
7269 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
7270 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
7271 (vec_info::~vec_info): Free stmt_vec_infos.
7272 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
7273 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
7274 (pass_slp_vectorize::execute): Likewise.
7275 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
7276 (free_stmt_vec_info_vec): Likewise.
7277 (set_stmt_vec_info_vec): New function.
7278 (free_stmt_vec_infos): Likewise.
7279 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
7280 the global stmt_vec_info_vec.
7281 * tree-parloops.c (gather_scalar_reductions): Use
7282 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
7283 vector.
7284
7285 2018-05-29 Richard Biener <rguenther@suse.de>
7286
7287 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
7288
7289 2018-05-29 Martin Liska <mliska@suse.cz>
7290 David Malcolm <dmalcolm@redhat.com>
7291
7292 * vec.c (test_reverse): New.
7293 (vec_c_tests): Add new test.
7294 * vec.h (vl_ptr>::reverse): New function.
7295
7296 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
7297
7298 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
7299
7300 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
7301 and later.
7302
7303 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
7304
7305 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
7306
7307 2018-05-28 Richard Biener <rguenther@suse.de>
7308
7309 PR tree-optimization/85933
7310 * tree-vect-data-refs.c (vect_record_base_alignments): Only
7311 look at stmts marked as vectorizable.
7312
7313 2018-05-28 Richard Biener <rguenther@suse.de>
7314
7315 PR tree-optimization/85934
7316 * tree-vect-generic.c (expand_vector_operations_1): Hoist
7317 vector boolean check before scalar optimization.
7318
7319 2018-05-28 Jakub Jelinek <jakub@redhat.com>
7320
7321 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
7322 for armv5te.
7323
7324 2018-05-28 Mark Wielaard <mark@klomp.org>
7325
7326 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
7327 if it is an expression containing a minus sign.
7328
7329 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
7330
7331 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
7332
7333 2018-05-27 Paul Koning <ni1d@arrl.net>
7334
7335 * config/pdp11/pdp11.md (truncsihi2): Remove.
7336
7337 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
7338 Chung-Ju Wu <jasonwucj@gmail.com>
7339
7340 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
7341 implementation.
7342 (unaligned_store_dw): Ditto.
7343 * config/nds32/nds32-memory-manipulation.c
7344 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
7345 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
7346 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
7347 (emit_setmem_word_loop): Rename to ...
7348 (emit_setmem_doubleword_loop): ... this.
7349 (nds32_gen_dup_4_byte_to_word_value): New function.
7350 (nds32_gen_dup_8_byte_to_double_word_value): New function.
7351 (nds32_expand_setmem_loop): Refine implementation.
7352 (nds32_expand_setmem_loop_v3m): Ditto.
7353 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
7354 pattern.
7355
7356 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7357
7358 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
7359
7360 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
7361
7362 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
7363 (nds32_init_machine_status): Initialize machine->attr_naked_p and
7364 machine->attr_no_prologue_p.
7365 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
7366 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
7367 (nds32_expand_epilogue): Consider attr_naked_p.
7368 (nds32_expand_epilogue_v3pop): Likewise.
7369 (nds32_can_use_return_insn): Likewise.
7370 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
7371 attr_no_prologue_p fields.
7372 * config/nds32/nds32.opt (mret-in-naked-func): New option.
7373
7374 2018-05-27 Jakub Jelinek <jakub@redhat.com>
7375
7376 PR target/85918
7377 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
7378 attributes.
7379 * config/i386/sse.md
7380 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
7381 Rename to ...
7382 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
7383 ... this.
7384 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
7385 Rename to ...
7386 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
7387 ... this.
7388 (*<floatsuffix>floatv2div2sf2): Rename to ...
7389 (*float<floatunssuffix>v2div2sf2): ... this.
7390 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
7391 (float<floatunssuffix>v2div2sf2_mask): ... this.
7392 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
7393 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
7394 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
7395 to ...
7396 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
7397 ... this.
7398 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7399 Rename to ...
7400 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
7401 ... this.
7402 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7403 Rename to ...
7404 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
7405 ... this.
7406 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
7407 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
7408 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
7409 gen_ufix_truncv8dfv8si2.
7410 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
7411 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
7412 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
7413 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
7414 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
7415 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
7416 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
7417 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
7418
7419 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7420
7421 PR target/85900
7422 PR target/85345
7423 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
7424
7425 2018-05-25 Jim Wilson <jimw@sifive.com>
7426
7427 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
7428 * config/riscv/riscv.c (struct machine_function): Add
7429 interrupt_handler_p and attribute_checked_p fields.
7430 (riscv_attribute_table): Add interrupt.
7431 (riscv_interrupt_type_p): New.
7432 (riscv_save_reg_p): Save extra regs for interrupt handler.
7433 (riscv_use_save_libcall): Return false for interrupt handler.
7434 (riscv_first_stack_step): Add forward declaration.
7435 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
7436 for interrupt handler with large frame. Use it for saved reg list.
7437 (riscv_expand_prologue): Move flag_stack_usage_info support to
7438 eliminate duplication.
7439 (riscv_expand_epilogue): Generate mret for interrupt handler.
7440 (riscv_epilogue_uses): New.
7441 (riscv_can_use_return_insn): Return false for interrupt handler.
7442 (riscv_function_ok_for_sibcall): Likewise.
7443 (riscv_set_current_function): Add interrupt handler support.
7444 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
7445 * config/riscv/riscv.md (UNSPECV_MRET): New.
7446 (GP_REGNUM): New.
7447 (riscv_frflags, riscv_fsflags): Use tab after opcode.
7448 (riscv_mret): New.
7449 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
7450
7451 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
7452
7453 PR tree-optimization/85712
7454 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
7455 this candidate has already been replaced in-situ by a copy.
7456
7457 2018-05-25 Jason Merrill <jason@redhat.com>
7458
7459 PR c++/80485 - inline function non-zero address.
7460 * symtab.c (nonzero_address): Check DECL_COMDAT.
7461
7462 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
7463
7464 PR target/83628
7465 * config/alpha/alpha.md (ashlsi3): New insn pattern.
7466 (*ashlsi_se): Rename from *ashldi_se. Define as sign
7467 extension of SImode operation. Use const123_operand predicate.
7468 (*saddsi_1): Remove.
7469 (*saddl_se_1): Ditto.
7470 (*ssubsi_1): Ditto.
7471 (*ssubl_se_1): Ditto.
7472 * config/alpha/predicates.md (const123_operand): New predicate.
7473 * config/alpha/constraints.md (P): Use IN_RANGE.
7474
7475 2018-05-25 Richard Biener <rguenther@suse.de>
7476
7477 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
7478 defaulted to true.
7479 (ref_maybe_used_by_stmt_p): Likewise.
7480 (stmt_may_clobber_ref_p): Likewise.
7481 (stmt_may_clobber_ref_p_1): Likewise.
7482 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
7483 and pass it along.
7484 (ref_maybe_used_by_stmt_p): Likewise.
7485 (stmt_may_clobber_ref_p): Likewise.
7486 (stmt_may_clobber_ref_p_1): Likewise.
7487 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
7488 the alias oracle to disambiguate DRs with stmts DR analysis
7489 couldn't handle.
7490 (vect_analyze_data_refs): Do not give up on not analyzable
7491 DRs for BB vectorization. Remove code truncating the dataref
7492 vector.
7493
7494 2018-05-25 Jakub Jelinek <jakub@redhat.com>
7495
7496 PR target/85832
7497 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
7498 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
7499 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
7500
7501 2018-05-25 Richard Biener <rguenther@suse.de>
7502
7503 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
7504 function, combining stmt data ref gathering and fatal analysis
7505 parts.
7506 (vect_analyze_data_refs): Remove now redudnant code and simplify.
7507 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
7508 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
7509 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
7510 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
7511
7512 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7513
7514 PR tree-optimization/85720
7515 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
7516 SCC if all partitions are builtins.
7517 (version_loop_by_alias_check): New parameter. Generate cancelable
7518 runtime alias check if all partitions are builtins.
7519 (distribute_loop): Update call to above function.
7520
7521 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7522
7523 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
7524 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
7525 (parm_default_def_partition_arg): Ditto.
7526 (set_parm_default_def_partition): Ditto.
7527 (get_parm_default_def_partitions): Ditto and make it static.
7528 (get_undefined_value_partitions): Ditto and make it static.
7529 (remove_ssa_form): Refactor call to init_var_map here.
7530 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
7531 computation for loop region.
7532 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
7533 (register_default_def): Delete.
7534 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
7535 (parm_default_def_partition_arg): Ditto.
7536 (set_parm_default_def_partition): Ditto.
7537 (get_parm_default_def_partitions): Ditto and make it static.
7538 (get_undefined_value_partitions): Ditto and make it static.
7539 (coalesce_with_default, coalesce_with_default): Update comment.
7540 (create_coalesce_list_for_region): New func factored out from
7541 create_outofssa_var_map.
7542 (populate_coalesce_list_for_outofssa): New func factored out from
7543 create_outofssa_var_map and coalesce_ssa_name.
7544 (create_outofssa_var_map): Delete.
7545 (coalesce_ssa_name): Refactor to support live range computation.
7546 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
7547 (get_parm_default_def_partitions): Delete.
7548 (get_undefined_value_partitions): Ditto.
7549 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
7550 computation for loop region.
7551 (new_tree_live_info, loe_visit_block): Ditto.
7552 (live_worklist, set_var_live_on_entry): Ditto.
7553 (calculate_live_on_exit, verify_live_on_entry): Ditto.
7554 * tree-ssa-live.h (struct _var_map): New fields.
7555 (init_var_map): Change decl.
7556 (region_contains_p): New.
7557
7558 2018-05-25 Bin Cheng <bin.cheng@arm.com>
7559
7560 * tree-ssa-live.h (live_merge_and_clear): Delete.
7561
7562 2018-05-25 Richard Biener <rguenther@suse.de>
7563
7564 PR c++/85912
7565 * tree-dump.c (dequeue_and_dump): Remove access to removed
7566 operand 2 of a SWITCH_EXPR.
7567
7568 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7569
7570 * doc/sourcebuild.texi (vect_double_cond_arith): Include
7571 multiplication and division.
7572 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
7573 (cond_udiv@var{m}, cond_umod@var{m}): Document.
7574 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
7575 (cond_udiv_optab, cond_umod_optab): New optabs.
7576 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
7577 (IFN_COND_RDIV): New internal functions.
7578 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
7579 TRUNC_MOD_EXPR and RDIV_EXPR.
7580 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
7581 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
7582 New unspecs.
7583 (SVE_INT_BINARY): Include mult.
7584 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
7585 (optab, sve_int_op): Handle mult.
7586 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
7587 UNSPEC_COND_DIV.
7588 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
7589 for SVE_INT_BINARY_SD.
7590
7591 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7592
7593 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
7594 (optab, sve_int_op): Handle div and udiv.
7595 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
7596 for SVE_INT_BINARY_SD.
7597 (*<optab><mode>3): New insn for the same.
7598
7599 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7600
7601 * tree-vect-patterns.c: Include predict.h.
7602 (vect_recog_divmod_pattern): Restrict check for division support
7603 to when optimizing for size.
7604
7605 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7606
7607 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
7608 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
7609 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
7610 (gimple_match_op::set_op): Likewise.
7611 (gimple_resimplify4): Declare.
7612 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
7613 (expr::gen_transform): Likewise.
7614 (decision_tree::gen): Generate a simplification routine for 4 operands.
7615 * gimple-match-head.c (gimple_simplify): Add an overload for
7616 4 operands. In the top-level function, handle up to 4 call
7617 arguments and call gimple_resimplify4.
7618 (gimple_resimplify4): New function.
7619 (build_call_internal): Pass a fourth operand.
7620 (maybe_push_to_seq): Likewise.
7621 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
7622 Fold VEC_COND_EXPRs of an operation and a default value into
7623 an IFN_COND_* function if possible.
7624 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
7625 New unspecs.
7626 (SVE_COND_FP_BINARY): Include them.
7627 (optab, sve_fp_op): Handle them.
7628 (SVE_INT_BINARY_REV): New code iterator.
7629 (SVE_COND_FP_BINARY_REV): New int iterator.
7630 (commutative): New int attribute.
7631 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
7632 Declare.
7633 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
7634 function.
7635 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
7636 (*cond_<optab><mode>): New patterns for reversed operands.
7637
7638 2018-05-25 Richard Biener <rguenther@suse.de>
7639
7640 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
7641 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
7642 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
7643 (STMT_VINFO_GROUPED_ACCESS): Adjust.
7644 * tree-vect-data-refs.c (everywhere): Adjust users.
7645 * tree-vect-loop.c (everywhere): Likewise.
7646 * tree-vect-slp.c (everywhere): Likewise.
7647 * tree-vect-stmts.c (everywhere): Likewise.
7648 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7649
7650 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7651
7652 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
7653 Rename to...
7654 (gcc_cv_as_section_exclude): ... this.
7655 Try Solaris as #exclude syntax.
7656 * configure: Regenerate.
7657 * config.in: Regenerate.
7658 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
7659 SECTION_EXCLUDE.
7660 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
7661 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
7662
7663 * varasm.c (default_elf_asm_named_section): Don't check if
7664 HAVE_GAS_SECTION_EXCLUDE is defined.
7665
7666 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7667
7668 * doc/md.texi: Update the documentation of the cond_* optabs
7669 to mention the new final operand. Fix GET_MODE_NUNITS call.
7670 Describe the scalar case too.
7671 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
7672 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
7673 instead of 2.
7674 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
7675 (get_conditional_internal_fn): Update comment.
7676 * tree-vect-loop.c (vectorizable_reduction): Pass the original
7677 accumulator value as a final argument to conditional functions.
7678 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
7679 a define_expand and add an "else" operand. Assert for now that
7680 the else operand is equal to operand 2. Use SVE_INT_BINARY and
7681 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
7682 (*cond_<optab><mode>): New patterns.
7683 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
7684 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
7685 (UNSPEC_COND_EOR): Delete.
7686 (optab): Remove associated mappings.
7687 (SVE_INT_BINARY): New code iterator.
7688 (sve_int_op): Remove int attribute and add "minus" to the code
7689 attribute.
7690 (SVE_COND_INT_OP): Delete.
7691 (SVE_COND_FP_OP): Rename to...
7692 (SVE_COND_FP_BINARY): ...this.
7693
7694 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
7695
7696 * optabs.c (can_reuse_operands_p): New function.
7697 (maybe_legitimize_operands): Try to reuse the results for
7698 earlier operands.
7699
7700 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7701
7702 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
7703 Add {q} suffix to insn mnemonic.
7704
7705 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7706
7707 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
7708 (msp430_warn_func_return): New.
7709
7710 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
7711
7712 * fold-const.c (tree_nonzero_bits): New function.
7713 * fold-const.h (tree_nonzero_bits): Likewise.
7714 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
7715 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
7716
7717 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
7718
7719 PR target/85900
7720 PR target/85345
7721 * varasm.c (assemble_alias): Check ifunc_resolver only on
7722 FUNCTION_DECL.
7723
7724 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
7725
7726 PR target/85903
7727 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
7728 when memory input operand is handled.
7729
7730 2018-05-24 Luis Machado <luis.machado@linaro.org>
7731
7732 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
7733 global.
7734 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
7735
7736 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7737
7738 * match.pd: Delay FMA folds until after vectorization.
7739
7740 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
7741
7742 PR target/83009
7743 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7744 address check not strict.
7745
7746 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
7747
7748 * gimple-match.h (gimple_match_op): New class.
7749 (mprts_hook): Replace parameters with a gimple_match_op *.
7750 (maybe_build_generic_op): Likewise.
7751 (gimple_simplified_result_is_gimple_val): Replace parameters with
7752 a const gimple_match_op *.
7753 (gimple_simplify): Replace code_helper * and tree * parameters with
7754 a gimple_match_op * parameter.
7755 (gimple_resimplify1): Replace code_helper *, tree and tree *
7756 parameters with a gimple_match_op * parameter.
7757 (gimple_resimplify2): Likewise.
7758 (gimple_resimplify3): Likewise.
7759 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
7760 parameters with a gimple_match_op * parameter.
7761 * gimple-match-head.c (gimple_simplify): Change prototypes of
7762 auto-generated functions to take a gimple_match_op * instead of
7763 separate code_helper * and tree * parameters. Make the same
7764 change in the top-level overload and update calls to the
7765 gimple_resimplify routines. Update calls to the auto-generated
7766 functions and to maybe_push_res_to_seq in the publicly-facing
7767 operation-specific gimple_simplify overloads.
7768 (gimple_match_op::MAX_NUM_OPS): Define.
7769 (gimple_resimplify1): Replace rcode and ops with a single res_op
7770 parameter. Update call to gimple_simplify.
7771 (gimple_resimplify2): Likewise.
7772 (gimple_resimplify3): Likewise.
7773 (mprts_hook): Replace parameters with a gimple_match_op *.
7774 (maybe_build_generic_op): Likewise.
7775 (build_call_internal): Replace type, nargs and ops with
7776 a gimple_match_op *.
7777 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
7778 with a single gimple_match_op *. Update calls to mprts_hook,
7779 build_call_internal and gimple_simplified_result_is_gimple_val.
7780 Factor out code that is common to the tree_code and combined_fn cases.
7781 * genmatch.c (expr::gen_transform): Replace tem_code and
7782 tem_ops with a gimple_match_op called tem_op. Update calls
7783 to the gimple_resimplify functions and maybe_push_res_to_seq.
7784 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
7785 res_ops. Update call to the gimple_resimplify functions.
7786 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
7787 (decision_tree::gen): Make the functions take a gimple_match_op *
7788 called res_op instead of separate res_code and res_ops parameters.
7789 Update call accordingly.
7790 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
7791 and ops with a single res_op parameter. Update calls to
7792 maybe_build_generic_op and maybe_push_res_to_seq.
7793 (fold_stmt_1): Update calls to gimple_simplify and
7794 replace_stmt_with_simplification.
7795 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
7796 and gimple_simplified_result_is_gimple_val.
7797 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
7798 gimple_simplify.
7799 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
7800 with a gimple_match_op *.
7801 (vn_nary_build_or_lookup): Likewise. Update call to
7802 vn_nary_build_or_lookup_1.
7803 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
7804 gimple_match_op *. Update calls to the gimple_resimplify routines
7805 and to gimple_simplified_result_is_gimple_val.
7806 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
7807 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
7808 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
7809 (visit_nary_op): Likewise.
7810 (visit_reference_op_load): Likewise.
7811
7812 2018-05-23 Luis Machado <luis.machado@linaro.org>
7813
7814 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
7815 modifier for printing the step amount.
7816
7817 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
7818
7819 PR target/78849
7820 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
7821 types.
7822
7823 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
7824
7825 * doc/sourcebuild.texi (Endianness): New subsubsection.
7826
7827 2018-05-23 Luis Machado <luis.machado@linaro.org>
7828
7829 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7830 <prefetch_dynamic_strides>: New const bool field.
7831 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7832 prefetch_dynamic_strides.
7833 (exynosm1_prefetch_tune): Likewise.
7834 (thunderxt88_prefetch_tune): Likewise.
7835 (thunderx_prefetch_tune): Likewise.
7836 (thunderx2t99_prefetch_tune): Likewise.
7837 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
7838 false.
7839 (aarch64_override_options_internal): Update to set
7840 PARAM_PREFETCH_DYNAMIC_STRIDES.
7841 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7842 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7843 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7844 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7845 prefetch-dynamic-strides setting.
7846
7847 2018-05-23 Luis Machado <luis.machado@linaro.org>
7848
7849 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7850 <minimum_stride>: New const int field.
7851 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7852 minimum_stride field defaulting to -1.
7853 (exynosm1_prefetch_tune): Likewise.
7854 (thunderxt88_prefetch_tune): Likewise.
7855 (thunderx_prefetch_tune): Likewise.
7856 (thunderx2t99_prefetch_tune): Likewise.
7857 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
7858 <default_opt_level>: Set to 3.
7859 (aarch64_override_options_internal): Update to set
7860 PARAM_PREFETCH_MINIMUM_STRIDE.
7861 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7862 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7863 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7864 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7865 stride is constant and is below the minimum stride threshold.
7866
7867 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7868
7869 * config/arm/arm-cpus.in (mode26): Delete.
7870 (armv4): Delete mode26 reference.
7871 * config/arm/arm.c (arm_configure_build_target): Delete use of
7872 isa_bit_mode26.
7873
7874 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7875
7876 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
7877 New insn pattern.
7878 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
7879 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
7880 for non-SSE modes.
7881 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
7882 (floatunsdidf2): Ditto.
7883
7884 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
7885
7886 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
7887 (fixuns_trunc<mode>si2_avx512f): Ditto.
7888 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
7889 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
7890 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
7891
7892 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7893
7894 PR rtl-optimization/79985
7895 * df-scan.c (df_insn_refs_collect): Remove special case for
7896 global registers and asm statements.
7897
7898 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
7899
7900 * extend.texi (Global Register Variables): Rewrite the bullet list.
7901 Note that the register is available for allocation. Note that access
7902 via inline asm must use constraints. Add note about async-signal
7903 handlers. Remove paragraph about automagic register selection.
7904
7905 2018-05-23 Richard Biener <rguenther@suse.de>
7906
7907 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
7908 of fixed offset from memset VN.
7909
7910 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
7911
7912 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
7913 first_interp field.
7914 (alloc_cand_and_find_basis): Initialize first_interp field.
7915 (slsr_process_mul): Modify first_interp field.
7916 (slsr_process_add): Likewise.
7917 (slsr_process_cast): Modify first_interp field for each new
7918 interpretation.
7919 (slsr_process_copy): Likewise.
7920 (dump_candidate): Dump first_interp field.
7921 (replace_mult_candidate): Process all interpretations, not just
7922 subsequent ones.
7923 (replace_rhs_if_not_dup): Likewise.
7924 (replace_one_candidate): Likewise.
7925
7926 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
7927
7928 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
7929 Add new boolean.
7930 (aarch64_needs_frame_chain): New function.
7931 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
7932
7933 2018-05-23 Sudakshina Das <sudi.das@arm.com>
7934
7935 PR target/84882
7936 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
7937 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
7938 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
7939 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
7940 as true for strict-align.
7941 (aarch64_can_inline_p): Perform checks even when callee has no
7942 attributes to check for strict alignment.
7943 * doc/extend.texi (AArch64 Function Attributes): Document
7944 no-strict-align.
7945 * doc/invoke.texi: (AArch64 Options): Likewise.
7946
7947 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
7948
7949 PR tree-optimization/85853
7950 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
7951 the handling of the root of the node to...
7952 (vect_slp_analyze_node_operations_1): ...this new function,
7953 and run the whole thing with the child nodes' def types
7954 set according to their SLP node's def type.
7955
7956 2018-05-23 Richard Biener <rguenther@suse.de>
7957
7958 PR middle-end/85874
7959 * tree-data-ref.c (create_runtime_alias_checks): Defer
7960 and ignore overflow warnings.
7961
7962 2018-05-23 Yury Gribov <tetra2005@gmail.com>
7963
7964 PR tree-optimization/85822
7965 * tree-vrp.c (is_masked_range_test): Fix handling of negative
7966 constants.
7967
7968 2018-05-23 Richard Biener <rguenther@suse.de>
7969
7970 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
7971 memset constants via native_interpret_expr.
7972
7973 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
7974
7975 PR target/85345
7976 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
7977 attribute.
7978 (cgraph_node::create_alias): Likewise.
7979 (cgraph_node::get_availability): Check ifunc_resolver instead
7980 of looking up ifunc attribute.
7981 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7982 * varasm.c (do_assemble_alias): Likewise.
7983 (assemble_alias): Likewise.
7984 (default_binds_local_p_3): Likewise.
7985 * cgraph.h (cgraph_node): Add ifunc_resolver.
7986 (cgraph_node::only_called_directly_or_aliased_p): Return false
7987 for IFUNC resolver.
7988 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
7989 attribute.
7990 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
7991 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
7992 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
7993 instead of looking up ifunc attribute.
7994
7995 2018-05-22 Luis Machado <luis.machado@linaro.org>
7996
7997 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
7998
7999 2018-05-22 Martin Sebor <msebor@redhat.com>
8000
8001 PR middle-end/85359
8002 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
8003 only when expasion succeeds.
8004 (expand_builtin_strcmp): Same.
8005 (expand_builtin_strncmp): Same.
8006
8007 2018-05-22 Martin Sebor <msebor@redhat.com>
8008
8009 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
8010
8011 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8012 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8013
8014 * config/aarch64/aarch64-ldpstp.md: Replace uses of
8015 aarch64_mem_pair_operand with memory_operand and delete operand swapping
8016 code.
8017 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8018 Add check for legitimate_address.
8019 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
8020 (aarch64_swap_ldrstr_operands): New.
8021 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
8022 Define prototype.
8023
8024 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
8025 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8026
8027 * config/aarch64/aarch64.md: New patterns to generate stp
8028 and ldp.
8029 (store_pair_sw, store_pair_dw): New patterns to generate stp for
8030 single words and double words.
8031 (load_pair_sw, load_pair_dw): Likewise.
8032 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
8033 Delete.
8034 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
8035 Delete.
8036 * config/aarch64/aarch64-ldpstp.md: Modify peephole
8037 for different mode ldpstp and add peephole for merged zero stores.
8038 Likewise for loads.
8039 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
8040 Add size check.
8041 (aarch64_gen_store_pair): Rename calls to match new patterns.
8042 (aarch64_gen_load_pair): Rename calls to match new patterns.
8043 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
8044 (load_pair<DREG:mode><DREG2:mode>): ... This.
8045 (store_pair<mode>): Rename to...
8046 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
8047 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
8048 New mode iterators.
8049 (V_INT_EQUIV): Handle SImode.
8050 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
8051 New predicate.
8052
8053 2018-05-22 Martin Sebor <msebor@redhat.com>
8054
8055 PR c/85623
8056 * calls.c (maybe_warn_nonstring_arg): Use string length to set
8057 or ajust the presumed bound on an operation to avoid unnecessary
8058 warnings.
8059
8060 2018-05-22 Martin Sebor <msebor@redhat.com>
8061
8062 PR tree-optimization/85826
8063 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
8064 assuming that a DECL necesarily has a constant size.
8065
8066 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
8067
8068 PR middle-end/85862
8069 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
8070
8071 2018-05-22 Richard Biener <rguenther@suse.de>
8072
8073 PR tree-optimization/85834
8074 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
8075 non-constant and non-zero memset arguments.
8076
8077 2018-05-22 Martin Liska <mliska@suse.cz>
8078
8079 PR ipa/85607
8080 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
8081
8082 2018-05-22 Richard Biener <rguenther@suse.de>
8083
8084 PR tree-optimization/85863
8085 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
8086 comparisons when vectype is specified.
8087 (vectorizable_condition): Do not specify vectype for
8088 vect_is_simple_cond when SLP vectorizing.
8089
8090 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
8091
8092 PR target/85657
8093 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
8094 define __ibm128 as long double.
8095 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
8096 as a distinct type when IEEE 128-bit support is enabled.
8097 (init_float128_ieee): Fix up conversions between IFmode and IEEE
8098 128-bit types to use the correct functions.
8099 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
8100 convert between 128-bit floating point types that have different
8101 modes but the same representation, instead of using gen_lowpart to
8102 makean alias.
8103 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
8104 KFmode.
8105 (IFKF_reg): New attributes to give the register constraints for
8106 IFmode and KFmode.
8107 (extend<mode>tf2_internal): New insns to mark an explicit
8108 conversion between 128-bit floating point types that have a
8109 different mode but share the same representation.
8110
8111 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
8112
8113 PR tree-optimization/85814
8114 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
8115 a null return from get_strinfo when unsharing the next
8116 strinfo in the chain.
8117
8118 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8119
8120 PR gcc/84923
8121 * varasm.c (weak_finish): Clean up weak_decls.
8122
8123 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8124
8125 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
8126 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
8127 UNSPEC_UADALP values.
8128 * config/aarch64/iterators.md (ABAL): New int iterator.
8129 (ABDL2): Likewise.
8130 (ADALP): Likewise.
8131 (sur): Add mappings for the above.
8132 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
8133 New define_insn.
8134 (aarch64_<sur>abal<mode>_4): Likewise.
8135 (aarch64_<sur>adalp<mode>_3): Likewise.
8136 (<sur>sadv16qi): New define_expand.
8137
8138 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
8139
8140 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
8141 (*movdf_internal): Ditto.
8142 (*rcpsf2_sse): Ditto.
8143 (*rsqrtsf2_sse): Ditto.
8144 (*sqrt<mode>2_sse): Ditto.
8145
8146 2018-05-21 Tamar Christina <tamar.christina@arm.com>
8147
8148 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
8149 eor3q<mode>4.
8150 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
8151 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
8152 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
8153 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
8154 vbcaxq_s64): New.
8155 * config/aarch64/arm_neon.h: Likewise.
8156 * config/aarch64/iterators.md (VQ_I): New.
8157
8158 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
8159
8160 * config.gcc: Add arc/t-multilib-linux to tmake_file for
8161 arc*-*-linux*.
8162 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
8163 MULTILIB_DIRNAMES
8164
8165 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8166
8167 * config/nds32/constraints.md (S): New constraint.
8168 * config/nds32/nds32.md (call_internal): Use constraint S.
8169 (call_value_internal): Likewise.
8170 (sibcall_internal): Likewise.
8171 (sibcall_value_internal): Likewise.
8172
8173 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8174 Chung-Ju Wu <jasonwucj@gmail.com>
8175
8176 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
8177 into consideration.
8178
8179 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
8180 Chung-Ju Wu <jasonwucj@gmail.com>
8181
8182 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
8183 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
8184 (nds32_rtx_costs_impl): Simplify.
8185 (nds32_address_cost_impl): Simplify.
8186 (nds32_init_rtx_costs): New function.
8187 (nds32_rtx_costs_speed_prefer): Likewise.
8188 (nds32_rtx_costs_size_prefer): Likewise.
8189 (nds32_address_cost_speed_prefer): Likewise.
8190 (nds32_address_cost_speed_fwprop): Likewise.
8191 (nds32_address_cost_size_prefer): Likewise.
8192 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
8193 * config/nds32/nds32.c (nds32_option_override): Use
8194 nds32_init_rtx_costs function.
8195
8196 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
8197
8198 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
8199 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
8200 (TARGET_PIPELINE_N8): Likewise.
8201 (TARGET_PIPELINE_N10): Likewise.
8202 (TARGET_PIPELINE_N13): Likewise.
8203 (TARGET_PIPELINE_GRAYWOLF): Likewise.
8204
8205 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
8206
8207 * config/nds32/nds32-fpu.md: Update copyright year.
8208
8209 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8210
8211 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
8212
8213 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8214
8215 * config/nds32/nds32.c
8216 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
8217 * config/nds32/nds32.opt (minline-asm-r15): New option.
8218
8219 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8220
8221 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
8222 MASK_HW_ABS.
8223 * config/nds32/nds32.md (abssi2): New pattern.
8224
8225 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
8226
8227 * config/i386/i386.md (rex64namesuffix): New mode attribute.
8228 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
8229 Merge insn pattern from sse_cvtsi2ss<round_name> and
8230 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
8231 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
8232 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
8233 using SWI48 mode iterator.
8234 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
8235 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
8236 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
8237 pattern from sse_cvttss2si<round_saeonly_name>
8238 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
8239 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
8240 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
8241 using SWI48 mode iterator.
8242 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
8243 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
8244 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
8245 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
8246 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
8247 using SWI48 mode iterator.
8248 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
8249 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
8250 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
8251 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
8252 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
8253 SWI48 mode iterator.
8254 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
8255 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
8256 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
8257 pattern from sse_cvttsd2si<round_saeonly_name>
8258 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
8259
8260 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8261
8262 * config/nds32/nds32-md-auxiliary.c
8263 (nds32_valid_smw_lwm_base_p): Refine.
8264 (nds32_output_smw_single_word): Refine.
8265 (nds32_output_smw_double_word): New.
8266 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
8267
8268 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8269
8270 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
8271 (nds32_output_stack_pop): Refine.
8272 (nds32_expand_unaligned_load): Refine.
8273 (nds32_expand_unaligned_store): Refine.
8274
8275 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8276 Chung-Ju Wu <jasonwucj@gmail.com>
8277
8278 * config/nds32/constants.md: Add TP_REGNUM constant.
8279 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
8280 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
8281 UNSPEC_ADD32.
8282 * config/nds32/nds32-doubleword.md: Consider flag_pic.
8283 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
8284 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
8285 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
8286 and PIC code generation.
8287 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
8288 code generation.
8289 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
8290 optimization.
8291 * config/nds32/nds32.md: Support TLS and PIC.
8292 * config/nds32/nds32.c: Support TLS and PIC.
8293 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
8294 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
8295 predicate.
8296
8297 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
8298
8299 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
8300 mode with E_ prefix.
8301
8302 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
8303 Chung-Ju Wu <jasonwucj@gmail.com>
8304
8305 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
8306 * config/nds32/nds32-md-auxiliary.c
8307 (symbolic_reference_mentioned_p): New.
8308 (nds32_legitimize_ict_address): New.
8309 (nds32_expand_ict_move): New.
8310 (nds32_indirect_call_referenced_p): New.
8311 (nds32_symbol_binds_local_p): Delete.
8312 (nds32_long_call_p): Modify.
8313 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
8314 * config/nds32/nds32-protos.h
8315 (symbolic_reference_mentioned_p): Declare.
8316 (nds32_legitimize_ict_address): Declare.
8317 (nds32_expand_ict_move): Declare.
8318 (nds32_indirect_call_referenced_p): Declare.
8319 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
8320 (nds32_relax_group): Use nds32_ict_const_p as condition.
8321 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
8322 (nds32_asm_file_start): Output ict_model directive in asm code.
8323 (nds32_legitimate_address_p): Consider indirect call.
8324 (nds32_print_operand): Consider indirect call.
8325 (nds32_print_operand_address): Consider indirect call.
8326 (nds32_insert_attributes): Handle "indirect_call" attribute.
8327 (TARGET_LEGITIMATE_ADDRESS_P): Define.
8328 (TARGET_LEGITIMATE_CONSTANT_P): Define.
8329 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
8330 (TARGET_DELEGITIMIZE_ADDRESS): Define.
8331 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
8332 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
8333 (TARGET_ICT_MODEL_SMALL): Define.
8334 (TARGET_ICT_MODEL_LARGE): Define.
8335 * config/nds32/nds32.md (movsi): Consider ict model.
8336 (call, call_value): Consider ict model.
8337 (sibcall, sibcall_value): Consider ict model.
8338 * config/nds32/nds32.opt (mict-model): New option.
8339 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
8340 model.
8341
8342 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
8343 Monk Chiang <sh.chiang04@gmail.com>
8344 Jim Wilson <jimw@sifive.com>
8345
8346 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
8347 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
8348 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
8349 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
8350 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
8351 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
8352 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
8353 compute save_libcall_adjustment properly.
8354 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
8355 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
8356 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
8357 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
8358 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
8359 (ABI_SPEC): Handle mabi=ilp32e.
8360 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
8361 (RVE): Add RVE mask.
8362 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
8363 <-march>: Add rv32e as an example.
8364
8365 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
8366
8367 PR c++/82899
8368 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
8369 (intra_create_variable_infos): Handle C++ constructors.
8370
8371 2018-05-18 Martin Liska <mliska@suse.cz>
8372
8373 * passes.def: Remove a redundant pass.
8374
8375 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
8376
8377 PR bootstrap/85838
8378 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
8379
8380 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8381
8382 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
8383 (ARMv4): Update.
8384 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
8385 (ARMv6m): Update.
8386 (armv2, armv2a, armv3, armv3m): Delete architectures.
8387 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
8388 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
8389 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
8390 Delete cpus.
8391 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
8392 (*mulsidi3adddi): Likewise.
8393 (mulsidi3): Likewise.
8394 (*mulsidi3_nov6): Likewise.
8395 (umulsidi3): Likewise.
8396 (umulsidi3_nov6): Likewise.
8397 (umaddsidi4): Likewise.
8398 (*umulsidi3adddi): Likewise.
8399 (smulsi3_highpart): Likewise.
8400 (*smulsi3_highpart_nov6): Likewise.
8401 (umulsi3_highpart): Likewise.
8402 (*umulsi3_highpart_nov6): Likewise.
8403 * config/arm/arm.h (arm_arch3m): Delete.
8404 * config/arm/arm.c (arm_arch3m): Delete.
8405 (arm_option_override_internal): Update armv3-related comment.
8406 (arm_configure_build_target): Delete use of isa_bit_mode32.
8407 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
8408 (arm_rtx_costs_internal): Delete check of arm_arch3m.
8409 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
8410 (mulsa3): Likewise.
8411 (mulusa3): Likewise.
8412 * config/arm/arm-protos.h (arm_arch3m): Delete.
8413 * config/arm/arm-tables.opt: Regenerate.
8414 * config/arm/arm-tune.md: Likewise.
8415 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
8416 deleted architectures.
8417
8418 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8419
8420 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
8421 (armv5t, armv5te): New features.
8422 (ARMv5, ARMv5e): Delete fgroups.
8423 (ARMv5t, ARMv5te): Adjust for above changes.
8424 (ARMv6m): Likewise.
8425 (armv5, armv5e): Delete arches.
8426 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
8427 arm_arch5.
8428 (*call_reg_arm): Likewise.
8429 (*call_value_reg_armv5): Likewise.
8430 (*call_value_reg_arm): Likewise.
8431 (*call_symbol): Likewise.
8432 (*call_value_symbol): Likewise.
8433 (*sibcall_insn): Likewise.
8434 (*sibcall_value_insn): Likewise.
8435 (clzsi2): Likewise.
8436 (prefetch): Likewise.
8437 (define_split and define_peephole2 dependent on arm_arch5):
8438 Likewise.
8439 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
8440 arm_arch5e.
8441 (TARGET_ARM_QBIT): Likewise.
8442 (TARGET_DSP_MULTIPLY): Likewise.
8443 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
8444 (arm_arch5, arm_arch5e): Delete.
8445 (arm_arch5t, arm_arch5te): Declare.
8446 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
8447 (arm_arch5t): Declare.
8448 (arm_option_reconfigure_globals): Update for the above.
8449 (arm_options_perform_arch_sanity_checks): Update comment, replace
8450 use of arm_arch5 with arm_arch5t.
8451 (use_return_insn): Likewise.
8452 (arm_emit_call_insn): Likewise.
8453 (output_return_instruction): Likewise.
8454 (arm_final_prescan_insn): Likewise.
8455 (arm_coproc_builtin_available): Likewise.
8456 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
8457 arm_arch5e with arm_arch5t and arm_arch5te.
8458 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
8459 (arm_arch5t, arm_arch5te): Declare.
8460 * config/arm/arm-tables.opt: Regenerate.
8461 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
8462 * config/arm/t-multilib: Likewise.
8463 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
8464 instead of arm_arch5.
8465 (*call_reg_thumb1): Likewise.
8466 (*call_value_reg_thumb1_v5): Likewise.
8467 (*call_value_reg_thumb1): Likewise.
8468 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
8469 unreachable path.
8470 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
8471
8472 2018-05-18 Martin Liska <mliska@suse.cz>
8473
8474 PR gcov-profile/84846
8475 * doc/gcov.texi: Document -t option of gcov tool.
8476
8477 2018-05-18 Martin Liska <mliska@suse.cz>
8478
8479 PR gcov-profile/84846
8480 * gcov.c (print_usage): Add new -t option.
8481 (process_args): Handle the option.
8482 (generate_results): Use stdout as output when requested by
8483 the option.
8484
8485 2018-05-18 Martin Liska <mliska@suse.cz>
8486
8487 PR gcov-profile/84846
8488 * coverage.c (coverage_init): Write PWD to .gcno file.
8489 * doc/gcov.texi: Document how working directory is printed.
8490 * gcov-dump.c (dump_gcov_file): Print PWD.
8491 * gcov.c (output_intermediate_file): Likewise.
8492 (read_graph_file): Read PWD string.
8493 (output_lines): Print PWD.
8494
8495 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8496
8497 PR middle-end/85817
8498 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
8499 for retval and return false if all args to phi are zero.
8500
8501 2018-05-18 Richard Biener <rguenther@suse.de>
8502
8503 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
8504 method.
8505 (evrp_dom_walker::before_dom_children): Call it.
8506
8507 2018-05-18 Richard Biener <rguenther@suse.de>
8508
8509 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
8510 results when processing array refs with variable index.
8511
8512 2018-05-18 Toon Moene <toon@moene.org>
8513
8514 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
8515 directly after that of -floop-interchange. Indicate that both
8516 options are enabled by default when specifying -O3.
8517
8518 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8519
8520 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
8521 iterator. Delete separate integer-mode vec_set<mode> expander.
8522 (aarch64_simd_vec_setv2di): Delete.
8523 (vec_setv2di): Delete.
8524 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8525 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
8526 the "w, r" alternative.
8527
8528 2018-05-18 Martin Liska <mliska@suse.cz>
8529
8530 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
8531 * tree-pass.h (make_pass_lower_switch_O0): New function.
8532 * tree-switch-conversion.c (node_has_low_bound): Remove.
8533 (node_has_high_bound): Likewise.
8534 (node_is_bounded): Likewise.
8535 (class pass_lower_switch): Make it a template type and create
8536 two instances.
8537 (pass_lower_switch::execute): Add template argument.
8538 (make_pass_lower_switch): New function.
8539 (make_pass_lower_switch_O0): New function.
8540 (do_jump_if_equal): Remove.
8541 (emit_case_nodes): Simplify to just handle all 3 cases and leave
8542 all the hard work to tree optimization passes.
8543
8544 2018-05-18 Martin Liska <mliska@suse.cz>
8545
8546 * dbgcnt.c (limit_low): Renamed from limit.
8547 (limit_high): New variable.
8548 (dbg_cnt_is_enabled): Check for upper limit.
8549 (dbg_cnt): Adjust dumping.
8550 (dbg_cnt_set_limit_by_index): Add new argument for high
8551 value.
8552 (dbg_cnt_set_limit_by_name): Likewise.
8553 (dbg_cnt_process_single_pair): Parse new format.
8554 (dbg_cnt_process_opt): Use strtok.
8555 (dbg_cnt_list_all_counters): Remove 'value' and add
8556 'limit_high'.
8557 * doc/invoke.texi: Document changes.
8558
8559 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
8560
8561 * doc/sourcebuild.texi (scalar_all_fma): Document.
8562 * tree.def (FMA_EXPR): Delete.
8563 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
8564 * internal-fn.c (ternary_direct): New macro.
8565 (expand_ternary_optab_fn): Likewise.
8566 (direct_ternary_optab_supported_p): Likewise.
8567 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
8568 * builtins.c (fold_builtin_fma): Delete.
8569 (fold_builtin_3): Don't call it.
8570 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
8571 * expr.c (expand_expr_real_2): Likewise.
8572 * fold-const.c (operand_equal_p): Likewise.
8573 (fold_ternary_loc): Likewise.
8574 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
8575 * gimple.c (DEFTREECODE): Likewise.
8576 * gimplify.c (gimplify_expr): Likewise.
8577 * optabs-tree.c (optab_for_tree_code): Likewise.
8578 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8579 * tree-eh.c (operation_could_trap_p): Likewise.
8580 (stmt_could_throw_1_p): Likewise.
8581 * tree-inline.c (estimate_operator_cost): Likewise.
8582 * tree-pretty-print.c (dump_generic_node): Likewise.
8583 (op_code_prio): Likewise.
8584 * tree-ssa-loop-im.c (stmt_cost): Likewise.
8585 * tree-ssa-operands.c (get_expr_operands): Likewise.
8586 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
8587 * fold-const-call.h (fold_fma): Delete.
8588 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
8589 CFN_FNMA and CFN_FNMS.
8590 (fold_fma): Delete.
8591 * genmatch.c (combined_fn): New enum.
8592 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
8593 (commutative_op): New function.
8594 (commutate): Use it. Handle more than 2 operands.
8595 (dt_operand::gen_gimple_expr): Use commutative_op.
8596 (parser::parse_expr): Allow :c to be used with non-binary
8597 operators if the commutative operand is known.
8598 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
8599 CFN_FMS, CFN_FNMA and CFN_FNMS.
8600 (backprop::process_assign_use): Remove FMA_EXPR handling.
8601 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
8602 (gen_hsa_fma): New function.
8603 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
8604 IFN_FNMA and IFN_FNMS.
8605 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
8606 * gimple-fold.h (follow_all_ssa_edges): Declare.
8607 * gimple-fold.c (follow_all_ssa_edges): New function.
8608 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
8609 gimple_build interface and use follow_all_ssa_edges to fold the result.
8610 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
8611 instead of checking for optabs directly.
8612 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
8613 rather than FMA_EXPRs.
8614 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
8615 call to IFN_FMA instead of an FMA_EXPR.
8616
8617 2018-05-17 Jim Wilson <jimw@sifive.com>
8618
8619 * expr.c (do_tablejump): When converting index to Pmode, if we have a
8620 sign extended promoted subreg, and the range does not have the sign bit
8621 set, then do a sign extend.
8622
8623 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
8624 test, check for sign extended subreg and/or constant operands, and
8625 do a sign extend in that case.
8626
8627 2018-05-17 Steve Ellcey <sellcey@cavium.com>
8628
8629 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
8630 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
8631 Add untyped.
8632 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
8633 Change logics_shift_reg to logics_shift_imm.
8634 (thunderx2t99_fp_loadpair_basic): Delete.
8635 (thunderx2t99_fp_storepair_basic): Delete.
8636 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
8637 (thunderx2t99_asimd_polynomial): Delete.
8638 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
8639 and neon_fp_mul_d_scalar_q.
8640 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
8641 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
8642 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
8643 (thunderx2t99_asimd_lut): Add missing tbl types.
8644 (thunderx2t99_asimd_ext): Delete.
8645 (thunderx2t99_asimd_load1_1_mult): Delete.
8646 (thunderx2t99_asimd_load1_2_mult): Delete.
8647 (thunderx2t99_asimd_load1_ldp): New.
8648 (thunderx2t99_asimd_load1): New.
8649 (thunderx2t99_asimd_load2): Add missing *load2* types.
8650 (thunderx2t99_asimd_load3): New.
8651 (thunderx2t99_asimd_load4): New.
8652 (thunderx2t99_asimd_store1_1_mult): Delete.
8653 (thunderx2t99_asimd_store1_2_mult): Delete.
8654 (thunderx2t99_asimd_store2_mult): Delete.
8655 (thunderx2t99_asimd_store2_onelane): Delete.
8656 (thunderx2t99_asimd_store_stp): New.
8657 (thunderx2t99_asimd_store1): New.
8658 (thunderx2t99_asimd_store2): New.
8659 (thunderx2t99_asimd_store3): New.
8660 (thunderx2t99_asimd_store4): New.
8661
8662 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
8663
8664 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
8665 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
8666
8667 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
8668 Segher Boessenkool <segher@kernel.crashing.org>
8669
8670 PR target/85698
8671 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
8672 operand.
8673
8674 2018-05-17 Richard Biener <rguenther@suse.de>
8675
8676 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
8677 for pruning loop and prune defs feeding only already visited PHIs.
8678
8679 2018-05-17 Richard Biener <rguenther@suse.de>
8680
8681 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
8682
8683 2018-05-17 Bin Cheng <bin.cheng@arm.com>
8684 Richard Biener <rguenther@suse.de>
8685
8686 PR tree-optimization/85793
8687 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
8688 for VMAT_ELEMENTWISE.
8689
8690 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8691
8692 * internal-fn.h (lookup_internal_fn): Declare
8693 * internal-fn.c (lookup_internal_fn): New function.
8694 * gimple.c (gimple_build_call_from_tree): Handle calls to
8695 internal functions.
8696 * gimple-pretty-print.c (dump_gimple_call): Print "." before
8697 internal function names.
8698 * tree-pretty-print.c (dump_generic_node): Likewise.
8699 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
8700
8701 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
8702
8703 * gimple-fold.h (gimple_build): Make the function forms take
8704 combined_fn rather than built_in_function.
8705 (gimple_simplify): Likewise.
8706 * gimple-match-head.c (gimple_simplify): Likewise.
8707 * gimple-fold.c (gimple_build): Likewise.
8708 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
8709 rather than gimple_build_call_internal.
8710 (get_initial_defs_for_reduction): Likewise.
8711 (vect_create_epilog_for_reduction): Likewise.
8712 (vectorizable_live_operation): Likewise.
8713
8714 2018-05-17 Martin Liska <mliska@suse.cz>
8715
8716 * gimple-ssa-sprintf.c (format_directive): Do not use
8717 space in between 'G_' and '('.
8718
8719 2018-05-17 Jakub Jelinek <jakub@redhat.com>
8720
8721 PR target/85323
8722 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
8723 even if the mask is not all ones.
8724
8725 PR target/85323
8726 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
8727 vector.
8728 (ix86_gimple_fold_builtin): Likewise.
8729
8730 PR target/85323
8731 * config/i386/i386.c: Include tree-vector-builder.h.
8732 (ix86_vector_shift_count): New function.
8733 (ix86_fold_builtin): Fold shift builtins by scalar count.
8734 (ix86_gimple_fold_builtin): Likewise.
8735
8736 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
8737 _mm512_setzero): New intrinsics.
8738
8739 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
8740 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8741
8742 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
8743 code generation for cases where splatting a value is not useful.
8744 * simplify-rtx.c (simplify_ternary_operation): Simplify
8745 vec_merge across a vec_duplicate and a paradoxical subreg forming
8746 a vector mode to a vec_concat.
8747
8748 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
8749
8750 * config.gcc: Support "goldmont-plus".
8751 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
8752 "goldmont-plus".
8753 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8754 PROCESSOR_GOLDMONT_PLUS.
8755 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
8756 (processor_target_table): Add "goldmont-plus".
8757 (PTA_GOLDMONT_PLUS): Define.
8758 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
8759 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
8760 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
8761 (fold_builtin_cpu): Add "goldmont-plus".
8762 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
8763 (ix86_option_override_internal): Add "goldmont-plus".
8764 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
8765 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
8766 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
8767 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
8768
8769 2018-05-17 Richard Biener <rguenther@suse.de>
8770
8771 PR tree-optimization/85757
8772 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
8773 remove defs that only feed that PHI from further processing.
8774
8775 2018-05-16 Jim Wilson <jimw@sifive.com>
8776
8777 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
8778 asterisk to name.
8779 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
8780
8781 2018-05-16 Mark Wielaard <mark@klomp.org>
8782
8783 * dwarf2out.c (count_index_strings): New function.
8784 (output_indirect_strings): Call count_index_strings and generate
8785 header for dwarf_version >= 5.
8786
8787 2018-05-16 Mark Wielaard <mark@klomp.org>
8788
8789 * dwarf2out.c (dwarf_FORM): New function.
8790 (set_indirect_string): Use dwarf_FORM.
8791 (reset_indirect_string): Likewise.
8792 (size_of_die): Likewise.
8793 (value_format): Likewise.
8794 (output_die): Likewise.
8795 (add_skeleton_AT_string): Likewise.
8796 (output_macinfo_op): Likewise.
8797 (index_string): Likewise.
8798 (output_index_string_offset): Likewise.
8799 (output_index_string): Likewise.
8800 (count_index_strings): Likewise.
8801
8802 2018-05-16 Carl Love <cel@us.ibm.com>
8803
8804 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
8805 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
8806
8807 2018-05-16 Martin Jambor <mjambor@suse.cz>
8808
8809 * ipa-prop.c (ipa_free_all_edge_args): Remove.
8810 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
8811
8812 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
8813
8814 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
8815 (fnma<mode>4): Likewise.
8816 (fms<mode>4): Likewise.
8817 (fnms<mode>4): Likewise.
8818 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
8819 (aarch64_fnma<mode>4): Likewise.
8820 (aarch64_fms<mode>4): Likewise.
8821 (aarch64_fnms<mode>4): Likewise.
8822 (aarch64_fnmadd<mode>4): Likewise.
8823
8824 2018-05-16 Jason Merrill <jason@redhat.com>
8825
8826 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
8827
8828 2018-05-16 Richard Biener <rguenther@suse.de>
8829
8830 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
8831 (dump_stmt_cost): Declare.
8832 (add_stmt_cost): Dump cost we add.
8833 (add_stmt_costs): New function.
8834 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8835 No longer exported.
8836 (vect_analyze_stmt): Adjust prototype.
8837 (vectorizable_condition): Likewise.
8838 (vectorizable_live_operation): Likewise.
8839 (vectorizable_reduction): Likewise.
8840 (vectorizable_induction): Likewise.
8841 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
8842 cost vector to pass to vectorizable_ and record afterwards.
8843 (vect_model_reduction_cost): Take cost vector argument and adjust.
8844 (vect_model_induction_cost): Likewise.
8845 (vectorizable_reduction): Likewise.
8846 (vectorizable_induction): Likewise.
8847 (vectorizable_live_operation): Likewise.
8848 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
8849 SLP_TREE_NUMBER_OF_VEC_STMTS.
8850 (vect_analyze_slp_cost_1): Remove.
8851 (vect_analyze_slp_cost): Likewise.
8852 (vect_slp_analyze_node_operations): Take visited args and
8853 a target cost vector. Avoid processing already visited stmt sets.
8854 (vect_slp_analyze_operations): Use a local cost vector to gather
8855 costs and register those of non-discarded instances.
8856 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
8857 (vect_schedule_slp_instance): Remove copying of
8858 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
8859 zero.
8860 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
8861 adding cost. Record cost entry location.
8862 (vect_prologue_cost_for_slp_op): Function to compute cost of
8863 a constant or invariant generated for SLP vect in the prologue,
8864 split out from vect_analyze_slp_cost_1.
8865 (vect_model_simple_cost): Make static. Adjust for SLP costing.
8866 (vect_model_promotion_demotion_cost): Likewise.
8867 (vect_model_store_cost): Likewise, make static.
8868 (vect_model_load_cost): Likewise.
8869 (vectorizable_bswap): Add cost vector arg and adjust.
8870 (vectorizable_call): Likewise.
8871 (vectorizable_simd_clone_call): Likewise.
8872 (vectorizable_conversion): Likewise.
8873 (vectorizable_assignment): Likewise.
8874 (vectorizable_shift): Likewise.
8875 (vectorizable_operation): Likewise.
8876 (vectorizable_store): Likewise.
8877 (vectorizable_load): Likewise.
8878 (vectorizable_condition): Likewise.
8879 (vectorizable_comparison): Likewise.
8880 (can_vectorize_live_stmts): Likewise.
8881 (vect_analyze_stmt): Likewise.
8882 (vect_transform_stmt): Adjust calls to vectorizable_*.
8883 * tree-vectorizer.c: Include gimple-pretty-print.h.
8884 (dump_stmt_cost): New function.
8885
8886 2018-05-16 Richard Biener <rguenther@suse.de>
8887
8888 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
8889 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
8890 * tree-ssa-dse.c: Include tree-ssa-loop.h.
8891 (check_name): New callback.
8892 (dse_classify_store): Track cycles via a visited bitmap of PHI
8893 defs and simplify handling of in-loop and across loop dead stores
8894 and properly fail for loop-variant refs. Handle byte-tracking with
8895 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
8896 limiting the walk.
8897
8898 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
8899
8900 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
8901 (vect_get_mask_type_for_stmt): Likewise.
8902 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
8903 split out from...
8904 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
8905 to determine the statement's vector type and the vector type that
8906 should be used for calculating nunits. Deal with cases in which
8907 the type has to be deferred.
8908 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
8909 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
8910 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
8911 (vect_determine_vf_for_stmt): New functions, split out from...
8912 (vect_determine_vectorization_factor): ...here.
8913 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
8914 (vect_get_mask_type_for_stmt): New functions, split out from
8915 vect_determine_vectorization_factor.
8916
8917 2018-05-16 Richard Biener <rguenther@suse.de>
8918
8919 * tree-cfg.c (verify_gimple_assign_ternary): Properly
8920 verify the [VEC_]COND_EXPR embedded comparison.
8921
8922 2018-05-15 Martin Sebor <msebor@redhat.com>
8923
8924 PR tree-optimization/85753
8925 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
8926 RECORD_TYPE in addition to ARRAY_TYPE.
8927
8928 2018-05-15 Martin Sebor <msebor@redhat.com>
8929
8930 PR middle-end/85643
8931 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
8932
8933 2018-05-15 Richard Biener <rguenther@suse.de>
8934
8935 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
8936 add by_clobber_p one. Change algorithm to collect all defs
8937 representing uses we need to walk and try reducing them to
8938 a single one before failing.
8939 (dse_dom_walker::dse_optimize_stmt): Adjust.
8940
8941 2018-05-13 Mark Wielaard <mark@klomp.org>
8942
8943 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
8944 (size_of_loc_descr): Likewise.
8945 (output_loc_operands): Likewise.
8946 (output_loc_operands_raw): Likewise.
8947 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
8948 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
8949 (hash_loc_operands): Likewise.
8950 (compare_loc_operands): Likewise.
8951
8952 2018-05-14 Mark Wielaard <mark@klomp.org>
8953
8954 * dwarf2out.c (count_index_addrs): New function.
8955 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
8956
8957 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8958
8959 PR tree-optimization/83648
8960 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
8961 return value as malloc candidate.
8962
8963 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8964
8965 PR ipa/85734
8966 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
8967 param as true in call to suggest_attribute.
8968
8969 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
8970
8971 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
8972 -mreadonly-in-sdata.
8973
8974 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8975
8976 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
8977 New pattern.
8978 (aarch64_crypto_aesd_fused): Likewise.
8979
8980 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
8981
8982 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
8983 (movsi_aarch64): Likewise.
8984 (load_pairsi): Likewise.
8985 (load_pairdi): Likewise.
8986 (store_pairsi): Likewise.
8987 (store_pairdi): Likewise.
8988 (load_pairsf): Likewise.
8989 (load_pairdf): Likewise.
8990 (store_pairsf): Likewise.
8991 (store_pairdf): Likewise.
8992 (zero_extend): Likewise.
8993 (trunc): Swap alternatives.
8994 (fcvt_target): Add '?' to prefer w over r.
8995
8996 2018-05-14 Jakub Jelinek <jakub@redhat.com>
8997
8998 PR target/85756
8999 * config/i386/i386.md: Disallow non-commutative arithmetics in
9000 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
9001 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
9002 in the peephole2 before it.
9003
9004 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
9005
9006 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
9007 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
9008 (ix86_handle_option): Handle -mcldemote.
9009 * config.gcc: New header.
9010 * config/i386/cldemoteintrin.h: New file.
9011 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
9012 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
9013 -mcldemote.
9014 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9015 OPTION_MASK_ISA_CLDEMOTE.
9016 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
9017 (ix86_valid_target_attribute_inner_p): Ditto.
9018 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
9019 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
9020 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
9021 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
9022 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
9023 (cldemote): New.
9024 * config/i386/i386.opt: Add -mcldemote.
9025 * config/i386/x86intrin.h: New header.
9026 * doc/invoke.texi: Add -mcldemote.
9027
9028 2018-05-14 Richard Biener <rguenther@suse.de>
9029
9030 * doc/match-and-simplify.texi: Adjust :s documentation.
9031
9032 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
9033
9034 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
9035 intended memcpy size.
9036 (REORDER_45): Likewise.
9037
9038 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
9039
9040 * sort.cc: New file.
9041 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
9042 * vec.c (qsort_chk): Use gcc_qsort.
9043 * Makefile.in (OBJS-libcommon): Add sort.o.
9044 (build/sort.o): New target. Use it...
9045 (BUILD_RTL): ... here, and...
9046 (build/gencfn-macros): ... here, and...
9047 (build/genmatch): ... here.
9048
9049 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9050 Chung-Ju Wu <jasonwucj@gmail.com>
9051
9052 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
9053 * config/nds32/nds32-graywolf.md: New file.
9054 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
9055 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
9056 pipeline.
9057 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
9058 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
9059 * config/nds32/nds32.md (pipeline_model): Add graywolf.
9060 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
9061 * config/nds32/pipelines.md: Include n15 settings.
9062
9063 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9064 Chung-Ju Wu <jasonwucj@gmail.com>
9065
9066 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
9067 * config/nds32/nds32-n13.md: New file.
9068 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
9069 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
9070 pipeline.
9071 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
9072 * config/nds32/nds32.md (pipeline_model): Add n13.
9073 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
9074 * config/nds32/pipelines.md: Include n13 settings.
9075
9076 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
9077 Chung-Ju Wu <jasonwucj@gmail.com>
9078
9079 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
9080 * config/nds32/nds32-n10.md: New file.
9081 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
9082 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
9083 pipeline.
9084 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
9085 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
9086 * config/nds32/nds32.md (pipeline_model): Add n10.
9087 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
9088 * config/nds32/pipelines.md: Include n10 settings.
9089
9090 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
9091 Kito Cheng <kito.cheng@gmail.com>
9092 Chung-Ju Wu <jasonwucj@gmail.com>
9093
9094 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
9095 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9096 Add enum values for DSP extension instructions.
9097 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
9098 New constraints.
9099 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
9100 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
9101 New code iterators.
9102 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
9103 * config/nds32/nds32-dspext.md: New file for DSP implementation.
9104 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
9105 * config/nds32/nds32-intrinsic.md: Likewise.
9106 * config/nds32/nds32_intrinsic.h: Likewise.
9107 * config/nds32/nds32-md-auxiliary.c: Likewise.
9108 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
9109 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
9110 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
9111 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
9112 * config/nds32/nds32-protos.h: New declarations for DSP extension.
9113 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
9114 TYPE_DMAC in switch statement.
9115 * config/nds32/nds32.c: New checking and implementation for DSP
9116 extension instructions.
9117 * config/nds32/nds32.h: Likewise.
9118 * config/nds32/nds32.md: Likewise.
9119 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
9120 * config/nds32/predicates.md: Implement new predicates for DSP
9121 extension.
9122
9123 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9124
9125 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
9126 Reformat alternatives and attributes so it is easier to identify
9127 which constraints/attributes go with which instruction.
9128 (mov<mode>_hardfloat32, FMOVE64): Likewise.
9129 (mov<mode>_softfloat32, FMOVE64): Likewise.
9130 (mov<mode>_hardfloat64, FMOVE64): Likewise.
9131 (mov<mode>_softfloat64, FMOVE64): Likewise.
9132
9133 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
9134
9135 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9136 subsection.
9137 (Basic PowerPC Built-in Functions): The new name of the
9138 subsection previously known as "PowerPC Built-in Functions".
9139 (Basic PowerPC Built-in Functions Available on all Configurations):
9140 New subsubsection.
9141 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
9142 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
9143 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
9144 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
9145
9146 2018-05-11 Martin Jambor <mjambor@suse.cz>
9147
9148 PR ipa/85655
9149 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
9150 single const.
9151
9152 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9153
9154 PR target/85733
9155 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
9156
9157 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
9158
9159 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
9160 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
9161 (ix86_handle_option): Handle -mwaitpkg.
9162 * config.gcc: New header.
9163 * config/i386/cpuid.h (bit_WAITPKG): New bit.
9164 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
9165 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
9166 function type.
9167 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9168 OPTION_MASK_ISA_WAITPKG.
9169 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
9170 (ix86_option_override_internal): Add PTA_WAITPKG.
9171 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
9172 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
9173 IX86_BUILTIN_TPAUSE.
9174 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
9175 __builtin_ia32_umwait and __builtin_ia32_tpause.
9176 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
9177 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
9178 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
9179 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
9180 UNSPECV_TPAUSE): New.
9181 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
9182 * config/i386/i386.opt: Add -mwaitpkg.
9183 * config/i386/waitpkgintrin.h: New file.
9184 * config/i386/x86intrin.h: New header.
9185 * doc/invoke.texi: Add -mwaitpkg.
9186
9187 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
9188
9189 PR target/85606
9190 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
9191 equivalent.
9192 (cortex-m0): Use armv6s-m isa.
9193 (cortex-m0plus): Likewise.
9194 (cortex-m1): Likewise.
9195 (cortex-m0.small-multiply): Likewise.
9196 (cortex-m0plus.small-multiply): Likewise.
9197 (cortex-m1.small-multiply): Likewise.
9198
9199 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
9200 Jakub Jelinek <jakub@redhat.com>
9201
9202 PR tree-optimization/85692
9203 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
9204 source permute as well.
9205
9206 2018-05-11 Martin Liska <mliska@suse.cz>
9207
9208 PR sanitizer/85556
9209 * doc/extend.texi: Document LLVM style format for no_sanitize
9210 attribute.
9211
9212 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
9213
9214 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
9215 mode_supports_vsx_dform_quad to mode_supports_dq_form.
9216 (mode_supports_vsx_dform_quad): Likewise.
9217 (mode_supports_vmx_dform): Move these functions to be next to the
9218 other mode_supports functions.
9219 (mode_supports_dq_form): Likewise.
9220 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
9221 mode_supports_dq_form.
9222 (reg_offset_addressing_ok_p): Likewise.
9223 (offsettable_ok_by_alignment): Likewise.
9224 (rs6000_legitimate_offset_address_p): Likewise.
9225 (legitimate_lo_sum_address_p): Likewise.
9226 (rs6000_legitimize_address): Likewise.
9227 (rs6000_legitimize_reload_address): Likewise.
9228 (rs6000_secondary_reload_inner): Likewise.
9229 (rs6000_preferred_reload_class): Likewise.
9230 (rs6000_output_move_128bit): Likewise.
9231
9232 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9233
9234 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
9235 Generate SImode target register for null target.
9236 <case IX86_BUILTIN_XGETBV>: Ditto.
9237 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
9238 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
9239
9240 2018-05-10 Carl Love <cel@us.ibm.com>
9241
9242 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
9243 dcbtt and dcbtstt if operands[2] is 0.
9244
9245 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
9246
9247 PR target/85693
9248 * config/i386/sse.md (usadv64qi): New expander.
9249
9250 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
9251
9252 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
9253 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
9254 -maltivec=be support.
9255 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
9256 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
9257 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
9258 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
9259 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
9260 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
9261 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
9262 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
9263 altivec_vsumsws): Adjust.
9264 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
9265 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
9266 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
9267 support.
9268 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
9269 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
9270 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
9271 (altivec_lve<VI_char>x): Delete expand.
9272 (*altivec_lve<VI_char>x_internal): Rename to...
9273 (altivec_lve<VI_char>x): ... this.
9274 (altivec_lvxl_<mode>): Delete expand.
9275 (*altivec_lvxl_<mode>_internal): Rename to ...
9276 (altivec_lvxl_<mode>): ... this.
9277 (altivec_stvxl_<mode>): Delete expand.
9278 (*altivec_stvxl_<mode>_internal): Rename to ...
9279 (altivec_stvxl_<mode>): ... this.
9280 (altivec_stve<VI_char>x): Delete expand.
9281 (*altivec_stve<VI_char>x_internal): Rename to ...
9282 (altivec_stve<VI_char>x): ... this.
9283 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
9284 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
9285 reduc_plus_scal_<mode>): Adjust.
9286 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
9287 comment.
9288 (rs6000_cpu_cpp_builtins): Adjust.
9289 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
9290 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
9291 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
9292 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
9293 -maltivec=be support.
9294 (rs6000_split_vec_extract_var): Adjust.
9295 (rs6000_split_v4si_init): Adjust.
9296 (swap_selector_for_mode): Delete.
9297 (altivec_expand_lvx_be, altivec_expand_stvx_be,
9298 altivec_expand_stvex_be): Delete.
9299 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
9300 -maltivec=be support.
9301 (rs6000_gimple_fold_builtin): Ditto.
9302 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
9303 Adjust.
9304 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
9305 (TARGET_DIRECT_MOVE_64BIT): Adjust.
9306 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
9307 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
9308 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
9309 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
9310 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
9311 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
9312 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
9313 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
9314 anonymous split): Adjust.
9315 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
9316 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
9317
9318 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
9319
9320 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
9321 when --with-gxx-include-dir is also specified.
9322 * configure: Regenerate.
9323
9324 2018-05-09 Jim Wilson <jimw@sifive.com>
9325
9326 PR target/84797
9327 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
9328 * config/riscv/t-withmultilib: New.
9329 * config/riscv/withmultilib.h: New.
9330 * doc/install.texi: Document RISC-V --with-multilib-list support.
9331
9332 2018-05-09 Richard Biener <rguenther@suse.de>
9333
9334 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
9335 vector.
9336 (vect_bb_vectorization_profitable_p): Adjust. Compute
9337 actual scalar cost using the cost vector and the add_stmt_cost
9338 machinery.
9339
9340 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9341
9342 PR rtl-optimization/85645
9343 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
9344 in the REG_CFA_REGISTER note for LR, don't leave it empty.
9345
9346 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9347
9348 PR rtl-optimization/85645
9349 * shrink-wrap.c (spread_components): Return a boolean saying if
9350 anything was changed.
9351 (try_shrink_wrapping_separate): Iterate spread_components until
9352 nothing changes anymore.
9353
9354 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9355
9356 PR rtl-optimization/85645
9357 * regrename.c (build_def_use): Also kill the chains that include the
9358 destination of a REG_CFA_REGISTER note.
9359
9360 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
9361
9362 PR rtl-optimization/85645
9363 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
9364 insn that has a REG_CFA_REGISTER note.
9365
9366 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
9367
9368 * cfgexpand.c (expand_clobber): New function.
9369 (expand_gimple_stmt_1): Use it.
9370 * tree-vect-stmts.c (vect_clobber_variable): New function,
9371 split out from...
9372 (vectorizable_simd_clone_call): ...here.
9373 (vectorizable_store): Emit a clobber either side of an
9374 IFN_STORE_LANES sequence.
9375 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
9376
9377 2018-05-09 Tom de Vries <tom@codesourcery.com>
9378
9379 PR target/85626
9380 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
9381 (define_insn "trap_if_false"): Add exit after trap.
9382
9383 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
9384
9385 PR rtl-optimization/85638
9386 * bb-reorder.c: Include common/common-target.h.
9387 (create_forwarder_block): New function extracted from...
9388 (fix_up_crossing_landing_pad): ...here. Rename into...
9389 (dw2_fix_up_crossing_landing_pad): ...this.
9390 (sjlj_fix_up_crossing_landing_pad): New function.
9391 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
9392 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
9393 from both partitions and exit the loop after one iteration.
9394
9395 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9396
9397 Revert:
9398 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9399 subsection.
9400 (Basic PowerPC Built-in Functions): The new name of the
9401 subsection previously known as "PowerPC Built-in Functions".
9402 (Basic PowerPC Built-in Functions Available on all Configurations):
9403 New subsubsection.
9404 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9405 subsubsection.
9406 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9407 subsubsection.
9408 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9409 subsubsection.
9410 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9411 subsubsection.
9412
9413 2018-05-08 Jim Wilson <jimw@sifive.com>
9414
9415 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
9416 (LD_EMUL_SUFFIX): New.
9417 (LINK_SPEC): Use it.
9418
9419 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
9420
9421 * doc/extend.texi (PowerPC Built-in Functions): Rename this
9422 subsection.
9423 (Basic PowerPC Built-in Functions): The new name of the
9424 subsection previously known as "PowerPC Built-in Functions".
9425 (Basic PowerPC Built-in Functions Available on all Configurations):
9426 New subsubsection.
9427 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
9428 subsubsection.
9429 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
9430 subsubsection.
9431 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
9432 subsubsection.
9433 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
9434 subsubsection.
9435
9436 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9437
9438 PR target/85683
9439 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
9440 after cmpelim optimization.
9441
9442 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
9443
9444 * config.gcc: Support "goldmont".
9445 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
9446 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9447 PROCESSOR_GOLDMONT.
9448 * config/i386/i386.c (m_GOLDMONT): Define.
9449 (processor_target_table): Add "goldmont".
9450 (PTA_GOLDMONT): Define.
9451 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
9452 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
9453 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
9454 (fold_builtin_cpu): Add "goldmont".
9455 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
9456 (ix86_option_override_internal): Add "goldmont".
9457 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
9458 (processor_type): Add PROCESSOR_GOLDMONT.
9459 * config/i386/i386.md: Add CPU "glm".
9460 * config/i386/glm.md: New file.
9461 * config/i386/x86-tune.def: Add m_GOLDMONT.
9462 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
9463
9464 2018-05-08 Jakub Jelinek <jakub@redhat.com>
9465
9466 PR target/85572
9467 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
9468 E_V4DImode.
9469 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
9470 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
9471 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
9472
9473 PR target/85317
9474 * config/i386/i386.c (ix86_fold_builtin): Handle
9475 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
9476
9477 PR target/85480
9478 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
9479 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
9480
9481 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
9482
9483 PR target/85658
9484 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
9485 (check_arch): Likewise.
9486 (check_fpu): Return the result rather than printing it.
9487 (end arch): Fix operator precedence.
9488 (end cpu): Likewise.
9489 (END): Print the result from check_fpu.
9490
9491 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9492 Alan Hayward <alan.hayward@arm.com>
9493 David Sherwood <david.sherwood@arm.com>
9494
9495 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
9496 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
9497 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
9498 (*fcmuo<mode>_and): New patterns.
9499
9500 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
9501
9502 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
9503 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
9504 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
9505 (cmp_op, sve_imm_con): New code attributes.
9506 (SVE_COND_INT_CMP, imm_con): Delete.
9507 (cmp_op): Remove above unspecs from int attribute.
9508 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
9509 to...
9510 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
9511 comparison-specific unspecs.
9512 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
9513 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
9514 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
9515 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
9516 (*vec_fcm<cmp_op><mode>): Rename to...
9517 (*fcm<cmp_op><mode>): ...this and adjust likewise.
9518 (*vec_fcmuo<mode>): Rename to...
9519 (*fcmuo<mode>): ...this and adjust likewise.
9520 (*pred_fcm<cmp_op><mode>): New pattern.
9521 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
9522 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
9523 functions.
9524 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
9525 and UNORDERED.
9526 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
9527 (aarch64_emit_sve_predicated_cond): New function.
9528 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
9529 (aarch64_emit_unspec_cond_or): Replace with...
9530 (aarch64_emit_sve_or_conds): ...this new function. Use
9531 aarch64_emit_sve_ptrue_op for the individual comparisons and
9532 aarch64_emit_binop to OR them together.
9533 (aarch64_emit_inverted_unspec_cond): Replace with...
9534 (aarch64_emit_sve_inverted_cond): ...this new function. Use
9535 aarch64_emit_sve_ptrue_op for the comparison and
9536 aarch64_emit_unop to invert the result.
9537 (aarch64_expand_sve_vec_cmp_float): Update after the above
9538 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
9539
9540 2018-05-07 Nathan Sidwell <nathan@acm.org>
9541
9542 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
9543 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
9544 (Backwards Compatibility): Likewise.
9545
9546 2018-05-07 Luis Machado <luis.machado@linaro.org>
9547
9548 PR bootstrap/85681
9549 Revert:
9550 2018-05-07 Luis Machado <luis.machado@linaro.org>
9551
9552 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9553 <prefetch_dynamic_strides>: New const bool field.
9554 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9555 prefetch_dynamic_strides.
9556 (exynosm1_prefetch_tune): Likewise.
9557 (thunderxt88_prefetch_tune): Likewise.
9558 (thunderx_prefetch_tune): Likewise.
9559 (thunderx2t99_prefetch_tune): Likewise.
9560 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9561 to false.
9562 (aarch64_override_options_internal): Update to set
9563 PARAM_PREFETCH_DYNAMIC_STRIDES.
9564 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9565 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9566 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9567 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9568 prefetch-dynamic-strides setting.
9569
9570 2018-05-07 Luis Machado <luis.machado@linaro.org>
9571
9572 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9573 <minimum_stride>: New const int field.
9574 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9575 minimum_stride field.
9576 (exynosm1_prefetch_tune): Likewise.
9577 (thunderxt88_prefetch_tune): Likewise.
9578 (thunderx_prefetch_tune): Likewise.
9579 (thunderx2t99_prefetch_tune): Likewise.
9580 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9581 (aarch64_override_options_internal): Update to set
9582 PARAM_PREFETCH_MINIMUM_STRIDE.
9583 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9584 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9585 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9586 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9587 stride is constant and is below the minimum stride threshold.
9588
9589 2018-05-07 Luis Machado <luis.machado@linaro.org>
9590
9591 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
9592 to 512.
9593
9594 2018-05-07 Luis Machado <luis.machado@linaro.org>
9595
9596 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9597 <prefetch_dynamic_strides>: New const bool field.
9598 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9599 prefetch_dynamic_strides.
9600 (exynosm1_prefetch_tune): Likewise.
9601 (thunderxt88_prefetch_tune): Likewise.
9602 (thunderx_prefetch_tune): Likewise.
9603 (thunderx2t99_prefetch_tune): Likewise.
9604 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
9605 to false.
9606 (aarch64_override_options_internal): Update to set
9607 PARAM_PREFETCH_DYNAMIC_STRIDES.
9608 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9609 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9610 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9611 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9612 prefetch-dynamic-strides setting.
9613
9614 2018-05-07 Luis Machado <luis.machado@linaro.org>
9615
9616 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9617 <minimum_stride>: New const int field.
9618 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9619 minimum_stride field.
9620 (exynosm1_prefetch_tune): Likewise.
9621 (thunderxt88_prefetch_tune): Likewise.
9622 (thunderx_prefetch_tune): Likewise.
9623 (thunderx2t99_prefetch_tune): Likewise.
9624 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
9625 (aarch64_override_options_internal): Update to set
9626 PARAM_PREFETCH_MINIMUM_STRIDE.
9627 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9628 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9629 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9630 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9631 stride is constant and is below the minimum stride threshold.
9632
9633 2018-05-06 Jakub Jelinek <jakub@redhat.com>
9634
9635 PR c++/85659
9636 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
9637 the type is addressable. Don't force op into register if it has
9638 BLKmode.
9639
9640 2018-05-05 Roland McGrath <mcgrathr@google.com>
9641
9642 PR other/77609
9643 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
9644 any section for which we don't know a specific type it should have,
9645 regardless of name. Previously this was done only for the exact
9646 names ".init_array", ".fini_array", and ".preinit_array".
9647 (default_elf_asm_named_section): Add comment about
9648 relationship with default_section_type_flags and SECTION_NOTYPE.
9649 (get_section): Don't consider it a type conflict if one side has
9650 SECTION_NOTYPE and the other doesn't, as long as neither has the
9651 SECTION_BSS et al used in the default_section_type_flags logic.
9652
9653 2018-05-05 Tom de Vries <tom@codesourcery.com>
9654
9655 PR target/85653
9656 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
9657 (workaround_barsyncs): New function.
9658 (nvptx_reorg): Use workaround_barsyncs.
9659 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
9660 (define_expand "nvptx_membar_cta"): New define_expand.
9661 (define_insn "*nvptx_membar_cta"): New insn.
9662
9663 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
9664
9665 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
9666 To improve optimization opportunities.
9667 * builtin-types.def: The new needed builtin types for the above.
9668
9669 2018-05-04 Richard Biener <rguenther@suse.de>
9670
9671 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
9672 * gimple-ssa-store-merging.c
9673 (imm_store_chain_info::output_merged_store): Remove redundant create,
9674 release split_store vector contents on failure.
9675 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
9676 scalar stmt vector on cache hit.
9677
9678 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
9679
9680 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
9681 Xilinx FP support.
9682 * config.gcc (powerpc-xilinx-eabi*): Remove.
9683 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
9684 support.
9685 (fusion_addis_mem_combo_load): Ditto.
9686 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
9687 FP support.
9688 (rs6000_cpu_cpp_builtins): Ditto.
9689 * config/rs6000/rs6000-linux.c
9690 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
9691 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
9692 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
9693 support.
9694 (rs6000_setup_reg_addr_masks): Ditto.
9695 (rs6000_init_hard_regno_mode_ok): Ditto.
9696 (rs6000_option_override_internal): Ditto.
9697 (legitimate_lo_sum_address_p): Ditto.
9698 (rs6000_legitimize_address): Ditto.
9699 (rs6000_legitimize_reload_address): Ditto.
9700 (rs6000_legitimate_address_p): Ditto.
9701 (abi_v4_pass_in_fpr): Ditto.
9702 (setup_incoming_varargs): Ditto.
9703 (rs6000_gimplify_va_arg): Ditto.
9704 (rs6000_split_multireg_move): Ditto.
9705 (rs6000_savres_strategy): Ditto.
9706 (rs6000_emit_prologue_components): Ditto.
9707 (rs6000_emit_epilogue_components): Ditto.
9708 (rs6000_emit_prologue): Ditto.
9709 (rs6000_emit_epilogue): Ditto.
9710 (rs6000_elf_file_end): Ditto.
9711 (rs6000_function_value): Ditto.
9712 (rs6000_libcall_value): Ditto.
9713 * config/rs6000/rs6000.h: Ditto.
9714 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
9715 (TARGET_MINMAX): ... this. New.
9716 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
9717 * config/rs6000/rs6000.md: Remove Xilinx FP support.
9718 (*movsi_internal1_single): Delete.
9719 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
9720 mfpu=, mxilinx-fpu): Delete.
9721 * config/rs6000/singlefp.h: Delete.
9722 * config/rs6000/sysv4.h: Remove Xilinx FP support.
9723 * config/rs6000/t-rs6000: Ditto.
9724 * config/rs6000/t-xilinx: Delete.
9725 * config/rs6000/titan.md: Adjust for fp_type removal.
9726 * config/rs6000/vsx.md: Remove Xilinx FP support.
9727 (VStype_simple): Delete.
9728 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
9729 * config/rs6000/xfpu.h: Delete.
9730 * config/rs6000/xfpu.md: Delete.
9731 * config/rs6000/xilinx.h: Delete.
9732 * config/rs6000/xilinx.opt: Delete.
9733 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
9734 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
9735
9736 2018-05-04 Tom de Vries <tom@codesourcery.com>
9737
9738 PR libgomp/85639
9739 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
9740 if ignore == 0.
9741
9742 2018-05-04 Richard Biener <rguenther@suse.de>
9743
9744 PR middle-end/85627
9745 * tree-complex.c (update_complex_assignment): We are always in SSA form.
9746 (expand_complex_div_wide): Likewise.
9747 (expand_complex_operations_1): Likewise.
9748 (expand_complex_libcall): Preserve EH info of the original stmt.
9749 (tree_lower_complex): Handle removed blocks.
9750 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
9751 on complex multiplication and division libcall builtins.
9752
9753 2018-05-04 Richard Biener <rguenther@suse.de>
9754
9755 PR middle-end/85574
9756 * fold-const.c (negate_expr_p): Restrict negation of operand
9757 zero of a division to when we know that can happen without
9758 overflow.
9759 (fold_negate_expr_1): Likewise.
9760
9761 2018-05-04 Jakub Jelinek <jakub@redhat.com>
9762
9763 PR libstdc++/85466
9764 * real.h (real_nextafter): Declare.
9765 * real.c (real_nextafter): New function.
9766 * fold-const-call.c (fold_const_nextafter): New function.
9767 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
9768 CASE_CFN_NEXTTOWARD.
9769 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
9770 even when arg1_mode is different from arg0_mode.
9771
9772 2018-05-03 Nathan Sidwell <nathan@acm.org>
9773
9774 * doc/extend.texi (Deprecated Features): Remove
9775 -ffriend-injection.
9776 (Backwards Compatibility): Likewise.
9777 * doc/invoke.texi (C++ Language Options): Likewise.
9778 (C++ Dialect Options): Likewise.
9779
9780 2018-05-03 Jakub Jelinek <jakub@redhat.com>
9781
9782 PR target/85530
9783 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
9784 _mm512_mask_mullox_epi64): New intrinsics.
9785
9786 2018-05-03 Tom de Vries <tom@codesourcery.com>
9787
9788 PR testsuite/85106
9789 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9790 dump files): Add offload-tree.
9791
9792 2018-05-03 Richard Biener <rguenther@suse.de>
9793
9794 PR tree-optimization/85615
9795 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
9796 to loops not nested in BBs loop father to avoid creating multi-entry
9797 loops.
9798
9799 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9800
9801 PR tree-optimization/70291
9802 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
9803 arguments. Change return type to tree. Emit libcall as a new
9804 statement rather than replacing existing one when inplace_p is true.
9805 (expand_complex_multiplication_components): New function.
9806 (expand_complex_multiplication): Expand floating-point complex
9807 multiplication using the above.
9808 (expand_complex_division): Rename inner_type parameter to type.
9809 Update expand_complex_libcall call-site.
9810 (expand_complex_operations_1): Update expand_complex_multiplication
9811 and expand_complex_division call-sites.
9812
9813 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9814
9815 PR target/85582
9816 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9817 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9818 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
9819 the highest significant bit of the shift count mask is clear. In
9820 check whether and[sq]i3 is needed verify that all significant bits
9821 of the shift count other than the highest are set.
9822
9823 2018-05-02 Tom de Vries <tom@codesourcery.com>
9824
9825 PR libgomp/82428
9826 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
9827 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
9828 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
9829 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
9830 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
9831 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
9832 __builtin_goacc_parlevel_size.
9833
9834 2018-05-02 Richard Biener <rguenther@suse.de>
9835
9836 PR tree-optimization/85597
9837 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
9838 do not use split vect_get_vec_defs call but call vect_get_slp_defs
9839 directly.
9840
9841 2018-05-02 Tom de Vries <tom@codesourcery.com>
9842
9843 PR testsuite/85106
9844 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9845 dump files): Add ltrans-tree.
9846
9847 2018-05-02 Tom de Vries <tom@codesourcery.com>
9848
9849 PR testsuite/85106
9850 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
9851 dump files): Add wpa-ipa.
9852
9853 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
9854
9855 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
9856 powerpc*-*-linux*paired* target.
9857 * config/rs6000/750cl.h: Delete.
9858 * config/rs6000/paired.h: Delete.
9859 * config/rs6000/paired.md: Delete.
9860 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
9861 float support.
9862 * config/rs6000/rs6000-builtin.def: Remove paired float support.
9863 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
9864 comment. Remove paired float support.
9865 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
9866 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9867 VECTOR_PAIRED.
9868 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
9869 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
9870 declarations.
9871 * config/rs6000/rs6000.c: Remove paired float support.
9872 (paired_expand_vector_init, paired_expand_vector_move,
9873 paired_emit_vector_compare, paired_emit_vector_cond_expr,
9874 (paired_expand_lv_builtin, paired_expand_stv_builtin,
9875 paired_expand_builtin, paired_expand_predicate_builtin,
9876 paired_init_builtins): Delete.
9877 * config/rs6000/rs6000.h: Remove paired float support.
9878 * config/rs6000/rs6000.md: Remove paired float support.
9879 (move_from_CR_ov_bit): Delete.
9880 * config/rs6000/rs6000.opt (mpaired): Delete.
9881 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
9882 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
9883
9884 2018-05-02 Richard Biener <rguenther@suse.de>
9885
9886 PR middle-end/85567
9887 * gimplify.c (gimplify_save_expr): When in SSA form allow
9888 SAVE_EXPRs to compute to SSA vars.
9889
9890 2018-05-02 Jakub Jelinek <jakub@redhat.com>
9891
9892 PR target/85582
9893 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
9894 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
9895 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
9896 clobber operands[2], instead use a new pseudo. Formatting fixes.
9897
9898 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
9899
9900 PR tree-optimization/85586
9901 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
9902 exit early for statements in the same group if the accesses are
9903 not strided.
9904
9905 2018-05-02 Tom de Vries <tom@codesourcery.com>
9906
9907 PR lto/85451
9908 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
9909 error message.
9910
9911 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
9912
9913 PR tree-optimization/85143
9914 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
9915
9916 2018-05-01 Tom de Vries <tom@codesourcery.com>
9917
9918 PR lto/85451
9919 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
9920 not found" error message.
9921
9922 2018-05-01 Tom de Vries <tom@codesourcery.com>
9923
9924 PR other/83786
9925 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
9926 * vec.c (test_ordered_remove_if): New function.
9927 (vec_c_tests): Call test_ordered_remove_if.
9928 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
9929 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
9930 * tree-vect-patterns.c (vect_pattern_recog_1): Use
9931 VEC_ORDERED_REMOVE_IF.
9932
9933 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9934
9935 PR tree-optimization/82665
9936 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
9937 pointer subtraction where arguments come from a memchr call.
9938
9939 2018-05-01 Jakub Jelinek <jakub@redhat.com>
9940
9941 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
9942 --push-state --as-needed and --pop-state instead of --as-needed and
9943 --no-as-needed if ld supports it.
9944 * configure: Regenerated.
9945
9946 PR web/85578
9947 * doc/install.texi2html: Replace _002d with - and _002a with * in
9948 generated html files using sed.
9949
9950 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9951
9952 PR c++/85523
9953 * gcc-rich-location.c (blank_line_before_p): New function.
9954 (use_new_line): New function.
9955 (gcc_rich_location::add_fixit_insert_formatted): New function.
9956 * gcc-rich-location.h
9957 (gcc_rich_location::add_fixit_insert_formatted): New function.
9958
9959 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9960
9961 * selftest.c (assert_streq): Rename "expected" and "actual" to
9962 "val1" and "val2". Extend NULL-handling to cover both inputs
9963 symmetrically, while still requiring both to be non-NULL for a pass.
9964 * selftest.h (assert_streq): Rename "expected" and "actual" to
9965 "val1" and "val2".
9966 (ASSERT_EQ): Likewise.
9967 (ASSERT_EQ_AT): Likewise.
9968 (ASSERT_KNOWN_EQ): Likewise.
9969 (ASSERT_KNOWN_EQ_AT): Likewise.
9970 (ASSERT_NE): Likewise.
9971 (ASSERT_MAYBE_NE): Likewise.
9972 (ASSERT_MAYBE_NE_AT): Likewise.
9973 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
9974 the assertion to pass.
9975 (ASSERT_STREQ_AT): Likewise.
9976
9977 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
9978
9979 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
9980 interaction with -pie.
9981
9982 2018-04-30 David Malcolm <dmalcolm@redhat.com>
9983
9984 * selftest.h: Fix alphabetization of per-source-file selftest
9985 declarations.
9986
9987 2018-04-30 Jason Merrill <jason@redhat.com>
9988
9989 PR c++/61982 - dead stores to destroyed objects.
9990 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
9991 of clobber.
9992
9993 2018-04-30 Jason Merrill <jason@redhat.com>
9994
9995 * tree.c (build_clobber): New.
9996 * tree.h: Declare it.
9997 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
9998
9999 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10000
10001 * diagnostic-show-locus.c (layout::layout): Update for
10002 location_get_source_line returning a char_span.
10003 (struct char_span): Move to input.h.
10004 (struct correction): Update for fields in char_span becoming
10005 private.
10006 (struct source_line): Update for location_get_source_line
10007 returning a char_span.
10008 (layout::print_line): Likewise.
10009 * edit-context.c (edited_file::print_content): Likewise.
10010 (edited_file::print_diff_hunk): Likewise.
10011 (edited_file::print_run_of_changed_lines): Likewise.
10012 (edited_file::get_num_lines): Likewise.
10013 (edited_line::edited_line): Likewise.
10014 * final.c (asm_show_source): Likewise.
10015 * input.c (location_get_source_line): Convert return type
10016 from const char * to char_span, losing the final "line_len"
10017 param.
10018 (dump_location_info): Update for the above.
10019 (get_substring_ranges_for_loc): Likewise. Use a char_span
10020 when handling the literal within the line.
10021 (test_reading_source_line): Update for location_get_source_line
10022 returning a char_span.
10023 * input.h (class char_span): Move here from
10024 diagnostic-show-locus.c, converting from a struct to a class.
10025 Make data members private.
10026 (char_span::operator bool): New.
10027 (char_span::length): New.
10028 (char_span::get_buffer): New.
10029 (char_span::operator[]): New.
10030 (char_span::subspan): Make const.
10031 (char_span::xstrdup): New.
10032 (location_get_source_line): Convert return type from const char *
10033 to char_span, losing the final "line_size" param.
10034
10035 2018-04-30 Jan Hubicka <jh@suse.cz>
10036
10037 * lto-wrapper.c (ltrans_priorities): New static var.
10038 (cmp_priority): New.
10039 (run_gcc): Read priorities and if doing parallel build order
10040 the Makefile by them.
10041
10042 2018-04-30 David Malcolm <dmalcolm@redhat.com>
10043
10044 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
10045
10046 2018-04-30 Richard Biener <rguenther@suse.de>
10047
10048 * tree-cfg.c (verify_address): Remove base argument, add
10049 flag whether to check TREE_ADDRESSABLE and do that.
10050 (verify_expr): Remove.
10051 (verify_types_in_gimple_reference): Add pieces from verify_expr.
10052 (verify_gimple_assign_single): Likewise.
10053 (verify_gimple_switch): Likewise.
10054 (verify_expr_location_1): Dereference tp once. Add (disabled)
10055 piece from verify_expr.
10056 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
10057
10058 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10059
10060 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
10061
10062 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10063
10064 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
10065 (small_data_pattern): Likewise.
10066 (arc_rewrite_small_data): Likewise.
10067 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
10068 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
10069 (get_symbol_alignment): New function.
10070 (legitimate_small_data_address_p): Likewise.
10071 (legitimate_scaled_address): Update, call
10072 legitimate_small_data_address_p.
10073 (output_sdata): New static variable.
10074 (arc_print_operand): Update how we handle small data operands.
10075 (arc_print_operand_address): Likewise.
10076 (arc_legitimate_address_p): Update, use
10077 legitimate_small_data_address_p.
10078 (arc_rewrite_small_data_p): Remove.
10079 (arc_rewrite_small_data_1): Likewise.
10080 (arc_rewrite_small_data): Likewise.
10081 (small_data_pattern): Likewise.
10082 (compact_sda_memory_operand): Update to use
10083 legitimate_small_data_address_p and get_symbol_alignment.
10084 (prepare_move_operands): Don't rewite sdata pattern.
10085 (prepare_extend_operands): Remove.
10086 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
10087 pattern.
10088 (zero_extendqisi2): Likewise.
10089 (zero_extendhisi2): Likewise.
10090 (extendqihi2): Likewise.
10091 (extendqisi2): Likewise.
10092 (extendhisi2): Likewise.
10093 (addsi3): Likewise.
10094 (subsi3): Likewise.
10095 (andsi3): Likewise.
10096 * config/arc/constraints.md (Usd): Change it to memory constraint.
10097
10098 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
10099
10100 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
10101 as source of std instructions.
10102 * config/arc/arc.md (movsi_insn): Update pattern predicate to
10103 allow 6-bit constants as source for store instructions.
10104 (movdi_insn): Update instruction pattern to allow 6-bit constants
10105 as source for store instructions.
10106
10107 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
10108
10109 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
10110
10111 2018-04-30 Nathan Sidwell <nathan@acm.org>
10112 Sandra Loosemore <sandra@codesourcery.com>
10113
10114 * dumpfile.c (dump_open): Allow '-' for stdout.
10115 * doc/invoke.texi (Developer Options): Document dump filename
10116 determination early. Document stdin/stdout selection.
10117
10118 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
10119
10120 Microblaze Target: PIC data text relative
10121
10122 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
10123 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
10124 Add declaration.
10125 * config/microblaze/microblaze.h (microblaze_constant_address_p):
10126 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
10127 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
10128 New addressing mode for data-text relative position indepenedent code.
10129 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
10130 'ADDRESS_SYMBOLIC_TXT_REL'.
10131 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
10132 (microblaze_legitimate_pic_operand): Exclude function calls from
10133 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
10134 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
10135 addresses cases.
10136 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10137 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
10138 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
10139 for 'address + offset'.
10140 (microblaze_expand_prologue): Add new function prologue call for
10141 'r20' assignation.
10142 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
10143 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
10144 table in case of TARGET_PIC_DATA_TEXT_REL.
10145 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
10146 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
10147 Add new macros 'UNSPEC_TEXT',
10148 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
10149 + exclude function calls from 'UNSPEC_PLT' in case of data text
10150 relative mode.
10151 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10152 new target hook for generating address diff vector tables in case of
10153 flag_pic.
10154 * doc/tm.texi : Regenerate.
10155 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
10156 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
10157 of addr diff vector generation.
10158 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
10159 target hook definition.
10160 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
10161 Add default function for generate_pic_addr_diff_vec -> flag_pic.
10162 * doc/invoke.texi (Add new pic option): Add new microblaze pic
10163 option for data text relative.
10164
10165 2018-04-30 Richard Biener <rguenther@suse.de>
10166
10167 * tree-chrec.h (evolution_function_is_constant_p): Remove
10168 redundant check.
10169 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
10170
10171 2018-04-30 Richard Biener <rguenther@suse.de>
10172
10173 PR bootstrap/85571
10174 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
10175
10176 2018-04-30 Richard Biener <rguenther@suse.de>
10177
10178 PR tree-optimization/28364
10179 PR tree-optimization/85275
10180 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
10181 copying first exit test.
10182
10183 2018-04-28 Mark Wielaard <mark@klomp.org>
10184
10185 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
10186 dwarf_version >= 5.
10187 (dwarf_AT): Handle DW_AT_addr_base.
10188 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
10189
10190 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
10191
10192 PR target/84431
10193 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
10194 (*ashl<dwi>3_doubleword_mask_1): Ditto.
10195 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
10196 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
10197
10198 2018-04-28 Richard Biener <rguenther@suse.de>
10199
10200 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
10201 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
10202 to reflect use. Only add interesting stmts.
10203
10204 2018-04-27 Martin Jambor <mjambor@suse.cz>
10205
10206 PR ipa/85549
10207 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
10208 the jump function allows for passing through aggregate values.
10209
10210 2018-04-27 David Malcolm <dmalcolm@redhat.com>
10211
10212 * input.h (in_system_header_at): Convert from macro to inline
10213 function.
10214 (from_macro_expansion_at): Likewise.
10215 (from_macro_definition_at): Likewise.
10216
10217 2018-04-27 Jeff Law <law@redhat.com>
10218
10219 * config.gcc: Mark tile* targets as deprecated/obsolete.
10220
10221 2018-04-27 Richard Biener <rguenther@suse.de>
10222
10223 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
10224 fix for ILP32.
10225
10226 2018-04-27 Richard Biener <rguenther@suse.de>
10227
10228 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
10229
10230 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
10231
10232 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
10233 with Yd constraint. Set "preferred_for_speed" attribute from
10234 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
10235 with Yd constraint.
10236 (*movdi_internal): Ditto.
10237 (movti_interunit splitters): Remove
10238 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
10239 (movdi_interunit splitters): Ditto.
10240 * config/i386/constraints.md (Ye): Remove.
10241 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
10242
10243 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10244
10245 PR target/85512
10246 * config/aarch64/constraints.md (Usg): Limit to 31.
10247 (Usj): Limit to 63.
10248
10249 2018-04-27 Jakub Jelinek <jakub@redhat.com>
10250
10251 PR tree-optimization/85529
10252 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
10253 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
10254 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
10255 zero extension or masking of the MSB bit.
10256 (optimize_range_tests): Add FIRST_BB argument, pass it through
10257 to optimize_range_tests_var_bound.
10258 (maybe_optimize_range_tests, reassociate_bb): Adjust
10259 optimize_range_tests callers.
10260
10261 2018-04-26 Richard Biener <rguenther@suse.de>
10262 Jakub Jelinek <jakub@redhat.com>
10263
10264 * cgraph.h (symbol_table): Just declare debug method here.
10265 * symtab.c (symbol_table::debug): Define.
10266
10267 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
10268
10269 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
10270
10271 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
10272
10273 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
10274 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
10275 (*movdi_internal): Substitute Yi and Yj constraint with x
10276 and Ym and Yn constraint with y constraint. Update "isa"
10277 attribute and set "preferred_for_speed" attribute from
10278 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
10279 (*movsi_internal): Ditto.
10280 (*movdf_internal): Ditto.
10281 (*movsf_internal): Ditto.
10282 (*zero_extendsidi2): Ditto.
10283 * config/i386/sse.md (vec_set<mode>_0): Ditto.
10284 (sse2_loadld): Ditto.
10285 (*vec_extract<ssevecmodelower>_0): Ditto.
10286 (*vec_extractv4si_0_zext_sse4): Ditto.
10287 (vec_concatv2di): Ditto.
10288 (*vec_dup<mode>): Ditto.
10289 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
10290 * config/i386/constraints.md (Yi): Remove.
10291 (Yj): Remove.
10292 (Ym): Remove.
10293 (Yn): Remove.
10294
10295 2018-04-26 Nathan Sidwell <nathan@acm.org>
10296
10297 * dumpfile.c (dump_open): New.
10298 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
10299 (dump_finish): Detect stdio/stderr by value not name.
10300
10301 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
10302
10303 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
10304
10305 2018-04-26 Tom de Vries <tom@codesourcery.com>
10306
10307 PR target/84952
10308 * config/nvptx/nvptx.c (verify_neutering_jumps)
10309 (verify_neutering_labels): New function
10310 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
10311
10312 2018-04-26 Tom de Vries <tom@codesourcery.com>
10313
10314 PR target/84025
10315 * config/nvptx/nvptx.c (needs_neutering_p): New function.
10316 (nvptx_single): Use needs_neutering_p to skip over insns that do not
10317 need neutering.
10318
10319 2018-04-26 Richard Biener <rguenther@suse.de>
10320 Tom de Vries <tom@codesourcery.com>
10321
10322 PR lto/85422
10323 * lto-streamer-out.c (output_function): Fixup loops if required to match
10324 discovery done in the reader.
10325
10326 2018-04-26 Richard Biener <rguenther@suse.de>
10327
10328 PR tree-optimization/85116
10329 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
10330 have a loop exit from the single latch predecessor. Remove
10331 case of header with just condition.
10332 (ch_base::copy_headers): Exclude infinite loops from any
10333 processing.
10334 (pass_ch::execute): Record exits.
10335
10336 2018-04-26 Richard Biener <rguenther@suse.de>
10337
10338 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
10339 prologue cost vector and pass it to vect_get_load_cost.
10340 (vect_get_peeling_costs_all_drs): Likewise.
10341 (vect_peeling_hash_get_lowest_cost): Likewise.
10342 (vect_enhance_data_refs_alignment): Likewise.
10343
10344 2018-04-26 Richard Biener <rguenther@suse.de>
10345
10346 PR middle-end/85450
10347 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
10348 checking of integer<->pointer conversions.
10349 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
10350 sign-/zero-extending pointer types.
10351 (expand_omp_for_static_chunk): Likewise.
10352
10353 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
10354 Jean Lee <xiaoyur347@gmail.com>
10355
10356 * config/mips/mips.c (mips_asan_shadow_offset): New function.
10357 (TARGET_ASAN_SHADOW_OFFSET): Define.
10358 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
10359 true for -fsanitize=address.
10360
10361 2018-04-25 Mark Wielaard <mark@klomp.org>
10362
10363 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
10364 shorter ones.
10365
10366 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10367
10368 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
10369 than "alu", remove explicit "memory" and "imm_disp" attributes.
10370 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
10371
10372 PR middle-end/85414
10373 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
10374 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
10375 gen_lowpart_no_emit.
10376
10377 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
10378
10379 PR target/85473
10380 * config/i386/i386.c (ix86_expand_builtin): Change memory
10381 operand to XI, extend p0 to Pmode.
10382 * config/i386/i386.md: Change unspec volatile and operand
10383 1 mode to XI, change operand 0 mode to P.
10384
10385 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10386
10387 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
10388 GET_MODE_MASK before any checking.
10389 (nds32_can_use_bset_p): Likewise.
10390 (nds32_can_use_btgl_p): Likewise.
10391
10392 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10393
10394 * config/nds32/nds32-doubleword.md: New define_split pattern for
10395 illegal register number.
10396
10397 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10398
10399 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
10400
10401 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
10402
10403 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
10404
10405 2018-04-25 Richard Biener <rguenther@suse.de>
10406
10407 * lto-streamer.h (LTO_major_version): Bump to 8.
10408
10409 2018-04-25 Jakub Jelinek <jakub@redhat.com>
10410
10411 * BASE-VER: Set to 9.0.0.
10412
10413 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
10414
10415 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
10416 in __abskf2 and __powikf2.
10417
10418 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10419
10420 PR target/85512
10421 * config/aarch64/constraints.md (Usg, Usj): New constraints.
10422 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
10423 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
10424 Use the above on operand 2. Reindent.
10425 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
10426
10427 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10428
10429 PR target/85485
10430 * common/config/i386/i386-common.c (ix86_handle_option): Don't
10431 handle OPT_mcet.
10432 * config/i386/i386.opt (mcet): Removed.
10433 * doc/install.texi: Remove -mcet documentation.
10434 * doc/invoke.texi: Likewise.
10435
10436 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
10437
10438 PR target/85485
10439 * doc/install.texi: Remove -mcet from bootstrap-cet.
10440
10441 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10442
10443 PR target/85511
10444 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
10445 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
10446 if TARGET_64BIT.
10447
10448 PR target/85503
10449 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
10450 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
10451 containing a CONST_VECTOR.
10452
10453 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
10454
10455 * doc/install.texi: Update newlib dependency for nvptx.
10456
10457 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10458
10459 PR target/85508
10460 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
10461 instead of INTVAL when shifting x left.
10462
10463 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
10464
10465 PR tree-optimization/85478
10466 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
10467 vect_grouped_store_supported for single element vectors.
10468
10469 2018-04-24 Richard Biener <rguenther@suse.de>
10470
10471 PR target/85491
10472 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
10473 load cost increase to the case of non-constant step.
10474
10475 2018-04-24 Jakub Jelinek <jakub@redhat.com>
10476
10477 PR target/84828
10478 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
10479 destination if any_malformed_asm.
10480
10481 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
10482
10483 PR middle-end/85496
10484 * expr.c (store_field): In the bitfield case, if the value comes from
10485 a function call and is returned in registers by means of a PARALLEL,
10486 do not change the mode of the temporary unless BLKmode and VOIDmode.
10487
10488 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
10489
10490 PR rtl-optimization/85423
10491 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
10492 dependencies to debug insns when the previous insn is non-debug.
10493
10494 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10495
10496 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
10497 enums into a single definition.
10498 (fls): Fix predicates and printing.
10499 (seti): Likewise.
10500
10501 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
10502
10503 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
10504 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
10505 and short u6 immediate.
10506 (check_if_valid_sleep_operand): Remove.
10507 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
10508
10509 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10510
10511 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
10512 flag_always_save_lp condition.
10513 * config/nds32/nds32.opt (malways-save-lp): New option.
10514
10515 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10516
10517 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
10518 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
10519 * config/nds32/nds32.h
10520 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
10521 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
10522
10523 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10524
10525 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
10526 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
10527
10528 2018-04-22 Shiva Chen <shiva0217@gmail.com>
10529 Chung-Ju Wu <jasonwucj@gmail.com>
10530
10531 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
10532 Declare.
10533 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
10534 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
10535
10536 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10537
10538 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
10539
10540 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10541
10542 * config/nds32/nds32-protos.h (nds32_data_alignment,
10543 nds32_local_alignment): Declare.
10544 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
10545 nds32_local_alignment): New functions.
10546 (TARGET_CONSTANT_ALIGNMENT): Define.
10547 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
10548
10549 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10550
10551 * config/nds32/nds32.c
10552 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
10553 (TARGET_MODES_TIEABLE_P): Likewise.
10554
10555 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
10556
10557 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
10558 level Ofast and Og.
10559
10560 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
10561 Chung-Ju Wu <jasonwucj@gmail.com>
10562
10563 * config/nds32/constants.md (unspec_volatile_element): Add enum values
10564 for unaligned access.
10565 * config/nds32/nds32-intrinsic.c: Implementation of expanding
10566 unaligned access.
10567 * config/nds32/nds32-intrinsic.md: Likewise.
10568 * config/nds32/nds32_intrinsic.h: Likewise.
10569 * config/nds32/nds32.h (nds32_builtins): Likewise.
10570 * config/nds32/nds32.opt (munaligned-access): New option.
10571 * config/nds32/nds32.c (nds32_asm_file_start): Display
10572 flag_unaligned_access status.
10573
10574 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10575
10576 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
10577 -mno-relax is present.
10578 * config/riscv/linux.h (LINK_SPEC): Ditto.
10579
10580 2018-04-20 Martin Sebor <msebor@redhat.com>
10581
10582 PR c/85365
10583 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
10584 for null pointers.
10585 (gimple_fold_builtin_stxcpy_chk): Same.
10586 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
10587
10588 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
10589
10590 PR target/85456
10591 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
10592 __powikf2 when long double is IEEE 128-bit.
10593
10594 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
10595
10596 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
10597 step to make sure stack always aligned.
10598
10599 2018-04-20 Carl Love <cel@us.ibm.com>
10600
10601 PR target/83402
10602 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
10603 size check for arg0.
10604
10605 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
10606 Tom de Vries <tom@codesourcery.com>
10607
10608 PR target/85445
10609 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
10610 Emit insns for calls too.
10611 (nvptx_find_par): Always look for worker-level predecessor insn.
10612 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
10613 calls.
10614 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
10615 (nvptx_process_pars): Propagate frames for calls.
10616
10617 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
10618
10619 PR target/85469
10620 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
10621 Removed.
10622 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10623 (ix86_handle_option): Don't handle OPT_mibt.
10624 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
10625 __SHSTK__.
10626 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
10627 has_ibt and ibt.
10628 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
10629 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
10630 (ix86_target_macros): Define __CET__ with flag_cf_protection
10631 for -fcf-protection.
10632 * config/i386/i386.c (isa2_opts): Remove -mibt.
10633 * config/i386/i386.h (TARGET_IBT): Removed.
10634 (TARGET_IBT_P): Likewise.
10635 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
10636 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
10637 * config/i386/i386.opt (mcet): Update help message.
10638 (mshstk): Likewise.
10639 (mibt): Removed.
10640 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
10641 -mcet as an alias for -mshstk.
10642
10643 2018-04-20 Richard Biener <rguenther@suse.de>
10644
10645 PR middle-end/85475
10646 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
10647 complexity by forcing a single use of the multiply operand.
10648
10649 2018-04-20 Martin Jambor <mjambor@suse.cz>
10650
10651 ipa/85449
10652 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
10653 recursion dependency to only apply to non-clones.
10654
10655 2018-04-20 Martin Jambor <mjambor@suse.cz>
10656
10657 ipa/85447
10658 * ipa-cp.c (create_specialized_node): Check that clones of
10659 self-recursive edges exist during IPA-CP.
10660
10661 2018-04-19 Toon Moene <toon@moene.org>
10662
10663 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
10664 by -O3.
10665
10666 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10667
10668 PR tree-optimization/85467
10669 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
10670 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
10671 VECTOR_CST element to type.
10672
10673 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10674
10675 PR target/85397
10676 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
10677 * config/i386/i386.md (builtin_setjmp_setup): Removed.
10678 (builtin_longjmp): Likewise.
10679 (save_stack_nonlocal): New pattern.
10680 (restore_stack_nonlocal): Likewise.
10681
10682 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10683
10684 PR target/85404
10685 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10686 Replace ASM_OUTPUT_LABEL with fprintf.
10687
10688 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
10689
10690 PR target/85417
10691 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
10692 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
10693 * config/i386/i386-c.c (ix86_target_macros_internal): Also
10694 define __IBT__ and __SHSTK__ for -fcf-protection.
10695 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
10696 TARGET_IBT.
10697 (ix86_trampoline_init): Likewise.
10698 (x86_output_mi_thunk): Likewise.
10699 (ix86_notrack_prefixed_insn_p): Likewise.
10700 (ix86_option_override_internal): Don't disallow -fcf-protection.
10701 * config/i386/i386.md (rdssp<mode>): Also enable for
10702 -fcf-protection.
10703 (incssp<mode>): Likewise.
10704 (nop_endbr): Likewise.
10705 * config/i386/i386.opt (mcet): Change help message to built-in
10706 functions only.
10707 (mibt): Likewise.
10708 (mshstk): Likewise.
10709 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
10710 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
10711 enable CET built-in functions.
10712
10713 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
10714
10715 * common/config/i386/i386-common.c
10716 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
10717 OPTION_MASK_ISA_MOVDIRI_UNSET,
10718 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
10719 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
10720 * config.gcc (movdirintrin.h): New header.
10721 * config/i386/cpuid.h (bit_MOVDIRI,
10722 bit_MOVDIR64B): New bits.
10723 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
10724 and -mmvodir64b.
10725 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
10726 (VOID, PVOID, PCVOID)): New function types.
10727 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
10728 __builtin_ia32_directstoreu_u64,
10729 __builtin_ia32_movdir64b): New builtins.
10730 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
10731 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
10732 and -mmovdiri.
10733 (ix86_valid_target_attribute_inner_p): Ditto.
10734 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
10735 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
10736 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
10737 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
10738 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
10739 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
10740 (movdiri<mode>, movdir64b_<mode>): New.
10741 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
10742 * config/i386/immintrin.h: Include movdirintrin.h.
10743 * config/i386/movdirintrin.h: New file.
10744 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
10745
10746 2018-04-19 Richard Biener <rguenther@suse.de>
10747
10748 PR middle-end/85455
10749 * cfg.c (clear_bb_flags): When loop state says we have
10750 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
10751
10752 2018-04-19 Richard Biener <rguenther@suse.de>
10753
10754 PR tree-optimization/84737
10755 * tree-vect-data-refs.c (vect_copy_ref_info): New function
10756 copying restrict info.
10757 (vect_setup_realignment): Use it.
10758 * tree-vectorizer.h (vect_copy_ref_info): Declare.
10759 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
10760 the first DR to all generated stores.
10761 (vectorizable_load): Likewise for loads.
10762
10763 2018-04-19 Jakub Jelinek <jakub@redhat.com>
10764
10765 PR tree-optimization/85446
10766 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
10767 the integral and pointer types to have the same precision.
10768
10769 * doc/install.texi: Document --disable-cet being the default and
10770 --enable-cet=auto.
10771
10772 2018-04-18 Martin Liska <mliska@suse.cz>
10773
10774 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
10775 style.
10776
10777 2018-04-18 Martin Liska <mliska@suse.cz>
10778
10779 Revert
10780 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
10781
10782 PR ipa/83983
10783 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10784 arguments if they are comparable.
10785
10786 2018-04-18 Martin Liska <mliska@suse.cz>
10787
10788 Revert
10789 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10790
10791 PR lto/84805
10792 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10793 incomplete types.
10794
10795 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
10796
10797 PR target/85388
10798 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
10799 ENDBR after calling __morestack.
10800
10801 2018-04-18 David Malcolm <dmalcolm@redhat.com>
10802
10803 PR jit/85384
10804 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
10805 by using gcc_base_ver to generate a gcc_driver_version, and use
10806 it when generating GCC_DRIVER_NAME.
10807 * configure: Regenerate.
10808
10809 2018-04-18 Jakub Jelinek <jakub@redhat.com>
10810
10811 PR target/81084
10812 * config.gcc: Obsolete powerpc*-*-*spe*.
10813
10814 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10815
10816 PR debug/84637
10817 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
10818 (stabstr_D): Change type of unum from unsigned int to
10819 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
10820 type.
10821
10822 2018-04-17 Jim Wilson <jimw@sifive.com>
10823
10824 PR 84856
10825 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
10826 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
10827 Set arg_pointer_offset after using pretend_args_size.
10828
10829 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10830
10831 PR rtl-optimization/85431
10832 * dse.c (record_store): Ignore zero width stores.
10833
10834 PR sanitizer/85230
10835 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
10836 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
10837 __builtin_stack_restore rather than after it.
10838 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
10839 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
10840 argument instead of virtual_dynamic_stack_rtx.
10841
10842 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
10843
10844 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
10845 New prototype.
10846 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10847 Add note to error message to explain internal mapping of overloaded
10848 built-in function name to non-overloaded built-in function name.
10849 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
10850 function.
10851
10852 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10853
10854 PR target/85424
10855 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
10856 where the inputs overlap with the output.
10857
10858 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10859
10860 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
10861 (=v, v) alternative and explicit "memory" attribute.
10862 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
10863 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10864 attributes.
10865 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
10866 "sselog1" type instead of "sselog".
10867 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
10868 "sselog". Remove explicit "memory" attribute.
10869 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
10870 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10871 attributes.
10872 (vec_extract_hi_v32hi): Merge all alternatives into one, use
10873 "sselog1" type instead of "sselog". Remove explicit "memory"
10874 attribute.
10875 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
10876 use "sselog1" type instead of "sselog". Remove explicit "memory"
10877 attribute.
10878 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
10879 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
10880 attributes.
10881 (vec_extract_hi_v64qi): Merge all alternatives into one, use
10882 "sselog1" type instead of "sselog". Remove explicit "memory"
10883 attribute.
10884 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
10885 use "sselog1" type instead of "sselog". Remove explicit "memory"
10886 attribute.
10887
10888 PR target/85430
10889 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
10890
10891 PR middle-end/85414
10892 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
10893 on a SUBREG.
10894
10895 2018-04-17 Martin Jambor <mjambor@suse.cz>
10896
10897 PR ipa/85421
10898 * ipa-cp.c (create_specialized_node): Call
10899 expand_all_artificial_thunks if necessary.
10900
10901 2018-04-17 Martin Liska <mliska@suse.cz>
10902
10903 PR lto/85405
10904 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
10905 in message, remote space in between '_G' and '('.
10906
10907 2018-04-17 Jakub Jelinek <jakub@redhat.com>
10908
10909 PR target/85281
10910 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
10911 avx512f_vmcmp<mode>3<round_saeonly_name>,
10912 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
10913 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
10914 avx512f_rndscale<mode><round_saeonly_name>,
10915 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
10916 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
10917 Use %<iptr>2 instead of %2 for -masm=intel.
10918 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
10919 avx512f_vcvttss2usi<round_saeonly_name>,
10920 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
10921 -masm=intel.
10922 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
10923 avx512f_vcvttsd2usi<round_saeonly_name>,
10924 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
10925 Use %q1 instead of %1 for -masm=intel.
10926 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
10927 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
10928 of %3 for -masm=intel.
10929 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
10930 -masm=intel.
10931 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
10932 -masm=intel.
10933 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
10934 -masm=intel.
10935 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
10936 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
10937 %g1.
10938 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
10939 -masm=intel.
10940 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
10941 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
10942 %g1 and one with %0 and %1.
10943 (avx512er_vmrcp28<mode><round_saeonly_name>,
10944 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
10945 %1 for -masm=intel.
10946 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
10947 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
10948 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
10949 of %0 and %{%4%} for -masm=intel.
10950 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
10951 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
10952 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
10953 order of %0 and %{%5%}%{z%} for -masm=intel.
10954
10955 2018-04-17 Jan Hubicka <jh@suse.cz>
10956
10957 PR lto/85405
10958 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
10959
10960 2018-04-17 Martin Liska <mliska@suse.cz>
10961
10962 PR ipa/85329
10963 * multiple_target.c (create_dispatcher_calls): Set apostrophes
10964 for target_clone error message. Make default implementation
10965 clone to be a local declaration.
10966 (separate_attrs): Add new argument and check for an empty
10967 string.
10968 (expand_target_clones): Handle it.
10969 (ipa_target_clone): Make redirection just for target_clones
10970 functions.
10971
10972 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
10973 Tom de Vries <tom@codesourcery.com>
10974
10975 PR middle-end/84955
10976 * omp-expand.c (expand_oacc_for): Add dummy false branch for
10977 tiled basic blocks without omp continue statements.
10978
10979 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
10980
10981 PR target/83660
10982 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
10983 vec_extract expression as having side effects to make sure it gets
10984 a cleanup point.
10985
10986 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
10987
10988 PR target/85403
10989 * config/i386/i386.c (get_builtin_code_for_version): Check
10990 error_mark_node.
10991
10992 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
10993
10994 PR target/84331
10995 * config.gcc: Support "skylake".
10996 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10997 PROCESSOR_SKYLAKE.
10998 * config/i386/i386.c (m_SKYLAKE): Define.
10999 (processor_target_table): Add "skylake".
11000 (ix86_option_override_internal): Add "skylake".
11001 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
11002 PROCESSOR_CANNONLAKE.
11003 (get_builtin_code_for_version): Fix priority for
11004 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
11005 PROCESSOR_SKYLAKE-AVX512.
11006 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
11007 (processor_type): Add PROCESSOR_SKYLAKE.
11008
11009 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
11010 Jason Merrill <jason@redhat.com>
11011
11012 PR c++/85112
11013 * convert.c (convert_to_integer_1): Use direct recursion for
11014 enumeral types and types with a precision less than the number
11015 of bits in their mode.
11016
11017 2018-04-16 Julia Koval <julia.koval@intel.com>
11018
11019 PR target/84413
11020 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
11021 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
11022
11023 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
11024
11025 PR target/85293
11026 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
11027 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
11028 and -mno-direct-move.
11029
11030 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
11031
11032 PR target/83402
11033 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
11034 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
11035 Ensure negative shifts result in {0}.
11036
11037 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
11038
11039 PR rtl-optimization/79916
11040 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
11041 regs (if any) to define how to gnerate SD moves when LRA is in
11042 progress.
11043
11044 2018-04-13 Jakub Jelinek <jakub@redhat.com>
11045
11046 PR rtl-optimization/85393
11047 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
11048 * except.c (expand_dw2_landing_pad_for_region): Make static.
11049 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
11050 a label and unconditional jump to old_bb, rather than
11051 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
11052 basic block.
11053
11054 PR rtl-optimization/85376
11055 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
11056 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
11057 instead of a specific value.
11058
11059 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11060 Bin Cheng <bin.cheng@arm.com>
11061
11062 PR tree-optimization/82965
11063 PR tree-optimization/83991
11064 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
11065 by_profile_only parameter.
11066 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
11067 information if the loop was predicted to iterate too many times.
11068 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
11069
11070 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
11071
11072 PR lto/71991
11073 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
11074 always inline.
11075
11076 2018-04-13 Martin Liska <mliska@suse.cz>
11077 Jakub Jelinek <jakub@redhat.com>
11078
11079 PR middle-end/81657
11080 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
11081 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
11082 * builtins.c (expand_builtin_memory_copy_args): Use
11083 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
11084 handle dest_addr == pc_rtx.
11085
11086 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
11087
11088 PR target/85291
11089 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
11090 asked to not generate direct moves.
11091 (fix_trunc<mode>si2_stfiwx): Similar.
11092 (fix_trunc<mode>si2_internal): Similar.
11093
11094 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11095
11096 PR debug/83157
11097 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
11098 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
11099 lookup if dest in some wider mode is known to be const0_rtx and
11100 if so, record permanent equivalence for it to be ZERO_EXTEND of
11101 the narrower mode destination.
11102
11103 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11104
11105 * lto-streamer-out.c (output_function): Revert 259346.
11106 * omp-expand.c (expand_oacc_for): Likewise.
11107
11108 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
11109
11110 PR rtl-optimization/85354
11111 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
11112 * sel-sched.c (sel_global_init): ... here.
11113
11114 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
11115
11116 PR target/85238
11117 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
11118 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11119 mode for PE-COFF targets.
11120 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
11121 (i386_pe_asm_lto_end): Likewise.
11122 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
11123 (TARGET_ASM_LTO_END): Likewise.
11124 * config/i386/winnt.c (saved_debug_info_level): New static variable.
11125 (i386_pe_asm_lto_start): New function.
11126 (i386_pe_asm_lto_end): Likewise.
11127
11128 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
11129 Richard Biener <rguenther@suse.de>
11130
11131 PR middle-end/84955
11132 * lto-streamer-out.c (output_function): Fix CFG loop state before
11133 streaming out.
11134 * omp-expand.c (expand_oacc_for): Handle calls to internal
11135 functions like regular functions.
11136
11137 2018-04-12 Richard Biener <rguenther@suse.de>
11138
11139 PR lto/85371
11140 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
11141 for the early LTO debug to properly generate references to it
11142 during DIE emission. Do not re-use that for the skeleton for
11143 split-dwarf.
11144 (dwarf2out_early_finish): Likewise.
11145
11146 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11147
11148 PR target/85328
11149 * config/i386/sse.md
11150 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
11151 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
11152 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
11153 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
11154 and output is a reg, avoid creating invalid lowpart subreg, but
11155 instead split into a 512-bit move. Don't split if not AVX512VL,
11156 input is xmm16+ reg and output is a mem.
11157 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
11158 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
11159 xmm16+ reg and output is a mem.
11160
11161 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11162
11163 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
11164 also for flag_dwarf2_cfi_asm.
11165
11166 2018-04-12 Jakub Jelinek <jakub@redhat.com>
11167
11168 PR rtl-optimization/85342
11169 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
11170 a bool scalar var inside of the loop instead. Don't try to update
11171 recog_data.operand after failed apply_change_group.
11172
11173 2018-04-12 Tom de Vries <tom@codesourcery.com>
11174
11175 PR target/85296
11176 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
11177 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
11178 array with flexible array member as array without given dimension.
11179 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
11180 argument for undefined param to true.
11181
11182 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
11183
11184 PR target/85321
11185 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11186 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
11187 from PowerPC section.
11188 * config/rs6000/sysv4.opt (mcall-): Improve help text.
11189 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
11190 help text that is too long.
11191 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
11192 help text that is too long.
11193 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
11194 help text that is too long.
11195
11196 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
11197
11198 * config/alpha/alpha.md (stack_probe_internal): Rename
11199 from "probe_stack". Update all callers.
11200
11201 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11202
11203 PR rtl-optimization/84566
11204 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
11205 sched_macro_fuse_insns.
11206
11207 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11208
11209 PR target/84301
11210 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
11211 (compute_block_dependences): ... from here.
11212
11213 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11214
11215 PR tree-optimization/85331
11216 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
11217 from int to HOST_WIDE_INT.
11218
11219 2018-04-11 Martin Jambor <mjambor@suse.cz>
11220
11221 PR ipa/84149
11222 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
11223 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
11224 not the same as the source val.
11225 (cgraph_edge_brings_value_p): New parameter.
11226 (gather_edges_for_value): Pass destination value to
11227 cgraph_edge_brings_value_p.
11228 (perhaps_add_new_callers): Likewise.
11229 (get_info_about_necessary_edges): Likewise and exclude values brought
11230 only by self-recursive edges.
11231 (create_specialized_node): Redirect only clones of self-calling edges.
11232 (+self_recursive_pass_through_p): New function.
11233 (find_more_scalar_values_for_callers_subset): Use it.
11234 (find_aggregate_values_for_callers_subset): Likewise.
11235 (known_aggs_to_agg_replacement_list): Removed.
11236 (decide_whether_version_node): Re-calculate known constants for all
11237 remaining context clones.
11238
11239 2018-04-11 Richard Biener <rguenther@suse.de>
11240
11241 PR lto/85339
11242 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
11243 from early DWARF output.
11244 (dwarf2out_early_finish): Output line info unconditionally into
11245 early DWARF and add reference to it.
11246
11247 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11248
11249 PR target/85281
11250 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
11251 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
11252 other than V2DFmode using iptr mode attribute.
11253 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
11254
11255 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
11256
11257 PR rtl-optimization/84659
11258 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
11259
11260 2018-04-11 Jakub Jelinek <jakub@redhat.com>
11261
11262 PR debug/85302
11263 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
11264 SIZEP is NULL.
11265 (output_loc_list): Pass address of a dummy size variable even in the
11266 locview handling loop.
11267 (index_location_lists): Add comment on why skip_loc_list_entry can't
11268 call size_of_locs.
11269
11270 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
11271
11272 PR target/85261
11273 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
11274 into register.
11275
11276 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
11277
11278 PR target/85321
11279 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
11280 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
11281 and -mstring-compare-inline-limit.
11282
11283 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11284
11285 PR target/85287
11286 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
11287 for stack clash protection in a register whenever we need it to be in
11288 a register.
11289
11290 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11291
11292 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
11293 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
11294
11295 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
11296
11297 PR target/85321
11298 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
11299 the help text.
11300 (mlong-double-): Ditto.
11301 * config/rs6000/sysv4.opt (msdata=): Ditto.
11302 (mtls-size=): Ditto.
11303
11304 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11305
11306 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
11307 erroneous entries for
11308 "vector int vec_ldl (int, long int *)", and
11309 "vector unsigned int vec_ldl (int, unsigned long int *)".
11310 Add comments and entries for
11311 "vector bool char vec_ldl (int, bool char *)",
11312 "vector bool short vec_ldl (int, bool short *)",
11313 "vector bool int vec_ldl (int, bool int *)",
11314 "vector bool long long vec_ldl (int, bool long long *)",
11315 "vector pixel vec_ldl (int, pixel *)",
11316 "vector long long vec_ldl (int, long long *)",
11317 "vector unsigned long long vec_ldl (int, unsigned long long *)".
11318 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
11319 type tree bool_long_long_type_node and correct definition of
11320 bool_V2DI_type_node to make reference to this new type tree.
11321 (rs6000_mangle_type): Replace erroneous reference to
11322 bool_long_type_node with bool_long_long_type_node.
11323 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
11324 comments to emphasize sign distinctions for char and int types and
11325 replace RS6000_BTI_bool_long constant with
11326 RS6000_BTI_bool_long_long constant. Also add comment to restrict
11327 use of RS6000_BTI_pixel.
11328 (bool_long_type_node): Remove this macro definition.
11329 (bool_long_long_type_node): New macro definition
11330
11331 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11332
11333 PR rtl-optimization/85300
11334 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
11335 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
11336 simplify_unary_operation fails.
11337
11338 2018-04-10 Martin Liska <mliska@suse.cz>
11339
11340 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
11341 cgraph_edge and ipa_ref.
11342
11343 2018-04-10 Jakub Jelinek <jakub@redhat.com>
11344
11345 PR target/85177
11346 PR target/85255
11347 * config/i386/sse.md
11348 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
11349 computation of the VEC_MERGE selector from mask.
11350 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
11351 Fix decoding of the VEC_MERGE selector into mask.
11352
11353 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11354
11355 PR tree-optimization/85286
11356 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
11357
11358 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
11359
11360 * final.c (final_1): Set insn_last_address as well as
11361 insn_current_address.
11362
11363 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11364
11365 PR target/85173
11366 * explow.c (emit_stack_probe): Call validize_mem on memory location
11367 before passing it to gen_probe_stack. Create address operand and
11368 legitimize it for the probe_stack_address case.
11369
11370 2018-04-09 Jan Hubicka <jh@suse.cz>
11371
11372 PR lto/85078
11373 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
11374 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
11375 * tree.c (free_lang_data_in_type): Fix handling of binfos;
11376 walk basetypes.
11377 (free_lang_data): Rebuild type inheritance graph.
11378
11379 2018-04-09 Martin Sebor <msebor@redhat.com>
11380
11381 * invoke.texi (-finline-small-functions): Mention other optimization
11382 options.
11383 (-findirect-inlining, -fpartial-inlining): Same.
11384 (-finline-functions-called-once): Same.
11385 (-freorder-blocks-and-partition): Same.
11386
11387 2018-04-09 Jan Hubicka <jh@suse.cz>
11388
11389 PR rtl/84058
11390 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
11391 jumps; choose last target that matches the criteria (i.e.
11392 no partition changes for non-crossing jumps).
11393 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
11394 support for redirecting crossing jumps to non-crossing.
11395
11396 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
11397
11398 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
11399 also for naked functions.
11400
11401 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
11402
11403 * config/arc/arc.md (add_shift): New pattern.
11404 (add_shift2): Likewise.
11405 (sub_shift): Likewise.
11406 (sub_shift_cmp0_noout): Likewise.
11407 (compare_si_ashiftsi): Likewise.
11408 (xbfu_cmp0_noout): New combine pattern.
11409 (xbfu_cmp0"): Likewise.
11410 (movsi_set_cc_insn): Place the predicable variant first.
11411 (commutative_binary_cmp0_noout): Remove clobber.
11412 (commutative_binary_cmp0): New pattern.
11413 (noncommutative_binary_cmp0): Likewise.
11414 (noncommutative_binary_cmp0_noout): Likewise.
11415 (noncommutative_binary_comparison_result_used): Removed.
11416 (rsub_cmp0): New pattern.
11417 (rsub_cmp0_noout): Likewise.
11418 (extzvsi): Changed, keep only meaningful variants.
11419 (SQH, SEZ): New iterators.
11420 (SQH_postfix): New mode attribute.
11421 (SEZ_prefix): New code attribute.
11422 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
11423 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
11424 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
11425 of numerical value.
11426 (noncommutative_operator): Check the availability of barrel
11427 shifter option.
11428
11429 2018-04-09 Richard Biener <rguenther@suse.de>
11430
11431 PR tree-optimization/85284
11432 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
11433 Only use the niter constraining form of simple_iv when the exit
11434 is always executed.
11435
11436 2018-04-09 Tom de Vries <tom@codesourcery.com>
11437
11438 PR target/84041
11439 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11440 (define_expand "*memory_barrier"): New define_expand.
11441 (define_insn "memory_barrier"): New insn.
11442
11443 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11444
11445 PR rtl-optimization/80463
11446 PR rtl-optimization/83972
11447 PR rtl-optimization/83480
11448
11449 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
11450 correct producer for the insn.
11451 (tidy_control_flow): Fixup seqnos in case of debug insns.
11452
11453 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11454
11455 PR rtl-optimization/83913
11456
11457 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
11458 different sched-times when merging exprs.
11459
11460 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11461
11462 PR rtl-optimization/83962
11463
11464 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
11465 tidy_fallthru_edge and tidy_control_flow.
11466
11467 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
11468
11469 PR rtl-optimization/83530
11470
11471 * sel-sched.c (force_next_insn): New global variable.
11472 (remove_insn_for_debug): When force_next_insn is true, also leave only
11473 next insn in the ready list.
11474 (sel_sched_region): When the region wasn't scheduled, make another pass
11475 over it with force_next_insn set to 1.
11476
11477 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11478
11479 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
11480 into tm_file.
11481 * config/nds32/constants.md (unspec_volatile_element): Add enum values
11482 for interrupt control.
11483 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11484 functions for interrupt control.
11485 * config/nds32/nds32-intrinsic.md: Likewise.
11486 * config/nds32/nds32_intrinsic.h: Likewise.
11487 * config/nds32/nds32.h (nds32_builtins): Likewise.
11488
11489 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11490
11491 * config/nds32/nds32.c (nds32_init_machine_status,
11492 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
11493 strict_aligned_p field.
11494 (nds32_expand_to_rtl_hook): New function.
11495 (TARGET_EXPAND_TO_RTL_HOOK): Define.
11496 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
11497
11498 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11499 Chung-Ju Wu <jasonwucj@gmail.com>
11500
11501 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
11502 * config/nds32/nds32-n7.md: New file.
11503 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
11504 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
11505 pipeline.
11506 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
11507 * config/nds32/nds32.md (pipeline_model): Add n7.
11508 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
11509 * config/nds32/pipelines.md: Include n7 settings.
11510
11511 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11512 Chung-Ju Wu <jasonwucj@gmail.com>
11513
11514 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
11515 * config/nds32/nds32-e8.md: New file.
11516 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
11517 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
11518 pipeline.
11519 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
11520 * config/nds32/nds32.md (pipeline_model): Add e8.
11521 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
11522 * config/nds32/pipelines.md: Include e8 settings.
11523
11524 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11525 Chung-Ju Wu <jasonwucj@gmail.com>
11526
11527 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
11528 * config/nds32/nds32-n8.md: New file.
11529 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
11530 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
11531 pipeline.
11532 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
11533 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
11534 * config/nds32/nds32.md (pipeline_model): Add n8.
11535 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
11536 * config/nds32/pipelines.md: Include n8 settings.
11537
11538 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
11539 Chung-Ju Wu <jasonwucj@gmail.com>
11540
11541 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
11542 * config/nds32/nds32-n9-2r1w.md: New file.
11543 * config/nds32/nds32-n9-3r2w.md: New file.
11544 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
11545 nds32_register_ports): New or modify for cpu n9.
11546 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
11547 pipeline.
11548 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
11549 * config/nds32/nds32-utils.c: New file.
11550 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
11551 TARGET_MUL_SLOW): Define.
11552 * config/nds32/nds32.md (pipeline_model): New attribute.
11553 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
11554 New options that support cpu n9.
11555 * config/nds32/pipelines.md: Include n9 settings.
11556 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
11557
11558 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
11559
11560 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
11561 information if necessary.
11562 (output_cond_branch_compare_zero): Likewise.
11563 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
11564 (nds32_target_alignment): Refine for alignment.
11565 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
11566 (FUNCTION_BOUNDARY): Modify.
11567 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
11568 align case.
11569 * config/nds32/nds32.opt (malways-align, malign-functions): New.
11570
11571 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
11572
11573 * config/nds32/constants.md (unspec_volatile_element): Add values for
11574 TLB operation and data prefetch.
11575 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
11576 functions for TLB operation and data prefetch.
11577 * config/nds32/nds32-intrinsic.md: Likewise.
11578 * config/nds32/nds32_intrinsic.h: Likewise.
11579 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
11580 (nds32_print_operand): Likewise.
11581 * config/nds32/nds32.h (nds32_builtins): Likewise.
11582
11583 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
11584 Andrew Pinski <pinsika@gcc.gnu.org>
11585
11586 PR middle-end/82976
11587 * match.pd: Use constant_boolean_node of correct type instead of
11588 boolean_true_node or boolean_false_node for simplifying
11589 pointer comparisons to zero.
11590
11591 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11592
11593 PR tree-optimization/80021
11594 * tree.c (verify_type_variant): Make error call in verify_variant_match
11595 translatable and remove final full stop.
11596
11597 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11598
11599 * config/nds32/constants.md (unspec_volatile_element): Add
11600 UNSPEC_VOLATILE_EH_RETURN.
11601 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
11602 nds32_output_stack_pop): Support dwarf exception handling process.
11603 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
11604 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
11605 exception handling process.
11606 (nds32_compute_stack_frame): Likewise.
11607 (nds32_return_addr_rtx): Likewise.
11608 (nds32_initial_elimination_offset): Likewise.
11609 (nds32_expand_prologue): Likewise.
11610 (nds32_expand_epilogue): Likewise.
11611 (nds32_dynamic_chain_address): New function.
11612 * config/nds32/nds32.h (machine_function): Add fields for dwarf
11613 exception handling.
11614 (DYNAMIC_CHAIN_ADDRESS): Define.
11615 (EH_RETURN_DATA_REGNO): Define.
11616 (EH_RETURN_STACKADJ_RTX): Define.
11617 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
11618 patterns for dwarf exception handling.
11619
11620 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11621
11622 * config/nds32/nds32.h: Clean up obsolete macros.
11623
11624 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11625
11626 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11627 Add enum values for particular instructions.
11628 * config/nds32/nds32-intrinsic.c: Implementation of expanding
11629 particular intrinsic functions.
11630 * config/nds32/nds32-intrinsic.md: Likewise.
11631 * config/nds32/nds32_intrinsic.h: Likewise.
11632 * config/nds32/nds32.h (nds32_builtins): Likewise.
11633 * config/nds32/nds32.md (type): Add pbsad and pbsada.
11634 (btst, ave): New patterns for particular instructions.
11635
11636 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11637
11638 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11639 Add enum values for atomic load/store and memory sync.
11640 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
11641 and memory sync.
11642 * config/nds32/nds32-intrinsic.md: Likewise.
11643 * config/nds32/nds32_intrinsic.h: Likewise.
11644 * config/nds32/nds32.h (nds32_builtins): Likewise.
11645
11646 2018-04-07 Jakub Jelinek <jakub@redhat.com>
11647
11648 PR tree-optimization/85257
11649 * fold-const.c (native_encode_vector): If not all elts could fit
11650 and off is -1, return 0 rather than offset.
11651 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
11652 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
11653 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
11654 adjust buffer in native_interpret_expr call.
11655
11656 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11657
11658 * config/nds32/constants.md (unspec_volatile_element): Add cache
11659 control enum values.
11660 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
11661 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
11662 * config/nds32/nds32.c (nds32_cctl_names): New.
11663 (nds32_print_operand): Handle cache control register names.
11664 * config/nds32/nds32.h (nds32_builtins): New enum values.
11665 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
11666 macros.
11667 * config/nds32/nds32.md (type): Add mmu.
11668 * config/nds32/pipelines.md (simple_insn): Add mmu.
11669
11670 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11671
11672 * config/nds32/nds32.md (type): Remove call.
11673 * config/nds32/pipelines.md (simple_insn): Likewise.
11674
11675 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11676
11677 * config/nds32/constants.md (unspec_volatile_element): Add
11678 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
11679 UNSPEC_VOLATILE_FMFCFG.
11680 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
11681 description for fmfcfg and fmfcsr.
11682 (bdesc_1arg): Add fmtcsr.
11683 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
11684 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
11685 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
11686 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
11687 unspec_fmfcfg): New patterns.
11688 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
11689 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
11690 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
11691 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
11692 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
11693 __nds32__fmfcfg): Define.
11694
11695 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
11696
11697 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
11698 intrinsic register names.
11699 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
11700 intrinsic register enum values and macros.
11701
11702 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
11703
11704 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
11705 for load/store addressing form.
11706 (nds32_print_operand_address): Likewise.
11707
11708 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
11709
11710 PR target/85196
11711 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
11712 based on LABEL_REF. Remove useless assertion.
11713 (pic_address_needs_scratch): Fix formatting.
11714 (sparc_legitimize_pic_address): Minor tweaks.
11715 (sparc_delegitimize_address): Adjust assertion accordingly.
11716 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
11717 into symbolic_operand.
11718 (movsi_high_pic_label_ref): Likewise.
11719 (movsi_lo_sum_pic_label_ref): Likewise.
11720 (movdi_pic_label_ref): Likewise.
11721 (movdi_high_pic_label_ref): Likewise.
11722 (movdi_lo_sum_pic_label_ref): Likewise.
11723
11724 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
11725
11726 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
11727 custom LIB_SPEC setup.
11728
11729 2018-04-06 Ruslan Bukin <br@bsdpad.com>
11730 Kito Cheng <kito.cheng@gmail.com>
11731
11732 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
11733 * config/riscv/freebsd.h: New.
11734
11735 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11736
11737 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
11738 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
11739 file.
11740
11741 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11742 Kito Cheng <kito.cheng@gmail.com>
11743
11744 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
11745 nds32_output_call, nds32_symbol_binds_local_p): New functions.
11746 * config/nds32/nds32-protos.h (nds32_output_call,
11747 nds32_output_return): Declare.
11748 * config/nds32/nds32.md: Refine all the call and return patterns.
11749
11750 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11751
11752 PR debug/85252
11753 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
11754 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
11755
11756 PR rtl-optimization/84872
11757 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
11758 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
11759 EDGE_CROSSING edge.
11760
11761 2018-04-06 Tamar Christina <tamar.christina@arm.com>
11762
11763 * expr.c (copy_blkmode_to_reg): Revert 254862.
11764 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
11765
11766 2018-04-06 Richard Biener <rguenther@suse.de>
11767
11768 PR middle-end/85244
11769 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
11770 after seeing a component reference with an adjacent field. Treat
11771 refs to arrays at struct end of external decls similar to
11772 refs to unconstrained commons.
11773
11774 2018-04-06 Jakub Jelinek <jakub@redhat.com>
11775
11776 PR sanitizer/85213
11777 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
11778 look through SAVE_EXPRs with non-side-effects argument. Adjust
11779 recursive calls.
11780 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
11781 save_p here.
11782
11783 2018-04-06 Richard Biener <rguenther@suse.de>
11784
11785 PR middle-end/85180
11786 * alias.c (find_base_term): New wrapper around find_base_term
11787 unwinding CSELIB_VAL_PTR changes.
11788 (find_base_term): Do not restore CSELIB_VAL_PTR during the
11789 recursion.
11790
11791 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
11792
11793 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
11794 instructions.
11795 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
11796 constant definitions.
11797 ("nop"): lr 0,0 -> nopr r0
11798 ("nop_lr0", "nop_lr1"): New insn definitions.
11799
11800 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
11801
11802 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
11803 NDS32_V3PUSH_AVAILABLE_P macro.
11804
11805 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
11806 Chung-Ju Wu <jasonwucj@gmail.com>
11807
11808 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
11809 (nds32*-*-*): Add float and fpu_config into supported_defaults.
11810 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
11811 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
11812 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
11813 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
11814 * config/nds32/constraints.md: New constraints and checking for hard
11815 float configuration.
11816 * config/nds32/iterators.md: New mode iterator and attribute for hard
11817 float configuration.
11818 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
11819 patterns.
11820 * config/nds32/nds32-fpu.md: New file.
11821 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
11822 deal with hard float code generation.
11823 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
11824 ARCH_V3S.
11825 (abi_type, float_reg_number): New enum type.
11826 * config/nds32/nds32-predicates.c: New predicates for hard float.
11827 * config/nds32/nds32-protos.h: Declare functions for hard float.
11828 * config/nds32/nds32.c: Implementation for hard float configuration.
11829 * config/nds32/nds32.h: Definitions for hard float configuration.
11830 * config/nds32/nds32.md: Include hard float machine description and
11831 modify patterns for hard float configuration.
11832 * config/nds32/nds32.opt: New options for hard float configuration.
11833 * config/nds32/predicates.md: New predicates for hard float
11834 configuration.
11835
11836 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
11837
11838 * common/config/nds32/nds32-common.c
11839 (nds32_option_optimization_table): Enable -mreleax-hint by default.
11840
11841 2018-04-05 Jakub Jelinek <jakub@redhat.com>
11842
11843 PR middle-end/85195
11844 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
11845 CONSTRUCTOR_ELT (ctor, ...)->value.
11846
11847 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
11848
11849 PR target/85193
11850 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
11851
11852 2018-04-05 Tom de Vries <tom@codesourcery.com>
11853
11854 PR target/85204
11855 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
11856 cond jump.
11857
11858 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11859 Kito Cheng <kito.cheng@gmail.com>
11860
11861 * config/nds32/constraints.md (U33): Fine-tune checking condition.
11862 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
11863 * config/nds32/nds32.h (nds32_16bit_address_type): Add
11864 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
11865
11866 2018-04-05 Shiva Chen <shiva0217@gmail.com>
11867 Kito Cheng <kito.cheng@gmail.com>
11868
11869 * config/nds32/constraints.md (Ufe): New memory constraint.
11870 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
11871 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
11872 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
11873 operands.
11874 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
11875 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
11876
11877 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11878
11879 * config/nds32/nds32.md: Use optimize_size in the condition for
11880 alu-shift instructions.
11881
11882 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11883
11884 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
11885
11886 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11887
11888 * config/nds32/nds32.md (negsi2): Refine pattern.
11889
11890 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11891 Chung-Ju Wu <jasonwucj@gmail.com>
11892
11893 * config/nds32/iterators.md (shift_rotate): New code iterator.
11894 (shift): New code attribute.
11895 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
11896 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
11897 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
11898 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
11899 bit-wise operations.
11900 (andsi3, *andsi3): Ditto.
11901 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
11902 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
11903 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
11904 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
11905 nds32_ior_operand, nds32_xor_operand): New predicates.
11906
11907 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11908
11909 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
11910 (addsi3, subsi3): ... this.
11911
11912 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11913
11914 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
11915
11916 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11917
11918 * config/nds32/nds32.md: Adjust indention.
11919
11920 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
11921
11922 * config/nds32/nds32.md (feature): New attribute.
11923
11924 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
11925
11926 * config/nds32/nds32.md (subtype): New attribute.
11927
11928 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
11929
11930 PR target/85203
11931 * config/arm/arm-builtins.c (arm_expand_builtin): Change
11932 expansion to perform a bitwise AND of the argument followed by a
11933 boolean negation of the result.
11934
11935 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
11936
11937 PR rtl-optimization/84878
11938 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
11939 the basic block. Assert the use reference is not artificial and that
11940 it has an associated insn.
11941
11942 2018-04-04 Michael Matz <matz@suse.de>
11943
11944 * builtins.c (compute_objsize): Pass correct operand
11945 to array_at_struct_end_p.
11946
11947 2018-04-04 Richard Biener <rguenther@suse.de>
11948
11949 PR lto/85176
11950 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
11951 from contexts for DINFO_LEVEL_TERSE and below.
11952
11953 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11954
11955 * config/nds32/nds32-doubleword.md (move_<mode>): Require
11956 resiter_operand condition.
11957 * config/nds32/nds32.md (*move<mode>): Ditto.
11958
11959 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11960 Monk Chiang <sh.chiang04@gmail.com>
11961
11962 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
11963
11964 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11965
11966 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
11967
11968 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
11969 Kito Cheng <kito.cheng@gmail.com>
11970
11971 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
11972 nds32_cond_code_str, output_cond_branch,
11973 output_cond_branch_compare_zero, nds32_expand_cbranch,
11974 nds32_expand_cstore, nds32_expand_movcc,
11975 nds32_output_cbranchsi4_equality_zero,
11976 nds32_output_cbranchsi4_equality_reg,
11977 nds32_output_cbranchsi4_equality_reg_or_const_int,
11978 nds32_output_cbranchsi4_greater_less_zero: New functions.
11979 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
11980 nds32_expand_cstore, nds32_expand_movcc,
11981 nds32_output_cbranchsi4_equality_zero,
11982 nds32_output_cbranchsi4_equality_reg,
11983 nds32_output_cbranchsi4_equality_reg_or_const_int,
11984 nds32_output_cbranchsi4_greater_less_zero): Declare.
11985 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
11986 nds32_rimm11s_operand): New predicates.
11987 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
11988 * config/nds32/nds32.md: Rewrite all the branch and conditional move
11989 patterns.
11990
11991 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
11992
11993 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
11994 * config/nds32/nds32.md: Ditto.
11995 * config/nds32/pipelines.md: Ditto.
11996
11997 2018-04-04 Richard Biener <rguenther@suse.de>
11998
11999 PR tree-optimization/85168
12000 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
12001 propagating abnormals.
12002
12003 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12004
12005 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
12006
12007 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
12008 Kito Cheng <kito.cheng@gmail.com>
12009
12010 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
12011 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
12012 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
12013 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
12014 * config/nds32/nds32.md (sibcall_internal): New.
12015 (sibcall_register): Remove.
12016 (sibcall_immediate): Remove.
12017 (sibcall_value_internal): New.
12018 (sibcall_value_register): Remove.
12019 (sibcall_value_immediate): Remove.
12020 * config/nds32/predicates.md (nds32_general_register_operand): New.
12021 (nds32_call_address_operand): New.
12022
12023 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12024
12025 PR rtl-optimization/85167
12026 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
12027 bb_defs if *split_p, instead preinitialize it to NULL.
12028
12029 PR tree-optimization/85156
12030 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
12031 evaluating the argument multiple times.
12032
12033 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
12034
12035 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
12036 than vector.
12037 (_mm_cvtpd_ps): Likewise.
12038 (_mm_cvttpd_epi32): Likewise.
12039 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
12040 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
12041 vector, pixel, and bool following altivec.h include.
12042
12043 2018-04-03 Martin Sebor <msebor@redhat.com>
12044
12045 * doc/extend.texi (Common Function Attributes): Clarify.
12046 (const attribute): Likewise.
12047 (pure attribute): Likewise.
12048
12049 2018-04-03 Jakub Jelinek <jakub@redhat.com>
12050
12051 PR target/85169
12052 * config/i386/i386.c (ix86_expand_vector_set): Use
12053 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
12054
12055 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
12056
12057 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
12058 instructions when changing rounding bits to preserve precision bits
12059 in the x87 control word.
12060
12061 2018-04-03 Martin Liska <mliska@suse.cz>
12062
12063 PR tree-optimization/82491
12064 * rtl.h (strip_offset_and_add): Replace += suboffset with
12065 poly_uint64 () + suboffset.
12066
12067 2018-03-29 Martin Liska <mliska@suse.cz>
12068 Martin Jambor <mjambor@suse.cz>
12069
12070 PR ipa/84947
12071 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
12072 param_type is not an integral or pointer type.
12073
12074 2018-04-03 Richard Biener <rguenther@suse.de>
12075
12076 * sese.h (recompute_all_dominators): Remove.
12077
12078 2018-04-02 Martin Sebor <msebor@redhat.com>
12079
12080 * doc/invoke.texi (-Wrestrict): Fix typos.
12081
12082 2018-04-02 Jim Wilson <jimw@sifive.com>
12083
12084 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
12085 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
12086 (<optab>di3, <optab>si3_extend): Likewise.
12087 (<optab>si3_mask, <optab>si3_mask_1): New.
12088 (<optab>di3_mask, <optab>di3_mask_1): New.
12089 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
12090 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
12091 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
12092
12093 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
12094
12095 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
12096 example.
12097
12098 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
12099
12100 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
12101 (nds32_canonicalize_comparison): New function.
12102
12103 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12104 Kito Cheng <kito.cheng@gmail.com>
12105 Kuan-Lin Chen <kuanlinchentw@gmail.com>
12106
12107 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
12108 * config/nds32/constants.md (unspec_volatile_element): Add
12109 UNSPEC_VOLATILE_RELAX_GROUP.
12110 * config/nds32/nds32-relax-opt.c: New file.
12111 * config/nds32/nds32-predicates.c
12112 (nds32_symbol_load_store_p): New function.
12113 * config/nds32/nds32-protos.h
12114 (nds32_symbol_load_store_p): Declare function.
12115 (make_pass_nds32_relax_opt): Declare new rtl pass function.
12116 * config/nds32/nds32.c
12117 (nds32_register_pass): New function to register pass.
12118 (nds32_register_passes): New function to register passes.
12119 * config/nds32/nds32.md (relax_group): New pattern.
12120 * config/nds32/nds32.opt (mrelax-hint): New option.
12121 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
12122
12123 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
12124
12125 * config/nds32/t-nds32: Modify files dependency.
12126
12127 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12128
12129 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
12130 (PROFILE_HOOK): Define its implementation.
12131
12132 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
12133
12134 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
12135 type and 32-bit size.
12136
12137 2018-04-01 Jakub Jelinek <jakub@redhat.com>
12138
12139 PR middle-end/85090
12140 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
12141 (V_128_256): New mode iterator.
12142 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
12143 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
12144 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
12145 of V.
12146 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
12147 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
12148
12149 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
12150
12151 PR target/83315
12152 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
12153 NaN inputs correctly.
12154
12155 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
12156
12157 PR target/80546
12158 * config/rs6000/vsx.md (??r): New mode attribute.
12159 (*vsx_mov<mode>_64bit): Use it.
12160 (*vsx_mov<mode>_32bit): Likewise.
12161
12162 2018-03-30 Martin Sebor <msebor@redhat.com>
12163
12164 PR tree-optimization/84818
12165 * builtins.c (check_access): Use warning_n.
12166
12167 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12168
12169 PR target/83822
12170 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
12171 condition.
12172 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
12173 condition.
12174
12175 2018-03-30 Julia Koval <julia.koval@intel.com>
12176
12177 PR target/84413
12178 * x86-tune.def (movx, partial_reg_dependency): Enable for
12179 m_SKYLAKE_AVX512.
12180
12181 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
12182
12183 PR inline-asm/84985
12184 * lra-constraints.c (process_alt_operands): Move setting
12185 this_alternative_matches below.
12186
12187 2018-03-29 Martin Liska <mliska@suse.cz>
12188
12189 PR lto/84995.
12190 * doc/invoke.texi: Document how LTO works with debug info.
12191 Describe auto-load support of binutils. Mention 'x86-64'
12192 as valid option value of -march option.
12193
12194 2018-03-29 Jakub Jelinek <jakub@redhat.com>
12195
12196 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
12197
12198 PR c/85094
12199 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
12200 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
12201 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
12202 checking.
12203
12204 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12205
12206 PR target/84912
12207 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
12208 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
12209 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
12210 for RS6000_BTM_POWERPC64.
12211 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
12212 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
12213 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
12214 definition.
12215 (DIVDE): Use it.
12216 (DIVDEU): Likewise.
12217
12218 2018-03-28 Carl Love <cel@us.ibm.com>
12219
12220 Revert
12221 2017-09-27 Carl Love <cel@us.ibm.com>
12222
12223 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
12224 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
12225 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
12226 fctiw instruction.
12227
12228 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12229
12230 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
12231 instead of __vector bool.
12232 (_mm_max_pu8): Likewise.
12233 (_mm_min_pi16): Likewise.
12234
12235 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
12236
12237 PR target/84912
12238 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
12239 (DIVWEUO): Likewise.
12240 (DIVDEO): Likewise.
12241 (DIVDEUO): Likewise.
12242 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
12243 DIVWEUO and DIVDEUO.
12244 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
12245 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
12246 (div_extend): Likewise.
12247 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
12248 builtin function.
12249 (__builtin_divweuo): Likewise.
12250 (__builtin_divdeo): Likewise.
12251 (__builtin_divdeuo): Likewise.
12252
12253 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12254
12255 PR target/85095
12256 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
12257 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
12258
12259 PR tree-optimization/82004
12260 * gimple-match-head.c (optimize_pow_to_exp): New function.
12261 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
12262 Don't fold to exp if optimize_pow_to_exp is false.
12263
12264 2018-03-28 Martin Liska <mliska@suse.cz>
12265
12266 PR other/84819
12267 * calls.c (initialize_argument_information): Fix trailing space.
12268 * common.opt: Fix typo and provide better explanation for
12269 -fsanitize-coverage option.
12270 * config/i386/i386.opt: Fix typo.
12271
12272 2018-03-28 Jakub Jelinek <jakub@redhat.com>
12273 Martin Liska <mliska@suse.cz>
12274
12275 PR sanitizer/85081
12276 * gimplify.c (asan_poison_variable): Don't do the check for
12277 gimplify_omp_ctxp here.
12278 (gimplify_decl_expr): Do it here.
12279 (gimplify_target_expr): Likewise.
12280
12281 2018-03-28 Martin Liska <mliska@suse.cz>
12282
12283 PR target/84988
12284 * config/i386/i386.c (ix86_function_arg_advance): Do not call
12285 chkp_type_bounds_count if MPX is not enabled.
12286
12287 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
12288
12289 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
12290
12291 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
12292
12293 PR target/84914
12294 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
12295 function to create the function decl for complex long double
12296 multiply and divide for -mabi=ieeelongdouble.
12297 (init_float128_ieee): Call it.
12298
12299 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
12300
12301 PR target/85044
12302 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
12303 -fcf-protection=branch -mibt.
12304 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
12305
12306 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12307
12308 PR target/81863
12309 * config/arm/arm.c (arm_valid_symbolic_address): Handle
12310 arm_word_relocations.
12311
12312 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
12313
12314 PR target/85056
12315 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
12316 extern array declarations.
12317
12318 2018-03-27 Richard Biener <rguenther@suse.de>
12319
12320 PR middle-end/84067
12321 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
12322 explicit single_use checks.
12323
12324 2018-03-27 Richard Biener <rguenther@suse.de>
12325
12326 PR tree-optimization/85082
12327 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
12328 Valueize the VUSE.
12329
12330 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12331
12332 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
12333 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
12334 Turn on fasynchronous-unwind-tables and funwind-tables.
12335
12336 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
12337
12338 PR target/85073
12339 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
12340 (*bmi_blsr_<mode>_ccz): Ditto.
12341
12342 2018-03-26 Tom de Vries <tom@codesourcery.com>
12343
12344 PR tree-optimization/85063
12345 * omp-general.c (offloading_function_p): New function. Factor out
12346 of ...
12347 * omp-offload.c (pass_omp_target_link::gate): ... here.
12348 * omp-general.h (offloading_function_p): Declare.
12349 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
12350 with attribute omp declare target for offloading functions.
12351
12352 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
12353
12354 PR tree-optimization/84005
12355 * tree-data-ref.h (get_base_for_alignment): Declare.
12356 * tree-data-ref.c (get_base_for_alignment_1): New function.
12357 (get_base_for_alignment): Likewise.
12358 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
12359 get_base_for_alignment to find a suitable base object, instead
12360 of always using drb->base_address.
12361
12362 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12363
12364 PR inline-asm/85022
12365 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
12366 known size by default.
12367
12368 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
12369
12370 PR inline-asm/85030
12371 * lra-constraints.c (process_alt_operands): Don't match BLKmode
12372 and non BLKmode operands.
12373
12374 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12375
12376 PR target/85026
12377 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
12378 Clean up attributes.
12379
12380 2018-03-23 Richard Biener <rguenther@suse.de>
12381
12382 PR debug/85020
12383 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
12384 we are going to emit early debug for LTO.
12385
12386 2018-03-23 Jakub Jelinek <jakub@redhat.com>
12387
12388 PR inline-asm/85034
12389 * function.c (match_asm_constraints_1): Don't optimize if input
12390 doesn't satisfy general_operand predicate for output's mode.
12391
12392 PR inline-asm/85022
12393 * alias.c (write_dependence_p): Don't require for x_canonicalized
12394 non-VOIDmode if x has VOIDmode.
12395
12396 PR sanitizer/85029
12397 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
12398 just don't try to optimize it rather than assert it never happens.
12399
12400 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12401
12402 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
12403 macro expansions for definition of ST_INTERNAL_<mode> and
12404 LD_INTERNAL_<mode> builtins.
12405 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
12406 Remove prototype.
12407 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
12408 function.
12409 (altivec_expand_st_builtin): Likewise.
12410 (altivec_expand_builtin): Remove calls to deleted functions.
12411 (rs6000_address_for_altivec): Delete this function.
12412 * config/rs6000/vector.md: Remove expands for
12413 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
12414
12415 2018-03-22 Sudakshina Das <sudi.das@arm.com>
12416
12417 PR target/84826
12418 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
12419 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
12420 re-computing once computed.
12421 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
12422 (arm_init_machine_status): Initialize
12423 machine->static_chain_stack_bytes.
12424
12425 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12426
12427 PR target/84760
12428 * doc/extend.texi: Add four new prototypes for vec_ld.
12429 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
12430 definitions for more logical presentation.
12431 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
12432 entries for V1TI variants of __builtin_altivec_ld builtin.
12433 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
12434 handling of V1TI variant of LVX icode pattern.
12435 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
12436 (rs6000_gimple_fold_builtin): Likewise.
12437 (altivec_init_builtins): Add code to define
12438 __builtin_altivec_lvx_v1ti function.
12439
12440 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12441
12442 PR inline-asm/84941
12443 * function.c (match_asm_constraints_1): Don't do the optimization
12444 if input isn't a REG, SUBREG, MEM or constant.
12445
12446 2018-03-22 Tom de Vries <tom@codesourcery.com>
12447
12448 PR tree-optimization/84956
12449 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
12450 bb_has_abnormal_pred.
12451
12452 2018-03-22 Jakub Jelinek <jakub@redhat.com>
12453
12454 PR sanitizer/85018
12455 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
12456 DECL_INITIAL (decl) to decl at the end.
12457 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
12458 adjust the comment.
12459
12460 2018-03-21 Joseph Myers <joseph@codesourcery.com>
12461
12462 * doc/extend.texi (__builtin_tgmath): Document when complex
12463 integer types are treated as _Complex _Float64.
12464
12465 2018-03-21 Tom de Vries <tom@codesourcery.com>
12466
12467 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
12468
12469 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12470
12471 PR tree-optimization/84960
12472 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
12473 if it is ENTRY block, move them into single succ of ENTRY in that case.
12474
12475 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
12476
12477 PR tree-optimization/84811
12478 * poly-int.h (poly_span_traits): Remove the T3 parameter and
12479 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
12480 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
12481 (known_subrange_p): Update accordingly. Cast each value involved
12482 in the size comparison, rather than casting the result of the
12483 subtraction.
12484
12485 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12486
12487 PR tree-optimization/84982
12488 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
12489 by flipping the least significant bit rather than all bits from
12490 bitpos to bitpos + bitsize - 1.
12491
12492 2018-03-21 Nathan Sidwell <nathan@acm.org>
12493
12494 * doc/extend.texi (Deprecated Features): Remove mention of
12495 long-deleted deprecations.
12496
12497 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12498
12499 PR jit/84288
12500 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
12501 * configure: Regenerate.
12502
12503 2018-03-21 Tom de Vries <tom@codesourcery.com>
12504
12505 PR tree-optimization/83126
12506 * tree-parloops.c (num_phis): New function.
12507 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
12508
12509 2018-03-21 Nathan Sidwell <nathan@acm.org>
12510
12511 * doc/extend.texi (Deprecated Features): Update deprecated flags,
12512 mention anon-struct/union members and trailing attributes.
12513
12514 2018-03-21 Bin Cheng <bin.cheng@arm.com>
12515
12516 PR tree-optimization/84969
12517 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
12518 builtin memset partitions if they set different rhs values.
12519
12520 2018-03-21 Jakub Jelinek <jakub@redhat.com>
12521
12522 PR rtl-optimization/84989
12523 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
12524 VEC_DUPLICATE with scalar result mode.
12525
12526 2018-03-21 Martin Liska <mliska@suse.cz>
12527
12528 PR ipa/84963
12529 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
12530 not intended return statement.
12531
12532 2018-03-21 Martin Liska <mliska@suse.cz>
12533
12534 PR target/84988
12535 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
12536 (chkp_find_bound_slots_1): Limit number of iterations.
12537
12538 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
12539
12540 PR target/84838
12541 * Minor grammar fixes for x86 options.
12542
12543 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12544
12545 PR debug/84875
12546 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
12547 holding REG_CFA_RESTORE notes, instead turn them into a USE.
12548
12549 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
12550
12551 PR target/83789
12552 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
12553 (altivec_lvx_<mode>_1op): Likewise.
12554 (altivec_stvx_<mode>_2op): Likewise.
12555 (altivec_stvx_<mode>_1op): Likewise.
12556 (altivec_lvx_<VM2:mode>): New define_expand.
12557 (altivec_stvx_<VM2:mode>): Likewise.
12558 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
12559 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12560 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
12561 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
12562 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
12563 (rs6000_gen_lvx): Likewise.
12564 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
12565 (altivec_expand_stv_builtin): Likewise.
12566 (altivec_expand_builtin): Likewise.
12567 * config/rs6000/vector.md: Likewise.
12568
12569 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12570
12571 PR target/82518
12572 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
12573 BYTES_BIG_ENDIAN.
12574
12575 2018-03-20 Richard Biener <rguenther@suse.de>
12576
12577 PR target/84986
12578 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
12579 sign-conversions as zero, fall back to standard scalar_stmt
12580 cost for the rest.
12581
12582 2018-03-20 Martin Liska <mliska@suse.cz>
12583
12584 PR ipa/84825
12585 * predict.c (rebuild_frequencies): Handle case when we have
12586 PROFILE_ABSENT, but flag_guess_branch_prob is false.
12587
12588 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12589
12590 PR target/84990
12591 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
12592 flag_section_anchors.
12593 * varasm.c (use_blocks_for_decl_p): Remove hack for
12594 dw2_force_const_mem.
12595
12596 PR target/84845
12597 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
12598 to ...
12599 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
12600 be created, use lowpart_subreg of operands[0] rather than operands[0]
12601 itself.
12602 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
12603 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
12604 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
12605 and n constraint instead of aarch64_shift_imm_di and Usd.
12606 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
12607 (*aarch64_<optab>_reg_minus<mode>3): ... this.
12608
12609 2018-03-20 Sudakshina Das <sudi.das@arm.com>
12610
12611 PR target/82989
12612 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
12613 to favor GPR over NEON registers.
12614 (<shift>di3_neon): Likewise.
12615
12616 2018-03-20 Tom de Vries <tom@codesourcery.com>
12617
12618 PR target/84952
12619 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
12620 (nvptx_process_pars): Emit bar.sync asap and alap.
12621
12622 2018-03-20 Tom de Vries <tom@codesourcery.com>
12623
12624 PR target/84954
12625 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
12626 seen_label if seen_label is already set.
12627
12628 2018-03-20 Jakub Jelinek <jakub@redhat.com>
12629
12630 PR target/84945
12631 * config/i386/i386.c (fold_builtin_cpu): For features above 31
12632 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
12633 Use 1U instead of 1. Formatting fixes.
12634
12635 PR c/84953
12636 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
12637 instead of TREE_TYPE (s1) for the return value.
12638
12639 2018-03-19 Jakub Jelinek <jakub@redhat.com>
12640
12641 PR tree-optimization/84946
12642 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
12643 bitsize + bitsize in poly_uint64 rather than poly_int64.
12644
12645 PR sanitizer/78651
12646 * dwarf2asm.c: Include fold-const.c.
12647 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
12648 of decl rather than decl itself.
12649
12650 PR rtl-optimization/84643
12651 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
12652
12653 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
12654
12655 PR sanitizer/78651
12656 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
12657 calling assemble_variable.
12658
12659 2018-03-19 Sudakshina Das <sudi.das@arm.com>
12660
12661 PR target/81647
12662 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
12663 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
12664
12665 2018-03-19 Jim Wilson <jimw@sifive.com>
12666
12667 PR bootstrap/84856
12668 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
12669 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
12670 (riscv_first_stack_step): Likewise.
12671 (riscv_option_override): Use STACK_BOUNDARY instead of
12672 MIN_STACK_BOUNDARY.
12673 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
12674 MIN_STACK_BOUNDARY.
12675 (BIGGEST_ALIGNMENT): Set to 128.
12676 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
12677 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
12678 STACK_BOUNDARY.
12679
12680 2018-03-19 Richard Biener <rguenther@suse.de>
12681
12682 PR tree-optimization/84933
12683 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
12684 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
12685
12686 2018-03-19 Richard Biener <rguenther@suse.de>
12687
12688 PR tree-optimization/84859
12689 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
12690 (cond_if_else_store_replacement): Perform sinking operation on
12691 single-store BBs regardless of MAX_STORES_TO_SINK setting.
12692 Generalize what a BB with a single eligible store is.
12693
12694 2018-03-19 Richard Biener <rguenther@suse.de>
12695
12696 PR tree-optimization/84929
12697 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
12698 chrec_is_positive against non-chrec arg.
12699
12700 2018-03-19 Tamar Christina <tamar.christina@arm.com>
12701
12702 PR target/84711
12703 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
12704
12705 2018-03-18 Martin Liska <mliska@suse.cz>
12706
12707 PR rtl-optimization/84635
12708 * regrename.c (build_def_use): Use matches_mode only when
12709 matches >= 0.
12710
12711 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
12712
12713 PR tree-optimization/84913
12714 * tree-vect-loop.c (vectorizable_reduction): Don't try to
12715 vectorize chains of COND_EXPRs.
12716
12717 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12718
12719 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
12720
12721 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12722
12723 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
12724
12725 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
12726
12727 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
12728
12729 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12730 Kito Cheng <kito.cheng@gmail.com>
12731
12732 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
12733 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
12734 (nds32_adjust_reg_alloc_order): New function.
12735 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
12736
12737 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
12738
12739 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
12740 nds32_print_operand, nds32_print_operand_address): Use
12741 HOST_WIDE_INT_PRINT_DEC instead.
12742
12743 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
12744
12745 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
12746
12747 2018-03-17 Jakub Jelinek <jakub@redhat.com>
12748
12749 PR target/84902
12750 * config/i386/i386.c (initial_ix86_tune_features,
12751 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
12752 unsigned long long.
12753 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
12754 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
12755 rather than 1u << ix86_tune. Formatting fix.
12756 (ix86_option_override_internal): Change ix86_arch_mask from
12757 unsigned int to unsigned HOST_WIDE_INT, initialize to
12758 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
12759 (ix86_function_specific_restore): Likewise.
12760
12761 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12762
12763 PR target/84899
12764 * postreload.c (reload_combine_recognize_pattern): Perform
12765 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
12766 truncate_int_for_mode the result for the destination's mode.
12767
12768 PR c/84909
12769 * hsa-gen.c (mem_type_for_type): Fix comment typo.
12770 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
12771 Likewise.
12772 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
12773 Likewise.
12774
12775 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
12776
12777 PR target/84876
12778 * lra-assigns.c (lra_split_hard_reg_for): Don't use
12779 regno_allocno_class_array and sorted_pseudos.
12780 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
12781 insns where regno is used.
12782
12783 2018-03-16 Martin Liska <mliska@suse.cz>
12784
12785 PR ipa/84833
12786 * multiple_target.c (create_dispatcher_calls): Redirect
12787 reference in the symbol table.
12788
12789 2018-03-16 Martin Liska <mliska@suse.cz>
12790
12791 PR ipa/84722
12792 * multiple_target.c (create_dispatcher_calls): Redirect also
12793 an alias.
12794
12795 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12796
12797 PR c++/79937
12798 PR c++/82410
12799 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
12800 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
12801 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
12802
12803 2018-03-16 Julia Koval <julia.koval@intel.com>
12804
12805 * doc/invoke.texi (Skylake Server): Add CLWB.
12806 Cannonlake): Remove CLWB.
12807
12808 2018-03-16 Jakub Jelinek <jakub@redhat.com>
12809
12810 PR tree-optimization/84841
12811 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
12812 1 << 3.
12813 (FLOAT_ONE_CONST_TYPE): Define.
12814 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
12815 (sort_by_operand_rank): Put entries with higher constant_type last
12816 rather than first to match comments.
12817
12818 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
12819
12820 * config/nios2/nios2.md (movsi_internal): Fix thinko in
12821 split predicate.
12822
12823 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12824
12825 PR c++/79085
12826 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
12827 check and use address of target always.
12828
12829 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
12830
12831 PR target/84574
12832 * config/i386/i386.c (indirect_thunk_needed): Update comments.
12833 (indirect_thunk_bnd_needed): Likewise.
12834 (indirect_thunks_used): Likewise.
12835 (indirect_thunks_bnd_used): Likewise.
12836 (indirect_return_needed): New.
12837 (indirect_return_bnd_needed): Likewise.
12838 (output_indirect_thunk_function): Add a bool argument for
12839 function return.
12840 (output_indirect_thunk_function): Don't generate alias for
12841 function return thunk.
12842 (ix86_code_end): Call output_indirect_thunk_function to generate
12843 function return thunks.
12844 (ix86_output_function_return): Set indirect_return_bnd_needed
12845 and indirect_return_needed instead of indirect_thunk_bnd_needed
12846 and indirect_thunk_needed.
12847
12848 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
12849
12850 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
12851 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
12852 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
12853
12854 2018-03-15 David Malcolm <dmalcolm@redhat.com>
12855 Paul Hua <paul.hua.gm@gmail.com>
12856
12857 PR c/84852
12858 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
12859
12860 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
12861
12862 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
12863 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
12864 resp. SFmode cases.
12865
12866 2018-03-15 Tamar Christina <tamar.christina@arm.com>
12867
12868 PR target/84711
12869 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12870 instead of GET_MODE_SIZE when comparing Units.
12871
12872 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12873
12874 PR target/68256
12875 * varasm.c (hash_section): Return an unchangeble hash value
12876 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
12877 Return !aarch64_can_use_per_function_literal_pools_p ().
12878
12879 2018-03-15 Jakub Jelinek <jakub@redhat.com>
12880
12881 PR target/84860
12882 * optabs.c (emit_conditional_move): Pass address of cmode's copy
12883 rather than address of cmode as last argument to prepare_cmp_insn.
12884
12885 2018-03-15 Julia Koval <julia.koval@intel.com>
12886
12887 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
12888 F_AVX512VNNI, F_AVX512BITALG): New.
12889
12890 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
12891
12892 PR target/83451
12893 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
12894 insn for floating-point loads and stores.
12895
12896 2018-03-14 Carl Love <cel@us.ibm.com>
12897
12898 * config/rs6000/rs6000-c.c: Add macro definitions for
12899 ALTIVEC_BUILTIN_VEC_PERMXOR.
12900 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
12901 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
12902 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
12903 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
12904 UNSPEC_VPERMXOR.
12905 * config/doc/extend.texi: Add prototypes for vec_permxor.
12906
12907 2018-03-14 David Malcolm <dmalcolm@redhat.com>
12908
12909 PR c/84852
12910 * diagnostic-show-locus.c (class layout_point): Convert m_line
12911 from int to linenum_type.
12912 (line_span::comparator): Use linenum "compare" function when
12913 comparing line numbers.
12914 (test_line_span): New function.
12915 (layout_range::contains_point): Convert param "row" from int to
12916 linenum_type.
12917 (layout_range::intersects_line_p): Likewise.
12918 (layout::will_show_line_p): Likewise.
12919 (layout::print_source_line): Likewise.
12920 (layout::should_print_annotation_line_p): Likewise.
12921 (layout::print_annotation_line): Likewise.
12922 (layout::print_leading_fixits): Likewise.
12923 (layout::annotation_line_showed_range_p): Likewise.
12924 (struct line_corrections): Likewise for field m_row.
12925 (line_corrections::line_corrections): Likewise for param "row".
12926 (layout::print_trailing_fixits): Likewise.
12927 (layout::get_state_at_point): Likewise.
12928 (layout::get_x_bound_for_row): Likewise.
12929 (layout::print_line): Likewise.
12930 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
12931 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
12932 * input.c (selftest::test_linenum_comparisons): New function.
12933 (selftest::input_c_tests): Call it.
12934 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
12935 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
12936 * selftest.h (ASSERT_GT): New macro.
12937 (ASSERT_GT_AT): New macro.
12938 (ASSERT_LT): New macro.
12939 (ASSERT_LT_AT): New macro.
12940
12941 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
12942
12943 PR rtl-optimization/84780
12944 * combine.c (distribute_links): Don't make a link based on pc_rtx.
12945
12946 2018-03-14 Martin Liska <mliska@suse.cz>
12947
12948 * tree.c (record_node_allocation_statistics): Use
12949 get_stats_node_kind.
12950 (get_stats_node_kind): New function extracted from
12951 record_node_allocation_statistics.
12952 (free_node): Use get_stats_node_kind.
12953
12954 2018-03-14 Richard Biener <rguenther@suse.de>
12955
12956 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
12957 that the value-set of ANTIC_IN doesn't grow.
12958
12959 Revert
12960 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
12961 member.
12962 (BB_VISITED_WITH_VISITED_SUCCS): New define.
12963 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
12964
12965 2018-03-14 Julia Koval <julia.koval@intel.com>
12966
12967 * config.gcc (icelake-client, icelake-server): New.
12968 (icelake): Remove.
12969 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
12970 (initial_ix86_arch_features): Ditto.
12971 (PTA_SKYLAKE): Add SGX.
12972 (PTA_ICELAKE): Remove.
12973 (PTA_ICELAKE_CLIENT): New.
12974 (PTA_ICELAKE_SERVER): New.
12975 (ix86_option_override_internal): Split up icelake on icelake client and
12976 icelake server.
12977 (get_builtin_code_for_version): Ditto.
12978 (fold_builtin_cpu): Ditto.
12979 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
12980 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
12981 * config/i386/i386.h (processor_type): Ditto.
12982 * doc/invoke.texi: Ditto.
12983
12984 2018-03-14 Jakub Jelinek <jakub@redhat.com>
12985
12986 PR sanitizer/83392
12987 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
12988 INTEGER_CST offset, add it together with bitpos / 8 and
12989 sign extend based on POINTER_SIZE.
12990
12991 PR target/84844
12992 Revert
12993 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
12994
12995 PR target/78090
12996 * config/i386/constraints.md (Yc): New register constraint.
12997 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
12998 Use Yc constraint for alternative 2 of operand 0. Remove
12999 preferred_for_speed attribute.
13000
13001 2018-03-14 Richard Biener <rguenther@suse.de>
13002
13003 PR tree-optimization/84830
13004 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
13005 with the old one to avoid oscillations.
13006
13007 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
13008
13009 PR target/83712
13010 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
13011 pseudos.
13012 (assign_by_spills): Return a flag of reload assignment failure.
13013 Do not process the reload assignment failures. Do not spill other
13014 reload pseudos if they has the same reg class. Update n if
13015 necessary.
13016 (lra_assign): Add a return arg. Set up from the result of
13017 assign_by_spills call.
13018 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13019 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13020 usage_insns if it is not NULL.
13021 (spill_hard_reg_in_range): New function.
13022 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13023 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13024 function prototypes.
13025 (lra_assign): Change prototype.
13026 * lra.c (lra): Add code to deal with fails by splitting hard reg
13027 live ranges.
13028
13029 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
13030
13031 * config/riscv/riscv.opt (mrelax): New option.
13032 * config/riscv/riscv.c (riscv_file_start): Emit ".option
13033 "norelax" when riscv_mrelax is disabled.
13034 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
13035
13036 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13037
13038 PR target/84743
13039 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
13040 reassociation for int modes.
13041
13042 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13043
13044 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
13045 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
13046 for big-endian.
13047 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
13048 * config/aarch64/aarch64-sve.md
13049 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
13050 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
13051 (*extend<mode><Vwide>2): Rename to...
13052 (aarch64_sve_extend<mode><Vwide>2): ...this.
13053 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
13054 renaming the old pattern to...
13055 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
13056 unsigned packs.
13057 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
13058 define_expand, renaming the old pattern to...
13059 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
13060 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
13061 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
13062 account when deciding which SVE instruction the optab should use.
13063 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
13064
13065 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13066
13067 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
13068 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
13069 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
13070 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
13071 (tlsdesc_small_<mode>): Turn a define_expand and use
13072 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
13073 (tlsdesc_small_advsimd_<mode>): ...this.
13074 (tlsdesc_small_sve_<mode>): New pattern.
13075
13076 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
13077
13078 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
13079 (UNSPEC_UMUL_HIGHPART): New constants.
13080 (MUL_HIGHPART): New int iteraor.
13081 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
13082 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
13083 define_expand.
13084 (*<su>mul<mode>3_highpart): New define_insn.
13085
13086 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13087
13088 PR lto/84805
13089 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13090 incomplete types.
13091
13092 2018-03-13 Martin Liska <mliska@suse.cz>
13093
13094 PR ipa/84658.
13095 * (sem_item_optimizer::sem_item_optimizer): Initialize new
13096 vector.
13097 (sem_item_optimizer::~sem_item_optimizer): Release it.
13098 (sem_item_optimizer::merge_classes): Register variable aliases.
13099 (sem_item_optimizer::fixup_pt_set): New function.
13100 (sem_item_optimizer::fixup_points_to_sets): Likewise.
13101 * ipa-icf.h: Declare new variables and functions.
13102
13103 2018-03-13 Jakub Jelinek <jakub@redhat.com>
13104
13105 PR middle-end/84834
13106 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
13107 integer_pow2p@2 and test integer_pow2p in condition.
13108 (A < 0 ? C : 0): Similarly for @1.
13109
13110 PR middle-end/84831
13111 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
13112 characters starting at p contain '\0' character, don't look beyond
13113 that.
13114
13115 PR target/84827
13116 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
13117 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
13118
13119 PR target/84828
13120 * reg-stack.c (change_stack): Change update_end var from int to
13121 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
13122 also call set_block_for_insn on the newly added insns and rescan.
13123
13124 PR target/84786
13125 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
13126 on the last operand.
13127
13128 PR c++/84704
13129 * tree.c (stabilize_reference_1): Return save_expr (e) for
13130 STATEMENT_LIST even if it doesn't have side-effects.
13131
13132 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
13133
13134 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
13135
13136 2018-03-12 Renlin Li <renlin.li@arm.com>
13137
13138 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
13139 aarch64_output_scalar_simd_mov_immediate.
13140
13141 2018-03-12 Martin Sebor <msebor@redhat.com>
13142
13143 PR tree-optimization/83456
13144 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
13145 for perfectly overlapping calls to memcpy.
13146 (gimple_fold_builtin_memory_chk): Same.
13147 (gimple_fold_builtin_strcpy): Handle no-warning.
13148 (gimple_fold_builtin_stxcpy_chk): Same.
13149 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
13150
13151 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13152
13153 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
13154 parameter. Use it for SFmode.
13155 (rs6000_function_arg_advance_1): Adjust.
13156 (rs6000_function_arg): Adjust.
13157 (rs6000_gimplify_va_arg): Pass false for that new parameter.
13158
13159 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
13160
13161 PR rtl-optimization/84169
13162 PR rtl-optimization/84780
13163 * combine.c (can_combine_p): Check for a 2-insn combination whether
13164 the destination register is used between the two insns, too.
13165
13166 2018-03-12 Richard Biener <rguenther@suse.de>
13167
13168 PR tree-optimization/84803
13169 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
13170 for refs DR analysis didn't process.
13171
13172 2018-03-12 Richard Biener <rguenther@suse.de>
13173
13174 PR tree-optimization/84777
13175 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
13176 force-vectorize loops ignore whether we are optimizing for size.
13177
13178 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
13179
13180 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
13181 (TARGET_MD_ASM_ADJUST): Define.
13182
13183 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
13184 Kito Cheng <kito.cheng@gmail.com>
13185 Chung-Ju Wu <jasonwucj@gmail.com>
13186
13187 * config/nds32/nds32.c (nds32_compute_stack_frame,
13188 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
13189 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
13190 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
13191 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
13192 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
13193 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
13194 * config/nds32/nds32.md (prologue, epilogue): Use macro
13195 NDS32_V3PUSH_AVAILABLE_P to do checking.
13196
13197 2018-03-11 Jakub Jelinek <jakub@redhat.com>
13198
13199 PR debug/58150
13200 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
13201 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
13202 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
13203 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
13204 addition of most attributes on !orig_type_die or the attribute not
13205 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
13206
13207 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13208 Chung-Ju Wu <jasonwucj@gmail.com>
13209
13210 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
13211 __NDS32_VH__ macro.
13212 * config/nds32/nds32.opt (mvh): New option.
13213
13214 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13215 Chung-Ju Wu <jasonwucj@gmail.com>
13216
13217 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
13218 function.
13219 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
13220 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
13221 definition.
13222
13223 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
13224 Chung-Ju Wu <jasonwucj@gmail.com>
13225
13226 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
13227 function.
13228 * config/nds32/nds32-multiple.md (strlensi): New pattern.
13229 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
13230
13231 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
13232 Kito Cheng <kito.cheng@gmail.com>
13233 Chung-Ju Wu <jasonwucj@gmail.com>
13234
13235 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
13236 UNSPEC_FFMISM and UNSPEC_FLMISM.
13237 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
13238 for ffb, ffmism and flmism.
13239 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
13240 (unspec_ffmism): Ditto.
13241 (unspec_flmism): Ditto.
13242 (nds32_expand_builtin_impl): Check if string extension is available.
13243 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
13244 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
13245
13246 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
13247
13248 Reverting patch:
13249 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13250
13251 PR target/83712
13252 * lra-assigns.c (assign_by_spills): Return a flag of reload
13253 assignment failure. Do not process the reload assignment
13254 failures. Do not spill other reload pseudos if they has the same
13255 reg class.
13256 (lra_assign): Add a return arg. Set up from the result of
13257 assign_by_spills call.
13258 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13259 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13260 usage_insns if it is not NULL.
13261 (spill_hard_reg_in_range): New function.
13262 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13263 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13264 function prototypes.
13265 (lra_assign): Change prototype.
13266 * lra.c (lra): Add code to deal with fails by splitting hard reg
13267 live ranges.
13268
13269 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
13270
13271 PR target/84807
13272 * config/i386/i386.opt: Replace Enforcment with Enforcement.
13273
13274 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
13275
13276 PR debug/84620
13277 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
13278 (dw_val_node): Add val_symbolic_view.
13279 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
13280 (symview_upper_bound): New.
13281 (new_line_info_table): Initialize symviews_since_reset.
13282 (dwarf2out_source_line): Count symviews_since_reset and set
13283 symview_upper_bound.
13284 (dw_val_equal_p): Handle symview.
13285 (add_AT_symview): New.
13286 (print_dw_val): Handle symview.
13287 (attr_checksum, attr_checksum_ordered): Likewise.
13288 (same_dw_val_p, size_of_die): Likewise.
13289 (value_format, output_die): Likewise.
13290 (add_high_low_attributes): Use add_AT_symview for entry_view.
13291 (dwarf2out_finish): Reset symview_upper_bound, clear
13292 zero_view_p.
13293
13294 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
13295
13296 PR target/83969
13297 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
13298 Add strict argument and use it.
13299 (rs6000_split_multireg_move): Update for new strict argument.
13300 (mem_operand_gpr): Disallow all non-offsettable addresses.
13301 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
13302
13303 2018-03-09 Jakub Jelinek <jakub@redhat.com>
13304
13305 PR target/84772
13306 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
13307 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
13308 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
13309
13310 PR c++/84767
13311 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
13312 decl, use remap_type if we want to use the type.
13313
13314 2018-03-09 Martin Sebor <msebor@redhat.com>
13315
13316 PR tree-optimization/84526
13317 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
13318 Remove dead code.
13319 (builtin_access::generic_overlap): Be prepared to handle non-array
13320 base objects.
13321
13322 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
13323
13324 PR rtl-optimization/84682
13325 * lra-constraints.c (process_address_1): Check is_address flag
13326 for address constraints.
13327 (process_alt_operands): Likewise.
13328 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
13329 preprocess_constraints.
13330 * recog.h (preprocess_constraints): Add oploc parameter.
13331 Adjust callers.
13332 * recog.c (preprocess_constraints): Test address_operand for
13333 CT_ADDRESS constraints.
13334
13335 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
13336
13337 PR target/83712
13338 * lra-assigns.c (assign_by_spills): Return a flag of reload
13339 assignment failure. Do not process the reload assignment
13340 failures. Do not spill other reload pseudos if they has the same
13341 reg class.
13342 (lra_assign): Add a return arg. Set up from the result of
13343 assign_by_spills call.
13344 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
13345 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
13346 usage_insns if it is not NULL.
13347 (spill_hard_reg_in_range): New function.
13348 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
13349 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
13350 function prototypes.
13351 (lra_assign): Change prototype.
13352 * lra.c (lra): Add code to deal with fails by splitting hard reg
13353 live ranges.
13354
13355 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13356
13357 PR target/83193
13358 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
13359 Accept complain bool parameter. Only emit errors if it is true.
13360 (arm_parse_cpu_option_name): Likewise.
13361 (arm_target_thumb_only): Adjust callers of the above.
13362 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
13363 prototype to take a default true bool parameter.
13364 (arm_parse_arch_option_name): Likewise.
13365
13366 2018-03-09 David Malcolm <dmalcolm@redhat.com>
13367 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13368
13369 PR jit/64089
13370 PR jit/84288
13371 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
13372 * configure: Regenerate.
13373 * configure.ac ("linker --version-script option"): New.
13374 ("linker soname option"): New.
13375
13376 2018-03-09 Richard Biener <rguenther@suse.de>
13377
13378 PR tree-optimization/84775
13379 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
13380 immediate uses of predicate stmts and mark them modified.
13381
13382 Revert
13383 PR tree-optimization/84178
13384 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13385 to caller.
13386 (version_loop_for_if_conversion): Delay update_ssa call.
13387 (tree_if_conversion): Delay update_ssa until after predicate
13388 insertion.
13389
13390 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
13391
13392 PR target/84763
13393 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
13394 when the function accesses prior frames.
13395
13396 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13397
13398 PR debug/84456
13399 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
13400 gen_llsym, otherwise call maybe_gen_llsym.
13401
13402 PR inline-asm/84742
13403 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
13404 has ',' character inside of it.
13405
13406 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13407
13408 PR target/84748
13409 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
13410 as clobbering CC_REGNUM.
13411
13412 2018-03-08 Richard Biener <rguenther@suse.de>
13413
13414 PR middle-end/84552
13415 * tree-scalar-evolution.c: Include tree-into-ssa.h.
13416 (follow_copies_to_constant): Do not follow SSA names registered
13417 for update.
13418
13419 2018-03-08 Richard Biener <rguenther@suse.de>
13420
13421 PR tree-optimization/84178
13422 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
13423 to caller.
13424 (version_loop_for_if_conversion): Delay update_ssa call.
13425 (tree_if_conversion): Delay update_ssa until after predicate
13426 insertion.
13427
13428 2018-03-08 David Malcolm <dmalcolm@redhat.com>
13429
13430 PR tree-optimization/84178
13431 * tree-if-conv.c (release_bb_predicate): Remove the
13432 the assertion that the stmts have NULL use_ops.
13433 Discard the statements, asserting that they haven't
13434 yet been added to a BB.
13435
13436 2018-03-08 Richard Biener <rguenther@suse.de>
13437
13438 PR tree-optimization/84746
13439 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
13440 (phi_translate): Pass in destination ANTIC_OUT set.
13441 (phi_translate_1): Likewise. For a simplified result lookup
13442 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
13443 (phi_translate_set): Adjust.
13444 (do_pre_regular_insertion): Likewise.
13445 (do_pre_partial_partial_insertion): Likewise.
13446
13447 2018-03-08 Martin Liska <mliska@suse.cz>
13448
13449 PR gcov-profile/84735
13450 * doc/gcov.texi: Document usage of profile files.
13451 * gcov-io.h: Document changes in the format.
13452
13453 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
13454
13455 PR debug/84404
13456 PR debug/84408
13457 * dwarf2out.c (struct dw_line_info_table): Update comments for
13458 view == -1.
13459 (FORCE_RESET_NEXT_VIEW): New.
13460 (FORCE_RESETTING_VIEW_P): New.
13461 (RESETTING_VIEW_P): Check for -1 too.
13462 (ZERO_VIEW_P): Likewise.
13463 (new_line_info_table): Force-reset next view.
13464 (dwarf2out_begin_function): Likewise.
13465 (dwarf2out_source_line): Simplify zero_view_p initialization.
13466 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
13467 view directly. Omit view when omitting .loc at line 0.
13468
13469 2018-03-08 Jakub Jelinek <jakub@redhat.com>
13470
13471 PR tree-optimization/84740
13472 * tree-switch-conversion.c (process_switch): Call build_constructors
13473 only if info.phi_count is non-zero.
13474
13475 PR tree-optimization/84739
13476 * tree-tailcall.c (find_tail_calls): Check call arguments against
13477 DECL_ARGUMENTS (current_function_decl) rather than
13478 DECL_ARGUMENTS (func) when checking for tail recursion.
13479
13480 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13481
13482 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
13483 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
13484 Volker Reichelt's entry and add entries for people that perform
13485 GCC fuzzy testing and report numerous bugs.
13486
13487 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
13488
13489 PR target/82411
13490 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
13491 readonly data in sdata, if that is disabled.
13492 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
13493 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
13494 -mreadonly-in-sdata option.
13495
13496 2018-03-07 Martin Sebor <msebor@redhat.com>
13497
13498 PR tree-optimization/84468
13499 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
13500 basic block when looking for nul assignment.
13501
13502 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
13503
13504 PR target/84277
13505 * except.h (output_function_exception_table): Adjust prototype.
13506 * except.c (output_function_exception_table): Remove FNNAME parameter
13507 and add SECTION parameter. Ouput one part of the table at a time.
13508 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
13509 the first part of the exception table and emit unwind directives.
13510 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
13511 (i386_pe_seh_cold_init): Likewise.
13512 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
13513 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
13514 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
13515 (ix86_output_call_insn): Emit a nop in one more case for SEH.
13516 * config/i386/winnt.c: Include except.h.
13517 (struct seh_frame_state): Add reg_offset, after_prologue and
13518 in_cold_section fields.
13519 (i386_pe_seh_end_prologue): Set seh->after_prologue.
13520 (i386_pe_seh_cold_init): New function.
13521 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
13522 to seh->in_cold_section.
13523 (seh_emit_push): Record the offset of the push.
13524 (seh_emit_save): Record the offet of the save.
13525 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
13526 Test seh->after_prologue to disregard the epilogue.
13527 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
13528 (i386_pe_end_cold_function): New function.
13529
13530 2018-03-07 Jakub Jelinek <jakub@redhat.com>
13531
13532 PR fortran/84565
13533 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
13534 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
13535
13536 PR c++/84704
13537 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
13538 on tmp_var.
13539 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
13540 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
13541
13542 PR middle-end/84723
13543 * multiple_target.c: Include tree-inline.h and intl.h.
13544 (expand_target_clones): Diagnose and fail if node->definition and
13545 !tree_versionable_function_p (node->decl).
13546
13547 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
13548
13549 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
13550 sprint_ul.
13551 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
13552 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
13553 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
13554
13555 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13556
13557 PR target/84710
13558 * combine.c (try_combine): Use reg_or_subregno instead of handling
13559 just paradoxical SUBREGs and REGs.
13560
13561 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
13562
13563 * config/arc/arc.c (arc_finalize_pic): Remove function.
13564 (arc_must_save_register): We use single base PIC register, remove
13565 checks to save/restore the PIC register.
13566 (arc_expand_prologue): Likewise.
13567 * config/arc/arc-protos.h (arc_set_default_type_attributes):
13568 Remove.
13569 (arc_verify_short): Likewise.
13570 (arc_attr_type): Likewise.
13571 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
13572 (walk_stores): Likewise.
13573 (arc_address_cost): Make it static.
13574 (arc_verify_short): Likewise.
13575 (branch_dest): Likewise.
13576 (arc_attr_type): Likewise.
13577 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
13578 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
13579 (arc_final_prescan_insn): Remove inserting the nops due to
13580 hardware hazards. It is done in reorg step.
13581 (insn_length_variant_t): Remove.
13582 (insn_length_parameters_t): Likewise.
13583 (arc_insn_length_parameters): Likewise.
13584 (arc_get_insn_variants): Likewise.
13585 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
13586
13587 2018-03-06 Jakub Jelinek <jakub@redhat.com>
13588
13589 PR inline-asm/84683
13590 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
13591 assertion failure.
13592
13593 PR tree-optimization/84687
13594 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
13595 on new_node->decl.
13596 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
13597
13598 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13599
13600 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
13601 Rename to ppc_speculation_barrier.
13602 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
13603 __builtin_ppc_speculation_barrier.
13604
13605 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13606
13607 PR target/84700
13608 * combine.c (combine_simplify_rtx): Don't try to simplify if
13609 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
13610 are equal to x.
13611
13612 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
13613
13614 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
13615 to 32 bytes when compiling for POWER9.
13616
13617 2018-03-05 Jakub Jelinek <jakub@redhat.com>
13618
13619 PR target/84564
13620 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
13621 regparm >= 3 with no arg reg available also for calls with
13622 flag_force_indirect_call. Pass decl to ix86_function_regparm.
13623
13624 PR target/84524
13625 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
13626 orig,vex.
13627 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
13628
13629 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
13630
13631 PR target/84264
13632 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
13633
13634 2018-03-05 Richard Biener <rguenther@suse.de>
13635
13636 PR tree-optimization/84486
13637 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
13638 When inserting a __builtin_assume_aligned call set the LHS
13639 SSA name alignment info accordingly.
13640
13641 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
13642
13643 PR tree-optimization/84114
13644 * config/aarch64/aarch64.c (aarch64_reassociation_width)
13645 Avoid reassociation of FLOAT_MODE addition.
13646
13647 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
13648
13649 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
13650 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
13651 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
13652 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
13653 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
13654 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
13655 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
13656 and -mwbnoinvd.
13657 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
13658 __builtin_ia32_wbinvd): New builtins.
13659 (SPECIAL_ARGS2): New.
13660 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
13661 (SPECIAL_ARGS2): New.
13662 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
13663 (ix86_valid_target_attribute_inner_p): Ditto.
13664 (ix86_init_mmx_sse_builtins): Add special_args2.
13665 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
13666 TARGET_WBNOINVD_P): New.
13667 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
13668 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
13669 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
13670 * config/i386/immintrin.h (_wbinvd): New intrinsic.
13671 * config/i386/pconfigintrin.h: New file.
13672 * config/i386/wbnoinvdintrin.h: Ditto.
13673 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
13674 wbnoinvdintrin.h.
13675 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
13676
13677 2018-03-05 Richard Biener <rguenther@suse.de>
13678
13679 PR tree-optimization/84670
13680 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
13681 member.
13682 (BB_VISITED_WITH_VISITED_SUCCS): New define.
13683 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
13684 (compute_antic_aux): Only assert the number of values in ANTIC_IN
13685 doesn't grow if all successors (recursively) were visited at least
13686 once.
13687
13688 2018-03-05 Richard Biener <rguenther@suse.de>
13689
13690 PR tree-optimization/84650
13691 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
13692 if executed in the loop pipeline.
13693
13694 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
13695
13696 * doc/configfiles.texi (Configuration Files): Move info about
13697 conditionalizing $target-protos.h to...
13698 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
13699 differs from $target-protos.h.
13700
13701 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
13702 Chung-Ju Wu <jasonwucj@gmail.com>
13703
13704 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
13705 * config/nds32/nds32-multiple.md (setmemsi): Define.
13706 * config/nds32/nds32-memory-manipulation.c
13707 (nds32_gen_dup_4_byte_to_word_value): New.
13708 (emit_setmem_word_loop): New.
13709 (emit_setmem_byte_loop): New.
13710 (nds32_expand_setmem_loop): New.
13711 (nds32_expand_setmem_loop_v3m): New.
13712 (nds32_expand_setmem_unroll): New.
13713 (nds32_expand_setmem): New.
13714
13715 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13716 Chung-Ju Wu <jasonwucj@gmail.com>
13717
13718 * config/nds32/nds32-memory-manipulation.c
13719 (nds32_emit_load_store): New.
13720 (nds32_emit_post_inc_load_store): New.
13721 (nds32_emit_mem_move): New.
13722 (nds32_emit_mem_move_block): New.
13723 (nds32_expand_movmemsi_loop_unknown_size): New.
13724 (nds32_expand_movmemsi_loop_known_size): New.
13725 (nds32_expand_movmemsi_loop): New.
13726 (nds32_expand_movmemsi_unroll): New.
13727 (nds32_expand_movmemqi): Rename ...
13728 (nds32_expand_movmemsi): ... to this.
13729 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
13730 (movmemsi): ... to this.
13731 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
13732 (nds32_expand_movmemsi): ... to this.
13733
13734 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13735 Monk Chiang <sh.chiang04@gmail.com>
13736 Chung-Ju Wu <jasonwucj@gmail.com>
13737
13738 * config/nds32/nds32-protos.h
13739 (nds32_expand_load_multiple): New arguments.
13740 (nds32_expand_store_multiple): Ditto.
13741 (nds32_valid_multiple_load_store): Rename ...
13742 (nds32_valid_multiple_load_store_p): ... to this.
13743 * config/nds32/nds32-memory-manipulation.c
13744 (nds32_expand_load_multiple): Refine implementation.
13745 (nds32_expand_store_multiple): Ditto.
13746 * config/nds32/nds32-multiple.md
13747 (load_multiple): Update nds32_expand_load_multiple interface.
13748 (store_multiple): Update nds32_expand_store_multiple interface.
13749 * config/nds32/nds32-predicates.c
13750 (nds32_valid_multiple_load_store): Rename ...
13751 (nds32_valid_multiple_load_store_p): ... to this and refine
13752 implementation.
13753 * config/nds32/predicates.md
13754 (nds32_load_multiple_and_update_address_operation): New predicate.
13755 (nds32_store_multiple_and_update_address_operation): New predicate.
13756
13757 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
13758 Chung-Ju Wu <jasonwucj@gmail.com>
13759
13760 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
13761 (combo): New attribute.
13762 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
13763
13764 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
13765
13766 * config/nds32/nds32.opt: Change -mcmodel= default value.
13767
13768 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
13769 Monk Chiang <sh.chiang04@gmail.com>
13770 Chung-Ju Wu <jasonwucj@gmail.com>
13771
13772 * config/nds32/constants.md (unspec_element): New enum.
13773 * config/nds32/constraints.md (Umw): New constraint.
13774 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
13775 * config/nds32/nds32-intrinsic.md: Likewise.
13776 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
13777 (nds32_valid_smw_lwm_base_p): New.
13778 (nds32_output_smw_single_word): New.
13779 (nds32_output_lmw_single_word): New.
13780 (nds32_expand_unaligned_load): New.
13781 (nds32_expand_unaligned_store): New.
13782 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
13783 (nds32_output_smw_single_word): Declare.
13784 (nds32_output_lmw_single_word): Declare.
13785 (nds32_expand_unaligned_load): Declare.
13786 (nds32_expand_unaligned_store): Declare.
13787 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
13788 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
13789 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
13790 NDS32_BUILTIN_UASTORE_DW.
13791 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
13792 predicate.
13793
13794 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
13795 Kito Cheng <kito.cheng@gmail.com>
13796 Chung-Ju Wu <jasonwucj@gmail.com>
13797
13798 * config/nds32/nds32-intrinsic.c
13799 (nds32_expand_builtin_null_ftype_reg): Delete.
13800 (nds32_expand_builtin_reg_ftype_imm): Ditto.
13801 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
13802 (nds32_read_argument): New.
13803 (nds32_legitimize_target): Ditto.
13804 (nds32_legitimize_argument): Ditto.
13805 (nds32_check_constant_argument): Ditto.
13806 (nds32_expand_unop_builtin): Ditto.
13807 (nds32_expand_unopimm_builtin): Ditto.
13808 (nds32_expand_binop_builtin): Ditto.
13809 (nds32_builtin_decl_impl): Ditto.
13810 (builtin_description): Ditto.
13811 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
13812 (nds32_init_builtins_impl): Ditto.
13813 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
13814 (nds32_builtin_decl): New.
13815 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
13816 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
13817
13818 2018-03-02 Jeff Law <law@redhat.com>
13819
13820 * reorg.c (stop_search_p): Handle DEBUG_INSN.
13821 (redundant_insn, fill_simple_delay_slots): Likewise.
13822 (fill_slots_from_thread): Likewise.
13823 * resource.c (mark_referenced_resources): Likewise.
13824 (mark_set_resources, find_dead_or_set_registers): Likewise.
13825
13826 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13827
13828 * substring-locations.h (format_warning_va): Formatting fix for
13829 ATTRIBUTE_GCC_DIAG.
13830 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
13831 argument.
13832 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
13833 * substring-locations.c: Include intl.h.
13834 (format_warning_va): Turned into small wrapper around
13835 format_warning_n_va, renamed to ...
13836 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
13837 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
13838 use ngettext.
13839 (format_warning_at_substring_n): New function.
13840 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
13841 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
13842 format_warning_at_substring with just a shorter name instead of
13843 const function pointer.
13844 (fmtwarn_n): New function.
13845 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
13846 appropriate, get rid of all the fmtstr temporaries, move conditionals
13847 with G_() wrapped string literals directly into fmtwarn arguments,
13848 cast dir.len to (int), formatting fixes.
13849
13850 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
13851
13852 * doc/invoke.texi: Remove "Cilk Plus" references.
13853
13854 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13855 Richard Biener <rguenther@suse.de>
13856
13857 PR ipa/84628
13858 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
13859 for error or warning attributes if CALL_FROM_THUNK_P is set.
13860 Formatting fixes.
13861
13862 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13863
13864 PR target/56540
13865 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
13866 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
13867
13868 PR target/56540
13869 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
13870 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
13871
13872 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
13873 instead of -1U in last predictors element's probability member.
13874
13875 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13876
13877 PR ipa/83983
13878 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13879 arguments if they are comparable.
13880
13881 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13882
13883 PR tree-optimization/84634
13884 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
13885 masks and masked_loop_p with a single loop_masks, making sure it's
13886 null for bb vectorization.
13887
13888 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
13889
13890 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13891 (vect_analyze_data_ref_access): Use loop->safe_len rather than
13892 loop->force_vectorize to check whether there is no alias.
13893
13894 2018-03-02 Jakub Jelinek <jakub@redhat.com>
13895
13896 PR target/84614
13897 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
13898 prototypes.
13899 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
13900 comments.
13901 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
13902 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
13903 instead of a loop around prev_real_insn.
13904 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
13905 prev_real_insn.
13906
13907 PR inline-asm/84625
13908 * config/i386/i386.c (ix86_print_operand): Use conditional
13909 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
13910 zero vector.
13911
13912 2018-03-02 Richard Biener <rguenther@suse.de>
13913
13914 PR tree-optimization/84427
13915 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
13916 (bitmap_set_subtract_values): Rewrite to handle multiple
13917 exprs per value.
13918 (clean): Likewise.
13919 (prune_clobbered_mems): Likewise.
13920 (phi_translate): Take edge instead of pred/phiblock.
13921 (phi_translate_1): Likewise.
13922 (phi_translate_set): Likewise. Insert all translated
13923 exprs for a value into the set, keeping possibly multiple
13924 expressions per value.
13925 (compute_antic_aux): Adjust for phi_translate changes.
13926 When intersecting union the expressions and prune those
13927 not in the final value set, keeping possibly multiple
13928 expressions per value. Do not use value-insertion
13929 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
13930 all expressions. Add verification that the value-sets
13931 only shrink during iteration.
13932 (compute_partial_antic_aux): Adjust for the phi_translate changes.
13933 (do_pre_regular_insertion): Likewise.
13934 (do_pre_partial_partial_insertion): Likewise.
13935
13936 2018-03-02 Richard Biener <rguenther@suse.de>
13937
13938 PR target/82005
13939 * config/darwin.c (saved_debug_info_level): New static global.
13940 (darwin_asm_lto_start): Disable debug info generation for LTO out.
13941 (darwin_asm_lto_end): Restore debug info generation settings.
13942
13943 2018-03-01 Martin Liska <mliska@suse.cz>
13944
13945 PR sanitizer/82484
13946 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
13947 volatile arguments.
13948
13949 2018-03-01 Richard Biener <rguenther@suse.de>
13950
13951 PR debug/84645
13952 * dwarf2out.c (gen_variable_die): Properly handle late VLA
13953 type annotation with LTO when debug was disabled at compile-time.
13954
13955 2018-03-01 Matthew Fortune <mfortune@gmail.com>
13956
13957 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
13958 XINT with INTVAL.
13959 (mips_final_postscan_insn): Likewise.
13960
13961 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
13962
13963 PR rtl-optimization/84528
13964 * alias.c (init_alias_target): Add commentary.
13965 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
13966 a unique base value if the frame pointer is not eliminated
13967 to the stack pointer.
13968
13969 2018-03-01 Tom de Vries <tom@codesourcery.com>
13970
13971 PR rtl-optimization/83327
13972 * lra-int.h (hard_regs_spilled_into): Declare.
13973 * lra.c (hard_regs_spilled_into): Define.
13974 (init_reg_info): Init hard_regs_spilled_into.
13975 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
13976 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
13977 (process_bb_lives): Handle hard_regs_spilled_into.
13978 (lra_create_live_ranges_1): Before doing liveness propagation, clear
13979 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
13980
13981 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
13982
13983 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
13984 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
13985 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
13986 * config/rs6000/aix72.h: New file.
13987
13988 2018-02-28 Jakub Jelinek <jakub@redhat.com>
13989
13990 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
13991 instead of warning_at with conditional singular and plural messages
13992 where possible.
13993
13994 PR target/52991
13995 * stor-layout.c (update_alignment_for_field): For
13996 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
13997 && !DECL_PACKED (field), do the alignment update, just use
13998 only desired_align instead of MAX (type_align, desired_align)
13999 as the alignment.
14000 (place_field): Don't do known_align < desired_align handling
14001 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
14002 is non-NULL, instead do it after rli->prev_field handling and
14003 only if not within a bitfield word. For DECL_PACKED (field)
14004 use type_align of BITS_PER_UNIT.
14005
14006 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
14007
14008 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
14009 superfluous parentheses and trailing spaces.
14010
14011 2018-02-28 Richard Biener <rguenther@suse.de>
14012
14013 PR tree-optimization/84584
14014 * graphite-scop-detection.c (scop_detection::add_scop): Discard
14015 SCoPs with fake exit edge.
14016
14017 2018-02-28 Martin Liska <mliska@suse.cz>
14018
14019 PR testsuite/84597
14020 * timevar.c (timer::print): Fix format to properly print 100%
14021 values.
14022
14023 2018-02-28 Richard Biener <rguenther@suse.de>
14024
14025 PR middle-end/84607
14026 * genmatch.c (capture_info::walk_match): Do not mark
14027 captured expressions without operands as expr_p given
14028 they act more like predicates and should be subject to
14029 "lost tail" side-effect preserving.
14030
14031 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
14032
14033 PR rtl-optimization/81611
14034 * auto-inc-dec.c (attempt_change): Move dead note from
14035 mem_insn if it's the next use of regno
14036 (find_address): Take address use of reg holding
14037 non-incremented value. Add parm to limit search to the named
14038 reg only.
14039 (merge_in_block): Attempt to use a mem insn that is the next
14040 use of the original regno.
14041
14042 2018-02-27 Martin Sebor <msebor@redhat.com>
14043
14044 PR c++/83871
14045 * doc/invoke.texi (-Wmissing-attributes): New option.
14046 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
14047
14048 2018-02-27 Martin Sebor <msebor@redhat.com>
14049
14050 PR translation/84207
14051 * diagnostic-core.h (warning_n, error_n, inform_n): Change
14052 n argument to unsigned HOST_WIDE_INT.
14053 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
14054 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
14055 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
14056 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
14057
14058 2018-02-27 Richard Biener <rguenther@suse.de>
14059
14060 PR tree-optimization/84512
14061 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
14062 Do not use the estimate returned from record_stmt_cost for
14063 the scalar iteration cost but sum properly using add_stmt_cost.
14064
14065 2018-02-27 Richard Biener <rguenther@suse.de>
14066
14067 PR tree-optimization/84466
14068 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14069 Adjust last change to less strictly validate use operands.
14070
14071 2018-02-27 Martin Liska <mliska@suse.cz>
14072
14073 PR gcov-profile/84548
14074 * gcov.c (process_file): Allow partial overlap and consider it
14075 also as group functions.
14076 (output_lines): Properly calculate range of lines for a group.
14077
14078 2018-02-27 Martin Liska <mliska@suse.cz>
14079
14080 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
14081 'ggc' suffixes. Change first column width.
14082 (timer::print): Fix formatting of the column.
14083
14084 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
14085
14086 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
14087 preserve inline entry blocks for the sake of debug inline
14088 entry point markers alone.
14089 (remove_unused_locals): Suggest in comments a better place to
14090 force the preservation of inline entry blocks that are
14091 otherwise unused, but do not preserve them.
14092
14093 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14094
14095 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
14096
14097 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14098
14099 PR target/84039
14100 * config/i386/constraints.md (Bs): Replace
14101 ix86_indirect_branch_register with
14102 TARGET_INDIRECT_BRANCH_REGISTER.
14103 (Bw): Likewise.
14104 * config/i386/i386.md (indirect_jump): Likewise.
14105 (tablejump): Likewise.
14106 (*sibcall_memory): Likewise.
14107 (*sibcall_value_memory): Likewise.
14108 Peepholes of indirect call and jump via memory: Likewise.
14109 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
14110 (*sibcall_value_GOT_32): Likewise.
14111 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14112 (GOT_memory_operand): Likewise.
14113 (call_insn_operand): Likewise.
14114 (sibcall_insn_operand): Likewise.
14115 (GOT32_symbol_operand): Likewise.
14116 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
14117
14118 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14119
14120 PR rtl-optimization/83496
14121 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
14122 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
14123 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
14124 redundant insn, if any.
14125 (relax_delay_slots): Likewise.
14126 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
14127
14128 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
14129
14130 PR tree-optimization/83965
14131 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
14132 that grouped statements are part of a reduction chain. Return
14133 true if the statement is not marked as a reduction itself but
14134 is part of a group.
14135 (vect_recog_dot_prod_pattern): Don't check whether the statement
14136 is part of a group here.
14137 (vect_recog_sad_pattern): Likewise.
14138 (vect_recog_widen_sum_pattern): Likewise.
14139
14140 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
14141
14142 PR debug/84545
14143 * final.c (rest_of_clean_state): Also look for calls inside sequences.
14144
14145 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
14146
14147 PR target/84530
14148 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
14149 the bool argument.
14150 (ix86_output_indirect_function_return): New prototype.
14151 (ix86_split_simple_return_pop_internal): Likewise.
14152 * config/i386/i386.c (indirect_return_via_cx): New.
14153 (indirect_return_via_cx_bnd): Likewise.
14154 (indirect_thunk_name): Handle return va CX_REG.
14155 (output_indirect_thunk_function): Create alias for
14156 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
14157 (ix86_output_indirect_jmp): Remove the bool argument.
14158 (ix86_output_indirect_function_return): New function.
14159 (ix86_split_simple_return_pop_internal): Likewise.
14160 * config/i386/i386.md (*indirect_jump): Don't pass false
14161 to ix86_output_indirect_jmp.
14162 (*tablejump_1): Likewise.
14163 (simple_return_pop_internal): Change it to define_insn_and_split.
14164 Call ix86_split_simple_return_pop_internal to split it for
14165 -mfunction-return=.
14166 (simple_return_indirect_internal): Call
14167 ix86_output_indirect_function_return instead of
14168 ix86_output_indirect_jmp.
14169
14170 2018-02-26 Jakub Jelinek <jakub@redhat.com>
14171
14172 PR bootstrap/84405
14173 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
14174 memset and value initialization afterwards.
14175
14176 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
14177
14178 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
14179
14180 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14181
14182 PR target/84521
14183 * common/config/aarch64/aarch64-common.c
14184 (aarch_option_optimization_table[]): Switch
14185 off fomit-frame-pointer
14186
14187 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14188 Chung-Ju Wu <jasonwucj@gmail.com>
14189
14190 * config/nds32/nds32-multiple.md (load_multiple): Disallow
14191 volatile memory.
14192 (store_multiple): Ditto.
14193
14194 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
14195
14196 * config.gcc: Add --with-cpu support for nds32 target.
14197 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
14198 * config/nds32/nds32.opt: Add -mcpu= option.
14199
14200 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
14201
14202 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
14203 isel=yes): Warn for these deprecated options.
14204
14205 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
14206
14207 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
14208 ISA_2_5_MASKS_EMBEDDED.
14209
14210 2018-02-23 Jakub Jelinek <jakub@redhat.com>
14211
14212 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
14213 p->max as pointers rather than using iterative_hash_expr.
14214
14215 2018-02-23 Carl Love <cel@us.ibm.com>
14216
14217 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
14218 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
14219 BU_P8V_OVERLOAD_2.
14220 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
14221 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
14222 P8V_BUILTIN_VEC_VUNSIGNED2.
14223
14224 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
14225
14226 PR target/81572
14227 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
14228 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
14229 LRA_UNKNOWN_ALT.
14230 * lra-constraints.c (curr_insn_transform): Set up
14231 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
14232 LRA_UNKNOWN_ALT.
14233 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
14234 * lra-eliminations.c (spill_pseudos): Ditto.
14235 (process_insn_for_elimination): Ditto.
14236 * lra-lives.c (reg_early_clobber_p): Use the new macros.
14237 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
14238 LRA_NON_CLOBBERED_ALT.
14239
14240 2018-02-22 Martin Sebor <msebor@redhat.com>
14241
14242 PR tree-optimization/84480
14243 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
14244 to maybe_diag_stxncpy_trunc. Call it.
14245 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
14246 from gimple_fold_builtin_strcpy. Print inlining stack.
14247 (handle_builtin_stxncpy): Print inlining stack.
14248 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
14249
14250 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
14251
14252 PR target/84176
14253 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
14254 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
14255 and -fcheck-pointer-bounds are used together.
14256 (indirect_thunk_prefix): New enum.
14257 (indirect_thunk_need_prefix): New function.
14258 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
14259 "_nt" instead of "_bnd" for NOTRACK prefix.
14260 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
14261 (output_indirect_thunk_function): Likewise.
14262 (): Likewise.
14263 (ix86_code_end): Update output_indirect_thunk_function calls.
14264 (ix86_output_indirect_branch_via_reg): Replace
14265 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
14266 (ix86_output_indirect_branch_via_push): Likewise.
14267 (ix86_output_function_return): Likewise.
14268 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
14269 incompatible with -fcf-protection=branch and
14270 -fcheck-pointer-bounds.
14271
14272 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14273
14274 PR target/83335
14275 * config/aarch64/aarch64.c (aarch64_print_address_internal):
14276 Change gcc_assert call to output_operand_lossage.
14277
14278 2018-02-22 Steve Ellcey <sellcey@cavium.com>
14279
14280 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
14281
14282 2018-02-22 DJ Delorie <dj@redhat.com>
14283 Sebastian Perta <sebastian.perta@renesas.com>
14284 Oleg Endo <olegendo@gcc.gnu.org>
14285
14286 * config/rx/rx.c (rx_rtx_costs): New function.
14287 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
14288
14289 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
14290
14291 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
14292
14293 2018-02-22 Martin Liska <mliska@suse.cz>
14294
14295 PR driver/83193
14296 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
14297 Add "native" as a possible value.
14298
14299 2018-02-22 Martin Liska <mliska@suse.cz>
14300
14301 PR driver/83193
14302 * config/i386/i386.c (ix86_option_override_internal):
14303 Add "native" as a possible value for -march and -mtune.
14304
14305 2018-02-22 Jakub Jelinek <jakub@redhat.com>
14306
14307 PR target/84502
14308 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
14309 to all type variants.
14310
14311 PR tree-optimization/84503
14312 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
14313 width as info->bitpos + info->bitsize - start.
14314 (merged_store_group::merge_overlapping): Simplify width computation.
14315 (check_no_overlap): New function.
14316 (imm_store_chain_info::try_coalesce_bswap): Compute expected
14317 start + width and last_order of the group, fail if check_no_overlap
14318 fails.
14319 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
14320 to group if check_no_overlap fails.
14321
14322 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14323
14324 * config/rs6000/altivec.md: Delete contraint arguments to
14325 define_expand, define_split, and define_peephole2, and in
14326 define_insn_and_split if always unused.
14327 * config/rs6000/darwin.md: Ditto.
14328 * config/rs6000/dfp.md: Ditto.
14329 * config/rs6000/rs6000.md: Ditto.
14330 * config/rs6000/sync.md: Ditto.
14331 * config/rs6000/vector.md: Ditto.
14332 * config/rs6000/vsx.md: Ditto.
14333
14334 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
14335
14336 * config/rs6000/altivec.md: Write output control strings as braced
14337 blocks instead of double-quoted strings.
14338 * config/rs6000/darwin.md: Ditto.
14339 * config/rs6000/rs6000.md: Ditto.
14340 * config/rs6000/vector.md: Ditto.
14341 * config/rs6000/vsx.md: Ditto.
14342
14343 2018-02-21 Jason Merrill <jason@redhat.com>
14344
14345 PR c++/84314 - ICE with templates and fastcall attribute.
14346 * attribs.c (build_type_attribute_qual_variant): Remove assert.
14347
14348 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14349
14350 * ipa-cp.c (determine_versionability): Fix comment typos.
14351
14352 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
14353
14354 PR c/84229
14355 * ipa-cp.c (determine_versionability): Do not version functions caling
14356 va_arg_pack.
14357
14358 2018-02-21 Martin Liska <mliska@suse.cz>
14359
14360 PR driver/83193
14361 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
14362 Add "native" as a possible value.
14363 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
14364 the macro when native cpu detection is available.
14365
14366 2018-02-21 Martin Liska <mliska@suse.cz>
14367
14368 PR driver/83193
14369 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
14370 Add "native" as a possible value.
14371 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
14372 when native cpu detection is available.
14373
14374 2018-02-21 Jakub Jelinek <jakub@redhat.com>
14375 Martin Sebor <msebor@redhat.com>
14376
14377 PR tree-optimization/84478
14378 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
14379 false.
14380 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
14381 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
14382 support which is conservatively correct, for 2 only stay conservative
14383 for maxlen. Formatting and comment capitalization fixes. Add STRICT
14384 argument to the 2 argument get_range_strlen, adjust 6 arg
14385 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
14386 false.
14387 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
14388 (gimple_fold_builtin_strlen): Pass true as last argument to
14389 get_range_strlen.
14390
14391 2018-02-20 Martin Sebor <msebor@redhat.com>
14392
14393 PR middle-end/84095
14394 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
14395 (builtin_memref::set_base_and_offset): Same. Handle inner references.
14396 (builtin_memref::builtin_memref): Factor out parts into
14397 set_base_and_offset and call it.
14398
14399 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14400
14401 PR middle-end/84406
14402 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
14403 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
14404 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
14405 search at the associated MODE_INT.
14406
14407 2018-02-20 Jeff Law <law@redhat.com>
14408
14409 PR middle-end/82123
14410 PR tree-optimization/81592
14411 PR middle-end/79257
14412 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
14413 for range data rather than using global data.
14414 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
14415 range data rather than using global data.
14416 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
14417 pass it to children as needed.
14418 (struct directive::fmtresult): Similarly.
14419 (struct directive::set_width): Similarly.
14420 (struct directive::set_precision): Similarly.
14421 (format_integer, format_directive, parse_directive): Similarly.
14422 (format_none): Accept unnamed vr_values parameter.
14423 (format_percent, format_floating, format_character): Similarly.
14424 (format_string, format_plain): Similarly.
14425 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
14426 the EVRP range analyzer for range data rather than using global data.
14427 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
14428 gimple-ssa-evrp-analyze.h
14429 (class sprintf_dom_walker): Add after_dom_children member function.
14430 Add evrp_range_analyzer member.
14431 (sprintf_dom_walker::before_dom_children): Call into the EVRP
14432 range analyzer as needed.
14433 (sprintf_dom_walker::after_dom_children): New member function.
14434 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
14435 if not optimizing.
14436 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
14437 (evrp_range_analyzer::pop_to_marker): Likewise.
14438
14439 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
14440
14441 PR tree-optimization/84419
14442 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
14443 with the required type if its current type is compatible but
14444 different.
14445
14446 2018-02-20 Jakub Jelinek <jakub@redhat.com>
14447
14448 PR middle-end/82004
14449 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
14450 after vectorization.
14451
14452 2018-02-20 Martin Liska <mliska@suse.cz>
14453
14454 PR driver/83193
14455 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
14456 possible values if we don't have a hint.
14457
14458 2018-02-20 Martin Liska <mliska@suse.cz>
14459
14460 PR c/84310
14461 PR target/79747
14462 * final.c (shorten_branches): Build align_tab array with one
14463 more element.
14464 * opts.c (finish_options): Add alignment option limit check.
14465 (MAX_CODE_ALIGN): Likewise.
14466 (MAX_CODE_ALIGN_VALUE): Likewise.
14467 * doc/invoke.texi: Document maximum allowed option value for
14468 all -falign-* options.
14469
14470 2018-02-19 Jakub Jelinek <jakub@redhat.com>
14471
14472 PR target/84146
14473 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
14474 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
14475 * var-tracking.c (emit_note_insn_var_location): Remove all references
14476 to NOTE_INSN_CALL_ARG_LOCATION.
14477 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
14478 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
14479 Use copy_rtx_if_shared.
14480 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
14481 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
14482 (dwarf2out_var_location): Remove handling of
14483 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
14484 on call_insn.
14485 * final.c (final_scan_insn): Remove all references to
14486 NOTE_INSN_CALL_ARG_LOCATION.
14487 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
14488 before dumping final insns.
14489 * except.c (emit_note_eh_region_end): Remove all references to
14490 NOTE_INSN_CALL_ARG_LOCATION.
14491 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
14492 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
14493 * config/arc/arc.c (hwloop_optimize): Likewise.
14494 * config/arm/arm.c (create_fix_barrier): Likewise.
14495 * config/s390/s390.c (s390_chunkify_start): Likewise.
14496 * config/sh/sh.c (find_barrier): Likewise.
14497 * config/i386/i386.c (rest_of_insert_endbranch,
14498 ix86_seh_fixup_eh_fallthru): Likewise.
14499 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
14500 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
14501 * config/frv/frv.c (frv_function_prologue): Likewise.
14502 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
14503 reg note.
14504 (note_outside_basic_block_p): Remove all references to
14505 NOTE_INSN_CALL_ARG_LOCATION.
14506 * gengtype.c (adjust_field_rtx_def): Likewise.
14507 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
14508 Likewise.
14509 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
14510 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
14511
14512 PR c++/84444
14513 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
14514 is ADDR_EXPR.
14515
14516 PR tree-optimization/84452
14517 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
14518 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
14519 is NULL.
14520
14521 2018-02-19 Martin Liska <mliska@suse.cz>
14522
14523 PR sanitizer/82183
14524 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
14525
14526 2018-02-19 Martin Liska <mliska@suse.cz>
14527 Richard Sandiford <richard.sandiford@linaro.org>
14528
14529 PR tree-optimization/82491
14530 * gimple-fold.c (get_base_constructor): Make earlier bail out
14531 to prevent ubsan.
14532
14533 2018-02-19 Carl Love <cel@us.ibm.com>
14534
14535 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
14536 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
14537 BU_P8V_OVERLOAD_1.
14538 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
14539 P8V_BUILTIN_VEC_NEG.
14540
14541 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
14542
14543 * config/rl78/rl78.md (movdf): New define expand.
14544
14545 2018-02-19 Martin Liska <mliska@suse.cz>
14546
14547 PR other/80589
14548 * doc/invoke.texi: Fix typo.
14549 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
14550
14551 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
14552
14553 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
14554 handle rs6000_single_float and rs6000_double_float specially for
14555 e500 family CPUs.
14556
14557 2018-02-16 Jeff Law <law@redhat.com>
14558
14559 * config/rx/rx.c (add_pop_cfi_notes): New function.;
14560 (pop_regs): Use it.
14561
14562 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14563
14564 PR ipa/84425
14565 * ipa-inline.c (inline_small_functions): Fix a typo.
14566
14567 2018-02-16 Nathan Sidwell <nathan@acm.org>
14568
14569 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
14570
14571 2018-02-16 Carl Love <cel@us.ibm.com>
14572
14573 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
14574 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
14575 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
14576 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
14577 expansion to P8V_BUILTIN_VEC_FLOAT2.
14578
14579 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
14580
14581 PR rtl-optimization/70023
14582 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
14583 src_regno into account.
14584
14585 2018-02-16 Carl Love <cel@us.ibm.com>
14586
14587 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
14588 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
14589 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
14590 * config/rs6000/rs6000.c: Remove case statements for
14591 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
14592 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
14593 and P9V_BUILTIN_VEC_VINSERT4B.
14594 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
14595 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
14596 * config/rs6000/vsx.md:
14597 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
14598 vec_insert4b.
14599
14600 2018-02-16 Carl Love <cel@us.ibm.com>
14601
14602 * config/rs6000/altivec.h: Add builtin names vec_extract4b
14603 vec_insert4b.
14604 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
14605 definitions.
14606 * config/rs6000/rs6000-c.c: Add the definitions for
14607 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
14608 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
14609 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
14610 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
14611 definition for insert4b and define insn *insert3b_internal.
14612 * doc/extend.texi: Add documentation for vec_extract4b.
14613
14614 2018-02-16 Nathan Sidwell <nathan@acm.org>
14615
14616 * doc/extend.texi (Backwards Compatibility): Mention friend
14617 injection. Note for-scope is deprecated.
14618 * doc/invoke.texi (-ffriend-injection): Deprecate.
14619
14620 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
14621
14622 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
14623 that moved to I2, also allow destinations that are a paradoxical
14624 subreg (instead of a normal reg).
14625
14626 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
14627
14628 PR target/83831
14629 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
14630 to QImode.
14631
14632 2018-02-16 Richard Biener <rguenther@suse.de>
14633
14634 PR tree-optimization/84037
14635 PR tree-optimization/84016
14636 PR target/82862
14637 * config/i386/i386.c (ix86_builtin_vectorization_cost):
14638 Adjust vec_construct for the fact we need additional higher latency
14639 128bit inserts for AVX256 and AVX512 vector builds.
14640 (ix86_add_stmt_cost): Scale vector construction cost for
14641 elementwise loads.
14642
14643 2018-02-16 Richard Biener <rguenther@suse.de>
14644
14645 PR tree-optimization/84417
14646 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
14647 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
14648 (non_rewritable_lvalue_p): Likewise, use poly-ints.
14649
14650 2018-02-16 Martin Liska <mliska@suse.cz>
14651
14652 PR sanitizer/84307
14653 * internal-fn.def (ASAN_CHECK): Set proper flags.
14654 (ASAN_MARK): Likewise.
14655
14656 2018-02-16 Julia Koval <julia.koval@intel.com>
14657
14658 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
14659 from PTA_CANNONLAKE.
14660
14661 2018-02-16 Jakub Jelinek <jakub@redhat.com>
14662
14663 PR target/84272
14664 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
14665 Use ++iter rather than iter++ for std::list iterators.
14666 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
14667 defer deleting them until all nodes in the forest are processed. Do
14668 free even leaf nodes. Change to_process into auto_vec.
14669
14670 PR bootstrap/84405
14671 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
14672 * vec.h (vec_default_construct): Use memset instead of placement new
14673 if BROKEN_VALUE_INITIALIZATION is defined.
14674 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
14675 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
14676 is defined.
14677
14678 PR rtl-optimization/83723
14679 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
14680 * lra.c (lra_substitute_pseudo): Likewise. If true, use
14681 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
14682 recursive calls.
14683 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
14684 callers.
14685 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
14686
14687 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
14688
14689 PR rtl-optimization/81443
14690 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
14691 from inner REGs to paradoxical SUBREGs.
14692
14693 2018-02-16 Richard Biener <rguenther@suse.de>
14694
14695 PR tree-optimization/84399
14696 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
14697 For operands we can analyze at their definition make sure we can
14698 analyze them at each use as well.
14699
14700 2018-02-16 Richard Biener <rguenther@suse.de>
14701
14702 PR tree-optimization/84190
14703 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
14704 volatile accesses if the decl isn't volatile.
14705
14706 2018-02-15 Jason Merrill <jason@redhat.com>
14707
14708 PR c++/84314 - ICE with templates and fastcall attribute.
14709 * attribs.c (build_type_attribute_qual_variant): Don't clobber
14710 TYPE_CANONICAL on an existing type.
14711
14712 2018-02-15 Jakub Jelinek <jakub@redhat.com>
14713
14714 PR tree-optimization/84383
14715 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
14716 dstoff nor call operand_equal_p if dstbase is NULL.
14717
14718 PR tree-optimization/84334
14719 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
14720 also a CONSTANT_CLASS_P, punt.
14721
14722 2018-02-14 Jim Wilson <jimw@sifive.com>
14723
14724 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
14725 first SMALL_OPERAND check. New local min_second_step. Move assert
14726 to where locals are set. Add TARGET_RVC support.
14727 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
14728
14729 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
14730
14731 * doc/invoke.texi: Correct -Wformat-overflow code sample.
14732
14733 2018-02-14 Martin Sebor <msebor@redhat.com>
14734
14735 PR tree-optimization/83698
14736 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
14737 arrays constrain the offset range to their bounds.
14738 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
14739 (builtin_access::overlap): Avoid setting the size of overlap if it's
14740 already been set.
14741 (maybe_diag_overlap): Also consider arrays when deciding what values
14742 of offsets to include in diagnostics.
14743
14744 2018-02-14 Martin Sebor <msebor@redhat.com>
14745
14746 PR c/84108
14747 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
14748 that correspond to the kind of a declaration.
14749
14750 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
14751
14752 PR target/83984
14753 * config/pa/pa.md: Load address of PIC label using the linkage table
14754 if the label is nonlocal.
14755
14756 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
14757
14758 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
14759 warning message if user requests -maltivec=be.
14760 * doc/invoke.texi: Document deprecation of -maltivec=be.
14761
14762 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
14763
14764 PR target/84220
14765 * config/rs6000/rs6000-c.c: Update definitions for
14766 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
14767 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
14768
14769 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
14770
14771 PR target/84239
14772 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
14773 add _get_ssp intrinsics. Remove argument from
14774 __builtin_ia32_rdssp[d|q].
14775 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
14776 * config/i386/i386-builtin.def: Remove argument from
14777 __builtin_ia32_rdssp[d|q].
14778 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
14779 ix86_expand_special_args_builtin for _rdssp[d|q].
14780 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
14781 Clear register before usage.
14782 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
14783 Add documentation for new _get_ssp and _inc_ssp intrinsics.
14784
14785 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
14786
14787 PR tree-optimization/84357
14788 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
14789 operand 1 of an ARRAY_REF too.
14790
14791 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
14792
14793 PR target/83831
14794 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
14795 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14796 declarations.
14797 (set_of_reg): New struct.
14798 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
14799 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
14800 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
14801 functions.
14802 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
14803 Split into bitclr, bitset, bitinvert patterns if appropriate.
14804 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
14805 use rx_fuse_in_memory_bitop.
14806 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
14807 to named insn, correct maximum insn length.
14808
14809 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
14810
14811 PR target/79242
14812 * machmode.def: Define a complex mode for PARTIAL_INT.
14813 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
14814 MODE_PARTIAL_INT.
14815 * doc/rtl.texi: Document CSPImode.
14816 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
14817 handling.
14818 (msp430_hard_regno_nregs_with_padding): Likewise.
14819
14820 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
14821
14822 PR target/84279
14823 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
14824
14825 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
14826
14827 PR rtl-optimization/84169
14828 * combine.c (try_combine): New variable split_i2i3. Set it to true if
14829 we generated a parallel as new i3 and we split that to new i2 and i3
14830 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
14831 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
14832 those to i2, not i1. Partially rewrite this scan code.
14833
14834 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14835
14836 PR c/82210
14837 * stor-layout.c (place_field): For variable length fields, adjust
14838 offset_align afterwards not just based on the field's alignment,
14839 but also on the size.
14840
14841 PR middle-end/84309
14842 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
14843 of exps and logs in the use_exp2 case.
14844
14845 2018-02-13 Jeff Law <law@redhat.com>
14846
14847 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
14848 entry for "vector".
14849
14850 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
14851 ARGS as unused.
14852
14853 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
14854
14855 PR debug/84342
14856 PR debug/84319
14857 * common.opt (gas-loc-support, gas-locview-support): New.
14858 (ginline-points, ginternal-reset-location-views): New.
14859 * doc/invoke.texi: Document them. Use @itemx where intended.
14860 (gvariable-location-views): Adjust.
14861 * target.def (reset_location_view): New.
14862 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
14863 (TARGET_RESET_LOCATION_VIEW): New.
14864 * doc/tm.texi: Rebuilt.
14865 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
14866 (dwarf2out_default_as_locview_support): New.
14867 (output_asm_line_debug_info): Use option variables.
14868 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
14869 (output_loc_list): Likewise.
14870 (add_high_low_attributes): Check option variables.
14871 Don't output entry view attribute in strict mode.
14872 (gen_inlined_subroutine_die): Check option variables.
14873 (dwarf2out_inline_entry): Likewise.
14874 (init_sections_and_labels): Likewise.
14875 (dwarf2out_early_finish): Likewise.
14876 (maybe_reset_location_view): New, from...
14877 (dwarf2out_var_location): ... here. Call it.
14878 * debug.h (dwarf2out_default_as_loc_support): Declare.
14879 (dwarf2out_default_as_locview_support): Declare.
14880 * hooks.c (hook_int_rtx_insn_0): New.
14881 * hooks.h (hook_int_rtx_insn_0): Declare.
14882 * toplev.c (process_options): Take -gas-loc-support and
14883 -gas-locview-support from dwarf2out. Enable
14884 -gvariable-location-views by default only with locview
14885 assembler support. Enable -ginternal-reset-location-views by
14886 default only if the target defines the corresponding hook.
14887 Enable -ginline-points by default if location views are
14888 enabled; force it disabled if statement frontiers are
14889 disabled.
14890 * tree-inline.c (expand_call_inline): Check option variables.
14891 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
14892
14893 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
14894
14895 PR tree-optimization/84321
14896 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
14897 handling. Also check whether the anti-range contains any values
14898 that satisfy the mask; switch to a VR_RANGE if not.
14899
14900 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
14901
14902 PR sanitizer/84340
14903 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
14904
14905 2018-02-13 Martin Jambor <mjambor@suse.cz>
14906
14907 PR c++/83990
14908 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
14909 of call statements, also set location of a load to a temporary.
14910
14911 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
14912
14913 * config/rl78/rl78.c (add_vector_labels): New function.
14914 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
14915 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
14916 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
14917 which checks that no arguments are passed.
14918 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
14919 * doc/extend.texi: Documentation for the new attribute.
14920
14921 2018-02-13 Andreas Schwab <schwab@suse.de>
14922
14923 * config/riscv/linux.h (CPP_SPEC): Define.
14924
14925 2018-02-13 Jakub Jelinek <jakub@redhat.com>
14926
14927 PR target/84335
14928 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
14929 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
14930 OPTION_MASK_ISA_AES as first argument to def_builtin_const
14931 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
14932 instead of OPTION_MASK_ISA_PCLMUL as first argument to
14933 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
14934 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
14935 temporarily for AES and PCLMUL builtins.
14936
14937 PR tree-optimization/84339
14938 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
14939 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
14940 Formatting fixes.
14941
14942 PR middle-end/84309
14943 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
14944 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
14945 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
14946 inline function.
14947 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
14948 inline function.
14949 * omp-simd-clone.h: New file.
14950 * omp-simd-clone.c: Include omp-simd-clone.h.
14951 (expand_simd_clones): No longer static.
14952 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
14953 cgraph.h and omp-simd-clone.h.
14954 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
14955 (vect_recog_widen_shift_pattern): Formatting fix.
14956 (vect_pattern_recog_1): Don't check optab for calls.
14957
14958 PR target/84336
14959 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
14960 operands[2] into a REG before using gen_lowpart on it.
14961
14962 2018-02-12 Jeff Law <law@redhat.com>
14963
14964 PR target/83760
14965 * config/sh/sh.c (find_barrier): Consider a sibling call
14966 a barrier as well.
14967
14968 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
14969 successfully back substituting a reg.
14970
14971 2018-02-12 Richard Biener <rguenther@suse.de>
14972
14973 PR tree-optimization/84037
14974 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
14975 parameter, move visited init to caller.
14976 (vect_slp_analyze_operations): Separate cost from validity
14977 check, initialize visited once for all instances.
14978 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
14979 for all instances.
14980 * tree-vect-stmts.c (vect_model_simple_cost): Make early
14981 out an assert.
14982 (vect_model_promotion_demotion_cost): Likewise.
14983 (vectorizable_bswap): Guard cost modeling with !slp_node
14984 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
14985 SLP stmts.
14986 (vectorizable_call): Likewise.
14987 (vectorizable_conversion): Likewise.
14988 (vectorizable_assignment): Likewise.
14989 (vectorizable_shift): Likewise.
14990 (vectorizable_operation): Likewise.
14991 (vectorizable_store): Likewise.
14992 (vectorizable_load): Likewise.
14993 (vectorizable_condition): Likewise.
14994 (vectorizable_comparison): Likewise.
14995
14996 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
14997
14998 PR sanitizer/84307
14999 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
15000 (ASAN_MARK): Fix fnspec to account for return value, change pointer
15001 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
15002
15003 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15004
15005 PR middle-end/83665
15006 * params.def (inline-min-speedup): Increase from 8 to 15.
15007 (max-inline-insns-auto): Decrease from 40 to 30.
15008 * ipa-split.c (consider_split): Add some buffer for function to
15009 be considered inlining candidate.
15010 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
15011 default values.
15012
15013 2018-02-12 Richard Biener <rguenther@suse.de>
15014
15015 PR tree-optimization/84037
15016 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
15017 matched stmts if we cannot swap the non-matched ones.
15018
15019 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15020
15021 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
15022 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
15023 _mm_maskz_scalef_round_ss): New intrinsics.
15024 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
15025 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
15026 __builtin_ia32_scalefss_round): Remove.
15027 (__builtin_ia32_scalefsd_mask_round,
15028 __builtin_ia32_scalefss_mask_round): New intrinsics.
15029 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
15030 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
15031 ((match_operand:VF_128 2 "<round_nimm_predicate>"
15032 "<round_constraint>")): Changed to ...
15033 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
15034 "<round_scalar_constraint>")): ... this.
15035 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
15036 %0, %1, %2<round_op3>}"): Changed to ...
15037 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
15038 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
15039 %2<round_scalar_mask_op3>}"): ... this.
15040 * config/i386/subst.md (round_scalar_nimm_predicate): New.
15041
15042 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
15043
15044 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
15045 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
15046 (_mm_maskz_sqrt_round_ss): New intrinsics.
15047 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
15048 (__builtin_ia32_sqrtsd_mask_round)
15049 (__builtin_ia32_sqrtss_mask_round): New builtins.
15050 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
15051 (__builtin_ia32_sqrtss_round): Remove.
15052 (__builtin_ia32_sqrtsd_mask_round)
15053 (__builtin_ia32_sqrtss_mask_round): New builtins.
15054 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
15055 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
15056 ((match_operand:VF_128 1 "vector_operand"
15057 "xBm,<round_constraint>")): Changed to ...
15058 ((match_operand:VF_128 1 "vector_operand"
15059 "xBm,<round_scalar_constraint>")): ... this.
15060 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
15061 %0, %2, %<iptr>1<round_op3>}): Changed to ...
15062 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
15063 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
15064 %<iptr>1<round_scalar_mask_op3>}): ... this.
15065 ((set_attr "prefix" "<round_prefix>")): Changed to ...
15066 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
15067
15068 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
15069
15070 PR target/84266
15071 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
15072 Cast vec_cmpeq result to correct type.
15073 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
15074 Cast vec_cmpgt result to correct type.
15075
15076 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
15077
15078 * final.c (final_scan_insn_1): Renamed from...
15079 (final_scan_insn): ... this. New wrapper, to recover
15080 seen from the outermost call in recursive ones.
15081 * config/sparc/sparc.c (output_return): Drop seen from call.
15082 (output_sibcall): Likewise.
15083 * config/visium/visium.c (output_branch): Likewise.
15084
15085 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
15086
15087 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
15088 function label.
15089
15090 2018-02-10 Alan Modra <amodra@gmail.com>
15091
15092 PR target/84300
15093 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
15094 Specify LR as an input.
15095
15096 2018-02-10 Jakub Jelinek <jakub@redhat.com>
15097
15098 PR sanitizer/83987
15099 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
15100 remove_member_access_dummy_vars): New functions.
15101 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
15102 lower_omp_1, execute_lower_omp): Use them.
15103
15104 PR rtl-optimization/84308
15105 * shrink-wrap.c (spread_components): Release todo vector.
15106
15107 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
15108
15109 PR rtl-optimization/57193
15110 * ira-color.c (struct allocno_color_data): Add member
15111 conflict_allocno_hard_prefs.
15112 (update_conflict_allocno_hard_prefs): New.
15113 (bucket_allocno_compare_func): Add a preference based on
15114 conflict_allocno_hard_prefs.
15115 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
15116 (color_allocnos): Remove a dead code. Initiate
15117 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
15118
15119 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15120
15121 PR target/84226
15122 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
15123 constraint from =wa to wa. Avoid a subreg on the output operand,
15124 instead use a pseudo and subreg it in a move.
15125 (p9_xxbrd_<mode>): Changed to ...
15126 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
15127 (p9_xxbrd_v2df): New expander.
15128 (p9_xxbrw_<mode>): Changed to ...
15129 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
15130 (p9_xxbrw_v4sf): New expander.
15131
15132 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15133
15134 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
15135
15136 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
15137
15138 PR target/83926
15139 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
15140 multiply in 32-bit mode.
15141 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
15142 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
15143 mode.
15144
15145 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
15146
15147 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
15148 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
15149 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
15150 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
15151
15152 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
15153
15154 PR lto/84213
15155 * dwarf2out.c (is_trivial_indirect_ref): New function.
15156 (dwarf2out_late_global_decl): Do not generate a location
15157 attribute for variables that have a non-trivial DECL_VALUE_EXPR
15158 and that are not defined in the current unit.
15159
15160 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15161
15162 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
15163 instead of a libcall for UNORDERED.
15164
15165 2018-02-09 Tamar Christina <tamar.christina@arm.com>
15166
15167 PR target/82641
15168 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
15169 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
15170
15171 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15172
15173 PR target/PR84295
15174 * config/s390/s390.c (s390_set_current_function): Invoke
15175 s390_indirect_branch_settings also if fndecl didn't change.
15176
15177 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15178
15179 * config/rs6000/rs6000.md (blockage): Set length to zero.
15180
15181 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
15182
15183 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
15184
15185 2018-02-09 Jakub Jelinek <jakub@redhat.com>
15186
15187 PR sanitizer/84285
15188 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
15189 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
15190 -static-lib*san.
15191
15192 PR debug/84252
15193 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
15194 PARALLEL incoming that failed vt_get_decl_and_offset check.
15195
15196 PR middle-end/84237
15197 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
15198 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
15199 TREE_READONLY bit.
15200 (get_variable_section): For decls in named .bss* sections pass true as
15201 second argument to bss_initializer_p.
15202
15203 2018-02-09 Marek Polacek <polacek@redhat.com>
15204 Jakub Jelinek <jakub@redhat.com>
15205
15206 PR c++/83659
15207 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
15208 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
15209 Sync some changes from cxx_fold_indirect_ref.
15210
15211 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
15212
15213 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
15214 markers.
15215 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
15216 (BLOCK_INLINE_ENTRY_LABEL): New.
15217 (dwarf2out_var_location): Disregard inline entry markers.
15218 (inline_entry_data): New struct.
15219 (inline_entry_data_hasher): New hashtable type.
15220 (inline_entry_data_hasher::hash): New.
15221 (inline_entry_data_hasher::equal): New.
15222 (inline_entry_data_table): New variable.
15223 (add_high_low_attributes): Add DW_AT_entry_pc and
15224 DW_AT_GNU_entry_view attributes if a pending entry is found
15225 in inline_entry_data_table. Add old entry_pc attribute only
15226 if debug nonbinding markers are disabled.
15227 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
15228 markers are enabled.
15229 (block_within_block_p, dwarf2out_inline_entry): New.
15230 (dwarf2out_finish): Check that no entries remained in
15231 inline_entry_data_table.
15232 * final.c (reemit_insn_block_notes): Handle inline entry notes.
15233 (final_scan_insn, notice_source_line): Likewise.
15234 (rest_of_clean_state): Skip inline entry markers.
15235 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
15236 markers.
15237 * gimple.c (gimple_build_debug_inline_entry): New.
15238 * gimple.h (enum gimple_debug_subcode): Add
15239 GIMPLE_DEBUG_INLINE_ENTRY.
15240 (gimple_build_debug_inline_entry): Declare.
15241 (gimple_debug_inline_entry_p): New.
15242 (gimple_debug_nonbind_marker_p): Adjust.
15243 * insn-notes.def (INLINE_ENTRY): New.
15244 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
15245 inline entry marker notes.
15246 (print_insn): Likewise.
15247 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
15248 (INSN_DEBUG_MARKER_KIND): Likewise.
15249 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
15250 * tree-inline.c (expand_call_inline): Build and insert
15251 debug_inline_entry stmt.
15252 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
15253 inline entry blocks early, if nonbind markers are enabled.
15254 (dump_scope_block): Dump fragment info.
15255 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
15256 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
15257 (gimple_build_debug_inline_entry): New.
15258 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
15259 Enable/disable inline entry points too.
15260 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
15261 (DEBUG_INSN): Describe inline entry markers.
15262
15263 * common.opt (gvariable-location-views): New.
15264 (gvariable-location-views=incompat5): New.
15265 * config.in: Rebuilt.
15266 * configure: Rebuilt.
15267 * configure.ac: Test assembler for view support.
15268 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
15269 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
15270 * dwarf2out.c (var_loc_view): New typedef.
15271 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
15272 (dwarf2out_locviews_in_attribute): New.
15273 (dwarf2out_locviews_in_loclist): New.
15274 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
15275 (enum dw_line_info_opcode): Add LI_adv_address.
15276 (struct dw_line_info_table): Add view.
15277 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
15278 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
15279 (zero_view_p): New variable.
15280 (ZERO_VIEW_P): New macro.
15281 (output_asm_line_debug_info): New.
15282 (struct var_loc_node): Add view.
15283 (add_AT_view_list, AT_loc_list): New.
15284 (add_var_loc_to_decl): Add view param. Test it against last.
15285 (new_loc_list): Add view params. Record them.
15286 (AT_loc_list_ptr): Handle loc and view lists.
15287 (view_list_to_loc_list_val_node): New.
15288 (print_dw_val): Handle dw_val_class_view_list.
15289 (size_of_die): Likewise.
15290 (value_format): Likewise.
15291 (loc_list_has_views): New.
15292 (gen_llsym): Set vl_symbol too.
15293 (maybe_gen_llsym, skip_loc_list_entry): New.
15294 (dwarf2out_maybe_output_loclist_view_pair): New.
15295 (output_loc_list): Output view list or entries too.
15296 (output_view_list_offset): New.
15297 (output_die): Handle dw_val_class_view_list.
15298 (output_dwarf_version): New.
15299 (output_compilation_unit_header): Use it.
15300 (output_skeleton_debug_sections): Likewise.
15301 (output_rnglists, output_line_info): Likewise.
15302 (output_pubnames, output_aranges): Update version comments.
15303 (output_one_line_info_table): Output view numbers in asm comments.
15304 (dw_loc_list): Determine current endview, pass it to new_loc_list.
15305 Call maybe_gen_llsym.
15306 (loc_list_from_tree_1): Adjust.
15307 (add_AT_location_description): Create view list attribute if
15308 needed, check it's absent otherwise.
15309 (convert_cfa_to_fb_loc_list): Adjust.
15310 (maybe_emit_file): Call output_asm_line_debug_info for test.
15311 (dwarf2out_var_location): Reset views as needed. Precompute
15312 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
15313 attribute. Set view.
15314 (new_line_info_table): Reset next view.
15315 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
15316 (dwarf2out_source_line): Likewise. Output view resets and labels to
15317 the assembler, or select appropriate line info opcodes.
15318 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
15319 (optimize_string_length): Catch it. Adjust.
15320 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
15321 dw_val_class_view_list, and remove it if no longer needed.
15322 (hash_loc_list): Hash view numbers.
15323 (loc_list_hasher::equal): Compare them.
15324 (optimize_location_lists): Check whether a view list symbol is
15325 needed, and whether the locview attribute is present, and
15326 whether they match. Remove the locview attribute if no longer
15327 needed.
15328 (index_location_lists): Call skip_loc_list_entry for test.
15329 (dwarf2out_finish): Call output_asm_line_debug_info for test.
15330 Use output_dwarf_version.
15331 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
15332 (struct dw_val_node): Add val_view_list.
15333 * final.c (SEEN_NEXT_VIEW): New.
15334 (set_next_view_needed): New.
15335 (clear_next_view_needed): New.
15336 (maybe_output_next_view): New.
15337 (final_start_function): Rename to...
15338 (final_start_function_1): ... this. Take pointer to FIRST,
15339 add SEEN parameter. Emit param bindings in the initial view.
15340 (final_start_function): Reintroduce SEEN-less interface.
15341 (final): Rename to...
15342 (final_1): ... this. Take SEEN parameter. Output final pending
15343 next view at the end.
15344 (final): Reintroduce seen-less interface.
15345 (final_scan_insn): Output pending next view before switching
15346 sections or ending a block. Mark the next view as needed when
15347 outputting variable locations. Notify debug backend of section
15348 changes, and of location view changes.
15349 (rest_of_handle_final): Adjust.
15350 * toplev.c (process_options): Autodetect value for debug variable
15351 location views option. Warn on incompat5 without -gdwarf-5.
15352 * doc/invoke.texi (gvariable-location-views): New.
15353 (gvariable-location-views=incompat5): New.
15354 (gno-variable-location-views): New.
15355
15356 2018-02-08 David Malcolm <dmalcolm@redhat.com>
15357
15358 PR tree-optimization/84136
15359 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
15360 that the result of find_edge is non-NULL.
15361
15362 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15363
15364 PR target/83008
15365 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
15366 storing integer register in SImode. Fix cost of 256 and 512
15367 byte aligned SSE register store.
15368
15369 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
15370
15371 * config/i386/i386.c (ix86_multiplication_cost): Fix
15372 multiplication cost for TARGET_AVX512DQ.
15373
15374 2018-02-08 Marek Polacek <polacek@redhat.com>
15375
15376 PR tree-optimization/84238
15377 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
15378 get_range_strlen.
15379
15380 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15381
15382 PR tree-optimization/84265
15383 * tree-vect-stmts.c (vectorizable_store): Don't treat
15384 VMAT_CONTIGUOUS accesses as grouped.
15385 (vectorizable_load): Likewise.
15386
15387 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15388
15389 PR tree-optimization/81635
15390 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
15391 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
15392 (test_round_for_mask): New functions.
15393 (wide_int_cc_tests): Call test_round_for_mask.
15394 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
15395 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
15396 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
15397 range returned by get_range_info.
15398
15399 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
15400
15401 PR ipa/81360
15402 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
15403 * symtab.c: Include builtins.h
15404 (symtab_node::output_to_lto_symbol_table_p): Move here
15405 from lto-streamer-out.c:output_symbol_p.
15406 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
15407 (output_symbol_p): Move all logic to symtab.c
15408 (produce_symtab): Update.
15409
15410 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
15411
15412 * config/s390/s390-opts.h (enum indirect_branch): Define.
15413 * config/s390/s390-protos.h (s390_return_addr_from_memory)
15414 (s390_indirect_branch_via_thunk)
15415 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
15416 (enum s390_indirect_branch_type): Define.
15417 * config/s390/s390.c (struct s390_frame_layout, struct
15418 machine_function): Remove.
15419 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
15420 (indirect_branch_table_label_no, indirect_branch_table_name):
15421 Define variables.
15422 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
15423 (enum s390_indirect_branch_option): Define.
15424 (s390_return_addr_from_memory): New function.
15425 (s390_handle_string_attribute): New function.
15426 (s390_attribute_table): Add new attribute handler.
15427 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
15428 (s390_indirect_branch_via_thunk): New function.
15429 (s390_indirect_branch_via_inline_thunk): New function.
15430 (s390_function_ok_for_sibcall): When jumping via thunk disallow
15431 sibling call optimization for non z10 compiles.
15432 (s390_emit_call): Force indirect branch target to be a single
15433 register. Add r1 clobber for non-z10 compiles.
15434 (s390_emit_epilogue): Emit return jump via return_use expander.
15435 (s390_reorg): Handle JUMP_INSNs as execute targets.
15436 (s390_option_override_internal): Perform validity checks for the
15437 new command line options.
15438 (s390_indirect_branch_attrvalue): New function.
15439 (s390_indirect_branch_settings): New function.
15440 (s390_set_current_function): Invoke s390_indirect_branch_settings.
15441 (s390_output_indirect_thunk_function): New function.
15442 (s390_code_end): Implement target hook.
15443 (s390_case_values_threshold): Implement target hook.
15444 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
15445 macros.
15446 * config/s390/s390.h (struct s390_frame_layout)
15447 (struct machine_function): Move here from s390.c.
15448 (TARGET_INDIRECT_BRANCH_NOBP_RET)
15449 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
15450 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
15451 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
15452 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
15453 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
15454 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
15455 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
15456 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
15457 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
15458 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
15459 (mnemonic attribute): Add values which aren't recognized
15460 automatically.
15461 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
15462 pattern for branch conversion. Fix mnemonic attribute.
15463 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
15464 indirect branch via thunk if requested.
15465 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
15466 ("*indirect_jump"): Disable for branch conversion using out of
15467 line thunks.
15468 ("indirect_jump_via_thunk<mode>_z10")
15469 ("indirect_jump_via_thunk<mode>")
15470 ("indirect_jump_via_inlinethunk<mode>_z10")
15471 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
15472 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
15473 ("casesi_jump_via_inlinethunk<mode>_z10")
15474 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
15475 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
15476 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
15477 ("*indirect2_jump"): Disable for branch conversion.
15478 ("casesi_jump"): Turn into expander and expand patterns for branch
15479 conversion.
15480 ("return_use"): New expander.
15481 ("*return"): Emit return via thunk and rename it to ...
15482 ("*return<mode>"): ... this one.
15483 * config/s390/s390.opt: Add new options and and enum for the
15484 option values.
15485
15486 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
15487
15488 * lra-constraints.c (match_reload): Unconditionally use
15489 gen_lowpart_SUBREG, rather than selecting between that
15490 and equivalent gen_rtx_SUBREG code.
15491
15492 2018-02-08 Richard Biener <rguenther@suse.de>
15493
15494 PR tree-optimization/84233
15495 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
15496 changed flag instead of boguously re-using phi_inserted.
15497
15498 2018-02-08 Martin Jambor <mjambor@suse.cz>
15499
15500 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
15501 static local variables.
15502
15503 2018-02-08 Richard Biener <rguenther@suse.de>
15504
15505 PR tree-optimization/84278
15506 * tree-vect-stmts.c (vectorizable_store): When looking for
15507 smaller vector types to perform grouped strided loads/stores
15508 make sure the mode is supported by the target.
15509 (vectorizable_load): Likewise.
15510
15511 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15512
15513 * config/aarch64/aarch64.c (aarch64_components_for_bb):
15514 Increase LDP/STP opportunities by adding adjacent callee-saves.
15515
15516 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
15517
15518 PR rtl-optimization/84068
15519 PR rtl-optimization/83459
15520 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
15521
15522 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
15523
15524 PR tree-optimization/84224
15525 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
15526 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
15527 non-zero arguments.
15528
15529 2018-02-07 Iain Sandoe <iain@codesourcery.com>
15530
15531 PR target/84113
15532 * config/rs6000/altivec.md (*restore_world): Remove LR use.
15533 * config/rs6000/predicates.md (restore_world_operation): Adjust op
15534 count, remove one USE.
15535
15536 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
15537
15538 * doc/install.texi (Configuration): Document the
15539 --with-long-double-format={ibm,ieee} PowerPC configuration
15540 options.
15541
15542 PR target/84154
15543 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
15544 Convert from define_expand to be define_insn_and_split. Rework
15545 float/double/_Float128 conversions to QI/HI/SImode to work with
15546 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
15547 conversions to QI/HImode types did a store and then a load to
15548 truncate the value. For conversions to VSX registers, don't split
15549 the insn, instead emit the code directly. Use the code iterator
15550 any_fix to combine signed and unsigned conversions.
15551 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
15552 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
15553 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15554 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
15555 (fix_<mode>di2_hw): Likewise.
15556 (fixuns_<mode>di2_hw): Likewise.
15557 (fix_<mode>si2_hw): Likewise.
15558 (fixuns_<mode>si2_hw): Likewise.
15559 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
15560 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
15561 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
15562 fix<uns>_trunc<SFDF:mode>si2_p8.
15563 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
15564 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
15565 (fix<uns>_<mode>_mem): Likewise.
15566 (fctiw<u>z_<mode>_mem): Likewise.
15567 (fix<uns>_<mode>_mem): Likewise.
15568 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
15569 the register allocator from doing a direct move to the GPRs to do
15570 a store, and instead use the ISA 3.0 store byte/half-word from
15571 vector register instruction. For IEEE 128-bit floating point,
15572 also optimize stores of 32-bit ints.
15573 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
15574
15575 2018-02-07 Alan Hayward <alan.hayward@arm.com>
15576
15577 * genextract.c (push_pathstr_operand): New function to support
15578 [a-zA-Z].
15579 (walk_rtx): Call push_pathstr_operand.
15580 (print_path): Support [a-zA-Z].
15581
15582 2018-02-07 Richard Biener <rguenther@suse.de>
15583
15584 PR tree-optimization/84037
15585 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
15586 (cse_and_gimplify_to_preheader): Declare.
15587 (vect_get_place_in_interleaving_chain): Likewise.
15588 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15589 ivexpr_map.
15590 (_loop_vec_info::~_loop_vec_info): Delete it.
15591 (cse_and_gimplify_to_preheader): New function.
15592 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
15593 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
15594 (vectorizable_load): Likewise. For grouped stores always base
15595 the IV on the first element.
15596 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
15597 condition before gimplifying.
15598
15599 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15600
15601 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
15602 *DIV_EXPR and *MOD_EXPR.
15603
15604 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
15605
15606 PR target/84248
15607 * config/i386/i386.c (ix86_option_override_internal): Mask out
15608 the CF_SET bit when checking -fcf-protection.
15609
15610 2018-02-07 Tom de Vries <tom@codesourcery.com>
15611
15612 PR libgomp/84217
15613 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
15614 enough.
15615
15616 2018-02-07 Richard Biener <rguenther@suse.de>
15617
15618 PR tree-optimization/84204
15619 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
15620 this place.
15621
15622 PR tree-optimization/84205
15623 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
15624 special-case isl_ast_op_zdiv_r.
15625
15626 PR tree-optimization/84223
15627 * graphite-scop-detection.c (gather_bbs::before_dom_children):
15628 Only add conditions from within the region.
15629 (gather_bbs::after_dom_children): Adjust.
15630
15631 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
15632
15633 PR target/84209
15634 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
15635 * config/avr/avr.md: Only post-reload split REG-REG moves if
15636 either register is GENERAL_REG_P.
15637
15638 2018-02-07 Jakub Jelinek <jakub@redhat.com>
15639
15640 PR tree-optimization/84235
15641 * tree-ssa-scopedtables.c
15642 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
15643 if the subtraction is performed in floating point type where NaNs are
15644 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
15645 build 1. Formatting fix.
15646
15647 2018-02-06 Jakub Jelinek <jakub@redhat.com>
15648
15649 PR target/84146
15650 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
15651 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
15652 and skip it regardless of bb boundaries. Use CALL_P macro,
15653 don't test INSN_P (insn) together with CALL_P or JUMP_P check
15654 unnecessarily, formatting fix.
15655
15656 2018-02-06 Michael Collison <michael.collison@arm.com>
15657
15658 * config/arm/thumb2.md:
15659 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
15660 (*thumb_mov_notscc): Ditto.
15661
15662 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
15663
15664 PR target/84154
15665 * config/rs6000/rs6000.md (su code attribute): Use "u" for
15666 unsigned_fix, not "s".
15667
15668 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15669
15670 * configure.ac (gcc_fn_eh_frame_ro): New function.
15671 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
15672 correct .eh_frame permissions.
15673 * configure: Regenerate.
15674
15675 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
15676
15677 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
15678 irrelevant options.
15679
15680 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15681
15682 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15683 Display warning message for -mno-speculate-indirect-jumps.
15684
15685 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
15686
15687 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
15688 Undocumented.
15689 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
15690
15691 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
15692
15693 PR tree-optimization/84225
15694 * tree-eh.c (find_trapping_overflow): Only call
15695 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
15696
15697 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15698
15699 PR target/84145
15700 * config/i386/i386.c: Reimplement the check of possible options
15701 -mibt/-mshstk conbination. Change error messages.
15702 * doc/invoke.texi: Fix a typo: remove extra '='.
15703
15704 2018-02-06 Marek Polacek <polacek@redhat.com>
15705
15706 PR tree-optimization/84228
15707 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
15708
15709 2018-02-06 Tamar Christina <tamar.christina@arm.com>
15710
15711 PR target/82641
15712 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
15713 emitted arch directives.
15714 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
15715 __ARM_FEATURE_COPROC before changing architectures.
15716
15717 2018-02-06 Richard Biener <rguenther@suse.de>
15718
15719 * config/i386/i386.c (print_reg): Fix typo.
15720 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
15721
15722 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
15723
15724 * configure: Regenerate.
15725
15726 2018-02-05 Martin Sebor <msebor@redhat.com>
15727
15728 PR tree-optimization/83369
15729 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
15730 inlining context.
15731
15732 2018-02-05 Martin Liska <mliska@suse.cz>
15733
15734 * doc/invoke.texi: Cherry-pick upstream r323995.
15735
15736 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
15737
15738 * ira.c (ira_init_register_move_cost): Adjust comment.
15739
15740 2018-02-05 Martin Liska <mliska@suse.cz>
15741
15742 PR gcov-profile/84137
15743 * doc/gcov.texi: Fix typo in documentation.
15744
15745 2018-02-05 Martin Liska <mliska@suse.cz>
15746
15747 PR gcov-profile/83879
15748 * doc/gcov.texi: Document necessity of --dynamic-list-data when
15749 using dlopen functionality.
15750
15751 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
15752
15753 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
15754 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
15755 _mm_maskz_range_ss, _mm_mask_range_round_ss,
15756 _mm_maskz_range_round_ss): New intrinsics.
15757 (__builtin_ia32_rangesd128_round)
15758 (__builtin_ia32_rangess128_round): Remove.
15759 (__builtin_ia32_rangesd128_mask_round,
15760 __builtin_ia32_rangess128_mask_round): New builtins.
15761 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
15762 __builtin_ia32_rangess128_round): Remove.
15763 (__builtin_ia32_rangesd128_mask_round,
15764 __builtin_ia32_rangess128_mask_round): New builtins.
15765 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
15766 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
15767 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
15768 "<round_saeonly_constraint>")): Changed to ...
15769 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
15770 "<round_saeonly_scalar_constraint>")): ... this.
15771 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15772 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
15773 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
15774 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
15775 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
15776
15777 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
15778
15779 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
15780 options.
15781 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
15782 Remove all values except native, 8540 and 8548.
15783
15784 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
15785
15786 * config/i386/i386.c (ix86_output_function_return): Pass
15787 INVALID_REGNUM, instead of -1, as invalid register number to
15788 indirect_thunk_name and output_indirect_thunk.
15789
15790 2018-02-02 Julia Koval <julia.koval@intel.com>
15791
15792 * config.gcc: Add -march=icelake.
15793 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
15794 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
15795 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
15796 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
15797 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
15798 (processor_target_table): Add icelake.
15799 (ix86_option_override_internal): Handle new PTAs.
15800 (get_builtin_code_for_version): Handle icelake.
15801 (M_INTEL_COREI7_ICELAKE): New.
15802 (fold_builtin_cpu): Handle icelake.
15803 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
15804 * doc/invoke.texi: Add -march=icelake.
15805
15806 2018-02-02 Julia Koval <julia.koval@intel.com>
15807
15808 * config/i386/i386.c (ix86_option_override_internal): Change flags type
15809 to wide_int_bitmask.
15810 * wide-int-bitmask.h: New.
15811
15812 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
15813
15814 PR target/84066
15815 * config/i386/i386.md: Replace Pmode with word_mode in
15816 builtin_setjmp_setup and builtin_longjmp to support x32.
15817
15818 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
15819
15820 PR target/56010
15821 PR target/83743
15822 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
15823 #include "opts.h".
15824 (rs6000_supported_cpu_names): New static variable.
15825 (linux_cpu_translation_table): Likewise.
15826 (elf_platform) <cpu>: Define new static variable and use it.
15827 Translate kernel AT_PLATFORM name to canonical name if needed.
15828 Error if platform name is unknown.
15829
15830 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
15831
15832 PR target/84089
15833 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
15834
15835 2018-02-01 Jeff Law <law@redhat.com>
15836
15837 PR target/84128
15838 * config/i386/i386.c (release_scratch_register_on_entry): Add new
15839 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
15840 the scratch if RELEASE_VIA_POP is false.
15841 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
15842 If we have to save a temporary register, decrement SIZE appropriately.
15843 Pass new arguments to release_scratch_register_on_entry.
15844 (ix86_adjust_stack_and_probe): Likewise.
15845 (ix86_emit_probe_stack_range): Pass new arguments to
15846 release_scratch_register_on_entry.
15847
15848 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
15849
15850 PR rtl-optimization/84157
15851 * combine.c (change_zero_ext): Use REG_P predicate in
15852 front of HARD_REGISTER_P predicate.
15853
15854 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
15855
15856 * config/avr/avr.c (avr_option_override): Move disabling of
15857 -fdelete-null-pointer-checks to...
15858 * common/config/avr/avr-common.c (avr_option_optimization_table):
15859 ...here.
15860
15861 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15862
15863 PR tree-optimization/81635
15864 * tree-data-ref.c (split_constant_offset_1): For types that
15865 wrap on overflow, try to use range info to prove that wrapping
15866 cannot occur.
15867
15868 2018-02-01 Renlin Li <renlin.li@arm.com>
15869
15870 PR target/83370
15871 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
15872 TAILCALL_ADDR_REGS.
15873 (aarch64_register_move_cost): Likewise.
15874 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
15875 TAILCALL_ADDR_REGS.
15876 (REG_CLASS_NAMES): Likewise.
15877 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
15878 TAILCALL_ADDR_REGS. Remove IP registers.
15879 * config/aarch64/aarch64.md (Ucs): Update register constraint.
15880
15881 2018-02-01 Richard Biener <rguenther@suse.de>
15882
15883 * domwalk.h (dom_walker::dom_walker): Add additional constructor
15884 for specifying RPO order and allow NULL for that.
15885 * domwalk.c (dom_walker::dom_walker): Likewise.
15886 (dom_walker::walk): Handle NULL RPO order.
15887 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
15888 in RPO order.
15889 (rewrite_update_dom_walker): Likewise.
15890 (mark_def_dom_walker): Likewise.
15891
15892 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15893
15894 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
15895 (aarch64_maybe_expand_sve_subreg_move): Declare.
15896 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
15897 * config/aarch64/predicates.md (aarch64_any_register_operand): New
15898 predicate.
15899 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
15900 that are semantically a reverse operation.
15901 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
15902 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
15903 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
15904 functions.
15905 (aarch64_can_change_mode_class): For big-endian, forbid changes
15906 between two SVE modes if they have different element sizes.
15907
15908 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15909
15910 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
15911 the TImode handling for big-endian targets.
15912
15913 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15914
15915 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
15916 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
15917 not just bytes.
15918 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
15919 Remove BSWAP handing for big-endian targets and use the form of
15920 LD1RQ appropariate for the mode.
15921
15922 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15923
15924 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
15925 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
15926 duplicated element.
15927
15928 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
15929
15930 PR tearget/83845
15931 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
15932 check for operands that need to go through aarch64_sve_reload_be.
15933
15934 2018-02-01 Jakub Jelinek <jakub@redhat.com>
15935
15936 PR tree-optimization/81661
15937 PR tree-optimization/84117
15938 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
15939 * tree-eh.c: Include gimplify.h.
15940 (find_trapping_overflow, replace_trapping_overflow,
15941 rewrite_to_non_trapping_overflow): New functions.
15942 * tree-vect-loop.c: Include tree-eh.h.
15943 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
15944 * tree-data-ref.c: Include tree-eh.h.
15945 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
15946
15947 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
15948
15949 PR rtl-optimization/84123
15950 * combine.c (change_zero_ext): Check if hard register satisfies
15951 can_change_dest_mode before calling gen_lowpart_SUBREG.
15952
15953 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
15954
15955 PR target/82444
15956 * ira.c (ira_init_register_move_cost): Remove assert.
15957
15958 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15959
15960 PR rtl-optimization/84071
15961 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
15962 * doc/tm.texi: Regenerate.
15963
15964 2018-01-31 Richard Biener <rguenther@suse.de>
15965
15966 PR tree-optimization/84132
15967 * tree-data-ref.c (analyze_miv_subscript): Properly
15968 check whether evolution_function_is_affine_multivariate_p
15969 before calling gcd_of_steps_may_divide_p.
15970
15971 2018-01-31 Julia Koval <julia.koval@intel.com>
15972
15973 PR target/83618
15974 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
15975 * config/i386/i386.md (rdpid_rex64) New.
15976 (rdpid): Make 32bit only.
15977
15978 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
15979
15980 PR lto/84105
15981 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
15982 an IDENTIFIER_NODE for FUNCTION_TYPE's.
15983
15984 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15985
15986 Revert
15987 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
15988
15989 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15990
15991 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
15992
15993 PR rtl-optimization/84071
15994 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
15995 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
15996
15997 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
15998
15999 * config/arc/arc.c (arc_handle_aux_attribute): New function.
16000 (arc_attribute_table): Add 'aux' attribute.
16001 (arc_in_small_data_p): Consider aux like variables.
16002 (arc_is_aux_reg_p): New function.
16003 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
16004 (arc_get_aux_arg): New function.
16005 (prepare_move_operands): Handle aux-register access.
16006 (arc_handle_aux_attribute): New function.
16007 * doc/extend.texi (ARC Variable attributes): Add subsection.
16008
16009 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
16010
16011 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
16012 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
16013 (arc_attribute_table): Add 'uncached' attribute.
16014 (arc_print_operand): Print '.di' flag for uncached memory
16015 accesses.
16016 (arc_in_small_data_p): Do not consider for small data the uncached
16017 types.
16018 (arc_is_uncached_mem_p): New function.
16019 * config/arc/predicates.md (compact_store_memory_operand): Check
16020 for uncached memory accesses.
16021 (nonvol_nonimm_operand): Likewise.
16022 * doc/extend.texi (ARC Type Attribute): New subsection.
16023
16024 2018-01-31 Jakub Jelinek <jakub@redhat.com>
16025
16026 PR c/84100
16027 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
16028 falign-loops=): Add Optimization flag.
16029
16030 2018-01-30 Jeff Law <law@redhat.com>
16031
16032 PR target/84064
16033 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
16034 INT_REGISTERS_SAVED. Check it prior to calling
16035 get_scratch_register_on_entry.
16036 (ix86_adjust_stack_and_probe): Similarly.
16037 (ix86_emit_probe_stack_range): Similarly.
16038 (ix86_expand_prologue): Corresponding changes.
16039
16040 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16041
16042 PR target/40411
16043 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
16044 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
16045
16046 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
16047
16048 PR target/84112
16049 * lra-constraints.c (curr_insn_transform): Process AND in the
16050 address.
16051
16052 2018-01-30 Jakub Jelinek <jakub@redhat.com>
16053
16054 PR rtl-optimization/83986
16055 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
16056 dependence against last_pending_memory_flush in addition to
16057 pending_jump_insns.
16058
16059 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
16060
16061 PR tree-optimization/81611
16062 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
16063 copies.
16064
16065 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
16066
16067 PR target/83758
16068 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
16069 a reg rtx.
16070
16071 2018-01-30 Richard Biener <rguenther@suse.de>
16072 Jakub Jelinek <jakub@redhat.com>
16073
16074 PR tree-optimization/84111
16075 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
16076 inner loops added during recursion, as they don't have up-to-date
16077 SSA form.
16078
16079 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16080
16081 PR ipa/81360
16082 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
16083 (can_inline_edge_by_limits_p): ... here.
16084 (can_early_inline_edge_p, check_callers,
16085 update_caller_keys, update_callee_keys, recursive_inlining,
16086 add_new_edges_to_heap, speculation_useful_p,
16087 inline_small_functions,
16088 inline_small_functions, flatten_function,
16089 inline_to_all_callers_1): Update.
16090
16091 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
16092
16093 * profile-count.c (profile_count::combine_with_ipa_count): Handle
16094 zeros correctly.
16095
16096 2018-01-30 Richard Biener <rguenther@suse.de>
16097
16098 PR tree-optimization/83008
16099 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
16100 invariant and constant vector uses in stmts when they need
16101 more than one stmt.
16102
16103 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16104
16105 PR bootstrap/84017
16106 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
16107 * configure: Regenerate.
16108
16109 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16110
16111 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
16112 pattern.
16113 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
16114 Use gen_rtx_REG rather than gen_lowpart.
16115
16116 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16117
16118 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
16119 rather than 0 when creating partial subregs.
16120
16121 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
16122
16123 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
16124 of usage.
16125
16126 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
16127
16128 PR target/81550
16129 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
16130 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
16131 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
16132 flags. This restores the settings used before the 2017-07-24.
16133 Turning off pre increment/decrement/modify allows IVOPTS to
16134 optimize DF/SF loops where the index is an int.
16135
16136 2018-01-29 Richard Biener <rguenther@suse.de>
16137 Kelvin Nilsen <kelvin@gcc.gnu.org>
16138
16139 PR bootstrap/80867
16140 * tree-vect-stmts.c (vectorizable_call): Don't call
16141 targetm.vectorize_builtin_md_vectorized_function if callee is
16142 NULL.
16143
16144 2018-01-22 Carl Love <cel@us.ibm.com>
16145
16146 * doc/extend.tex: Fix typo in second arg in
16147 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
16148
16149 2018-01-29 Richard Biener <rguenther@suse.de>
16150
16151 PR tree-optimization/84086
16152 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
16153 (flush_ssaname_freelist): When SSA names were released reset
16154 the SCEV hash table.
16155
16156 2018-01-29 Richard Biener <rguenther@suse.de>
16157
16158 PR tree-optimization/84057
16159 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
16160 removed paths when removing edges.
16161
16162 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
16163
16164 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
16165 -mfunction-return=@var{choice}.
16166
16167 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
16168
16169 PR diagnostic/84034
16170 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
16171 Handle CR like TAB.
16172 (layout::print_source_line): Likewise.
16173 (test_get_line_width_without_trailing_whitespace): Add test cases.
16174
16175 2018-01-27 Jakub Jelinek <jakub@redhat.com>
16176
16177 PR middle-end/84040
16178 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
16179 debug insns.
16180
16181 2018-01-26 Jim Wilson <jimw@sifive.com>
16182
16183 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
16184
16185 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
16186 specified.
16187
16188 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16189
16190 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
16191 and CMP + SUB-immediate -> SUBS.
16192
16193 2018-01-26 Martin Sebor <msebor@redhat.com>
16194
16195 PR tree-optimization/83896
16196 * tree-ssa-strlen.c (get_string_len): Rename...
16197 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
16198 Avoid assuming length is constant.
16199 (handle_char_store): Use HOST_WIDE_INT for string length.
16200
16201 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
16202
16203 PR target/81763
16204 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
16205 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
16206
16207 2018-01-26 Richard Biener <rguenther@suse.de>
16208
16209 PR rtl-optimization/84003
16210 * dse.c (record_store): Only record redundant stores when
16211 the earlier store aliases at least all accesses the later one does.
16212
16213 2018-01-26 Jakub Jelinek <jakub@redhat.com>
16214
16215 PR rtl-optimization/83985
16216 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
16217 REG_CFA_RESTORE insns.
16218 (delete_unmarked_insns): Don't ignore separate shrink wrapping
16219 REG_CFA_RESTORE insns here.
16220
16221 PR c/83989
16222 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
16223 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
16224
16225 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16226
16227 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
16228 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
16229 (arc_init): Likewise.
16230 (arc_override_options): Likewise.
16231 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
16232 value.
16233 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
16234 support.
16235 * config/arc/arc.h (TARGET_DBNZ): Define.
16236 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
16237 properly set the tune attribute.
16238 (dbnz): Use TARGET_DBNZ guard.
16239 * config/arc/arc.opt (mtune): Add core3 option.
16240
16241 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16242
16243 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
16244 recognize new pic like addresses.
16245 (arc_delegitimize_address): Clean up.
16246
16247 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16248
16249 * config/arc/arc-arches.def: Option mrf16 valid for all
16250 architectures.
16251 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
16252 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
16253 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
16254 * config/arc/arc-tables.opt: Regenerate.
16255 * config/arc/arc.c (arc_conditional_register_usage): Handle
16256 reduced register file case.
16257 (arc_file_start): Set must have build attributes.
16258 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
16259 mrf16 option value.
16260 * config/arc/arc.opt (mrf16): Add new option.
16261 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
16262 * config/arc/genmultilib.awk: Handle new mrf16 option.
16263 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
16264 * config/arc/t-multilib: Regenerate.
16265 * doc/invoke.texi (ARC Options): Document mrf16 option.
16266
16267 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16268
16269 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
16270 * config/arc/arc.c (arc_handle_secure_attribute): New function.
16271 (arc_attribute_table): Add 'secure_call' attribute.
16272 (arc_print_operand): Print secure call operand.
16273 (arc_function_ok_for_sibcall): Don't optimize tail calls when
16274 secure.
16275 (arc_is_secure_call_p): New function. * config/arc/arc.md
16276 (call_i): Add support for sjli instruction.
16277 (call_value_i): Likewise.
16278 * config/arc/constraints.md (Csc): New constraint.
16279
16280 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
16281 John Eric Martin <John.Martin@emmicro-us.com>
16282
16283 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
16284 * config/arc/arc.c (_arc_jli_section): New struct.
16285 (arc_jli_section): New type.
16286 (rc_jli_sections): New static variable.
16287 (arc_handle_jli_attribute): New function.
16288 (arc_attribute_table): Add jli_always and jli_fixed attribute.
16289 (arc_file_end): New function.
16290 (TARGET_ASM_FILE_END): Define.
16291 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
16292 (arc_add_jli_section): New function.
16293 (jli_call_scan): Likewise.
16294 (arc_reorg): Call jli_call_scan.
16295 (arc_output_addsi): Remove 'S' from printing asm operand.
16296 (arc_is_jli_call_p): New function.
16297 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
16298 operand.
16299 (movhi_insn): Likewise.
16300 (movsi_insn): Likewise.
16301 (movsi_set_cc_insn): Likewise.
16302 (loadqi_update): Likewise.
16303 (load_zeroextendqisi_update): Likewise.
16304 (load_signextendqisi_update): Likewise.
16305 (loadhi_update): Likewise.
16306 (load_zeroextendhisi_update): Likewise.
16307 (load_signextendhisi_update): Likewise.
16308 (loadsi_update): Likewise.
16309 (loadsf_update): Likewise.
16310 (movsicc_insn): Likewise.
16311 (bset_insn): Likewise.
16312 (bxor_insn): Likewise.
16313 (bclr_insn): Likewise.
16314 (bmsk_insn): Likewise.
16315 (bicsi3_insn): Likewise.
16316 (cmpsi_cc_c_insn): Likewise.
16317 (movsi_ne): Likewise.
16318 (movsi_cond_exec): Likewise.
16319 (clrsbsi2): Likewise.
16320 (norm_f): Likewise.
16321 (normw): Likewise.
16322 (swap): Likewise.
16323 (divaw): Likewise.
16324 (flag): Likewise.
16325 (sr): Likewise.
16326 (kflag): Likewise.
16327 (ffs): Likewise.
16328 (ffs_f): Likewise.
16329 (fls): Likewise.
16330 (call_i): Remove 'S' asm letter, add jli instruction.
16331 (call_value_i): Likewise.
16332 * config/arc/arc.op (mjli-always): New option.
16333 * config/arc/constraints.md (Cji): New constraint.
16334 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
16335 operand.
16336 (subsf3_fpx): Likewise.
16337 (mulsf3_fpx): Likewise.
16338 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
16339 asm operand.
16340 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
16341 function attrbutes.
16342 * doc/invoke.texi (ARC): Document mjli-always option.
16343
16344 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
16345
16346 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
16347 avoid addition with 0 and use incw and decw where possible.
16348
16349 2018-01-26 Richard Biener <rguenther@suse.de>
16350
16351 PR tree-optimization/81082
16352 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
16353 association if it requires casting to unsigned.
16354 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
16355 from fold_plusminus_mult_expr to catch important cases late when
16356 range info is available.
16357
16358 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16359
16360 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
16361 * configure.ac (hidden_linkonce): New test.
16362 * configure: Regenerate.
16363 * config.in: Regenerate.
16364
16365 2018-01-26 Julia Koval <julia.koval@intel.com>
16366
16367 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
16368 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
16369 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
16370 _mm_mask_bitshuffle_epi64_mask): Fix type.
16371 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
16372 USI_FTYPE_V4DI_V4DI_USI): Remove.
16373 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
16374 __builtin_ia32_vpshufbitqmb256_mask,
16375 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
16376 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
16377 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
16378
16379 2018-01-26 Alan Modra <amodra@gmail.com>
16380
16381 PR target/84033
16382 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
16383 UNSPEC_VBPERMQ. Sort other unspecs.
16384
16385 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
16386
16387 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
16388
16389 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
16390
16391 PR middle-end/83055
16392 * predict.c (drop_profile): Do not push/pop cfun; update also
16393 node->count.
16394 (handle_missing_profiles): Fix logic looking for zero profiles.
16395
16396 2018-01-25 Jakub Jelinek <jakub@redhat.com>
16397
16398 PR middle-end/83977
16399 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
16400 on functions with #pragma omp declare simd or functions with simd
16401 attribute.
16402 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
16403 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
16404 Remove trailing \n from warning_at calls.
16405
16406 2018-01-25 Tom de Vries <tom@codesourcery.com>
16407
16408 PR target/84028
16409 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16410 for neutered workers.
16411
16412 2018-01-24 Joseph Myers <joseph@codesourcery.com>
16413
16414 PR target/68467
16415 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
16416 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
16417
16418 2018-01-24 Jeff Law <law@redhat.com>
16419
16420 PR target/83994
16421 * i386.c (get_probe_interval): Move to earlier point.
16422 (ix86_compute_frame_layout): If -fstack-clash-protection and
16423 the frame is larger than the probe interval, then use pushes
16424 to save registers rather than reg->mem moves.
16425 (ix86_expand_prologue): Remove conditional for int_registers_saved
16426 assertion.
16427
16428 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
16429
16430 PR target/84014
16431 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
16432 min/max for never referenced object.
16433
16434 2018-01-24 Jakub Jelinek <jakub@redhat.com>
16435
16436 PR middle-end/83977
16437 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
16438 here.
16439 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
16440 attributes from DECL_ATTRIBUTES (decl) without affecting
16441 DECL_ATTRIBUTES (current_function_decl).
16442 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
16443 functions with non-NULL DECL_ABSTRACT_ORIGIN.
16444
16445 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
16446
16447 PR tree-optimization/83979
16448 * fold-const.c (fold_comparison): Use constant_boolean_node
16449 instead of boolean_{true,false}_node.
16450
16451 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
16452
16453 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
16454 with zero counts.
16455
16456 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16457
16458 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16459 Simplify the clause that sets the length attribute.
16460 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16461 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
16462 clause that sets the length attribute.
16463 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16464
16465 2018-01-24 Tom de Vries <tom@codesourcery.com>
16466
16467 PR target/83589
16468 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
16469 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
16470 Add strict parameter.
16471 (prevent_branch_around_nothing): Insert dummy insn between branch to
16472 label and label with no ptx insn inbetween.
16473 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
16474
16475 2018-01-24 Tom de Vries <tom@codesourcery.com>
16476
16477 PR target/81352
16478 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
16479 for neutered threads in warp.
16480 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
16481
16482 2018-01-24 Richard Biener <rguenther@suse.de>
16483
16484 PR tree-optimization/83176
16485 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
16486 operands.
16487
16488 2018-01-24 Richard Biener <rguenther@suse.de>
16489
16490 PR tree-optimization/82819
16491 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
16492 code generating pluses that are no-ops in the target precision.
16493
16494 2018-01-24 Richard Biener <rguenther@suse.de>
16495
16496 PR middle-end/84000
16497 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
16498
16499 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16500
16501 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
16502 to merge probabilities.
16503 * predict.c (probably_never_executed): Also mark as cold functions
16504 with global 0 profile and guessed local profile.
16505 * profile-count.c (profile_probability::combine_with_count): New
16506 member function.
16507 * profile-count.h (profile_probability::operator*,
16508 profile_probability::operator*=, profile_probability::operator/,
16509 profile_probability::operator/=): Reduce precision to adjusted
16510 and set value to guessed on contradictory divisions.
16511 (profile_probability::combine_with_freq): Remove.
16512 (profile_probability::combine_wiht_count): Declare.
16513 (profile_count::force_nonzero):: Set to adjusted.
16514 (profile_count::probability_in):: Set quality to adjusted.
16515 * tree-ssa-tail-merge.c (replace_block_by): Use
16516 combine_with_count.
16517
16518 2018-01-23 Andrew Waterman <andrew@sifive.com>
16519 Jim Wilson <jimw@sifive.com>
16520
16521 * config/riscv/riscv.c (riscv_stack_boundary): New.
16522 (riscv_option_override): Set riscv_stack_boundary. Handle
16523 riscv_preferred_stack_boundary_arg.
16524 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
16525 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
16526 (STACK_BOUNDARY): Set to riscv_stack_boundary.
16527 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
16528 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
16529 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
16530
16531 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
16532
16533 PR target/83905
16534 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
16535 of struct ix86_frame.
16536 (ix86_expand_epilogue): Likewise. Add a local variable for
16537 the reg_save_offset field in struct ix86_frame.
16538
16539 2018-01-23 Bin Cheng <bin.cheng@arm.com>
16540
16541 PR tree-optimization/82604
16542 * tree-loop-distribution.c (enum partition_kind): New enum item
16543 PKIND_PARTIAL_MEMSET.
16544 (partition_builtin_p): Support above new enum item.
16545 (generate_code_for_partition): Ditto.
16546 (compute_access_range): Differentiate cases that equality can be
16547 proven at all loops, the innermost loops or no loops.
16548 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
16549 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
16550 (finalize_partitions, distribute_loop): Don't fuse partition of
16551 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
16552 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
16553 parloop is enabled.
16554
16555 2018-01-23 Martin Liska <mliska@suse.cz>
16556
16557 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
16558 order to ignore the predictor.
16559 (PRED_POLYMORPHIC_CALL): Likewise.
16560 (PRED_RECURSIVE_CALL): Likewise.
16561
16562 2018-01-23 Martin Liska <mliska@suse.cz>
16563
16564 * tree-profile.c (tree_profiling): Print function header to
16565 aware reader which function we are working on.
16566 * value-prof.c (gimple_find_values_to_profile): Do not print
16567 not interesting value histograms.
16568
16569 2018-01-23 Martin Liska <mliska@suse.cz>
16570
16571 * profile-count.h (enum profile_quality): Add
16572 profile_uninitialized as the first value. Do not number values
16573 as they are zero based.
16574 (profile_count::verify): Update sanity check.
16575 (profile_probability::verify): Likewise.
16576
16577 2018-01-23 Nathan Sidwell <nathan@acm.org>
16578
16579 * doc/invoke.texi (ffor-scope): Deprecate.
16580
16581 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16582
16583 PR tree-optimization/83510
16584 * domwalk.c (set_all_edges_as_executable): New function.
16585 (dom_walker::dom_walker): Convert bool param
16586 "skip_unreachable_blocks" to enum reachability. Move setup of
16587 edge flags to set_all_edges_as_executable and only do it when
16588 reachability is REACHABLE_BLOCKS.
16589 * domwalk.h (enum dom_walker::reachability): New enum.
16590 (dom_walker::dom_walker): Convert bool param
16591 "skip_unreachable_blocks" to enum reachability.
16592 (set_all_edges_as_executable): New decl.
16593 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
16594 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
16595 "reachability".
16596 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
16597 but converting true to REACHABLE_BLOCKS.
16598 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
16599 * tree-vrp.c
16600 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
16601 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
16602 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
16603 REACHABLE_BLOCKS.
16604 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
16605 if check_all_array_refs will be called.
16606
16607 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16608
16609 * tree.c (selftest::test_location_wrappers): Add more test
16610 coverage.
16611
16612 2018-01-23 David Malcolm <dmalcolm@redhat.com>
16613
16614 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
16615 (selftest::test_bit_in_range): Likewise.
16616
16617 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16618
16619 PR testsuite/83888
16620 * doc/sourcebuild.texi (vect_float): Say that the selector
16621 only describes the situation when -funsafe-math-optimizations is on.
16622 (vect_float_strict): Document.
16623
16624 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
16625
16626 PR tree-optimization/83965
16627 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16628 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
16629 instead of checking only for a reduction.
16630 (vect_recog_widen_sum_pattern): Likewise.
16631
16632 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16633
16634 * predict.c (probably_never_executed): Only use precise profile info.
16635 (compute_function_frequency): Skip after inlining hack since we now
16636 have quality checking.
16637
16638 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
16639
16640 * profile-count.h (profile_probability::very_unlikely,
16641 profile_probability::unlikely, profile_probability::even): Set
16642 precision to guessed.
16643
16644 2018-01-23 Richard Biener <rguenther@suse.de>
16645
16646 PR tree-optimization/83963
16647 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
16648 Properly terminate dominator walk when crossing the exit edge not
16649 when visiting its source block.
16650
16651 2018-01-23 Jakub Jelinek <jakub@redhat.com>
16652
16653 PR c++/83918
16654 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
16655 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
16656
16657 2018-01-22 Jakub Jelinek <jakub@redhat.com>
16658
16659 PR tree-optimization/83957
16660 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
16661 semicolon after for body surrounded by braces.
16662
16663 PR tree-optimization/83081
16664 * profile-count.h (profile_probability::split): New method.
16665 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
16666 Use profile_probability::split.
16667 (do_compare_rtx_and_jump): Fix adjustment of probabilities
16668 when splitting a single conditional jump into 2.
16669
16670 2018-01-22 David Malcolm <dmalcolm@redhat.com>
16671
16672 PR tree-optimization/69452
16673 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
16674 decl.
16675
16676 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16677
16678 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
16679 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
16680 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
16681
16682 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16683
16684 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
16685 declaration.
16686 * config/rl78/rl78.md (movdi): New define_expand.
16687 * config/rl78/rl78.c (rl78_split_movdi): New function.
16688
16689 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
16690
16691 PR target/83862
16692 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
16693 no longer used.
16694 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
16695 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
16696 128-bit to produce an UNSPEC move to get the double word with the
16697 signbit and then a shift directly to do signbit.
16698 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
16699 implementation with a new version that just does either a direct
16700 move or a regular move. Move memory interface to separate insns.
16701 Move insns so they are next to the expander.
16702 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
16703 with signbit move. Split big and little endian case.
16704 (signbit<mode>2_dm_mem_le): Likewise.
16705 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
16706 (signbit<mode>2_dm2): Likewise.
16707
16708 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16709
16710 * config/rl78/rl78.md (anddi3): New define_expand.
16711
16712 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16713
16714 * config/rl78/rl78.md (umindi3): New define_expand.
16715
16716 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16717
16718 * config/rl78/rl78.md (smindi3): New define_expand.
16719
16720 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16721
16722 * config/rl78/rl78.md (smaxdi3): New define_expand.
16723
16724 2018-01-22 Carl Love <cel@us.ibm.com>
16725
16726 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
16727 LVX_V1TI): Add macro expansion.
16728 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
16729 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
16730 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
16731 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
16732 Change check to determine if the instruction is a byte reversing
16733 entry. Fix typo in comment.
16734 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
16735 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
16736 Add def_builtin calls for new builtins.
16737 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
16738 Add define_insn expansion.
16739
16740 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16741
16742 * config/rl78/rl78.md (umaxdi3): New define_expand.
16743
16744 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
16745
16746 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
16747 for non-QImode registers.
16748
16749 2018-01-22 Richard Biener <rguenther@suse.de>
16750
16751 PR tree-optimization/83963
16752 * graphite-scop-detection.c (scop_detection::get_sese): Delay
16753 including the loop exit block.
16754 (scop_detection::merge_sese): Likewise.
16755 (scop_detection::add_scop): Do it here instead.
16756
16757 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16758
16759 * doc/sourcebuild.texi (arm_softfloat): Document.
16760
16761 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
16762
16763 PR gcc/77734
16764 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
16765 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
16766 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
16767
16768 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16769 David Edelsohn <dje.gcc@gmail.com>
16770
16771 PR target/83946
16772 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
16773 Change "crset eq" to "crset 2".
16774 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
16775 (*call_indirect_aix<mode>_nospec): Likewise.
16776 (*call_value_indirect_aix<mode>_nospec): Likewise.
16777 (*call_indirect_elfv2<mode>_nospec): Likewise.
16778 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
16779 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
16780 change assembly output from . to $.
16781 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
16782 (indirect_jump<mode>_nospec): Change assembly output from . to $.
16783 (*tablejump<mode>_internal1_nospec): Likewise.
16784
16785 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
16786
16787 PR target/80870
16788 * config/sh/sh_optimize_sett_clrt.cc:
16789 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
16790
16791 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
16792
16793 PR tree-optimization/83940
16794 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
16795 offset_dt to vect_constant_def rather than vect_unknown_def_type.
16796 (vect_check_load_store_mask): Add a mask_dt_out parameter and
16797 use it to pass back the definition type.
16798 (vect_check_store_rhs): Likewise rhs_dt_out.
16799 (vect_build_gather_load_calls): Add a mask_dt argument and use
16800 it instead of a call to vect_is_simple_use.
16801 (vectorizable_store): Update calls to vect_check_load_store_mask
16802 and vect_check_store_rhs. Use the dt returned by the latter instead
16803 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
16804 instead of calls to vect_is_simple_use. Pass the scalar rather
16805 than the vector operand to vect_is_simple_use when handling
16806 second and subsequent copies of an rhs value.
16807 (vectorizable_load): Update calls to vect_check_load_store_mask
16808 and vect_build_gather_load_calls. Use the cached mask_dt and
16809 gs_info.offset_dt instead of calls to vect_is_simple_use.
16810
16811 2018-01-20 Jakub Jelinek <jakub@redhat.com>
16812
16813 PR middle-end/83945
16814 * tree-emutls.c: Include gimplify.h.
16815 (lower_emutls_2): New function.
16816 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
16817 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
16818 it before further processing.
16819
16820 PR target/83930
16821 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
16822 UINTVAL (trueop1) instead of INTVAL (op1).
16823
16824 2018-01-19 Jakub Jelinek <jakub@redhat.com>
16825
16826 PR debug/81570
16827 PR debug/83728
16828 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
16829 INCOMING_FRAME_SP_OFFSET if not defined.
16830 (scan_trace): Add ENTRY argument. If true and
16831 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
16832 emit a note to adjust the CFA offset.
16833 (create_cfi_notes): Adjust scan_trace callers.
16834 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
16835 INCOMING_FRAME_SP_OFFSET in the CIE.
16836 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
16837 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
16838 Likewise.
16839 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
16840 * doc/tm.texi: Regenerated.
16841
16842 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
16843
16844 PR rtl-optimization/83147
16845 * lra-constraints.c (remove_inheritance_pseudos): Use
16846 lra_substitute_pseudo_within_insn.
16847
16848 2018-01-19 Tom de Vries <tom@codesourcery.com>
16849 Cesar Philippidis <cesar@codesourcery.com>
16850
16851 PR target/83920
16852 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
16853
16854 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
16855
16856 PR target/83790
16857 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
16858 spaces for function labels.
16859
16860 2018-01-19 Martin Liska <mliska@suse.cz>
16861
16862 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
16863 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
16864 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
16865 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
16866 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
16867 (PRED_CONST_RETURN): Change from 69 to 65.
16868 (PRED_NULL_RETURN): Change from 91 to 71.
16869 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
16870 (PRED_LOOP_GUARD): Change from 66 to 73.
16871
16872 2018-01-19 Martin Liska <mliska@suse.cz>
16873
16874 * predict.c (predict_insn_def): Add new assert.
16875 (struct branch_predictor): Change type to signed integer.
16876 (test_prediction_value_range): Amend test to cover
16877 PROB_UNINITIALIZED.
16878 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
16879 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
16880 (PRED_LOOP_ITERATIONS_MAX): Likewise.
16881 (PRED_LOOP_IV_COMPARE): Likewise.
16882 * predict.h (PROB_UNINITIALIZED): Define new constant.
16883
16884 2018-01-19 Martin Liska <mliska@suse.cz>
16885
16886 * predict.c (dump_prediction): Add new format for
16887 analyze_brprob.py script which is enabled with -details
16888 suboption.
16889 * profile-count.h (precise_p): New function.
16890
16891 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16892
16893 PR tree-optimization/83922
16894 * tree-vect-loop.c (vect_verify_full_masking): Return false if
16895 there are no statements that need masking.
16896 (vect_active_double_reduction_p): New function.
16897 (vect_analyze_loop_operations): Use it when handling phis that
16898 are not in the loop header.
16899
16900 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
16901
16902 PR tree-optimization/83914
16903 * tree-vect-loop.c (vectorizable_induction): Don't convert
16904 init_expr or apply the peeling adjustment for inductions
16905 that are nested within the vectorized loop.
16906
16907 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16908
16909 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
16910 instead of NEG.
16911
16912 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16913
16914 PR sanitizer/81715
16915 PR testsuite/83882
16916 * function.h (gimplify_parameters): Add gimple_seq * argument.
16917 * function.c: Include gimple.h and options.h.
16918 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
16919 for the added local temporaries if needed.
16920 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
16921 if there are any parameter cleanups, wrap whole body into a
16922 try/finally with the cleanups.
16923
16924 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
16925
16926 PR target/82964
16927 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
16928 Use GET_MODE_CLASS for scalar floating point.
16929
16930 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16931
16932 PR ipa/82256
16933 patch by PaX Team
16934 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
16935 Fix call of call_cgraph_insertion_hooks.
16936
16937 2018-01-18 Martin Sebor <msebor@redhat.com>
16938
16939 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
16940
16941 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
16942
16943 PR ipa/83619
16944 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
16945 frequencies.
16946
16947 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
16948
16949 PR other/70268
16950 * common.opt: (-ffile-prefix-map): New option.
16951 * opts.c (common_handle_option): Defer it.
16952 * opts-global.c (handle_common_deferred_options): Handle it.
16953 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
16954 * file-prefix-map.h: New file.
16955 (remap_debug_filename, add_debug_prefix_map): ...here.
16956 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
16957 * final.c (debug_prefix_map, add_debug_prefix_map
16958 remap_debug_filename): Move to...
16959 * file-prefix-map.c: New file.
16960 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
16961 generalize, get rid of alloca(), use strrchr() instead of strchr().
16962 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
16963 Implement in terms of add_prefix_map().
16964 (remap_macro_filename, remap_debug_filename): Implement in term of
16965 remap_filename().
16966 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
16967 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
16968 * dbxout.c: Include file-prefix-map.h.
16969 * varasm.c: Likewise.
16970 * vmsdbgout.c: Likewise.
16971 * xcoffout.c: Likewise.
16972 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
16973 * doc/cppopts.texi (-fmacro-prefix-map): Document.
16974 * doc/invoke.texi (-ffile-prefix-map): Document.
16975 (-fdebug-prefix-map): Update description.
16976
16977 2018-01-18 Martin Liska <mliska@suse.cz>
16978
16979 * config/i386/i386.c (indirect_thunk_name): Document that also
16980 lfence is emitted.
16981 (output_indirect_thunk): Document why both instructions
16982 (pause and lfence) are generated.
16983
16984 2018-01-18 Richard Biener <rguenther@suse.de>
16985
16986 PR tree-optimization/83887
16987 * graphite-scop-detection.c
16988 (scop_detection::get_nearest_dom_with_single_entry): Remove.
16989 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
16990 (scop_detection::merge_sese): Re-implement with a flood-fill
16991 algorithm that properly finds a SESE region if it exists.
16992
16993 2018-01-18 Jakub Jelinek <jakub@redhat.com>
16994
16995 PR c/61240
16996 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
16997 pointer_diff optimizations use view_convert instead of convert.
16998
16999 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17000
17001 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
17002 Generate different code for -mno-speculate-indirect-jumps.
17003 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
17004 (*call_indirect_aix<mode>): Disable for
17005 -mno-speculate-indirect-jumps.
17006 (*call_indirect_aix<mode>_nospec): New define_insn.
17007 (*call_value_indirect_aix<mode>): Disable for
17008 -mno-speculate-indirect-jumps.
17009 (*call_value_indirect_aix<mode>_nospec): New define_insn.
17010 (*sibcall_nonlocal_sysv<mode>): Generate different code for
17011 -mno-speculate-indirect-jumps.
17012 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
17013
17014 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17015
17016 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
17017 long double type, set the flags for noting the default long double
17018 type, even if we don't pass or return a long double type.
17019
17020 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
17021
17022 PR ipa/83051
17023 * ipa-inline.c (flatten_function): Do not overwrite final inlining
17024 failure.
17025
17026 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
17027
17028 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
17029 support for merge[hl].
17030 (fold_mergehl_helper): New helper function.
17031 (tree-vector-builder.h): New #include for tree_vector_builder usage.
17032 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
17033 (altivec_vmrglw_direct): Add xxmrglw insn.
17034
17035 2018-01-17 Andrew Waterman <andrew@sifive.com>
17036
17037 * config/riscv/riscv.c (riscv_conditional_register_usage): If
17038 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
17039
17040 2018-01-17 David Malcolm <dmalcolm@redhat.com>
17041
17042 PR lto/83121
17043 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
17044 call the lto_location_cache before reading the
17045 DECL_SOURCE_LOCATION of the types.
17046
17047 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
17048 Richard Sandiford <richard.sandiford@linaro.org>
17049
17050 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
17051 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
17052 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
17053 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
17054 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
17055 Add declaration.
17056 * config/aarch64/constraints.md (aarch64_movti_operand):
17057 Limit immediates.
17058 * config/aarch64/predicates.md (Uti): Add new constraint.
17059
17060 2018-01-17 Carl Love <cel@us.ibm.com>
17061
17062 * config/rs6000/vsx.md (define_expand xl_len_r,
17063 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
17064 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
17065 lxvll.
17066 (define_expand, define_insn): Move the shift left from the
17067 define_insn to the define_expand for lxvl and stxvl instructions.
17068 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
17069 and XL_LEN_R definitions to PURE.
17070
17071 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
17072
17073 * config/i386/i386.c (indirect_thunk_name): Declare regno
17074 as unsigned int. Compare regno with INVALID_REGNUM.
17075 (output_indirect_thunk): Ditto.
17076 (output_indirect_thunk_function): Ditto.
17077 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
17078 in the call to output_indirect_thunk_function.
17079
17080 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
17081
17082 PR middle-end/83884
17083 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
17084 rather than the size of inner_type to determine the stack slot size
17085 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
17086
17087 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
17088
17089 PR target/83546
17090 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
17091 to PTA_SILVERMONT.
17092
17093 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
17094
17095 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
17096 endian Linux systems to optionally enable multilibs for selecting
17097 the long double type if the user configured an explicit type.
17098 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
17099 have no long double multilibs if not defined.
17100 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
17101 warn if the user used -mabi={ieee,ibm}longdouble and we built
17102 multilibs for long double.
17103 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
17104 appropriate multilib option.
17105 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
17106 multilib options.
17107 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
17108 for building long double multilibs.
17109 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
17110
17111 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
17112
17113 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
17114 copies.
17115
17116 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
17117 64 bits.
17118 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
17119 128 bits.
17120
17121 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
17122 variables.
17123
17124 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
17125 return value.
17126
17127 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17128
17129 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
17130 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
17131
17132 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
17133
17134 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
17135 different rtl trees depending on TARGET_64BIT.
17136 (rs6000_gen_lvx): Likewise.
17137
17138 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
17139
17140 * config/visium/visium.md (nop): Tweak comment.
17141 (hazard_nop): Likewise.
17142
17143 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17144
17145 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
17146 -mspeculate-indirect-jumps.
17147 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
17148 for -mno-speculate-indirect-jumps.
17149 (*call_indirect_elfv2<mode>_nospec): New define_insn.
17150 (*call_value_indirect_elfv2<mode>): Disable for
17151 -mno-speculate-indirect-jumps.
17152 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
17153 (indirect_jump): Emit different RTL for
17154 -mno-speculate-indirect-jumps.
17155 (*indirect_jump<mode>): Disable for
17156 -mno-speculate-indirect-jumps.
17157 (*indirect_jump<mode>_nospec): New define_insn.
17158 (tablejump): Emit different RTL for
17159 -mno-speculate-indirect-jumps.
17160 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
17161 (tablejumpsi_nospec): New define_expand.
17162 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
17163 (tablejumpdi_nospec): New define_expand.
17164 (*tablejump<mode>_internal1): Disable for
17165 -mno-speculate-indirect-jumps.
17166 (*tablejump<mode>_internal1_nospec): New define_insn.
17167 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
17168 option.
17169
17170 2018-01-16 Artyom Skrobov tyomitch@gmail.com
17171
17172 * caller-save.c (insert_save): Drop unnecessary parameter. All
17173 callers updated.
17174
17175 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17176 Richard Biener <rguenth@suse.de>
17177
17178 PR libgomp/83590
17179 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
17180 return early, inline manually is_gimple_sizepos. Make sure if we
17181 call gimplify_expr we don't end up with a gimple constant.
17182 * tree.c (variably_modified_type_p): Don't return true for
17183 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
17184 * gimplify.h (is_gimple_sizepos): Remove.
17185
17186 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17187
17188 PR tree-optimization/83857
17189 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
17190 vectorizable_live_operation for pure SLP statements.
17191 (vectorizable_live_operation): Handle PHIs.
17192
17193 2018-01-16 Richard Biener <rguenther@suse.de>
17194
17195 PR tree-optimization/83867
17196 * tree-vect-stmts.c (vect_transform_stmt): Precompute
17197 nested_in_vect_loop_p since the scalar stmt may get invalidated.
17198
17199 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17200
17201 PR c/83844
17202 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
17203 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
17204 If off is not INTEGER_CST, issue a may not be aligned warning
17205 rather than isn't aligned. Use isn%'t rather than isn't.
17206 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
17207 into MULT_EXPR.
17208 <case MULT_EXPR>: Improve the case when bottom and one of the
17209 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
17210 operand, in that case check if the other operand is multiple of
17211 bottom divided by the INTEGER_CST operand.
17212
17213 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17214
17215 PR target/83858
17216 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
17217 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
17218 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
17219 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
17220 * config/pa/pa.c (pa_function_arg_advance): Likewise.
17221 (pa_function_arg, pa_arg_partial_bytes): Likewise.
17222 (pa_function_arg_size): New function.
17223
17224 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17225
17226 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
17227 in a separate statement.
17228
17229 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
17230
17231 PR tree-optimization/83847
17232 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
17233 group gathers and scatters.
17234
17235 2018-01-16 Jakub Jelinek <jakub@redhat.com>
17236
17237 PR rtl-optimization/86620
17238 * params.def (max-sched-ready-insns): Bump minimum value to 1.
17239
17240 PR rtl-optimization/83213
17241 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
17242 to last if both are JUMP_INSNs.
17243
17244 PR tree-optimization/83843
17245 * gimple-ssa-store-merging.c
17246 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
17247 store_immediate_info for bswap/nop orig_stores.
17248
17249 2018-01-15 Andrew Waterman <andrew@sifive.com>
17250
17251 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
17252 !TARGET_MUL.
17253 <UDIV>: Increase cost if !TARGET_DIV.
17254
17255 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
17256
17257 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
17258 (define_attr "cr_logical_3op"): New.
17259 (cceq_ior_compare): Adjust.
17260 (cceq_ior_compare_complement): Adjust.
17261 (*cceq_rev_compare): Adjust.
17262 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
17263 (is_cracked_insn): Adjust.
17264 (insn_must_be_first_in_group): Adjust.
17265 * config/rs6000/40x.md: Adjust.
17266 * config/rs6000/440.md: Adjust.
17267 * config/rs6000/476.md: Adjust.
17268 * config/rs6000/601.md: Adjust.
17269 * config/rs6000/603.md: Adjust.
17270 * config/rs6000/6xx.md: Adjust.
17271 * config/rs6000/7450.md: Adjust.
17272 * config/rs6000/7xx.md: Adjust.
17273 * config/rs6000/8540.md: Adjust.
17274 * config/rs6000/cell.md: Adjust.
17275 * config/rs6000/e300c2c3.md: Adjust.
17276 * config/rs6000/e500mc.md: Adjust.
17277 * config/rs6000/e500mc64.md: Adjust.
17278 * config/rs6000/e5500.md: Adjust.
17279 * config/rs6000/e6500.md: Adjust.
17280 * config/rs6000/mpc.md: Adjust.
17281 * config/rs6000/power4.md: Adjust.
17282 * config/rs6000/power5.md: Adjust.
17283 * config/rs6000/power6.md: Adjust.
17284 * config/rs6000/power7.md: Adjust.
17285 * config/rs6000/power8.md: Adjust.
17286 * config/rs6000/power9.md: Adjust.
17287 * config/rs6000/rs64.md: Adjust.
17288 * config/rs6000/titan.md: Adjust.
17289
17290 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17291
17292 * config/i386/predicates.md (indirect_branch_operand): Rewrite
17293 ix86_indirect_branch_register logic.
17294
17295 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17296
17297 * config/i386/constraints.md (Bs): Update
17298 ix86_indirect_branch_register check. Don't check
17299 ix86_indirect_branch_register with GOT_memory_operand.
17300 (Bw): Likewise.
17301 * config/i386/predicates.md (GOT_memory_operand): Don't check
17302 ix86_indirect_branch_register here.
17303 (GOT32_symbol_operand): Likewise.
17304
17305 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17306
17307 * config/i386/predicates.md (constant_call_address_operand):
17308 Rewrite ix86_indirect_branch_register logic.
17309 (sibcall_insn_operand): Likewise.
17310
17311 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17312
17313 * config/i386/constraints.md (Bs): Replace
17314 ix86_indirect_branch_thunk_register with
17315 ix86_indirect_branch_register.
17316 (Bw): Likewise.
17317 * config/i386/i386.md (indirect_jump): Likewise.
17318 (tablejump): Likewise.
17319 (*sibcall_memory): Likewise.
17320 (*sibcall_value_memory): Likewise.
17321 Peepholes of indirect call and jump via memory: Likewise.
17322 * config/i386/i386.opt: Likewise.
17323 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17324 (GOT_memory_operand): Likewise.
17325 (call_insn_operand): Likewise.
17326 (sibcall_insn_operand): Likewise.
17327 (GOT32_symbol_operand): Likewise.
17328
17329 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17330
17331 PR middle-end/83837
17332 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
17333 type rather than type addr's type points to.
17334 (expand_omp_atomic_mutex): Likewise.
17335 (expand_omp_atomic): Likewise.
17336
17337 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
17338
17339 PR target/83839
17340 * config/i386/i386.c (output_indirect_thunk_function): Use
17341 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
17342 for __x86_return_thunk.
17343
17344 2018-01-15 Richard Biener <rguenther@suse.de>
17345
17346 PR middle-end/83850
17347 * expmed.c (extract_bit_field_1): Fix typo.
17348
17349 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17350
17351 PR target/83687
17352 * config/arm/iterators.md (VF): New mode iterator.
17353 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
17354 Remove integer-related logic from pattern.
17355 (neon_vabd<mode>_3): Likewise.
17356
17357 2018-01-15 Jakub Jelinek <jakub@redhat.com>
17358
17359 PR middle-end/82694
17360 * common.opt (fstrict-overflow): No longer an alias.
17361 (fwrapv-pointer): New option.
17362 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
17363 also for pointer types based on flag_wrapv_pointer.
17364 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
17365 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
17366 opts->x_flag_wrapv got set.
17367 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
17368 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
17369 POINTER_TYPE_OVERFLOW_UNDEFINED.
17370 * match.pd: Likewise in address comparison pattern.
17371 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
17372
17373 2018-01-15 Richard Biener <rguenther@suse.de>
17374
17375 PR lto/83804
17376 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
17377 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
17378 Reset type names to their identifier if their TYPE_DECL doesn't
17379 have linkage (and thus is used for ODR and devirt).
17380 (save_debug_info_for_decl): Remove.
17381 (save_debug_info_for_type): Likewise.
17382 (add_tree_to_fld_list): Adjust.
17383 * tree-pretty-print.c (dump_generic_node): Make dumping of
17384 type names more robust.
17385
17386 2018-01-15 Richard Biener <rguenther@suse.de>
17387
17388 * BASE-VER: Bump to 8.0.1.
17389
17390 2018-01-14 Martin Sebor <msebor@redhat.com>
17391
17392 PR other/83508
17393 * builtins.c (check_access): Avoid warning when the no-warning bit
17394 is set.
17395
17396 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
17397
17398 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
17399 * ira-color (allocno_hard_regs_compare): Likewise.
17400
17401 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
17402
17403 PR target/83013
17404 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
17405 Use .pushsection/.popsection.
17406
17407 2018-01-14 Martin Sebor <msebor@redhat.com>
17408
17409 PR c++/81327
17410 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
17411
17412 2018-01-14 Jakub Jelinek <jakub@redhat.com>
17413
17414 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
17415 entry from extra_headers.
17416 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
17417 extra_headers, make the list bitwise identical to the i?86-*-* one.
17418
17419 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17420
17421 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
17422 -mcmodel=large with -mindirect-branch=thunk,
17423 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
17424 -mfunction-return=thunk-extern.
17425 * doc/invoke.texi: Document -mcmodel=large is incompatible with
17426 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
17427 -mfunction-return=thunk and -mfunction-return=thunk-extern.
17428
17429 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17430
17431 * config/i386/i386.c (print_reg): Print the name of the full
17432 integer register without '%'.
17433 (ix86_print_operand): Handle 'V'.
17434 * doc/extend.texi: Document 'V' modifier.
17435
17436 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17437
17438 * config/i386/constraints.md (Bs): Disallow memory operand for
17439 -mindirect-branch-register.
17440 (Bw): Likewise.
17441 * config/i386/predicates.md (indirect_branch_operand): Likewise.
17442 (GOT_memory_operand): Likewise.
17443 (call_insn_operand): Likewise.
17444 (sibcall_insn_operand): Likewise.
17445 (GOT32_symbol_operand): Likewise.
17446 * config/i386/i386.md (indirect_jump): Call convert_memory_address
17447 for -mindirect-branch-register.
17448 (tablejump): Likewise.
17449 (*sibcall_memory): Likewise.
17450 (*sibcall_value_memory): Likewise.
17451 Disallow peepholes of indirect call and jump via memory for
17452 -mindirect-branch-register.
17453 (*call_pop): Replace m with Bw.
17454 (*call_value_pop): Likewise.
17455 (*sibcall_pop_memory): Replace m with Bs.
17456 * config/i386/i386.opt (mindirect-branch-register): New option.
17457 * doc/invoke.texi: Document -mindirect-branch-register option.
17458
17459 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17460
17461 * config/i386/i386-protos.h (ix86_output_function_return): New.
17462 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
17463 set function_return_type.
17464 (indirect_thunk_name): Add ret_p to indicate thunk for function
17465 return.
17466 (output_indirect_thunk_function): Pass false to
17467 indirect_thunk_name.
17468 (ix86_output_indirect_branch_via_reg): Likewise.
17469 (ix86_output_indirect_branch_via_push): Likewise.
17470 (output_indirect_thunk_function): Create alias for function
17471 return thunk if regno < 0.
17472 (ix86_output_function_return): New function.
17473 (ix86_handle_fndecl_attribute): Handle function_return.
17474 (ix86_attribute_table): Add function_return.
17475 * config/i386/i386.h (machine_function): Add
17476 function_return_type.
17477 * config/i386/i386.md (simple_return_internal): Use
17478 ix86_output_function_return.
17479 (simple_return_internal_long): Likewise.
17480 * config/i386/i386.opt (mfunction-return=): New option.
17481 (indirect_branch): Mention -mfunction-return=.
17482 * doc/extend.texi: Document function_return function attribute.
17483 * doc/invoke.texi: Document -mfunction-return= option.
17484
17485 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
17486
17487 * config/i386/i386-opts.h (indirect_branch): New.
17488 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
17489 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
17490 with local indirect jump when converting indirect call and jump.
17491 (ix86_set_indirect_branch_type): New.
17492 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
17493 (indirectlabelno): New.
17494 (indirect_thunk_needed): Likewise.
17495 (indirect_thunk_bnd_needed): Likewise.
17496 (indirect_thunks_used): Likewise.
17497 (indirect_thunks_bnd_used): Likewise.
17498 (INDIRECT_LABEL): Likewise.
17499 (indirect_thunk_name): Likewise.
17500 (output_indirect_thunk): Likewise.
17501 (output_indirect_thunk_function): Likewise.
17502 (ix86_output_indirect_branch_via_reg): Likewise.
17503 (ix86_output_indirect_branch_via_push): Likewise.
17504 (ix86_output_indirect_branch): Likewise.
17505 (ix86_output_indirect_jmp): Likewise.
17506 (ix86_code_end): Call output_indirect_thunk_function if needed.
17507 (ix86_output_call_insn): Call ix86_output_indirect_branch if
17508 needed.
17509 (ix86_handle_fndecl_attribute): Handle indirect_branch.
17510 (ix86_attribute_table): Add indirect_branch.
17511 * config/i386/i386.h (machine_function): Add indirect_branch_type
17512 and has_local_indirect_jump.
17513 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
17514 to true.
17515 (tablejump): Likewise.
17516 (*indirect_jump): Use ix86_output_indirect_jmp.
17517 (*tablejump_1): Likewise.
17518 (simple_return_indirect_internal): Likewise.
17519 * config/i386/i386.opt (mindirect-branch=): New option.
17520 (indirect_branch): New.
17521 (keep): Likewise.
17522 (thunk): Likewise.
17523 (thunk-inline): Likewise.
17524 (thunk-extern): Likewise.
17525 * doc/extend.texi: Document indirect_branch function attribute.
17526 * doc/invoke.texi: Document -mindirect-branch= option.
17527
17528 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
17529
17530 PR ipa/83051
17531 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
17532
17533 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
17534
17535 * ipa-inline.c (want_inline_small_function_p): Return false if
17536 inlining has already failed with CIF_FINAL_ERROR.
17537 (update_caller_keys): Call want_inline_small_function_p before
17538 can_inline_edge_p.
17539 (update_callee_keys): Likewise.
17540
17541 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17542
17543 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
17544 New function.
17545 (rs6000_quadword_masked_address_p): Likewise.
17546 (quad_aligned_load_p): Likewise.
17547 (quad_aligned_store_p): Likewise.
17548 (const_load_sequence_p): Add comment to describe the outer-most loop.
17549 (mimic_memory_attributes_and_flags): New function.
17550 (rs6000_gen_stvx): Likewise.
17551 (replace_swapped_aligned_store): Likewise.
17552 (rs6000_gen_lvx): Likewise.
17553 (replace_swapped_aligned_load): Likewise.
17554 (replace_swapped_load_constant): Capitalize argument name in
17555 comment describing this function.
17556 (rs6000_analyze_swaps): Add a third pass to search for vector loads
17557 and stores that access quad-word aligned addresses and replace
17558 with stvx or lvx instructions when appropriate.
17559 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
17560 New function prototype.
17561 (rs6000_quadword_masked_address_p): Likewise.
17562 (rs6000_gen_lvx): Likewise.
17563 (rs6000_gen_stvx): Likewise.
17564 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
17565 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
17566 when memory address is aligned.
17567 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
17568 this split to select lvx instruction when memory address is aligned.
17569 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
17570 instruction when memory address is aligned.
17571 (*vsx_le_perm_load_v16qi): Likewise.
17572 (four unnamed splitters): Modify to select the stvx instruction
17573 when memory is aligned.
17574
17575 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
17576
17577 * predict.c (determine_unlikely_bbs): Handle correctly BBs
17578 which appears in the queue multiple times.
17579
17580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17581 Alan Hayward <alan.hayward@arm.com>
17582 David Sherwood <david.sherwood@arm.com>
17583
17584 * tree-vectorizer.h (vec_lower_bound): New structure.
17585 (_loop_vec_info): Add check_nonzero and lower_bounds.
17586 (LOOP_VINFO_CHECK_NONZERO): New macro.
17587 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
17588 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
17589 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
17590 fields. Make seg_len the distance travelled, not including the
17591 access size.
17592 (dr_direction_indicator): Declare.
17593 (dr_zero_step_indicator): Likewise.
17594 (dr_known_forward_stride_p): Likewise.
17595 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
17596 tree-ssanames.h.
17597 (runtime_alias_check_p): Allow runtime alias checks with
17598 variable strides.
17599 (operator ==): Compare access_size and align.
17600 (prune_runtime_alias_test_list): Rework for new distinction between
17601 the access_size and seg_len.
17602 (create_intersect_range_checks_index): Likewise. Cope with polynomial
17603 segment lengths.
17604 (get_segment_min_max): New function.
17605 (create_intersect_range_checks): Use it.
17606 (dr_step_indicator): New function.
17607 (dr_direction_indicator): Likewise.
17608 (dr_zero_step_indicator): Likewise.
17609 (dr_known_forward_stride_p): Likewise.
17610 * tree-loop-distribution.c (data_ref_segment_size): Return
17611 DR_STEP * (niters - 1).
17612 (compute_alias_check_pairs): Update call to the dr_with_seg_len
17613 constructor.
17614 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
17615 (vect_preserves_scalar_order_p): New function, split out from...
17616 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
17617 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
17618 (vect_vfa_access_size): New function.
17619 (vect_vfa_align): Likewise.
17620 (vect_compile_time_alias): Take access_size_a and access_b arguments.
17621 (dump_lower_bound): New function.
17622 (vect_check_lower_bound): Likewise.
17623 (vect_small_gap_p): Likewise.
17624 (vectorizable_with_step_bound_p): Likewise.
17625 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
17626 depencies if the vectorization factor is 1. Convert the checks
17627 for nonzero steps into checks on the bounds of DR_STEP. Try using
17628 a bunds check for variable steps if the minimum required step is
17629 relatively small. Update calls to the dr_with_seg_len
17630 constructor and to vect_compile_time_alias.
17631 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
17632 function.
17633 (vect_loop_versioning): Call it.
17634 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
17635 when retrying.
17636 (vect_estimate_min_profitable_iters): Account for any bounds checks.
17637
17638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17639 Alan Hayward <alan.hayward@arm.com>
17640 David Sherwood <david.sherwood@arm.com>
17641
17642 * doc/sourcebuild.texi (vect_scatter_store): Document.
17643 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
17644 optabs.
17645 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
17646 Document.
17647 * genopinit.c (main): Add supports_vec_scatter_store and
17648 supports_vec_scatter_store_cached to target_optabs.
17649 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
17650 IFN_MASK_SCATTER_STORE.
17651 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
17652 functions.
17653 * internal-fn.h (internal_store_fn_p): Declare.
17654 (internal_fn_stored_value_index): Likewise.
17655 * internal-fn.c (scatter_store_direct): New macro.
17656 (expand_scatter_store_optab_fn): New function.
17657 (direct_scatter_store_optab_supported_p): New macro.
17658 (internal_store_fn_p): New function.
17659 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
17660 IFN_MASK_SCATTER_STORE.
17661 (internal_fn_mask_index): Likewise.
17662 (internal_fn_stored_value_index): New function.
17663 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
17664 for scatter stores.
17665 * optabs-query.h (supports_vec_scatter_store_p): Declare.
17666 * optabs-query.c (supports_vec_scatter_store_p): New function.
17667 * tree-vectorizer.h (vect_get_store_rhs): Declare.
17668 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
17669 true for scatter stores.
17670 (vect_gather_scatter_fn_p): Handle scatter stores too.
17671 (vect_check_gather_scatter): Consider using scatter stores if
17672 supports_vec_scatter_store_p.
17673 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
17674 scatter stores too.
17675 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17676 internal_fn_stored_value_index.
17677 (check_load_store_masking): Handle scatter stores too.
17678 (vect_get_store_rhs): Make public.
17679 (vectorizable_call): Use internal_store_fn_p.
17680 (vectorizable_store): Handle scatter store internal functions.
17681 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
17682 when deciding whether the end of the group has been reached.
17683 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
17684 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
17685 (mask_scatter_store<mode>): New insns.
17686
17687 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17688 Alan Hayward <alan.hayward@arm.com>
17689 David Sherwood <david.sherwood@arm.com>
17690
17691 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
17692 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
17693 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
17694 function.
17695 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
17696 Use vect_truncate_gather_scatter_offset if we can't treat the
17697 operation as a normal gather load or scatter store.
17698 (get_group_load_store_type): Take the gather_scatter_info
17699 as argument. Try using a gather load or scatter store for
17700 single-element groups.
17701 (get_load_store_type): Update calls to get_group_load_store_type
17702 and vect_use_strided_gather_scatters_p.
17703
17704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17705 Alan Hayward <alan.hayward@arm.com>
17706 David Sherwood <david.sherwood@arm.com>
17707
17708 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
17709 optional tree argument.
17710 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
17711 null target hooks.
17712 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
17713 but continue to use the current value as a fallback.
17714 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
17715 to compare the updates.
17716 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
17717 (get_load_store_type): Use it when handling a strided access.
17718 (vect_get_strided_load_store_ops): New function.
17719 (vect_get_data_ptr_increment): Likewise.
17720 (vectorizable_load): Handle strided gather loads. Always pass
17721 a step to vect_create_data_ref_ptr and bump_vector_ptr.
17722
17723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17724 Alan Hayward <alan.hayward@arm.com>
17725 David Sherwood <david.sherwood@arm.com>
17726
17727 * doc/md.texi (gather_load@var{m}): Document.
17728 (mask_gather_load@var{m}): Likewise.
17729 * genopinit.c (main): Add supports_vec_gather_load and
17730 supports_vec_gather_load_cached to target_optabs.
17731 * optabs-tree.c (init_tree_optimization_optabs): Use
17732 ggc_cleared_alloc to allocate target_optabs.
17733 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
17734 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
17735 functions.
17736 * internal-fn.h (internal_load_fn_p): Declare.
17737 (internal_gather_scatter_fn_p): Likewise.
17738 (internal_fn_mask_index): Likewise.
17739 (internal_gather_scatter_fn_supported_p): Likewise.
17740 * internal-fn.c (gather_load_direct): New macro.
17741 (expand_gather_load_optab_fn): New function.
17742 (direct_gather_load_optab_supported_p): New macro.
17743 (direct_internal_fn_optab): New function.
17744 (internal_load_fn_p): Likewise.
17745 (internal_gather_scatter_fn_p): Likewise.
17746 (internal_fn_mask_index): Likewise.
17747 (internal_gather_scatter_fn_supported_p): Likewise.
17748 * optabs-query.c (supports_at_least_one_mode_p): New function.
17749 (supports_vec_gather_load_p): Likewise.
17750 * optabs-query.h (supports_vec_gather_load_p): Declare.
17751 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
17752 and memory_type field.
17753 (NUM_PATTERNS): Bump to 15.
17754 * tree-vect-data-refs.c: Include internal-fn.h.
17755 (vect_gather_scatter_fn_p): New function.
17756 (vect_describe_gather_scatter_call): Likewise.
17757 (vect_check_gather_scatter): Try using internal functions for
17758 gather loads. Recognize existing calls to a gather load function.
17759 (vect_analyze_data_refs): Consider using gather loads if
17760 supports_vec_gather_load_p.
17761 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
17762 (vect_get_gather_scatter_offset_type): Likewise.
17763 (vect_convert_mask_for_vectype): Likewise.
17764 (vect_add_conversion_to_patterm): Likewise.
17765 (vect_try_gather_scatter_pattern): Likewise.
17766 (vect_recog_gather_scatter_pattern): New pattern recognizer.
17767 (vect_vect_recog_func_ptrs): Add it.
17768 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
17769 internal_fn_mask_index and internal_gather_scatter_fn_p.
17770 (check_load_store_masking): Take the gather_scatter_info as an
17771 argument and handle gather loads.
17772 (vect_get_gather_scatter_ops): New function.
17773 (vectorizable_call): Check internal_load_fn_p.
17774 (vectorizable_load): Likewise. Handle gather load internal
17775 functions.
17776 (vectorizable_store): Update call to check_load_store_masking.
17777 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
17778 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
17779 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
17780 (aarch64_gather_scale_operand_d): New predicates.
17781 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
17782 (mask_gather_load<mode>): New insns.
17783
17784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17785 Alan Hayward <alan.hayward@arm.com>
17786 David Sherwood <david.sherwood@arm.com>
17787
17788 * optabs.def (fold_left_plus_optab): New optab.
17789 * doc/md.texi (fold_left_plus_@var{m}): Document.
17790 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
17791 * internal-fn.c (fold_left_direct): Define.
17792 (expand_fold_left_optab_fn): Likewise.
17793 (direct_fold_left_optab_supported_p): Likewise.
17794 * fold-const-call.c (fold_const_fold_left): New function.
17795 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
17796 * tree-parloops.c (valid_reduction_p): New function.
17797 (gather_scalar_reductions): Use it.
17798 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
17799 (vect_finish_replace_stmt): Declare.
17800 * tree-vect-loop.c (fold_left_reduction_fn): New function.
17801 (needs_fold_left_reduction_p): New function, split out from...
17802 (vect_is_simple_reduction): ...here. Accept reductions that
17803 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
17804 (vect_force_simple_reduction): Also store the reduction type in
17805 the assignment's STMT_VINFO_REDUC_TYPE.
17806 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
17807 (merge_with_identity): New function.
17808 (vect_expand_fold_left): Likewise.
17809 (vectorize_fold_left_reduction): Likewise.
17810 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
17811 scalar phi in place for it. Check for target support and reject
17812 cases that would reassociate the operation. Defer the transform
17813 phase to vectorize_fold_left_reduction.
17814 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
17815 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
17816 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
17817
17818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17819
17820 * tree-if-conv.c (predicate_mem_writes): Remove redundant
17821 call to ifc_temp_var.
17822
17823 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17824 Alan Hayward <alan.hayward@arm.com>
17825 David Sherwood <david.sherwood@arm.com>
17826
17827 * target.def (legitimize_address_displacement): Take the original
17828 offset as a poly_int.
17829 * targhooks.h (default_legitimize_address_displacement): Update
17830 accordingly.
17831 * targhooks.c (default_legitimize_address_displacement): Likewise.
17832 * doc/tm.texi: Regenerate.
17833 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
17834 as an argument, moving assert of ad->disp == ad->disp_term to...
17835 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
17836 Try calling targetm.legitimize_address_displacement before expanding
17837 the address rather than afterwards, and adjust for the new interface.
17838 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
17839 Match the new hook interface. Handle SVE addresses.
17840 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
17841 new hook interface.
17842
17843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17844
17845 * Makefile.in (OBJS): Add early-remat.o.
17846 * target.def (select_early_remat_modes): New hook.
17847 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
17848 * doc/tm.texi: Regenerate.
17849 * targhooks.h (default_select_early_remat_modes): Declare.
17850 * targhooks.c (default_select_early_remat_modes): New function.
17851 * timevar.def (TV_EARLY_REMAT): New timevar.
17852 * passes.def (pass_early_remat): New pass.
17853 * tree-pass.h (make_pass_early_remat): Declare.
17854 * early-remat.c: New file.
17855 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
17856 function.
17857 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
17858
17859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17860 Alan Hayward <alan.hayward@arm.com>
17861 David Sherwood <david.sherwood@arm.com>
17862
17863 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
17864 vfm1 with a bound_epilog parameter.
17865 (vect_do_peeling): Update calls accordingly, and move the prologue
17866 call earlier in the function. Treat the base bound_epilog as 0 for
17867 fully-masked loops and retain vf - 1 for other loops. Add 1 to
17868 this base when peeling for gaps.
17869 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
17870 with fully-masked loops.
17871 (vect_estimate_min_profitable_iters): Handle the single peeled
17872 iteration in that case.
17873
17874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17875 Alan Hayward <alan.hayward@arm.com>
17876 David Sherwood <david.sherwood@arm.com>
17877
17878 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
17879 single-element interleaving even if the size is not a power of 2.
17880 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
17881 accesses for single-element interleaving if the group size is
17882 not a power of 2.
17883
17884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17885 Alan Hayward <alan.hayward@arm.com>
17886 David Sherwood <david.sherwood@arm.com>
17887
17888 * doc/md.texi (fold_extract_last_@var{m}): Document.
17889 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
17890 * optabs.def (fold_extract_last_optab): New optab.
17891 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
17892 * internal-fn.c (fold_extract_direct): New macro.
17893 (expand_fold_extract_optab_fn): Likewise.
17894 (direct_fold_extract_optab_supported_p): Likewise.
17895 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
17896 * tree-vect-loop.c (vect_model_reduction_cost): Handle
17897 EXTRACT_LAST_REDUCTION.
17898 (get_initial_def_for_reduction): Do not create an initial vector
17899 for EXTRACT_LAST_REDUCTION reductions.
17900 (vectorizable_reduction): Leave the scalar phi in place for
17901 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
17902 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
17903 epilogue code for EXTRACT_LAST_REDUCTION and defer the
17904 transform phase to vectorizable_condition.
17905 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
17906 split out from...
17907 (vect_finish_stmt_generation): ...here.
17908 (vect_finish_replace_stmt): New function.
17909 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
17910 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
17911 pattern.
17912 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
17913
17914 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17915 Alan Hayward <alan.hayward@arm.com>
17916 David Sherwood <david.sherwood@arm.com>
17917
17918 * doc/md.texi (extract_last_@var{m}): Document.
17919 * optabs.def (extract_last_optab): New optab.
17920 * internal-fn.def (EXTRACT_LAST): New internal function.
17921 * internal-fn.c (cond_unary_direct): New macro.
17922 (expand_cond_unary_optab_fn): Likewise.
17923 (direct_cond_unary_optab_supported_p): Likewise.
17924 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
17925 loops using EXTRACT_LAST.
17926 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
17927 (extract_last_<mode>): ...this optab.
17928 (vec_extract<mode><Vel>): Update accordingly.
17929
17930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17931 Alan Hayward <alan.hayward@arm.com>
17932 David Sherwood <david.sherwood@arm.com>
17933
17934 * target.def (empty_mask_is_expensive): New hook.
17935 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
17936 * doc/tm.texi: Regenerate.
17937 * targhooks.h (default_empty_mask_is_expensive): Declare.
17938 * targhooks.c (default_empty_mask_is_expensive): New function.
17939 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
17940 if the target says that empty masks are expensive.
17941 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
17942 New function.
17943 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
17944
17945 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17946 Alan Hayward <alan.hayward@arm.com>
17947 David Sherwood <david.sherwood@arm.com>
17948
17949 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
17950 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
17951 (vect_use_loop_mask_for_alignment_p): New function.
17952 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
17953 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
17954 niters_skip argument. Make sure that the first niters_skip elements
17955 of the first iteration are inactive.
17956 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
17957 Update call to vect_set_loop_masks_directly.
17958 (get_misalign_in_elems): New function, split out from...
17959 (vect_gen_prolog_loop_niters): ...here.
17960 (vect_update_init_of_dr): Take a code argument that specifies whether
17961 the adjustment should be added or subtracted.
17962 (vect_update_init_of_drs): Likewise.
17963 (vect_prepare_for_masked_peels): New function.
17964 (vect_do_peeling): Skip prologue peeling if we're using a mask
17965 instead. Update call to vect_update_inits_of_drs.
17966 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17967 mask_skip_niters.
17968 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
17969 alignment. Do not include the number of peeled iterations in
17970 the minimum threshold in that case.
17971 (vectorizable_induction): Adjust the start value down by
17972 LOOP_VINFO_MASK_SKIP_NITERS iterations.
17973 (vect_transform_loop): Call vect_prepare_for_masked_peels.
17974 Take the number of skipped iterations into account when calculating
17975 the loop bounds.
17976 * tree-vect-stmts.c (vect_gen_while_not): New function.
17977
17978 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17979 Alan Hayward <alan.hayward@arm.com>
17980 David Sherwood <david.sherwood@arm.com>
17981
17982 * doc/sourcebuild.texi (vect_fully_masked): Document.
17983 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
17984 default value to 0.
17985 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
17986 split out from...
17987 (vect_analyze_loop_2): ...here. Don't check the vectorization
17988 factor against the number of loop iterations if the loop is
17989 fully-masked.
17990
17991 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
17992 Alan Hayward <alan.hayward@arm.com>
17993 David Sherwood <david.sherwood@arm.com>
17994
17995 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
17996 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
17997 (dump_groups): Update accordingly.
17998 (iv_use::mem_type): New member variable.
17999 (address_p): New function.
18000 (record_use): Add a mem_type argument and initialize the new
18001 mem_type field.
18002 (record_group_use): Add a mem_type argument. Use address_p.
18003 Remove obsolete null checks of base_object. Update call to record_use.
18004 (find_interesting_uses_op): Update call to record_group_use.
18005 (find_interesting_uses_cond): Likewise.
18006 (find_interesting_uses_address): Likewise.
18007 (get_mem_type_for_internal_fn): New function.
18008 (find_address_like_use): Likewise.
18009 (find_interesting_uses_stmt): Try find_address_like_use before
18010 calling find_interesting_uses_op.
18011 (addr_offset_valid_p): Use the iv mem_type field as the type
18012 of the addressed memory.
18013 (add_autoinc_candidates): Likewise.
18014 (get_address_cost): Likewise.
18015 (split_small_address_groups_p): Use address_p.
18016 (split_address_groups): Likewise.
18017 (add_iv_candidate_for_use): Likewise.
18018 (autoinc_possible_for_pair): Likewise.
18019 (rewrite_groups): Likewise.
18020 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
18021 (determine_group_iv_cost): Update after split of USE_ADDRESS.
18022 (get_alias_ptr_type_for_ptr_address): New function.
18023 (rewrite_use_address): Rewrite address uses in calls that were
18024 identified by find_address_like_use.
18025
18026 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18027 Alan Hayward <alan.hayward@arm.com>
18028 David Sherwood <david.sherwood@arm.com>
18029
18030 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
18031 TARGET_MEM_REFs.
18032 * gimple-expr.h (is_gimple_addressable: Likewise.
18033 * gimple-expr.c (is_gimple_address): Likewise.
18034 * internal-fn.c (expand_call_mem_ref): New function.
18035 (expand_mask_load_optab_fn): Use it.
18036 (expand_mask_store_optab_fn): Likewise.
18037
18038 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18039 Alan Hayward <alan.hayward@arm.com>
18040 David Sherwood <david.sherwood@arm.com>
18041
18042 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
18043 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
18044 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
18045 (cond_umax@var{mode}): Document.
18046 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
18047 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
18048 (cond_umin_optab, cond_umax_optab): New optabs.
18049 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
18050 (COND_IOR, COND_XOR): New internal functions.
18051 * internal-fn.h (get_conditional_internal_fn): Declare.
18052 * internal-fn.c (cond_binary_direct): New macro.
18053 (expand_cond_binary_optab_fn): Likewise.
18054 (direct_cond_binary_optab_supported_p): Likewise.
18055 (get_conditional_internal_fn): New function.
18056 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
18057 Cope with reduction statements that are vectorized as calls rather
18058 than assignments.
18059 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
18060 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
18061 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
18062 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18063 (UNSPEC_COND_EOR): New unspecs.
18064 (optab): Add mappings for them.
18065 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
18066 (sve_int_op, sve_fp_op): New int attributes.
18067
18068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18069 Alan Hayward <alan.hayward@arm.com>
18070 David Sherwood <david.sherwood@arm.com>
18071
18072 * optabs.def (while_ult_optab): New optab.
18073 * doc/md.texi (while_ult@var{m}@var{n}): Document.
18074 * internal-fn.def (WHILE_ULT): New internal function.
18075 * internal-fn.h (direct_internal_fn_supported_p): New override
18076 that takes two types as argument.
18077 * internal-fn.c (while_direct): New macro.
18078 (expand_while_optab_fn): New function.
18079 (convert_optab_supported_p): Likewise.
18080 (direct_while_optab_supported_p): New macro.
18081 * wide-int.h (wi::udiv_ceil): New function.
18082 * tree-vectorizer.h (rgroup_masks): New structure.
18083 (vec_loop_masks): New typedef.
18084 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
18085 and fully_masked_p.
18086 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
18087 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
18088 (vect_max_vf): New function.
18089 (slpeel_make_loop_iterate_ntimes): Delete.
18090 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
18091 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
18092 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
18093 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
18094 internal-fn.h, stor-layout.h and optabs-query.h.
18095 (vect_set_loop_mask): New function.
18096 (add_preheader_seq): Likewise.
18097 (add_header_seq): Likewise.
18098 (interleave_supported_p): Likewise.
18099 (vect_maybe_permute_loop_masks): Likewise.
18100 (vect_set_loop_masks_directly): Likewise.
18101 (vect_set_loop_condition_masked): Likewise.
18102 (vect_set_loop_condition_unmasked): New function, split out from
18103 slpeel_make_loop_iterate_ntimes.
18104 (slpeel_make_loop_iterate_ntimes): Rename to..
18105 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
18106 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
18107 (vect_do_peeling): Update call accordingly.
18108 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
18109 loops.
18110 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
18111 mask_compare_type, can_fully_mask_p and fully_masked_p.
18112 (release_vec_loop_masks): New function.
18113 (_loop_vec_info): Use it to free the loop masks.
18114 (can_produce_all_loop_masks_p): New function.
18115 (vect_get_max_nscalars_per_iter): Likewise.
18116 (vect_verify_full_masking): Likewise.
18117 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
18118 retries, and free the mask rgroups before retrying. Check loop-wide
18119 reasons for disallowing fully-masked loops. Make the final decision
18120 about whether use a fully-masked loop or not.
18121 (vect_estimate_min_profitable_iters): Do not assume that peeling
18122 for the number of iterations will be needed for fully-masked loops.
18123 (vectorizable_reduction): Disable fully-masked loops.
18124 (vectorizable_live_operation): Likewise.
18125 (vect_halve_mask_nunits): New function.
18126 (vect_double_mask_nunits): Likewise.
18127 (vect_record_loop_mask): Likewise.
18128 (vect_get_loop_mask): Likewise.
18129 (vect_transform_loop): Handle the case in which the final loop
18130 iteration might handle a partial vector. Call vect_set_loop_condition
18131 instead of slpeel_make_loop_iterate_ntimes.
18132 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
18133 (check_load_store_masking): New function.
18134 (prepare_load_store_mask): Likewise.
18135 (vectorizable_store): Handle fully-masked loops.
18136 (vectorizable_load): Likewise.
18137 (supportable_widening_operation): Use vect_halve_mask_nunits for
18138 booleans.
18139 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
18140 (vect_gen_while): New function.
18141 * config/aarch64/aarch64.md (umax<mode>3): New expander.
18142 (aarch64_uqdec<mode>): New insn.
18143
18144 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18145 Alan Hayward <alan.hayward@arm.com>
18146 David Sherwood <david.sherwood@arm.com>
18147
18148 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
18149 (reduc_xor_scal_optab): New optabs.
18150 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
18151 (reduc_xor_scal_@var{m}): Document.
18152 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
18153 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
18154 internal functions.
18155 * fold-const-call.c (fold_const_call): Handle them.
18156 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
18157 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
18158 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
18159 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
18160 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
18161 (UNSPEC_XORV): New unspecs.
18162 (optab): Add entries for them.
18163 (BITWISEV): New int iterator.
18164 (bit_reduc_op): New int attributes.
18165
18166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18167 Alan Hayward <alan.hayward@arm.com>
18168 David Sherwood <david.sherwood@arm.com>
18169
18170 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
18171 * internal-fn.def (VEC_SHL_INSERT): New internal function.
18172 * optabs.def (vec_shl_insert_optab): New optab.
18173 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
18174 (duplicate_and_interleave): Likewise.
18175 * tree-vect-loop.c: Include internal-fn.h.
18176 (neutral_op_for_slp_reduction): New function, split out from
18177 get_initial_defs_for_reduction.
18178 (get_initial_def_for_reduction): Handle option 2 for variable-length
18179 vectors by loading the neutral value into a vector and then shifting
18180 the initial value into element 0.
18181 (get_initial_defs_for_reduction): Replace the code argument with
18182 the neutral value calculated by neutral_op_for_slp_reduction.
18183 Use gimple_build_vector for constant-length vectors.
18184 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
18185 but the first group_size elements have a neutral value.
18186 Use duplicate_and_interleave otherwise.
18187 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
18188 Update call to get_initial_defs_for_reduction. Handle SLP
18189 reductions for variable-length vectors by creating one vector
18190 result for each scalar result, with the elements associated
18191 with other scalar results stubbed out with the neutral value.
18192 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
18193 Require IFN_VEC_SHL_INSERT for double reductions on
18194 variable-length vectors, or SLP reductions that have
18195 a neutral value. Require can_duplicate_and_interleave_p
18196 support for variable-length unchained SLP reductions if there
18197 is no neutral value, such as for MIN/MAX reductions. Also require
18198 the number of vector elements to be a multiple of the number of
18199 SLP statements when doing variable-length unchained SLP reductions.
18200 Update call to vect_create_epilog_for_reduction.
18201 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
18202 and remove initial values.
18203 (duplicate_and_interleave): Make public.
18204 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
18205 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
18206
18207 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18208 Alan Hayward <alan.hayward@arm.com>
18209 David Sherwood <david.sherwood@arm.com>
18210
18211 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
18212 (can_duplicate_and_interleave_p): New function.
18213 (vect_get_and_check_slp_defs): Take the vector of statements
18214 rather than just the current one. Remove excess parentheses.
18215 Restriction rejectinon of vect_constant_def and vect_external_def
18216 for variable-length vectors to boolean types, or types for which
18217 can_duplicate_and_interleave_p is false.
18218 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
18219 (duplicate_and_interleave): New function.
18220 (vect_get_constant_vectors): Use gimple_build_vector for
18221 constant-length vectors and suitable variable-length constant
18222 vectors. Use duplicate_and_interleave for other variable-length
18223 vectors. Don't defer the update when inserting new statements.
18224
18225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18226 Alan Hayward <alan.hayward@arm.com>
18227 David Sherwood <david.sherwood@arm.com>
18228
18229 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
18230 min_profitable_iters doesn't go negative.
18231
18232 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18233 Alan Hayward <alan.hayward@arm.com>
18234 David Sherwood <david.sherwood@arm.com>
18235
18236 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
18237 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
18238 * optabs.def (vec_mask_load_lanes_optab): New optab.
18239 (vec_mask_store_lanes_optab): Likewise.
18240 * internal-fn.def (MASK_LOAD_LANES): New internal function.
18241 (MASK_STORE_LANES): Likewise.
18242 * internal-fn.c (mask_load_lanes_direct): New macro.
18243 (mask_store_lanes_direct): Likewise.
18244 (expand_mask_load_optab_fn): Handle masked operations.
18245 (expand_mask_load_lanes_optab_fn): New macro.
18246 (expand_mask_store_optab_fn): Handle masked operations.
18247 (expand_mask_store_lanes_optab_fn): New macro.
18248 (direct_mask_load_lanes_optab_supported_p): Likewise.
18249 (direct_mask_store_lanes_optab_supported_p): Likewise.
18250 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
18251 parameter.
18252 (vect_load_lanes_supported): Likewise.
18253 * tree-vect-data-refs.c (strip_conversion): New function.
18254 (can_group_stmts_p): Likewise.
18255 (vect_analyze_data_ref_accesses): Use it instead of checking
18256 for a pair of assignments.
18257 (vect_store_lanes_supported): Take a masked_p parameter.
18258 (vect_load_lanes_supported): Likewise.
18259 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
18260 vect_store_lanes_supported and vect_load_lanes_supported.
18261 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
18262 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
18263 parameter. Don't allow gaps for masked accesses.
18264 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
18265 and vect_load_lanes_supported.
18266 (get_load_store_type): Take a masked_p parameter and update
18267 call to get_group_load_store_type.
18268 (vectorizable_store): Update call to get_load_store_type.
18269 Handle IFN_MASK_STORE_LANES.
18270 (vectorizable_load): Update call to get_load_store_type.
18271 Handle IFN_MASK_LOAD_LANES.
18272
18273 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18274 Alan Hayward <alan.hayward@arm.com>
18275 David Sherwood <david.sherwood@arm.com>
18276
18277 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
18278 modes for SVE.
18279 * config/aarch64/aarch64-protos.h
18280 (aarch64_sve_struct_memory_operand_p): Declare.
18281 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
18282 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
18283 (VPRED, vpred): Handle SVE structure modes.
18284 * config/aarch64/constraints.md (Utx): New constraint.
18285 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
18286 (aarch64_sve_struct_nonimmediate_operand): New predicates.
18287 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
18288 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
18289 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
18290 structure modes. Split into pieces after RA.
18291 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
18292 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
18293 New patterns.
18294 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
18295 SVE structure modes.
18296 (aarch64_classify_address): Likewise.
18297 (sizetochar): Move earlier in file.
18298 (aarch64_print_operand): Handle SVE register lists.
18299 (aarch64_array_mode): New function.
18300 (aarch64_sve_struct_memory_operand_p): Likewise.
18301 (TARGET_ARRAY_MODE): Redefine.
18302
18303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18304 Alan Hayward <alan.hayward@arm.com>
18305 David Sherwood <david.sherwood@arm.com>
18306
18307 * target.def (array_mode): New target hook.
18308 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
18309 * doc/tm.texi: Regenerate.
18310 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
18311 * hooks.c (hook_optmode_mode_uhwi_none): New function.
18312 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
18313 targetm.array_mode.
18314 * stor-layout.c (mode_for_array): Likewise. Support polynomial
18315 type sizes.
18316
18317 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18318 Alan Hayward <alan.hayward@arm.com>
18319 David Sherwood <david.sherwood@arm.com>
18320
18321 * fold-const.c (fold_binary_loc): Check the argument types
18322 rather than the result type when testing for a vector operation.
18323
18324 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18325
18326 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
18327 * doc/tm.texi: Regenerate.
18328
18329 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18330 Alan Hayward <alan.hayward@arm.com>
18331 David Sherwood <david.sherwood@arm.com>
18332
18333 * doc/invoke.texi (-msve-vector-bits=): Document new option.
18334 (sve): Document new AArch64 extension.
18335 * doc/md.texi (w): Extend the description of the AArch64
18336 constraint to include SVE vectors.
18337 (Upl, Upa): Document new AArch64 predicate constraints.
18338 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
18339 enum.
18340 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
18341 (msve-vector-bits=): New option.
18342 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
18343 SVE when these are disabled.
18344 (sve): New extension.
18345 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
18346 modes. Adjust their number of units based on aarch64_sve_vg.
18347 (MAX_BITSIZE_MODE_ANY_MODE): Define.
18348 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
18349 aarch64_addr_query_type.
18350 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
18351 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
18352 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
18353 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
18354 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
18355 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
18356 (aarch64_simd_imm_zero_p): Delete.
18357 (aarch64_check_zero_based_sve_index_immediate): Declare.
18358 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18359 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18360 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18361 (aarch64_sve_float_mul_immediate_p): Likewise.
18362 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18363 rather than an rtx.
18364 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
18365 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
18366 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
18367 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
18368 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
18369 (aarch64_regmode_natural_size): Likewise.
18370 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
18371 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
18372 left one place.
18373 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
18374 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
18375 for VG and the SVE predicate registers.
18376 (V_ALIASES): Add a "z"-prefixed alias.
18377 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
18378 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
18379 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
18380 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
18381 (REG_CLASS_NAMES): Add entries for them.
18382 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
18383 and the predicate registers.
18384 (aarch64_sve_vg): Declare.
18385 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
18386 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
18387 (REGMODE_NATURAL_SIZE): Define.
18388 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
18389 SVE macros.
18390 * config/aarch64/aarch64.c: Include cfgrtl.h.
18391 (simd_immediate_info): Add a constructor for series vectors,
18392 and an associated step field.
18393 (aarch64_sve_vg): New variable.
18394 (aarch64_dbx_register_number): Handle VG and the predicate registers.
18395 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
18396 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
18397 (VEC_ANY_DATA, VEC_STRUCT): New constants.
18398 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
18399 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
18400 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
18401 (aarch64_get_mask_mode): New functions.
18402 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
18403 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
18404 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
18405 predicate modes and predicate registers. Explicitly restrict
18406 GPRs to modes of 16 bytes or smaller. Only allow FP registers
18407 to store a vector mode if it is recognized by
18408 aarch64_classify_vector_mode.
18409 (aarch64_regmode_natural_size): New function.
18410 (aarch64_hard_regno_caller_save_mode): Return the original mode
18411 for predicates.
18412 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
18413 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
18414 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
18415 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
18416 functions.
18417 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
18418 does not overlap dest if the function is frame-related. Handle
18419 SVE constants.
18420 (aarch64_split_add_offset): New function.
18421 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
18422 them aarch64_add_offset.
18423 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
18424 and update call to aarch64_sub_sp.
18425 (aarch64_add_cfa_expression): New function.
18426 (aarch64_expand_prologue): Pass extra temporary registers to the
18427 functions above. Handle the case in which we need to emit new
18428 DW_CFA_expressions for registers that were originally saved
18429 relative to the stack pointer, but now have to be expressed
18430 relative to the frame pointer.
18431 (aarch64_output_mi_thunk): Pass extra temporary registers to the
18432 functions above.
18433 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
18434 IP0 and IP1 values for SVE frames.
18435 (aarch64_expand_vec_series): New function.
18436 (aarch64_expand_sve_widened_duplicate): Likewise.
18437 (aarch64_expand_sve_const_vector): Likewise.
18438 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
18439 Handle SVE constants. Use emit_move_insn to move a force_const_mem
18440 into the register, rather than emitting a SET directly.
18441 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
18442 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
18443 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
18444 (offset_9bit_signed_scaled_p): New functions.
18445 (aarch64_replicate_bitmask_imm): New function.
18446 (aarch64_bitmask_imm): Use it.
18447 (aarch64_cannot_force_const_mem): Reject expressions involving
18448 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
18449 (aarch64_classify_index): Handle SVE indices, by requiring
18450 a plain register index with a scale that matches the element size.
18451 (aarch64_classify_address): Handle SVE addresses. Assert that
18452 the mode of the address is VOIDmode or an integer mode.
18453 Update call to aarch64_classify_symbol.
18454 (aarch64_classify_symbolic_expression): Update call to
18455 aarch64_classify_symbol.
18456 (aarch64_const_vec_all_in_range_p): New function.
18457 (aarch64_print_vector_float_operand): Likewise.
18458 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
18459 "vN" for FP registers with SVE modes. Handle (const ...) vectors
18460 and the FP immediates 1.0 and 0.5.
18461 (aarch64_print_address_internal): Handle SVE addresses.
18462 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
18463 (aarch64_regno_regclass): Handle predicate registers.
18464 (aarch64_secondary_reload): Handle big-endian reloads of SVE
18465 data modes.
18466 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
18467 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
18468 (aarch64_convert_sve_vector_bits): New function.
18469 (aarch64_override_options): Use it to handle -msve-vector-bits=.
18470 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
18471 rather than an rtx.
18472 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
18473 Handle SVE vector and predicate modes. Accept VL-based constants
18474 that need only one temporary register, and VL offsets that require
18475 no temporary registers.
18476 (aarch64_conditional_register_usage): Mark the predicate registers
18477 as fixed if SVE isn't available.
18478 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
18479 Return true for SVE vector and predicate modes.
18480 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
18481 rather than an unsigned int. Handle SVE modes.
18482 (aarch64_preferred_simd_mode): Update call accordingly. Handle
18483 SVE modes.
18484 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
18485 if SVE is enabled.
18486 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
18487 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
18488 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
18489 (aarch64_sve_float_mul_immediate_p): New functions.
18490 (aarch64_sve_valid_immediate): New function.
18491 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
18492 Explicitly reject structure modes. Check for INDEX constants.
18493 Handle PTRUE and PFALSE constants.
18494 (aarch64_check_zero_based_sve_index_immediate): New function.
18495 (aarch64_simd_imm_zero_p): Delete.
18496 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
18497 vector modes. Accept constants in the range of CNT[BHWD].
18498 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
18499 ask for an Advanced SIMD mode.
18500 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
18501 (aarch64_simd_vector_alignment): Handle SVE predicates.
18502 (aarch64_vectorize_preferred_vector_alignment): New function.
18503 (aarch64_simd_vector_alignment_reachable): Use it instead of
18504 the vector size.
18505 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
18506 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
18507 functions.
18508 (MAX_VECT_LEN): Delete.
18509 (expand_vec_perm_d): Add a vec_flags field.
18510 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
18511 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
18512 (aarch64_evpc_ext): Don't apply a big-endian lane correction
18513 for SVE modes.
18514 (aarch64_evpc_rev): Rename to...
18515 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
18516 (aarch64_evpc_rev_global): New function.
18517 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
18518 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
18519 MAX_VECT_LEN.
18520 (aarch64_evpc_sve_tbl): New function.
18521 (aarch64_expand_vec_perm_const_1): Update after rename of
18522 aarch64_evpc_rev. Handle SVE permutes too, trying
18523 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
18524 than aarch64_evpc_tbl.
18525 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
18526 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
18527 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
18528 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
18529 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
18530 (aarch64_expand_sve_vcond): New functions.
18531 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
18532 of aarch64_vector_mode_p.
18533 (aarch64_dwarf_poly_indeterminate_value): New function.
18534 (aarch64_compute_pressure_classes): Likewise.
18535 (aarch64_can_change_mode_class): Likewise.
18536 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
18537 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
18538 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
18539 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
18540 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
18541 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
18542 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
18543 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
18544 constraints.
18545 (Dn, Dl, Dr): Accept const as well as const_vector.
18546 (Dz): Likewise. Compare against CONST0_RTX.
18547 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
18548 of "vector" where appropriate.
18549 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
18550 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
18551 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
18552 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
18553 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
18554 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
18555 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
18556 (v_int_equiv): Extend to SVE modes.
18557 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
18558 mode attributes.
18559 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
18560 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
18561 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
18562 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
18563 (SVE_COND_FP_CMP): New int iterators.
18564 (perm_hilo): Handle the new unpack unspecs.
18565 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
18566 attributes.
18567 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
18568 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
18569 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
18570 (aarch64_equality_operator, aarch64_constant_vector_operand)
18571 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
18572 (aarch64_sve_nonimmediate_operand): Likewise.
18573 (aarch64_sve_general_operand): Likewise.
18574 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
18575 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
18576 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
18577 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
18578 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
18579 (aarch64_sve_float_arith_immediate): Likewise.
18580 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
18581 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
18582 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
18583 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
18584 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
18585 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
18586 (aarch64_sve_float_arith_operand): Likewise.
18587 (aarch64_sve_float_arith_with_sub_operand): Likewise.
18588 (aarch64_sve_float_mul_operand): Likewise.
18589 (aarch64_sve_vec_perm_operand): Likewise.
18590 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
18591 (aarch64_mov_operand): Accept const_poly_int and const_vector.
18592 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
18593 as well as const_vector.
18594 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
18595 in file. Use CONST0_RTX and CONSTM1_RTX.
18596 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
18597 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
18598 Use aarch64_simd_imm_zero.
18599 * config/aarch64/aarch64-sve.md: New file.
18600 * config/aarch64/aarch64.md: Include it.
18601 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
18602 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
18603 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
18604 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
18605 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
18606 (sve): New attribute.
18607 (enabled): Disable instructions with the sve attribute unless
18608 TARGET_SVE.
18609 (movqi, movhi): Pass CONST_POLY_INT operaneds through
18610 aarch64_expand_mov_immediate.
18611 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
18612 CNT[BHSD] immediates.
18613 (movti): Split CONST_POLY_INT moves into two halves.
18614 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
18615 Split additions that need a temporary here if the destination
18616 is the stack pointer.
18617 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
18618 (*add<mode>3_poly_1): New instruction.
18619 (set_clobber_cc): New expander.
18620
18621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18622
18623 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
18624 parameter and use it instead of GET_MODE_SIZE (innermode). Use
18625 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
18626 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
18627 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
18628 Change innermode from fixed_mode_size to machine_mode.
18629 (simplify_subreg): Update call accordingly. Handle a constant-sized
18630 subreg of a variable-length CONST_VECTOR.
18631
18632 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
18633 Alan Hayward <alan.hayward@arm.com>
18634 David Sherwood <david.sherwood@arm.com>
18635
18636 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
18637 (add_offset_to_base): New function, split out from...
18638 (create_mem_ref): ...here. When handling a scale other than 1,
18639 check first whether the address is valid without the offset.
18640 Add it into the base if so, leaving the index and scale as-is.
18641
18642 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18643
18644 PR c++/83778
18645 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
18646 fold_for_warn before checking if arg2 is INTEGER_CST.
18647
18648 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
18649
18650 * config/rs6000/predicates.md (load_multiple_operation): Delete.
18651 (store_multiple_operation): Delete.
18652 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
18653 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
18654 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
18655 guarded by TARGET_STRING.
18656 (rs6000_output_load_multiple): Delete.
18657 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18658 OPTION_MASK_STRING / TARGET_STRING handling.
18659 (print_operand) <'N', 'O'>: Add comment that these are unused now.
18660 (const rs6000_opt_masks) <"string">: Change mask to 0.
18661 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
18662 (MASK_STRING): Delete.
18663 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
18664 parts. Simplify.
18665 (load_multiple): Delete.
18666 (*ldmsi8): Delete.
18667 (*ldmsi7): Delete.
18668 (*ldmsi6): Delete.
18669 (*ldmsi5): Delete.
18670 (*ldmsi4): Delete.
18671 (*ldmsi3): Delete.
18672 (store_multiple): Delete.
18673 (*stmsi8): Delete.
18674 (*stmsi7): Delete.
18675 (*stmsi6): Delete.
18676 (*stmsi5): Delete.
18677 (*stmsi4): Delete.
18678 (*stmsi3): Delete.
18679 (movmemsi_8reg): Delete.
18680 (corresponding unnamed define_insn): Delete.
18681 (movmemsi_6reg): Delete.
18682 (corresponding unnamed define_insn): Delete.
18683 (movmemsi_4reg): Delete.
18684 (corresponding unnamed define_insn): Delete.
18685 (movmemsi_2reg): Delete.
18686 (corresponding unnamed define_insn): Delete.
18687 (movmemsi_1reg): Delete.
18688 (corresponding unnamed define_insn): Delete.
18689 * config/rs6000/rs6000.opt (mno-string): New.
18690 (mstring): Replace by deprecation warning stub.
18691 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
18692
18693 2018-01-12 Jakub Jelinek <jakub@redhat.com>
18694
18695 * regrename.c (regrename_do_replace): If replacing the same
18696 reg multiple times, try to reuse last created gen_raw_REG.
18697
18698 PR debug/81155
18699 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
18700 main to workaround a bug in GDB.
18701
18702 2018-01-12 Tom de Vries <tom@codesourcery.com>
18703
18704 PR target/83737
18705 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
18706
18707 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
18708
18709 PR rtl-optimization/80481
18710 * ira-color.c (get_cap_member): New function.
18711 (allocnos_conflict_by_live_ranges_p): Use it.
18712 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
18713 (setup_slot_coalesced_allocno_live_ranges): Ditto.
18714
18715 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
18716
18717 PR target/83628
18718 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
18719 (*saddl_se_1): Ditto.
18720 (*ssubsi_1): Ditto.
18721 (*ssubl_se_1): Ditto.
18722
18723 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18724
18725 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
18726 rather than wi::to_widest for DR_INITs.
18727 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
18728 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
18729 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
18730 INTEGER_CSTs.
18731 (vect_analyze_group_access_1): Note that here.
18732
18733 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18734
18735 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
18736 polynomial type sizes.
18737
18738 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
18739
18740 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
18741 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
18742 (gimple_add_tmp_var): Likewise.
18743
18744 2018-01-12 Martin Liska <mliska@suse.cz>
18745
18746 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
18747 (gimple_alloc_sizes): Likewise.
18748 (dump_gimple_statistics): Use PRIu64 in printf format.
18749 * gimple.h: Change uint64_t to int.
18750
18751 2018-01-12 Martin Liska <mliska@suse.cz>
18752
18753 * tree-core.h: Use uint64_t instead of int.
18754 * tree.c (tree_node_counts): Likewise.
18755 (tree_node_sizes): Likewise.
18756 (dump_tree_statistics): Use PRIu64 in printf format.
18757
18758 2018-01-12 Martin Liska <mliska@suse.cz>
18759
18760 * Makefile.in: As qsort_chk is implemented in vec.c, add
18761 vec.o to linkage of gencfn-macros.
18762 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
18763 passing the info to record_node_allocation_statistics.
18764 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
18765 and pass the info.
18766 * ggc-common.c (struct ggc_usage): Add operator== and use
18767 it in operator< and compare function.
18768 * mem-stats.h (struct mem_usage): Likewise.
18769 * vec.c (struct vec_usage): Remove operator< and compare
18770 function. Can be simply inherited.
18771
18772 2018-01-12 Martin Jambor <mjambor@suse.cz>
18773
18774 PR target/81616
18775 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
18776 * tree-ssa-math-opts.c: Include domwalk.h.
18777 (convert_mult_to_fma_1): New function.
18778 (fma_transformation_info): New type.
18779 (fma_deferring_state): Likewise.
18780 (cancel_fma_deferring): New function.
18781 (result_of_phi): Likewise.
18782 (last_fma_candidate_feeds_initial_phi): Likewise.
18783 (convert_mult_to_fma): Added deferring logic, split actual
18784 transformation to convert_mult_to_fma_1.
18785 (math_opts_dom_walker): New type.
18786 (math_opts_dom_walker::after_dom_children): New method, body moved
18787 here from pass_optimize_widening_mul::execute, added deferring logic
18788 bits.
18789 (pass_optimize_widening_mul::execute): Moved most of code to
18790 math_opts_dom_walker::after_dom_children.
18791 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
18792 * config/i386/i386.c (ix86_option_override_internal): Added
18793 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
18794
18795 2018-01-12 Richard Biener <rguenther@suse.de>
18796
18797 PR debug/83157
18798 * dwarf2out.c (gen_variable_die): Do not reset old_die for
18799 inline instance vars.
18800
18801 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
18802
18803 PR target/81819
18804 * config/rx/rx.c (rx_is_restricted_memory_address):
18805 Handle SUBREG case.
18806
18807 2018-01-12 Richard Biener <rguenther@suse.de>
18808
18809 PR tree-optimization/80846
18810 * target.def (split_reduction): New target hook.
18811 * targhooks.c (default_split_reduction): New function.
18812 * targhooks.h (default_split_reduction): Declare.
18813 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
18814 target requests first reduce vectors by combining low and high
18815 parts.
18816 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
18817 (get_vectype_for_scalar_type_and_size): Export.
18818 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
18819 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
18820 * doc/tm.texi: Regenerate.
18821 * config/i386/i386.c (ix86_split_reduction): Implement
18822 TARGET_VECTORIZE_SPLIT_REDUCTION.
18823
18824 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18825
18826 PR target/83368
18827 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
18828 in PIC mode except for TARGET_VXWORKS_RTP.
18829 * config/sparc/sparc.c: Include cfgrtl.h.
18830 (TARGET_INIT_PIC_REG): Define.
18831 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
18832 (sparc_pic_register_p): New predicate.
18833 (sparc_legitimate_address_p): Use it.
18834 (sparc_legitimize_pic_address): Likewise.
18835 (sparc_delegitimize_address): Likewise.
18836 (sparc_mode_dependent_address_p): Likewise.
18837 (gen_load_pcrel_sym): Remove 4th parameter.
18838 (load_got_register): Adjust call to above. Remove obsolete stuff.
18839 (sparc_expand_prologue): Do not call load_got_register here.
18840 (sparc_flat_expand_prologue): Likewise.
18841 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
18842 (sparc_use_pseudo_pic_reg): New function.
18843 (sparc_init_pic_reg): Likewise.
18844 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18845 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
18846
18847 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
18848
18849 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18850 Add item for branch_cost.
18851
18852 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18853
18854 PR rtl-optimization/83565
18855 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
18856 not extend the result to a larger mode for rotate operations.
18857 (num_sign_bit_copies1): Likewise.
18858
18859 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18860
18861 PR target/40411
18862 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
18863 -symbolic.
18864 Use values-Xc.o for -pedantic.
18865 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
18866
18867 2018-01-12 Martin Liska <mliska@suse.cz>
18868
18869 PR ipa/83054
18870 * ipa-devirt.c (final_warning_record::grow_type_warnings):
18871 New function.
18872 (possible_polymorphic_call_targets): Use it.
18873 (ipa_devirt): Likewise.
18874
18875 2018-01-12 Martin Liska <mliska@suse.cz>
18876
18877 * profile-count.h (enum profile_quality): Use 0 as invalid
18878 enum value of profile_quality.
18879
18880 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
18881
18882 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
18883 -mext-string options.
18884
18885 2018-01-12 Richard Biener <rguenther@suse.de>
18886
18887 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
18888 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
18889 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
18890 Likewise.
18891 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
18892
18893 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18894
18895 * configure.ac (--with-long-double-format): Add support for the
18896 configuration option to change the default long double format on
18897 PowerPC systems.
18898 * config.gcc (powerpc*-linux*-*): Likewise.
18899 * configure: Regenerate.
18900 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
18901 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
18902 used without modification.
18903
18904 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18905
18906 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
18907 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
18908 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
18909 MISC_BUILTIN_SPEC_BARRIER.
18910 (rs6000_init_builtins): Likewise.
18911 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
18912 enum value.
18913 (speculation_barrier): New define_insn.
18914 * doc/extend.texi: Document __builtin_speculation_barrier.
18915
18916 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18917
18918 PR target/83203
18919 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
18920 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
18921 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
18922 iterators.
18923 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
18924 integral modes instead of "ss" and "sd".
18925 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
18926 vectors with 32-bit and 64-bit elements.
18927 (vecdupssescalarmodesuffix): New mode attribute.
18928 (vec_dup<mode>): Use it.
18929
18930 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
18931
18932 PR target/83330
18933 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
18934 frame if argument is passed on stack.
18935
18936 2018-01-11 Jakub Jelinek <jakub@redhat.com>
18937
18938 PR target/82682
18939 * ree.c (combine_reaching_defs): Optimize also
18940 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
18941 reg2=any_extend(exp); reg1=reg2;, formatting fix.
18942
18943 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18944
18945 PR middle-end/83189
18946 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
18947
18948 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
18949
18950 PR middle-end/83718
18951 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
18952 after they are computed.
18953
18954 2018-01-11 Bin Cheng <bin.cheng@arm.com>
18955
18956 PR tree-optimization/83695
18957 * gimple-loop-linterchange.cc
18958 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
18959 reset cached scev information after interchange.
18960 (pass_linterchange::execute): Remove call to scev_reset_htab.
18961
18962 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18963
18964 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
18965 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
18966 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
18967 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
18968 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
18969 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
18970 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
18971 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
18972 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
18973 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
18974 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
18975 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
18976 (V_lane_reg): Likewise.
18977 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
18978 New define_expand.
18979 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
18980 (vfmal_lane_low<mode>_intrinsic,
18981 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
18982 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
18983 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
18984 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
18985 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
18986 vfmsl_lane_high<mode>_intrinsic): New define_insns.
18987
18988 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18989
18990 * config/arm/arm-cpus.in (fp16fml): New feature.
18991 (ALL_SIMD): Add fp16fml.
18992 (armv8.2-a): Add fp16fml as an option.
18993 (armv8.3-a): Likewise.
18994 (armv8.4-a): Add fp16fml as part of fp16.
18995 * config/arm/arm.h (TARGET_FP16FML): Define.
18996 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
18997 when appropriate.
18998 * config/arm/arm-modes.def (V2HF): Define.
18999 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
19000 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
19001 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
19002 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
19003 vfmsl_low, vfmsl_high): New set of builtins.
19004 * config/arm/iterators.md (PLUSMINUS): New code iterator.
19005 (vfml_op): New code attribute.
19006 (VFMLHALVES): New int iterator.
19007 (VFML, VFMLSEL): New mode attributes.
19008 (V_reg): Define mapping for V2HF.
19009 (V_hi, V_lo): New mode attributes.
19010 (VF_constraint): Likewise.
19011 (vfml_half, vfml_half_selector): New int attributes.
19012 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
19013 define_expand.
19014 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
19015 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
19016 New define_insn.
19017 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
19018 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
19019 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
19020 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
19021 documentation.
19022 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
19023 Document new effective target and option set.
19024
19025 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19026
19027 * config/arm/arm-cpus.in (armv8_4): New feature.
19028 (ARMv8_4a): New fgroup.
19029 (armv8.4-a): New arch.
19030 * config/arm/arm-tables.opt: Regenerate.
19031 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
19032 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
19033 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
19034 Add matching rules for -march=armv8.4-a and extensions.
19035 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
19036
19037 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
19038
19039 PR target/81821
19040 * config/rx/rx.md (BW): New mode attribute.
19041 (sync_lock_test_and_setsi): Add mode suffix to insn output.
19042
19043 2018-01-11 Richard Biener <rguenther@suse.de>
19044
19045 PR tree-optimization/83435
19046 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
19047 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
19048 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
19049
19050 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19051 Alan Hayward <alan.hayward@arm.com>
19052 David Sherwood <david.sherwood@arm.com>
19053
19054 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
19055 field.
19056 (aarch64_classify_address): Initialize it. Track polynomial offsets.
19057 (aarch64_print_address_internal): Use it to check for a zero offset.
19058
19059 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19060 Alan Hayward <alan.hayward@arm.com>
19061 David Sherwood <david.sherwood@arm.com>
19062
19063 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
19064 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
19065 Return a poly_int64 rather than a HOST_WIDE_INT.
19066 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
19067 rather than a HOST_WIDE_INT.
19068 * config/aarch64/aarch64.h (aarch64_frame): Protect with
19069 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
19070 hard_fp_offset, frame_size, initial_adjust, callee_offset and
19071 final_offset from HOST_WIDE_INT to poly_int64.
19072 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
19073 to_constant when getting the number of units in an Advanced SIMD
19074 mode.
19075 (aarch64_builtin_vectorized_function): Check for a constant number
19076 of units.
19077 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
19078 GET_MODE_SIZE.
19079 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
19080 attribute instead of GET_MODE_NUNITS.
19081 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
19082 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
19083 GET_MODE_SIZE for fixed-size registers.
19084 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
19085 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
19086 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
19087 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
19088 (aarch64_print_operand, aarch64_print_address_internal)
19089 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
19090 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
19091 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
19092 Handle polynomial GET_MODE_SIZE.
19093 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
19094 wider than SImode without modification.
19095 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
19096 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
19097 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
19098 passing and returning SVE modes.
19099 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
19100 rather than GEN_INT.
19101 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
19102 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
19103 (aarch64_allocate_and_probe_stack_space): Likewise.
19104 (aarch64_layout_frame): Cope with polynomial offsets.
19105 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
19106 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
19107 polynomial offsets.
19108 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
19109 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
19110 poly_int64 rather than a HOST_WIDE_INT.
19111 (aarch64_get_separate_components, aarch64_process_components)
19112 (aarch64_expand_prologue, aarch64_expand_epilogue)
19113 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
19114 (aarch64_anchor_offset): New function, split out from...
19115 (aarch64_legitimize_address): ...here.
19116 (aarch64_builtin_vectorization_cost): Handle polynomial
19117 TYPE_VECTOR_SUBPARTS.
19118 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
19119 GET_MODE_NUNITS.
19120 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
19121 number of elements from the PARALLEL rather than the mode.
19122 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
19123 rather than GET_MODE_BITSIZE.
19124 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
19125 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
19126 (aarch64_expand_vec_perm_const_1): Handle polynomial
19127 d->perm.length () and d->perm elements.
19128 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
19129 Apply to_constant to d->perm elements.
19130 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
19131 polynomial CONST_VECTOR_NUNITS.
19132 (aarch64_move_pointer): Take amount as a poly_int64 rather
19133 than an int.
19134 (aarch64_progress_pointer): Avoid temporary variable.
19135 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
19136 the mode attribute instead of GET_MODE.
19137
19138 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19139 Alan Hayward <alan.hayward@arm.com>
19140 David Sherwood <david.sherwood@arm.com>
19141
19142 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
19143 x exists before using it.
19144 (aarch64_add_constant_internal): Rename to...
19145 (aarch64_add_offset_1): ...this. Replace regnum with separate
19146 src and dest rtxes. Handle the case in which they're different,
19147 including when the offset is zero. Replace scratchreg with an rtx.
19148 Use 2 additions if there is no spare register into which we can
19149 move a 16-bit constant.
19150 (aarch64_add_constant): Delete.
19151 (aarch64_add_offset): Replace reg with separate src and dest
19152 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
19153 Use aarch64_add_offset_1.
19154 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
19155 an rtx rather than an int. Take the delta as a poly_int64
19156 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
19157 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
19158 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
19159 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
19160 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
19161 and aarch64_add_sp.
19162 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
19163 aarch64_add_constant.
19164
19165 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19166
19167 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
19168 Use scalar_float_mode.
19169
19170 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19171
19172 * config/aarch64/aarch64-simd.md
19173 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
19174 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
19175 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
19176 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
19177 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
19178 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
19179 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
19180 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
19181 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
19182 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
19183
19184 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19185
19186 PR target/83514
19187 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
19188 targ_options->x_arm_arch_string is non NULL.
19189
19190 2018-01-11 Tamar Christina <tamar.christina@arm.com>
19191
19192 * config/aarch64/aarch64.h
19193 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
19194
19195 2018-01-11 Sudakshina Das <sudi.das@arm.com>
19196
19197 PR target/82096
19198 * expmed.c (emit_store_flag_force): Swap if const op0
19199 and change VOIDmode to mode of op0.
19200
19201 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
19202
19203 PR rtl-optimization/83761
19204 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
19205 than bytes to mode_for_size.
19206
19207 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19208
19209 PR middle-end/83189
19210 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
19211 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
19212 profile.
19213
19214 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19215
19216 PR middle-end/83575
19217 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
19218 when in layout mode.
19219 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
19220 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
19221 partition fixup.
19222
19223 2018-01-10 Michael Collison <michael.collison@arm.com>
19224
19225 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
19226 * config/aarch64/aarch64-option-extension.def: Add
19227 AARCH64_OPT_EXTENSION of 'fp16fml'.
19228 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19229 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
19230 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
19231 * config/aarch64/constraints.md (Ui7): New constraint.
19232 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
19233 (VFMLA_SEL_W): Ditto.
19234 (f16quad): Ditto.
19235 (f16mac1): Ditto.
19236 (VFMLA16_LOW): New int iterator.
19237 (VFMLA16_HIGH): Ditto.
19238 (UNSPEC_FMLAL): New unspec.
19239 (UNSPEC_FMLSL): Ditto.
19240 (UNSPEC_FMLAL2): Ditto.
19241 (UNSPEC_FMLSL2): Ditto.
19242 (f16mac): New code attribute.
19243 * config/aarch64/aarch64-simd-builtins.def
19244 (aarch64_fmlal_lowv2sf): Ditto.
19245 (aarch64_fmlsl_lowv2sf): Ditto.
19246 (aarch64_fmlalq_lowv4sf): Ditto.
19247 (aarch64_fmlslq_lowv4sf): Ditto.
19248 (aarch64_fmlal_highv2sf): Ditto.
19249 (aarch64_fmlsl_highv2sf): Ditto.
19250 (aarch64_fmlalq_highv4sf): Ditto.
19251 (aarch64_fmlslq_highv4sf): Ditto.
19252 (aarch64_fmlal_lane_lowv2sf): Ditto.
19253 (aarch64_fmlsl_lane_lowv2sf): Ditto.
19254 (aarch64_fmlal_laneq_lowv2sf): Ditto.
19255 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
19256 (aarch64_fmlalq_lane_lowv4sf): Ditto.
19257 (aarch64_fmlsl_lane_lowv4sf): Ditto.
19258 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
19259 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
19260 (aarch64_fmlal_lane_highv2sf): Ditto.
19261 (aarch64_fmlsl_lane_highv2sf): Ditto.
19262 (aarch64_fmlal_laneq_highv2sf): Ditto.
19263 (aarch64_fmlsl_laneq_highv2sf): Ditto.
19264 (aarch64_fmlalq_lane_highv4sf): Ditto.
19265 (aarch64_fmlsl_lane_highv4sf): Ditto.
19266 (aarch64_fmlalq_laneq_highv4sf): Ditto.
19267 (aarch64_fmlsl_laneq_highv4sf): Ditto.
19268 * config/aarch64/aarch64-simd.md:
19269 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
19270 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19271 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
19272 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
19273 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
19274 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
19275 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
19276 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
19277 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
19278 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
19279 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
19280 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
19281 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
19282 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
19283 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
19284 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
19285 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
19286 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
19287 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
19288 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
19289 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
19290 (vfmlsl_low_u32): Ditto.
19291 (vfmlalq_low_u32): Ditto.
19292 (vfmlslq_low_u32): Ditto.
19293 (vfmlal_high_u32): Ditto.
19294 (vfmlsl_high_u32): Ditto.
19295 (vfmlalq_high_u32): Ditto.
19296 (vfmlslq_high_u32): Ditto.
19297 (vfmlal_lane_low_u32): Ditto.
19298 (vfmlsl_lane_low_u32): Ditto.
19299 (vfmlal_laneq_low_u32): Ditto.
19300 (vfmlsl_laneq_low_u32): Ditto.
19301 (vfmlalq_lane_low_u32): Ditto.
19302 (vfmlslq_lane_low_u32): Ditto.
19303 (vfmlalq_laneq_low_u32): Ditto.
19304 (vfmlslq_laneq_low_u32): Ditto.
19305 (vfmlal_lane_high_u32): Ditto.
19306 (vfmlsl_lane_high_u32): Ditto.
19307 (vfmlal_laneq_high_u32): Ditto.
19308 (vfmlsl_laneq_high_u32): Ditto.
19309 (vfmlalq_lane_high_u32): Ditto.
19310 (vfmlslq_lane_high_u32): Ditto.
19311 (vfmlalq_laneq_high_u32): Ditto.
19312 (vfmlslq_laneq_high_u32): Ditto.
19313 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
19314 (AARCH64_FL_FOR_ARCH8_4): New.
19315 (AARCH64_ISA_F16FML): New ISA flag.
19316 (TARGET_F16FML): New feature flag for fp16fml.
19317 (doc/invoke.texi): Document new fp16fml option.
19318
19319 2018-01-10 Michael Collison <michael.collison@arm.com>
19320
19321 * config/aarch64/aarch64-builtins.c:
19322 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
19323 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19324 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
19325 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
19326 (AARCH64_ISA_SHA3): New ISA flag.
19327 (TARGET_SHA3): New feature flag for sha3.
19328 * config/aarch64/iterators.md (sha512_op): New int attribute.
19329 (CRYPTO_SHA512): New int iterator.
19330 (UNSPEC_SHA512H): New unspec.
19331 (UNSPEC_SHA512H2): Ditto.
19332 (UNSPEC_SHA512SU0): Ditto.
19333 (UNSPEC_SHA512SU1): Ditto.
19334 * config/aarch64/aarch64-simd-builtins.def
19335 (aarch64_crypto_sha512hqv2di): New builtin.
19336 (aarch64_crypto_sha512h2qv2di): Ditto.
19337 (aarch64_crypto_sha512su0qv2di): Ditto.
19338 (aarch64_crypto_sha512su1qv2di): Ditto.
19339 (aarch64_eor3qv8hi): Ditto.
19340 (aarch64_rax1qv2di): Ditto.
19341 (aarch64_xarqv2di): Ditto.
19342 (aarch64_bcaxqv8hi): Ditto.
19343 * config/aarch64/aarch64-simd.md:
19344 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
19345 (aarch64_crypto_sha512su0qv2di): Ditto.
19346 (aarch64_crypto_sha512su1qv2di): Ditto.
19347 (aarch64_eor3qv8hi): Ditto.
19348 (aarch64_rax1qv2di): Ditto.
19349 (aarch64_xarqv2di): Ditto.
19350 (aarch64_bcaxqv8hi): Ditto.
19351 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
19352 (vsha512h2q_u64): Ditto.
19353 (vsha512su0q_u64): Ditto.
19354 (vsha512su1q_u64): Ditto.
19355 (veor3q_u16): Ditto.
19356 (vrax1q_u64): Ditto.
19357 (vxarq_u64): Ditto.
19358 (vbcaxq_u16): Ditto.
19359 * config/arm/types.md (crypto_sha512): New type attribute.
19360 (crypto_sha3): Ditto.
19361 (doc/invoke.texi): Document new sha3 option.
19362
19363 2018-01-10 Michael Collison <michael.collison@arm.com>
19364
19365 * config/aarch64/aarch64-builtins.c:
19366 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
19367 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19368 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
19369 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
19370 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
19371 (AARCH64_ISA_SM4): New ISA flag.
19372 (TARGET_SM4): New feature flag for sm4.
19373 * config/aarch64/aarch64-simd-builtins.def
19374 (aarch64_sm3ss1qv4si): Ditto.
19375 (aarch64_sm3tt1aq4si): Ditto.
19376 (aarch64_sm3tt1bq4si): Ditto.
19377 (aarch64_sm3tt2aq4si): Ditto.
19378 (aarch64_sm3tt2bq4si): Ditto.
19379 (aarch64_sm3partw1qv4si): Ditto.
19380 (aarch64_sm3partw2qv4si): Ditto.
19381 (aarch64_sm4eqv4si): Ditto.
19382 (aarch64_sm4ekeyqv4si): Ditto.
19383 * config/aarch64/aarch64-simd.md:
19384 (aarch64_sm3ss1qv4si): Ditto.
19385 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
19386 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
19387 (aarch64_sm4eqv4si): Ditto.
19388 (aarch64_sm4ekeyqv4si): Ditto.
19389 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
19390 (sm3part_op): Ditto.
19391 (CRYPTO_SM3TT): Ditto.
19392 (CRYPTO_SM3PART): Ditto.
19393 (UNSPEC_SM3SS1): New unspec.
19394 (UNSPEC_SM3TT1A): Ditto.
19395 (UNSPEC_SM3TT1B): Ditto.
19396 (UNSPEC_SM3TT2A): Ditto.
19397 (UNSPEC_SM3TT2B): Ditto.
19398 (UNSPEC_SM3PARTW1): Ditto.
19399 (UNSPEC_SM3PARTW2): Ditto.
19400 (UNSPEC_SM4E): Ditto.
19401 (UNSPEC_SM4EKEY): Ditto.
19402 * config/aarch64/constraints.md (Ui2): New constraint.
19403 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
19404 * config/arm/types.md (crypto_sm3): New type attribute.
19405 (crypto_sm4): Ditto.
19406 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
19407 (vsm3tt1aq_u32): Ditto.
19408 (vsm3tt1bq_u32): Ditto.
19409 (vsm3tt2aq_u32): Ditto.
19410 (vsm3tt2bq_u32): Ditto.
19411 (vsm3partw1q_u32): Ditto.
19412 (vsm3partw2q_u32): Ditto.
19413 (vsm4eq_u32): Ditto.
19414 (vsm4ekeyq_u32): Ditto.
19415 (doc/invoke.texi): Document new sm4 option.
19416
19417 2018-01-10 Michael Collison <michael.collison@arm.com>
19418
19419 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
19420 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
19421 (AARCH64_FL_FOR_ARCH8_4): New.
19422 (AARCH64_FL_V8_4): New flag.
19423 (doc/invoke.texi): Document new armv8.4-a option.
19424
19425 2018-01-10 Michael Collison <michael.collison@arm.com>
19426
19427 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
19428 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
19429 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
19430 * config/aarch64/aarch64-option-extension.def: Add
19431 AARCH64_OPT_EXTENSION of 'sha2'.
19432 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
19433 (crypto): Disable sha2 and aes if crypto disabled.
19434 (crypto): Enable aes and sha2 if enabled.
19435 (simd): Disable sha2 and aes if simd disabled.
19436 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
19437 New flags.
19438 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
19439 (TARGET_SHA2): New feature flag for sha2.
19440 (TARGET_AES): New feature flag for aes.
19441 * config/aarch64/aarch64-simd.md:
19442 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
19443 conditional on TARGET_AES.
19444 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
19445 (aarch64_crypto_sha1hsi): Make pattern conditional
19446 on TARGET_SHA2.
19447 (aarch64_crypto_sha1hv4si): Ditto.
19448 (aarch64_be_crypto_sha1hv4si): Ditto.
19449 (aarch64_crypto_sha1su1v4si): Ditto.
19450 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
19451 (aarch64_crypto_sha1su0v4si): Ditto.
19452 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
19453 (aarch64_crypto_sha256su0v4si): Ditto.
19454 (aarch64_crypto_sha256su1v4si): Ditto.
19455 (doc/invoke.texi): Document new aes and sha2 options.
19456
19457 2018-01-10 Martin Sebor <msebor@redhat.com>
19458
19459 PR tree-optimization/83781
19460 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
19461 as string arrays.
19462
19463 2018-01-11 Martin Sebor <msebor@gmail.com>
19464 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19465
19466 PR tree-optimization/83501
19467 PR tree-optimization/81703
19468
19469 * tree-ssa-strlen.c (get_string_cst): Rename...
19470 (get_string_len): ...to this. Handle global constants.
19471 (handle_char_store): Adjust.
19472
19473 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
19474 Jim Wilson <jimw@sifive.com>
19475
19476 * config/riscv/riscv-protos.h (riscv_output_return): New.
19477 * config/riscv/riscv.c (struct machine_function): New naked_p field.
19478 (riscv_attribute_table, riscv_output_return),
19479 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
19480 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
19481 (riscv_compute_frame_info): Only compute frame->mask if not a naked
19482 function.
19483 (riscv_expand_prologue): Add early return for naked function.
19484 (riscv_expand_epilogue): Likewise.
19485 (riscv_function_ok_for_sibcall): Return false for naked function.
19486 (riscv_set_current_function): New.
19487 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
19488 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
19489 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
19490 * doc/extend.texi (RISC-V Function Attributes): New.
19491
19492 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19493
19494 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
19495 check for 128-bit long double before checking TCmode.
19496 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
19497 128-bit long doubles before checking TFmode or TCmode.
19498 (FLOAT128_IBM_P): Likewise.
19499
19500 2018-01-10 Martin Sebor <msebor@redhat.com>
19501
19502 PR tree-optimization/83671
19503 * builtins.c (c_strlen): Unconditionally return zero for the empty
19504 string.
19505 Use -Warray-bounds for warnings.
19506 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
19507 for non-constant array indices with COMPONENT_REF, arrays of
19508 arrays, and pointers to arrays.
19509 (gimple_fold_builtin_strlen): Determine and set length range for
19510 non-constant character arrays.
19511
19512 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
19513
19514 PR middle-end/81897
19515 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
19516 empty blocks.
19517
19518 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
19519
19520 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
19521
19522 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19523
19524 PR target/83399
19525 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
19526 VECTOR_MEM_ALTIVEC_OR_VSX_P.
19527 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
19528 indexed_or_indirect_operand predicate.
19529 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
19530 (*vsx_le_perm_load_v8hi): Likewise.
19531 (*vsx_le_perm_load_v16qi): Likewise.
19532 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
19533 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
19534 (*vsx_le_perm_store_v8hi): Likewise.
19535 (*vsx_le_perm_store_v16qi): Likewise.
19536 (eight unnamed splitters): Likewise.
19537
19538 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
19539
19540 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
19541 * config/rs6000/emmintrin.h: Likewise.
19542 * config/rs6000/mmintrin.h: Likewise.
19543 * config/rs6000/xmmintrin.h: Likewise.
19544
19545 2018-01-10 David Malcolm <dmalcolm@redhat.com>
19546
19547 PR c++/43486
19548 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
19549 "public_flag".
19550 * tree.c (tree_nop_conversion): Return true for location wrapper
19551 nodes.
19552 (maybe_wrap_with_location): New function.
19553 (selftest::check_strip_nops): New function.
19554 (selftest::test_location_wrappers): New function.
19555 (selftest::tree_c_tests): Call it.
19556 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
19557 (maybe_wrap_with_location): New decl.
19558 (EXPR_LOCATION_WRAPPER_P): New macro.
19559 (location_wrapper_p): New inline function.
19560 (tree_strip_any_location_wrapper): New inline function.
19561
19562 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
19563
19564 PR target/83735
19565 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
19566 stack_realign_offset for the largest alignment of stack slot
19567 actually used.
19568 (ix86_find_max_used_stack_alignment): New function.
19569 (ix86_finalize_stack_frame_flags): Use it. Set
19570 max_used_stack_alignment if we don't realign stack.
19571 * config/i386/i386.h (machine_function): Add
19572 max_used_stack_alignment.
19573
19574 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
19575
19576 * config/arm/arm.opt (-mbranch-cost): New option.
19577 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
19578 account.
19579
19580 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
19581
19582 PR target/83629
19583 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
19584 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
19585
19586 2018-01-10 Richard Biener <rguenther@suse.de>
19587
19588 PR debug/83765
19589 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
19590 early out so it also covers the case where we have a non-NULL
19591 origin.
19592
19593 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19594
19595 PR tree-optimization/83753
19596 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
19597 for non-strided grouped accesses if the number of elements is 1.
19598
19599 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
19600
19601 PR target/81616
19602 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
19603 * i386.h (TARGET_USE_GATHER): Define.
19604 * x86-tune.def (X86_TUNE_USE_GATHER): New.
19605
19606 2018-01-10 Martin Liska <mliska@suse.cz>
19607
19608 PR bootstrap/82831
19609 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
19610 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
19611 partitioning.
19612 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
19613 CLEANUP_NO_PARTITIONING is not set.
19614
19615 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
19616
19617 * doc/rtl.texi: Remove documentation of (const ...) wrappers
19618 for vectors, as a partial revert of r254296.
19619 * rtl.h (const_vec_p): Delete.
19620 (const_vec_duplicate_p): Don't test for vector CONSTs.
19621 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
19622 * expmed.c (make_tree): Likewise.
19623
19624 Revert:
19625 * common.md (E, F): Use CONSTANT_P instead of checking for
19626 CONST_VECTOR.
19627 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
19628 checking for CONST_VECTOR.
19629
19630 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19631
19632 PR middle-end/83575
19633 * predict.c (force_edge_cold): Handle in more sane way edges
19634 with no prediction.
19635
19636 2018-01-09 Carl Love <cel@us.ibm.com>
19637
19638 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
19639 V4SI, V4SF types.
19640 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
19641 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
19642 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
19643 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
19644 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
19645 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
19646 * config/rs6000/rs6000-protos.h: Add extern defition for
19647 rs6000_generate_float2_double_code.
19648 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
19649 function.
19650 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
19651 (float2_v2df): Add define_expand.
19652
19653 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
19654
19655 PR target/83628
19656 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
19657 op_mode in the force_to_mode call.
19658
19659 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19660
19661 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
19662 instead of checking each element individually.
19663 (aarch64_evpc_uzp): Likewise.
19664 (aarch64_evpc_zip): Likewise.
19665 (aarch64_evpc_ext): Likewise.
19666 (aarch64_evpc_rev): Likewise.
19667 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
19668 instead of checking each element individually. Return true without
19669 generating rtl if
19670 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
19671 whether all selected elements come from the same input, instead of
19672 checking each element individually. Remove calls to gen_rtx_REG,
19673 start_sequence and end_sequence and instead assert that no rtl is
19674 generated.
19675
19676 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19677
19678 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
19679 order of HIGH and CONST checks.
19680
19681 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
19682
19683 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
19684 if the destination isn't an SSA_NAME.
19685
19686 2018-01-09 Richard Biener <rguenther@suse.de>
19687
19688 PR tree-optimization/83668
19689 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
19690 move prologue...
19691 (canonicalize_loop_form): ... here, renamed from ...
19692 (canonicalize_loop_closed_ssa_form): ... this and amended to
19693 swap successor edges for loop exit blocks to make us use
19694 the RPO order we need for initial schedule generation.
19695
19696 2018-01-09 Joseph Myers <joseph@codesourcery.com>
19697
19698 PR tree-optimization/64811
19699 * match.pd: When optimizing comparisons with Inf, avoid
19700 introducing or losing exceptions from comparisons with NaN.
19701
19702 2018-01-09 Martin Liska <mliska@suse.cz>
19703
19704 PR sanitizer/82517
19705 * asan.c (shadow_mem_size): Add gcc_assert.
19706
19707 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
19708
19709 Don't save registers in main().
19710
19711 PR target/83738
19712 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
19713 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
19714 * config/avr/avr.c (avr_set_current_function): Don't error if
19715 naked, OS_task or OS_main are specified at the same time.
19716 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
19717 OS_main.
19718 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
19719 attribute.
19720 * common/config/avr/avr-common.c (avr_option_optimization_table):
19721 Switch on -mmain-is-OS_task for optimizing compilations.
19722
19723 2018-01-09 Richard Biener <rguenther@suse.de>
19724
19725 PR tree-optimization/83572
19726 * graphite.c: Include cfganal.h.
19727 (graphite_transform_loops): Connect infinite loops to exit
19728 and remove fake edges at the end.
19729
19730 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19731
19732 * ipa-inline.c (edge_badness): Revert accidental checkin.
19733
19734 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
19735
19736 PR ipa/80763
19737 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
19738 symbols; not inline clones.
19739
19740 2018-01-09 Jakub Jelinek <jakub@redhat.com>
19741
19742 PR target/83507
19743 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
19744 hard registers. Formatting fixes.
19745
19746 PR preprocessor/83722
19747 * gcc.c (try_generate_repro): Pass
19748 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
19749 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
19750 do_report_bug.
19751
19752 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
19753 Kito Cheng <kito.cheng@gmail.com>
19754
19755 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
19756 (riscv_leaf_function_p): Delete.
19757 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
19758
19759 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19760
19761 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
19762 function.
19763 (do_ifelse): New function.
19764 (do_isel): New function.
19765 (do_sub3): New function.
19766 (do_add3): New function.
19767 (do_load_mask_compare): New function.
19768 (do_overlap_load_compare): New function.
19769 (expand_compare_loop): New function.
19770 (expand_block_compare): Call expand_compare_loop() when appropriate.
19771 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
19772 option description.
19773 (-mblock-compare-inline-loop-limit): New option.
19774
19775 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19776
19777 PR target/83677
19778 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
19779 Reverse order of second and third operands in first alternative.
19780 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
19781 of first and second elements in UNSPEC_VPERMR vector.
19782 (altivec_expand_vec_perm_le): Likewise.
19783
19784 2018-01-08 Jeff Law <law@redhat.com>
19785
19786 PR rtl-optimizatin/81308
19787 * tree-switch-conversion.c (cfg_altered): New file scoped static.
19788 (process_switch): If group_case_labels makes a change, then set
19789 cfg_altered.
19790 (pass_convert_switch::execute): If a switch is converted, then
19791 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
19792
19793 PR rtl-optimization/81308
19794 * recog.c (split_all_insns): Conditionally cleanup the CFG after
19795 splitting insns.
19796
19797 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
19798
19799 PR target/83663 - Revert r255946
19800 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
19801 generation for cases where splatting a value is not useful.
19802 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
19803 across a vec_duplicate and a paradoxical subreg forming a vector
19804 mode to a vec_concat.
19805
19806 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19807
19808 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
19809 -march=armv8.3-a variants.
19810 * config/arm/t-multilib: Likewise.
19811 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
19812
19813 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19814
19815 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
19816 to generate rtl.
19817 (cceq_ior_compare_complement): Give it a name so I can use it, and
19818 change boolean_or_operator predicate to boolean_operator so it can
19819 be used to generate a crand.
19820 (eqne): New code iterator.
19821 (bd/bd_neg): New code_attrs.
19822 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
19823 a single define_insn.
19824 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
19825 decrement (bdnzt/bdnzf/bdzt/bdzf).
19826 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
19827 with the new names of the branch decrement patterns, and added the
19828 names of the branch decrement conditional patterns.
19829
19830 2018-01-08 Richard Biener <rguenther@suse.de>
19831
19832 PR tree-optimization/83563
19833 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
19834 cache.
19835
19836 2018-01-08 Richard Biener <rguenther@suse.de>
19837
19838 PR middle-end/83713
19839 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
19840
19841 2018-01-08 Richard Biener <rguenther@suse.de>
19842
19843 PR tree-optimization/83685
19844 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
19845 references to abnormals.
19846
19847 2018-01-08 Richard Biener <rguenther@suse.de>
19848
19849 PR lto/83719
19850 * dwarf2out.c (output_indirect_strings): Handle empty
19851 skeleton_debug_str_hash.
19852 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
19853
19854 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19855
19856 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
19857 (emit_store_direct): Likewise.
19858 (arc_trampoline_adjust_address): Likewise.
19859 (arc_asm_trampoline_template): New function.
19860 (arc_initialize_trampoline): Use asm_trampoline_template.
19861 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
19862 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
19863 * config/arc/arc.md (flush_icache): Delete pattern.
19864
19865 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
19866
19867 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
19868 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
19869 munaligned-access.
19870
19871 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19872
19873 PR target/83681
19874 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
19875 by not USED_FOR_TARGET.
19876 (make_pass_resolve_sw_modes): Likewise.
19877
19878 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
19879
19880 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
19881 USED_FOR_TARGET.
19882
19883 2018-01-08 Richard Biener <rguenther@suse.de>
19884
19885 PR middle-end/83580
19886 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
19887
19888 2018-01-08 Richard Biener <rguenther@suse.de>
19889
19890 PR middle-end/83517
19891 * match.pd ((t * 2) / 2) -> t): Add missing :c.
19892
19893 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
19894
19895 PR middle-end/81897
19896 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
19897 basic blocks with a small number of successors.
19898 (convert_control_dep_chain_into_preds): Improve handling of
19899 forwarder blocks.
19900 (dump_predicates): Split apart into...
19901 (dump_pred_chain): ...here...
19902 (dump_pred_info): ...and here.
19903 (can_one_predicate_be_invalidated_p): Add debugging printfs.
19904 (can_chain_union_be_invalidated_p): Improve check for invalidation
19905 of paths.
19906 (uninit_uses_cannot_happen): Avoid unnecessary if
19907 convert_control_dep_chain_into_preds yielded nothing.
19908
19909 2018-01-06 Martin Sebor <msebor@redhat.com>
19910
19911 PR tree-optimization/83640
19912 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
19913 subtracting negative offset from size.
19914 (builtin_access::overlap): Adjust offset bounds of the access to fall
19915 within the size of the object if possible.
19916
19917 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
19918
19919 PR rtl-optimization/83699
19920 * expmed.c (extract_bit_field_1): Restrict the vector usage of
19921 extract_bit_field_as_subreg to cases in which the extracted
19922 value is also a vector.
19923
19924 * lra-constraints.c (process_alt_operands): Test for the equivalence
19925 substitutions when detecting a possible reload cycle.
19926
19927 2018-01-06 Jakub Jelinek <jakub@redhat.com>
19928
19929 PR debug/83480
19930 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
19931 by default if flag_selective_schedling{,2}. Formatting fixes.
19932
19933 PR rtl-optimization/83682
19934 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
19935 if it has non-VECTOR_MODE element mode.
19936 (vec_duplicate_p): Likewise.
19937
19938 PR middle-end/83694
19939 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
19940 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
19941
19942 2018-01-05 Jakub Jelinek <jakub@redhat.com>
19943
19944 PR target/83604
19945 * config/i386/i386-builtin.def
19946 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
19947 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
19948 Require also OPTION_MASK_ISA_AVX512F in addition to
19949 OPTION_MASK_ISA_GFNI.
19950 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
19951 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
19952 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
19953 to OPTION_MASK_ISA_GFNI.
19954 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
19955 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
19956 OPTION_MASK_ISA_AVX512BW.
19957 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
19958 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
19959 addition to OPTION_MASK_ISA_GFNI.
19960 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
19961 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
19962 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
19963 to OPTION_MASK_ISA_GFNI.
19964 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
19965 a requirement for all ISAs rather than any of them with a few
19966 exceptions.
19967 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
19968 processing.
19969 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
19970 bitmasks to be enabled with 3 exceptions, instead of requiring any
19971 enabled ISA with lots of exceptions.
19972 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
19973 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
19974 Change avx512bw in isa attribute to avx512f.
19975 * config/i386/sgxintrin.h: Add license boilerplate.
19976 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
19977 to __AVX512F__ and __AVX512VL to __AVX512VL__.
19978 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
19979 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
19980 defined.
19981 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
19982 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
19983 temporarily sse2 rather than sse if not enabled already.
19984
19985 PR target/83604
19986 * config/i386/sse.md (VI248_VLBW): Rename to ...
19987 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
19988 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
19989 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
19990 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
19991 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
19992 mode iterator instead of VI248_VLBW.
19993
19994 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
19995
19996 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
19997 (record_modified): Skip clobbers; add debug output.
19998 (param_change_prob): Use sreal frequencies.
19999
20000 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20001
20002 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
20003 punt for user-aligned variables.
20004
20005 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
20006
20007 * tree-chrec.c (chrec_contains_symbols): Return true for
20008 POLY_INT_CST.
20009
20010 2018-01-05 Sudakshina Das <sudi.das@arm.com>
20011
20012 PR target/82439
20013 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
20014 of (x|y) == x for BICS pattern.
20015
20016 2018-01-05 Jakub Jelinek <jakub@redhat.com>
20017
20018 PR tree-optimization/83605
20019 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
20020 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
20021 can throw.
20022
20023 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
20024
20025 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
20026 * config/epiphany/rtems.h: New file.
20027
20028 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20029 Uros Bizjak <ubizjak@gmail.com>
20030
20031 PR target/83554
20032 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
20033 QIreg_operand instead of register_operand predicate.
20034 * config/i386/i386.c (ix86_rop_should_change_byte_p,
20035 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
20036 comments instead of -fmitigate[-_]rop.
20037
20038 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20039
20040 PR bootstrap/81926
20041 * cgraphunit.c (symbol_table::compile): Switch to text_section
20042 before calling assembly_start debug hook.
20043 * run-rtl-passes.c (run_rtl_passes): Likewise.
20044 Include output.h.
20045
20046 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20047
20048 * tree-vrp.c (extract_range_from_binary_expr_1): Check
20049 range_int_cst_p rather than !symbolic_range_p before calling
20050 extract_range_from_multiplicative_op_1.
20051
20052 2018-01-04 Jeff Law <law@redhat.com>
20053
20054 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
20055 redundant test in assertion.
20056
20057 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20058
20059 * doc/rtl.texi: Document machine_mode wrapper classes.
20060
20061 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20062
20063 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
20064 using tree_to_uhwi.
20065
20066 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20067
20068 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
20069 the VEC_PERM_EXPR fold to fail.
20070
20071 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20072
20073 PR debug/83585
20074 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
20075 to switched_sections.
20076
20077 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20078
20079 PR target/83680
20080 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
20081 test for d.testing.
20082
20083 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
20084
20085 PR target/83387
20086 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
20087 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
20088
20089 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20090
20091 PR debug/83666
20092 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
20093 is BLKmode and bitpos not zero or mode change is needed.
20094
20095 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
20096
20097 PR target/83675
20098 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
20099 TARGET_VIS2.
20100
20101 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
20102
20103 PR target/83628
20104 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
20105 instead of MULT rtx. Update all corresponding splitters.
20106 (*saddl_se): Ditto.
20107 (*ssub<modesuffix>): Ditto.
20108 (*ssubl_se): Ditto.
20109 (*cmp_sadd_di): Update split patterns.
20110 (*cmp_sadd_si): Ditto.
20111 (*cmp_sadd_sidi): Ditto.
20112 (*cmp_ssub_di): Ditto.
20113 (*cmp_ssub_si): Ditto.
20114 (*cmp_ssub_sidi): Ditto.
20115 * config/alpha/predicates.md (const23_operand): New predicate.
20116 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
20117 Look for ASHIFT, not MULT inner operand.
20118 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
20119
20120 2018-01-04 Martin Liska <mliska@suse.cz>
20121
20122 PR gcov-profile/83669
20123 * gcov.c (output_intermediate_file): Add version to intermediate
20124 gcov file.
20125 * doc/gcov.texi: Document new field 'version' in intermediate
20126 file format. Fix location of '-k' option of gcov command.
20127
20128 2018-01-04 Martin Liska <mliska@suse.cz>
20129
20130 PR ipa/82352
20131 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
20132
20133 2018-01-04 Jakub Jelinek <jakub@redhat.com>
20134
20135 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
20136
20137 2018-01-03 Martin Sebor <msebor@redhat.com>
20138
20139 PR tree-optimization/83655
20140 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
20141 checking calls with invalid arguments.
20142
20143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20144
20145 * tree-vect-stmts.c (vect_get_store_rhs): New function.
20146 (vectorizable_mask_load_store): Delete.
20147 (vectorizable_call): Return false for masked loads and stores.
20148 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
20149 instead of gimple_assign_rhs1.
20150 (vectorizable_load): Handle IFN_MASK_LOAD.
20151 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
20152
20153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20154
20155 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
20156 split out from..,
20157 (vectorizable_mask_load_store): ...here.
20158 (vectorizable_load): ...and here.
20159
20160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20161
20162 * tree-vect-stmts.c (vect_build_all_ones_mask)
20163 (vect_build_zero_merge_argument): New functions, split out from...
20164 (vectorizable_load): ...here.
20165
20166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20167
20168 * tree-vect-stmts.c (vect_check_store_rhs): New function,
20169 split out from...
20170 (vectorizable_mask_load_store): ...here.
20171 (vectorizable_store): ...and here.
20172
20173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20174
20175 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
20176 split out from...
20177 (vectorizable_mask_load_store): ...here.
20178
20179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20180
20181 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
20182 (vect_model_store_cost): Take a vec_load_store_type instead of a
20183 vect_def_type.
20184 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
20185 (vect_model_store_cost): Take a vec_load_store_type instead of a
20186 vect_def_type.
20187 (vectorizable_mask_load_store): Update accordingly.
20188 (vectorizable_store): Likewise.
20189 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
20190
20191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20192
20193 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
20194 IFN_MASK_LOAD calls here rather than...
20195 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
20196
20197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20198 Alan Hayward <alan.hayward@arm.com>
20199 David Sherwood <david.sherwood@arm.com>
20200
20201 * expmed.c (extract_bit_field_1): For vector extracts,
20202 fall back to extract_bit_field_as_subreg if vec_extract
20203 isn't available.
20204
20205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20206 Alan Hayward <alan.hayward@arm.com>
20207 David Sherwood <david.sherwood@arm.com>
20208
20209 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
20210 they are variable or constant sized.
20211 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
20212 slots for constant-sized data.
20213
20214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20215 Alan Hayward <alan.hayward@arm.com>
20216 David Sherwood <david.sherwood@arm.com>
20217
20218 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
20219 handling COND_EXPRs with boolean comparisons, try to find a better
20220 basis for the mask type than the boolean itself.
20221
20222 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20223
20224 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
20225 is calculated and how it can be overridden.
20226 * genmodes.c (max_bitsize_mode_any_mode): New variable.
20227 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
20228 if defined.
20229 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
20230 if nonzero.
20231
20232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20233 Alan Hayward <alan.hayward@arm.com>
20234 David Sherwood <david.sherwood@arm.com>
20235
20236 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
20237 Remove the mode argument.
20238 (aarch64_simd_valid_immediate): Remove the mode and inverse
20239 arguments.
20240 * config/aarch64/iterators.md (bitsize): New iterator.
20241 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
20242 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
20243 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
20244 aarch64_simd_valid_immediate.
20245 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
20246 (aarch64_reg_or_bic_imm): Likewise.
20247 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
20248 with an insn_type enum and msl with a modifier_type enum.
20249 Replace element_width with a scalar_mode. Change the shift
20250 to unsigned int. Add constructors for scalar_float_mode and
20251 scalar_int_mode elements.
20252 (aarch64_vect_float_const_representable_p): Delete.
20253 (aarch64_can_const_movi_rtx_p)
20254 (aarch64_simd_scalar_immediate_valid_for_move)
20255 (aarch64_simd_make_constant): Update call to
20256 aarch64_simd_valid_immediate.
20257 (aarch64_advsimd_valid_immediate_hs): New function.
20258 (aarch64_advsimd_valid_immediate): Likewise.
20259 (aarch64_simd_valid_immediate): Remove mode and inverse
20260 arguments. Rewrite to use the above. Use const_vec_duplicate_p
20261 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
20262 and aarch64_float_const_representable_p on the result.
20263 (aarch64_output_simd_mov_immediate): Remove mode argument.
20264 Update call to aarch64_simd_valid_immediate and use of
20265 simd_immediate_info.
20266 (aarch64_output_scalar_simd_mov_immediate): Update call
20267 accordingly.
20268
20269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20270 Alan Hayward <alan.hayward@arm.com>
20271 David Sherwood <david.sherwood@arm.com>
20272
20273 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
20274 (mode_nunits): Likewise CONST_MODE_NUNITS.
20275 * machmode.def (ADJUST_NUNITS): Document.
20276 * genmodes.c (mode_data::need_nunits_adj): New field.
20277 (blank_mode): Update accordingly.
20278 (adj_nunits): New variable.
20279 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
20280 parameter.
20281 (emit_mode_size_inline): Set need_bytesize_adj for all modes
20282 listed in adj_nunits.
20283 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
20284 listed in adj_nunits. Don't emit case statements for such modes.
20285 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
20286 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
20287 nothing if adj_nunits is nonnull.
20288 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
20289 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
20290 (emit_mode_fbit): Update use of print_maybe_const_decl.
20291 (emit_move_size): Likewise. Treat the array as non-const
20292 if adj_nunits.
20293 (emit_mode_adjustments): Handle adj_nunits.
20294
20295 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20296
20297 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
20298 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
20299 (VECTOR_MODES): Use it.
20300 (make_vector_modes): Take the prefix as an argument.
20301
20302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20303 Alan Hayward <alan.hayward@arm.com>
20304 David Sherwood <david.sherwood@arm.com>
20305
20306 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
20307 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
20308 for MODE_VECTOR_BOOL.
20309 * machmode.def (VECTOR_BOOL_MODE): Document.
20310 * genmodes.c (VECTOR_BOOL_MODE): New macro.
20311 (make_vector_bool_mode): New function.
20312 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
20313 MODE_VECTOR_BOOL.
20314 * lto-streamer-in.c (lto_input_mode_table): Likewise.
20315 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
20316 Likewise.
20317 * stor-layout.c (int_mode_for_mode): Likewise.
20318 * tree.c (build_vector_type_for_mode): Likewise.
20319 * varasm.c (output_constant_pool_2): Likewise.
20320 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
20321 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
20322 for MODE_VECTOR_BOOL.
20323 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
20324 of mode class checks.
20325 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
20326 instead of a list of mode class checks.
20327 (expand_vector_scalar_condition): Likewise.
20328 (type_for_widest_vector_mode): Handle BImode as an inner mode.
20329
20330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20331 Alan Hayward <alan.hayward@arm.com>
20332 David Sherwood <david.sherwood@arm.com>
20333
20334 * machmode.h (mode_size): Change from unsigned short to
20335 poly_uint16_pod.
20336 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
20337 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20338 or if measurement_type is not polynomial.
20339 (fixed_size_mode::includes_p): Check for constant-sized modes.
20340 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
20341 return a poly_uint16 rather than an unsigned short.
20342 (emit_mode_size): Change the type of mode_size from unsigned short
20343 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
20344 (emit_mode_adjustments): Cope with polynomial vector sizes.
20345 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20346 for GET_MODE_SIZE.
20347 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20348 for GET_MODE_SIZE.
20349 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
20350 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
20351 * caller-save.c (setup_save_areas): Likewise.
20352 (replace_reg_with_saved_mem): Likewise.
20353 * calls.c (emit_library_call_value_1): Likewise.
20354 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
20355 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
20356 (gen_lowpart_for_combine): Likewise.
20357 * convert.c (convert_to_integer_1): Likewise.
20358 * cse.c (equiv_constant, cse_insn): Likewise.
20359 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
20360 (cselib_subst_to_values): Likewise.
20361 * dce.c (word_dce_process_block): Likewise.
20362 * df-problems.c (df_word_lr_mark_ref): Likewise.
20363 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
20364 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
20365 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
20366 (rtl_for_decl_location): Likewise.
20367 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
20368 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
20369 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
20370 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
20371 (expand_expr_real_1): Likewise.
20372 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
20373 (pad_below): Likewise.
20374 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20375 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
20376 * ira.c (get_subreg_tracking_sizes): Likewise.
20377 * ira-build.c (ira_create_allocno_objects): Likewise.
20378 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
20379 (ira_sort_regnos_for_alter_reg): Likewise.
20380 * ira-costs.c (record_operand_costs): Likewise.
20381 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
20382 (resolve_simple_move): Likewise.
20383 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
20384 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
20385 (lra_constraints): Likewise.
20386 (CONST_POOL_OK_P): Reject variable-sized modes.
20387 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
20388 (add_pseudo_to_slot, lra_spill): Likewise.
20389 * omp-low.c (omp_clause_aligned_alignment): Likewise.
20390 * optabs-query.c (get_best_extraction_insn): Likewise.
20391 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20392 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
20393 (expand_mult_highpart, valid_multiword_target_p): Likewise.
20394 * recog.c (offsettable_address_addr_space_p): Likewise.
20395 * regcprop.c (maybe_mode_change): Likewise.
20396 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
20397 * regrename.c (build_def_use): Likewise.
20398 * regstat.c (dump_reg_info): Likewise.
20399 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
20400 (find_reloads, find_reloads_subreg_address): Likewise.
20401 * reload1.c (eliminate_regs_1): Likewise.
20402 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
20403 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
20404 (simplify_binary_operation_1, simplify_subreg): Likewise.
20405 * targhooks.c (default_function_arg_padding): Likewise.
20406 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
20407 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
20408 (verify_gimple_assign_ternary): Likewise.
20409 * tree-inline.c (estimate_move_cost): Likewise.
20410 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20411 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
20412 (get_address_cost_ainc): Likewise.
20413 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
20414 (vect_supportable_dr_alignment): Likewise.
20415 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20416 (vectorizable_reduction): Likewise.
20417 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
20418 (vectorizable_operation, vectorizable_load): Likewise.
20419 * tree.c (build_same_sized_truth_vector_type): Likewise.
20420 * valtrack.c (cleanup_auto_inc_dec): Likewise.
20421 * var-tracking.c (emit_note_insn_var_location): Likewise.
20422 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
20423 (ADDR_VEC_ALIGN): Likewise.
20424
20425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20426 Alan Hayward <alan.hayward@arm.com>
20427 David Sherwood <david.sherwood@arm.com>
20428
20429 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
20430 unsigned short.
20431 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
20432 or if measurement_type is polynomial.
20433 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
20434 * combine.c (make_extraction): Likewise.
20435 * dse.c (find_shift_sequence): Likewise.
20436 * dwarf2out.c (mem_loc_descriptor): Likewise.
20437 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
20438 (extract_bit_field, extract_low_bits): Likewise.
20439 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
20440 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
20441 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
20442 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
20443 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
20444 * reload.c (find_reloads): Likewise.
20445 * reload1.c (alter_reg): Likewise.
20446 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
20447 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
20448 * tree-if-conv.c (predicate_mem_writes): Likewise.
20449 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
20450 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
20451 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
20452 * valtrack.c (dead_debug_insert_temp): Likewise.
20453 * varasm.c (mergeable_constant_section): Likewise.
20454 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
20455
20456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20457 Alan Hayward <alan.hayward@arm.com>
20458 David Sherwood <david.sherwood@arm.com>
20459
20460 * expr.c (expand_assignment): Cope with polynomial mode sizes
20461 when assigning to a CONCAT.
20462
20463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20464 Alan Hayward <alan.hayward@arm.com>
20465 David Sherwood <david.sherwood@arm.com>
20466
20467 * machmode.h (mode_precision): Change from unsigned short to
20468 poly_uint16_pod.
20469 (mode_to_precision): Return a poly_uint16 rather than an unsigned
20470 short.
20471 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
20472 or if measurement_type is not polynomial.
20473 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
20474 in which the mode is already known to be a scalar_int_mode.
20475 * genmodes.c (emit_mode_precision): Change the type of mode_precision
20476 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
20477 initializer.
20478 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20479 for GET_MODE_PRECISION.
20480 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20481 for GET_MODE_PRECISION.
20482 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
20483 as polynomial.
20484 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
20485 (expand_field_assignment, make_extraction): Likewise.
20486 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
20487 (get_last_value): Likewise.
20488 * convert.c (convert_to_integer_1): Likewise.
20489 * cse.c (cse_insn): Likewise.
20490 * expr.c (expand_expr_real_1): Likewise.
20491 * lra-constraints.c (simplify_operand_subreg): Likewise.
20492 * optabs-query.c (can_atomic_load_p): Likewise.
20493 * optabs.c (expand_atomic_load): Likewise.
20494 (expand_atomic_store): Likewise.
20495 * ree.c (combine_reaching_defs): Likewise.
20496 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
20497 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
20498 * tree.h (type_has_mode_precision_p): Likewise.
20499 * ubsan.c (instrument_si_overflow): Likewise.
20500
20501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20502 Alan Hayward <alan.hayward@arm.com>
20503 David Sherwood <david.sherwood@arm.com>
20504
20505 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
20506 polynomial numbers of units.
20507 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
20508 (valid_vector_subparts_p): New function.
20509 (build_vector_type): Remove temporary shim and take the number
20510 of units as a poly_uint64 rather than an int.
20511 (build_opaque_vector_type): Take the number of units as a
20512 poly_uint64 rather than an int.
20513 * tree.c (build_vector_from_ctor): Handle polynomial
20514 TYPE_VECTOR_SUBPARTS.
20515 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
20516 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
20517 (build_vector_from_val): If the number of units is variable,
20518 use build_vec_duplicate_cst for constant operands and
20519 VEC_DUPLICATE_EXPR otherwise.
20520 (make_vector_type): Remove temporary is_constant ().
20521 (build_vector_type, build_opaque_vector_type): Take the number of
20522 units as a poly_uint64 rather than an int.
20523 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
20524 VECTOR_CST_NELTS.
20525 * cfgexpand.c (expand_debug_expr): Likewise.
20526 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
20527 (store_constructor, expand_expr_real_1): Likewise.
20528 (const_scalar_mask_from_tree): Likewise.
20529 * fold-const-call.c (fold_const_reduction): Likewise.
20530 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
20531 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
20532 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
20533 (fold_relational_const): Likewise.
20534 (native_interpret_vector): Likewise. Change the size from an
20535 int to an unsigned int.
20536 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
20537 TYPE_VECTOR_SUBPARTS.
20538 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
20539 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
20540 duplicating a non-constant operand into a variable-length vector.
20541 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
20542 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
20543 * ipa-icf.c (sem_variable::equals): Likewise.
20544 * match.pd: Likewise.
20545 * omp-simd-clone.c (simd_clone_subparts): Likewise.
20546 * print-tree.c (print_node): Likewise.
20547 * stor-layout.c (layout_type): Likewise.
20548 * targhooks.c (default_builtin_vectorization_cost): Likewise.
20549 * tree-cfg.c (verify_gimple_comparison): Likewise.
20550 (verify_gimple_assign_binary): Likewise.
20551 (verify_gimple_assign_ternary): Likewise.
20552 (verify_gimple_assign_single): Likewise.
20553 * tree-pretty-print.c (dump_generic_node): Likewise.
20554 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
20555 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
20556 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
20557 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
20558 (vect_shift_permute_load_chain): Likewise.
20559 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
20560 (expand_vector_condition, optimize_vector_constructor): Likewise.
20561 (lower_vec_perm, get_compute_type): Likewise.
20562 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
20563 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
20564 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
20565 (vect_recog_mask_conversion_pattern): Likewise.
20566 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
20567 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
20568 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
20569 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
20570 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
20571 (vectorizable_shift, vectorizable_operation, vectorizable_store)
20572 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
20573 (supportable_widening_operation): Likewise.
20574 (supportable_narrowing_operation): Likewise.
20575 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
20576 Likewise.
20577 * varasm.c (output_constant): Likewise.
20578
20579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20580 Alan Hayward <alan.hayward@arm.com>
20581 David Sherwood <david.sherwood@arm.com>
20582
20583 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
20584 so that both the length == 3 and length != 3 cases set up their
20585 own permute vectors. Add comments explaining why we know the
20586 number of elements is constant.
20587 (vect_permute_load_chain): Likewise.
20588
20589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20590 Alan Hayward <alan.hayward@arm.com>
20591 David Sherwood <david.sherwood@arm.com>
20592
20593 * machmode.h (mode_nunits): Change from unsigned char to
20594 poly_uint16_pod.
20595 (ONLY_FIXED_SIZE_MODES): New macro.
20596 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
20597 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
20598 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
20599 New typedefs.
20600 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
20601 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
20602 or if measurement_type is not polynomial.
20603 * genmodes.c (ZERO_COEFFS): New macro.
20604 (emit_mode_nunits_inline): Make mode_nunits_inline return a
20605 poly_uint16.
20606 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
20607 Use ZERO_COEFFS when emitting initializers.
20608 * data-streamer.h (bp_pack_poly_value): New function.
20609 (bp_unpack_poly_value): Likewise.
20610 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
20611 for GET_MODE_NUNITS.
20612 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
20613 for GET_MODE_NUNITS.
20614 * tree.c (make_vector_type): Remove temporary shim and make
20615 the real function take the number of units as a poly_uint64
20616 rather than an int.
20617 (build_vector_type_for_mode): Handle polynomial nunits.
20618 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
20619 * emit-rtl.c (const_vec_series_p_1): Likewise.
20620 (gen_rtx_CONST_VECTOR): Likewise.
20621 * fold-const.c (test_vec_duplicate_folding): Likewise.
20622 * genrecog.c (validate_pattern): Likewise.
20623 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
20624 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
20625 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
20626 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
20627 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
20628 * rtlanal.c (subreg_get_info): Likewise.
20629 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
20630 (vect_grouped_load_supported): Likewise.
20631 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
20632 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
20633 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20634 (simplify_const_unary_operation, simplify_binary_operation_1)
20635 (simplify_const_binary_operation, simplify_ternary_operation)
20636 (test_vector_ops_duplicate, test_vector_ops): Likewise.
20637 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
20638 instead of CONST_VECTOR_NUNITS.
20639 * varasm.c (output_constant_pool_2): Likewise.
20640 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
20641 explicit-encoded elements in the XVEC for variable-length vectors.
20642
20643 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20644
20645 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
20646
20647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20648 Alan Hayward <alan.hayward@arm.com>
20649 David Sherwood <david.sherwood@arm.com>
20650
20651 * coretypes.h (fixed_size_mode): Declare.
20652 (fixed_size_mode_pod): New typedef.
20653 * builtins.h (target_builtins::x_apply_args_mode)
20654 (target_builtins::x_apply_result_mode): Change type to
20655 fixed_size_mode_pod.
20656 * builtins.c (apply_args_size, apply_result_size, result_vector)
20657 (expand_builtin_apply_args_1, expand_builtin_apply)
20658 (expand_builtin_return): Update accordingly.
20659
20660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20661
20662 * cse.c (hash_rtx_cb): Hash only the encoded elements.
20663 * cselib.c (cselib_hash_rtx): Likewise.
20664 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
20665 CONST_VECTOR encoding.
20666
20667 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20668 Jeff Law <law@redhat.com>
20669
20670 PR target/83641
20671 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
20672 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
20673 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
20674 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
20675
20676 PR target/83641
20677 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
20678 explicitly probe *sp in a noreturn function if there were any callee
20679 register saves or frame pointer is needed.
20680
20681 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20682
20683 PR debug/83621
20684 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
20685 BLKmode for ternary, binary or unary expressions.
20686
20687 PR debug/83645
20688 * var-tracking.c (delete_vta_debug_insn): New inline function.
20689 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
20690 insns from get_insns () to NULL instead of each bb separately.
20691 Use delete_vta_debug_insn. No longer static.
20692 (vt_debug_insns_local, variable_tracking_main_1): Adjust
20693 delete_vta_debug_insns callers.
20694 * rtl.h (delete_vta_debug_insns): Declare.
20695 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
20696 instead of variable_tracking_main.
20697
20698 2018-01-03 Martin Sebor <msebor@redhat.com>
20699
20700 PR tree-optimization/83603
20701 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
20702 arguments past the endof the argument list in functions declared
20703 without a prototype.
20704 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
20705 Avoid checking when arguments are null.
20706
20707 2018-01-03 Martin Sebor <msebor@redhat.com>
20708
20709 PR c/83559
20710 * doc/extend.texi (attribute const): Fix a typo.
20711 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
20712 issuing -Wsuggest-attribute for void functions.
20713
20714 2018-01-03 Martin Sebor <msebor@redhat.com>
20715
20716 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
20717 offset_int::from instead of wide_int::to_shwi.
20718 (maybe_diag_overlap): Remove assertion.
20719 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
20720 * gimple-ssa-sprintf.c (format_directive): Same.
20721 (parse_directive): Same.
20722 (sprintf_dom_walker::compute_format_length): Same.
20723 (try_substitute_return_value): Same.
20724
20725 2018-01-03 Jeff Law <law@redhat.com>
20726
20727 PR middle-end/83654
20728 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
20729 non-constant residual for zero at runtime and avoid probing in
20730 that case. Reorganize code for trailing problem to mirror handling
20731 of the residual.
20732
20733 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20734
20735 PR tree-optimization/83501
20736 * tree-ssa-strlen.c (get_string_cst): New.
20737 (handle_char_store): Call get_string_cst.
20738
20739 2018-01-03 Martin Liska <mliska@suse.cz>
20740
20741 PR tree-optimization/83593
20742 * tree-ssa-strlen.c: Include tree-cfg.h.
20743 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
20744 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
20745 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
20746 to false.
20747 (strlen_dom_walker::before_dom_children): Call
20748 gimple_purge_dead_eh_edges. Dump tranformation with details
20749 dump flags.
20750 (strlen_dom_walker::before_dom_children): Update call by adding
20751 new argument cleanup_eh.
20752 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
20753
20754 2018-01-03 Martin Liska <mliska@suse.cz>
20755
20756 PR ipa/83549
20757 * cif-code.def (VARIADIC_THUNK): New enum value.
20758 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
20759 thunks.
20760
20761 2018-01-03 Jan Beulich <jbeulich@suse.com>
20762
20763 * sse.md (mov<mode>_internal): Tighten condition for when to use
20764 vmovdqu<ssescalarsize> for TI and OI modes.
20765
20766 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20767
20768 Update copyright years.
20769
20770 2018-01-03 Martin Liska <mliska@suse.cz>
20771
20772 PR ipa/83594
20773 * ipa-visibility.c (function_and_variable_visibility): Skip
20774 functions with noipa attribure.
20775
20776 2018-01-03 Jakub Jelinek <jakub@redhat.com>
20777
20778 * gcc.c (process_command): Update copyright notice dates.
20779 * gcov-dump.c (print_version): Ditto.
20780 * gcov.c (print_version): Ditto.
20781 * gcov-tool.c (print_version): Ditto.
20782 * gengtype.c (create_file): Ditto.
20783 * doc/cpp.texi: Bump @copying's copyright year.
20784 * doc/cppinternals.texi: Ditto.
20785 * doc/gcc.texi: Ditto.
20786 * doc/gccint.texi: Ditto.
20787 * doc/gcov.texi: Ditto.
20788 * doc/install.texi: Ditto.
20789 * doc/invoke.texi: Ditto.
20790
20791 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20792
20793 * vector-builder.h (vector_builder::m_full_nelts): Change from
20794 unsigned int to poly_uint64.
20795 (vector_builder::full_nelts): Update prototype accordingly.
20796 (vector_builder::new_vector): Likewise.
20797 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
20798 (vector_builder::operator ==): Likewise.
20799 (vector_builder::finalize): Likewise.
20800 * int-vector-builder.h (int_vector_builder::int_vector_builder):
20801 Take the number of elements as a poly_uint64 rather than an
20802 unsigned int.
20803 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
20804 from unsigned int to poly_uint64.
20805 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
20806 (vec_perm_indices::new_vector): Likewise.
20807 (vec_perm_indices::length): Likewise.
20808 (vec_perm_indices::nelts_per_input): Likewise.
20809 (vec_perm_indices::input_nelts): Likewise.
20810 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
20811 number of elements per input as a poly_uint64 rather than an
20812 unsigned int. Use the original encoding for variable-length
20813 vectors, rather than clamping each individual element.
20814 For the second and subsequent elements in each pattern,
20815 clamp the step and base before clamping their sum.
20816 (vec_perm_indices::series_p): Handle polynomial element counts.
20817 (vec_perm_indices::all_in_range_p): Likewise.
20818 (vec_perm_indices_to_tree): Likewise.
20819 (vec_perm_indices_to_rtx): Likewise.
20820 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
20821 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
20822 (tree_vector_builder::new_binary_operation): Handle polynomial
20823 element counts. Return false if we need to know the number
20824 of elements at compile time.
20825 * fold-const.c (fold_vec_perm): Punt if the number of elements
20826 isn't known at compile time.
20827
20828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20829
20830 * vec-perm-indices.h (vec_perm_builder): Change element type
20831 from HOST_WIDE_INT to poly_int64.
20832 (vec_perm_indices::element_type): Update accordingly.
20833 (vec_perm_indices::clamp): Handle polynomial element_types.
20834 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
20835 (vec_perm_indices::all_in_range_p): Likewise.
20836 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
20837 than shwi trees.
20838 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
20839 polynomial vec_perm_indices element types.
20840 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
20841 * fold-const.c (fold_vec_perm): Likewise.
20842 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
20843 * tree-vect-generic.c (lower_vec_perm): Likewise.
20844 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
20845 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
20846 element type to HOST_WIDE_INT.
20847
20848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20849 Alan Hayward <alan.hayward@arm.com>
20850 David Sherwood <david.sherwood@arm.com>
20851
20852 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
20853 rather than an int. Use plus_constant.
20854 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
20855 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
20856
20857 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20858 Alan Hayward <alan.hayward@arm.com>
20859 David Sherwood <david.sherwood@arm.com>
20860
20861 * calls.c (emit_call_1, expand_call): Change struct_value_size from
20862 a HOST_WIDE_INT to a poly_int64.
20863
20864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20865 Alan Hayward <alan.hayward@arm.com>
20866 David Sherwood <david.sherwood@arm.com>
20867
20868 * calls.c (load_register_parameters): Cope with polynomial
20869 mode sizes. Require a constant size for BLKmode parameters
20870 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
20871 forces a parameter to be padded at the lsb end in order to
20872 fill a complete number of words, require the parameter size
20873 to be ordered wrt UNITS_PER_WORD.
20874
20875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20876 Alan Hayward <alan.hayward@arm.com>
20877 David Sherwood <david.sherwood@arm.com>
20878
20879 * reload1.c (spill_stack_slot_width): Change element type
20880 from unsigned int to poly_uint64_pod.
20881 (alter_reg): Treat mode sizes as polynomial.
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 * reload.c (complex_word_subreg_p): New function.
20888 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
20895 operands whose sizes aren't ordered.
20896 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
20903 that the mode size is in the set {1, 2, 4, 8, 16}.
20904
20905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20906 Alan Hayward <alan.hayward@arm.com>
20907 David Sherwood <david.sherwood@arm.com>
20908
20909 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
20910 Use plus_constant instead of gen_rtx_PLUS.
20911
20912 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20913 Alan Hayward <alan.hayward@arm.com>
20914 David Sherwood <david.sherwood@arm.com>
20915
20916 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
20917 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
20918 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
20919 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
20920 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
20921 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
20922 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
20923 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
20924 * config/i386/i386.c (ix86_push_rounding): ...this new function.
20925 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
20926 a poly_int64.
20927 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
20928 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
20929 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
20930 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
20931 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
20932 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
20933 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
20934 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
20935 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
20936 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
20937 function.
20938 * expr.c (emit_move_resolve_push): Treat the input and result
20939 of PUSH_ROUNDING as a poly_int64.
20940 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
20941 (emit_push_insn): Likewise.
20942 * lra-eliminations.c (mark_not_eliminable): Likewise.
20943 * recog.c (push_operand): Likewise.
20944 * reload1.c (elimination_effects): Likewise.
20945 * rtlanal.c (nonzero_bits1): Likewise.
20946 * calls.c (store_one_arg): Likewise. Require the padding to be
20947 known at compile time.
20948
20949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20950 Alan Hayward <alan.hayward@arm.com>
20951 David Sherwood <david.sherwood@arm.com>
20952
20953 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
20954 Use plus_constant instead of gen_rtx_PLUS.
20955
20956 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20957 Alan Hayward <alan.hayward@arm.com>
20958 David Sherwood <david.sherwood@arm.com>
20959
20960 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
20961 rather than an int.
20962
20963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20964 Alan Hayward <alan.hayward@arm.com>
20965 David Sherwood <david.sherwood@arm.com>
20966
20967 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
20968 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
20969 via stack temporaries. Treat the mode size as polynomial too.
20970
20971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20972 Alan Hayward <alan.hayward@arm.com>
20973 David Sherwood <david.sherwood@arm.com>
20974
20975 * expr.c (expand_expr_real_2): When handling conversions involving
20976 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
20977 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
20978 as a poly_uint64 too.
20979
20980 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
20981 Alan Hayward <alan.hayward@arm.com>
20982 David Sherwood <david.sherwood@arm.com>
20983
20984 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
20991 REGMODE_NATURAL_SIZE.
20992 * expmed.c (store_bit_field_1): Likewise.
20993 * expr.c (store_constructor): Likewise.
20994 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
20995 and polynomial REGMODE_NATURAL_SIZE.
20996 (gen_lowpart_common): Likewise.
20997 * reginfo.c (record_subregs_of_mode): Likewise.
20998 * rtlanal.c (read_modify_subreg_p): Likewise.
20999
21000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21001 Alan Hayward <alan.hayward@arm.com>
21002 David Sherwood <david.sherwood@arm.com>
21003
21004 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
21005 numbers of elements.
21006
21007 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21008 Alan Hayward <alan.hayward@arm.com>
21009 David Sherwood <david.sherwood@arm.com>
21010
21011 * match.pd: Cope with polynomial numbers of vector elements.
21012
21013 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21014 Alan Hayward <alan.hayward@arm.com>
21015 David Sherwood <david.sherwood@arm.com>
21016
21017 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
21018 in a POINTER_PLUS_EXPR.
21019
21020 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21021 Alan Hayward <alan.hayward@arm.com>
21022 David Sherwood <david.sherwood@arm.com>
21023
21024 * omp-simd-clone.c (simd_clone_subparts): New function.
21025 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
21026 (ipa_simd_modify_function_body): Likewise.
21027
21028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21029 Alan Hayward <alan.hayward@arm.com>
21030 David Sherwood <david.sherwood@arm.com>
21031
21032 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
21033 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
21034 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
21035 (expand_vector_condition, vector_element): Likewise.
21036 (subparts_gt): New function.
21037 (get_compute_type): Use subparts_gt.
21038 (count_type_subparts): Delete.
21039 (expand_vector_operations_1): Use subparts_gt instead of
21040 count_type_subparts.
21041
21042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21043 Alan Hayward <alan.hayward@arm.com>
21044 David Sherwood <david.sherwood@arm.com>
21045
21046 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
21047 (vect_compile_time_alias): ...this new function. Do the calculation
21048 on poly_ints rather than trees.
21049 (vect_prune_runtime_alias_test_list): Update call accordingly.
21050
21051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21052 Alan Hayward <alan.hayward@arm.com>
21053 David Sherwood <david.sherwood@arm.com>
21054
21055 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
21056 numbers of units.
21057 (vect_schedule_slp_instance): Likewise.
21058
21059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21060 Alan Hayward <alan.hayward@arm.com>
21061 David Sherwood <david.sherwood@arm.com>
21062
21063 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
21064 constant and extern definitions for variable-length vectors.
21065 (vect_get_constant_vectors): Note that the number of units
21066 is known to be constant.
21067
21068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21069 Alan Hayward <alan.hayward@arm.com>
21070 David Sherwood <david.sherwood@arm.com>
21071
21072 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
21073 of units as polynomial. Choose between WIDE and NARROW based
21074 on multiple_p.
21075
21076 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21077 Alan Hayward <alan.hayward@arm.com>
21078 David Sherwood <david.sherwood@arm.com>
21079
21080 * tree-vect-stmts.c (simd_clone_subparts): New function.
21081 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
21082
21083 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21084 Alan Hayward <alan.hayward@arm.com>
21085 David Sherwood <david.sherwood@arm.com>
21086
21087 * tree-vect-stmts.c (vectorizable_call): Treat the number of
21088 vectors as polynomial. Use build_index_vector for
21089 IFN_GOMP_SIMD_LANE.
21090
21091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21092 Alan Hayward <alan.hayward@arm.com>
21093 David Sherwood <david.sherwood@arm.com>
21094
21095 * tree-vect-stmts.c (get_load_store_type): Treat the number of
21096 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
21097 for variable-length vectors.
21098 (vectorizable_mask_load_store): Treat the number of units as
21099 polynomial, asserting that it is constant if the condition has
21100 already been enforced.
21101 (vectorizable_store, vectorizable_load): Likewise.
21102
21103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21104 Alan Hayward <alan.hayward@arm.com>
21105 David Sherwood <david.sherwood@arm.com>
21106
21107 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
21108 of units as polynomial. Punt if we can't tell at compile time
21109 which vector contains the final result.
21110
21111 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21112 Alan Hayward <alan.hayward@arm.com>
21113 David Sherwood <david.sherwood@arm.com>
21114
21115 * tree-vect-loop.c (vectorizable_induction): Treat the number
21116 of units as polynomial. Punt on SLP inductions. Use an integer
21117 VEC_SERIES_EXPR for variable-length integer reductions. Use a
21118 cast of such a series for variable-length floating-point
21119 reductions.
21120
21121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21122 Alan Hayward <alan.hayward@arm.com>
21123 David Sherwood <david.sherwood@arm.com>
21124
21125 * tree.h (build_index_vector): Declare.
21126 * tree.c (build_index_vector): New function.
21127 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
21128 of units as polynomial, forcibly converting it to a constant if
21129 vectorizable_reduction has already enforced the condition.
21130 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
21131 to create a {1,2,3,...} vector.
21132 (vectorizable_reduction): Treat the number of units as polynomial.
21133 Choose vectype_in based on the largest scalar element size rather
21134 than the smallest number of units. Enforce the restrictions
21135 relied on above.
21136
21137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21138 Alan Hayward <alan.hayward@arm.com>
21139 David Sherwood <david.sherwood@arm.com>
21140
21141 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
21142 number of units as polynomial.
21143
21144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21145 Alan Hayward <alan.hayward@arm.com>
21146 David Sherwood <david.sherwood@arm.com>
21147
21148 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
21149 * target.def (autovectorize_vector_sizes): Return the vector sizes
21150 by pointer, using vector_sizes rather than a bitmask.
21151 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
21152 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
21153 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
21154 Likewise.
21155 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
21156 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
21157 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
21158 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
21159 * omp-general.c (omp_max_vf): Likewise.
21160 * omp-low.c (omp_clause_aligned_alignment): Likewise.
21161 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
21162 * tree-vect-loop.c (vect_analyze_loop): Likewise.
21163 * tree-vect-slp.c (vect_slp_bb): Likewise.
21164 * doc/tm.texi: Regenerate.
21165 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
21166 to a poly_uint64.
21167 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
21168 the vector size as a poly_uint64 rather than an unsigned int.
21169 (current_vector_size): Change from an unsigned int to a poly_uint64.
21170 (get_vectype_for_scalar_type): Update accordingly.
21171 * tree.h (build_truth_vector_type): Take the size and number of
21172 units as a poly_uint64 rather than an unsigned int.
21173 (build_vector_type): Add a temporary overload that takes
21174 the number of units as a poly_uint64 rather than an unsigned int.
21175 * tree.c (make_vector_type): Likewise.
21176 (build_truth_vector_type): Take the number of units as a poly_uint64
21177 rather than an unsigned int.
21178
21179 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21180 Alan Hayward <alan.hayward@arm.com>
21181 David Sherwood <david.sherwood@arm.com>
21182
21183 * target.def (get_mask_mode): Take the number of units and length
21184 as poly_uint64s rather than unsigned ints.
21185 * targhooks.h (default_get_mask_mode): Update accordingly.
21186 * targhooks.c (default_get_mask_mode): Likewise.
21187 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
21188 * doc/tm.texi: Regenerate.
21189
21190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21191 Alan Hayward <alan.hayward@arm.com>
21192 David Sherwood <david.sherwood@arm.com>
21193
21194 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
21195 * omp-general.c (omp_max_vf): Likewise.
21196 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
21197 (expand_omp_simd): Handle polynomial safelen.
21198 * omp-low.c (omplow_simd_context): Add a default constructor.
21199 (omplow_simd_context::max_vf): Change from int to poly_uint64.
21200 (lower_rec_simd_input_clauses): Update accordingly.
21201 (lower_rec_input_clauses): Likewise.
21202
21203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21206
21207 * tree-vectorizer.h (vect_nunits_for_cost): New function.
21208 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
21209 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
21210 (vect_analyze_slp_cost): Likewise.
21211 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
21212 (vect_model_load_cost): Likewise.
21213
21214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21215 Alan Hayward <alan.hayward@arm.com>
21216 David Sherwood <david.sherwood@arm.com>
21217
21218 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
21219 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
21220 from an unsigned int * to a poly_uint64_pod *.
21221 (calculate_unrolling_factor): New function.
21222 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
21223
21224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21225 Alan Hayward <alan.hayward@arm.com>
21226 David Sherwood <david.sherwood@arm.com>
21227
21228 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
21229 from an unsigned int to a poly_uint64.
21230 (_loop_vec_info::slp_unrolling_factor): Likewise.
21231 (_loop_vec_info::vectorization_factor): Change from an int
21232 to a poly_uint64.
21233 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
21234 (vect_get_num_vectors): New function.
21235 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
21236 (vect_get_num_copies): Use vect_get_num_vectors.
21237 (vect_analyze_data_ref_dependences): Change max_vf from an int *
21238 to an unsigned int *.
21239 (vect_analyze_data_refs): Change min_vf from an int * to a
21240 poly_uint64 *.
21241 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21242 than an unsigned HOST_WIDE_INT.
21243 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
21244 (vect_analyze_data_ref_dependence): Change max_vf from an int *
21245 to an unsigned int *.
21246 (vect_analyze_data_ref_dependences): Likewise.
21247 (vect_compute_data_ref_alignment): Handle polynomial vf.
21248 (vect_enhance_data_refs_alignment): Likewise.
21249 (vect_prune_runtime_alias_test_list): Likewise.
21250 (vect_shift_permute_load_chain): Likewise.
21251 (vect_supportable_dr_alignment): Likewise.
21252 (dependence_distance_ge_vf): Take the vectorization factor as a
21253 poly_uint64 rather than an unsigned HOST_WIDE_INT.
21254 (vect_analyze_data_refs): Change min_vf from an int * to a
21255 poly_uint64 *.
21256 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
21257 vfm1 as a poly_uint64 rather than an int. Make the same change
21258 for the returned bound_scalar.
21259 (vect_gen_vector_loop_niters): Handle polynomial vf.
21260 (vect_do_peeling): Likewise. Update call to
21261 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
21262 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
21263 be constant.
21264 * tree-vect-loop.c (vect_determine_vectorization_factor)
21265 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
21266 (vect_get_known_peeling_cost): Likewise.
21267 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
21268 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
21269 (vect_transform_loop): Likewise. Use the lowest possible VF when
21270 updating the upper bounds of the loop.
21271 (vect_min_worthwhile_factor): Make static. Return an unsigned int
21272 rather than an int.
21273 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
21274 polynomial unroll factors.
21275 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
21276 (vect_make_slp_decision): Likewise.
21277 (vect_supported_load_permutation_p): Likewise, and polynomial
21278 vf too.
21279 (vect_analyze_slp_cost): Handle polynomial vf.
21280 (vect_slp_analyze_node_operations): Likewise.
21281 (vect_slp_analyze_bb_1): Likewise.
21282 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
21283 than an unsigned HOST_WIDE_INT.
21284 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
21285 (vectorizable_load): Handle polynomial vf.
21286 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
21287 a poly_uint64.
21288 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
21289
21290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21291 Alan Hayward <alan.hayward@arm.com>
21292 David Sherwood <david.sherwood@arm.com>
21293
21294 * match.pd: Handle bit operations involving three constants
21295 and try to fold one pair.
21296
21297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
21298
21299 * tree-vect-loop-manip.c: Include gimple-fold.h.
21300 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
21301 niters_maybe_zero parameters. Handle other cases besides a step of 1.
21302 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
21303 Add a path that uses a step of VF instead of 1, but disable it
21304 for now.
21305 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
21306 and niters_no_overflow parameters. Update calls to
21307 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
21308 Create a new SSA name if the latter choses to use a ste other
21309 than zero, and return it via niters_vector_mult_vf_var.
21310 * tree-vect-loop.c (vect_transform_loop): Update calls to
21311 vect_do_peeling, vect_gen_vector_loop_niters and
21312 slpeel_make_loop_iterate_ntimes.
21313 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
21314 (vect_gen_vector_loop_niters): Update declarations after above changes.
21315
21316 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
21317
21318 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
21319 128-bit round to integer instructions.
21320 (ceil<mode>2): Likewise.
21321 (btrunc<mode>2): Likewise.
21322 (round<mode>2): Likewise.
21323
21324 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21325
21326 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
21327 unaligned VSX load/store on P8/P9.
21328 (expand_block_clear): Allow the use of unaligned VSX
21329 load/store on P8/P9.
21330
21331 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21332
21333 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
21334 New function.
21335 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
21336 swap associated with both a load and a store.
21337
21338 2018-01-02 Andrew Waterman <andrew@sifive.com>
21339
21340 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
21341 * config/riscv/riscv.md (clear_cache): Use it.
21342
21343 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
21344
21345 * web.c: Remove out-of-date comment.
21346
21347 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21348
21349 * expr.c (fixup_args_size_notes): Check that any existing
21350 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
21351 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
21352 (emit_single_push_insn): ...here.
21353
21354 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21355
21356 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
21357 (const_vector_encoded_nelts): New function.
21358 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
21359 (const_vector_int_elt, const_vector_elt): Declare.
21360 * emit-rtl.c (const_vector_int_elt_1): New function.
21361 (const_vector_elt): Likewise.
21362 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
21363 of CONST_VECTOR_ELT.
21364
21365 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21366
21367 * expr.c: Include rtx-vector-builder.h.
21368 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
21369 directly on the tree encoding.
21370 (const_vector_from_tree): Likewise.
21371 * optabs.c: Include rtx-vector-builder.h.
21372 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
21373 sequence of "u" values.
21374 * vec-perm-indices.c: Include rtx-vector-builder.h.
21375 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
21376 directly on the vec_perm_indices encoding.
21377
21378 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21379
21380 * doc/rtl.texi (const_vector): Describe new encoding scheme.
21381 * Makefile.in (OBJS): Add rtx-vector-builder.o.
21382 * rtx-vector-builder.h: New file.
21383 * rtx-vector-builder.c: Likewise.
21384 * rtl.h (rtx_def::u2): Add a const_vector field.
21385 (CONST_VECTOR_NPATTERNS): New macro.
21386 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
21387 (CONST_VECTOR_DUPLICATE_P): Likewise.
21388 (CONST_VECTOR_STEPPED_P): Likewise.
21389 (CONST_VECTOR_ENCODED_ELT): Likewise.
21390 (const_vec_duplicate_p): Check for a duplicated vector encoding.
21391 (unwrap_const_vec_duplicate): Likewise.
21392 (const_vec_series_p): Check for a non-duplicated vector encoding.
21393 Say that the function only returns true for integer vectors.
21394 * emit-rtl.c: Include rtx-vector-builder.h.
21395 (gen_const_vec_duplicate_1): Delete.
21396 (gen_const_vector): Call gen_const_vec_duplicate instead of
21397 gen_const_vec_duplicate_1.
21398 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
21399 (gen_const_vec_duplicate): Use rtx_vector_builder.
21400 (gen_const_vec_series): Likewise.
21401 (gen_rtx_CONST_VECTOR): Likewise.
21402 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
21403 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21404 Build a new vector rather than modifying a CONST_VECTOR in-place.
21405 (handle_special_swappables): Update call accordingly.
21406 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
21407 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
21408 Build a new vector rather than modifying a CONST_VECTOR in-place.
21409 (handle_special_swappables): Update call accordingly.
21410
21411 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21412
21413 * simplify-rtx.c (simplify_const_binary_operation): Use
21414 CONST_VECTOR_ELT instead of XVECEXP.
21415
21416 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21417
21418 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
21419 the selector elements to be different from the data elements
21420 if the selector is a VECTOR_CST.
21421 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
21422 ssizetype for the selector.
21423
21424 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21425
21426 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
21427 before testing each element individually.
21428 * tree-vect-generic.c (lower_vec_perm): Likewise.
21429
21430 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21431
21432 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
21433 * selftest-run-tests.c (selftest::run_tests): Call it.
21434 * vector-builder.h (vector_builder::operator ==): New function.
21435 (vector_builder::operator !=): Likewise.
21436 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
21437 (vec_perm_indices::all_from_input_p): New function.
21438 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
21439 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
21440 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
21441 instead of reading the VECTOR_CST directly. Detect whether both
21442 vector inputs are the same before constructing the vec_perm_indices,
21443 and update the number of inputs argument accordingly. Use the
21444 utility functions added above. Only construct sel2 if we need to.
21445
21446 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21447
21448 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
21449 the broadcast of the low byte.
21450 (expand_mult_highpart): Use an explicit encoding for the permutes.
21451 * optabs-query.c (can_mult_highpart_p): Likewise.
21452 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
21453 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21454 (vectorizable_bswap): Likewise.
21455 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
21456 explicit encoding for the power-of-2 permutes.
21457 (vect_permute_store_chain): Likewise.
21458 (vect_grouped_load_supported): Likewise.
21459 (vect_permute_load_chain): Likewise.
21460
21461 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21462
21463 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
21464 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
21465 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
21466 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
21467 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
21468 (vect_gen_perm_mask_any): Likewise.
21469
21470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21471
21472 * int-vector-builder.h: New file.
21473 * vec-perm-indices.h: Include int-vector-builder.h.
21474 (vec_perm_indices): Redefine as an int_vector_builder.
21475 (auto_vec_perm_indices): Delete.
21476 (vec_perm_builder): Redefine as a stand-alone class.
21477 (vec_perm_indices::vec_perm_indices): New function.
21478 (vec_perm_indices::clamp): Likewise.
21479 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
21480 (vec_perm_indices::new_vector): New function.
21481 (vec_perm_indices::new_expanded_vector): Update for new
21482 vec_perm_indices class.
21483 (vec_perm_indices::rotate_inputs): New function.
21484 (vec_perm_indices::all_in_range_p): Operate directly on the
21485 encoded form, without computing elided elements.
21486 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
21487 encoding. Update for new vec_perm_indices class.
21488 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
21489 the given vec_perm_builder.
21490 (expand_vec_perm_var): Update vec_perm_builder constructor.
21491 (expand_mult_highpart): Use vec_perm_builder instead of
21492 auto_vec_perm_indices.
21493 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
21494 vec_perm_indices instead of auto_vec_perm_indices. Use a single
21495 or double series encoding as appropriate.
21496 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
21497 vec_perm_indices instead of auto_vec_perm_indices.
21498 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21499 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21500 (vect_permute_store_chain): Likewise.
21501 (vect_grouped_load_supported): Likewise.
21502 (vect_permute_load_chain): Likewise.
21503 (vect_shift_permute_load_chain): Likewise.
21504 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21505 (vect_transform_slp_perm_load): Likewise.
21506 (vect_schedule_slp_instance): Likewise.
21507 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21508 (vectorizable_mask_load_store): Likewise.
21509 (vectorizable_bswap): Likewise.
21510 (vectorizable_store): Likewise.
21511 (vectorizable_load): Likewise.
21512 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
21513 vec_perm_indices instead of auto_vec_perm_indices. Use
21514 tree_to_vec_perm_builder to read the vector from a tree.
21515 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
21516 vec_perm_builder instead of a vec_perm_indices.
21517 (have_whole_vector_shift): Use vec_perm_builder and
21518 vec_perm_indices instead of auto_vec_perm_indices. Leave the
21519 truncation to calc_vec_perm_mask_for_shift.
21520 (vect_create_epilog_for_reduction): Likewise.
21521 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
21522 from auto_vec_perm_indices to vec_perm_indices.
21523 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21524 instead of changing individual elements.
21525 (aarch64_vectorize_vec_perm_const): Use new_vector to install
21526 the vector in d.perm.
21527 * config/arm/arm.c (expand_vec_perm_d::perm): Change
21528 from auto_vec_perm_indices to vec_perm_indices.
21529 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
21530 instead of changing individual elements.
21531 (arm_vectorize_vec_perm_const): Use new_vector to install
21532 the vector in d.perm.
21533 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
21534 Update vec_perm_builder constructor.
21535 (rs6000_expand_interleave): Likewise.
21536 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
21537 (rs6000_expand_interleave): Likewise.
21538
21539 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21540
21541 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
21542 to qimode could truncate the indices.
21543 * optabs.c (expand_vec_perm_var): Likewise.
21544
21545 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21546
21547 * Makefile.in (OBJS): Add vec-perm-indices.o.
21548 * vec-perm-indices.h: New file.
21549 * vec-perm-indices.c: Likewise.
21550 * target.h (vec_perm_indices): Replace with a forward class
21551 declaration.
21552 (auto_vec_perm_indices): Move to vec-perm-indices.h.
21553 * optabs.h: Include vec-perm-indices.h.
21554 (expand_vec_perm): Delete.
21555 (selector_fits_mode_p, expand_vec_perm_var): Declare.
21556 (expand_vec_perm_const): Declare.
21557 * target.def (vec_perm_const_ok): Replace with...
21558 (vec_perm_const): ...this new hook.
21559 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
21560 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
21561 * doc/tm.texi: Regenerate.
21562 * optabs.def (vec_perm_const): Delete.
21563 * doc/md.texi (vec_perm_const): Likewise.
21564 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
21565 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
21566 expand_vec_perm for constant permutation vectors. Assert that
21567 the mode of variable permutation vectors is the integer equivalent
21568 of the mode that is being permuted.
21569 * optabs-query.h (selector_fits_mode_p): Declare.
21570 * optabs-query.c: Include vec-perm-indices.h.
21571 (selector_fits_mode_p): New function.
21572 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
21573 is defined, instead of checking whether the vec_perm_const_optab
21574 exists. Use targetm.vectorize.vec_perm_const instead of
21575 targetm.vectorize.vec_perm_const_ok. Check whether the indices
21576 fit in the vector mode before using a variable permute.
21577 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
21578 vec_perm_indices instead of an rtx.
21579 (expand_vec_perm): Replace with...
21580 (expand_vec_perm_const): ...this new function. Take the selector
21581 as a vec_perm_indices rather than an rtx. Also take the mode of
21582 the selector. Update call to shift_amt_for_vec_perm_mask.
21583 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
21584 Use vec_perm_indices::new_expanded_vector to expand the original
21585 selector into bytes. Check whether the indices fit in the vector
21586 mode before using a variable permute.
21587 (expand_vec_perm_var): Make global.
21588 (expand_mult_highpart): Use expand_vec_perm_const.
21589 * fold-const.c: Includes vec-perm-indices.h.
21590 * tree-ssa-forwprop.c: Likewise.
21591 * tree-vect-data-refs.c: Likewise.
21592 * tree-vect-generic.c: Likewise.
21593 * tree-vect-loop.c: Likewise.
21594 * tree-vect-slp.c: Likewise.
21595 * tree-vect-stmts.c: Likewise.
21596 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
21597 Delete.
21598 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
21599 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
21600 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
21601 (aarch64_vectorize_vec_perm_const): ...this new function.
21602 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21603 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21604 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
21605 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
21606 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21607 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21608 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
21609 into...
21610 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
21611 check for NEON modes.
21612 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
21613 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
21614 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
21615 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
21616 into...
21617 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
21618 the old VEC_PERM_CONST conditions.
21619 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
21620 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
21621 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
21622 (ia64_vectorize_vec_perm_const_ok): Merge into...
21623 (ia64_vectorize_vec_perm_const): ...this new function.
21624 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
21625 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
21626 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
21627 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
21628 * config/mips/mips.c (mips_expand_vec_perm_const)
21629 (mips_vectorize_vec_perm_const_ok): Merge into...
21630 (mips_vectorize_vec_perm_const): ...this new function.
21631 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
21632 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
21633 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
21634 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
21635 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
21636 (rs6000_expand_vec_perm_const): Delete.
21637 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
21638 Delete.
21639 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21640 (altivec_expand_vec_perm_const_le): Take each operand individually.
21641 Operate on constant selectors rather than rtxes.
21642 (altivec_expand_vec_perm_const): Likewise. Update call to
21643 altivec_expand_vec_perm_const_le.
21644 (rs6000_expand_vec_perm_const): Delete.
21645 (rs6000_vectorize_vec_perm_const_ok): Delete.
21646 (rs6000_vectorize_vec_perm_const): New function.
21647 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21648 an element count and rtx array.
21649 (rs6000_expand_extract_even): Update call accordingly.
21650 (rs6000_expand_interleave): Likewise.
21651 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
21652 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
21653 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
21654 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
21655 (rs6000_expand_vec_perm_const): Delete.
21656 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
21657 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21658 (altivec_expand_vec_perm_const_le): Take each operand individually.
21659 Operate on constant selectors rather than rtxes.
21660 (altivec_expand_vec_perm_const): Likewise. Update call to
21661 altivec_expand_vec_perm_const_le.
21662 (rs6000_expand_vec_perm_const): Delete.
21663 (rs6000_vectorize_vec_perm_const_ok): Delete.
21664 (rs6000_vectorize_vec_perm_const): New function. Remove stray
21665 reference to the SPE evmerge intructions.
21666 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
21667 an element count and rtx array.
21668 (rs6000_expand_extract_even): Update call accordingly.
21669 (rs6000_expand_interleave): Likewise.
21670 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
21671 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
21672 new function.
21673 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
21674
21675 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21676
21677 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
21678 vector mode and that that mode matches the mode of the data
21679 being permuted.
21680 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
21681 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
21682 directly using expand_vec_perm_1 when forcing selectors into
21683 registers.
21684 (expand_vec_perm_var): New function, split out from expand_vec_perm.
21685
21686 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21687
21688 * optabs-query.h (can_vec_perm_p): Delete.
21689 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
21690 * optabs-query.c (can_vec_perm_p): Split into...
21691 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
21692 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
21693 particular selector is valid.
21694 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21695 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
21696 (vect_grouped_load_supported): Likewise.
21697 (vect_shift_permute_load_chain): Likewise.
21698 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
21699 (vect_transform_slp_perm_load): Likewise.
21700 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
21701 (vectorizable_bswap): Likewise.
21702 (vect_gen_perm_mask_checked): Likewise.
21703 * fold-const.c (fold_ternary_loc): Likewise. Don't take
21704 implementations of variable permutation vectors into account
21705 when deciding which selector to use.
21706 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
21707 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
21708 with a false third argument.
21709 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
21710 to test whether the constant selector is valid and can_vec_perm_var_p
21711 to test whether a variable selector is valid.
21712
21713 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21714
21715 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
21716 * optabs-query.c (can_vec_perm_p): Likewise.
21717 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
21718 instead of vec_perm_indices.
21719 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
21720 (vect_gen_perm_mask_checked): Likewise,
21721 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
21722 (vect_gen_perm_mask_checked): Likewise,
21723
21724 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
21725
21726 * optabs-query.h (qimode_for_vec_perm): Declare.
21727 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
21728 (qimode_for_vec_perm): ...this new function.
21729 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
21730
21731 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21732
21733 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
21734 does not have a conditional at the top.
21735
21736 2018-01-02 Richard Biener <rguenther@suse.de>
21737
21738 * ipa-inline.c (big_speedup_p): Fix expression.
21739
21740 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21741
21742 PR target/81616
21743 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
21744 for generic 4->6.
21745
21746 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
21747
21748 PR target/81616
21749 Generic tuning.
21750 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
21751 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
21752 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
21753 cond_taken_branch_cost 3->4.
21754
21755 2018-01-01 Jakub Jelinek <jakub@redhat.com>
21756
21757 PR tree-optimization/83581
21758 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
21759 TODO_cleanup_cfg if any changes have been made.
21760
21761 PR middle-end/83608
21762 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
21763 convert_modes if target mode has the right side, but different mode
21764 class.
21765
21766 PR middle-end/83609
21767 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
21768 last argument when extracting from CONCAT. If either from_real or
21769 from_imag is NULL, use expansion through memory. If result is not
21770 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
21771 the parts directly to inner mode, if even that fails, use expansion
21772 through memory.
21773
21774 PR middle-end/83623
21775 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
21776 check for bswap in mode rather than HImode and use that in expand_unop
21777 too.
21778 \f
21779 Copyright (C) 2018 Free Software Foundation, Inc.
21780
21781 Copying and distribution of this file, with or without modification,
21782 are permitted in any medium without royalty provided the copyright
21783 notice and this notice are preserved.